A method and device for constructing an adaptive neural network model

By building an adaptive neural network model, the problem of low neuron selection efficiency under complex conditions is solved, more efficient training and inference are achieved, parameter interference is reduced, and model performance is improved.

CN118333098BActive Publication Date: 2024-08-23ROCK AI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410748528.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-08-23
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Under complex conditions, efficient adaptive selection of neurons in existing neural networks suffers from long training cycles and fluctuating effects, resulting in insufficient adjustment of the model structure and failure to significantly improve performance.

Method used

By building an adaptive neural network model, including constructing the input sequence, extracting features, performing linear or nonlinear transformation, mapping to obtain basic units, selecting the basic unit with the highest weight, building a chained generative neural network model, and training according to the loss function optimization.

Benefits of technology

It improves the training and inference efficiency of the model, reduces the interference between model parameters, enables the model to have the neurons required for adaptive selection, and improves the performance and stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333098B
    Figure CN118333098B
Patent Text Reader

Abstract

The present invention proposes a method and device for constructing an adaptive neural network model, which solves the problem of efficient adaptive selection of neurons in a neural network under complex conditions. According to the input sequence, a basic unit corresponding to the input sequence data is obtained, thereby completing the construction and training optimization of the chain generative neural network model. The adaptive neural network model proposed in the present invention improves the training and reasoning efficiency of the model, reduces the mutual interference between model parameters, and enables the model to have the neurons required for adaptive selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for constructing an adaptive neural network model. Background Art

[0002] In the current neural network structure design, the position of each neuron in the network structure is determined in advance, and the position is basically not allowed to be adjusted. In the traditional neural network architecture transformation algorithm, genetic algorithm, particle swarm optimization algorithm, ant colony algorithm, etc. are mainly used for model training.

[0003] Genetic algorithm is an optimization algorithm based on biological evolution theory, which searches for the optimal solution by simulating processes such as natural selection, crossover and mutation. In adaptive neural networks, genetic algorithms can be used to select and adjust the structure and parameters of the network. For example, the neurons and connections of the network can be regarded as individual genes, and these genes can be selected and mutated through genetic algorithms to obtain better network structure and parameters.

[0004] Particle swarm optimization is an optimization algorithm that simulates the behavior of a flock of birds or a school of fish. It searches for the optimal solution by simulating the movement of particles in the search space. In adaptive neural networks, particle swarm optimization can be used to adjust the structure and parameters of the network. For example, the neurons and connections of the network can be regarded as particles, and the position and speed of the particles can be adjusted in the search space according to the adaptability index to obtain a better network structure and parameters.

[0005] The ant colony algorithm is an optimization algorithm that simulates the path of an ant colony to find food. It searches for the optimal solution by simulating the behavior of ants releasing pheromones in the search space. In adaptive neural networks, the ant colony algorithm can be used to select and adjust the structure and parameters of the network. For example, the neurons and connections of the network can be regarded as the paths of the ant colony. In the search space, the paths are selected and updated according to the concentration of pheromones to obtain better network structure and parameters.

[0006] However, the above-mentioned genetic algorithm, particle swarm optimization algorithm, and ant colony algorithm are all traditional model structure improvement methods. This article introduces an adaptive neuron selection algorithm under more complex conditions and conducts large-scale training based on the selected neurons.

[0007] The existing methods are not very mature. Although genetic algorithms, particle swarm optimization algorithms, and ant colony algorithms are effective, network training after structural changes requires retraining, and the training cycle is still long and the results are highly volatile. The neurons involved in model training should be consistent with the target state of model training, otherwise the new structures or new neurons generated by mutations will not bring significant performance improvements to the model.

[0008] Therefore, in the actual production process, the model structure does not make extensive use of genetic algorithms, particle swarm optimization algorithms, and ant colony algorithms to adjust the model parameters and structures. Summary of the invention

