A business processing method, device and equipment

By obtaining the function type and resource value of the target service and selecting the optimal network model and combination file, the problem of low service processing efficiency in the existing technology is solved, and the service processing with optimal resource optimization and optimal effect is achieved.

CN112529078BActive Publication Date: 2024-11-29HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011439364.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-07
Publication Date
2024-11-29
Estimated Expiration
2040-12-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively implement various types of business processing, such as face detection and vehicle detection, and there is a lack of reasonable implementation methods.

Method used

By obtaining multiple function types corresponding to the target service, determine the target resource values ​​of each function type, and select the optimal target network model from the initial network model based on these resource values, generate a model file, combine it into a target file and send it to Edge device.

Benefits of technology

It realizes the automatic selection of the optimal target network model based on available resources, ensuring full utilization of resources while achieving optimal model effect, and reducing user technical background requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112529078B_ABST
    Figure CN112529078B_ABST
Patent Text Reader

Abstract

The present application provides a business processing method, device and equipment, the method comprising: obtaining multiple function types corresponding to the target business; for each function type, determining the target resource value corresponding to the function type, and selecting a target network model from at least one initial network model corresponding to the function type based on the target resource value; generating a model file corresponding to the function type, the model file may include the target network model; obtaining a target file corresponding to the target business based on the model files corresponding to the multiple function types; sending the target file to an edge device, so that the edge device performs business processing on the data to be processed based on the target file, and obtains a business processing result matching the target business. Through the technical solution of the present application, the optimal target network model can be automatically selected according to the available resources, ensuring that resources are fully utilized while achieving the optimal model effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a business processing method, device and equipment. Background Art

[0002] Machine learning is a way to achieve artificial intelligence. It is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. Machine learning is used to study how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning pays more attention to algorithm design, enabling computers to automatically learn patterns from data and use the patterns to predict unknown data.

[0003] Machine learning has been widely used, such as data mining, computer vision, natural language processing, biometric recognition, search engines, medical diagnosis, detection of credit card fraud, securities market analysis, DNA sequencing, speech and handwriting recognition, strategic games and robotics applications, etc.

[0004] Although machine learning technology has been widely used, there is currently no reasonable way to use machine learning technology to implement various types of business processing, such as face detection, vehicle detection, etc. Summary of the invention

[0005] The present application provides a service processing method, the method comprising:

[0006] Acquire multiple function types corresponding to the target business;

[0007] For each function type, determine a target resource value corresponding to the function type, and select a target network model from at least one initial network model corresponding to the function type based on the target resource value; generate a model file corresponding to the function type, the model file including the target network model;

[0008] Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types;

[0009] The target file is sent to the edge device.

[0010] Exemplarily, the determining the target resource value corresponding to the function type includes:

[0011] Based on the total resource value provided by the edge device for the target service and the total quantity of the multiple function types, a target resource value corresponding to the function type is determined.

[0012] In a possible implementation, the selecting a target network model from at least one initial network model corresponding to the function type based on the target resource value includes:

[0013] If there is a resource consumption value matching the target resource value among the resource consumption values ​​of all the initial network models, the initial network model corresponding to the resource consumption value is selected as the target network model; or,

[0014] Based on the resource consumption values ​​and detection accuracy rates of all initial network models and the target resource value, if it is determined that a first candidate model exists, the first candidate model is selected as the target network model; if it is determined that the first candidate model does not exist and a second candidate model exists, the second candidate model is selected as the target network model; if it is determined that the second candidate model does not exist and a third candidate model exists, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model; wherein, the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy rate of the first candidate model is greater than a preset threshold; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy rate of the second candidate model is greater than the preset threshold; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy rate of the third candidate model is greater than the preset threshold.

[0015] Exemplarily, before selecting a target network model from at least one initial network model corresponding to the functional type based on the target resource value, it also includes: obtaining at least one initial network model corresponding to the functional type; wherein different initial network models have different model structures, and / or different initial network models have different parameter accuracies; determining the resource consumption value and detection accuracy corresponding to each initial network model; recording each initial network model corresponding to the functional type in a model library, and recording the resource consumption value and detection accuracy corresponding to each initial network model in the model library.

[0016] Exemplarily, the determining the resource consumption value and the detection accuracy corresponding to each initial network model includes: for each initial network model, deploying the initial network model on a verification device;

[0017] Inputting the test data into the initial network model so that the initial network model detects the test data to obtain a predicted category of the test data; determining the detection accuracy of the initial network model based on the predicted category of the test data and the actual category of the test data;

[0018] Obtain a resource consumption value when the verification device runs the initial network model.

[0019] Exemplarily, the method of obtaining the target file corresponding to the target business based on the model files corresponding to the multiple function types includes: determining the input-output relationship of the multiple model files corresponding to the multiple function types based on the input-output relationship of the multiple function types; and combining the multiple model files into the target file corresponding to the target business based on the input-output relationship of the multiple model files.

[0020] In a possible implementation, for each model file in the target file, the input data of the model file is processed by the model file to obtain the output data of the model file; based on the input-output relationship of the multiple model files, the input data of the model file is received from the previous model file that has an input relationship with the model file, and the output data of the model file is sent to the next model file that has an output relationship with the model file.

[0021] In a possible implementation manner, the target file includes an alarm strategy corresponding to the model file, and the alarm strategy is used to indicate a trigger condition for outputting data;

[0022] After obtaining the output data of the model file, the detection result corresponding to the output data is determined through the model file; if the detection result matches the alarm strategy, the output data of the model file is sent to the next model file having an output relationship with the model file.

[0023] The present application provides a service processing device, the device comprising:

[0024] An acquisition module, used to acquire multiple function types corresponding to the target business;

[0025] A determination module, used for determining, for each function type, a target resource value corresponding to the function type;

[0026] A selection module, configured to select a target network model from at least one initial network model corresponding to the function type based on the target resource value corresponding to the function type, and generate a model file corresponding to the function type; wherein the model file at least includes the target network model;

[0027] The acquisition module is further used to acquire a target file corresponding to the target business based on the multiple model files corresponding to the multiple function types, wherein the target file includes the multiple model files;

[0028] The sending module is used to send the target file to the edge device.

[0029] The present application provides a business processing device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;

[0030] The processor is used to execute machine executable instructions to implement the following steps:

[0031] Acquire multiple function types corresponding to the target business;

