Identification method and device and computer storage medium

By simulating the brain's processing of temporal information and using a chain attractor structure to integrate object representation values, the problem of insufficient processing of temporal information by deep neural networks in keyword speech recognition is solved, and the recognition accuracy and model adaptability are improved.

CN118692467APending Publication Date: 2024-09-24HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310320724.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing deep neural networks ignore the temporal relationship of temporal information in keyword speech recognition, resulting in low recognition accuracy and difficulty in adapting to flexible and changeable application scenarios.

Method used

By simulating the brain's processing of time series information, the chain attractor structure is used to integrate the object representation values ​​of time series samples in order to ensure the accuracy of recognition, and speed up the convergence and training of the model through noise and distinction information.

Benefits of technology

It improves the accuracy of keyword recognition and the robustness of the model, adapts to flexible application scenarios, and reduces the demand for computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692467A
    Figure CN118692467A
Patent Text Reader

Abstract

The invention provides an identification method and device and a computer storage medium. In the embodiment, the method comprises the following steps: acquiring a first time sequence sample; inputting the first time sequence sample into a first model, wherein the first model sequentially outputs object representation values; wherein the object characterization value output in sequence is used for characterizing a first object in the N first objects arranged in sequence, the N first objects form M first categories, and the object characterization value output in sequence is at least used for determining that the first time sequence sample belongs to a target category in the M first categories. Therefore, the representation of the object is determined, integration is carried out according to the occurrence time sequence of the object, the processing of the time sequence information by the brain is simulated, and the recognition precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an identification method, device and computer storage medium. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0003] In recent years, with the rapid development of deep learning technology, deep neural networks are increasingly used for keyword speech recognition. Keyword speech recognition is mainly used to process and recognize keywords in speech streams. Deep neural networks can be used to model speech signals end-to-end and perform supervised learning on large amounts of data.

[0004] At present, deep neural networks for keyword speech recognition can be roughly divided into two parts: one is feature extraction, and the other is spatiotemporal feature integration recognition. For example, when deep convolutional neural networks are used for speech recognition, speech is usually converted into MFCC features, and then the MFCC features are regarded as images for recognition, resulting in low accuracy of keyword recognition.

[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0006] The embodiments of the present application provide a recognition method, device and computer storage medium, which simulate the brain's processing of timing information by determining the representation of the object and integrating it according to the time sequence of the object's occurrence, thereby ensuring the accuracy of recognition.

[0007] In a first aspect, an embodiment of the present application provides an identification method, and the method is characterized in that it includes:

[0008] Obtaining a first time series sample;

[0009] The first time series sample is input into the first model, and the first model sequentially outputs object representation values; wherein the sequentially output object representation values ​​are used to represent the first object among N first objects arranged in sequence, the N first objects form M first categories, and the sequentially output object representation values ​​are at least used to determine that the first time series sample belongs to a target category among the M first categories.

[0010] In this scheme, by determining the representation of the object and integrating it according to the time sequence of the object's occurrence, the brain's processing of temporal information is simulated to ensure the accuracy of recognition.

[0011] In a possible implementation manner, the first time series sample is a speech feature sequence, and the first object is a phoneme or a syllable.

[0012] In an optional manner of this implementation, the first category is a keyword category.

[0013] In this scheme, by determining the representation of phonemes or syllables and integrating them according to the timing of their occurrence, the brain's processing of timing information is simulated to ensure the accuracy of keyword recognition.

[0014] In a possible implementation manner, the first time series sample is an image sequence, the N first objects are action units, and the first category is an action category.

[0015] In this scheme, by determining the representation of action units and integrating them according to the timing of the action units, the brain's processing of timing information is simulated to ensure the accuracy of action recognition.

[0016] In a possible implementation, the first model is a neural network-based model.

[0017] In an optional manner of this implementation, the first model is a model constructed in accordance with neural dynamics.

[0018] In an example of an optional manner, the first model includes N attractor networks, the result output by each attractor network represents any one of the N first objects, the N attractor networks are connected to form M chain attractor structures, and each chain attractor structure represents any one of the M first categories;

[0019] The first model is used to process the first time series sample, and according to any chain attractor structure among the M chain attractor structures, the attractor networks among the N attractor networks are sequentially activated to sequentially output object representation values.

[0020] In this scheme, the integration of space-time structure can be achieved through the chain attractor structure, simulating the human brain's processing of temporal information and realizing the sequential output of object representation values.

[0021] In one example of this example, the first model is a trained first model, and the untrained first model includes N sub-networks, and the N sub-networks are connected to form M chain structures. In the trained first model, the N sub-networks serve as an attractor network, and the M chain structures serve as a chain attractor structure.

[0022] In a possible implementation, there are multiple first time series samples, each of which carries a first label, the first label indicates a first object among N first objects arranged in time sequence in the first time series sample, and the first object among the N first objects arranged in time sequence in the first time series sample forms any category among M first categories; the first model sequentially outputs object representation values ​​to form a first sequence;

[0023] The method also includes: training a first model based on first sequences corresponding to each of the plurality of first time series samples and the first labels carried, to obtain a trained first model.

[0024] In a possible scenario of this implementation, the first object is a phoneme or a syllable.

[0025] In an example of this scenario, noise is added between adjacent data belonging to a first object among the N first objects in the first time series samples.

[0026] In this scheme, adding noise helps to ensure the robustness of the model.

[0027] In another example of this scenario, distinguishing information is added between adjacent data belonging to a first object among the N first objects in the first time series sample.

[0028] In this scheme, adding distinguishing information is beneficial to accelerate the convergence of the model and speed up the training.

[0029] In an optional manner of this implementation, the first tag indicates that the appearance time of any first object before the last first object is the appearance time of the first object in the first time series sample, and the end time is the appearance time of the next first object in the first time series sample.

[0030] In an optional embodiment of the implementation, the method further includes:

[0031] Acquire multiple second time series samples corresponding to M second categories; each second time series sample carries a second label, the second label indicates a second object among N second objects arranged in time sequence in the second time series sample, the N second objects form M second categories, and the second objects among N second objects arranged in time sequence in the second time series sample form any second category among the M second categories; for each second time series sample, input the second time series sample into a second model, and the second model sequentially outputs object representation values ​​to form a second sequence; the second sequence is used to represent the second object among the N second objects arranged in sequence; train the second model based on the second sequences corresponding to each of the multiple second time series samples and the second labels carried; and use the trained second model as the first model.

[0032] In this scheme, after learning the chain attractor structure on other tasks, the existing chain attractor structure is reused through small sample data of other tasks to quickly implement transfer learning, which can adapt to flexible and diverse application scenarios.

[0033] In an optional manner of this implementation, the first label includes an object composition sequence corresponding to each of the M first categories, and the object composition sequence indicates a first object forming the corresponding first category in the first time series sample;

[0034] Based on the first sequences corresponding to each of the multiple first time series samples and the first labels carried, the first model is trained, including: for each first time series sample in the multiple first time series samples, the object representation value sequentially output by the first model is input into the second model, and the second model outputs a recognition result, the recognition result includes a predicted component sequence corresponding to each of the M first categories; the predicted component sequence indicates the first object constituting the corresponding first category; based on the recognition results and the first labels corresponding to each of the multiple first time series samples, the first model and the second model are trained to obtain a trained first model and a trained second model.

[0035] In a possible implementation, the first model is a trained first model, and the object representation values ​​sequentially output by the trained first model are used to represent at least part of the first objects that form the target category.

[0036] In a possible implementation, the method further includes:

[0037] The object representation values ​​sequentially output by the first model are input into the second model, and the recognition result output by the second model is used to determine whether the first time series sample belongs to a target category among the M first categories; wherein the recognition result includes a predicted component sequence corresponding to each of the M first categories; and the predicted component sequence indicates the first object constituting the corresponding first category.

[0038] In a second aspect, an embodiment of the present application provides an identification method, including:

[0039] Acquire a first time series sample; input the first time series sample into a trained first model; determine a target category among M first categories to which the first time series sample belongs based on the object representation values ​​sequentially output by the trained first model; wherein the M first categories are formed by N first objects, and the sequentially output object representation values ​​are used to represent the first object among the N first objects arranged in order.

[0040] In this scheme, by determining the representation of the object and integrating it according to the time sequence of the object's occurrence, the brain's processing of temporal information is simulated to ensure the accuracy of recognition.

[0041] In a possible implementation, the first time series sample is speech feature data, and the N first objects are phonemes or syllables.

[0042] In this scheme, by determining the representation of phonemes or syllables and integrating them according to the timing of their occurrence, the brain's processing of timing information is simulated to ensure the accuracy of speech data recognition.

[0043] In an optional manner of this implementation, the first category is a keyword category.

[0044] In a possible implementation manner, the first time series sample is an image sequence, the N first objects are action units, and the first category is an action category.

[0045] In this scheme, by determining the representation of action units and integrating them according to the timing of the action units, the brain's processing of timing information is simulated to ensure the accuracy of action recognition.

[0046] In a possible implementation, the first model is a neural network-based model.

[0047] In an optional manner of this implementation, the first model is a model constructed in accordance with neural dynamics.

[0048] In an example of an optional manner, the trained first model includes N attractor networks, the result output by each attractor network represents any object among the N first objects, the N attractor networks are connected to form M chain attractor structures, and each chain attractor structure represents any first category among the M first categories;

[0049] The trained first model is used to process the first time series sample, and according to any chain attractor structure among the M chain attractor structures, the attractor networks among the N attractor networks are sequentially activated to sequentially output object representation values.

[0050] In this scheme, the integration of space-time structure can be achieved through the chain attractor structure, simulating the human brain's processing of temporal information and realizing the representation of different objects in sequential output.

[0051] In an example of an optional manner, the untrained first model includes N sub-networks, and the N sub-networks are connected to form M chain structures. In the trained first model, the N sub-networks serve as an attractor network, and the M chain structures serve as a chain attractor structure.

[0052] In a possible implementation, the object representation values ​​sequentially output by the trained first model are used to at least represent a portion of the first objects that form the target category.

[0053] In the embodiment of the present application, there is no need to process all the data in the time series sample, and decisions are made based on only part of the data in the time series sample, thereby achieving classification through event-driven, reducing the amount of calculation, improving classification efficiency, and saving computing resources.

[0054] In a possible implementation, determining the target category among the M first categories to which the first time series sample belongs based on the object representation values ​​sequentially output by the trained first model includes:

[0055] The object representation values ​​sequentially output by the trained first model are input into the trained second model; based on the recognition result output by the trained second model, the target category among the M first categories to which the first time series sample belongs is determined; wherein the recognition result includes a predicted component sequence corresponding to each of the M first categories; the predicted component sequence indicates the first object constituting the corresponding first category.

[0056] In the embodiment of the present application, by mapping the object characterization value to the components of the second category, it is convenient to accumulate the components of M second categories, so as to realize classification through event-driven, reduce the amount of calculation, improve the classification efficiency, and save computing resources.

[0057] In a third aspect, an embodiment of the present application provides a model training method, including:

[0058] Acquire multiple first time series samples; each first time series sample carries a first label, the first label indicates a first object among N first objects arranged in time sequence in the first time series sample, the N first objects form M first categories, and the first object among the N first objects arranged in time sequence in the first time series sample forms any category among the M first categories; for each first time series sample in the multiple first time series samples, input the first time series sample into a first model, the first model sequentially outputs object representation values ​​to form a first sequence, and the first sequence is used to represent the first object among the N first objects arranged in sequence; train the first model based on the first sequences corresponding to each of the multiple first time series samples and the first labels carried; wherein the object representation values ​​sequentially output by the trained first model are used to determine any category among the M first categories.

[0059] In this scheme, through model training, the obtained model can determine the representation of different objects and integrate them according to the time sequence of the objects, simulating the brain's processing of temporal information to ensure the accuracy of recognition.

[0060] In a possible implementation manner, the first time series sample is an image sequence, the N first objects are action units, and the first category is an action category.

[0061] In this scheme, by determining the representation of action units and integrating them according to the timing of the action units, the brain's processing of timing information is simulated to ensure the accuracy of action recognition.

[0062] In a possible implementation, the first model is a neural network-based model.

[0063] In an optional manner of this implementation, the first model is a model constructed in accordance with neural dynamics.

[0064] In one example of an optional method, the trained first model includes N attractor networks, the result output by each attractor network represents any one of the N first objects, the N attractor networks are connected to form M chain attractor structures, and each chain attractor structure represents any one of the M first categories.

[0065] In an example, the untrained first model includes N sub-networks, which are connected to form M chain structures. In the trained first model, the N sub-networks serve as an attractor network, and the M chain structures serve as a chain attractor structure.

[0066] In a possible implementation, the first time series sample is speech feature data, and the N first objects are phonemes or syllables.

[0067] In an optional manner of this implementation, the first category is a keyword category.

[0068] In an optional manner of this implementation manner, noise is added between adjacent data belonging to a first object among the N first objects in the first time series samples.

[0069] In this scheme, adding noise helps to ensure the robustness of the model.

[0070] In an optional manner of this implementation, distinguishing information is added between adjacent data belonging to a first object among the N first objects in the first time series samples.

[0071] In a possible implementation, the first tag indicates that the appearance time of any first object before the last first object is the appearance time of the first object in the first time series sample, and the end time is the appearance time of the next first object in the first time series sample.

[0072] In a possible implementation, the method further includes:

[0073] Acquire multiple second time series samples corresponding to M second categories; each second time series sample carries a second label, the second label indicates a second object among N second objects arranged in time sequence in the second time series sample, the N second objects form M second categories, and the second objects among N second objects arranged in time sequence in the second time series sample form any second category among the M second categories; for each second time series sample, input the second time series sample into a second model, and the second model sequentially outputs object representation values ​​to form a second sequence; the second sequence is used to represent the second object among the N second objects arranged in sequence; train the second model based on the second sequences corresponding to each of the multiple second time series samples and the second labels carried; and use the trained second model as the first model.

