Data processing method and device, electronic equipment and storage medium
By determining a suitable target model from multiple neural network models for data processing, the problem of lack of flexibility in large-model artificial intelligence in the existing technology is solved, and a more efficient model inference effect is achieved.
Patent Information
- Application Number
- CN202411245680.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-01-24
AI Technical Summary
The lack of flexibility in the inference process of existing large-scale artificial intelligence technologies leads to slow inference speed and high inference cost when facing simple problems.
By obtaining model reasoning source data and model source parameters, based on these data, data processing is determined from multiple neural network models to determine the appropriate target neural network model, thereby improving the flexibility of model reasoning.
The flexibility of model reasoning is improved, enabling more effective data processing in different scenarios and tasks, and improving the reasoning effect and efficiency.
Smart Images

Figure CN119358666A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model reasoning technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] Large-model AI technology refers to the technology that uses large-scale neural network models to implement AI. The background of this technology is that with the continuous improvement of computer hardware and data storage capacity, people have begun to try to use more complex neural network models to implement more complex AI tasks, such as natural language processing, image recognition, speech recognition, etc. These large-scale neural network models usually require a large amount of data and computing resources to train, so they need to be implemented with the help of technologies such as cloud computing and distributed computing. The advantage of large-model AI technology is that it can simulate human intelligence to a certain extent, has strong generalization ability and robustness, and can show good performance in different tasks and scenarios.
[0003] However, the amount of computing, reasoning effect, and duration required for large models vary depending on the parameters. Current reasoning uses a unified model to handle any problem, which is not flexible enough and has poor reasoning effect. When faced with simple problems, the reasoning speed is slow and the reasoning cost is high. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a data processing method, device, electronic device and storage medium to facilitate improving the flexibility of model reasoning.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method based on a neural network model, comprising: obtaining model reasoning source data and model source parameters; based on the model reasoning source data and model source parameters, determining a target neural network model for data processing based on the model reasoning source data and model source parameters from more than two neural network models; using the model reasoning source data as input to the target neural network model, using the model source parameters as parameters of the target neural network model, processing the model reasoning source data through the target neural network model, and outputting the data processing result.
[0006] Optionally, the method of determining a target neural network model for data processing based on the model inference source data and the model source parameters from more than two neural network models based on the model inference source data and the model source parameters includes: discerning the data type of the model inference source data; determining at least one intermediate neural network model that matches the data type of the model inference source data from more than two neural network models based on the data type of the model inference source data; wherein the data processing type of the intermediate neural network model is consistent with the data type of the model inference source data; determining the model source parameter amount based on the model source parameters, and determining the target neural network model for data processing based on the model inference source data and the model source parameters from the at least one intermediate neural network model based on the model source parameter amount.
[0007] Optionally, the determining the data type of the model inference source data includes: performing forward propagation based on the model inference source data to calculate the model inference source data and output a classification result.
[0008] Optionally, based on the model source parameter quantity, determining from the at least one intermediate neural network model a target neural network model for data processing based on the model inference source data and the model source parameters includes: dividing the at least one intermediate neural network model into a first group and a second group according to the size of the parameter quantity; wherein the parameter quantity range of the first group is a first preset range, and the parameter quantity range of the second group is a second preset range; determining whether the model source parameter quantity is within the first preset range or the second preset range; if within the first preset range, determining a first intermediate neural network model closest to the model source parameter quantity, and using the first intermediate neural network model as the target neural network model; if within the second preset range, determining a second intermediate neural network model closest to the model source parameter quantity, and using the second intermediate neural network model as the target neural network model.
[0009] Optionally, before processing the model inference source data through the target neural network model, the method also includes: routing the model inference source data and model source parameters to the target neural network model.
[0010] Optionally, before determining, based on the model inference source data and model source parameters, from more than two neural network models a target neural network model for data processing based on the model inference source data and model source parameters, the method further includes: obtaining a user's expected value for the speed of data processing on the model inference source data through the neural network model; wherein, determining, based on the model inference source data and model source parameters, from more than two neural network models a target neural network model for data processing based on the model inference source data and model source parameters includes: determining, based on the model inference source data, the model source parameters and the expected value of speed, a target neural network model for data processing based on the model inference source data and model source parameters from more than two neural network models.
[0011] Optionally, based on the model inference source data, the model source parameters and the expected speed value, determining a target neural network model for data processing based on the model inference source data and the model source parameters from more than two neural network models includes: discerning the data type of the model inference source data; based on the data type of the model inference source data, determining at least one first intermediate neural network model that matches the data type of the model inference source data from more than two neural network models; wherein the data processing type of the first intermediate neural network model is consistent with the data type of the model inference source data; based on the model source parameter quantity, determining at least one second intermediate neural network model from the at least one first intermediate neural network model; and determining the second intermediate neural network model with the fastest processing speed among the at least one second intermediate neural network model as the target neural network model for data processing based on the model inference source data and the model source parameters.
[0012] In a second aspect, an embodiment of the present invention provides a data processing device based on a neural network model, comprising: An acquisition module, a model determination module and a data processing module; wherein the acquisition module is used to acquire model inference source data and model source parameters; the model determination module is used to determine, based on the model inference source data and model source parameters, a target neural network model for data processing based on the model inference source data and model source parameters from more than two neural network models; the data processing module is used to use the model inference source data as the input of the target neural network model, process the model inference source data through the target neural network model, and output the data processing result.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data processing method based on the neural network model described in any one of the above-mentioned first aspects.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any data processing method based on a neural network model as described in the first aspect.
[0015] The data processing method, device, electronic device and storage medium based on the neural network model provided by the embodiment of the present invention can obtain model reasoning source data and model source parameters; and based on the model reasoning source data and model source parameters, determine the target neural network model for data processing based on the model reasoning source data and model source parameters from more than two neural network models; use the model reasoning source data as the input of the target neural network model, process the model reasoning source data through the target neural network model, and output the data processing result. In this way, the flexibility of model reasoning can be improved, and the reasoning effect can be better. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is a flow chart of a data processing method based on a neural network model according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the architecture of an embodiment of a data processing device based on a neural network model of the present invention; Figure 3 The present invention is a schematic block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0019] It should be clear that the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1
[0020] In order to improve the flexibility of model reasoning and achieve better reasoning effect, an embodiment of the present invention provides a data processing method based on a neural network model. Figure 1 As shown, Figure 1 This is a flow chart of a data processing method based on a neural network model according to an embodiment of the present invention. The data processing method may include the following steps: S1: Obtain model inference source data and model source parameters.
[0021] Specifically, the model inference source data may be user input data, and the user input data may be different types of data such as images, texts, audios, etc., and may specifically be one of the data of mathematical problem categories, logical problem categories, dialogue categories, language translation sentence categories, image recognition categories, and the like; the model source parameter quantity may be obtained according to the model source parameters, and the model source parameter quantity may be the number of pre-set model parameters, or the magnitude of the model parameter quantity.
[0022] It can be understood that in some embodiments, the value of the model source parameter to be set can be determined based on the difficulty of the user input data. If the problem corresponding to the model reasoning source data is relatively simple, a relatively small value of the model source parameter can be set. If the problem corresponding to the model reasoning source data is relatively complex, a relatively large value of the model source parameter can be set.
[0023] S2: Based on the model inference source data and model source parameters, determine a target neural network model for data processing based on the model inference source data and model source parameters from more than two neural network models.
[0024] Specifically, the neural network model can be a model with multiple different parameter sizes, and the parameter sizes of models of the same category can also be different. Specifically, it can be a model of the mathematics category, a model of the logic category, a model of the dialogue category, a model of the language translation sentence category, a model of the image recognition category, and the like.
[0025] The present application can determine the target neural network model to be processed based on the model reasoning source data and model source parameters, which speeds up the reasoning speed and effect, and avoids the problem of using a unified model to process any problem in the traditional model reasoning solution. The solution of the present application is more flexible, and can match a specific target neural network model for data processing for different model reasoning source data, which improves the flexibility of model reasoning and makes the reasoning effect better.
[0026] S3: Using the model inference source data as the input of the target neural network model, using the model source parameters as the parameters of the target neural network model, processing the model inference source data through the target neural network model, and outputting the data processing result.
[0027] Specifically, the model inference source data can be processed by the target neural network model to obtain data processing results for the model inference source data. The model inference source data can be user input data for simple problems, which can reduce the inference cost for simple problems.
[0028] The data processing method based on the neural network model provided by the embodiment of the present invention can obtain model reasoning source data and model source parameters; and based on the model reasoning source data and model source parameters, determine the target neural network model for data processing based on the model reasoning source data and model source parameters from more than two neural network models; use the model reasoning source data as the input of the target neural network model, process the model reasoning source data through the target neural network model, and output the data processing result. In this way, the flexibility of model reasoning can be improved, and the reasoning effect can be better.
[0029] In order to determine a neural network model that matches the data type of model reasoning source data and speed up the reasoning speed and effect, in some embodiments, based on the model reasoning source data and model source parameters, determining a target neural network model for data processing based on the model reasoning source data and model source parameters from more than two neural network models includes: discerning the data type of the model reasoning source data; based on the data type of the model reasoning source data, determining at least one intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models; wherein the data processing type of the intermediate neural network model is consistent with the data type of the model reasoning source data; determining the model source parameter amount based on the model source parameters, and based on the model source parameter amount, determining the target neural network model for data processing based on the model reasoning source data and model source parameters from the at least one intermediate neural network model.
[0030] Specifically, since the neural network model can be a model of different types, the data type of the model reasoning source data can be first determined, and the data type can be, for example, one of the data types of mathematical problem category, logical problem category, dialogue category, language translation sentence category, image recognition category, etc. The neural network model can specifically be a mathematical model, a logical model, a dialogue category, a language translation sentence category, an image recognition category, etc., and then based on the data type of the model reasoning source data, at least one intermediate neural network model matching the data type of the model reasoning source data is determined from more than two neural network models.
[0031] It can be understood that since the parameter sizes of models of the same type may also be different, after determining at least one intermediate neural network model that matches the data type of the model inference source data, the target neural network model to be processed can be determined from the at least one intermediate neural network model based on the model source parameter quantity. In this way, different target neural network models can be matched according to different model inference source data and different model source parameter quantities, which speeds up the inference speed and effect and reduces the inference cost for simple problems.
[0032] In order to determine the data type of the model inference source data, in some embodiments, determining the data type of the model inference source data includes: performing forward propagation based on the model inference source data to calculate the model inference source data and output a classification result.
[0033] Specifically, the data type of the model reasoning source data can be different types of data such as images, texts, audios, etc., and can specifically be data of mathematical problem categories, data of logical problem categories, data of dialogue categories, data of language translation sentence categories, and data of image recognition categories, etc. The original data, such as the model reasoning source data, can be input into the neural network, and after a series of calculations and conversions, the output result is finally obtained; in the forward propagation, the input data is processed by each layer of neurons and gradually passed to the next layer until the output layer obtains the final result.
[0034] In some embodiments, based on the model source parameter quantity, determining a target neural network model for data processing based on the model inference source data and the model source parameters from the at least one intermediate neural network model includes: dividing the at least one intermediate neural network model into a first group and a second group according to the size of the parameter quantity; wherein the parameter quantity range of the first group is a first preset range, and the parameter quantity range of the second group is a second preset range; determining whether the model source parameter quantity is within the first preset range or the second preset range; if within the first preset range, determining a first intermediate neural network model closest to the model source parameter quantity, and using the first intermediate neural network model as the target neural network model; if within the second preset range, determining a second intermediate neural network model closest to the parameter quantity of the model source parameter, and using the second intermediate neural network model as the target neural network model.
[0035] Specifically, the model source parameter amount of each intermediate neural network model of the first group can be smaller than the model source parameter amount of each intermediate neural network model of the second group. First, it is determined whether the model source parameter amount is within the first preset range or the second preset range. Then, the first intermediate neural network model closest to the model source parameter amount among the intermediate neural network models corresponding to the first preset range is determined, or the second intermediate neural network model closest to the model source parameter amount among the intermediate neural network models corresponding to the second preset range is determined. Finally, the closest intermediate neural network model is used as the target neural network model.
[0036] In order to allow the target neural network model to process the model inference source data, in some embodiments, before the model inference source data is processed by the target neural network model, the method also includes: routing the model inference source data and model source parameters to the target neural network model.
[0037] In order to further improve the flexibility of model reasoning, in some embodiments, before determining, from two or more neural network models based on the model reasoning source data and model source parameters, a target neural network model for data processing based on the model reasoning source data and model source parameters, the method also includes: obtaining a user's expected value for the speed of data processing on the model reasoning source data through the neural network model; wherein, determining, from two or more neural network models, a target neural network model for data processing based on the model reasoning source data and model source parameters, includes: determining, from two or more neural network models, a target neural network model for data processing based on the model reasoning source data and model source parameters, based on the model reasoning source data, the model source parameters and the expected value of speed.
[0038] Specifically, based on the data type of the model inference source data, the model source parameter quantity and the speed expectation value, the target neural network model for data processing can be determined from more than two neural network models. In this way, model inference can be made more flexible and the user experience can be improved.
[0039] In some embodiments, the method of determining a target neural network model for data processing based on the model reasoning source data and the model source parameters from more than two neural network models based on the model reasoning source data, the model source parameters and the expected speed includes: discerning the data type of the model reasoning source data; determining at least one first intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models based on the data type of the model reasoning source data; wherein the data processing type of the first intermediate neural network model is consistent with the data type of the model reasoning source data; determining at least one second intermediate neural network model from the at least one first intermediate neural network model based on the model source parameter quantity; and determining the second intermediate neural network model with the fastest processing speed among the at least one second intermediate neural network model as the target neural network model for data processing based on the model reasoning source data and the model source parameters. Embodiment 2
[0040] Corresponding to the data processing method based on the neural network model provided in the above embodiment, Figure 2 FIG. 1 is a schematic diagram of an embodiment of a data processing device based on a neural network model according to the present invention. Figure 2 As shown, the device may include: an acquisition module 21, a model determination module 22 and a data processing module 23; wherein the acquisition module 21 is used to acquire model inference source data and model source parameters; the model determination module 22 is used to determine, based on the model inference source data and model source parameters, a target neural network model for data processing based on the model inference source data and model source parameters from more than two neural network models; the data processing module 23 is used to use the model inference source data as the input of the target neural network model, process the model inference source data through the target neural network model, and output the data processing result.
[0041] Specifically, the model inference source data may be user input data, and the user input data may be one of the data of the math problem category, the logic problem category, the dialogue category, the language translation sentence category, the image recognition category, and the like; the model source parameter quantity may be obtained according to the model source parameter, and the model source parameter quantity may be the number of pre-set model parameters, or the magnitude of the model parameter quantity; the neural network model may be a plurality of models with different parameter sizes, and the parameter sizes of models of the same category may also be different, and specifically may be a model of the math category, a model of the logic category, a model of the dialogue category, a model of the language translation sentence category, a model of the image recognition category, and the like.
[0042] It is understandable that the present application determines the target neural network model to be processed based on the model reasoning source data and the model source parameters, which speeds up the reasoning speed and effect, and avoids the problem of using a unified model to process any problem in the traditional model reasoning scheme. The scheme of the present application is more flexible, and can match a specific target neural network model for data processing for different model reasoning source data, which improves the flexibility of model reasoning and makes the reasoning effect better.
[0043] In some embodiments, the value of the model source parameter to be set can be determined based on the difficulty of the user input data. If the problem corresponding to the model reasoning source data is relatively simple, a relatively small value of the model source parameter can be set. If the problem corresponding to the model reasoning source data is relatively complex, a relatively large value of the model source parameter can be set.
[0044] The data processing device based on the neural network model provided by the embodiment of the present invention has an acquisition module that can be used to acquire model reasoning source data and model source parameters; its model determination module can be used to determine, based on the model reasoning source data and model source parameters, a target neural network model for data processing based on the model reasoning source data and model source parameters from more than two neural network models; its data processing module can be used to use the model reasoning source data as the input of the target neural network model, process the model reasoning source data through the target neural network model, and output the data processing result. In this way, the flexibility of model reasoning can be improved, and the reasoning effect can be better.
[0045] In order to determine the neural network model that matches the data type of the model reasoning source data and speed up the reasoning speed and effect, in some embodiments, the model determination module includes a type discrimination module, a first model determination module and a second model determination module; wherein the type discrimination module is specifically used to discriminate the data type of the model reasoning source data; the first model determination module is specifically used to determine at least one intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models based on the data type of the model reasoning source data; wherein the data processing type of the intermediate neural network model is consistent with the data type of the model reasoning source data; the second model determination module is specifically used to determine the model source parameter amount based on the model source parameters, and based on the model source parameter amount, determine the target neural network model for data processing based on the model reasoning source data and model source parameters from the at least one intermediate neural network model.
[0046] In order to discriminate the data type of the model inference source data, in some embodiments, the type discrimination module is further used to perform forward propagation based on the model inference source data to calculate the model inference source data and output a classification result.
[0047] In some embodiments, the second model determination module is further used to divide the at least one intermediate neural network model into a first group and a second group according to the size of the parameter quantity; wherein the parameter quantity range of the first group is a first preset range, and the parameter quantity range of the second group is a second preset range; determine whether the model source parameter quantity is within the first preset range or the second preset range; if it is within the first preset range, determine the first intermediate neural network model closest to the model source parameter quantity, and use the first intermediate neural network model as the target neural network model; if it is within the second preset range, determine the second intermediate neural network model closest to the model source parameter quantity, and use the second intermediate neural network model as the target neural network model.
[0048] In order to allow the target neural network model to process the model inference source data, in some embodiments, the device also includes a routing module; the routing module is used to route the model inference source data and model source parameters to the target neural network model.
[0049] In order to further improve the flexibility of model reasoning, in some embodiments, the device also includes a speed acquisition module, and the model determination module is specifically used to determine, based on the model reasoning source data, the model source parameters and the expected speed value, a target neural network model for data processing based on the model reasoning source data and the model source parameters from more than two neural network models.
[0050] Specifically, based on the data type of the model inference source data, the model source parameter quantity and the speed expectation value, the target neural network model for data processing can be determined from more than two neural network models. In this way, model inference can be made more flexible and the user experience can be improved.
[0051] In some embodiments, the method of determining a target neural network model for data processing based on the model reasoning source data and the model source parameters from more than two neural network models based on the model reasoning source data, the model source parameters and the expected speed includes: discerning the data type of the model reasoning source data; determining at least one first intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models based on the data type of the model reasoning source data; wherein the data processing type of the first intermediate neural network model is consistent with the data type of the model reasoning source data; determining at least one second intermediate neural network model from the at least one first intermediate neural network model based on the model source parameter quantity; and determining the second intermediate neural network model with the fastest processing speed among the at least one second intermediate neural network model as the target neural network model for data processing based on the model reasoning source data and the model source parameters. Embodiment 3
[0052] Figure 3 FIG. 1 is a schematic block diagram of an electronic device according to an embodiment of the present invention; based on the same technical concept as the first embodiment, the electronic device provided by the embodiment of the present invention is as follows: Figure 3 As shown, the step flow of any embodiment method described in Embodiment 1 of the present invention can be implemented.
[0053] The above-mentioned electronic device may include: a shell 41, a processor 42, a memory 43, a circuit board 44 and a power supply circuit 45, wherein the circuit board 44 is arranged inside the space enclosed by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; the power supply circuit 45 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 43 is used to store executable program codes; the processor 42 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 43, so as to execute the data processing method based on the neural network model described in any of the above-mentioned embodiments one.
[0054] The specific execution process of the above steps by the processor 42 and the steps further executed by the processor 42 by running the executable program code can be found in the description of the first embodiment of the present invention, which will not be repeated here.
[0055] An embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the data processing method based on the neural network model as described in any of the above-mentioned embodiments.
[0056] The electronic device exists in many forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.
[0057] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0058] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0059] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general-purpose computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0060] (5) Other electronic devices with data interaction functions.
[0061] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0062] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0063] For the convenience of description, if it involves a system, server, etc., it may be described separately by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0064] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0065] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data processing method based on a neural network model, characterized in that: include: Obtain model reasoning source data and model source parameters; Based on the model inference source data and the model source parameters, determining a target neural network model for data processing based on the model inference source data and the model source parameters from more than two neural network models; The model inference source data is used as the input of the target neural network model, the model inference source data is processed by the target neural network model, and the data processing result is output.
2. The data processing method based on the neural network model according to claim 1 is characterized in that: The step of determining a target neural network model for data processing based on the model inference source data and the model source parameters from two or more neural network models comprises: Determine the data type of the model inference source data; Based on the data type of the model reasoning source data, determining at least one intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models; wherein the data processing type of the intermediate neural network model is consistent with the data type of the model reasoning source data; Based on the model source parameters, a model source parameter quantity is determined; based on the model source parameter quantity, a target neural network model for data processing based on the model inference source data and the model source parameters is determined from the at least one intermediate neural network model.
3. The data processing method based on the neural network model according to claim 2 is characterized in that: The step of determining the data type of the model inference source data includes: Forward propagation is performed based on the model inference source data to calculate the model inference source data and output a classification result.
4. The data processing method based on the neural network model according to claim 2 is characterized in that: The step of determining, based on the model source parameter quantity, a target neural network model for data processing based on the model inference source data and the model source parameter from the at least one intermediate neural network model comprises: Dividing the at least one intermediate neural network model into a first group and a second group according to the size of the parameter amount; wherein the parameter amount range of the first group is a first preset range, and the parameter amount range of the second group is a second preset range; Determining whether the model source parameter is within the first preset range or the second preset range; If it is within the first preset range, determining a first intermediate neural network model that is closest to the model source parameter quantity, and using the first intermediate neural network model as the target neural network model; If it is within the second preset range, a second intermediate neural network model that is closest to the model source parameter quantity is determined, and the second intermediate neural network model is used as the target neural network model.
5. The data processing method based on the neural network model according to claim 1 is characterized in that: Before processing the model inference source data by the target neural network model, the method further includes: The model inference source data and model source parameters are routed to the target neural network model.
6. The data processing method based on the neural network model according to claim 1, characterized in that: Before determining, based on the model inference source data and the model source parameters, from two or more neural network models a target neural network model for data processing based on the model inference source data and the model source parameters, the method further includes: Obtaining a user's expected value of a speed of processing the model inference source data through the neural network model; Wherein, based on the model inference source data and the model source parameters, determining a target neural network model for data processing based on the model inference source data and the model source parameters from more than two neural network models comprises: Based on the model inference source data, the model source parameters and the expected speed value, a target neural network model for data processing based on the model inference source data and the model source parameters is determined from more than two neural network models.
7. The data processing method based on the neural network model according to claim 6 is characterized in that: The step of determining a target neural network model for data processing based on the model inference source data, the model source parameters and the expected speed value from two or more neural network models comprises: Determine the data type of the model inference source data; Based on the data type of the model reasoning source data, determining at least one first intermediate neural network model that matches the data type of the model reasoning source data from more than two neural network models; wherein the data processing type of the first intermediate neural network model is consistent with the data type of the model reasoning source data; Based on the model source parameter quantity, determining at least one second intermediate neural network model from the at least one first intermediate neural network model; The second intermediate neural network model with the fastest processing speed among the at least one second intermediate neural network model is determined as the target neural network model for data processing based on the model inference source data and model source parameters.
8. A data processing device based on a neural network model, characterized in that: include: Acquisition module, model determination module and data processing module; wherein, The acquisition module is used to acquire model reasoning source data and model source parameters; The model determination module is used to determine, based on the model inference source data and the model source parameters, a target neural network model for data processing based on the model inference source data and the model source parameters from more than two neural network models; The data processing module is used to use the model inference source data as the input of the target neural network model, process the model inference source data through the target neural network model, and output the data processing result.
9. An electronic device, characterized in that: The electronic device comprises: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data processing method based on the neural network model described in any one of the preceding claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data processing method based on the neural network model as described in any one of claims 1 to 7.