[0009] The present invention provides a method and device for constructing an adaptive neural network model to solve the problem of efficient adaptive selection of neurons in a neural network under complex conditions.

[0010] In a first aspect, the present invention provides a method for constructing an adaptive neural network model, which specifically comprises the following steps:

[0011] Step S1: construct input sequence A={ a 1 ,a 2 ,...,a m};

[0012] Step S2: After the input sequence A is constructed, the features of the input sequence are extracted to form a sequence B = { b 1 ,b 2 ,..., b m};

[0013] Step S3: Perform linear or nonlinear transformation on sequence B to form sequence X={ x 1 ,x 2 ,...,x m};

[0014] Step S4: input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates;

[0015] Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple (in the present application, the term "multiple" means at least 2) neurons, and the input and output of the object are equal; or,

[0016] Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in a specific order to form a continuous chain; or,

[0017] Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, wherein the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure;

[0018] Step S5: For each piece of data in the sequence X, a basic unit with the highest weight corresponding to the data is selected from the multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A;

[0019] Step S6: According to the obtained m Basic units to build a chain-type generative neural network model;

[0020] Step S7: constructing a loss function of the chain generative neural network model according to the business type of the chain generative neural network model application;

[0021] Step S8: input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function.

[0022] in, a 1 ,a 2 ,...,a m is the sequence A m elements, m is a natural number.

[0023] in, b 1 ,b 2 ,...,b m is the sequence B m elements, m is a natural number.

[0024] in, x 1 ,x 2 ,...,x m is the number of m elements, m is a natural number.

[0025] Preferably, in step S1, the input sequence includes m elements, each of which represents a basic unit in the text, including words, characters, subwords, symbols or other predefined text units; wherein the length of the input sequence is the number of elements contained in the input sequence, each of the elements corresponds to an independent basic unit, and the basic units corresponding to different elements are the same or different.

[0026] Preferably, in step S2, extracting the features of the input sequence includes converting the sequence ID of the input sequence into a computable sequence feature by means of Embedding.

[0027] Preferably, in step S3, A is linearly or nonlinearly transformed, including linearly or nonlinearly transforming sequence features through a Sequential network to form a transformed sequence feature B.

[0028] Preferably, in step S4, the mapping includes two methods;

[0029] The first method specifically includes inputting each piece of data in the sequence X into the basic unit selection network to obtain multiple basic units corresponding to the piece of data;

[0030] The second method specifically includes: x 1 ,x 1 +x 2 ,...,x 1 + x 2 +...+x m The basic unit selection network is input in sequence in the form of to obtain multiple basic units.

[0031] Preferably, in step S4, the input and output of the chain structure are jointly determined by the basic units it contains, and different input and output requirements can be adapted by adding a conversion layer; the multi-path (in the present application, the term "multi-path" refers to at least 2 paths) structure is formed by nesting multiple chain structures, each chain structure is a sub-path, allowing information to be processed in parallel on multiple paths;

[0032] The multi-path structure allows for combination and configuration through different chain structures.

[0033] Preferably, in step S6, the chain generative neural network model includes one or more of the multi-path structures.

[0034] Preferably, in step S7, the loss function is used to guide the optimization adjustment of the parameters of the chain-like generative neural network model.

[0035] In a second aspect, the present invention provides an adaptive neural network model construction device, which specifically includes the following modules:

[0036] Input sequence acquisition module, used to construct input sequence A={ a1 ,a 2 ,...,a m};

[0037] The feature extraction module is used to extract the features of the input sequence after the input sequence A is constructed to form a sequence B={ b 1 ,b 2 ,...,b m};

[0038] The feature transformation module is used to perform linear or nonlinear transformation on the sequence B to form a sequence X={ x 1 ,x 2 ,..., x m};

[0039] A basic unit mapping module is used to input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates;

[0040] Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple neurons, and the input and output of the object are equal; or,

[0041] Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in a specific order to form a continuous chain; or,

[0042] Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, wherein the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure;