[0074] In this scheme, after learning the chain attractor structure on other tasks, the existing chain attractor structure is reused through small sample data of other tasks to quickly implement transfer learning, which can adapt to flexible and diverse application scenarios.

[0075] In one possible implementation, the first label includes an object composition sequence corresponding to each of the M first categories, and the object composition sequence indicates a first object forming a corresponding first category in a first time series sample; based on the first sequences corresponding to each of the multiple first time series samples and the first labels carried, a first model is trained, including: for each of the multiple first time series samples, based on the second model, a first sequence formed by the object representation values ​​sequentially output by the first model is identified to obtain an identification result, and the identification result includes a predicted composition sequence corresponding to each of the M first categories; the predicted composition sequence indicates a first object constituting the corresponding first category; based on the identification results and the first labels corresponding to each of the multiple first time series samples, the first model and the second model are trained.

[0076] In the embodiment of the present application, by mapping the object representation value to the components of the second category, it is convenient to accumulate the components of the M second categories, so that the subsequent decision-making can be achieved in an event-driven manner through the first model and the second model.

[0077] In a fourth aspect, an embodiment of the present application provides an identification device, comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method provided in the first aspect, the method provided in the second aspect, or the method provided in the third aspect.

[0078] In a fifth aspect, an embodiment of the present application provides an identification device, characterized in that the device runs computer program instructions to execute the method provided in the first aspect, the method provided in the second aspect, or the method provided in the third aspect. Exemplarily, the device can be a chip or a processor.

[0079] In one example, the device may include a processor, which may be coupled to a memory, read instructions in the memory, and execute the method provided in the first aspect, the method provided in the second aspect, or the method provided in the third aspect according to the instructions. The memory may be integrated in a chip or a processor, or may be independent of the chip or the processor.

[0080] In a sixth aspect, an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method provided in the first aspect, the method provided in the second aspect, or the method provided in the third aspect.

[0081] In the seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the method provided in the first aspect, the method provided in the second aspect, or the method provided in the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 This is a schematic diagram of an artificial intelligence main framework provided by an embodiment of the present application;

[0083] Figure 2a It is a schematic diagram of a model representation provided in an embodiment of the present application;

[0084] Figure 2b is a schematic diagram of a chain attractor structure provided in an embodiment of the present application;

[0085] Figure 2c It is a schematic diagram of the input and output of the attractor network provided in the embodiment of the present application;

[0086] Figure 2d This is a schematic diagram of the working principle of the attractor network provided in the embodiment of the present application. Figure 1 ;

[0087] Figure 2eSchematic diagram 2 of the working principle of the attractor network provided in the embodiment of the present application;

[0088] Figure 3a This is a schematic diagram of the working principle of the first model provided in the embodiment of the present application. Figure 1 ;

[0089] Figure 3b Schematic diagram 2 of the working principle of the first model provided in the embodiment of the present application;

[0090] Figure 3c It is a structural schematic diagram of the first model provided in the embodiment of the present application;

[0091] Figure 3d yes Figure 3c Schematic diagram of the input and output of the attractor network in;

[0092] Figure 3e yes Figure 3c Schematic diagram of the structure of the input layer in ;

[0093] Figure 3f yes Figure 3c The structure of the mutual feeding layer in Figure 1 ;

[0094] Figure 3g yes Figure 3c Schematic diagram of the structure of the mutual feeding layer in FIG2;

[0095] Figure 4 It is a flowchart of a model training method provided in an embodiment of the present application;

[0096] Figure 5 This is a schematic diagram of obtaining a time series sample provided in an embodiment of the present application. Figure 1 ;

[0097] Figure 6a This is a schematic diagram of the first label provided in the embodiment of the present application. Figure 1 ;

[0098] Figure 6b is a second schematic diagram of the first label provided in an embodiment of the present application;

[0099] Figure 6c yes Figure 6b Schematic diagram of data processing under the first label;

[0100] Figure 6d yes Figure 6c Schematic diagram of the structure of the second model;

[0101] Figure 6e yes Figure 6c Schematic diagram of model training under the data processing shown;

[0102] Figure 6f yes Figure 6c A schematic diagram of the second model output is shown;

[0103] Figure 6g Yes Test Figure 6c Schematic diagram of the chain attractor structure obtained by the first model and the second model shown;

[0104] Figure 6h Yes Test Figure 6c A schematic diagram showing the model loss of the first model and the second model under the difference information equal to 0 and greater than 0;

[0105] Figure 6i Yes Test Figure 6c A schematic diagram showing the model loss and model accuracy of the first model and the second model under transfer learning and without transfer learning;

[0106] Figure 7 It is a flowchart of an identification method provided in an embodiment of the present application;

[0107] Figure 8 is a schematic diagram of the training of the second model provided in an embodiment of the present application;

[0108] Fig. 9 This is a schematic diagram of an application environment provided by an embodiment of the present application;

[0109] Fig.10 It is a structural diagram of a terminal cloud system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0110] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0111] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.

[0112] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "multiple" means two or more. For example, multiple systems refers to two or more systems, and multiple terminals refers to two or more terminals.

[0113] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0114] Hereinafter, some terms used in this embodiment are explained. It should be noted that these explanations are for the convenience of understanding by those skilled in the art and do not constitute a limitation on the scope of protection claimed by the present invention.

[0115] Artificial Intelligence (AI): It is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science. AI attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0116] Activation function: A function that runs on the neurons of an artificial neural network and is responsible for mapping the input of the neuron to the output. The activation function can be any of the rectified linear unit (ReLU) function, the sigmoid function, or the hyperbolic tangent function (usually written as tanh).

[0117] Figure 1 A schematic diagram of an artificial intelligence main framework is shown, which describes the overall workflow of the artificial intelligence system and is applicable to general artificial intelligence field requirements.

[0118] The following is an explanation of the above artificial intelligence theme framework from two dimensions: "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).

[0119] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes a condensed process of "data-information-knowledge-wisdom".

[0120] The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the system's industrial ecological process.

[0121] (1) Infrastructure:

[0122] The infrastructure provides computing power support for the artificial intelligence system, enables communication with the outside world, and supports it through the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips, among which smart chips can be central processing units (CPU), network processors (neural-network processing units, NPU), graphics processing units (graphics processing units, GPU), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) and other hardware acceleration chips; the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.

[0123] (2) Data

[0124] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.

[0125] (3) Data processing

[0126] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.

[0127] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, training, etc. Deep learning is the most successful case of brain-like artificial intelligence development to date. Deep learning directly puts a large amount of data into the algorithm, and the system will automatically use this data to learn and study. The "training" and "prediction" processes in deep learning correspond to the "induction" and "inference" processes of the human brain. To truly realize strong artificial intelligence, we must learn from the structure and learning thinking mode of the human brain, simulate it through methods such as deep learning, and achieve breakthroughs in artificial intelligence through bionic ideas. Although deep learning has demonstrated extremely strong machine learning capabilities, it has excellent performance in many difficult problems such as speech recognition and visual object recognition.

[0128] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0129] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.

[0130] (4) General ability

[0131] After the data is processed as mentioned above, some general capabilities can be formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc. In this solution, the general capabilities can be computer vision processing, image recognition, etc.

[0132] (5) Smart products and industry applications

[0133] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart manufacturing, smart transportation, smart home, smart medical care, smart security, autonomous driving, safe cities, smart terminals, etc.

[0134] Under the above artificial intelligence framework, Figure 1 The data may be voice data, and the data processing may be keyword recognition. Keyword recognition is mainly used to process and recognize keywords in a voice stream.

[0135] For example, the keyword may be a wake-up word. In practical applications, wake-up word recognition may be applied to electronic devices with voice wake-up functions, such as smart speakers and robots. Users may wake up electronic devices through voice. Specifically, users wake up electronic devices by saying a "wake-up word".

[0136] Exemplarily, the keyword may be a voice command.

[0137] There are currently three main technologies used for keyword spotting: detection methods based on large vocabulary continuous speech recognition, methods based on hidden Markov models, and methods based on deep neural networks.

[0138] The detection method based on large vocabulary continuous speech recognition has the basic idea of ​​extracting representations for different speech phoneme units. When there is a test speech signal, template matching is performed in the generated speech representation to find the most similar speech phoneme sequence to complete the recognition process. The advantage of this method is that it can handle non-predefined and changing keywords more flexibly, but the computational complexity of the system is very high, which will also lead to higher latency and low accuracy.

[0139] The method based on hidden Markov model is a method for continuous speech recognition of non-specific speakers based on statistical models. The classic method is Gaussian mixture model-hidden Markov model, which first uses the hidden Markov model to model the transition probability of the speech state, and then uses the Gaussian mixture model to model the observation value probability of the speech state. Although compared with the previous method, the method based on hidden Markov model can achieve a better recognition rate, the modeling ability is still limited. At the same time, the Gaussian mixture model is a generative model, and it is still insufficient for keyword differentiation.

[0140] Deep neural networks can be used to model speech signals end-to-end. Deep networks have large learning capacity and can be supervised on large amounts of data. Common models include deep convolutional neural networks, recurrent neural networks such as LSTM (long short-term memory), GRU (Gated Recurrent), etc., neural networks based on attention mechanisms, etc. Deep neural networks for keyword speech recognition can be roughly divided into two parts, one for feature extraction and the other for spatiotemporal feature integration recognition. When deep convolutional neural networks are used for speech recognition, speech is usually converted into MFCC features, and then the MFCC features are regarded as images for recognition. This method ignores the temporal relationship of temporal information, which is very important for achieving robust speech recognition. Recurrent neural networks can model the temporal relationship of temporal information. The training adopts the time-delayed back propagation algorithm for training. When the input speech sequence is long, it is difficult to optimize the recurrent network, and gradient explosion or disappearance will occur. Networks such as LSTM can improve related problems to a certain extent, but they are still difficult to solve. The encoder-decoder network based on the attention mechanism has achieved good results in speech tasks, but this architecture requires a lot of data training and is relatively cumbersome and difficult to deploy on mobile smart devices. In summary, deep learning technology can achieve the best results in keyword recognition problems based on big data training, but its network architecture has large parameters and is not friendly to hardware deployment. It needs to be trained offline on big data and is difficult to adapt to flexible and changeable application scenarios, which usually require online learning based on small samples.

[0141] In order to solve the above problems, the embodiments of the present application take into account the brain's processing of time series samples and the fruit fly olfactory system's processing mechanism of time series samples, and propose a model of information representation (for the sake of ease of description and distinction, referred to as the first model), which stores N first objects in heteroclinic tracks to form M chain attractor structures.

[0142] It is worth noting that in some possible situations, the model can process inputs one by one separately, and the previous input and the next input are completely unrelated. However, in the embodiment of the present application, the first model needs to process time series samples, that is, the previous input and the next input are related. For example, when we understand the meaning of a sentence, it is not enough to understand each word of the sentence in isolation, we need to process the entire sequence of these words connected; when we process videos, we cannot just analyze each frame separately, but analyze the entire sequence of these frames connected.

[0143] In order to facilitate understanding of the first model provided in the embodiment of the present application, the brain's processing of time series samples is first described.

[0144] A large number of studies have shown that the brain processes time series samples in a hierarchical manner. Specifically, for keyword scenarios, each keyword can be composed of different syllables, and different syllables can be represented based on basic phoneme combinations. Among them, time series samples can help us understand the speed and direction of moving objects, the temporal causal relationship between events, and the prediction of future events. Extracting and representing time series samples may be the key to the brain's ability to achieve robust and generalizable understanding of time series samples.

[0145] In summary, the brain's processing mechanism for time series samples (taking speech data as an example) has the following characteristics:

[0146] (1) Regarding the representation of the temporal and spatial characteristics of a single morpheme, the brain will represent basic morphemes. Morphemes are the smallest combination of sound and meaning, and are the basic units that constitute keywords. They can be phonemes or syllables.

[0147] (2) The brain extracts and represents the temporal structural features behind multiple morphemes.

[0148] (3) Integration of different morphemes in the keyword pronunciation. The brain will integrate the temporal and spatial characteristics of different morphemes of the keyword.

[0149] Based on the brain's processing mechanism for time series samples, the first model proposed in the embodiment of the present application is used to realize the extraction, characterization and integration of different morphemes in the time series samples. Specifically, the first model can quickly and accurately extract the spatiotemporal features of different morphemes, and effectively integrate them according to the time series structure of the occurrence of different morphemes, so as to complete the keyword recognition task.

[0150] Next, the processing mechanism of time series samples by the Drosophila olfactory system is described.

[0151] In the fruit fly olfactory system, when an odor stimulus is presented, the firing activity of the excitatory neurons in the antennal lobe of the locust. A total of 110 neurons were recorded. After dimensionality reduction, the activity of the excitatory neuron group forms a spatiotemporal trajectory in the state space, reflecting the change of the activity state of the biological neural network under an odor stimulus over time.

[0152] Inspired by the processing mechanism of time series samples by the fruit fly olfactory system, some people have proposed to encode dynamic time series inputs through a series of saddle points (Rabinovich et al, Science, 2008). A series of saddle points form a dynamic attractor structure in the state space, which can effectively resist noise and track continuous time series inputs. In other words, the dynamic attractor structure (i.e., the above-mentioned chain attractor structure) can be used to model and represent the processing of time series samples. Among them, the dynamic attractor structure (i.e., the above-mentioned chain attractor structure) can be understood as a series of saddle points in the state space of the network. The saddle points are mediated by the direction of the unstable manifold, and the adjacent saddle points are connected in sequence to form a heteroclinic orbit to track and process time series information in real time. For example, when processing keyword tasks, different saddle points can encode different syllables.