[0032] For each function type, determine a target resource value corresponding to the function type, and select a target network model from at least one initial network model corresponding to the function type based on the target resource value; generate a model file corresponding to the function type, the model file including the target network model;

[0033] Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types;

[0034] The target file is sent to the edge device.

[0035] As can be seen from the above technical solutions, in the embodiment of the present application, for each function type corresponding to the target business, a target network model can be selected based on the target resource value corresponding to the function type, and a model file including the target network model can be generated, thereby automatically selecting the optimal target network model according to the available resources, ensuring full utilization of resources while achieving the optimal model effect. The user only needs to decompose the target business and input multiple function types corresponding to the target business, which requires a low technical background of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0037] Figure 1 It is a flowchart of a business processing method in one embodiment of the present application;

[0038] Figure 2 is a schematic diagram of the structure of an automatic arrangement system in one embodiment of the present application;

[0039] Figure 3A-3D is a schematic diagram of generating a target file in one embodiment of the present application;

[0040] Figure 4is a schematic diagram of the structure of a business processing device in one embodiment of the present application;

[0041] Figure 5 It is a hardware structure diagram of a business processing device in one embodiment of the present application. DETAILED DESCRIPTION

[0042] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0043] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".

[0044] Before introducing the technical solution of the present application, concepts related to the embodiments of the present application are first introduced.

[0045] Machine learning: Machine learning is a way to achieve artificial intelligence. It is used to study how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Deep learning is a subcategory of machine learning. It is a process of using mathematical models to model specific problems in the real world to solve similar problems in the field. Neural networks are an implementation of deep learning. For the convenience of description, this article takes neural networks as an example to introduce the structure and function of neural networks. For other subcategories of machine learning, the structure and function are similar to those of neural networks.

[0046] Neural network: Neural networks include but are not limited to convolutional neural networks (CNN), recurrent neural networks (RNN), fully connected networks, etc. The structural units of neural networks include but are not limited to convolutional layers (Conv), pooling layers (Pool), excitation layers, fully connected layers (FC), etc., and there is no restriction on this.

[0047] In practical applications, one or more convolutional layers, one or more pooling layers, one or more excitation layers, and one or more fully connected layers can be combined to construct a neural network according to different needs.

[0048] In the convolution layer, the input data features are enhanced by using a convolution kernel to perform a convolution operation on the input data features. The convolution kernel can be a matrix of size m*n. The input data features of the convolution layer are convolved with the convolution kernel to obtain the output data features of the convolution layer. The convolution operation is actually a filtering process.

[0049] In the pooling layer, by taking the maximum value, minimum value, and average value of the input data features (such as the output of the convolutional layer), the principle of local correlation is used to sub-sample the input data features, reduce the processing amount, and maintain feature invariance. The pooling layer operation is actually a downsampling process.

[0050] In the excitation layer, activation functions (such as nonlinear functions) can be used to map the input data features, thereby introducing nonlinear factors, so that the neural network can enhance its expressive ability through nonlinear combinations.

[0051] The activation function may include but is not limited to a ReLU (Rectified Linear Units) function, which is used to set features less than 0 to 0, while features greater than 0 remain unchanged.

[0052] In the fully connected layer, all data features input to this fully connected layer are fully connected to obtain a feature vector, which may include multiple data features.

[0053] Network model: A network model is a machine learning network model used to implement a certain function. A machine learning network model may include a deep learning network model or other types of network models. For a deep learning network model, a neural network model may be included. Of course, the above are just a few examples of network models, and there is no limitation to this. All network models that can implement machine learning are within the scope of protection of this application.

[0054] The input data can be provided to the network model, which will perform artificial intelligence processing on the input data to obtain the processing results, and the processing results will be provided to the next network model as output data.

[0055] The technical solution of the embodiments of the present application is described below in conjunction with specific embodiments.

[0056] In the present application, a business processing method is proposed. Figure 1 FIG. 1 is a flow chart of a service processing method, which can be applied to any device. The method may include:

[0057] Step 101: Acquire multiple function types corresponding to the target business.

[0058] Exemplarily, the business to be implemented may be referred to as a target business, such as face detection, human body detection, vehicle detection, etc., and the type of the target business is not limited. For the target business, the target business may be divided into multiple functions, and the function types of the multiple functions corresponding to the target business may be obtained, for example, the user inputs the function types of the multiple functions corresponding to the target business.

[0059] For example, assuming that the target business is face detection and gender detection business, the target business can be divided into video decoding function, image scaling function, face detection function, image cutout function, and gender classification function. Each function of the target business corresponds to a function type, such as the function type of the video decoding function is decoding, the function type of the image scaling function is scaling, the function type of the face detection function is face detection, the function type of the image cutout function is cutout, and the function type of the gender classification function is gender classification.

[0060] Step 102: for each function type, determine the target resource value corresponding to the function type.

[0061] In a possible implementation, the target resource value corresponding to the function type may be determined based on the total resource value provided by the edge device for the target service and the total quantity of multiple function types.

[0062] Exemplarily, the edge device is a device that executes the target business, and the total resource value provided by the edge device for the target business can be obtained, that is, the resource value that the edge device can provide when executing the target business. For example, if the edge device only executes one target business, then N% of the total value of all resources of the edge device is used as the total resource value provided by the edge device for the target business, such as 80%, 90%, 95%, etc. If the edge device executes at least two (taking M as an example) target services, then N% of the total value of all resources of the edge device is divided by M as the total resource value provided by the edge device for the target business, such as 80% divided by M, 90% divided by M, 95% divided by M, etc. Of course, the above are just a few examples of the total resource value, and there is no limitation on this total resource value. For the convenience of description, the total resource value provided by the edge device for the target business is taken as K as an example.

[0063] For each function type, the target resource value corresponding to the function type can be determined based on the total resource value K provided by the edge device for the target business and the total number of all function types. For example, when the total number of all function types is P, the target resource value corresponding to each function type can be K / P.

[0064] In the above embodiment, the resources used by the edge device when executing the target business may include but are not limited to at least one of the following: memory resources, CPU (Central Processing Unit) resources, time-consuming resources, bandwidth resources, etc. For the convenience of description, the memory resources are used as an example in the following description.

[0065] For example, the edge device has 100M memory resources, that is, the total value of all the above resources is 100M. Assuming N is 80% and M is 1, the total resource value K provided by the edge device for the target business is 80M. Assuming the total number of all function types P is 4, the target resource value corresponding to each function type is 20M.

