CN113435585A - Service processing method, device and equipment - Google Patents

Service processing method, device and equipment Download PDF

Info

Publication number
CN113435585A
CN113435585A CN202110802699.3A CN202110802699A CN113435585A CN 113435585 A CN113435585 A CN 113435585A CN 202110802699 A CN202110802699 A CN 202110802699A CN 113435585 A CN113435585 A CN 113435585A
Authority
CN
China
Prior art keywords
model
neural network
network model
sub
performance information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110802699.3A
Other languages
Chinese (zh)
Other versions
CN113435585B (en
Inventor
申书恒
傅欣艺
王维强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110802699.3A priority Critical patent/CN113435585B/en
Publication of CN113435585A publication Critical patent/CN113435585A/en
Application granted granted Critical
Publication of CN113435585B publication Critical patent/CN113435585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioethics (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification discloses a service processing method, a device and equipment, wherein the method is applied to terminal equipment and comprises the following steps: sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of the terminal equipment; receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model; and performing service processing on the target service based on the received neural network model.

Description

Service processing method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for processing a service.
Background
Currently, in order to improve the security of private data of a user and prevent the private data in user terminal equipment from being uploaded to a server in a plaintext form, many models are deployed on the user terminal equipment to complete corresponding service processing. However, when the target service has a high requirement on the real-time performance of the model, the performance of the model in the terminal device is not stable due to the difference of the performance of the terminal device. The terminal devices on the market have huge device performance differences due to the fact that the manufacturers of the terminal devices are numerous, and different manufacturers can produce terminal devices with different performance levels.
For a deep learning model in a terminal device, on a terminal device with higher device performance, the terminal device can generally complete processing of data by the model within tens of milliseconds, but on a terminal device with lower device performance, the processing of data by the model can be completed even within more than 2 seconds. Because the real-time requirement of a plurality of services on the model is higher, the output result of the missing model of the terminal equipment can only be decided by using a preset coping strategy, and the whole service effect is greatly lost. Therefore, a technical scheme that the model has a higher success rate of processing data and can provide a more appropriate model for terminal devices with different device performances is needed.
Disclosure of Invention
The purpose of the embodiments of the present specification is to provide a technical solution that the model has a higher success rate of processing data, and can provide a more appropriate model for terminal devices with different device performances.
In order to implement the above technical solution, the embodiments of the present specification are implemented as follows:
the service processing method provided by the embodiment of the present specification is applied to a terminal device, and the method includes: and sending a model acquisition request aiming at the target service to a server, wherein the model acquisition request comprises the equipment performance information of the terminal equipment. And receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model. And performing service processing on the target service based on the received neural network model.
The service processing method provided by the embodiment of the specification is applied to a server, and the method comprises the following steps: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Based on the equipment performance information of the terminal equipment, acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a pre-acquired first training sample, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of convolution kernel, network width and network depth on each sub-neural network model to obtain the model. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
An embodiment of the present disclosure provides a service processing method applied to a block chain system, where the method includes: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, and the intelligent contract is used for matching the corresponding neural network model for different equipment performance information. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
An embodiment of the present specification provides a service processing apparatus, where the apparatus includes: the request module sends a model acquisition request aiming at the target service to the server, wherein the model acquisition request comprises the equipment performance information of the device. The model receiving module is used for receiving a neural network model which is sent by the server and matched with the equipment performance information, the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model is obtained after the super-network model is subjected to multiple sampling processing, and each sub-neural network model is subjected to sub-model training of one or more of convolution kernel, network width and network depth. And the business processing module is used for carrying out business processing on the target business based on the received neural network model.
An embodiment of the present specification provides a service processing apparatus, where the apparatus includes: the request receiving module receives a model acquisition request aiming at a target service, which is sent by terminal equipment, wherein the model acquisition request comprises equipment performance information of the terminal equipment. The model acquisition module is used for acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, a sub-neural network model is obtained after performing multiple sampling processing on the super-network model, and each sub-neural network model is subjected to sub-model training of one or more of a convolution kernel, a network width and a network depth to obtain a model. And the model providing module is used for providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
An embodiment of this specification provides a service processing apparatus, where the apparatus is an apparatus in a blockchain system, and the apparatus includes: the request receiving module receives a model acquisition request aiming at a target service, which is sent by terminal equipment, wherein the model acquisition request comprises equipment performance information of the terminal equipment. The information processing module is used for acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample pre-acquired, sub-neural network models are obtained by performing multiple sampling processing on the super-network model, each sub-neural network model is subjected to sub-model training of one or more of convolution kernel, network width and network depth, and the intelligent contract is used for matching corresponding neural network models for different equipment performance information. And the information providing module is used for providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
An embodiment of this specification provides a service processing device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and sending a model acquisition request aiming at the target service to a server, wherein the model acquisition request comprises the equipment performance information of the equipment. And receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model. And performing service processing on the target service based on the received neural network model.
An embodiment of this specification provides a service processing device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Based on the equipment performance information of the terminal equipment, acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a pre-acquired first training sample, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of convolution kernel, network width and network depth on each sub-neural network model to obtain the model. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
An embodiment of the present specification provides a service processing device, where the service processing device is a device in a blockchain system, and the service processing device includes: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, and the intelligent contract is used for matching the corresponding neural network model for different equipment performance information. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
Embodiments of the present specification also provide a storage medium, where the storage medium is used to store computer-executable instructions, and the executable instructions, when executed, implement the following processes: and sending a model acquisition request aiming at the target service to a server, wherein the model acquisition request comprises the equipment performance information of the terminal equipment. And receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model. And performing service processing on the target service based on the received neural network model.
Embodiments of the present specification also provide a storage medium, where the storage medium is used to store computer-executable instructions, and the executable instructions, when executed, implement the following processes: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Based on the equipment performance information of the terminal equipment, acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a pre-acquired first training sample, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of convolution kernel, network width and network depth on each sub-neural network model to obtain the model. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
Embodiments of the present specification also provide a storage medium, where the storage medium is used to store computer-executable instructions, and the executable instructions, when executed, implement the following processes: receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device. Based on an intelligent contract pre-deployed in a block chain system and equipment performance information of the terminal equipment, acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, and the intelligent contract is used for matching corresponding neural network models for different equipment performance information. And providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1A is a diagram illustrating an embodiment of a service processing method according to the present disclosure;
fig. 1B is a schematic diagram of a service processing process in the present specification;
fig. 2A is a diagram illustrating another embodiment of a service processing method according to the present disclosure;
fig. 2B is a schematic view of another service processing process in the present specification;
FIG. 3 is a schematic diagram of a process of another business process in the present specification;
FIG. 4 is a schematic diagram of a convolution kernel process of the present description;
FIG. 5 is a schematic diagram of a network width process according to the present description;
FIG. 6 is a schematic diagram of a network deep processing according to the present disclosure;
fig. 7A is a diagram illustrating another embodiment of a service processing method;
FIG. 7B is a schematic diagram of a process of another business process in the present specification;
fig. 8 is an embodiment of a service processing apparatus according to the present disclosure;
FIG. 9 is another embodiment of a service processing apparatus according to the present disclosure;
FIG. 10 is a diagram of yet another embodiment of a transaction device;
fig. 11 is an embodiment of a service processing device according to this specification.
Detailed Description
The embodiment of the specification provides a service processing method, a service processing device and service processing equipment.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Example one
As shown in fig. 1A and fig. 1B, an embodiment of the present specification provides a service processing method, where an execution subject of the method may be a terminal device, where the terminal device may be, for example, a mobile phone, a tablet computer, a personal computer, and the like. The method may specifically comprise the steps of:
in step S102, a model acquisition request for the target service is sent to the server, where the model acquisition request includes the device performance information of the terminal device.
The server may be a background server of a certain service, and in this embodiment, the server may be a background server of a target service. The target service may be any service, specifically, a payment service, a risk prevention and control service, and the like, and may be specifically set according to an actual situation, which is not limited in this description embodiment. The device performance information may be information capable of embodying one or more performances of the terminal device, for example, the device performance information may include, for example, network-related performances of the terminal device, performances of a processor of the terminal device, and the like, and may be specifically set according to an actual situation, which is not limited in this specification.
In implementation, currently, in order to improve the security of private data of a user and prevent the private data in a user terminal device from being uploaded to a server in a plaintext form, many models are deployed on the user terminal device to complete corresponding service processing. Compared with a server, the terminal device has many advantages of protecting private data of a user, being short in data transmission link, reducing server load and the like, but when the target service has a high requirement on the real-time performance of the model, the performance of the model in the terminal device is unstable due to the difference of the performances of the terminal device. The terminal devices on the market have huge device performance differences due to the fact that the manufacturers of the terminal devices are numerous, and different manufacturers can produce terminal devices with different performance levels. For a deep learning model in a terminal device, on a terminal device with higher device performance, the terminal device can generally complete processing of data by the model within tens of milliseconds, but on a terminal device with lower device performance, the processing of data by the model can be completed even within more than 2 seconds. Because many services have high requirements on the real-time performance of the model, for example, in a payment service, only hundreds of milliseconds are required from the time when a user pulls up a cash register to pay, so that the terminal device lacks the output result of the model, and only a preset coping strategy can be used for making a decision, thereby greatly losing the overall service effect. Therefore, a technical scheme that the model has a higher success rate of processing data and can provide a more appropriate model for terminal devices with different device performances is needed. The embodiment of the present specification provides an optional implementation manner, which may specifically include the following:
the terminal device may request a new model from the server periodically or aperiodically, specifically, an application program triggering execution of the target service may be installed in the terminal device, and when the terminal device starts the application program, the terminal device may obtain device performance information of the terminal device and may generate a model acquisition request for the target service based on the device performance information, or after the terminal device starts the application program, the terminal device may obtain the device performance information of the terminal device every preset time period or aperiodically, and generate a model acquisition request for the target service based on the device performance information, and the like. The terminal device may then send the model acquisition request to the server.
In step S104, a neural network model that is sent by the server and matches the device performance information is received, where the neural network model is a super-network model obtained by the server performing model training based on a first training sample obtained in advance, a sub-neural network model obtained by performing multiple sampling processing on the super-network model, and a model obtained by performing sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model.
The first training sample may be set for different models to be trained and related information of a target service, for example, if the target service is a risk prevention and control service for a transfer service, the first training sample may be related information of risks occurring in a transfer process of a plurality of different users. The super-network model may be a deep network model with a convolution kernel larger than a specified convolution kernel and including more network layers (i.e., including a number of network layers exceeding a preset number threshold).
In implementation, an algorithm for constructing a super network model may be preset in a server, the server may construct a model architecture of the super network model through the algorithm, and then may obtain a training sample (i.e., a first training sample) for a target service, and in practical application, may obtain training samples of a plurality of different users in a plurality of different manners, for example, may purchase corresponding training samples from different users in a purchasing manner, or may obtain training samples of a plurality of different users in a manner of gray level testing or the like, which may be specifically set according to an actual situation, and this specification is not limited to this. The server can perform model training on the hyper-network model through the first training sample to obtain the trained hyper-network model.
The neural network models suitable for different equipment performances can be constructed by taking the trained super network model as a basic model, namely the super network models can be respectively sampled, a new neural network model (namely a sub-neural network model) can be constructed by the sampled data, and the convolution kernel of the sub-neural network model is the convolution kernel in the super network model, so that the convolution kernel of the sub-neural network model can be adjusted or set in order to adapt to the sub-neural network model, and in the process of adjusting or setting the convolution kernel, the parameter sharing mechanism can be used for realizing, namely, the convolution kernel of the sub-neural network model and the corresponding convolution kernel in the super network model can be subjected to parameter sharing, so that the convolution kernel of the sub-neural network model can be determined. Then, the first training sample can be used for training each sub-neural network model to obtain the trained sub-neural network model. In addition, in the training process, network width processing and network deep processing can be performed, wherein the network width processing can be regarded as the number of neurons in a hidden layer, a main mode of reducing a smaller sub-neural network model extracted by the network width from a super-network model is neuron pruning, in the deep learning process, a punishment item is added to an output (or input) parameter of each neuron, the parameter is thinned, then the neurons with input parameters of 0 are pruned, and the number of the neurons is pruned from n neurons to m. The sub-neural network model can be trained by increasing the importance of the regular designated neurons, and finally the trained sub-neural network model can be obtained. The network deep processing can be additionally provided with a hidden layer, and the additional learned hidden layer is used for fitting the fitting capability of the designated hidden layer in the original network model, so that the influence on the super network model is reduced, and the expression capability of a smaller sub-neural network model can be improved.
After the above processing, a plurality of different sub-neural network models can be obtained, and device performance information of a plurality of different terminal devices can be obtained, and corresponding sub-neural network models can be allocated to different device performance information according to actual conditions, for example, 1000 sub-neural network models can be trained, then, device performance information of terminal devices released in the last 5 years or the last 10 years can be obtained, a device performance ladder of terminal devices can be constructed according to the device performance information, then, corresponding sub-neural network models can be allocated to different device performance information based on the device performance ladder and the model performance of 1000 sub-neural network models, such as device performance information a 1-sub-neural network model 1, device performance information a 2-sub-neural network model 2, device performance information A3-sub-neural network model 3, device performance information a 4-sub neural network model 4 …, device performance information An-sub neural network model 1000, and the like. After receiving the model acquisition request sent by the terminal device, the server may search the sub-neural network model corresponding to the device performance information from the correspondence based on the device performance information in the model acquisition request, and may send the searched sub-neural network model to the terminal device, and the terminal device may receive the sub-neural network model.
It should be noted that the model architectures of the sub-neural network model, the neural network model corresponding to the device performance information, the super-network model, and the like may be a model architecture of a convolutional neural network model, and in practical application, the model architecture of the neural network model may be a model architecture of a convolutional neural network model, or may be a model architecture of other models, which may be specifically set according to an actual situation, and this is not limited in the embodiments of the present specification.
In step S106, the target service is subjected to service processing based on the received neural network model.
In implementation, for example, the target service may be a risk prevention and control service of a payment service, the terminal device may deploy the target service in the terminal device after receiving the neural network model corresponding to the device performance information, and after receiving service data of the payment service of the user, the terminal device may input the service data into the neural network model to obtain a corresponding output result, if the output result indicates that the payment service is not at risk, the terminal device may continue to complete subsequent service processing, and if the output result indicates that the payment service is at risk, the terminal device may cancel the service processing, and may notify the user that the payment is at risk, and the like.
The embodiment of the specification provides a service processing method, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
Example two
As shown in fig. 2A and fig. 2B, an execution subject of the method may be a server, where the server may be a server of a certain service (e.g., a service performing a transaction or a financial service), specifically, the server may be a server of a payment service, a server of a service related to finance or instant messaging, or the like, or a server performing service processing for a certain service. The method may specifically comprise the steps of:
in step S202, a model acquisition request for a target service sent by a terminal device is received, where the model acquisition request includes device performance information of the terminal device.
In step S204, based on the device performance information of the terminal device, a neural network model matching the device performance information is obtained from a neural network model in a pre-trained model set, the neural network model in the model set is a super-network model obtained by performing model training based on a pre-obtained first training sample, the super-network model is subjected to multiple sampling processes to obtain sub-neural network models, and each sub-neural network model is subjected to sub-model training of one or more of a convolution kernel, a network width, and a network depth.
In step S206, the neural network model matching the device performance information is provided to the terminal device, so that the terminal device performs service processing on the target service based on the neural network model matching the device performance information.
The embodiment of the specification provides a service processing method, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
EXAMPLE III
As shown in fig. 3, an execution subject of the method may be a server, where the server may be a server of a certain service (e.g., a service for performing a transaction, a financial service, or the like), specifically, the server may be a server of a payment service, a server of a service related to financial or instant messaging, or the like, or may be a server for performing service processing for a certain service. The method may specifically comprise the steps of:
in step S302, a model architecture of a super network model including a convolution kernel larger than a preset convolution kernel threshold is constructed based on a preset neural network algorithm.
The neural network algorithm may include multiple algorithms, such as a convolutional neural network algorithm, a cyclic neural network algorithm, and the like, and may be set specifically according to an actual situation, which is not limited in the embodiments of the present specification. The convolution kernel threshold may be a preset threshold for a convolution kernel, specifically, a convolution kernel of 7 × 7, or the like.
In the implementation, an algorithm of the super network model to be constructed may be preset according to an actual situation, and in this embodiment, a convolutional neural network algorithm may be selected as the algorithm for constructing the super network model, that is, a model architecture of the super network model may be constructed through the convolutional neural network algorithm. For the convolution kernel of the super network model, in deep learning, the sizes of the convolution kernels commonly used may include four types, i.e., 1x1, 3x3, 5x5, and 7x7, and a model architecture of the super network model including the convolution kernel of 7x7 may be constructed through the convolutional neural network algorithm.
In step S304, a first training sample for training the super network model is obtained, and the super network model is subjected to model training by the first training sample, so as to obtain a trained super network model.
In step S306, the trained hyper-network model is sampled to obtain one or more different sub-neural network models.
In step S308, based on the trained hyper-network model and the first training sample, performing sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain a trained sub-neural network model.
The specific processing procedures of the steps S304 to S308 may refer to relevant contents in the above embodiments, and are not described herein again.
In practical applications, the specific processing manner of step S308 may be various, and an alternative processing manner is provided below, which may specifically include the following processing from step a2 to step a 6.
In step a2, a specified convolution kernel is generated for each sub-neural network model based on the parameter sharing rule, and the network width and the network depth of each sub-neural network model are fixed.
The parameter sharing rule may be a rule for achieving the purpose of reducing the number of parameter calculations and the like by setting the same parameter between different models, where the parameter that can be shared may include multiple types, and may be specifically set according to an actual situation, which is not limited in the embodiments of the present specification.
In implementation, the sizes of the convolution kernels commonly used may include four types, 1x1, 3x3, 5x5, and 7x7, which may be used as the search space of the dynamic convolution kernel. As shown in fig. 4, a 5x5 portion of the center of the convolution kernel of 7x7 may be made to be the 'base' of the convolution kernel of 5x5, a 3x3 portion of the center of the convolution kernel of 5x5 may be made to be the 'base' of the convolution kernel of 3x3, and a 1x1 portion of the center of the convolution kernel of 3x3 may be made to be the 'base' of the convolution kernel of 1x1, and thus, learning costs may be reduced by parameter sharing between convolution kernels of different sizes. For this reason, a parameter sharing rule may be set in advance, and a specified convolution kernel may be generated for each sub neural network model based on the parameter sharing rule, and further, in order to reduce the influence of other parameters on the convolution kernel, the network width and the network depth of each sub neural network model may be fixed (that is, the network width and the network depth of each sub neural network model may be set to fixed values or known variables or the like so as to be kept constant). For example, the convolution kernel for the super network model may be a convolution kernel of 7x7, a convolution kernel of 7x7 may be converted into a convolution kernel of 5x5, and the like, by the parameter sharing rule, while the network width and the network depth of the sub neural network model remain unchanged or fixed.
In practical applications, the processing of step a2 may be varied, and the following may be provided as an alternative processing method, and specifically may include the following: and generating a specified convolution kernel of each sub-neural network model through linear affine transformation and a Sigmoid activation function based on the convolution kernel of the super-network model corresponding to each sub-neural network model.
In implementation, based on the above, if parameters are directly shared between convolution kernels of different sizes, the sub-neural network models of different sizes will be mutually involved due to the difference of parameter distribution, and the model effect will be poor. In order to increase the expression capability of the low-scale convolution kernel, a convolution kernel hidden layer may be provided, and then the low-scale convolution kernel is generated by a high-scale convolution kernel, taking a convolution kernel of 5x5 as an example, after a 'base' of a convolution kernel of 5x5 is selected from convolution kernels of 7x7, a 'convolution kernel hidden layer' of (5x5) x (5x5) may be learned, and a convolution kernel of 5x 5x (5x5) may be generated through linear affine transformation and Sigmoid activation function (i.e., 25x25 matrix projection + Sigmoid nonlinear transformation, 9x9 matrix projection + Sigmoid nonlinear transformation, 1x1 matrix projection + Sigmoid nonlinear transformation in fig. 4), and accordingly, a convolution kernel of 5x5 may be generated subsequently through the same process, and thus, a designated convolution kernel of 3x3 or a convolution kernel of 1x1 may be generated for each sub neural network model in the above manner.
In addition, for reducing the number of parameters needing to be learned, convolution kernels with the same size in each network layer share a 'convolution kernel hidden layer', so that for the convolution kernels shown in fig. 4, only 25x25+9x9+1x1 needs to be added into each network layer as 707 parameters, and the 707 parameters needing to be additionally learned only participate in training, and the extracted sub-neural network model after the training does not contain the parameters, so that the computational complexity of the sub-neural network model is not increased.
In step a4, the trained hyper-network model is used to guide the sub-neural network model generating the convolution kernel to perform model training, and knowledge distillation training is performed on the sub-neural network model generating the convolution kernel based on the first training sample, so as to obtain the trained sub-neural network model.
The knowledge distillation can be a processing mode of realizing knowledge migration by introducing a Target (such as Soft-Target) related to a Teacher Network (a complex Network with excellent performance) as a part of Total Loss (Total Loss) to induce training of a Student Network (a simplified Network with low complexity).
In implementation, the training process of the sub-neural network model can be divided into 4 stages, the first stage only trains the super-network model, and the super-network model is trained in a way of traversing T (T is greater than or equal to 1) times of first training samples, so that the super-network model converges. In the process of training the hyper-network model, the 'convolution kernel hidden layer' of the convolution kernel part does not participate in training, the additional hidden layer parameters of the network depth part do not participate in training, and Target Dropout in the network width needs to be added at this stage to specify the importance of hidden layer neurons.
In the second stage, a convolution kernel in the super-network model is trained in a mode of traversing T (T is more than or equal to 1) times of first training samples, in each iteration of the stage, the size of the convolution kernel can be randomly selected by each network layer, then, corresponding sub-neural network models are collected and are subjected to forward propagation on the sub-neural network models, meanwhile, the first training samples are input into the super-network models to be subjected to forward propagation to obtain corresponding output results, the super-network models are used as teacher network models, and the sub-neural network models obtained after sampling are used as student network models, so that knowledge distillation training is performed on the sub-neural network models generating the convolution kernels.
In step a6, the trained sub-neural network model is propagated backwards, the gradient of the model parameter corresponding to the trained sub-neural network model is determined, and the gradient of the model parameter is subjected to gradient descent processing to obtain a processed sub-neural network model.
In implementation, the sub-neural network model can be propagated backwards, the gradient of parameters in the sub-neural network model is calculated, and the sub-neural network model is processed through a gradient descent algorithm to obtain the processed sub-neural network model.
The above-described processing of 2 stages out of the 4 stages is completed, and in the third stage, it can be realized by the processing of step B2 and step B4 described below.
In step B2, a designated convolution kernel is generated for each sub-neural network model based on the parameter sharing rule, and a width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel is initialized, and a depth parameter corresponding to the network depth of each sub-neural network model is fixed.
In implementation, in the third stage, the depth parameter corresponding to the network depth of each sub-neural network model may be fixed, and the convolution kernel and the network width may be trained, where the processing procedure of generating the designated convolution kernel for each sub-neural network model based on the parameter sharing rule may refer to the above related contents, and the width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel may be initialized, so as to obtain the initialized width parameter.
In step B4, the trained hyper-network model is used to guide the initialized sub-neural network model to perform model training, and knowledge distillation training is performed on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and the parameter value of the width parameter is determined.
In implementation, before model training, neurons of the same network layer (or neurons of the middle layer) are independent of each other, and each neuron does not currently have strong feature extraction capability, and they are independent of each other. Assuming that the pruned sub-neural network model has only one global optimal solution, if the property that the super-network model can be converged faster than the sub-neural network model is ignored, m (m is greater than or equal to 1) neurons can be reserved in a hidden network layer of the model from the beginning, and the sub-neural network model obtained by training has the same performance as the sub-neural network model trained by pruning. Based on this, the network width can be learned by increasing the canonical designated neuron importance.
Assuming that the network width search space of a hidden network layer is [12, 9, 6, 3], as shown in the leftmost diagram of fig. 5, the importance of the neurons in the hidden network layer can be represented by the order of top and bottom (the importance of the neurons from top to bottom increases in fig. 5, wherein the circles in the same pattern represent the same neurons, i.e., as in fig. 5, every 3 neurons from top to bottom are the same, and the corresponding importance is the same). The most important 9 neurons are used as the hidden network layer of the 9 hidden network layer sub-neural network model, the most important 6 neurons are used as the hidden network layer of the 6 hidden network layer sub-neural network model, and the most important 3 neurons are used as the hidden network layer of the 3 hidden network layer sub-neural network model.
In this stage, additional parameters may be trained, and some parameters in the hyper-network model may be fine-tuned, similar to the second stage, knowledge distillation is also used in this stage to improve the expression capability of the sub-neural network model, and specific processing may refer to the above-mentioned related contents, and will not be described herein again.
In practical applications, the specific processing of step B4 may be varied, and the following provides an alternative processing method, which may specifically include the following: the sub-neural network model comprises a Target Dropout network layer, the trained hyper-network model is used for guiding the initialized sub-neural network model to carry out model training, the importance of the width parameter is determined through the Target Dropout network layer, the initialized sub-neural network model is subjected to knowledge distillation training based on a first training sample, the trained sub-neural network model is obtained, and parameter values of the width parameter with different importance are determined.
In the embodiment, based on the above, in order to adjust the neuron significance by regularization, a Target Dropout network layer may be added to the output of the network layer, and the ratio of Target Dropout may be increased in the order of the neuron significance from high to low. Through model training, the sub-neural network model uses the most important neurons, and other unimportant neurons in the super-network model are used as supplements of the most important neurons in the sub-neural network model.
The above-described processing of 3 stages out of the 4 stages is completed, and in the fourth stage, it can be realized by the processing of step C2 and step C4 described below.
In step C2, a designated convolution kernel is generated for each sub-neural network model based on the parameter sharing rule, and a width parameter corresponding to the network width and a depth parameter corresponding to the network depth of the sub-neural network model for which the convolution kernel is generated are initialized.
In the implementation, in the fourth stage, the convolution kernel, the network width, and the network depth may be trained, where the processing procedure for generating the designated convolution kernel for each sub-neural network model based on the parameter sharing rule may refer to the above related contents, and the width parameter corresponding to the network width and the depth parameter corresponding to the network depth of the sub-neural network model for generating the convolution kernel may be initialized, so as to obtain the initialized width parameter and depth parameter.
In step C4, the trained hyper-network model is used to guide the initialized sub-neural network model to perform model training, and knowledge distillation training is performed on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and the parameter values of the width parameter and the depth parameter are determined.
In the implementation, in this stage, additional parameters may be trained, and part of the parameters in the super network model may be fine-tuned, similar to the second stage, knowledge distillation is also used in this stage to improve the expression capability of the sub-neural network model, and specific processing may refer to the above related contents, which is not described herein again.
In practical applications, the specific processing of step C4 may be varied, and the following provides an alternative processing method, which may specifically include the following: adding a preset number of hidden network layers into the sub-neural network model; and guiding the sub-neural network model with the hidden network layer to carry out model training by using the trained hyper-network model, carrying out knowledge distillation training on the sub-neural network model with the hidden network layer on the basis of the first training sample to obtain the trained sub-neural network model, and determining the parameter value of the depth parameter.
The preset number may include multiple numbers, for example, 1 or 3, and may be specifically set according to an actual situation, and this is not limited in the embodiments of the present specification.
In implementation, as shown in fig. 6, assuming that the network depth of the original neural network model is 4 layers, it needs to be compressed to 3 layers or 2 layers, i.e. the search space is [4, 3, 2], if the output of the 2 nd network layer of the original network model is directly taken as the output of the sub-neural network model including the 2-layer network layer (or the output of the 3 rd network layer of the original network model is directly taken as the output of the sub-neural network model including the 3-layer network layer), since the output of the sub-neural network model including the 2-layer network layer is substantially consistent with the output of the sub-neural network model including the 4-layer network layer in the learning process, the parameters of the last 2 network layers will be close to the standard diagonal matrix, so that the network expression capability is reduced. Therefore, a hidden network layer can be additionally learned, as shown by a right oblique line frame in fig. 6, the additionally learned hidden network layer can be used for fitting the fitting capability of 3 or 2 hidden network layers in the original network, so that the influence on the super network model is reduced, and the expression capability of the sub-neural network model is improved.
By the method, the sub-neural network model can be trained to be convergent only by 4 times of the training time of the original network model. According to the above setting, there are (4^4) x (4^4) x3 ^ 196608 per search space of the 4-layer neural network. Thus, thousands of sub-neural network models of different sizes can be extracted.
In step S310, device performance information of a plurality of different terminal devices is obtained, and a correspondence relationship between the device performance information and the sub-neural network model is determined based on the plurality of different device performance information and the plurality of different sub-neural network models.
In implementation, the manner of obtaining the device performance information of a plurality of different terminal devices may be various, for example, the web crawler may search the device performance information of the terminal device published within a certain time period, or obtain the device performance information of the terminal device used by the user from different users, which may be specifically set according to actual situations, and this is not limited in this embodiment of the present specification.
After the sub neural network models corresponding to a plurality of different pieces of equipment performance information are obtained through the training in the above manner, the search and deployment of the neural network models can be completed through the processing of the following steps S312 to S316.
In step S312, a model acquisition request for the target service sent by the terminal device is received, where the model acquisition request includes device performance information of the terminal device.
In step S314, based on the device performance information of the terminal device, a neural network model matching the device performance information is obtained from the neural network models in the pre-trained model set.
In step S316, the neural network model matching the device performance information is provided to the terminal device, so that the terminal device performs service processing on the target service based on the neural network model matching the device performance information.
The embodiment of the specification provides a service processing method, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
In addition, through training the hyper-network model, after the performance of the hyper-network model is completed, according to the performance ladder of the terminal equipment, an individualized model structure which is most suitable for the performance of the hyper-network model is extracted for each terminal equipment, the hardware capability of different terminal equipment is fully utilized, the inference failure rate of the low-performance terminal equipment model is reduced while the effect of the high-performance terminal equipment model is improved, and a better effect is achieved.
Example four
As shown in fig. 7A and fig. 7B, an execution subject of the method may be a blockchain system, where the blockchain system may be composed of a terminal device or a server, where the terminal device may be a mobile terminal device such as a mobile phone or a tablet computer, and may also be a device such as a personal computer. The server may be an independent server, a server cluster including a plurality of servers, or the like. The method may specifically comprise the steps of:
in step S702, a model acquisition request for a target service sent by a terminal device is received, where the model acquisition request includes device performance information of the terminal device.
In step S704, based on the intelligent contract pre-deployed in the blockchain system and the device performance information of the terminal device, a neural network model matched with the device performance information is obtained from a neural network model in a pre-trained model set, where the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, the super-network model is subjected to multiple sampling processes to obtain sub-neural network models, and each sub-neural network model is subjected to one or more sub-model training of a convolution kernel, a network width, and a network depth to obtain a model, and the intelligent contract is used for matching different device performance information with corresponding neural network models.
The intelligent contract is provided with rules for matching corresponding neural network models for different equipment performance information, and the rules may include one or more rules.
In implementation, an intelligent contract may be constructed in advance based on a processing procedure for matching different device performance information with corresponding neural network models, and the constructed intelligent contract may be deployed in a blockchain system, so that processing for matching different device performance information with corresponding neural network models is triggered by the intelligent contract. In order to protect the private data of the user and prevent the private data of the user from being tampered, the correspondence between the device performance information and the neural network model can be stored in the blockchain system. After the block chain system receives the device performance information of the terminal device, an intelligent contract can be called, and the processing of matching corresponding neural network models for different device performance information is triggered through corresponding rules set in the intelligent contract.
It should be noted that, in practical applications, the neural network model in the model set trained in advance may be stored in the blockchain system, or may be stored in other storage devices, and for the case that the neural network model in the model set is stored in other storage devices, considering that the neural network model in the model set may need to be updated periodically or aperiodically, since the blockchain system has a characteristic of being not tampered with, if the neural network model in the model set is stored in the blockchain system, it is necessary to perform frequent uploading, deletion, and identity verification of an uploader on the neural network model in the blockchain system subsequently, so as to increase the processing pressure of the blockchain system, and in order to improve the processing efficiency and reduce the processing pressure of the blockchain system, the neural network model in the model set may be trained in advance in the storage devices, the trained neural network model (i.e. the sub-neural network model) can be stored in a designated memory address of the storage device, and the memory address is uploaded to the blockchain system, and the memory address can be fixed and stored in the blockchain system, so that the tamper resistance of data in the blockchain system is ensured, and meanwhile, the neural network model in the model set can be updated regularly or irregularly in the storage device, so that the latest sub-neural network model obtained through the memory address in the blockchain system is ensured.
Based on the above, the process of step S704 may also be processed as follows:
based on the intelligent contract, the following processing is executed:
d2: and acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system.
D4: and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation.
D6: and acquiring index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a specified storage device based on the acquired index information.
The index information can be used for recording information such as a position stored by a certain neural network model, the corresponding neural network model can be quickly found through the index information, the content of the data corresponding to the index information cannot be modified after the data corresponding to the index information is stored in the block chain system, namely the storage position of the neural network model corresponding to the index information cannot be changed, and therefore the index information can be prevented from being maliciously tampered.
In implementation, in order to ensure the integrity of the index information of the neural network model and prevent the index information from being tampered, the index information of the neural network model may be uploaded to the blockchain system, and specifically, in order to record a certain neural network model, the index information of the neural network model may be preset according to actual conditions, for example, an area where the certain neural network model can be stored may be preset, and then, the index information and the like may be generated based on the set area. After the index information is set, the index information may be uploaded to the blockchain system.
In addition, considering that the correspondence between the device performance information and the identifier of the neural network model may also be dynamically changed, the correspondence may also be stored in a storage device, and the stored index information may also be uploaded to the blockchain system, based on which the processing of step S704 may also be processed by:
based on the intelligent contract, the following processing is executed:
e2: first index information of a corresponding relation between equipment performance information and identification of a neural network model is obtained from a block chain system.
E4: and acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the first storage equipment based on the first index information, and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation.
E6: and acquiring second index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in second storage equipment based on the second index information.
The first storage device and the second storage device may be the same storage device or different storage devices.
In step S706, the neural network model matched with the device performance information is provided to the terminal device, so that the terminal device performs service processing on the target service based on the neural network model matched with the device performance information.
In implementation, after the neural network model matched with the device performance information of the terminal device is obtained through the intelligent contract, the block chain system can be triggered through the intelligent contract again to provide the obtained neural network model for the terminal device.
The embodiment of the specification provides a service processing method, a terminal device sends a model acquisition request aiming at a target service to a block chain system, the model acquisition request comprises device performance information of the terminal device, the block chain system acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on a pre-deployed intelligent contract and the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a pre-acquired first training sample, a sub-neural network model is obtained after performing multi-sampling processing on the super-network model, each sub-neural network model is subjected to sub-model training of one or more of convolution kernel, network width and network depth, and the neural network model matched with the device performance information sent by the block chain system is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
EXAMPLE five
Based on the same idea, the service processing method provided in the embodiment of the present specification further provides a service processing apparatus, as shown in fig. 8.
The service processing device comprises: a request module 801, a model receiving module 802 and a service processing module 803, wherein:
a request module 801, configured to send a model acquisition request for a target service to a server, where the model acquisition request includes device performance information of the device;
the model receiving module 802 is configured to receive a neural network model which is sent by the server and is matched with the device performance information, where the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by performing multiple sampling processing on the super-network model, and a model obtained by performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model;
and the service processing module 803 performs service processing on the target service based on the received neural network model.
In an embodiment of the present specification, the neural network model is a convolutional neural network model.
The embodiment of the specification provides a service processing device, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
EXAMPLE six
Based on the same idea, embodiments of the present specification further provide a service processing apparatus, as shown in fig. 9.
The service processing device comprises: a request receiving module 901, a model obtaining module 902 and a model providing module 903, wherein:
a request receiving module 901, configured to receive a model acquisition request for a target service, where the model acquisition request includes device performance information of a terminal device, and the model acquisition request is sent by the terminal device;
a model obtaining module 902, configured to obtain, based on the device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set, where the neural network model in the model set is a super-network model obtained by performing model training based on a pre-obtained first training sample, perform multiple sampling processing on the super-network model to obtain sub-neural network models, and perform sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain a model;
and a model providing module 903, configured to provide the neural network model matched with the device performance information to the terminal device, so that the terminal device performs service processing on the target service based on the neural network model matched with the device performance information.
In an embodiment of this specification, the apparatus further includes:
the architecture construction module is used for constructing a model architecture of the super network model, wherein the model architecture comprises a convolution kernel which is larger than a preset convolution kernel threshold value, based on a preset neural network algorithm;
the first training module is used for acquiring a first training sample for training the super network model, and performing model training on the super network model through the first training sample to obtain a trained super network model;
the sampling module is used for sampling the trained hyper-network model to obtain one or more different sub-neural network models;
the second training module is used for carrying out sub-model training of one or more of convolution kernel, network width and network depth on each sub-neural network model based on the trained super-network model and the first training sample to obtain the trained sub-neural network model;
the relation establishing module is used for acquiring the equipment performance information of a plurality of different terminal equipment and determining the corresponding relation between the equipment performance information and the sub-neural network model based on the equipment performance information and the sub-neural network models.
In an embodiment of this specification, the second training module includes:
the first convolution kernel generation unit is used for respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule and fixing the network width and the network depth of each sub-neural network model;
the first knowledge distillation unit is used for conducting knowledge distillation training on the sub-neural network model generating the convolution kernel based on the first training sample in a mode that the trained super-network model guides the sub-neural network model generating the convolution kernel to conduct model training to obtain a trained sub-neural network model;
and the processing unit is used for propagating the trained sub-neural network model backwards, determining the gradient of the model parameter corresponding to the trained sub-neural network model, and performing gradient descent processing on the gradient of the model parameter to obtain the processed sub-neural network model.
In an embodiment of this specification, the second training module includes:
the second convolution kernel generation unit is used for respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule, initializing the width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel, and fixing the depth parameter corresponding to the network depth of each sub-neural network model;
and the second knowledge distillation unit is used for performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode that the trained hyper-network model guides the initialized sub-neural network model to perform model training, so as to obtain the trained sub-neural network model, and determining the parameter value of the width parameter.
In an embodiment of this specification, the second training module includes:
the third convolution kernel generation unit is used for respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule and respectively initializing a width parameter corresponding to the network width and a depth parameter corresponding to the network depth of the sub-neural network model generating the convolution kernels;
and the third knowledge distillation unit is used for performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode that the trained hyper-network model guides the initialized sub-neural network model to perform model training, so as to obtain the trained sub-neural network model, and determining the parameter value of the width parameter and the parameter value of the depth parameter.
In an embodiment of the present specification, the third convolution kernel generation unit generates, based on a convolution kernel of the super network model corresponding to each of the sub neural network models, a specified convolution kernel of each of the sub neural network models by linear affine transformation and Sigmoid activation function.
In an embodiment of the present specification, the subneural network model includes a Target Dropout network layer, the third knowledge distillation unit determines the importance of the width parameter through the Target Dropout network layer in a manner that the trained hyper-network model guides the initialized subneural network model to perform model training, performs knowledge distillation training on the initialized subneural network model based on the first training sample to obtain a trained subneural network model, and determines parameter values of the width parameter with different importance.
In an embodiment of this specification, the apparatus further includes:
the network layer adding module is used for adding a preset number of hidden network layers into the sub-neural network model;
and the third knowledge distillation unit is used for performing knowledge distillation training on the sub-neural network model with the hidden network layer added based on the first training sample in a mode that the trained hyper-network model guides the sub-neural network model with the hidden network layer added to perform model training, so as to obtain the trained sub-neural network model, and determining the parameter value of the depth parameter.
The embodiment of the specification provides a service processing device, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
In addition, through training the hyper-network model, after the performance of the hyper-network model is completed, according to the performance ladder of the terminal equipment, an individualized model structure which is most suitable for the performance of the hyper-network model is extracted for each terminal equipment, the hardware capability of different terminal equipment is fully utilized, the inference failure rate of the low-performance terminal equipment model is reduced while the effect of the high-performance terminal equipment model is improved, and a better effect is achieved.
EXAMPLE seven
Based on the same idea, embodiments of the present specification further provide a service processing apparatus, where the apparatus is an apparatus in a blockchain system, as shown in fig. 10.
The device comprises: a request receiving module 1001, an information processing module 1002, and an information providing module 1003, wherein:
a request receiving module 1001, configured to receive a model acquisition request for a target service, where the model acquisition request includes device performance information of a terminal device;
an information processing module 1002, configured to obtain, based on an intelligent contract pre-deployed in the blockchain system and device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set, where the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, the super-network model is subjected to multiple sampling processing to obtain sub-neural network models, and each sub-neural network model is subjected to sub-model training of one or more of a convolution kernel, a network width, and a network depth, and the intelligent contract is used for matching corresponding neural network models for different device performance information;
the information providing module 1003 is configured to provide the neural network model matched with the device performance information to the terminal device, so that the terminal device performs service processing on the target service based on the neural network model matched with the device performance information.
In this embodiment of this specification, the information processing module 1002 includes:
the relation acquisition unit is used for acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system based on the intelligent contract;
the first searching unit is used for searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and the first model indexing unit acquires the index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquires the neural network model corresponding to the searched identifier from a pre-trained model set stored in a specified storage device based on the acquired index information.
In this embodiment of this specification, the information processing module 1002 includes:
the index unit is used for acquiring first index information of the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system based on the intelligent contract;
the processing unit is used for acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the first storage equipment based on the first index information, and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and the second model indexing unit is used for acquiring second index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a second storage device based on the second index information.
The embodiment of the specification provides a service processing device, a terminal device sends a model acquisition request aiming at a target service to a block chain system, the model acquisition request comprises device performance information of the terminal device, the block chain system acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on a pre-deployed intelligent contract and the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a pre-acquired first training sample, a sub-neural network model is obtained by performing multi-sampling processing on the super-network model, each sub-neural network model is trained by performing one or more sub-models in a convolution kernel, a network width and a network depth, and the neural network model matched with the device performance information sent by the block chain system is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
Example eight
Based on the same idea, the service processing apparatus provided in the embodiment of the present specification further provides a service processing device, as shown in fig. 11.
The service processing device may be a terminal device, a server, or a device in a blockchain system provided in the foregoing embodiments.
The business processing apparatus, which may have a large difference due to different configurations or performances, may include one or more processors 1101 and a memory 1102, and the memory 1102 may store one or more stored applications or data therein. Wherein memory 1102 may be transient or persistent. The application program stored in memory 1102 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a business processing device. Further, processor 1101 may be configured to communicate with memory 1102 to execute a series of computer-executable instructions in memory 1102 on a business processing device. The traffic processing apparatus may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input-output interfaces 1105, one or more keyboards 1106.
In particular, in this embodiment, the business processing apparatus includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the business processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of the equipment;
receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model;
and performing service processing on the target service based on the received neural network model.
In an embodiment of the present specification, the neural network model is a convolutional neural network model.
Further, in this embodiment, the business processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the business processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
In the embodiment of this specification, the method further includes:
constructing a model architecture of the super network model, wherein the model architecture comprises a convolution kernel which is larger than a preset convolution kernel threshold value, based on a preset neural network algorithm;
obtaining a first training sample for training the super network model, and performing model training on the super network model through the first training sample to obtain a trained super network model;
sampling the trained hyper-network model to obtain one or more different sub-neural network models;
performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model based on the trained hyper-network model and the first training sample to obtain a trained sub-neural network model;
the method comprises the steps of obtaining equipment performance information of a plurality of different terminal devices, and determining the corresponding relation between the equipment performance information and a sub-neural network model based on the equipment performance information and the sub-neural network model.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule, and fixing the network width and the network depth of each sub-neural network model;
the trained super-network model is used for guiding a sub-neural network model generating a convolution kernel to carry out model training, knowledge distillation training is carried out on the sub-neural network model generating the convolution kernel based on the first training sample, and the trained sub-neural network model is obtained;
and carrying out backward propagation on the trained sub-neural network model, determining the gradient of the model parameter corresponding to the trained sub-neural network model, and carrying out gradient descent processing on the gradient of the model parameter to obtain the processed sub-neural network model.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, initializing a width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel, and fixing a depth parameter corresponding to the network depth of each sub-neural network model;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, and respectively initializing a width parameter corresponding to the network width and a depth parameter corresponding to the network depth of the sub-neural network model generating the convolution kernels;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter and the parameter value of the depth parameter.
In an embodiment of this specification, the generating a specified convolution kernel for each of the sub neural network models based on a parameter sharing rule includes:
and generating a specified convolution kernel of each sub-neural network model through linear affine transformation and a Sigmoid activation function based on the convolution kernel of the super-network model corresponding to each sub-neural network model.
In an embodiment of this specification, the sub-neural network model includes a Target Dropout network layer, and the performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a manner that the trained hyper-network model guides the initialized sub-neural network model to perform model training includes:
and guiding the initialized sub-neural network model to carry out model training by using the trained hyper-network model, determining the importance of the width parameter through the Target Dropout network layer, carrying out knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the width parameter with different importance.
In the embodiment of this specification, the method further includes:
adding a preset number of hidden network layers into the sub-neural network model;
the method for conducting model training on the initialized sub-neural network model by guiding the trained hyper-network model comprises the following steps of conducting knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the depth parameter, wherein the method comprises the following steps:
and guiding the sub-neural network model with the hidden network layer to carry out model training by using the trained hyper-network model, carrying out knowledge distillation training on the sub-neural network model with the hidden network layer on the basis of the first training sample to obtain the trained sub-neural network model, and determining the parameter value of the depth parameter.
Further, in this embodiment, the business processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the business processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, wherein the intelligent contract is used for matching corresponding neural network models for different equipment performance information;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
In an embodiment of this specification, the acquiring, based on an intelligent contract pre-deployed in the blockchain system and device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set includes:
performing the following processing based on the intelligent contract:
acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system;
searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a specified storage device based on the acquired index information.
In an embodiment of this specification, the acquiring, based on an intelligent contract pre-deployed in the blockchain system and device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set includes:
performing the following processing based on the intelligent contract:
acquiring first index information of a corresponding relation between equipment performance information and an identifier of a neural network model from the block chain system;
acquiring a corresponding relation between the equipment performance information and the identification of the neural network model from a first storage device based on the first index information, and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring second index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a second storage device based on the second index information.
The embodiment of the specification provides a service processing device, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample obtained in advance, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is trained by performing one or more sub-models of a convolution kernel, a network width and a network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
In addition, through training the hyper-network model, after the performance of the hyper-network model is completed, according to the performance ladder of the terminal equipment, an individualized model structure which is most suitable for the performance of the hyper-network model is extracted for each terminal equipment, the hardware capability of different terminal equipment is fully utilized, the inference failure rate of the low-performance terminal equipment model is reduced while the effect of the high-performance terminal equipment model is improved, and a better effect is achieved.
Example nine
Further, based on the methods shown in fig. 1A and fig. 7B, one or more embodiments of the present disclosure further provide a storage medium for storing computer-executable instruction information, in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when the storage medium stores the computer-executable instruction information, the following process is implemented when the storage medium is executed by a processor:
sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of the terminal equipment;
receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model;
and performing service processing on the target service based on the received neural network model.
In an embodiment of the present specification, the neural network model is a convolutional neural network model.
In another specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when executed by the processor, the storage medium stores computer-executable instruction information that implement the following processes:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
In the embodiment of this specification, the method further includes:
constructing a model architecture of the super network model, wherein the model architecture comprises a convolution kernel which is larger than a preset convolution kernel threshold value, based on a preset neural network algorithm;
obtaining a first training sample for training the super network model, and performing model training on the super network model through the first training sample to obtain a trained super network model;
sampling the trained hyper-network model to obtain one or more different sub-neural network models;
performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model based on the trained hyper-network model and the first training sample to obtain a trained sub-neural network model;
the method comprises the steps of obtaining equipment performance information of a plurality of different terminal devices, and determining the corresponding relation between the equipment performance information and a sub-neural network model based on the equipment performance information and the sub-neural network model.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule, and fixing the network width and the network depth of each sub-neural network model;
the trained super-network model is used for guiding a sub-neural network model generating a convolution kernel to carry out model training, knowledge distillation training is carried out on the sub-neural network model generating the convolution kernel based on the first training sample, and the trained sub-neural network model is obtained;
and carrying out backward propagation on the trained sub-neural network model, determining the gradient of the model parameter corresponding to the trained sub-neural network model, and carrying out gradient descent processing on the gradient of the model parameter to obtain the processed sub-neural network model.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, initializing a width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel, and fixing a depth parameter corresponding to the network depth of each sub-neural network model;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter.
In an embodiment of this specification, the performing, based on the trained hyper-network model and the first training sample, sub-model training of one or more of a convolution kernel, a network width, and a network depth on each sub-neural network model to obtain the trained sub-neural network model includes:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, and respectively initializing a width parameter corresponding to the network width and a depth parameter corresponding to the network depth of the sub-neural network model generating the convolution kernels;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter and the parameter value of the depth parameter.
In an embodiment of this specification, the generating a specified convolution kernel for each of the sub neural network models based on a parameter sharing rule includes:
and generating a specified convolution kernel of each sub-neural network model through linear affine transformation and a Sigmoid activation function based on the convolution kernel of the super-network model corresponding to each sub-neural network model.
In an embodiment of this specification, the sub-neural network model includes a Target Dropout network layer, and the performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a manner that the trained hyper-network model guides the initialized sub-neural network model to perform model training includes:
and guiding the initialized sub-neural network model to carry out model training by using the trained hyper-network model, determining the importance of the width parameter through the Target Dropout network layer, carrying out knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the width parameter with different importance.
In the embodiment of this specification, the method further includes:
adding a preset number of hidden network layers into the sub-neural network model;
the method for conducting model training on the initialized sub-neural network model by guiding the trained hyper-network model comprises the following steps of conducting knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the depth parameter, wherein the method comprises the following steps:
and guiding the sub-neural network model with the hidden network layer to carry out model training by using the trained hyper-network model, carrying out knowledge distillation training on the sub-neural network model with the hidden network layer on the basis of the first training sample to obtain the trained sub-neural network model, and determining the parameter value of the depth parameter.
In another specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when executed by the processor, the storage medium stores computer-executable instruction information that implement the following processes:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, wherein the intelligent contract is used for matching corresponding neural network models for different equipment performance information;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
In an embodiment of this specification, the acquiring, based on an intelligent contract pre-deployed in the blockchain system and device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set includes:
performing the following processing based on the intelligent contract:
acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system;
searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a specified storage device based on the acquired index information.
In an embodiment of this specification, the acquiring, based on an intelligent contract pre-deployed in the blockchain system and device performance information of the terminal device, a neural network model matched with the device performance information from a neural network model in a pre-trained model set includes:
performing the following processing based on the intelligent contract:
acquiring first index information of a corresponding relation between equipment performance information and an identifier of a neural network model from the block chain system;
acquiring a corresponding relation between the equipment performance information and the identification of the neural network model from a first storage device based on the first index information, and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring second index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a second storage device based on the second index information.
The embodiment of the specification provides a storage medium, a terminal device sends a model acquisition request aiming at a target service to a server, the model acquisition request comprises device performance information of the terminal device, the server acquires a neural network model matched with the device performance information from a neural network model in a pre-trained model set based on the device performance information of the terminal device, the neural network model in the model set is a super-network model obtained by performing model training based on a first pre-acquired training sample, a plurality of times of sampling processing are performed on the super-network model to obtain sub-neural network models, each sub-neural network model is subjected to sub-model training of one or more of convolution kernel, network width and network depth to obtain a model, and the neural network model matched with the device performance information sent by the server is received, the terminal equipment carries out service processing on the target service based on the received neural network model, so that a better-performance model can be provided for high-end terminal equipment with excessive performance to improve the model effect, a more appropriate model is provided for low-end terminal equipment with poor efficiency to improve the success rate of service processing, and the most appropriate model architecture can be searched for each model individually based on the performance of the terminal equipment, so that thousands of models can be realized.
In addition, through training the hyper-network model, after the performance of the hyper-network model is completed, according to the performance ladder of the terminal equipment, an individualized model structure which is most suitable for the performance of the hyper-network model is extracted for each terminal equipment, the hardware capability of different terminal equipment is fully utilized, the inference failure rate of the low-performance terminal equipment model is reduced while the effect of the high-performance terminal equipment model is improved, and a better effect is achieved.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable fraud case serial-parallel apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable fraud case serial-parallel apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable fraud case to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable fraud case serial-parallel apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (22)

1. A service processing method is applied to terminal equipment, and the method comprises the following steps:
sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of the terminal equipment;
receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model;
and performing service processing on the target service based on the received neural network model.
2. The method of claim 1, the neural network model being a convolutional neural network model.
3. A service processing method is applied to a server, and the method comprises the following steps:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
4. The method of claim 3, further comprising:
constructing a model architecture of the super network model, wherein the model architecture comprises a convolution kernel which is larger than a preset convolution kernel threshold value, based on a preset neural network algorithm;
obtaining a first training sample for training the super network model, and performing model training on the super network model through the first training sample to obtain a trained super network model;
sampling the trained hyper-network model to obtain one or more different sub-neural network models;
performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model based on the trained hyper-network model and the first training sample to obtain a trained sub-neural network model;
the method comprises the steps of obtaining equipment performance information of a plurality of different terminal devices, and determining the corresponding relation between the equipment performance information and a sub-neural network model based on the equipment performance information and the sub-neural network model.
5. The method of claim 4, wherein the sub-model training of one or more of a convolution kernel, a network width, and a network depth for each of the sub-neural network models based on the trained hyper-network model and the first training sample to obtain the trained sub-neural network models comprises:
respectively generating a specified convolution kernel for each sub-neural network model based on a parameter sharing rule, and fixing the network width and the network depth of each sub-neural network model;
the trained super-network model is used for guiding a sub-neural network model generating a convolution kernel to carry out model training, knowledge distillation training is carried out on the sub-neural network model generating the convolution kernel based on the first training sample, and the trained sub-neural network model is obtained;
and carrying out backward propagation on the trained sub-neural network model, determining the gradient of the model parameter corresponding to the trained sub-neural network model, and carrying out gradient descent processing on the gradient of the model parameter to obtain the processed sub-neural network model.
6. The method of claim 5, wherein the sub-model training of one or more of a convolution kernel, a network width, and a network depth for each of the sub-neural network models based on the trained hyper-network model and the first training sample to obtain the trained sub-neural network models comprises:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, initializing a width parameter corresponding to the network width of the sub-neural network model generating the convolution kernel, and fixing a depth parameter corresponding to the network depth of each sub-neural network model;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter.
7. The method of claim 6, wherein the sub-model training of one or more of a convolution kernel, a network width, and a network depth for each of the sub-neural network models based on the trained hyper-network model and the first training sample to obtain the trained sub-neural network models comprises:
respectively generating a designated convolution kernel for each sub-neural network model based on a parameter sharing rule, and respectively initializing a width parameter corresponding to the network width and a depth parameter corresponding to the network depth of the sub-neural network model generating the convolution kernels;
and performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a mode of guiding the initialized sub-neural network model to perform model training by the trained hyper-network model to obtain the trained sub-neural network model, and determining the parameter value of the width parameter and the parameter value of the depth parameter.
8. The method of claim 7, the generating a specified convolution kernel for each of the sub-neural network models based on a parameter sharing rule, respectively, comprising:
and generating a specified convolution kernel of each sub-neural network model through linear affine transformation and a Sigmoid activation function based on the convolution kernel of the super-network model corresponding to each sub-neural network model.
9. The method of claim 7, wherein the sub-neural network model comprises a Target Dropout network layer, and the performing knowledge distillation training on the initialized sub-neural network model based on the first training sample in a manner that the trained hyper-network model guides the initialized sub-neural network model to perform model training comprises:
and guiding the initialized sub-neural network model to carry out model training by using the trained hyper-network model, determining the importance of the width parameter through the Target Dropout network layer, carrying out knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the width parameter with different importance.
10. The method of claim 7, further comprising:
adding a preset number of hidden network layers into the sub-neural network model;
the method for conducting model training on the initialized sub-neural network model by guiding the trained hyper-network model comprises the following steps of conducting knowledge distillation training on the initialized sub-neural network model based on the first training sample to obtain the trained sub-neural network model, and determining parameter values of the depth parameter, wherein the method comprises the following steps:
and guiding the sub-neural network model with the hidden network layer to carry out model training by using the trained hyper-network model, carrying out knowledge distillation training on the sub-neural network model with the hidden network layer on the basis of the first training sample to obtain the trained sub-neural network model, and determining the parameter value of the depth parameter.
11. A service processing method is applied to a block chain system, and the method comprises the following steps:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, wherein the intelligent contract is used for matching corresponding neural network models for different equipment performance information;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
12. The method of claim 11, wherein the obtaining a neural network model matching the device performance information from a neural network model in a pre-trained model set based on the pre-deployed intelligent contracts in the blockchain system and the device performance information of the terminal device comprises:
performing the following processing based on the intelligent contract:
acquiring the corresponding relation between the equipment performance information and the identification of the neural network model from the block chain system;
searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a specified storage device based on the acquired index information.
13. The method of claim 11, wherein the obtaining a neural network model matching the device performance information from a neural network model in a pre-trained model set based on the pre-deployed intelligent contracts in the blockchain system and the device performance information of the terminal device comprises:
performing the following processing based on the intelligent contract:
acquiring first index information of a corresponding relation between equipment performance information and an identifier of a neural network model from the block chain system;
acquiring a corresponding relation between the equipment performance information and the identification of the neural network model from a first storage device based on the first index information, and searching the identification of the neural network model corresponding to the equipment performance information of the terminal equipment from the corresponding relation;
and acquiring second index information of the neural network model corresponding to the identifier of the searched neural network model from the block chain system based on the identifier of the searched neural network model, and acquiring the neural network model corresponding to the searched identifier from a pre-trained model set stored in a second storage device based on the second index information.
14. A traffic processing apparatus, the apparatus comprising:
the request module is used for sending a model acquisition request aiming at the target service to a server, wherein the model acquisition request comprises equipment performance information of the device;
the model receiving module is used for receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model is obtained, and each sub-neural network model is subjected to sub-model training of one or more processing of a convolution kernel, network width and network depth to obtain a model;
and the business processing module is used for carrying out business processing on the target business based on the received neural network model.
15. A traffic processing apparatus, the apparatus comprising:
the system comprises a request receiving module, a service processing module and a service processing module, wherein the request receiving module is used for receiving a model acquisition request aiming at a target service, which is sent by terminal equipment, and the model acquisition request comprises equipment performance information of the terminal equipment;
the model acquisition module is used for acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, a sub-neural network model is obtained after performing multiple sampling processing on the super-network model, and a model obtained by performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model is obtained;
and the model providing module is used for providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
16. A traffic processing apparatus, the apparatus being an apparatus in a blockchain system, the apparatus comprising:
the system comprises a request receiving module, a service processing module and a service processing module, wherein the request receiving module is used for receiving a model acquisition request aiming at a target service, which is sent by terminal equipment, and the model acquisition request comprises equipment performance information of the terminal equipment;
the information processing module is used for acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample pre-acquired, a plurality of times of sampling processing is performed on the super-network model to obtain sub-neural network models, each sub-neural network model is subjected to sub-model training of one or more of convolution kernel, network width and network depth to obtain a model, and the intelligent contract is used for matching different equipment performance information with the corresponding neural network model;
and the information providing module is used for providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
17. A traffic processing device, the traffic processing device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of the equipment;
receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model;
and performing service processing on the target service based on the received neural network model.
18. A traffic processing device, the traffic processing device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
19. A traffic processing apparatus, the apparatus being an apparatus in a blockchain system, the apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in the block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, wherein the intelligent contract is used for matching corresponding neural network models for different equipment performance information;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
20. A storage medium for storing computer-executable instructions, which when executed implement the following:
sending a model acquisition request aiming at a target service to a server, wherein the model acquisition request comprises equipment performance information of terminal equipment;
receiving a neural network model which is sent by the server and matched with the equipment performance information, wherein the neural network model is a super-network model obtained by the server through model training based on a first training sample obtained in advance, a sub-neural network model obtained by carrying out multiple sampling processing on the super-network model, and a model obtained by carrying out sub-model training of one or more processing of convolution kernel, network width and network depth on each sub-neural network model;
and performing service processing on the target service based on the received neural network model.
21. A storage medium for storing computer-executable instructions, which when executed implement the following:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
22. A storage medium for storing computer-executable instructions, which when executed implement the following:
receiving a model acquisition request aiming at a target service, which is sent by a terminal device, wherein the model acquisition request comprises device performance information of the terminal device;
acquiring a neural network model matched with the equipment performance information from a neural network model in a pre-trained model set based on an intelligent contract pre-deployed in a block chain system and the equipment performance information of the terminal equipment, wherein the neural network model in the model set is a super-network model obtained by performing model training based on a first training sample acquired in advance, performing multiple sampling processing on the super-network model to obtain sub-neural network models, and performing sub-model training of one or more of a convolution kernel, a network width and a network depth on each sub-neural network model to obtain a model, wherein the intelligent contract is used for matching corresponding neural network models for different equipment performance information;
and providing the neural network model matched with the equipment performance information to the terminal equipment so that the terminal equipment performs service processing on the target service based on the neural network model matched with the equipment performance information.
CN202110802699.3A 2021-07-15 2021-07-15 Service processing method, device and equipment Active CN113435585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110802699.3A CN113435585B (en) 2021-07-15 2021-07-15 Service processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110802699.3A CN113435585B (en) 2021-07-15 2021-07-15 Service processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN113435585A true CN113435585A (en) 2021-09-24
CN113435585B CN113435585B (en) 2023-03-10

Family

ID=77760626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110802699.3A Active CN113435585B (en) 2021-07-15 2021-07-15 Service processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113435585B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849314A (en) * 2021-09-30 2021-12-28 支付宝(杭州)信息技术有限公司 Data processing model deployment method and device
CN115905624A (en) * 2022-10-18 2023-04-04 支付宝(杭州)信息技术有限公司 Method, device and equipment for determining user behavior state
WO2023066288A1 (en) * 2021-10-21 2023-04-27 维沃移动通信有限公司 Model request method, model request processing method and related device
WO2023217026A1 (en) * 2022-05-13 2023-11-16 维沃移动通信有限公司 Service processing method, and device and readable storage medium
WO2024120409A1 (en) * 2022-12-07 2024-06-13 维沃移动通信有限公司 Ai network model determination method and apparatus, information transmission method and apparatus, and communication device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190130257A1 (en) * 2017-10-27 2019-05-02 Sentient Technologies (Barbados) Limited Beyond Shared Hierarchies: Deep Multitask Learning Through Soft Layer Ordering
CN110163367A (en) * 2018-09-29 2019-08-23 腾讯科技(深圳)有限公司 A kind of model compression method and apparatus
CN110288084A (en) * 2019-06-06 2019-09-27 北京小米智能科技有限公司 Super-network training method and device
CN111028226A (en) * 2019-12-16 2020-04-17 北京百度网讯科技有限公司 Method and device for algorithm transplantation
CN111079899A (en) * 2019-12-05 2020-04-28 中国电子科技集团公司信息科学研究院 Neural network model compression method, system, device and medium
CN111368993A (en) * 2020-02-12 2020-07-03 华为技术有限公司 Data processing method and related equipment
CN111582453A (en) * 2020-05-09 2020-08-25 北京百度网讯科技有限公司 Method and device for generating neural network model
CN111652351A (en) * 2020-05-09 2020-09-11 济南浪潮高新科技投资发展有限公司 Deployment method, device and medium of neural network model
CN111680600A (en) * 2020-05-29 2020-09-18 北京百度网讯科技有限公司 Face recognition model processing method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190130257A1 (en) * 2017-10-27 2019-05-02 Sentient Technologies (Barbados) Limited Beyond Shared Hierarchies: Deep Multitask Learning Through Soft Layer Ordering
CN110163367A (en) * 2018-09-29 2019-08-23 腾讯科技(深圳)有限公司 A kind of model compression method and apparatus
CN110288084A (en) * 2019-06-06 2019-09-27 北京小米智能科技有限公司 Super-network training method and device
CN111079899A (en) * 2019-12-05 2020-04-28 中国电子科技集团公司信息科学研究院 Neural network model compression method, system, device and medium
CN111028226A (en) * 2019-12-16 2020-04-17 北京百度网讯科技有限公司 Method and device for algorithm transplantation
CN111368993A (en) * 2020-02-12 2020-07-03 华为技术有限公司 Data processing method and related equipment
CN111582453A (en) * 2020-05-09 2020-08-25 北京百度网讯科技有限公司 Method and device for generating neural network model
CN111652351A (en) * 2020-05-09 2020-09-11 济南浪潮高新科技投资发展有限公司 Deployment method, device and medium of neural network model
CN111680600A (en) * 2020-05-29 2020-09-18 北京百度网讯科技有限公司 Face recognition model processing method, device, equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849314A (en) * 2021-09-30 2021-12-28 支付宝(杭州)信息技术有限公司 Data processing model deployment method and device
CN113849314B (en) * 2021-09-30 2024-07-09 支付宝(杭州)信息技术有限公司 Data processing model deployment method and device
WO2023066288A1 (en) * 2021-10-21 2023-04-27 维沃移动通信有限公司 Model request method, model request processing method and related device
WO2023217026A1 (en) * 2022-05-13 2023-11-16 维沃移动通信有限公司 Service processing method, and device and readable storage medium
CN115905624A (en) * 2022-10-18 2023-04-04 支付宝(杭州)信息技术有限公司 Method, device and equipment for determining user behavior state
WO2024120409A1 (en) * 2022-12-07 2024-06-13 维沃移动通信有限公司 Ai network model determination method and apparatus, information transmission method and apparatus, and communication device

Also Published As

Publication number Publication date
CN113435585B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN113435585B (en) Service processing method, device and equipment
Ando et al. Deep over-sampling framework for classifying imbalanced data
CN110348462B (en) Image feature determination and visual question and answer method, device, equipment and medium
WO2023284511A1 (en) Privacy protection-based graphical model training method and apparatus, and device
CN111325444B (en) Risk prevention and control decision method, device, system and equipment
CN109214193B (en) Data encryption and machine learning model training method and device and electronic equipment
CN110674188A (en) Feature extraction method, device and equipment
CN111241353B (en) Partitioning method, device and equipment for graph data
CN114549913B (en) Semantic segmentation method and device, computer equipment and storage medium
CN114429222A (en) Model training method, device and equipment
CN114819614A (en) Data processing method, device, system and equipment
CN111709415A (en) Target detection method, target detection device, computer equipment and storage medium
CN110705622A (en) Decision-making method and system and electronic equipment
CN113343295A (en) Image processing method, device, equipment and storage medium based on privacy protection
CN116308738B (en) Model training method, business wind control method and device
CN116720214A (en) Model training method and device for privacy protection
CN113992429B (en) Event processing method, device and equipment
CN115204395A (en) Data processing method, device and equipment
US20240104375A1 (en) Method and system for lightweighting artificial neural network model, and non-transitory computer-readable recording medium
CN115543945A (en) Model compression method and device, storage medium and electronic equipment
CN113221717B (en) Model construction method, device and equipment based on privacy protection
CN115115835A (en) Image semantic segmentation method, device, equipment, storage medium and program product
KR102582079B1 (en) Matrix index information generation metohd, matrix process method and device using matrix index information
CN111539520A (en) Method and device for enhancing robustness of deep learning model
CN111882416A (en) Training method and related device of risk prediction model

Legal Events

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