[0153] It should be noted that the saddle point can be understood as an attractor in the dynamics theory. Therefore, the structure formed by connecting a series of saddle points in the state space can be called a dynamic attractor structure (i.e., the chain attractor structure mentioned above). The chaos theory in the dynamics theory believes that seemingly irregular motion may have overall stability and conform to certain laws of motion if it is transformed into a high-dimensional phase space. The chaotic time series theory believes that: as time goes by, the motion state in the phase space has a tendency to move closer to the attractor and has strong stability. Therefore, any state point inside or outside the attractor has a common motion trend with its adjacent state point; therefore, the functional relationship between the adjacent state point and the subsequent state point can be predicted, and it can be used to replace the functional relationship between the predicted point and its subsequent state point, that is, the prediction of the time series can be realized.

[0154] At present, there is increasing evidence that there are complex chaotic dynamics in the brain. For example, in 2000, Seung et al. published an article in Science, proposing the view that perception exists in the form of manifolds; they pointed out that in the memory process, high-dimensional information generally exists on a low-dimensional manifold called a continuous attractor, and the human brain remembers various things to a large extent through this low-dimensional manifold. If a person's perception of the outside world is represented as a set of points in a high-dimensional space, then the statistical correlation between these perceptual inputs is geometrically manifested as data points scattered on or near a low-dimensional smooth manifold. Studying and simulating the ability of people to convert external information into continuous attractors and learning the potential low-dimensional continuous attractor manifold structure from limited high-dimensional sample data has become a hot topic in current machine learning research. Continuous attractors can process not only discrete memory information, but also continuous memory information; continuous attractors are connected point sets of stable equilibrium points. At present, there are networks with continuous attractors, which have aroused widespread interest. It is a neural network computing method based on a strong biological background. Continuous attractors have been successfully used to describe the storage and expression of continuous variables (such as object orientation, movement direction, spatial position information, etc.) in the brain.

[0155] In addition, in the phase space of the dynamical system, different attractors are connected to each other to form heteroclinic orbits. For a neural dynamical system, if there are many attractors in its state space, the so-called attractors are stable manifolds in some directions and unstable manifolds in some directions near them. The unstable manifolds mediate the switching between saddle points.

[0156] In the field of artificial intelligence, a neural network is a complex system composed of a large number of simple neurons connected together. It can simulate the work of human neural networks. By adjusting the connection weights between artificial neural network layers, nonlinear evolution problems can be well solved. For example, the Hopfield neural network model is a feedback neural network. Its most important feature is that it has associative memory function and can replicate the function of the human brain. This neural network model reflects the coupling connection weights of synapses between neurons, which can better simulate chaotic behavior in the brain and is an important model for artificial neural computing.

[0157] Therefore, the neural network has an attractor. Here, the attractor can be understood as the output of the neural network when it reaches a stable state. In other words, the attractor is a stable and unchanging output; the state can be understood as a collection of the outputs of several neurons. Generally, a neural network has multiple stable states, and different stable states are different attractors; the neural network is essentially a function with a minimum value, and the attractor can also be understood as the solution of the function, so the attractor can be understood as the minimum value of the neural network. In addition, the final behavior of the neural network is determined by its attractor. The existence of the attractor provides a basis for the distributed storage memory of information and neural optimization calculation. If the attractor is regarded as the solution to the problem, then the process of evolving from the initial state to the attractor is the process of solving the calculation. If the sample information to be remembered is stored in different attractors of the network, when a sample containing partial memory information is input, the evolution process of the network is to find all the information from partial information, that is, the process of associative recall.

[0158] In summary, the first model provided in the embodiment of the present application can form a series of attractors, and the attractors are connected to form a chain attractor structure. Based on this, the embodiment of the present application proposes the following first model.

[0159] like Figure 2a As shown, the first model includes N attractor networks representing attractors, the output result of each attractor network in the N attractor networks represents an attractor, the attractor represents any object in N first objects (for the convenience of description and distinction, referred to as first objects), at least some of the attractor networks in the N attractor networks are connected to form Q chain attractor structures, and the output of the attractor network on each chain attractor structure according to the connection order in the chain attractor structure represents any category in M ​​categories (for the convenience of description and distinction, referred to as first categories). Among them, the N first objects can form M first categories. The results of the output of the N attractor networks in the order in the chain attractor structure form a first sequence.

[0160] It should be noted that the first model is a model based on a neural network. Specifically, the first model is a model constructed based on neural dynamics, and can realize data processing based on the principle of neural dynamics, for example, forming a chain attractor structure.

[0161] In a possible scenario, in the first model, N attractor networks are respectively used as nodes, and the N nodes can be connected to form at least one tree, and each path in at least one tree is used as a chain attractor structure. For any path of a tree, the path starts from the root node and passes through the child nodes to the leaf node in sequence. If the child nodes on the path are connected to other nodes in the chain attractor structure.

[0162] For example, Figure 2aAs shown, assume that N attractor networks are connected as nodes respectively to form a tree. A tree includes 4 paths, denoted as p1, p2, p3, and p4. p1 is formed by connecting the root node a1, child nodes b1, c1, d1, and leaf node e1. p2 is formed by connecting the root node a1, child nodes b1, c2, and leaf node d2. p3 is formed by connecting the root node a1, child node b2, and leaf node c3. p3 is formed by connecting the root node a1, child nodes b2, c4, d3, e2, and leaf node f1. Among them, for p1, the results output by the root node a1, child nodes b1, c1, d1, and leaf node e1 are denoted as a11, b11, c11, d11, e11 respectively. Arranged in the order of a1, b1, c1, d1, e1, the first sequence [a11, b11, c11, d11, e11] can be obtained. p2, p3, and p4 are similar and will not be elaborated.

[0163] In a possible scenario, the first object represented by the result output by the attractor network can be a phoneme phone. Then, the first category M is the category represented by the combination of phonemes, such as the keyword category. In this way, subsequently, by analyzing the combination of phonemes, the words or sentences composed of phonemes can be obtained. A phoneme (phone) is the smallest speech unit divided according to the natural attributes of speech. Analyzing according to the pronunciation actions in a syllable, one action constitutes one phoneme. Phonemes are divided into two major categories: vowels and consonants. For example, the Chinese syllable a (for example, the first tone: ā) has only one phoneme, ai (for example, the fourth tone: ài) has two phonemes, dai (for example, the first tone: dāi) has three phonemes, etc. Exemplarily, for wash, it can be composed of 5 phonemes, and the 3 syllables are "w", "a", "o", "s", "h".

[0164] In a possible scenario, the first object represented by the result output by the attractor network can be several syllables. In this way, subsequently, by analyzing the combination of syllables, the words or sentences composed of syllables can be obtained. A syllable is a speech unit formed by the combination of phonemes (including consonants and vowels). In some possible cases, a single phoneme can also form a syllable by itself. Exemplarily, such as Figure 2bAs shown, for wash, it can be composed of 3 syllables, which are formed by the phonemes "w", "a", "o", "s" and "h", respectively "w", "ao" and "sh"; for water, it can be composed of 4 syllables, which are formed by the phonemes "w", "a", "o", "d", "x" and "r", respectively "w", "ao", "dx" and "axr"; exemplarily, for your, it can be composed of 2 syllables, which are formed by the phonemes "y", "a", "x" and "r", respectively "y" and "axr"; for year, it can be composed of 3 syllables, which are formed by the phonemes "y", "i", "h", "a", "x" and "r", respectively "y", "ih" and "axr". For example, for wash, water, your, and year, there are six syllables that make up these words: "w", "ao", "sh", "hi", "axr", and "y". These six syllables can form six first objects: [w, ao], [sh], [dx, axr], [y], [hi, axr], and [axr]. The first object can be composed of one syllable, such as [sh], [y], [axr], or it can be composed of multiple syllables, such as [w, ao], [dx, axr], and [hi, axr].

[0165] In a possible scenario, the first object represented by the result output by the attractor network can be an action unit, and the first category is the category after the action unit is combined. In this way, by analyzing the combination of action units, the action formed by the combination of action units can be obtained. Among them, the action unit can be understood as the smallest naturally divided unit. For example, assuming that it is necessary to predict human actions, the action unit can be divided into: grasping, jumping, raising one hand, raising both hands, walking, running, etc., and the actions that can be formed may include object carrying, playing badminton, etc.

[0166] The result output by the attractor network is a stable value, which is used to represent the first object; optionally, the result output by the attractor network may be a multidimensional vector or a fixed value.

[0167] It should be noted that for the first object represented by the result output of the attractor network, the data representing the first object is different, for example, the number of frames of the data is different, and for another example, the number of frames in the data is the same, but the data of the frames is different; illustratively, the first object represented by the attractor network is the syllable "w". Since different people have different pitches, loudness and timbre, and for the same person, different environments will also affect the pronunciation, therefore, different people or the same person in different environments emit different "w" sound waves, and the corresponding data is also different. Exemplarily, the first object represented by the result output of the attractor network is an action unit. Since different people have different postures, heights, body shapes, etc., the same action performed by different people will also be different, and the corresponding data will also be different.

[0168] In the embodiment of the present application, the attractor network can store multiple states of the first object represented by itself, and the multiple states of the first object eventually change in the same direction, all changing towards a stable state, so that the output results of the attractor network in different states are stable. Here, the multiple states of the first object can be understood as the information contained in the different data representing the first object, and different states can store different information. Therefore, the attractor network has a stable output for different data of the first object represented by itself. For example, Figure 2c As shown, assuming that for a first object, there are 3 data representing the object, which are recorded as Will The three processed data are input into the attractor network respectively, and the output of the attractor network is stabilized at s′. t .

[0169] It should be understood that multiple attractor networks are located in heteroclinic orbits, thereby realizing the characterization of the first category based on the heteroclinic orbits. The M first categories are stored in a chain attractor structure composed of multiple attractor networks in chronological order. In specific applications, the first model activates multiple attractor networks on the chain attractor structure in the order of the chain attractor structure.

[0170] It should be understood that the first model provided in the embodiment of the present application needs to process time series data and needs to calculate data at different times in chronological order; subsequently, the first model will activate multiple attractor networks on the chain attractor structure in the order of the chain attractor structure, obtain the results of the characterization of the first object at different and continuous times, and splice them in the output order to obtain the first sequence. In the embodiment of the present application, the result output by the attractor network is used to characterize the first object. For the convenience of description and distinction, the result output by the attractor network is called the object characterization value.

[0171] It should be noted that the attractor network corresponds to a first object, and lateral inhibition connections are maintained between the N attractor networks. If the attractor network is in an excited state, it means that the attractor network can be activated and the object representation value of the output object can be output. Correspondingly, the attractor network can inhibit the activation of other attractor networks through lateral inhibition connections (giving other attractor networks an inhibitory current), that is, lateral inhibition of other attractor networks.

[0172] like Figure 2d As shown, assuming that the input data is recorded as x1, x2, ..., x t-1 、x t , …, x n , where the subscript of x represents the time; assuming that x1 to x t-1are input into the first model respectively, and the first model determines the attractor network that does not need to be activated; x t Input into the first model, the first model can activate attractor network 1 from N attractor networks, so that attractor network 1 is excited and the activation of other attractor networks is inhibited. Attractor network 1 outputs the object representation value, which is recorded as Then x t+1 to x n-2 are input into the neural network respectively. The first model determines the attractor network that does not need to be activated; x n-1 Input into the first model, the first model can activate attractor network 2 from N attractor networks, so that attractor network 1 is excited and the activation of other attractor networks is inhibited. Attractor network 2 outputs the object representation value, which is recorded as x n Input into the first model, the first model determines the attractor network that does not need to be activated. As a result, attractor network 1 and attractor network 2 are activated in sequence and the object representation value is output in sequence Get the first sequence

[0173] In addition, in the embodiment of the present application, the attractor network can continue to be excited after being excited, so that the attractor network can have a stable output for a period of time; in other words, the attractor network will continue to be excited when no other attractor network needs to be activated.

[0174] like Figure 2e As shown, assuming that the input data is recorded as x1, x2, ..., x t-1 、x t , …, x n , where the subscript of x represents the time; assuming that x1 to x t-1 are input into the first model respectively, and the first model determines the attractor network that does not need to be activated; x t Input into the first model, the first model can activate attractor network 1 from N attractor networks, so that attractor network 1 is excited and the activation of other attractor networks is inhibited, and attractor network 1 outputs the object representation value Then x t+1 to x n-2 The first model determines that there is no need to activate other attractor networks except attractor network 1. At this time, attractor network 1 is continuously activated, and each input will have an output, and the output object representation value of attractor network 1 is obtained. x n-1Input into the first model, the first model can activate attractor network 2 from N attractor networks, so that attractor network 1 is excited and the activation of other attractor networks is inhibited, and attractor network 2 outputs the object representation value x n Input into the first model, the first model determines the other attractor networks other than the attractor network 2 that do not need to be activated, each input will have an output, and the output object representation value of the attractor network 1 is obtained As a result, attractor network 1 and attractor network 2 are activated sequentially and output object representation values ​​sequentially. Get the first sequence It should be understood that are approximately equal, are also approximately equal.

[0175] In practical applications, the inhibited attractor network can output an inhibited signal.

[0176] Next, the network structure of the first model is described.

[0177] In one possible implementation, Figure 3a As shown, the first model includes an input layer and a mutual feeding layer. The mutual feeding layer can form N attractor networks, and the N attractor networks are connected to form M chain attractor structures.