[0066] Of course, the above method is only an example of determining the target resource value, and there is no limitation on this, as long as the sum of the target resource values ​​corresponding to all function types is not greater than the total resource value K. For example, the target resource value corresponding to function type 1 is 20M, the target resource value corresponding to function type 2 is 20M, the target resource value corresponding to function type 3 is 25M, and the target resource value corresponding to function type 4 is 15M.

[0067] Step 103: for each function type, a target network model is selected from at least one initial network model corresponding to the function type based on a target resource value corresponding to the function type.

[0068] Exemplarily, for each function type, the function type may correspond to at least one initial network model, and an initial network model may be selected from the initial network models as the target network model of the function type. For example, the target network model may be selected in the following manner:

[0069] Mode 1: If there is a resource consumption value matching the target resource value among the resource consumption values ​​of all initial network models, the initial network model corresponding to the resource consumption value is selected as the target network model.

[0070] Exemplarily, for each initial network model corresponding to the function type, the initial network model may correspond to a resource consumption value, indicating that resources matching the resource consumption value need to be consumed when executing the initial network model. For example, if the resource consumption value corresponding to an initial network model is 20M memory resources, it means that the edge device needs to consume 20M memory resources when executing the initial network model.

[0071] Based on the resource consumption value of each initial network model corresponding to the function type and the target resource value corresponding to the function type, the initial network model corresponding to the resource consumption value matching the target resource value can be selected as the target network model. For example, if the target resource value is 20M memory resources, the resource consumption value of the initial network model a1 is 15M, the resource consumption value of the initial network model a2 is 20M, and the resource consumption value of the initial network model a3 is 25M. Since the resource consumption value of the initial network model a2 matches the target resource value (i.e., the two are the same), the initial network model a2 is selected as the target network model.

[0072] Method 2: Based on the resource consumption values ​​and detection accuracy of all initial network models and the target resource value, if it is determined that the first candidate model exists, the first candidate model is selected as the target network model; if it is determined that the first candidate model does not exist and the second candidate model exists, the second candidate model is selected as the target network model; if it is determined that the second candidate model does not exist and the third candidate model exists, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model. Exemplarily, the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy of the first candidate model is greater than a preset threshold; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy of the second candidate model is greater than the preset threshold; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy of the third candidate model is greater than the preset threshold.

[0073] Exemplarily, for each initial network model corresponding to the function type, the initial network model may correspond to a resource consumption value and a detection accuracy rate, wherein the resource consumption value indicates that resources matching the resource consumption value need to be consumed when executing the initial network model, and the detection accuracy rate indicates the accuracy rate of the initial network model when detecting the input data. For example, if the detection accuracy rate corresponding to a certain initial network model is 90%, it means that the accuracy rate of the initial network model when detecting the input data is 90%. Obviously, the higher the detection accuracy rate corresponding to the initial network model, the better the detection effect of the initial network model, and the higher the reliability of the initial network model in executing the detection. When the detection accuracy rate corresponding to the initial network model is lower, the worse the detection effect of the initial network model, and the lower the reliability of the initial network model in executing the detection.

[0074] Based on the resource consumption value and detection accuracy of each initial network model corresponding to the function type, and the target resource value corresponding to the function type, the following steps can be used to select the target network model:

[0075] Step S11, determine whether there is a first candidate model, if there is a first candidate model, select the first candidate model as the target network model. Exemplarily, the resource consumption value of the first candidate model can be less than the target resource value, and the detection accuracy of the first candidate model can be greater than a preset threshold.

[0076] For example, if the target resource value is 20M memory resources, the resource consumption value of the initial network model a1 is 15M, and the detection accuracy of the initial network model a1 is 95%, and the preset threshold is 90%, then the initial network model a1 will be used as the first candidate model, and the initial network model a1 will be selected as the target network model.

[0077] For another example, if the resource consumption value of the initial network model a1 is 15M and the detection accuracy is 95%, and the resource consumption value of the initial network model a2 is 18M and the detection accuracy is 98%, then both the initial network model a1 and the initial network model a2 are selected as the first candidate models, and the initial network model a1 can be selected as the target network model, or the initial network model a2 can be selected as the target network model. Of course, if the resource consumption value of the initial network model a1 is less than the resource consumption value of the initial network model a2, the initial network model a1 can be selected as the target network model. Alternatively, if the detection accuracy of the initial network model a2 is greater than the detection accuracy of the initial network model a1, the initial network model a2 can be selected as the target network model.

[0078] In summary, when there are multiple first candidate models, the first candidate model with a small resource consumption value can be used as the target network model, or the first candidate model with a large detection accuracy can be used as the target network model.

[0079] Step S12: If the first candidate model does not exist, determine whether a second candidate model exists, and if the second candidate model exists, select the second candidate model as the target network model. Exemplarily, the resource consumption value of the second candidate model matches the target resource value (e.g., the resource consumption value of the second candidate model is the same as the target resource value), and the detection accuracy of the second candidate model is greater than a preset threshold.

[0080] For example, if the target resource value is 20M, the resource consumption value of the initial network model a1 is 20M, and the detection accuracy of the initial network model a1 is 95%, and the preset threshold is 90%, then the initial network model a1 can be used as the second candidate model, and the initial network model a1 can be selected as the target network model.

[0081] Exemplarily, when there are multiple second candidate models, the resource consumption values ​​of the multiple second candidate models are all target resource values, and therefore, the second candidate model with a high detection accuracy is used as the target network model.

[0082] Step S13: If the second candidate model does not exist, determine whether there is a third candidate model. If there is a third candidate model, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model. The resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy of the third candidate model is greater than a preset threshold.

[0083] For example, if the target resource value is 20M memory resources, the resource consumption value of the initial network model a1 is 25M, and the detection accuracy of the initial network model a1 is 95%, and the preset threshold is 90%, then the initial network model a1 is used as the third candidate model. After the initial network model a1 is used as the third candidate model, it is necessary to determine whether the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model.

[0084] The remaining resource value refers to the sum of the target resource value corresponding to the function type and the remaining target resource values ​​of other function types. For example, the total resource value K provided by the edge device for the target service is 80M, the total number P of all function types is 4, and the target resource value corresponding to each function type is 20M. When determining the target network model corresponding to function type 1, if the sum of the resource consumption values ​​of the target network models corresponding to the other three function types is 50M, the remaining target resource values ​​of other function types are 10M (i.e., 60-50), and the remaining resource value is the sum of the target resource value corresponding to function type 1 and the remaining target resource value, i.e., 30M.