[0043] The optimal basic unit selection module is used to select a basic unit with the highest weight corresponding to each data in the sequence X from multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A;

[0044] Chained generative neural network model building module is used to obtain m Basic units to build a chain-type generative neural network model;

[0045] A loss function construction module, used to construct a loss function of the chain generative neural network model according to the business type of the chain generative network model application;

[0046] The model training optimization module is used to input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function.

[0047] Preferably, in the input sequence construction module, the input sequence includes m elements, each of which represents a basic unit in the text, including words, characters, subwords, symbols or other predefined text units; wherein the length of the input sequence is the number of elements contained in the input sequence, each of the elements corresponds to an independent basic unit, and the basic units corresponding to different elements are the same or different.

[0048] Preferably, in the feature extraction module, the features of the input sequence are extracted, including converting the sequence ID of the input sequence into a computable sequence feature by means of Embedding.

[0049] Preferably, in the feature transformation module, A is subjected to a linear or nonlinear transformation, including a linear or nonlinear transformation of sequence features through a Sequential network to form a transformed sequence feature B.

[0050] Preferably, in the basic unit mapping module, the mapping includes two modes;

[0051] The first method specifically includes inputting each piece of data in the sequence X into the basic unit selection network to obtain multiple basic units corresponding to the piece of data;

[0052] The second method specifically includes: x 1 ,x 1 +x 2 ,...,x 1 + x 2 +...+x m The basic unit selection network is input in sequence in the form of to obtain multiple basic units.

[0053] Preferably, in the basic unit mapping module, the input and output of the chain structure are jointly determined by the basic units it contains, and different input and output requirements can be adapted by adding a conversion layer; the multi-path structure is formed by nesting multiple chain structures, each chain structure is used as a sub-path, allowing information to be processed in parallel on multiple paths;

[0054] The multi-path structure allows for combination and configuration through different chain structures.

[0055] Preferably, in the chain generative neural network model construction module, the chain generative neural network model includes one or more of the multi-path structures.

[0056] Preferably, in the loss function construction module, the loss function is used to guide the optimization adjustment of the parameters of the chain-like generative neural network model.

[0057] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an adaptive neural network model construction method as described in any one of the first aspects of the present application.

[0058] In a fourth aspect, the present invention further provides an electronic device, comprising: a memory storing a computer program; and a processor communicatively connected to the memory, for executing an adaptive neural network model construction method described in any one of the first aspects of the present application when the computer program is called.

[0059] Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant advantages:

[0060] The present invention aims at the problem of efficient adaptive selection of neurons in a neural network under complex conditions, and provides an adaptive neural network model construction. According to the input sequence, the basic unit corresponding to the input sequence data is obtained, and then the construction and training optimization of the chain generative neural network model are completed. The adaptive neural network model proposed by the present invention improves the training and reasoning efficiency of the model, reduces the mutual interference between the model parameters, and enables the model to have the neurons required for adaptive selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings, which constitute part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention. In the accompanying drawings:

[0062] Figure 1 It is a flow chart of a method for constructing an adaptive neural network model according to a preferred embodiment of the present invention;

[0063] Figure 2 It is an example flow chart of screening basic units through a basic unit selection network based on an input sequence X in an adaptive neural network model construction method of a preferred embodiment of the present invention;

[0064] Figure 3It is another example flow chart of screening basic units through a basic unit selection network based on the accumulated features of the input sequence X in an adaptive neural network model construction method of a preferred embodiment of the present invention;

[0065] Figure 4 It is a schematic diagram of a basic unit structure in a method for building an adaptive neural network model in a preferred embodiment of the present invention;

[0066] Figure 5 It is another schematic diagram of a basic unit structure in a method for building an adaptive neural network model in a preferred embodiment of the present invention;

[0067] Figure 6 It is another schematic diagram of a basic unit structure in a method for building an adaptive neural network model in a preferred embodiment of the present invention;