[0178] In adopting Figure 2d In the manner shown, the calculation process is as follows Figure 3a As shown, x1, x2, x3, ..., x in the time series samples t , …, x n The output of the input layer is input to the mutual feedback layer, and the attractor network of the mutual feedback layer is activated sequentially. For details, see the above Figure 2d The description is not repeated here.

[0179] In adopting Figure 2e In the manner shown, the calculation process is as follows Figure 3b As shown, x1, x2, x3, ..., x in the time series samples t , …, x n The input is sequentially input to the input layer, the output of the input layer is input to the mutual feedback layer, and the attractor network of the mutual feedback layer is continuously activated and sequentially activated. For details, see the above Figure 2e The description is not repeated here.

[0180] Specifically, Figure 3c As shown, in the use of Figure 2e In the manner shown, the calculation process is as follows:

[0181] x1, x2, x3, …, x in the time series samples t , …, x n The input layers are sequentially input, and the input layers sequentially output f1, f2, f3, ..., f t ,…,f n ; Set f1, f2, f3, ..., f t ,…,f n The input is sequentially sent to the mutual feedback layer, the attractor network of the mutual feedback layer is activated sequentially, and the output is s1, s2, s3, ..., s t ,…,s n Specifically, x1 is input to the input layer, the input layer outputs f1, f1 is output to the mutual feedback layer, and the mutual feedback layer outputs s1; x2, x3, ..., x t , …, x n Similar, no further elaboration.

[0182] For different data of any object among the N first objects, the input layer can output the extracted features of different objects (referred to as object features for ease of description and distinction), and the extracted different object features are input into the attractor network, which maps the extracted different object features to the results of its own output, so that these object features are stored in the attractor network in different states. Here, the object features are used to characterize the spatiotemporal features of the object, so that the attractor network can understand the order of appearance between different objects, and then the attractor network can be activated in accordance with the chain attractor structure sequence to achieve integration in the temporal direction.

[0183] It should be understood that when the first model is actually applied, the object features processed by the input layer are input into the attractor network, and the attractor network can find the state corresponding to the object features, realize associative recall, and move to a stable state, ensuring that the output of the attractor network is stable, that is, fluctuates within a reasonable range. For ease of understanding, it can be considered that the input layer is used to extract object features, thereby distinguishing different first objects from N first objects; the attractor network is used to extract the commonality of different object features of the first objects represented by itself, thereby achieving a stable state.

[0184] For example, if Figure 3d As shown, suppose that for an object, there are 3 data representing the object, which are recorded as Will are input to the input layer respectively, and the input layer outputs f t 1 , f t 2 , f t 3 , f t1 , f t 2 , f t 3 are input into the attractor network respectively, and the attractor network outputs a stable result s′ t .

[0185] In some optional implementations, such as Figure 3e As shown, the input layer includes a hidden layer, and the hidden layer includes hidden nodes corresponding to n moments starting from 1 and increasing to n, and the n hidden nodes are connected in sequence. Each hidden node is connected to N attractor networks. Here, the output of the hidden node at the first moment is recorded as h1, and the output of the hidden node at the tth moment is recorded as h t .

[0186] Exemplarily, the calculation process is as follows: x1 is taken as the input at the first moment, and input into the corresponding hidden node 1, and the hidden node 1 outputs an internal vector h1; the output h1 of the hidden node is input into N attractor networks, and the N attractor networks compete and inhibit each other. If there is an excited attractor network, the attractor network calculates based on h1 and outputs the object representation value; x2 is taken as the input at the second moment, and input into the corresponding hidden node, and the hidden node outputs an internal vector h2; the output h2 of the hidden node is input into N attractor networks, and the N attractor networks compete and inhibit each other. If there is an excited attractor network, the attractor network calculates based on h2 and outputs the object representation value s1; if there is no excited attractor network among the N attractor networks, the mutual feedback layer outputs the inhibition signal of the N attractor networks as the object representation value s1, and obtains; x3, ..., x t , …, x n Similar, no further elaboration.

[0187] Furthermore, in a possible case, the input layer may also include a selection node, and n hidden nodes are connected to the selection node. The selection node is connected to N attractor networks. In this case, the difference from the aforementioned calculation process is that the N attractor networks are mutually competitively inhibited based on the output of the hidden node and the output of the selection node.

[0188] In some optional implementations, the input layer includes a hidden layer and a selection node, the hidden layer is described above, n hidden nodes are connected to the selection node, and the selection node is connected to N attractor networks. Exemplarily, the difference from the aforementioned calculation process is that the selection node needs to determine the object features and select the activated attractor network based on the output of the hidden node; the N attractor networks compete and inhibit each other based on the output of the selection node.

[0189] The hidden nodes are described in detail below.

[0190] In a possible implementation, the hidden node may be a node in a recurrent neural network (RNN).

[0191] In a possible implementation, the hidden node may be a node in a long short-term memory (LSTM) network.

[0192] In this implementation, the hidden node has a node state at each time, for example, the state vector c at time t t , which is used to indicate the state of the hidden node at time t, can also be regarded as the information of the hidden node at time t, so that the hidden node can maintain memory from time 1 to time t to achieve long-term and short-term memory.

[0193] Exemplarily, the hidden node includes four gates, namely, an input gate, an update gate, a forget gate, and an output gate. The input of the hidden node may include the input data x at time t. t , the output data h at time t-1 t-1 And the node state c at time t-1 t-1 .

[0194] In the calculation process, the input gate is used to control the storage of new information into the node state; the forget gate is used to control how much of the node state at the previous moment can be retained in the node state at the current moment; the update gate is used to convert the new information into a form that can be added to the node state, and the new information can be obtained from the input data of the LSTM network at the current moment; the input gate, update gate and forget gate can realize the control of the node state of the hidden node; the output gate is used to control how much of the node state at the current moment can be used as the output of the hidden node at the current moment.

[0195] In a possible implementation, the hidden node may be a node in a gated recurrent unit (Gated Recurrent Unit, GRU).

[0196] GRU is a type of recurrent neural network (RNN). Compared with traditional neural networks, RNN can better handle tasks with time series input. This is because RNN neural networks can retain the impact of previous inputs to the model and participate in the calculation of the next step. In theory, RNN neural networks can use time series information of any length, but in practice, when the step size between two inputs is too large, the gradient will quickly disappear, making it difficult to implement. As a variant of RNN, the GRU neural network has a special gate structure that can effectively solve the problem of changes in long and short time series.

[0197] Exemplarily, the hidden node includes an update gate, a reset gate, and a candidate memory unit. The input of the hidden node may include the input data x at time t t , the output data h at time t-1 t-1 .

[0198] During the calculation process, the update gate is used to determine how much useful information needs to be passed down in the previous moment and the current moment; the reset gate is used to control how much past information needs to be forgotten; the candidate memory unit is used to determine which previous value the output is related to, while excluding some irrelevant and unnecessary information.

[0199] The embodiment of the present invention does not intend to impose any limitation on the structure of the input layer. For example, it may be a recurrent neural network (RNN), a long short-term memory network (LSTM), and a gated recurrent unit (GRU). For another example, the input layer may include a multi-layer neural network formed by stacking hidden layers.

[0200] For example, in this embodiment, the input layer can be formed by stacking three hidden layers, and n hidden nodes in the top hidden layer are connected to N attractor networks. The calculation process is: the hidden nodes of each hidden layer are forward calculated from time 1 to time N, and the output of each time is obtained and saved;.

[0201] For example, the calculation process is as follows: x1 is used as the input at the first moment, and is input to the hidden node connected to the first hidden layer. The hidden node outputs an internal vector, which is recorded as Input to the hidden node connected to the second hidden layer, the hidden node outputs an internal vector, recorded as Input to the hidden node connected to the third hidden layer, the hidden node outputs an internal vector, recorded as The selection node can be based on the output of the hidden node at the first moment Determine whether the attractor network needs to be activated. If so, further determine the attractor network and object features that need to be activated, send the object features to the attractor network that needs to be activated, and the attractor network is calculated based on the object features sent by the received selection node, and outputs the object representation value s1; if there is no excited attractor network among the N attractor networks, the mutual feedback layer outputs the inhibition signal of the N attractor networks as the object representation value s1; x2 is used as the input at the second moment, and is input to the hidden node connected to the first hidden layer. The hidden node outputs an internal vector, which is recorded as Input to the hidden node connected to the second hidden layer, the hidden node outputs an internal vector, recorded as Input to the hidden node connected to the third hidden layer, the hidden node outputs an internal vector, recorded as The selection node can be based on the output of the hidden node at the 1st and 2nd time and Determine whether the attractor network needs to be activated. If so, further determine the attractor network and object features that need to be activated, send the object features to the attractor network that needs to be activated, and the attractor network performs calculations based on the object features sent by the received selection node, and outputs the object representation value s2; if there is no excited attractor network among the N attractor networks, the mutual feedback layer outputs the inhibition signals of the N attractor networks as the object representation value s2; x3, ..., x t , …, x n Similar, no further elaboration.

[0202] In addition, when the object is a phoneme, a syllable or an action unit, the input layer may be a convolutional neural network (CNN). The input layer may be a combination of various model types, such as a model combining a convolutional neural network (CNN) and other network structures, or other network structures, such as a time-delay network, a gated convolutional neural network, etc. This application does not limit the model type and topology of the input layer and the attractor network.

[0203] In the embodiment of the present application, the result output by the attractor network can be sent to all the attractor networks connected to it. Exemplarily, the attractor network may include multiple neurons, and the multiple neurons are connected to each other. The connection may be a sparse connection. For example, the connection probability between neurons in the attractor network may be set to 10%, and the connection may also be a full connection.

[0204] In some optional implementations, the multiple attractor networks have a priori connection modes, that is, the connection mode of each attractor network is artificially preset. In other words, M chain attractor structures can be preset in advance.

[0205] For example, as shown in 3f, the attractor network forms a tree-like connection form, forming multiple chain attractor structures.

[0206] In some optional implementations, a plurality of attractor networks are partially interconnected; optionally, the connections between neurons in different attractor networks are reciprocal feed connections and are sparsely connected, and the connection probability can also be set to 10%.

[0207] In some optional implementations, such as Figure 3g As shown, the multiple attractor networks are fully interconnected, that is, for each attractor network, the attractor network is interconnected with the other N-1 attractor networks among the N attractor networks.

[0208] Exemplarily, the result output by the attractor network can be sent to all the attractor networks connected to it; correspondingly, the attractor network is activated based on the result vector output by the attractor network at the previous moment and the object features sent by the input layer, and outputs the object feature vector.

[0209] Exemplarily, the input layer can determine the attractor network and object features that need to be activated at the current moment based on the output result of the attractor network at the previous moment and the current input data.

[0210] Exemplarily, the input layer can determine the attractor network and object features that need to be activated at the current moment based on the currently input data.

[0211] It should be noted that only after the first model is trained, can N attractor networks be obtained. Next, the training process of the first model is described.

[0212] Figure 4 Schematic diagram of the flow of the model training method provided in the embodiment of the present application. This embodiment can be applied to electronic devices, and can be applied to servers or general computers. Figure 4 As shown, the model training method provided in the embodiment of the present application includes at least the following steps:

[0213] Step 401, obtain multiple first time series samples; each first time series sample carries a first label, the first label indicates the first object among N first objects arranged in time series in the first time series sample, the N first objects form M first categories, and the first object among the N first objects arranged in time series in the first time series sample forms any category among the M first categories; the N first objects are phonemes, syllables or action units.

[0214] In the specific implementation, it is necessary to first obtain a training set. In the embodiment of the present application, the training set includes a plurality of first time series samples, and each first time series sample has a first label.

[0215] For each first time series sample in the plurality of first time series samples, the first label is used to indicate the first object in the N first objects arranged in time sequence in the first time series sample. Optionally, the first label may be manually labeled. Specifically, the first label of the first time series sample may be constructed by professionals.

[0216] In one possible scenario, Figure 5As shown, the first time series sample can be a multi-frame acoustic feature of speech data collected by a sound collection device such as a microphone. The acoustic feature is generally a spectral feature of the speech data, for example, a Mel Frequency Cepstrum Coefficient (MFCC) feature, a FBank (FilterBank) feature, etc. Each frame of acoustic features can be understood as a vector formed by one column and multiple rows.

[0217] In a possible case of this scenario, the first object may be a syllable. Alternatively, the first category may be a keyword category.

[0218] In this case, if Figure 5 As shown, in a feasible implementation, background noise may be added to help the first model recognize different syllables. Specifically, for each speech data, the multi-frame acoustic features of the speech data are segmented into syllables, and the acoustic features of the background noise are inserted between the acoustic features of adjacent syllables to obtain a first time series sample.

[0219] Optionally, the segmentation of syllables may be realized manually, specifically, professionals may divide some acoustic features in the first time series sample and then mark them.

[0220] Optionally, the syllable segmentation can be implemented based on an unsupervised method. It should be noted that the acoustic features are vectors, and the closer the distance between the vectors, the higher the possibility that they belong to the same category. Therefore, acoustic features with closer distances are regarded as one category, thereby implementing syllable segmentation in an unsupervised manner.

[0221] Optionally, the training set can be the TIMIT corpus. For each corpus in the TIMIT corpus, the multi-frame acoustic features of the speech data can be segmented again into syllables based on the syllables that have been divided into the corpus to obtain the first time series sample. The TIMIT corpus is constructed for the acquisition of acoustic speech knowledge (model training) and the evaluation of the automatic speech recognition system (ASR) (model testing). It is sponsored by the Department of Defense and completed with the joint efforts of the Research Projects Agency (DARPA-ISTO), the Massachusetts Institute of Technology (MIT), the Stanford Research Institute (SRI), and Texas Instruments (TI).