[0085] If the remaining resource value is greater than or equal to the resource consumption value of the third candidate model, it is determined that the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, and the third candidate model is selected as the target network model. If the remaining resource value is less than the resource consumption value of the third candidate model, it is determined that the remaining resource value provided by the edge device for the target service does not meet the resource consumption of the third candidate model.

[0086] Exemplarily, if the remaining resource value provided by the edge device for the target business can meet the resource consumption of multiple third candidate models, any third candidate model can be selected from the multiple third candidate models as the target network model, or, the third candidate model with the smallest resource consumption value can be used as the target network model, or, the third candidate model with the highest detection accuracy can be used as the target network model.

[0087] Step S14: If there is a third candidate model, and the remaining resource value provided by the edge device for the target service does not meet the resource consumption of the third candidate model, the fourth candidate model is selected as the target network model. Exemplarily, the resource consumption value of the fourth candidate model is less than or equal to the target resource value, but the detection accuracy of the fourth candidate model is not greater than the preset threshold, that is, the candidate model with lower detection accuracy.

[0088] Exemplarily, if there are multiple fourth candidate models, any one of the multiple fourth candidate models can be selected as the target network model, or the fourth candidate model with the smallest resource consumption value can be used as the target network model, or the fourth candidate model with the highest detection accuracy can be used as the target network model. Although the detection accuracy is the highest, it is not greater than the preset threshold.

[0089] In a possible implementation, before step 103, for all supported function types, the following steps may be taken to record each initial network model corresponding to the function type, and the resource consumption value and detection accuracy corresponding to each initial network model in the model library. Based on the information in the model library, step 103 may be performed. It should be noted that all function types here, including multiple function types of the above-mentioned target business, and function types of other businesses, are all supported function types.

[0090] Step S21: Acquire at least one initial network model corresponding to the function type. Exemplarily, different initial network models have different model structures and / or different initial network models have different parameter precisions.

[0091] For example, for any functional model among all supported functional types, since an initial network model with a fixed structure cannot meet the real-time processing requirements on different edge devices, multiple initial network models can be configured for the functional model, and these initial network models can all implement the functional type.

[0092] Exemplarily, the model structures of different initial network models may be different. For example, initial network model 1 includes 10 convolutional layers, and initial network model 2 includes 100 convolutional layers. Obviously, the detection accuracy of initial network model 2 with 100 convolutional layers is greater than the detection accuracy of initial network model 1 with 10 convolutional layers, but the resource consumption value of initial network model 2 is also greater than the resource consumption value of initial network model 1.

[0093] Exemplarily, the parameter accuracy of different initial network models may be different. The parameter accuracy refers to the accuracy of the parameters in the initial network model, which may also be referred to as the accuracy of the model. There is no limitation on this accuracy.

[0094] Exemplarily, the model structures of different initial network models may be different, and the parameter precisions of different initial network models may also be different. For example, when the model structures of any two initial network models are the same, the parameter precisions of the two initial network models are different. When the model structures of any two initial network models are different, the parameter precisions of the two initial network models may be the same or different.

[0095] Step S22: Determine the resource consumption value and detection accuracy corresponding to each initial network model.

[0096] Exemplarily, for each initial network model corresponding to the functional type, the resource consumption value and detection accuracy corresponding to the initial network model can be determined. For example, for each initial network model, the initial network model is deployed on a verification device. Test data is input to the initial network model so that the initial network model detects the test data and obtains a predicted category of the test data. Then, based on the predicted category of the test data and the actual category of the test data, the detection accuracy of the initial network model is determined. And, the resource consumption value when the verification device runs the initial network model is obtained.

[0097] The test data has a corresponding actual category. For example, when the initial network model is used to implement gender classification, the actual category indicates whether the gender of the user in the test data is male or female. After the test data is input to the initial network model, the initial network model can output the predicted category of the test data, which indicates whether the gender of the user in the test data is male or female. In summary, if the predicted category is the same as the actual category, the correct value is increased by 1, and if the predicted category is different from the actual category, the error value is increased by 1.

[0098] After performing the above processing on a large amount of test data, the total number of correct values ​​and the total number of incorrect values ​​can be counted, and the quotient of the total number of correct values ​​and the total number of all values ​​(that is, the sum of the total number of correct values ​​and the total number of incorrect values) can be the detection accuracy of the initial network model.

[0099] Exemplarily, when the verification device runs the initial network model, the resource consumption value of the verification device can be counted, and the resource consumption value is the resource consumption value corresponding to the initial network model.

[0100] Step S23: Record each initial network model corresponding to the function type in the model library, and record the resource consumption value and detection accuracy corresponding to each initial network model in the model library.

[0101] As shown in Table 1, it is an example of a model library, which can record the mapping relationship between the function type, the initial network model, the resource consumption value corresponding to the initial network model, and the detection accuracy. Of course, this is just an example, and in actual applications, it is not limited to recording the mapping relationship in a table.

[0102] Table 1

[0103]

[0104] Based on the above content of the model library, if step 103 is performed for function type 1, a target network model is selected from the initial network model a1 and the initial network model a2 based on the target resource value corresponding to function type 1. When selecting the target network model, the resource consumption value and detection accuracy of the initial network model a1 and the resource consumption value and detection accuracy of the initial network model a2 may also be referred to. For specific methods, refer to the above embodiment.

[0105] Step 104: for each function type, generate a model file corresponding to the function type, the model file includes the target network model corresponding to the function model. For example, generate model file 1 corresponding to function type 1, model file 1 includes the target network model corresponding to function model 1; generate model file 2 corresponding to function type 2, model file 2 includes the target network model corresponding to function model 2, and so on.

[0106] Step 105: Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types.

[0107] In a possible implementation, the input-output relationship of multiple model files corresponding to multiple function types can be determined based on the input-output relationship of multiple function types; and the multiple model files can be combined into a target file corresponding to the target business based on the input-output relationship of the multiple model files.

[0108] For each model file in the target file, the input data of the model file is processed by the model file to obtain the output data of the model file; based on the input-output relationship of multiple model files, the input data of the model file is received from the previous model file that has an input relationship with the model file, and the output data of the model file is sent to the next model file that has an output relationship with the model file.