[0068] Figure 7 It is a schematic diagram of the structure of a chain-like generative neural network model in a method for building an adaptive neural network model in a preferred embodiment of the present invention;

[0069] Figure 8 It is a schematic diagram of the structure of an adaptive neural network model building device according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0070] The present invention provides an adaptive neural network model construction. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0071] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. Example

[0072] like Figure 1-Figure 7 As shown, the method for constructing an adaptive neural network model described in this embodiment specifically includes the following steps:

[0073] Step S1: construct input sequence A={ a 1,a 2 ,...,a m}.

[0074] In a specific implementation of the present invention, in step S1, the input sequence includes m elements, each of which represents a basic unit in the text, including words, characters, subwords, symbols or other predefined text units; wherein the length of the input sequence is the number of elements contained in the input sequence, each of the elements corresponds to an independent basic unit, and the basic units corresponding to different elements are the same or different.

[0075] Step S2: After the input sequence A is constructed, the features of the input sequence are extracted to form a sequence B = { b 1 ,b 2 ,..., b m}.

[0076] In a specific implementation of the present invention, in step S2, the features of the input sequence are extracted, including converting the sequence ID of the input sequence into a computable sequence feature by means of Embedding.

[0077] Step S3: Perform linear or nonlinear transformation on sequence B to form sequence X={ x 1 ,x 2 ,...,x m}.

[0078] In a specific implementation of the present invention, in step S3, A is linearly or nonlinearly transformed, including linearly or nonlinearly transforming sequence features through a Sequential network to form a transformed sequence feature B.

[0079] Step S4: input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates;

[0080] Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple neurons, and the input and output of the object are equal; or,

[0081] Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in a specific order to form a continuous chain; or,

[0082] Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, and the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure.

[0083] like Figure 4-Figure 7 As shown, Figure 4 It is a basic unit with single input and single output, and the basic unit consists of a neuron. Figure 5 It is a basic unit with single input and single output. The basic unit is divided into a three-layer network structure. The first and third layers are composed of one neuron each, and the middle layer is composed of three neurons. After the basic unit is input, the input is transmitted to the three neurons in the middle layer through three paths. Finally, the three neurons transmit the output to the output neurons of the third layer respectively to obtain the final output result. Figure 6 It is a basic unit with dual input and dual output. Figure 7 It is a chain-type generative neural network model composed of multiple dual-input and dual-output basic units.

[0084] In a specific implementation of the present invention, in step S4, the mapping includes two modes:

[0085] The first method specifically includes inputting each piece of data in the sequence X into the basic unit selection network to obtain a plurality of basic units corresponding to the piece of data.

[0086] The second method specifically includes: x 1 ,x 1 +x 2 ,...,x 1 + x 2 +...+x m The basic unit selection network is input in sequence in the form of to obtain multiple basic units.

[0087] In a specific implementation of the present invention, in step S4, the input and output of the chain structure are jointly determined by the basic units it contains, and it allows different input and output requirements to be adapted by adding conversion layers; the multi-path structure is formed by nesting multiple chain structures, and each chain structure serves as a sub-path, allowing information to be processed in parallel on multiple paths.

[0088] The multi-path structure allows for combination and configuration through different chain structures.

[0089] Step S5: For each piece of data in the sequence X, a basic unit with the highest weight corresponding to the data is selected from the multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A.

[0090] Step S6: According to the obtained m Basic units are used to build a chain-type generative neural network model.

[0091] In a specific implementation of the present invention, in step S6, the chain generative neural network model includes one or more of the multi-path structures.

[0092] Step S7: construct a loss function of the chain generative neural network model according to the business type of the chain generative network model application.

[0093] In a specific implementation of the present invention, in step S7, the loss function is used to guide the optimization adjustment of the parameters of the chain-like generative neural network model.

[0094] Step S8: input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function. Example

[0095] like Figure 8 As shown, the adaptive neural network model construction device described in this embodiment specifically includes the following modules:

[0096] Input sequence construction module, used to construct input sequence A={ a 1 ,a 2 ,...,a m};

[0097] The feature extraction module is used to extract the features of the input sequence after the input sequence A is constructed to form a sequence B={ b 1 ,b 2 ,...,b m};

[0098] The feature transformation module is used to perform linear or nonlinear transformation on the sequence B to form a sequence X={ x 1 ,x 2 ,..., x m};

[0099] A basic unit mapping module is used to input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates;

[0100] Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple neurons, and the input and output of the object are equal; or,

[0101] Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in a specific order to form a continuous chain; or,

[0102] Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, wherein the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure;

[0103] The optimal basic unit selection module is used to select a basic unit with the highest weight corresponding to each data in the sequence X from multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A;

[0104] Chained generative neural network model building module is used to obtain m Basic units to build a chain-type generative neural network model;

[0105] A loss function construction module, used to construct a loss function of the chain generative neural network model according to the business type of the chain generative network model application;

[0106] The model training optimization module is used to input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function.

[0107] The input sequence acquisition, input sequence feature extraction and input sequence feature transformation are completed through the input sequence construction module, feature extraction module and feature transformation module to form a sequence X={ x 1 ,x 2 ,...,x m}, the basic unit mapping module inputs each data in the sequence X into the basic unit selection network, maps and obtains multiple basic units corresponding to each data in the sequence X as candidates, and the optimal basic unit selection module selects an optimal basic unit from the multiple candidate basic units obtained by mapping for each data in the sequence X, thereby obtaining mThe basic units corresponding to the input sequence A, the chain generation neural network model building module is based on the obtained m A basic unit is used to construct a chain generative neural network model, a loss function construction module and a model training optimization module to complete the training optimization of the chain generative neural network model.

[0108] The specific embodiments of the present invention are described in detail above, but they are only examples, and the present invention is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions made to the present invention are also within the scope of the present invention. Therefore, the equalization changes and modifications made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.

Claims

1. A method for constructing an adaptive neural network model, It is characterized in that The specific steps include: Step S1: construct input sequence A={ a 1 ,a 2 ,...,a m }; Step S2: After the input sequence A is constructed, the features of the input sequence are extracted to form a sequence B = { b 1 ,b 2 ,...,b m }; Step S3: Perform linear or nonlinear transformation on sequence B to form sequence X={ x 1 ,x 2 ,...,x m }; Step S4: input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates; Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple neurons, and the input and output of the object are equal; or, Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in sequence to form a continuous chain; or, Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, wherein the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure; Step S5: For each piece of data in the sequence X, a basic unit with the highest weight corresponding to the data is selected from the multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A; Step S6: According to the obtained m Basic units to build a chain-type generative neural network model; In step S1, the input sequence includes m elements, each of which represents a basic unit in the text, including a word, a character, a subword, a symbol or other predefined text units; wherein the length of the input sequence is the number of elements contained in the input sequence, each of which corresponds to an independent basic unit, and different elements correspond to the same or different basic units; in, a 1 ,a 2 ,...,a m is the sequence A m elements, m is a natural number; in, b 1 ,b 2 ,...,b m is the sequence B m elements, m is a natural number; in, x 1 ,x 2 ,...,x m is the sequence X m elements, m is a natural number; In step S4, the mapping includes two methods; The first method specifically includes inputting each piece of data in the sequence X into the basic unit selection network to obtain multiple basic units corresponding to the piece of data; The second method specifically includes: x 1 ,x 1 +x 2 ,...,x 1 +x 2 +...+x m The basic unit selection network is input in sequence in the form of to obtain multiple basic units.

2. The method for constructing an adaptive neural network model according to claim 1, It is characterized in that After building the chain generative neural network model in step S6, the method further includes: Step S7: constructing a loss function of the chain generative neural network model according to the business type of the chain generative neural network model application; Step S8: input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function.