[0222] In this case, in another feasible implementation, in order to help the first model recognize different syllables, distinguishing information can be added. Specifically, for each speech data, the multi-frame acoustic features of the speech data are segmented into syllables, and the distinguishing information is inserted between the acoustic features of adjacent syllables to obtain a first time series sample.

[0223] Exemplarily, the distinguishing information may be a vector having a non-zero value and the same number of rows as the acoustic feature. Here, each element value in the vector is the same, for example, all are 0.5. In addition, the inventors have verified through experiments that the non-zero distinguishing information helps the second model converge faster and can speed up the training of the second model.

[0224] Exemplarily, the distinguishing information may be a vector of 0 and the same number of rows as the acoustic feature. Here, the value of each element in the vector is the same, for example, all are 0.

[0225] In this case, in another feasible implementation, noise and distinguishing information can be added. The detailed process of how to add is as mentioned above and will not be repeated here. Specifically, for each speech data, the multi-frame acoustic features of the speech data are segmented into syllables, and the distinguishing information and noise are inserted between the acoustic features of adjacent syllables to obtain the first time series sample.

[0226] In a possible implementation, for speech data, the features of the speech data can be extracted based on a feature extraction network to obtain multi-frame acoustic features. The feature extraction network can specifically be a convolutional neural network (CNN) or a recurrent neural network (RNN) and other deep neural networks. The embodiment of the present application is not intended to limit the structure of the feature extraction network, and can be specifically designed in combination with actual needs.

[0227] In a possible implementation, the multi-frame acoustic features corresponding to the audio data may be determined in the following manner:

[0228] The audio data is divided into frames and windows are added to obtain multiple frames of audio data; for each frame of audio data, features are extracted from the audio data to determine a frame of acoustic features corresponding to the frame of audio data.

[0229] For example, the acoustic feature may be an MFCC feature. The feature vector corresponding to each frame of audio data may be determined by the following implementation method:

[0230] For each frame of audio data, Fourier transform is performed on the frame of audio data to obtain an energy spectrum; the energy spectrum is processed by a Mel filter to obtain a Mel filter energy spectrum, and the logarithm of the Mel filter energy spectrum is taken to obtain logarithmic energy; the logarithmic energies of multiple Mel filters are concatenated to form the acoustic features of the frame.

[0231] Here, the dimension of the multi-frame acoustic features corresponding to the audio data is T×F, where T is the number of frames, which is determined by the window length and window shift, and F is the number of frequency points, which is determined by the number of Mel filters. In other words, there are as many frequency points as there are Mel filters.

[0232] It should be noted that the purpose of windowing and framing is to reduce the number of frames of audio data. For example, if a one-second audio file is sampled at a rate of 50 frames per second, the acoustic features of 50 frames can be obtained after the audio file is converted into an array. The dimension of each frame of acoustic features can be set according to actual conditions.

[0233] For framing and windowing, considering that audio data has short-term stability, audio data can be considered stable within the range of 10 milliseconds to 30 milliseconds, and generally a frame is not less than 20 milliseconds, that is, the frame length is greater than 20 milliseconds and less than 30 milliseconds. Considering that there will be discontinuities at the beginning and end of each frame after framing, the more frames there are, the greater the error with the original signal. In order to make the signal after framing continuous, there is an overlapping area between the previous frame and the next frame, and the overlapping area is the frame shift length. The ratio of the frame shift length to the frame length is generally 1 / 2, so as to avoid excessive changes in two adjacent frames. It should be noted that this embodiment does not limit the window function in the windowing and framing process, and it can be a window function in the prior art, such as a rectangular window, a triangular window, a Hanning window, a Hamming window or a Gaussian window, which needs to be determined in combination with actual needs.

[0234] In a possible case of this scenario, the first object may be an action unit. Here, the action unit may be an action unit of various objects such as a person, an action, a vehicle, etc. Optionally, the first category may be an action category.

[0235] In this case, the first time-series sample may be an image sequence, wherein the image sequence represents a group of images arranged linearly together, including multiple frames of images arranged in sequence. The process of obtaining the first time-series sample is described below.

[0236] First, a video is captured by an image capture device such as a camera, and then the video is divided to obtain a plurality of image sequences. Optionally, the division of the video can be determined manually.

[0237] Next, based on the divided image sequence, a first time series sample is determined.

[0238] In a possible implementation manner, an image sequence is used as the first time series sample.

[0239] In a possible implementation, after obtaining the image sequence, image preprocessing is performed on each frame of the image sequence, and the image sequence after image preprocessing is used as the first time series sample. The purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information and simplify data to the maximum extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition. Exemplarily, image preprocessing may include graying and image enhancement.

[0240] It should be understood that the above-mentioned first objects and first categories are merely examples and do not constitute specific limitations. They can be specifically combined with the classification method provided in the embodiment of the present application: classification is achieved by accumulating the constituent objects of the category, and various first objects and first categories that meet the needs can be flexibly designed, which are not enumerated in the embodiment of the present application.

[0241] Step 402: for each first time series sample among the plurality of first time series samples, input the first time series sample into a first model, the first model sequentially outputs object representation values ​​to form a first sequence, and the first sequence is used to represent a first object among the N first objects arranged in sequence.

[0242] It should be noted that the output of the first model corresponds to the first label.

[0243] Step 403: train a first model based on the first sequences corresponding to each of the plurality of first time series samples and the first labels carried; wherein the object representation values ​​sequentially output by the trained first model are used to determine any one of the M first categories.

[0244] In the embodiment of the present application, the first model will sequentially output multiple object representation values, and the multiple object representation values ​​can be arranged in the output order to obtain a first sequence. Figure 2e The output method shown in the figure, the first time series sample has n moments, then see Figure 3c , the first model sequentially outputs n object representation values: s1, s2, ..., s t ,…,s n , then the first sequence is [s1, s2, …, s t ,…,s n ].

[0245] In summary, in the embodiments of the present application, through model training, the obtained model can determine the representation of different objects, and integrate them according to the time sequence of the objects through the chain attractor structure, simulating the brain's processing of time sequence information to ensure the accuracy of recognition. In addition, since different objects are output sequentially, event-driven real-time recognition can be realized later.

[0246] Specifically, the first label includes the category composition value of the first object contained in the first time series sample, the appearance time and the end time of each first object. In the embodiment of the present application, it is necessary to construct a hierarchical first label. In other words, the category composition values ​​corresponding to the N first objects are different, so that the trained first model has N attractor networks and M chain attractor structures. In addition, the inventor has verified through experiments that the use of a hierarchical first label helps the second model converge faster and can speed up the training of the first model.

[0247] It should be noted that the first label needs to reflect the time period during which the first object continues to appear.

[0248] In one example, the period of continuous appearance conforms to the actual situation. Specifically, for the first object represented by the first label, the start time of the first object can be the appearance time of the first object in the first time series sample, and the end time can be the time obtained by adding the appearance time to the duration of the continuous appearance of the first object in the training time sample.

[0249] In another example, the period of continuous appearance conforms to the characteristics of hierarchy. The characteristics of hierarchy can be understood as the first object will end its performance only when the next first object appears. In other words, the first object will continue to perform after it begins to appear until the next first object appears. Specifically, for the first object represented by the first label, the start time can be the appearance time of the first object in the first time series sample, and the end time can be the appearance time of the next first object after the first object in the first time series sample. If there is no next first object, the end time is the end time of the first time series sample. Correspondingly, the object representation sequence formed by the object representation values ​​sequentially output by the first model in step 402 also shows the characteristics of hierarchy. That is, the object representation value of the object representation sequence is stable over a period of time. The embodiment of the present application is described by taking the first label with hierarchical characteristics as an example. It is worth noting that the first object can appear multiple times in a first time series sample. At this time, for the first object, the first object can have multiple continuous periods, and the start time of each continuous period is different.

[0250] In addition, the first label needs to reflect the time of the first time series sample, which is assumed to be n moments. The embodiment of the present application is described by taking the example that each training sample has n moments.

[0251] In some possible cases, the output of the attractor network is a high-dimensional vector, which cannot be used for error calculation with the first label. In this case, a second model can be constructed based on the first model. The second model can obtain the recognition result adapted to the first label based on the first sequence. Subsequently, the first model and the second model can be trained based on the recognition results corresponding to each of the multiple first time series samples and the first labels carried. Here, the second model can adopt various known models, such as deep neural networks, recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and gated recurrent units (GRUs).

[0252] Next, the training process of the first model is described in detail.

[0253] In an embodiment of the present application, the first label can have two forms of expression, one form of expression is to only consider the first object corresponding to the first category to which the first time series sample belongs (for the convenience of description and distinction, the first label in this form is called a first single-category label), and the other form of expression is to consider the first objects corresponding to M first categories (for the convenience of description and distinction, the first label in this form is called a first multi-category label).

[0254] Next, the case where the first label in step 401 is a first single-category label is described.

[0255] Specifically, the first label includes the category composition value of the first object among the N first objects contained in the first time series sample (the category composition value is only a name given for the convenience of description and distinction, has no other special meaning, and can also be called a target value), the category composition value that does not belong to the N first objects, and the appearance time and end time of each first object in the first time series sample. In the embodiment of the present application, it is necessary to construct a hierarchical first label. In other words, the category composition values ​​corresponding to each of the N first objects are different, so that the trained first model has N attractor networks and M chain attractor structures. In addition, the inventor has verified through experiments that the use of a hierarchical first label can help the second model converge faster and speed up the training of the first model.

[0256] Assuming that the first time series sample has data at n moments, the representation form of the first label is described in detail below.

[0257] For example, the first label may be a vector of n columns and 1 row, denoted as [l1, l2, ..., l n ], each column represents a moment, if the category composition value corresponding to the column is used to represent that it does not belong to any object in the N first objects, or, represents any object in the output N first objects. Exemplarily, the case of not belonging to any object in the N first objects is represented by 0. For each first object represented by the first label, the appearance moment of the first object is the appearance moment of the first object in the first time series sample, and the end moment is the appearance moment of the next first object after the first object in the first time series sample. If it does not exist, the end moment is the end moment of the first time series sample.

[0258] For example, assuming M=4, N=6, Figure 6aAs shown, the six first objects are [w, ao], [sh], [y], [axr], [dx, axr], and [ih, axr], and the four first categories are [wash], [water], [your], and [year]. Assume that the first time series sample includes multi-frame acoustic features of wash, and the acoustic features between the first objects [w, ao] and [sh] are added with noise, the appearance time of [w, ao] is t1, and the end time is t2, and the appearance time of [sh] is t3, and the end time is t3; for the first label of the first time series sample, including 1 object composition sequence, it is assumed that the category composition value of [w, ao] is 0.5, and the category composition value of [sh] is 1; wherein, the category composition value of each moment before t1 is 0, the category composition value of each moment between t1 and the previous moment of t3 is 0.5, and the category composition value of each moment after t3 is 1.

[0259] Under the first single-category label, the first sequence of object representation values ​​sequentially output by the first model in step 402 shows a hierarchical characteristic.

[0260] In a possible implementation, the object representation value output by the attractor network can be directly the category composition value in the first label, and the first model can be trained directly based on the first sequences corresponding to each of the multiple first time series samples and the first single category labels carried.

[0261] In a specific training process, for each of the plurality of first time series samples, the first time series sample is input into the first model, and the first model sequentially outputs object representation values ​​at n (greater than or equal to 2) moments: s1, s2, ..., s n ; Wherein, s1 is used to represent any object in the N first objects, or does not belong to any object in the N first objects. According to the order of output, s1, s2, ..., s n The first sequence corresponding to the first time series sample is obtained by splicing.

[0262] Afterwards, based on the designed loss function, the loss value of each first time series sample is calculated in combination with the first sequence and the first label of each first time series sample in the training set; based on the loss value in each first time series sample, the model loss value is obtained, and the second model is trained based on the model loss value. Here, the model loss value can be the average, variance or standard deviation of the loss value of each first time series sample.

[0263] Here, the process of determining the loss value of the i-th first time series sample is as follows:

[0264] In one example, if N is greater than 2, the loss value L of the i-th first time series sample is calculated by the following loss function: ijThe cross entropy loss function is shown in the following formula (1).

[0265]

[0266] Among them, y ijr The value l in the rth column of the first label of the i-th first time series sample r ;s ir Represents the prediction result s output at the rth moment in the i-th first time series sample r .

[0267] In one example, if N is equal to 2, the loss value L of the i-th first time series sample is calculated by the following cross entropy loss function: ij The cross entropy loss function is shown in the following formula (2).

[0268] L ij =-[l ir ·log(s ir )+(1-l ir )·log(1-s ir )] (2)

[0269] It should be noted that the above loss function is only an example of the loss function and does not constitute a specific limitation. The loss function can be reasonably designed in combination with the specific circumstances of the model.

[0270] In a possible implementation, the output result of the attractor network is a high-dimensional vector, which cannot be used for error calculation with the first label; in this case, a second model can be constructed based on the first model.

[0271] In the case of the first single-category label, the recognition result output by the second model includes the predicted category component values ​​corresponding to each object representation value in the first sequence.

[0272] Next, the case where the first label in step 401 is the first multi-category label is described.

[0273] Exemplarily, the first label (i.e., the first object composition sequence) is composed of the object composition sequences corresponding to the M first categories, denoted as C1, C2, ..., C M ; C1 represents the first category k1 among M categories, which is composed of n columns of category composition values, each column represents a moment, and the n columns are recorded as T1, T2, ..., T n , the category composition value of the n column is recorded as [C 11 , C 12 ,…,C 1n ], C2, …, C N Similar, the difference is that C2, ..., C Mrepresents the second category k2, ..., the Mth category k among M categories m Here, for each first object represented by the first tag, the appearance time of the first object is the appearance time of the first object in the first time series sample, and the end time is the appearance time of the next first object after the first object in the first time series sample. If it does not exist, the end time is the end time of the first time series sample.