[0109] Exemplarily, the target file may also include an alarm strategy corresponding to the model file, wherein the alarm strategy is used to indicate the triggering conditions for outputting the data; after obtaining the output data of the model file, the detection result corresponding to the output data is determined through the model file; if the detection result matches the alarm strategy, the output data of the model file is sent to the next model file having an output relationship with the model file.

[0110] Step 106: Send the target file to the edge device, so that the edge device performs business processing on the data to be processed based on the target file to obtain a business processing result matching the target business.

[0111] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0112] As can be seen from the above technical solutions, in the embodiment of the present application, for each function type corresponding to the target business, a target network model can be selected based on the target resource value corresponding to the function type, and a model file including the target network model can be generated, thereby automatically selecting the optimal target network model according to the available resources, ensuring full utilization of resources while achieving the optimal model effect. The user only needs to decompose the target business and input multiple function types corresponding to the target business, which requires a low technical background of the user.

[0113] The above technical solutions of the embodiments of the present application are described below in combination with specific application scenarios.

[0114] In an embodiment of the present application, an automatic orchestration system for a target business is proposed, which can automatically generate a target file matching the target business. The target file may include multiple model files, which can realize deep learning functions, model processing functions, business logic processing functions, etc., including but not limited to: detection, classification, detection + classification, image comparison, behavior analysis, segmentation, character recognition, tracking, target statistics, target alarm, OCR (Optical Character Recognition, optical character recognition) and other functions.

[0115] For users who have no algorithm foundation, they can decompose the target business according to the functions required by the project (i.e., target business), input multiple function types of the target business, and input the input-output relationship of multiple function types. There is no need to understand the relationship between the internal algorithm modules, and the user's technical background requirements are relatively low.

[0116] See also Figure 2 As shown, the automatic orchestration system may include a model training platform, an orchestration simulation verification platform, a task configuration platform, edge devices, etc. The processing process of these devices is described below.

[0117] Model training platform: The model training platform can maintain a model library, in which each initial network model corresponding to the functional type, and the resource consumption value and detection accuracy corresponding to each initial network model are recorded.

[0118] For example, due to differences in the functions of each target business involved in the orchestration, the processing resolution of each function and other factors, each function cannot use a fixed-structure model to meet the real-time processing requirements of all orchestration schemes on different devices, and the initial network model cannot be automatically tailored to the required structure according to resource requirements. Therefore, several different initial network models can be preset for each function in the model training platform, and the resource consumption (memory, time consumption, bandwidth) of these initial network models is different.

[0119] In summary, for each function type, multiple initial network models can be configured for the function type on the model training platform, and each initial network model has corresponding resource consumption values ​​and detection accuracy.

[0120] Orchestration simulation verification platform: For each initial network model, the model training platform deploys the initial network model on the orchestration simulation verification platform. The orchestration simulation verification platform obtains test data, determines the detection accuracy of the initial network model based on the test data, and counts the resource consumption value when running the initial network model. The orchestration simulation verification platform sends the resource consumption value and detection accuracy corresponding to the initial network model to the model training platform, and the model training platform records the resource consumption value and detection accuracy corresponding to the initial network model.

[0121] Model training platform: The user inputs multiple function types corresponding to the target business into the model training platform. For each function type, the model training platform determines the target resource value corresponding to the function type, and based on the target resource value corresponding to the function type, the resource consumption value and detection accuracy of each initial network model corresponding to the function type, selects the target network model corresponding to the function type from all the initial network models corresponding to the function type. For the specific method, please refer to the above embodiment and will not be repeated here.

[0122] Exemplarily, the model training platform has the ability to automatically select the optimal network model. It can automatically select the optimal target network model based on the available resources of the edge device, ensuring that resources are fully utilized while achieving the optimal model effect, and maximizing resource utilization while meeting the processing frame rate requirements.

[0123] When selecting the optimal target network model, you can use the dynamic programming algorithm to optimize the model. The constraints and optimization goals are as follows. Optimization goal: maximize the use of resources, such as memory, time consumption, bandwidth and other resources. Constraints: number of functions, resource consumption of different initial network models, resource consumption of algorithms other than different initial network models. Output result: the optimal network model of the function, that is, the target network model.

[0124] Task configuration platform: After obtaining multiple target network models corresponding to multiple functional types of the target business, the model training platform outputs these target network models to the task configuration platform. The user outputs the input-output relationship of multiple functional types to the task configuration platform. The user inputs the alarm strategy corresponding to each functional type to the task configuration platform. In summary, the task configuration platform can obtain the target network model corresponding to the functional type, the input-output relationship of multiple functional types, and the alarm strategy corresponding to the functional type.

[0125] For each function type of the target service, the task configuration platform may generate a model file corresponding to the function type, and the model file may include a target network model corresponding to the function model.

[0126] Exemplarily, a user inputs an orchestration scheme to a task configuration platform, where the orchestration scheme includes input-output relationships of multiple function types. For example, a target business corresponds to function type 1, function type 2, and function type 3. The processing procedures of the target business are as follows: for a video image, the video image is processed by function type 1, and then the processed data of function type 1 is processed by function type 2, and the processed data of function type 2 is processed by function type 3. Then, the input-output relationships of the multiple function types are: the output relationship of function type 1 is function type 2, the input relationship of function type 2 is function type 1, the output relationship of function type 2 is function type 3, and the input relationship of function type 3 is function type 2.

[0127] Of course, the above is an example of a sequential execution relationship. In actual applications, the input-output relationship of multiple function types may also include a judgment execution relationship and a loop execution relationship, etc., and there is no limitation on this.

[0128] Exemplarily, the user inputs rule parameters to the task configuration platform, and the rule parameters include an alarm strategy of a function type, and the alarm strategy is used to indicate a trigger condition for outputting data. For example, the rule parameters include an alarm strategy of function type 1 and an alarm strategy of function type 3. For another example, the rule parameters include an alarm strategy of function type 1, an alarm strategy of function type 2, and an alarm strategy of function type 3.

[0129] Exemplarily, the task configuration platform can generate a target file based on the model files corresponding to multiple function types, the input-output relationships of multiple function types, and the alarm strategies of the function types by using the following steps:

[0130] Step S31: The task configuration platform determines multiple function types corresponding to the target business.