3. The method for constructing an adaptive neural network model according to claim 1, It is characterized in that In step S2, features of the input sequence are extracted, including converting the sequence ID of the input sequence into computable sequence features through embedding.

4. The method for constructing an adaptive neural network model according to claim 1, It is characterized in that In step S3, a linear or nonlinear transformation is performed on B, including a linear or nonlinear transformation of sequence features through a Sequential network to form a transformed sequence feature X.

5. The method for constructing an adaptive neural network model according to claim 1, It is characterized in that In step S4, the input and output of the chain structure are jointly determined by the basic units it contains, and different input and output requirements can be adapted by adding conversion layers; the multi-path structure is formed by nesting multiple chain structures, each chain structure is a sub-path, allowing information to be processed in parallel on multiple paths; The multi-path structure allows for combination and configuration through different chain structures.

6. The method for constructing an adaptive neural network model according to claim 1, It is characterized in that In step S6, the chain generative neural network model includes one or more of the multi-path structures.

7. The method for constructing an adaptive neural network model according to claim 2, It is characterized in that In step S7, the loss function is used to guide the optimization adjustment of the parameters of the chain generative neural network model.

8. An adaptive neural network model construction device, specifically comprising the following modules: Input sequence construction module, used to construct input sequence A={ a 1 ,a 2 ,...,a m }; The feature extraction module is used to extract the features of the input sequence after the input sequence A is constructed to form a sequence B={ b 1 , b 2 ,...,b m }; The feature transformation module is used to perform linear or nonlinear transformation on the sequence B to form a sequence X={ x 1 ,x 2 ,...,x m }; A basic unit mapping module is used to input each piece of data in the sequence X into the basic unit selection network, and map and obtain multiple basic units corresponding to each piece of data in the sequence X as candidates; Each of the basic units includes an object, wherein the object includes a neuron or a local network formed by a combination of multiple neurons, and the input and output of the object are equal; or, Each of the basic units includes a chain structure formed by linearly connecting multiple objects, wherein each object is connected together in sequence to form a continuous chain; or, Each of the basic units includes a multi-path structure formed by nesting a plurality of the chain structures, wherein the chain structure is formed by linearly connecting a plurality of basic units to form a continuous, linear network structure; The optimal basic unit selection module is used to select a basic unit with the highest weight corresponding to each data in the sequence X from multiple candidate basic units obtained by mapping, so as to obtain m A basic unit corresponding to the input sequence A; Chained generative neural network model building module is used to obtain m Basic units to build a chain-type generative neural network model; In the input sequence construction module, the input sequence includes m elements, each of which represents a basic unit in the text, including a word, a character, a subword, a symbol or other predefined text units; wherein the length of the input sequence is the number of elements contained in the input sequence, each of which corresponds to an independent basic unit, and different elements correspond to the same or different basic units; in, a 1 ,a 2 ,...,a m is the sequence A m elements, m is a natural number; in, b 1 ,b 2 ,...,b m is the sequence B m elements, m is a natural number; in, x 1 ,x 2 ,...,x m is the sequence X m elements, m is a natural number; In the basic unit mapping module, the mapping includes two modes; The first method specifically includes inputting each piece of data in the sequence X into the basic unit selection network to obtain multiple basic units corresponding to the piece of data; The second method specifically includes: x 1 ,x 1 +x 2 ,...,x 1 +x 2 +...+x m The basic unit selection network is input in sequence in the form of to obtain multiple basic units.

9. The adaptive neural network model construction device according to claim 8, It is characterized in that Also includes the following modules: A loss function construction module, used to construct a loss function of the chain generative neural network model according to the business type of the chain generative network model application; The model training optimization module is used to input multiple input sequences and complete the training optimization of the chain generative neural network model according to the loss function.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of an adaptive neural network model construction method as described in any one of claims 1 to 7 are implemented.

11. An electronic device, It is characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of a method for constructing an adaptive neural network model as described in any one of claims 1 to 7 are implemented.