[0274] Specifically, for any first time series sample, the first label may be determined by the following implementation method.

[0275] When determining the first label of the first time series sample, the start time of each of the multiple first objects included in the first time series sample and the end time of each of the multiple first objects included in the first time series sample can be determined; wherein, the end time of the last first object among the multiple first objects is the end time of the first time series sample, and for each first object before the last one of the multiple first objects, the end time of the first object is the start time of the next first object.

[0276] For the first category k1 among the M first categories, determine the multiple objects that form k1, and determine whether the multiple objects that form k1 include the first object in the first time series sample. If not, set 0 as the category composition value C at n moments. 11 , C 12 ,…,C 1n , and obtain C1; otherwise, determine the several first objects in the first time series samples included in the multiple objects forming k1, and for each object of the several first objects in the included first time series samples, use the category composition value corresponding to the object as the category composition value of the moment from the start time to the end time of the object; use 0 as the category composition value at other moments to obtain C1.

[0277] C2, ..., l N C1, C2, ..., C M There is only one first category in which all first objects in the first time series sample are represented.

[0278] For example, assuming that M=4, N=6, Figure 6bAs shown, the six first objects are [w, ao], [sh], [y], [axr], [dx, axr], and [ih, axr], and the four first categories formed are [wash], [water], [your], and [year]. Assume that the first time series sample includes multi-frame acoustic features of wash, and noise is added to the acoustic features between the first objects [w, ao] and [sh]. The appearance time of [w, ao] is t1 and the end time is t2. The appearance time of [sh] is t3 and the end time is t3. For the first label of the first time series sample, it includes 4 object composition sequences, C1, C2, C3, and C4, which respectively represent 4 first categories [wash], [water], [your], and [year]. For the object composition sequence C1 representing [wash], there are two first objects forming the first category [wash], namely [w, ao] and [sh]. C1 has the same category composition value of 0.5 from time t1 to time t3, which is used to represent the first category [w, ao]. It has the same category composition value of 1 from time t3 to time t4, which is used to represent the first category [sh]. The value is 0 at other times, which is used to represent the lack of the first category. For the object composition sequence C2 representing [water], there are two first objects that form the first category [water], namely [w, ao] and [dx, axr]. The same category composition value of 0.5 is used to represent the first category [w, ao]. The first time series sample does not have the acoustic feature of [dx, axr]. Therefore, the category composition value at other times is 0, which is used to represent the first category. For the object composition sequence C3 representing [your], there are two first objects that form the first category [your], namely [y] and [axr]. The first time series sample does not have the acoustic feature of [your]. Therefore, the category composition value of all moments in the object composition sequence C3 is 0. For the object composition sequence C4 representing [year], there are two first objects that form the first category [year], namely [y] and [ih, axr]. The first time series sample does not have the acoustic feature of [year]. Therefore, the category composition value of all moments in the object composition sequence C4 is 0.

[0279] It should be noted that the result output by the attractor network is used to characterize the first object. In order to obtain whether the first object belongs to the constituent elements of any category of the M first categories, a second model needs to be constructed at this time; the second model attributes the object characterization value output by the attractor network to several categories of the M first categories, thereby serving as the constituent elements of the first category.

[0280] Specifically, Figure 6c , Figure 6d and Figure 6f As shown, in the scenario of the first multi-category label, the recognition result output by the second model includes the predicted component sequences corresponding to the M first categories, and the predicted component sequences indicate the first objects constituting the corresponding first categories in the first sequence. In a specific implementation, the recognition result includes the predicted results corresponding to each object representation value in the first sequence, including the predicted category component values ​​corresponding to the M first categories, and correspondingly, the predicted component sequence corresponding to the first category is a sequence of the predicted category component values ​​corresponding to the first object in the predicted results corresponding to each object representation value in the first sequence, arranged in the output order.

[0281] During the training process, Figure 6e As shown, for each first time series sample in the plurality of first time series samples, the first time series sample is input into the first model and then into the second model, and the second model sequentially outputs the prediction results of n (greater than or equal to 2) moments, which are recorded as y1, y2, ..., y n ; Wherein, y1 includes the predicted category component values ​​corresponding to the M first categories. According to the order of output, y1, y2, ..., y n The same time is spliced ​​to obtain the predicted component sequences corresponding to the M first categories corresponding to the first time series sample, which are recorded as C′1, C′2, …, C′ M It should be understood that for any of the M first categories, y1, y2, ..., y n After the predicted category component values ​​of the first category are concatenated in the output order, the predicted component sequence corresponding to the first category can be obtained. Figure 6f As shown, the first time series sample is input into the first model and then into the second model, and the second model obtains a sequence of predicted categories corresponding to each of the four categories class0, class1, class2 and class3.

[0282] Continue to refer Figure 6e , for the first label of the i-th first time series sample and the predicted component sequences corresponding to the M first categories, calculate the loss value between the same first categories, that is, calculate the C-th i and C′ i There are M first categories in total, and the M first categories are respectively denoted as L i1 , L i2 ,…,L iM ; Then, based on the loss value L i1 , L i2 ,…,L iM , determine the loss value L of the first time series sample i For example, L i1 , L i2 ,…,LiM The mean, variance, or standard deviation of the .

[0283] In one example, if N is greater than 2, the loss value L of the jth first category of the i-th first time series sample is calculated by the following loss function: ij The cross entropy loss function is shown in the following formula (3).

[0284]

[0285] Among them, l ijr The object composition sequence C corresponding to the jth first category of the i-th first time series sample j The category composition value of the rth column in y ijr Represents the predicted component sequence C′ corresponding to the jth first category in the i-th first time series sample j The predicted component value of the rth column in .

[0286] In one example, if N is equal to 2, the loss value L of the jth first category of the i-th first time series sample is calculated by the following cross entropy loss function: ij The cross entropy loss function is shown in the following formula (4).

[0287] L ij =-[l ijr ·log(l ijr )+(1-l ijr )·log(1-l ijr )] (4)

[0288] It should be noted that the above loss function is only an example of the loss function and does not constitute a specific limitation. The loss function can be reasonably designed in combination with the specific circumstances of the model.

[0289] Among them, Figure 6d As shown, the second model may include M output nodes, the M output nodes correspond to M first categories, each output node corresponds to a first category in the M first categories, and outputs a predicted category composition value. Optionally, for each output node, the output node processes the object representation value outputted by the first model at any moment to determine whether the first object corresponding to the object representation value is a component of the first category corresponding to itself, and if so, outputs the predicted category composition value, otherwise, outputs a predicted category composition value that does not belong to it (such as 0).

[0290] In the embodiment of the present application, the transfer learning method can be used to implement the training of the first model, thereby improving the efficiency of model training. In specific implementation, after learning the chain attractor structure on other tasks, the existing chain attractor structure can be reused through the data of a small sample of another task to quickly implement transfer learning, thereby flexibly adapting to different task requirements.

[0291] Among them, transfer learning is a machine learning method that uses the model developed for task A as the starting point and reuses it in the process of developing the model for task B.

[0292] In the embodiment of the present application, the first model can be trained based on the training set under task A. Then, the first model under task A is trained using the training set under task B to implement transfer learning, and finally the first model under task B is obtained.

[0293] For example, when the result output by the attractor network represents a phoneme or a syllable, task A may be a speech recognition task, and task B may be keyword recognition.

[0294] The inventors have verified that the transfer learning method can speed up the training of the second model. In addition, the inventors have further verified that in the voice scenario, when the voice data is mixed with background noise, the first model can only start to activate the attractor network when the wake-up word information is input.

[0295] The specific process of transfer learning is:

[0296] Acquire multiple second time series samples corresponding to M second categories; each of the second time series samples carries a second label, the second label indicates a second object among N second objects arranged in time sequence in the second time series sample, the N second objects form the M second categories, and the second objects among the N second objects arranged in time sequence in the second time series sample form any second category among the M second categories; for each second time series sample, input the second time series sample into a third model, and the third model sequentially outputs object representation values ​​to form a second sequence; the second sequence is used to represent the second object among the N second objects arranged in sequence; train the third model based on the second sequences corresponding to each of the multiple second time series samples and the second labels carried; and use the trained third model as the first model.

[0297] Exemplarily, several construction vectors of each of the N second objects can be constructed, and the construction vectors are used to represent the second object and the appearance time of the second object. The N second objects form M second categories. For each second category in the M second categories, multiple second objects forming the second category are determined, and the construction vectors with different appearance times of the multiple second objects are fused to obtain a second time series sample. After obtaining multiple second time series samples, the second label corresponding to the second time series sample is determined. The construction method of the first label and the second label is similar and will not be repeated.

[0298] In addition, the inventors have Figure 6c The first and second models shown were tested and obtained Figures 6g to 6i , from which the following conclusions were drawn.

[0299] Conclusion 1: See Figure 6g ,In the first model, there are attractors (which can be understood as the output of the attractor network) and chain attractor structures.

[0300] Conclusion 2: If Figure 6h As shown in the figure, the introduction of non-zero separation signal is conducive to the rapid learning of attractors and chain attractor structures, and the model converges faster.

[0301] Conclusion 3: If Figure 6i As shown in the figure, the model loss of the model w / o transfer without transfer learning is lower than that of the model transfer with transfer learning; it can be seen that when the first model learns the wake-up word with phoneme or syllable structure, the network can reuse the chain attractor structure that has been learned in other tasks to achieve fast transfer learning. The reason why transfer learning can be achieved quickly is that after the first model learns the chain attractor structure, the chain attractor structure in the first model can be fixed. Since the chain attractor structure has been extracted in the previous task, it can be shared by different tasks. It only needs to learn the mapping from the input to the chain attractor structure, and transfer learning can be achieved quickly; therefore, if there are new keywords that need to be recognized, new wake-up word recognition tasks can be quickly learned through transfer learning.

[0302] Conclusion 4: The segmentation of phonemes helps the first model to form a chain attractor structure.

[0303] Conclusion 5: The output of the first model reflects the decision trajectory, that is, based on the hierarchical output, we can know the judgment of each syllable or phoneme in the recognition process.

[0304] In summary, in the embodiments of the present application, a model including a chain attractor structure is obtained through model training, so that the model can determine the representation of different objects, and integrate them according to the timing of the objects through the chain attractor structure, simulating the brain's processing of timing information, and ensuring the accuracy of recognition. Since different objects are output sequentially, event-driven real-time recognition can be achieved later. If the chain attractor structure is learned on other tasks, the existing chain attractor structure can be reused through small sample data to quickly realize transfer learning, so as to flexibly adapt to different task requirements, and ensure the accuracy of recognition in the scenario of small sample data training.

[0305] Next, based on the above artificial intelligence main framework and the above description, the application scenarios in the embodiments of this application are summarized and introduced.

[0306] On the one hand, the solution of this application can be applied to the fields that require speech recognition in computer vision fields such as assisted driving, autonomous driving, safe cities, and smart terminals. Among them, speech recognition (Automatic Speech Recognition): the process of converting sound into text, inputting audio and outputting the content of the audio, that is, text information.

[0307] In one possible scenario, a keyword is used to control a device. The solution provided in the embodiment of the present application can identify keywords. The device can be a voice robot or a smart speaker.

[0308] For example, the keyword may be a wake-up word. For example, when a voice robot or smart speaker is playing music or telling a story, the user hopes to interrupt the playing by a wake-up word, such as "wake-up word one", to achieve wake-up interruption.

[0309] For example, the keyword may be a voice command. For example, when a voice robot or smart speaker is playing music or telling a story, the user wants the device to recognize voice commands such as "stop talking" or "next song" to control the device, thereby avoiding wake-up interruption.

[0310] In a possible scenario, only the keywords of a specific person can control the device. The solution provided by the embodiment of the present application can identify the keywords of a specific person.

[0311] For example, the keyword may be a wake-up word. For example, when a voice robot or smart speaker is playing music or telling a story, only a specific person can wake it up and interrupt it, thus achieving wake-up by a specific person.

[0312] In a possible scenario, keywords in multiple languages ​​can all control the device. The solution provided by the embodiment of the present application can identify keywords in different languages.

[0313] For example, a voice robot or smart speaker plays background music, and when a user speaks Chinese or other languages ​​(such as English), it can recognize the spoken content relatively accurately and achieve multi-language speech recognition.

[0314] In a possible scenario, a user asks a question, and the question-answering system identifies the question asked by the user and then provides an answer. The solution provided in the embodiment of the present application can identify the question asked by the user.

[0315] In one possible scenario, the user speaks and the evaluation system gives a Goodness of Pronunciation (GOP) score; wherein, the Goodness of Pronunciation (GOP) is used to determine the quality of spoken pronunciation. Specifically, when the evaluator performs spoken pronunciation, the evaluation system gives a score, and generally the higher the score, the better the pronunciation.

[0316] On the other hand, the solution of the present application can be applied to the fields of computer vision such as assisted driving, automatic driving, safe cities, smart terminals, etc., where dynamic object motion recognition is required. Here, dynamic objects can be movable objects, people, animals, etc.

[0317] In one possible scenario, while the vehicle is driving automatically, the camera on the vehicle will shoot the road ahead to obtain a video; then, based on the video, the obstacles on the road ahead and the action categories of the obstacles are identified. Subsequently, the path planning can be carried out based on the action categories of the identified obstacles, so that the vehicle can avoid obstacles and ensure driving safety.