[0131] Step S32: The task configuration platform determines the input-output relationship of multiple function types.

[0132] Step S33: The task configuration platform determines the input-output relationship of the multiple model files corresponding to the multiple function types based on the input-output relationship of the multiple function types. For example, if the output relationship of function type 1 is function type 2, then the output relationship of the model file corresponding to function type 1 is the model file corresponding to function type 2; if the input relationship of function type 2 is function type 1, then the input relationship of the model file corresponding to function type 2 is the model file corresponding to function type 1; if the output relationship of function type 2 is function type 3, then the output relationship of the model file corresponding to function type 2 is the model file corresponding to function type 3, and so on.

[0133] Step S34: The task configuration platform combines the multiple model files into a target file corresponding to the target business based on the input-output relationship of the multiple model files. For example, the target file may include the multiple model files, and the multiple model files need to have an input-output relationship.

[0134] See also Figure 3A As shown, in step S31, taking three function types as an example, the task configuration platform determines that the target business corresponds to function type 1, function type 2, and function type 3. Figure 3B As shown, in step S32, the task configuration platform determines the input-output relationship of function type 1, function type 2, and function type 3. Figure 3C As shown, in step S33, the task configuration platform determines the input-output relationship of model file 1 corresponding to function type 1, model file 2 corresponding to function type 2, and model file 3 corresponding to function type 3.

[0135] On this basis, in step S34, model file 1, model file 2 and model file 3 can be combined into a target file corresponding to the target business, and the target file can also include the input-output relationship of model file 1, model file 2 and model file 3. Figure 3C shown.

[0136] In one possible implementation, see Figure 3D As shown, the task configuration platform can also use alarm strategy 1 of function type 1 as alarm strategy 1 of model file 1, alarm strategy 2 of function type 2 as alarm strategy 2 of model file 2, and alarm strategy 3 of function type 3 as alarm strategy 3 of model file 3, that is, the target file can also include the alarm strategy corresponding to each model file.

[0137] Edge device: The task configuration platform sends the target file to the edge device, and the edge device performs business processing on the data to be processed based on the target file to obtain a business processing result that matches the target business.

[0138] Exemplarily, for each model file in the target file, the input data of the model file is processed by the model file to obtain the output data of the model file. Based on the input-output relationship of multiple model files in the target file, the input data of the model file is received from the previous model file that has an input relationship with the model file. Based on the input-output relationship of multiple model files in the target file, the output data of the model file is sent to the next model file that has an output relationship with the model file.

[0139] For example, see Figure 3C As shown, the target file includes model file 1, model file 2 and model file 3. After obtaining the data to be processed (such as video images, etc.), the edge device inputs the data to be processed into model file 1, processes the data to be processed through model file 1, and obtains the output data of model file 1. Since the next model file with an output relationship with model file 1 is model file 2, the output data of model file 1 is input into model file 2. For model file 2, data is received from model file 1 with an input relationship with model file 2, and the data is processed through model file 2 to obtain the output data of model file 2. Since the next model file with an output relationship with model file 2 is model file 3, the output data of model file 2 is input into model file 3. For model file 3, data is received from model file 2 with an input relationship with model file 3, and the data is processed through model file 3 to obtain the output data of model file 3, that is, the business processing result of the target file.

[0140] Exemplarily, the target file may also include an alarm strategy corresponding to the model file, wherein the alarm strategy is used to indicate the triggering conditions for outputting the data; after obtaining the output data of the model file, the detection result corresponding to the output data is determined through the model file; if the detection result matches the alarm strategy, the output data of the model file is sent to the next model file having an output relationship with the model file.

[0141] For example, see Figure 3D As shown, the target file includes model file 1, alarm strategy 1 corresponding to model file 1, model file 2, alarm strategy 2 corresponding to model file 2, model file 3, and alarm strategy 3 corresponding to model file 3. After obtaining the data to be processed, the edge device inputs the data to be processed into model file 1, processes the data to be processed through model file 1, and obtains the output data of model file 1.

[0142] The output data of model file 1 may be a feature vector, and the detection result corresponding to the feature vector may also be determined through model file 1. For example, model file 1 is used to detect whether the pedestrian in front of the vehicle is located in a specified area. When the detection result corresponding to the feature vector is determined through model file 1, the detection result indicates whether the pedestrian in front of the vehicle is located in the specified area or not. The alarm strategy 1 corresponding to model file 1 may indicate that an alarm is generated when the vehicle is located in the specified area, and no alarm is generated when the vehicle is not located in the specified area. For another example, model file 1 is used to detect whether the vehicle crosses the line. When the detection result corresponding to the feature vector is determined through model file 1, the detection result indicates whether the vehicle crosses the line. The alarm strategy 1 corresponding to model file 1 may indicate that an alarm is generated when the vehicle crosses the line, and no alarm is generated when the vehicle does not cross the line.

[0143] To summarize, it can be determined whether the detection result of model file 1 matches alarm strategy 1. For example, if the detection result indicates that the pedestrian in front of the vehicle is in the specified area, and alarm strategy 1 indicates that an alarm is generated when the pedestrian is in the specified area, then the detection result of model file 1 matches alarm strategy 1.

[0144] When the detection result of model file 1 matches alarm strategy 1, since the next model file having an output relationship with model file 1 is model file 2, the output data of model file 1 is input to model file 2. The data is processed by model file 2 to obtain the output data of model file 2, and the detection result corresponding to the output data is determined by model file 2. If the detection result matches alarm strategy 2, the output data of model file 2 is input to model file 3, and so on.

[0145] When the detection result of model file 1 does not match alarm strategy 1, the output data of model file 1 may not be input into model file 2, and the detection result of model file 1 may be directly output, and there is no restriction on this.

[0146] It can be seen from the above technical solutions that in the embodiments of the present application, for each function type corresponding to the target business, the target network model can be selected based on the target resource value corresponding to the function type, and a model file including the target network model can be generated, thereby automatically selecting the optimal target network model according to the available resources, ensuring full utilization of resources while achieving the optimal model effect. The user only needs to decompose the target business and input multiple function types corresponding to the target business, and the technical background requirements for the user are relatively low. Moreover, the above method proposes a complete system for model training, algorithm orchestration, and task deployment for users without basic knowledge, allowing users to customize the business logic of algorithm functions according to project requirements.