[0318] Figure 7 is a flow chart of the identification method provided in the embodiment of the present application. This embodiment can be applied to electronic devices, and specifically can be applied to servers or general computers. Figure 7 As shown, the identification method provided in the embodiment of the present application includes at least the following steps:

[0319] Step 701: Obtain time series samples to be identified.

[0320] The time series samples to be identified are collected in actual business. For example, the time series samples to be identified can be a speech feature sequence processed from the speech data collected in real time by an intelligent robot. For another example, the time series samples to be identified can be an image sequence collected in real time by a camera on a vehicle.

[0321] Step 702: Input the time series samples to be identified into the trained first model.

[0322] Step 703: determine the target category among the M first categories to which the time series sample to be identified belongs based on the object representation values ​​sequentially output by the trained first model; wherein the M first categories are formed by N first objects, and the sequentially output object representation values ​​are used to represent the first object among the N first objects arranged in order.

[0323] Here, the trained first model is the first model trained in the above manner.

[0324] In a possible implementation, the time series sample to be recognized is a speech feature sequence, the N first objects are phonemes or syllables, and the M first categories may be keyword categories.

[0325] In a possible implementation manner, the time series samples to be identified are image sequences, the N first objects are action units, and the M first categories are action categories.

[0326] Among them, the first model is the first model trained by the above method.

[0327] In actual applications, the first model needs to be put into use in actual business, and different businesses require corresponding first models. Therefore, the first object represented by the first label is also an object that satisfies the business. For example, in the business of keyword recognition, the first category is the keyword category, and the phonemes or syllables in the first label are related to the keywords, that is, the first category is the keyword category. For example, in the business of speech recognition, there are more phonemes or syllables in the first label, and the first category is a combination of words or sentences, so that a variety of speech can be recognized. It should be understood that in order to be able to use the first model in the business, it is necessary to construct a third model corresponding to the first model for implementing the business. The third model is used to determine any category in the M first categories.

[0328] In practical applications, the trained first model needs to be used to implement services. In one example, the first label of the first time series sample also indicates the first category of the M first categories to which the first time series sample belongs (for ease of description and distinction, it can be called the target category).

[0329] It is worth noting that for each of the M first categories, the first category can be identified based on the object representation values ​​sequentially output by the first multiple attractor networks in the chain attractor structure representing the first category, without considering the object representation values ​​output by all the attractor networks in the chain attractor structure.

[0330] In a possible scenario, in the first model, N attractor networks are connected as nodes to form at least one tree, and each path in at least one tree is a chain attractor structure. For any path of a tree, the path starts from the root node and passes through the child nodes to the leaf node in sequence. If the child nodes on the path are connected to nodes in other chain attractor structures, the first category is judged according to the results output in the order of the path from the root node to the node. At this time, the judgment results of the first category are not unique and there are multiple ones; if the child nodes on the path are not connected to nodes in other chain attractor structures, the child nodes are directly connected to the leaf nodes, or the child nodes between the child nodes and the leaf nodes are not connected to nodes in other chain attractor structures, the first category is judged according to the results output in the order of the path from the root node to the node. At this time, the judgment result of the first category is unique, and the first category can be uniquely determined based on the results output by the nodes on the path from the root node to the node.

[0331] For example, Figure 2a As shown, for path p1, the outputs of nodes a1 and b1 are judged in the first category, and the two first categories represented by p1 and p2 can be judged. The outputs of nodes a1, b1, and c1, or the outputs of nodes a1, b1, c1, and d1, or the outputs of nodes a1, b1, c1, d1, and e1 are judged in the first category, and the one first category represented by p1 can be judged. Therefore, for p1, at least the first three nodes on the path need to be activated to achieve the unique judgment of the first category represented by p1. p2, p3, and p4 are similar and will not be repeated.

[0332] Furthermore, since the first model outputs multiple times in sequence, each time outputting the object representation of any one of the N first objects, the output of some attractor networks in the chain attractor structure can realize decision-making, so it is possible to accumulate time series information and then make decisions, thereby realizing recognition based on event-driven. Among them, event-driven refers to a strategy for making decisions in the process of continuous transaction management, that is, following the events that occur at the current time point, mobilizing available resources, and performing related tasks, so that problems that continue to arise can be solved and transactions can be prevented from piling up. In an embodiment of the present application, the object representation (any one of the N first objects) output by the first model multiple times can be taken as an event. In the process of continuous accumulation of events, that is, the process of continuous extension of the object representation sequence, there is no need for the first model to output multiple events, that is, there is no need to activate all the attractor networks on the chain attractor structure. Only the frontmost part of the attractor network in the chain attractor structure can be activated, and the object representation sequence formed by the object representation output by these attractor networks can be used to realize decision-making.

[0333] In the specific implementation, the classification process of the third model is as follows:

[0334] The time series samples to be identified are input into the trained first model. The object representation value outputted by the trained first model each time in the sequential output is input into the third model. The third model continuously predicts and accumulates the predicted category composition values ​​of the M first categories at different times, determines the category composition cumulative values ​​of the M first categories at different times, and then obtains the classification result of the third model (the first category whose category composition cumulative value reaches the preset threshold).

[0335] For example, Figure 8 As shown, x1, x2, x3, ..., x in the time series samples to be identified t , …, x n Input it to the trained first model. The first output result of the trained first model is s1. Input s1 to the third model. The third model determines the category of the M first categories to which s1 belongs, and obtains y1. y1 is the M first categories k1, k2, ..., k M The predicted category composition value sequence corresponding to the first moment, and based on y1, determine M first categories k1, k2, ..., k M The corresponding category composition cumulative values ​​at the first moment form the cumulative distribution P1. If the category composition cumulative values ​​in the cumulative distribution P1 are all less than the threshold, no decision is required. The second output result of the trained first model is s2. s2 is input into the first model. The first model determines the category of the M first categories to which s2 belongs, and obtains y2. y2 is the M first categories k1, k2, ..., k M The corresponding predicted category composition value sequence at the second moment, and based on the cumulative distribution P1 and y2 at the first moment, determine M first categories k1, k2, ..., k M The corresponding category composition cumulative values ​​at the second moment form the cumulative distribution P2. If the category composition cumulative values ​​in the cumulative distribution P2 are all less than the threshold, no decision is required. Repeat the cycle until s j Input into the first model to determine s j The category of the M first categories, get y j ,y j There are M first categories k1, k2, ..., k M The sequence of predicted category composition values ​​corresponding to each moment j, and based on the cumulative distribution Pj and y at moment j-1 j , determine M first categories k1, k2, ..., k MThe corresponding category composition cumulative values ​​at the j-th moment form a cumulative distribution Pj. If only one of the category composition cumulative values ​​in the cumulative distribution Pj is greater than the threshold, it means that the competition winner can make a decision. The first category corresponding to the category composition cumulative value greater than the threshold is taken as the identified category to determine the classification result.

[0336] The inventors Figure 3c The test of the first model shown and the third model above has drawn the following conclusion: under the condition that the output of the first model is hierarchical, the third model can perform keyword recognition in an event-driven manner. The performance of the third model is more robust, that is, if the input is mixed with background noise, the first model will accumulate information and make decisions only when the keyword signal is input.

[0337] In summary, in this scheme, by determining the representation of the object and integrating it according to the time sequence of the object's occurrence, the brain's processing of time series information is simulated to ensure the accuracy of recognition; in addition, there is no need to process all time series samples, and decisions are made based on only part of the data in the time series samples, thereby achieving classification through event-driven, reducing the amount of calculation, improving classification efficiency, and saving computing resources.

[0338] The model structure of the third model is described below.

[0339] The third model includes the second model and the cumulative model.

[0340] The details of the second model can be found in Figure 6c and Figure 6d , and the above Figure 6c and Figure 6d The description of the second model in will not be repeated here.

[0341] Wherein, the cumulative model may include M neurons, the M neurons correspond to M first categories, and each neuron corresponds to a first category among the M first categories. Optionally, for each neuron, the neuron performs cumulative processing on the predicted category composition value of the first category corresponding to itself to determine the category composition cumulative value. Optionally, the category composition cumulative value may be the sum, mean, etc. of the predicted category composition values ​​of the first category corresponding to itself. It should be noted that the M neurons of the cumulative model compete with each other, and only one wins the competition, and the first category corresponding to the winning neuron is used as the final first category.

[0342] It should be noted that the neurons in the accumulation model correspond to one category, and the neurons in the same layer maintain lateral inhibition connections. If the neuron is in an excited state, it means that the neuron has extracted useful information. Correspondingly, the neuron can inhibit the excitation of other neurons through lateral inhibition connections (give other neurons an inhibitory current), that is, lateral inhibition of neurons in the same layer. Since each neuron has a self-excitation connection, when a neuron is in an excited state, it will give itself a positive feedback signal, that is, the neuron will give itself a self-excitation current. Therefore, neurons in the same layer will compete based on self-excitation and lateral inhibition mechanisms, and then integrate temporal information. Furthermore, since the accumulation model competes based on the accumulation of object representation values ​​of different objects, each neuron will accept the value of the neuron output in the second model in addition to self-excitation and lateral inhibition. In general, the neurons in the accumulation model will compete based on self-excitation, lateral inhibition of other neurons, and output in the second model. When a neuron in the accumulation model wins the competition, it will make a decision, that is, output the first category corresponding to the neuron as the final category, thereby completing the recognition task.

[0343] In actual application, the third model needs to be trained before the trained third model can be used.

[0344] In a possible scenario, the first model and the second model in the third model are trained together. After the training of the first model and the second model is completed, the cumulative model is trained. During the training process, multiple first time series samples in the training set for training the first model and the second model are used. The specific training process is as follows:

[0345] For the i-th first time series sample, the first time series sample is sequentially input into the first model and the second model and then output to the accumulation model, and the accumulation model outputs the classification result; and the error between the classification result and the first category represented by the first label of the first time series sample is determined.

[0346] Next, based on the errors corresponding to the plurality of first time series samples, the accumulation model in the third model is trained to obtain a trained accumulation model.

[0347] It should be noted that, in the embodiment of the present application, the first time series sample, the second time series sample, the first label, the second label, the first sequence and the second sequence have no meaning, but are named for the convenience of description and distinction. The first to the second are only used as examples. In practical applications, other methods can also be used to distinguish. In addition, the time series samples to be identified are similar, and in some possible implementations, they can be called third time series samples.

[0348] Next, based on the above-mentioned artificial intelligence main framework, a system architecture in an embodiment of the present application is introduced.

[0349] See attached Fig. 9 , an embodiment of the present application provides a system architecture 900.

[0350] The data collection device 960 is used to collect target data and store it in the database 930 , and the training device 920 generates a target model / rule 901 based on data such as a data set (including target data) maintained in the database 930 .

[0351] The following will describe in more detail how the training device 920 obtains the target model / rule 901 based on the target data in the data set. The target model / rule 901 can process multiple frames of data in the input data and output multiple second categories in sequence.

[0352] In the embodiment of the present application, the target model / rule 901 includes a first model and a third model, wherein the target data includes a plurality of first time series samples and a first label carried by each first time series sample.

[0353] The training process of the first model and the third model is as mentioned above and will not be repeated here.

[0354] The target model / rule 901 obtained by the training device 920 can be applied to different systems or devices. Fig. 9 In the embodiment, the execution device 910 is configured with an I / O interface 912 for data interaction with external devices, and a “user” can input data into the I / O interface 912 through a client device 940 .

[0355] The execution device 910 can call data, codes, etc. in the data storage system 950 , and can also store data, instructions, etc. in the data storage system 950 .

[0356] The calculation module 911 processes the input data using the target model / rule 901. For example, the input data is a speech feature sequence or an image sequence.

[0357] The association function module 913 is used to associate the first model with the third model so that the output of the first model can be directly input into the third model.

[0358] Finally, the I / O interface 912 returns the processing result to the client device 940 and provides it to the user. For example, the target category among the M first categories output by the third model is provided to the user.

[0359] In the attached Fig. 9In the case shown in , the user can manually specify the data to be input into the execution device 910, for example, by operating in the interface provided by the I / O interface 912. In another case, the client device 940 can automatically input data into the I / O interface 912 and obtain the result. If the client device 940 needs to obtain the user's authorization to automatically input data, the user can set the corresponding authority in the client device 940. The user can view the results output by the execution device 910 on the client device 940, and the specific presentation form can be a specific method such as display, sound, action, etc. The client device 940 can also serve as a data acquisition terminal to store the collected target data (the first time series sample is used for model training) or input data (speech feature sequence or image sequence) and other data into the database 930.

[0360] It is worth noting that Fig. 9 This is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. Fig. 9 In the embodiment, the data storage system 950 is an external memory relative to the execution device 910. In other cases, the data storage system 950 can also be placed in the execution device 910.

[0361] Next, based on Figure 1 The system architecture shown introduces another system architecture provided by this solution.

[0362] See attached Fig.10 , the embodiment of the present application provides a system architecture 1000. The system architecture 1000 includes a local device 1001, a local device 1002, an execution device 910 and a data storage system 950, wherein the local device 1001 and the local device 1002 are connected to the execution device 910 via a communication network.

[0363] The execution device 910 is implemented by one or more servers, and optionally cooperates with other computing devices, such as data storage, routers, load balancers, etc. The execution device 910 can be arranged at one physical site, or distributed at multiple physical sites. The execution device 910 can use the data in the data storage system 950, or call the program code in the data storage system 950 to implement the method provided in the embodiment of the present application, for example, Figure 7 The method provided.

[0364] Users can operate their respective user devices (e.g., local device 1001 and local device 1002) to interact with execution device 910. Each local device can represent any computing device, such as a personal computer, a computer workstation, a smart phone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.

[0365] The local device of each user can interact with the execution device 910 through a communication network of any communication mechanism / communication standard. The communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.