[0147] Based on the same application concept as the above method, a business processing device is proposed in the embodiment of the present application, see Figure 4 As shown, it is a structural schematic diagram of the device, and the device includes: an acquisition module 41, which is used to acquire multiple function types corresponding to the target business; a determination module 42, which is used to determine, for each function type, the target resource value corresponding to the function type; a selection module 43, which is used to select a target network model from at least one initial network model corresponding to the function type based on the target resource value corresponding to the function type, and generate a model file corresponding to the function type; wherein the model file includes the target network model; the acquisition module 41 is also used to acquire the target file corresponding to the target business based on the multiple model files corresponding to the multiple function types, and the target file includes the multiple model files; a sending module 44 is used to send the target file to the edge device, so that the edge device performs business processing on the data to be processed based on the target file, and obtains a business processing result matching the target business.

[0148] In a possible implementation, the determination module 42 determines the target resource value corresponding to the function type by: determining the target resource value corresponding to the function type based on the total resource value provided by the edge device for the target business and the total number of the multiple function types.

[0149] In a possible implementation manner, the selection module 43 is specifically configured to select a target network model from at least one initial network model corresponding to the function type based on the target resource value:

[0150] If there is a resource consumption value matching the target resource value among the resource consumption values ​​of all the initial network models, the initial network model corresponding to the resource consumption value is selected as the target network model; or,

[0151] Based on the resource consumption values ​​and detection accuracy rates of all initial network models and the target resource value, if it is determined that a first candidate model exists, the first candidate model is selected as the target network model; if it is determined that the first candidate model does not exist and a second candidate model exists, the second candidate model is selected as the target network model; if it is determined that the second candidate model does not exist and a third candidate model exists, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model; wherein, the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy rate of the first candidate model is greater than a preset threshold; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy rate of the second candidate model is greater than the preset threshold; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy rate of the third candidate model is greater than the preset threshold.

[0152] In a possible implementation manner, the acquisition module 41 is further used for:

[0153] Acquire at least one initial network model corresponding to the function type; wherein different initial network models have different model structures and / or different initial network models have different parameter precisions;

[0154] Determine the resource consumption value and detection accuracy corresponding to each initial network model;

[0155] Each initial network model corresponding to the function type is recorded in the model library, and the resource consumption value and detection accuracy rate corresponding to each initial network model are recorded in the model library.

[0156] In a possible implementation manner, when the acquisition module 41 determines the resource consumption value and the detection accuracy corresponding to each initial network model, it is specifically used to:

[0157] For each initial network model, deploying the initial network model on a verification device;

[0158] Inputting the test data into the initial network model so that the initial network model detects the test data to obtain a predicted category of the test data; determining the detection accuracy of the initial network model based on the predicted category of the test data and the actual category of the test data;

[0159] Obtain a resource consumption value when the verification device runs the initial network model.

[0160] In a possible implementation manner, the acquisition module 41 acquires the target file corresponding to the target business based on the model files corresponding to the multiple function types, and is specifically used to:

[0161] Based on the input-output relationship of the multiple function types, determine the input-output relationship of the multiple model files corresponding to the multiple function types; based on the input-output relationship of the multiple model files, combine the multiple model files into a target file corresponding to the target business.

[0162] In a possible implementation, for each model file in the target file, the input data of the model file is processed by the model file to obtain the output data of the model file; based on the input-output relationship of the multiple model files, the input data of the model file is received from the previous model file that has an input relationship with the model file, and the output data of the model file is sent to the next model file that has an output relationship with the model file.

[0163] In a possible implementation manner, the target file includes an alarm strategy corresponding to the model file, and the alarm strategy is used to indicate a trigger condition for outputting data;

[0164] After obtaining the output data of the model file, the detection result corresponding to the output data is determined through the model file; if the detection result matches the alarm strategy, the output data of the model file is sent to the next model file having an output relationship with the model file.

[0165] Based on the same application concept as the above method, a business processing device is proposed in the embodiment of the present application, see Figure 5 As shown, the business processing device includes: a processor 51 and a machine-readable storage medium 52, wherein the machine-readable storage medium 52 stores machine-executable instructions that can be executed by the processor 51; the processor 51 is used to execute the machine-executable instructions to implement the following steps:

[0166] Acquire multiple function types corresponding to the target business;

[0167] For each function type, determine a target resource value corresponding to the function type, and select a target network model from at least one initial network model corresponding to the function type based on the target resource value; generate a model file corresponding to the function type, the model file including the target network model;

[0168] Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types;

[0169] The target file is sent to the edge device, so that the edge device performs business processing on the data to be processed based on the target file, and obtains a business processing result matching the target business.

[0170] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the business processing method disclosed in the above example of the present application can be implemented.

[0171] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0172] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0173] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0176] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0178] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A business processing method, characterized in that: The method comprises: Acquire multiple function types corresponding to the target business; For each function type, determine a target resource value corresponding to the function type, and select a target network model from a plurality of initial network models corresponding to the function type based on the target resource value; generate a model file corresponding to the function type, wherein the model file includes the target network model; Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types; Sending the target file to the edge device; The step of selecting a target network model from a plurality of initial network models corresponding to the function type based on the target resource value includes: Based on the resource consumption values ​​and detection accuracy rates of all initial network models and the target resource value, if it is determined that a first candidate model exists, the first candidate model is selected as the target network model; the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy rate of the first candidate model is greater than a preset threshold; If it is determined that the first candidate model does not exist and the second candidate model exists, the second candidate model is selected as the target network model; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy of the second candidate model is greater than a preset threshold; If it is determined that there is no second candidate model, and there is a third candidate model, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy of the third candidate model is greater than a preset threshold; If it is determined that there is a third candidate model, and the remaining resource value provided by the edge device for the target service does not meet the resource consumption of the third candidate model, the fourth candidate model is selected as the target network model; the resource consumption value of the fourth candidate model is less than or equal to the target resource value, and the detection accuracy of the fourth candidate model is not greater than a preset threshold; The remaining resource value provided by the edge device for the target service refers to the sum of the target resource value corresponding to the function type and the remaining target resource values ​​of other function types; Wherein, acquiring the target file corresponding to the target business based on the model files corresponding to the multiple function types includes: Based on the input-output relationship of the multiple function types, determine the input-output relationship of the multiple model files corresponding to the multiple function types; based on the input-output relationship of the multiple model files, combine the multiple model files into a target file corresponding to the target business.

2. The method according to claim 1, characterized in that: The determining of the target resource value corresponding to the function type includes: Based on the total resource value provided by the edge device for the target service and the total quantity of the multiple function types, a target resource value corresponding to the function type is determined.

3. The method according to claim 1, characterized in that The selecting a target network model from at least one initial network model corresponding to the function type based on the target resource value also includes: If there is a resource consumption value matching the target resource value among the resource consumption values ​​of all the initial network models, the initial network model corresponding to the resource consumption value is selected as the target network model.

4. The method according to claim 3, characterized in that Before selecting a target network model from a plurality of initial network models corresponding to the function type based on the target resource value, the method further includes: Acquire multiple initial network models corresponding to the function type; wherein different initial network models have different model structures and / or different initial network models have different parameter precisions; Determine the resource consumption value and detection accuracy corresponding to each initial network model; Each initial network model corresponding to the function type is recorded in the model library, and the resource consumption value and detection accuracy rate corresponding to each initial network model are recorded in the model library.

5. The method according to claim 4, characterized in that The determining of the resource consumption value and the detection accuracy corresponding to each initial network model includes: For each initial network model, deploying the initial network model on a verification device; Inputting the test data into the initial network model so that the initial network model detects the test data to obtain a predicted category of the test data; determining the detection accuracy of the initial network model based on the predicted category of the test data and the actual category of the test data; Obtain a resource consumption value when the verification device runs the initial network model.

6. The method according to claim 1, characterized in that For each model file in the target file, processing the input data of the model file through the model file to obtain the output data of the model file; Based on the input-output relationship of the multiple model files, the input data of the model file is received from the previous model file having an input relationship with the model file, and the output data of the model file is sent to the next model file having an output relationship with the model file.

7. The method according to claim 6, characterized in that The target file includes an alarm strategy corresponding to the model file, and the alarm strategy is used to indicate a trigger condition for outputting data; After obtaining the output data of the model file, the detection result corresponding to the output data is determined through the model file; if the detection result matches the alarm strategy, the output data of the model file is sent to the next model file having an output relationship with the model file.

8. A service processing device, characterized in that: The device comprises: An acquisition module, used to acquire multiple function types corresponding to the target business; A determination module, used for determining, for each function type, a target resource value corresponding to the function type; A selection module, configured to select a target network model from a plurality of initial network models corresponding to the function type based on the target resource value corresponding to the function type, and generate a model file corresponding to the function type; wherein the model file at least includes the target network model; The acquisition module is further used to acquire a target file corresponding to the target business based on the multiple model files corresponding to the multiple function types, wherein the target file includes the multiple model files; A sending module, used to send the target file to the edge device; Wherein, when the selection module selects the target network model from the multiple initial network models corresponding to the function type based on the target resource value, it is specifically used to: Based on the resource consumption values ​​and detection accuracy rates of all initial network models and the target resource value, if it is determined that a first candidate model exists, the first candidate model is selected as the target network model; the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy rate of the first candidate model is greater than a preset threshold; If it is determined that the first candidate model does not exist and the second candidate model exists, the second candidate model is selected as the target network model; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy of the second candidate model is greater than a preset threshold; If it is determined that there is no second candidate model, and there is a third candidate model, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy of the third candidate model is greater than a preset threshold; If it is determined that there is a third candidate model, and the remaining resource value provided by the edge device for the target service does not meet the resource consumption of the third candidate model, the fourth candidate model is selected as the target network model; the resource consumption value of the fourth candidate model is less than or equal to the target resource value, and the detection accuracy of the fourth candidate model is not greater than a preset threshold; The remaining resource value provided by the edge device for the target service refers to the sum of the target resource value corresponding to the function type and the remaining target resource values ​​of other function types; The acquisition module is used to acquire the target file corresponding to the target business based on the multiple model files corresponding to the multiple function types, and is specifically used to: Based on the input-output relationship of the multiple function types, determine the input-output relationship of the multiple model files corresponding to the multiple function types; based on the input-output relationship of the multiple model files, combine the multiple model files into a target file corresponding to the target business.

9. A service processing device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the following steps: Acquire multiple function types corresponding to the target business; For each function type, determine a target resource value corresponding to the function type, and select a target network model from a plurality of initial network models corresponding to the function type based on the target resource value; generate a model file corresponding to the function type, wherein the model file includes the target network model; Acquire a target file corresponding to the target business based on the model files corresponding to the multiple function types; Sending the target file to the edge device; The step of selecting a target network model from a plurality of initial network models corresponding to the function type based on the target resource value includes: Based on the resource consumption values ​​and detection accuracy rates of all initial network models and the target resource value, if it is determined that a first candidate model exists, the first candidate model is selected as the target network model; the resource consumption value of the first candidate model is less than the target resource value, and the detection accuracy rate of the first candidate model is greater than a preset threshold; If it is determined that the first candidate model does not exist and the second candidate model exists, the second candidate model is selected as the target network model; the resource consumption value of the second candidate model matches the target resource value, and the detection accuracy of the second candidate model is greater than a preset threshold; If it is determined that there is no second candidate model, and there is a third candidate model, and the remaining resource value provided by the edge device for the target service meets the resource consumption of the third candidate model, the third candidate model is selected as the target network model; the resource consumption value of the third candidate model is greater than the target resource value, and the detection accuracy of the third candidate model is greater than a preset threshold; If it is determined that there is a third candidate model, and the remaining resource value provided by the edge device for the target service does not meet the resource consumption of the third candidate model, the fourth candidate model is selected as the target network model; the resource consumption value of the fourth candidate model is less than or equal to the target resource value, and the detection accuracy of the fourth candidate model is not greater than a preset threshold; The remaining resource value provided by the edge device for the target service refers to the sum of the target resource value corresponding to the function type and the remaining target resource values ​​of other function types; Wherein, acquiring the target file corresponding to the target business based on the model files corresponding to the multiple function types includes: Based on the input-output relationship of the multiple function types, determine the input-output relationship of the multiple model files corresponding to the multiple function types; based on the input-output relationship of the multiple model files, combine the multiple model files into a target file corresponding to the target business.

Citation Information

Patent Citations

  • Learned model provision method, and learned model provision device

    CN109074607A

  • Intelligent traffic artificial intelligence open platform and method, medium and electronic equipment

    CN111695443A