[0366] In one implementation, one aspect or multiple aspects of the execution device 910 may be implemented by each local device. For example, the local device 1001 may provide local data or feedback calculation results to the execution device 910 .

[0367] In one implementation, the local device 1001 and the local device 1002 obtain network parameters of the first model and the second model from the execution device 910, deploy the first model and the second model on the local device 1001 and the local device 1002, and use the first model and the second model to recognize the first category to which the input data (time series samples to be identified) belongs.

[0368] In another implementation, the first model and the second model can be directly deployed on the execution device 910, and the execution device 910 obtains input data (time series samples to be identified) from the local device 1001 and the local device 1002 (the local device 1001 and the local device 1002 can upload the input data (time series samples to be identified) to the execution device 910), and processes the input data (time series samples to be identified) according to the first model and the second model to obtain the first category to which it belongs, and sends the first category to the local device 1001 and the local device 1002.

[0369] It should be noted that all functions of the execution device 910 may also be implemented by a local device. For example, the local device 1001 implements the functions of the execution device 910 and provides services to its own user, or provides services to the user of the local device 1002.

[0370] The execution device 910 may also be referred to as a cloud device. In this case, the execution device 910 is generally deployed in the cloud.

[0371] Based on the same concept as the embodiment of the method of the present invention, the embodiment of the present invention also provides an identification device. The identification device includes several modules, each of which is used to execute each step in the method provided by the embodiment of the present invention, and the division of the modules is not limited here. The technicians in the relevant field can clearly understand that in practical applications, the various steps in the method provided by the embodiment of the present invention can be assigned to different modules as needed, that is, the internal structure of the device is divided into different modules to complete all or part of the functions described above. The modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more modules can be integrated in one unit, and the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0372] For example, the recognition device is used to execute the model training method provided in the embodiment of the present invention. The recognition device provided in the embodiment of the present application includes:

[0373] a first sample acquisition module, configured to acquire a plurality of first time series samples; each of the first time series samples carries a first label, the first label indicates a first object among N first objects arranged in time sequence in the first time series sample, the N first objects form M first categories, and the first object among the N first objects arranged in time sequence in the first time series sample forms any category among the M first categories;

[0374] A first characterization module is configured to input each first time series sample of the plurality of first time series samples into a first model, wherein the first model sequentially outputs object characterization values ​​to form a first sequence, wherein the first sequence is used to characterize a first object of the N first objects arranged in sequence;

[0375] The first training module is used to train the first model based on the first sequences corresponding to each of the multiple first time series samples and the first labels carried; wherein the object representation values ​​sequentially output by the trained first model are used to determine any one of the M first categories.

[0376] In a possible implementation manner, the first time series samples are image sequences, the N first objects are action units, and the first category is an action category.

[0377] In a possible implementation, the first model is a neural network-based model.

[0378] In an optional manner of this implementation, the first model is a model constructed in accordance with neural dynamics.

[0379] In an example of an optional method, the trained first model includes N attractor networks, and the result output by each of the attractor networks represents any one of the N first objects. The N attractor networks are connected to form M chain attractor structures, and each of the chain attractor structures represents any one of the M first categories.

[0380] In an example of an optional manner, the untrained first model includes N sub-networks, and the N sub-networks are connected to form M chain structures. In the trained first model, the N sub-networks serve as an attractor network, and the M chain structures serve as a chain attractor structure.

[0381] In a possible implementation manner, the first object is the phoneme or syllable.

[0382] In an optional manner of this implementation, the first category is a keyword category.

[0383] In an optional manner of this implementation manner, noise is added between adjacent data in the first time series samples and belonging to the first object among the N first objects.

[0384] In an optional manner of this implementation manner, distinguishing information is added between adjacent data in the first time series samples and belonging to a first object among the N first objects.

[0385] In a possible implementation, the first tag indicates that the appearance time of any first object before the last first object is the appearance time of the first object in the first time series sample, and the end time is the appearance time of the next first object in the first time series sample.

[0386] In a possible implementation, the identification device further includes:

[0387] a second sample acquisition module, configured to acquire a plurality of second time series samples corresponding to the M second categories; each of the second time series samples carries a second label, the second label indicates a second object among the N second objects arranged in time sequence in the second time series sample, the N second objects forming the M second categories, and the second objects among the N second objects arranged in time sequence in the second time series sample forming any second category among the M second categories;

[0388] A second characterization module is used for inputting each second time series sample into a second model, and the second model sequentially outputs object characterization values ​​to form a second sequence; the second sequence is used to characterize a second object among the N second objects arranged in sequence;

[0389] The second training module is used to train the second model based on the second sequences corresponding to the multiple second time series samples and the second labels they carry; and use the trained second model as the first model.

[0390] In one possible implementation, the first label includes an object composition sequence corresponding to each of the M first categories, and the object composition sequence indicates the first object forming the corresponding first category in the first time series sample; the first training module is used to identify, for each first time series sample in the multiple first time series samples, a first sequence formed by the object representation values ​​sequentially output by the first model based on the second model, to obtain a recognition result, and the recognition result includes a predicted composition sequence corresponding to each of the M first categories; the predicted composition sequence indicates the first object constituting the corresponding first category; based on the recognition results corresponding to each of the multiple first time series samples and the first label, train the first model and the second model.

[0391] For example, the identification device is used to execute the identification method provided by the embodiment of the present invention. The identification device provided by the embodiment of the present application includes:

[0392] The data acquisition module is used to acquire time series samples to be identified.

[0393] The input module is used to input the time series samples to be identified into the first model.

[0394] A prediction module is used to determine the target category among the M first categories to which the time series sample belongs based on the object representation value sequentially output by the first model; wherein the M first categories are formed by N first objects, and the sequentially output object representation value is used to represent the first object among the N first objects arranged in sequence.

[0395] In a possible implementation, the time series samples to be identified are speech feature data, and the N first objects are phonemes or syllables.

[0396] In an optional manner of this implementation, the first category is a keyword category.

[0397] In a possible implementation manner, the time series samples to be identified are image sequences, the N first objects are action units, and the first category is an action category.

[0398] In a possible implementation, the trained first model includes N attractor networks, the result output by each attractor network represents any one of the N first objects, the N attractor networks are connected to form M chain attractor structures, and each chain attractor structure represents any one of the M first categories;

[0399] The trained first model is used to process the time series samples to be identified, and according to any one of the M chain attractor structures, the attractor networks in the N attractor networks are sequentially activated to sequentially output object representation values.

[0400] In a possible implementation, the object representation values ​​sequentially output by the trained first model are used to at least represent part of the first objects forming the target category.

[0401] In one possible implementation, the prediction module is used to input the object representation values ​​sequentially output by the trained first model into the trained second model; based on the recognition result output by the trained second model, determine the target category among the M first categories to which the time series sample to be identified belongs; wherein the recognition result includes a prediction component sequence corresponding to each of the M first categories; the prediction component sequence indicates the first object constituting the corresponding first category.

[0402] Based on the same concept as the embodiment of the method of the present invention, the embodiment of the present invention further provides an electronic device. The electronic device may be a terminal device. The terminal device may be a mobile phone, a tablet computer, a wearable device, a smart TV, a Huawei smart screen, a smart speaker, a car machine, etc.

[0403] The electronic device includes a processor, a memory and a network interface.

[0404] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0405] Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache.

[0406] For example, a computer program may be stored in the memory, and when the processor executes the computer program, the steps in the above method embodiment are implemented, for example Figure 4 Steps 401 to 403 shown, or, Figure 7 Steps 701 to 703 are shown. Alternatively, the processor implements the functions of each module in the above device embodiment when executing the computer program. Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. For example, the computer program can be divided into various modules in the identification device, and the specific functions of each module are described above.

[0407] The network interface is used to send and receive data, for example, to send data processed by the processor to other electronic devices, or to receive data sent by other electronic devices.

[0408] Of course, for the sake of simplicity, only some of the components in the electronic device related to the present application are described here, omitting components such as buses, etc. In addition, the electronic device may further include any other appropriate components according to specific application conditions.

[0409] In one possible scenario, the electronic device in the embodiment of the present application is an electronic device with a voice wake-up function, that is, the user can wake up the electronic device by voice. Specifically, the user wakes up the electronic device by saying a "wake-up word". Among them, the wake-up word can be pre-set in the electronic device by the user according to his own needs, or it can be set by the electronic device before leaving the factory. The setting method of the wake-up word in the embodiment of the present application is not limited. It should be noted that the user who wakes up the electronic device in the embodiment of the present application can be arbitrary or specific. For example, the specific user can be a user who stores the sound of the wake-up word in the electronic device in advance, such as the owner of the machine.

[0410] At present, electronic devices determine whether to be awakened by detecting whether the audio feature sequence includes a wake-up word. Specifically, the electronic device is awakened when the audio feature sequence includes a wake-up word, otherwise it is not awakened. After the electronic device is awakened, the user can interact with the electronic device through voice. For example, the wake-up word is "Xiaoyi Xiaoyi", and the electronic device is awakened when it detects that the first audio data includes "Xiaoyi Xiaoyi". Among them, the electronic device obtains the audio feature sequence by collecting or receiving the surrounding environment sound to obtain the audio data and then processing it.

[0411] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0412] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0413] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0414] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0415] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0416] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0417] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0418] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0419] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A recognition method, characterized in that: include: Obtaining a first time series sample; The first time series sample is input into a first model, and the first model sequentially outputs object representation values; wherein the sequentially output object representation values ​​are used to represent the first object among the N first objects arranged in sequence, the N first objects form M first categories, and the sequentially output object representation values ​​are at least used to determine that the first time series sample belongs to a target category among the M first categories.

2. The method according to claim 1, characterized in that The first time series sample is a speech feature sequence, and the first object is a phoneme or a syllable.

3. The method according to claim 2, characterized in that The first category is a keyword category.

4. The method according to claim 1, characterized in that: The first time series sample is an image sequence, the first object is an action unit, and the first category is an action category.

5. The method according to claim 1, characterized in that The first model is a model based on a neural network.

6. The method according to claim 1 or 5, characterized in that: The first model is a model constructed in accordance with neural dynamics.

7. The method according to claim 6, characterized in that The first model includes N attractor networks, each of which outputs a result representing any one of the N first objects, and the N attractor networks are connected to form M chain attractor structures, each of which represents any one of the M first categories; The first model is used to process the first time series sample, and according to any one of the M chain attractor structures, sequentially activates the attractor networks in the N attractor networks to sequentially output object representation values.

8. The method according to claim 7, characterized in that The first model is a trained first model, and the untrained first model includes N sub-networks, and the N sub-networks are connected to form M chain structures. In the trained first model, the N sub-networks serve as an attractor network respectively, and the M chain structures serve as a chain attractor structure respectively.

9. The method according to claim 1, characterized in that: There are a plurality of the first time series samples, each of which carries a first label, the first label indicates a first object among N first objects arranged in time sequence in the first time series sample, and the first object among the N first objects arranged in time sequence in the first time series sample forms any category among the M first categories; The first model sequentially outputs object representation values ​​to form a first sequence; The method further comprises: Based on the first sequences corresponding to the multiple first time series samples and the first labels they carry, the first model is trained to obtain a trained first model.

10. The method according to claim 9, characterized in that The first object is the phoneme or syllable; Noise is added between adjacent data in the first time series samples and belonging to the first object among the N first objects; and / or, Distinguishing information is added between adjacent data in the first time series samples and belonging to a first object among the N first objects.

11. The method according to claim 9, characterized in that The first tag indicates that the appearance time of any first object before the last first object is the appearance time of the first object in the first time series sample, and the end time is the appearance time of the next first object in the first time series sample.

12. The method according to claim 9, characterized in that The method further comprises: Acquire multiple second time series samples corresponding to the M second categories; each of the second time series samples carries a second label, the second label indicates a second object among N second objects arranged in time sequence in the second time series sample, the N second objects form the M second categories, and the second objects among the N second objects arranged in time sequence in the second time series sample form any second category among the M second categories; For each second time series sample, the second time series sample is input into a second model, and the second model sequentially outputs object representation values ​​to form a second sequence; the second sequence is used to represent a second object among the N second objects arranged in sequence; Training the second model based on the second sequences corresponding to the plurality of second time series samples and the second labels carried by the samples; The trained second model is used as the first model.

13. The method according to claim 9, characterized in that The first label includes an object composition sequence corresponding to each of M first categories, and the object composition sequence indicates a first object forming a corresponding first category in the first time series sample; The training of the first model based on the first sequences corresponding to the plurality of first time series samples and the first labels carried by the samples includes: For each first time series sample of the plurality of first time series samples, the object representation value sequentially output by the first model is input into the second model, and the second model outputs a recognition result, wherein the recognition result includes a predicted component sequence corresponding to each of the M first categories; the predicted component sequence indicates a first object constituting the corresponding first category; Based on the recognition results corresponding to each of the multiple first time series samples and the first label, the first model and the second model are trained to obtain a trained first model and a trained second model.

14. The method according to claim 1, characterized in that The object representation values ​​sequentially output by the first model are used to represent at least part of the first objects that form the target category.

15. An identification device, characterized in that: include: An acquisition module, used to acquire time series samples; An input module is used to input the first time series sample into a first model, and the first model sequentially outputs an object representation value; wherein the sequentially output object representation value is used to represent the first object among the N first objects arranged in sequence, the N first objects form M first categories, and the sequentially output object representation value is at least used to determine that the first time series sample belongs to a target category among the M first categories.

16. An identification device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 14.

17. An identification device, characterized in that: The device runs computer program instructions to perform the method according to any one of claims 1-14.

18. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method according to any one of claims 1 to 14.

19. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 14.