Model Evolution Method, Device, Electronic Device and Machine-readable Storage Medium

By setting up multiple training modes on intelligent analysis devices, the problem of low usage of training servers is solved, efficient utilization of device resources and flexibility of model training is achieved, and the evolution efficiency and performance of the model are improved.

CN115082829BActive Publication Date: 2025-07-22HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210744551.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-07-22
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the prior art, the self-learning training method requires specific algorithm models to be deployed in the actual environment, resulting in low usage of the training server and inability to efficiently utilize device resources.

Method used

Set up a variety of training modes on the intelligent analysis device, including time-sharing multiplexing, compatibility and iterative training modes. The intelligent analysis device itself performs model training, avoids additional deployment of training servers, and uses the acquired training materials for model training and updates.

Benefits of technology

It improves the flexibility of device usage and model training, and can perform model training without affecting intelligent analysis tasks, improving the evolutionary efficiency and performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082829B_ABST
    Figure CN115082829B_ABST
Patent Text Reader

Abstract

The present application provides a model evolution method, apparatus, electronic device, and machine-readable storage medium. The method includes: determining a training mode for training a target model, where the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource amount, and / or model training trigger conditions for model training by the intelligent analysis device are different under different training modes; when it is determined that the model training conditions in the training mode are met, training the target model using the obtained training materials according to the training mode; and updating the target model based on the trained target model so that the intelligent analysis device uses the updated target model to perform intelligent analysis tasks. This method can improve the device utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of video surveillance, and in particular, to a model evolution method, apparatus, electronic device, and machine-readable storage medium. Background Art

[0002] Currently, the self-learning training method generally requires a specific algorithm model training server (hereinafter referred to as the training server) to be deployed in the actual environment to be trained. During the collection of training materials, the training server needs to be in a waiting state until enough training materials are collected and then starts model training, resulting in a very low utilization rate of the training server. Summary of the Invention

[0003] In view of this, this application provides a model evolution method, apparatus, electronic device, and machine-readable storage medium.

[0004] According to the first aspect of the embodiments of this application, a model evolution method is provided, which is applied to an intelligent analysis device. The method includes:

[0005] Determine the training mode for training the target model; wherein, the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource amount, and / or model training trigger conditions for the intelligent analysis device to perform model training are different under different training modes;

[0006] When it is determined that the model training conditions in the training mode are met, train the target model using the obtained training materials according to the training mode;

[0007] Update the target model based on the trained target model so that the intelligent analysis device can perform intelligent analysis tasks using the updated target model.

[0008] According to the second aspect of the embodiments of this application, a model evolution apparatus is provided, which is deployed in an intelligent analysis device. The apparatus includes:

[0009] A determination unit, configured to determine the training mode for training the target model; wherein, the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource amount, and / or model training trigger conditions for the intelligent analysis device to perform model training are different under different training modes;

[0010] A training unit, configured to train the target model using the obtained training materials according to the training mode when it is determined that the model training conditions in the training mode are met;

[0011] An update unit, configured to update the target model according to the trained target model, so that the intelligent analysis device performs an intelligent analysis task by using the updated target model.

[0012] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is configured to execute the machine-executable instructions to implement the method provided in the first aspect.

[0013] According to a fourth aspect of the embodiments of the present application, there is provided a machine-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect is implemented.

[0014] According to a fifth aspect of the embodiments of the present application, there is provided a computer program, which is stored in a machine-readable storage medium, and when the processor executes the computer program, the processor is caused to execute the method provided in the first aspect.

[0015] In the model evolution method of the embodiments of the present application, by using an intelligent analysis device to train a target model, there is no need to deploy a dedicated training server additionally, which improves the device utilization rate; in addition, by setting a variety of different training modes, the intelligent analysis device can train the target model in different training modes, which improves the flexibility of model training. Description of the Drawings

[0016] Figure 1 is a schematic flowchart of a model evolution method provided by an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of setting alarm defense time and model training time provided by an embodiment of the present application;

[0018] Figure 3 is a schematic flowchart of model evolution process in a time-division multiplexing mode provided by an embodiment of the present application;

[0019] Figure 4 is a schematic diagram of specification parameters of alarm detection in a compatibility mode provided by an embodiment of the present application;

[0020] Figure 5 is a schematic flowchart of model evolution iterative training provided by an embodiment of the present application;

[0021] Figure 6 is a schematic structural diagram of a model evolution device provided by an embodiment of the present application;

[0022] Figure 7It is a schematic structural diagram of another model evolution device provided by an embodiment of the present application;

[0023] Figure 8 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0024] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0025] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0026] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and make the above objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0027] Please refer to Figure 1 , which is a schematic flowchart of a model evolution method provided by an embodiment of the present application. Among them, the model evolution method can be applied to an intelligent analysis device, such as Figure 1 shown, the model evolution method may include the following steps:

[0028] It should be noted that, in the embodiments of the present application, intelligent analysis may include, but is not limited to, object detection, object classification, or object segmentation, etc. The intelligent analysis device may include, but is not limited to, a device for performing the above intelligent analysis tasks.

[0029] Step S100: Determine the training mode for training the target model; wherein, the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource amount, and / or model training trigger conditions used by the intelligent analysis device for model training are different under different training modes.

[0030] Step S110: When it is determined that the model training conditions in the training mode are met, train the target model according to the training mode by using the obtained training materials.

[0031] In the embodiments of the present application, for the evolutionary training of the algorithm model (referred to as the target algorithm model herein) used by the intelligent analysis device to perform intelligent analysis tasks, instead of deploying a dedicated training server, the training is carried out on the intelligent analysis device to improve the utilization rate of device resources.

[0032] In addition, to improve the flexibility of model training, multiple different training modes can be preset in advance. When the intelligent analysis device uses different training models to train the target model, the time, resource amount, and / or model training trigger conditions used by the intelligent analysis device for model training are different.

[0033] Correspondingly, during the operation of the intelligent analysis device, it can determine the training mode for training the target model and determine whether the model training conditions under this training model are met.

[0034] Exemplarily, when the intelligent analysis device determines that the model training conditions of the currently used training mode are met, the intelligent analysis device can train the target model using the obtained training materials according to the currently used training mode.

[0035] Step S120: Update the target model according to the trained target model so that the intelligent analysis device uses the updated target model to perform intelligent analysis tasks.

[0036] In the embodiments of the present application, when the target model is trained as described above and the trained target model is obtained, the target model can be updated according to the trained target model. Thus, the intelligent analysis device can use the updated target model to perform intelligent analysis tasks.

[0037] It can be seen that in Figure 1 the method flow shown, by using the intelligent analysis device to train the target model, there is no need to deploy an additional dedicated training server, which improves the device utilization rate; in addition, by setting multiple different training modes, the intelligent analysis device can train the target model using different training modes, which improves the flexibility of model training.

[0038] In some embodiments, the above training mode may include a time-division multiplexing training mode; in the time-division multiplexing training mode, the intelligent analysis device performs intelligent analysis tasks in the first time period and conducts model training in the second time period, and the first time period and the second time period do not overlap;

[0039] The above-mentioned reaching the model training conditions under the training mode may include:

[0040] The system time is in the second time period; or,

[0041] The system time is in the second time period, and the number of obtained training materials reaches the first quantity; or,

[0042] The system time is in the second time period, and the duration of obtaining training materials reaches the first duration; or,

[0043] The system time is in the second time period, the number of obtained training materials reaches the first quantity, and the duration of obtaining training materials reaches the first duration.

[0044] Exemplarily, considering the actual scenario, the intelligent analysis task may be executed by an embedded intelligent hardware product. For example, for perimeter protection, it is usually performed by an embedded intelligent chip in a front-end monitoring device. Usually, the computing power of an embedded intelligent hardware product is limited, and it is difficult to execute the intelligent analysis task and the model training task simultaneously.

[0045] Therefore, the intelligent analysis device can execute the intelligent analysis task and the model training task in a time-division multiplexing manner (which can be called a time-division multiplexing training mode), that is, the intelligent analysis device executes the intelligent analysis task and conducts model training at different times respectively, and the time when the intelligent analysis device executes the intelligent analysis task does not overlap with the time when the intelligent analysis device conducts model training.

[0046] Exemplarily, the time when the intelligent analysis device executes the intelligent analysis task and the time for conducting model training can be set according to actual needs.

[0047] Exemplarily, in the time-division multiplexing training mode, the intelligent analysis device can execute the intelligent analysis task in the first time period and conduct model training in the second time period, and the first time period and the second time period do not overlap.

[0048] It should be noted that the above first time period may include one or more time periods, and the above second time period may also include one or more time periods.

[0049] In addition, if the intelligent analysis device will always execute the intelligent analysis task or conduct model training during operation, in the time-division multiplexing training mode, only the time period for executing the intelligent analysis task (or the time period for conducting model training) can be set, and the remaining time period is defaulted to the time period for conducting model training (or the time period for executing the intelligent analysis task).

[0050] For example, assuming that the second time period may include 10:00 - 12:00 and 14:00 - 16:00 every day, then the first time period may include the remaining time period of each day except the second time period.

[0051] In one example, in the time-division multiplexing training mode, the intelligent analysis device can determine that the model training condition is met when the system time is in the second time period.

[0052] Exemplarily, for the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within a preset time period for model training (i.e., the second time period mentioned above).

[0053] For example, assuming that the second time period is from 10:00 to 12:00 every day, the intelligent analysis device may start model training every day when the system time reaches 10:00.

[0054] In another example, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period and the number of training materials obtained reaches the first quantity.

[0055] Exemplarily, to ensure the training effect of the evolutionary training of the model, the quantity of training materials used for training the model in the next evolutionary training process in the time-division multiplexing mode (referred to as the first quantity in this article) may be preset. Furthermore, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period and the number of training materials obtained reaches the first quantity.

[0056] In another example, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period and the duration of obtaining training materials reaches the first duration.

[0057] Exemplarily, to avoid the target model being unable to be trained for a long time and improve the model evolution efficiency, the duration of collecting training materials for triggering model training in the time-division multiplexing training mode (which can be called the first duration) may be preset. Furthermore, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period and the duration of obtaining training materials reaches the first duration.

[0058] In another example, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period, the number of training materials obtained reaches the first quantity, and the duration of obtaining training materials reaches the first duration.

[0059] Exemplarily, to ensure the training effect of the evolutionary training of the model and avoid the target model being unable to be trained for a long time and improve the model evolution efficiency, in the time-division multiplexing training mode, the intelligent analysis device may determine that the model training condition is met when the system time is within the second time period, the number of training materials obtained reaches the first quantity, and the duration of obtaining training materials reaches the first duration.

[0060] In one example, in the time-division multiplexing training mode, according to the training mode, training the target model by using the obtained training materials may include:

[0061] Training the target model by using the obtained training materials; wherein, when the system time is in the second time period, the intelligent analysis task stops executing.

[0062] Exemplarily, for the time-division multiplexing training mode, the intelligent analysis device may stop executing the intelligent analysis task when the system time is in the second time period.

[0063] When the intelligent analysis device determines that the model training condition is met, the intelligent analysis device may train the target model by using the obtained training materials.

[0064] In one example, in the time-division multiplexing training mode, according to the training mode, training the target model by using the obtained training materials may include:

[0065] Determine whether there are saved model configuration parameters; wherein, the model configuration parameters are all the configuration parameters of the target model saved by the intelligent analysis device when the system time reaches the end time of the previous second time period and the model training is not completed.

[0066] If there are saved model configuration parameters, load the saved model configuration parameters for the target model and train the target model by using the obtained training materials;

[0067] If there are no saved model configuration parameters, train the target model by using the obtained training materials;

[0068] When the system time reaches the end time of the current second time period, if the model training is not completed, save all the configuration parameters of the target model.

[0069] Exemplarily, considering that in the time-division multiplexing training mode, a complete training process may not be completed within the set model training time period (i.e., the above-mentioned second time period).

[0070] For example, assume that the second time period is set from 10:00 to 12:00 every day, but the time-consuming of a complete training process exceeds 2 hours.

[0071] Correspondingly, in order to improve the model training efficiency, during the model training process, if the model training is not completed when the preset model training end time (such as the end time of the second time period) is reached, all the configuration parameters of the current target model may be saved.

[0072] Similarly, when the preset model training time is reached (i.e., the start time of the second time period), the intelligent analysis device can first determine whether model configuration parameters are saved. If the model configuration parameters are saved, the current target model can be configured according to the saved model configuration parameters, and the target model can be trained using the obtained training materials, that is, continue to train the model from the previous training breakpoint.

[0073] If the model configuration parameters are not saved, it can be determined that a new round of model training has started. In this case, model training is performed based on the obtained training materials.

[0074] It should be noted that in the embodiments of the present application, when a certain round of model training is completed, if the model configuration parameters are currently saved, the saved model configuration parameters can be deleted so that the subsequent process can start a new round of model training again. Alternatively, a specific flag can be set for the saved model configuration parameters to prevent the intelligent analysis device from using the model configuration parameters with the specific flag set for model training.

[0075] In some embodiments, the above training mode may include a compatibility mode;

[0076] The above-mentioned reaching the model training conditions in the training mode may include:

[0077] The number of obtained training materials reaches a second number; and / or,

[0078] The continuous duration of obtaining training materials reaches a second duration.

[0079] Exemplarily, in order to accelerate model training and reduce the impact on the execution of intelligent analysis tasks, the intelligent analysis device can perform intelligent analysis tasks and model training in a compatible manner (referred to as a compatible training mode in this article), that is, during the process of the intelligent analysis device executing intelligent analysis tasks, if it is determined that the model training conditions are reached, it does not need to stop the execution of the intelligent analysis tasks and can start model training.

[0080] In one example, in the compatibility mode, the intelligent analysis device can determine that the model training conditions are reached when the number of obtained training materials reaches a second number.

[0081] Exemplarily, in order to ensure the training effect of evolutionary training of the model, the number of training materials used for training the model during the next evolutionary training process in the compatibility mode can be preset (referred to as the second number in this article). Furthermore, in the compatibility mode, the intelligent analysis device can determine that the model training conditions are reached when the number of obtained training materials reaches a second number.

[0082] In another example, in compatibility mode, the intelligent analysis device can determine that the model training condition is met when the duration of obtaining training materials reaches a second duration.

[0083] Exemplarily, in order to avoid the target model being unable to be trained for a long time and improve the model evolution efficiency, the duration of collecting training materials for triggering model training in compatibility mode (which can be called the second duration) can be preset in advance. Furthermore, in compatibility mode, the intelligent analysis device can determine that the model training condition is met when the duration of obtaining training materials reaches the second duration.

[0084] In another example, in compatibility mode, the intelligent analysis device can determine that the model training condition is met when the number of obtained training materials reaches a second quantity and the duration of obtaining training materials reaches a second duration.

[0085] Exemplarily, in order to avoid the target model being unable to be trained for a long time and improve the model evolution efficiency while ensuring the training effect of evolutionary training on the model, in compatibility mode, the intelligent analysis device can determine that the model training condition is met when the number of obtained training materials reaches a second quantity and the duration of obtaining training materials reaches a second duration.

[0086] It should be noted that the above first quantity and second quantity can be the same or different; the above first duration and second duration can also be the same or different.

[0087] In one example, in compatibility mode, according to the training mode, training the target model using the obtained training materials may include:

[0088] Reducing the specification parameters of the intelligent analysis device for executing intelligent analysis tasks and concurrently executing intelligent analysis tasks and model training.

[0089] Exemplarily, considering that the resources of the intelligent algorithm engine are limited, such as GPU (Graphics Processing Unit) resources, memory resources, and CPU (Center Processing Unit) resources, etc., in order to achieve the compatibility between intelligent analysis tasks and model training, during the process of model training, the specification parameters of the intelligent analysis device for intelligent analysis can be reduced.

[0090] Among them, the specification parameters of the intelligent analysis device for intelligent analysis are positively correlated with the resource occupancy, that is, the higher the specification parameters of the intelligent analysis device for intelligent analysis, the higher the resource occupancy of the intelligent analysis device for intelligent analysis.

[0091] Exemplarily, the above-mentioned specification parameters for intelligent analysis may include one or more of the following parameters: the number of analysis channels supported, the resolution supported for analysis, the number of targets that can be analyzed per unit time, etc.

[0092] For example, assuming that the intelligent analysis device performs intelligent analysis tasks but does not perform model training, a single engine can support 8 channels of analysis, and 4 targets can be detected per second per channel. In the case of model training, it can be adjusted to a single engine supporting 4 channels of analysis, with 4 targets detected per second per channel; or, adjusted to a single engine supporting 8 channels of analysis, with 2 targets detected per second per channel.

[0093] In some embodiments, the above-mentioned training mode may include an iterative training mode;

[0094] The above-mentioned reaching the model training conditions in the training mode may include:

[0095] The number of training materials obtained reaches a third quantity; where the third quantity is less than the number of training materials required to reach the model training conditions in the non-iterative mode; and / or,

[0096] The continuous duration of obtaining training materials reaches a third duration; where the third duration is less than the continuous duration of obtaining training materials required to reach the model training conditions in the non-iterative mode.

[0097] Exemplarily, considering that the more the number of training materials used for model evolution training, the more obvious the performance improvement of the model after evolution is usually.

[0098] However, the more the number of training materials that need to be collected, the longer the time usually required, resulting in a longer time required for the model performance improvement.

[0099] Similarly, the longer the continuous duration of obtaining training materials for model evolution training, the more the number of training materials obtained is usually, and the more obvious the performance improvement of the model after evolution training is usually.

[0100] However, the longer the continuous duration of obtaining training materials, usually means that the time required for model performance improvement is also longer.

[0101] Therefore, multiple training modes can be provided for the intelligent analysis device according to different scenario requirements, such as faster model performance improvement, or more obvious model performance improvement.

[0102] Exemplarily, in order to improve the model performance faster, the training mode of the intelligent analysis device may also include an iterative training mode.

[0103] In the iterative training mode, the number of training materials used to train the model in one evolutionary training process (referred to as the third number in this article) can be less than the number of training materials that need to be obtained under the non-iterative mode (such as the time-division multiplexing mode or the compatible mode) when the model training conditions are met, such as the above-mentioned first number and second number.

[0104] And / or, in the iterative training mode, the training material collection duration for triggering model training (referred to as the third duration in this article) can be less than the duration required to obtain training materials under the non-iterative mode (such as the time-division multiplexing mode or the compatible mode) when the model training conditions are met, such as the above-mentioned first duration and second duration.

[0105] It should be noted that in the iterative training mode, the execution time settings of model training and intelligent analysis tasks can be the same as those in the time-division multiplexing training mode, that is, in the iterative training mode, when the intelligent analysis device performs model training, it can also stop executing the intelligent analysis task; when executing the intelligent analysis task, it stops model training.

[0106] Or, in the iterative training mode, the execution time settings of model training and intelligent analysis tasks can be the same as those in the compatible mode, that is, in the iterative training mode, the intelligent analysis device can perform the intelligent analysis task and model training in a compatible manner, that is, during the execution of the intelligent analysis task by the intelligent analysis device, if it is determined that the model training conditions are met, it does not need to stop the execution of the intelligent analysis task and start model training. Among them, in the iterative training mode, when the intelligent analysis device concurrently executes the intelligent analysis task and model training, the specification parameters for the intelligent analysis device to execute the intelligent analysis task can be reduced.

[0107] In some embodiments, the model evolution method provided by the embodiments of the present application may further include:

[0108] During the operation of the intelligent analysis device, training materials are obtained according to the intelligent analysis data of the intelligent analysis device.

[0109] Exemplarily, during the operation of the intelligent analysis device, training materials can be obtained according to the intelligent analysis data of the intelligent analysis device, that is, the intelligent analysis device can obtain training materials for evolutionary training of the target model according to the intelligent analysis data of the intelligent analysis device during the execution of the intelligent analysis task by the intelligent analysis device.

[0110] For example, for the images collected by the front-end device, the intelligent analysis data obtained by the intelligent analysis device for intelligent analysis of the collected images can be superimposed on the images, and through a certain screening strategy, the training materials for evolutionary training of the target model can be screened out.

[0111] In some embodiments, before updating the target model based on the trained target model, the following steps are further included:

[0112] Save the target model;

[0113] After updating the target model based on the trained target model, the following steps may further be included:

[0114] If the difference between the false alarm rate of the updated target model within a preset statistical period and the false alarm rate of the statistically obtained target model exceeds a preset threshold, then roll back the updated target model to the target model.

[0115] Exemplarily, to ensure the effect of model evolutionary training, after training the target model in the above manner to obtain the trained model, before updating the target model, the target model may be saved first, and then the target model is updated based on the trained model.

[0116] After updating the target model, it is also possible to statistically obtain the false alarm rate of the updated target model within a preset statistical period, and compare this false alarm rate with the false alarm rate of the statistically obtained target model to determine whether the difference between the false alarm rate of the updated target model within the preset statistical period and the false alarm rate of the statistically obtained target model exceeds a preset threshold.

[0117] Exemplarily, the false alarm rate of the above target model may be the total false alarm rate before the update of the target model, or the false alarm rate within the preset statistical period statistically obtained before updating the target model.

[0118] In the case where it is determined that the difference between the false alarm rate of the updated target model within the preset statistical period and the false alarm rate of the statistically obtained target model exceeds a preset threshold, the updated target model may be rolled back to the target model to ensure the performance of the target model.

[0119] In some embodiments, before determining the training mode for training the target model, the following steps may further be included:

[0120] Determine whether to enable the self - learning of the target model;

[0121] In the case where it is determined that the self - learning of the target model is enabled, determine to perform the operation of determining the training mode for training the target model.

[0122] Exemplarily, to improve the controllability of the model evolution solution provided in the embodiments of the present application, it is possible to select whether to enable the model evolution solution provided in the embodiments of the present application (which may be referred to as whether to enable the self - learning of the target model) according to requirements.

[0123] When it is determined that the self-learning of the target model is enabled, the target model can be trained in the manner described in the above embodiments.

[0124] It should be noted that in the embodiments of the present application, when it is determined that the self-learning of the target model is not enabled, other strategies can be used to train the target model, and the embodiments of the present application do not limit this.

[0125] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application will be described below with reference to specific examples.

[0126] In this embodiment, taking the scenario of intelligent alarm (such as perimeter prevention) as an example, the model evolution process may include: training material collection and model training. Among them:

[0127] 1. Training material collection (which can also be called pre-collection of training materials)

[0128] Different from the traditional model training scheme, in the model evolution scheme provided by the embodiments of the present application, when alarm detection is enabled, self-learning training is enabled, and training materials are collected during the process of alarm detection.

[0129] For example, when perimeter alarm is enabled, perimeter self-learning is enabled for training material collection.

[0130] Exemplarily, data screening optimization can be performed based on the POS information in the alarm information, and training materials can be generated based on the screened pictures and alarm information.

[0131] Exemplarily, the POS information may include characteristic data of alarm detection, which may include but is not limited to the target detection frame, the position of the target in the picture, the target category, the target attribute (such as whether wearing glasses, etc.), and the confidence level, etc.

[0132] Exemplarily, for the POS information obtained after screening optimization, training materials can be generated by superimposing the POS information on the corresponding pictures.

[0133] Exemplarily, since false alarm data generally has a higher effect on improving the model performance when used for evolutionary training of the model, therefore, during the process of obtaining training materials, a certain amount of alarm information with relatively low confidence level can be preferentially obtained for generating training materials.

[0134] 2. Model training

[0135] Exemplarily, model training can be at least divided into a time-division multiplexing training mode (which can also be called a recommendation mode), a compatibility mode (which can also be called an optimal mode), and an extreme speed mode (which can also be called an iterative training mode) according to requirements, and will be described separately below.

[0136] 2.1 Time-division multiplexing training mode

[0137] Considering that the computing power of embedded intelligent hardware products is usually limited and it is difficult to execute intelligent analysis tasks and model training tasks simultaneously, different times can be set for alarm detection and model training according to actual application requirements.

[0138] Exemplarily, idle-time training can be enabled and busy-time detection can be performed. That is, according to the user's alarm defense time, when it reaches the non-defense time period, it automatically switches to the training mode for model training.

[0139] For example, the settings of the alarm defense time and the model training time (i.e., the above-mentioned first time period and second time period) can be as Figure 2 shown. The alarm defense time is from 0:00 to 10:00 and from 17:00 to 24:00 every day, and the model training time is from 10:00 to 17:00 every day. That is, at 10:00 every day, it enters the model training stage and exits the model training at 17:00 every day to continue alarm detection.

[0140] Exemplarily, when it reaches the model training start time, the model can be trained continuously from the previous training breakpoint, and when it reaches the model training end time, for example, at the alarm defense time point, if the model training is not completed, the current model configuration parameters can be saved.

[0141] It should be noted that if the number of training materials obtained when it reaches the model training time still cannot meet the training requirements, the training materials can be continuously obtained until the number of training materials obtained meets the training requirements when it reaches the model training time, and then model training is carried out.

[0142] Exemplarily, the model evolution process in the time-division multiplexing training mode can be referred to Figure 3 , as Figure 3 shown. When the intelligent analysis device (such as a perimeter protection device) is started, it can determine whether it reaches the model training time according to the set model training time.

[0143] If it does not reach the model training time, alarm detection can be performed, and in the presence of alarm information, data screening optimization can be carried out, and training materials are generated based on the screening optimization results.

[0144] If it reaches the model training time, it can be determined whether the number of training materials reaches the preset quantity (such as the above-mentioned first quantity). If it does not reach the preset quantity, alarm information can be continuously read, data screening optimization can be carried out, and training materials are generated based on the screening optimization results; if the training materials reach the preset quantity, the model can be trained based on the generated training materials, and the model is updated when the training is completed.

[0145] Among them, if the alarm detection time is reached before the training is completed, the current model configuration parameters can be saved, and in the case of reaching the model training time next time, the model training can continue from the previous training breakpoint.

[0146] 2.2. Compatibility mode

[0147] Since both alarm detection and model training consume the resources of the intelligent algorithm engine, such as GPU resources, memory resources, and CPU resources, and the total amount of resources of the intelligent algorithm engine is limited, if model training is also required during alarm detection, the specification parameters of alarm detection can be reduced.

[0148] Exemplarily, the specification parameters of alarm detection can include the number of detection channels supported, the resolution supported for analysis, the number of targets that can be detected per second, etc.

[0149] Exemplarily, in the compatibility mode, during the model training process, the specification parameters of alarm detection can be reduced, and its schematic diagram can be as Figure 4 shown.

[0150] 2.3. Iterative training mode

[0151] Considering that general training algorithms need to collect a large amount of training materials to train a model with better effects, but in the actual user environment, there are certain acceptance criteria for device alarms. For example, a single-channel device has a maximum of 8 false alarms per day, and the training materials generated based on false alarms have a better effect on the evolutionary training of the model. Therefore, the collection of training materials is very slow, which will take a long time for users to feel the training results.

[0152] In addition, the alarm detection scenario is greatly affected by the environment. mainly, the detection background of the picture will affect the false alarm rate of device alarms. The vegetation is relatively lush in spring and summer, and mainly branches after the leaves fall in autumn and winter. Therefore, training materials in different seasons need to be collected.

[0153] Based on this, an iterative training mode can be introduced to perform training with less training materials collected. For example, start training after collecting for 1 week, shorten the training cycle, and let users continuously feel the improvement of the detection rate and the reduction of the false alarm rate.

[0154] Exemplarily, the schematic diagram of the model training process in the iterative training mode can be as Figure 5 shown. During the model training process, the model training conditions can be set with a relatively low duration of continuous collection of training materials (such as the above-mentioned third duration) or the minimum number of training materials collected (such as the above-mentioned third quantity). When it is determined that the model training conditions are met, the model training is carried out based on the collected training materials, and the currently used target model is updated after the training is completed.

[0155] In this embodiment, in order to ensure the effect of model evolution training, after obtaining the trained model and before updating the target model, the target model can be saved first, and then the target model can be updated according to the trained model.

[0156] After updating the target model, the false alarm rate of the updated target model within a preset statistical period can also be counted, and the false alarm rate of the updated target model is compared with the counted false alarm rate of the target model to determine whether the difference between the false alarm rate of the updated target model within the preset statistical period and the counted false alarm rate of the target model exceeds a preset threshold.

[0157] In the case where it is determined that the difference between the false alarm rate of the updated target model within the preset statistical period and the counted false alarm rate of the target model exceeds the preset threshold, the updated target model can be rolled back to the target model to ensure the performance of the target model.

[0158] The method provided in this application has been described above. Next, the device provided in this application will be described:

[0159] Please refer to Figure 6 , which is a schematic structural diagram of a model evolution device provided in an embodiment of this application. As Figure 6 shown, the model evolution device may include:

[0160] A determination unit 610, configured to determine a training mode for training a target model; wherein, the target model is an algorithm model used by the intelligent analysis device to perform an intelligent analysis task; the time, resource amount, and / or model training trigger condition for model training by the intelligent analysis device are different under different training modes;

[0161] A training unit 620, configured to, when it is determined that the model training conditions in the training mode are met, train the target model according to the training mode by using the obtained training materials;

[0162] An update unit 630, configured to update the target model according to the trained target model, so that the intelligent analysis device uses the updated target model to perform an intelligent analysis task.

[0163] In some embodiments, the training mode includes a time-division multiplexing training mode; in the time-division multiplexing training mode, the intelligent analysis device performs an intelligent analysis task in a first time period and performs model training in a second time period, and the first time period and the second time period do not overlap;

[0164] The reaching of the model training conditions in the training mode includes:

[0165] The system time is within the second time period; or,

[0166] The system time is within the second time period, and the number of training materials obtained reaches the first quantity; or,

[0167] The system time is within the second time period, and the continuous duration of obtaining training materials reaches the first duration; or,

[0168] The system time is within the second time period, the number of training materials obtained reaches the first quantity, and the continuous duration of obtaining training materials reaches the first duration.

[0169] In some embodiments, the training unit 620 trains the target model by using the obtained training materials according to the training mode, including:

[0170] Training the target model by using the obtained training materials; wherein, when the system time is within the second time period, the intelligent analysis task stops executing.

[0171] In some embodiments, the training unit 620 trains the target model by using the obtained training materials according to the training mode, including:

[0172] Determining whether there are saved model configuration parameters; wherein the model configuration parameters are all the configuration parameters of the target model saved by the intelligent analysis device when the system time reaches the end time of the previous second time period and the model training is not completed;

[0173] If there are saved model configuration parameters, loading the saved model configuration parameters for the target model and training the target model by using the obtained training materials;

[0174] If there are no saved model configuration parameters, training the target model by using the obtained training materials;

[0175] When the system time reaches the end time of the current second time period, if the model training is not completed, saving all the configuration parameters of the target model.

[0176] In some embodiments, the training mode includes a compatibility mode;

[0177] The reaching of the model training conditions in the training mode includes:

[0178] The number of training materials obtained reaches the second quantity; and / or,

[0179] The continuous duration of obtaining training materials reaches the second duration.

[0180] In some embodiments, the training unit 620 trains the target model according to the training mode by using the acquired training materials, including:

[0181] Reducing the specification parameters for the intelligent analysis device to execute intelligent analysis tasks, and concurrently executing intelligent analysis tasks and model training.

[0182] In some embodiments, the training mode includes an iterative training mode;

[0183] The reaching of the model training conditions in the training mode includes:

[0184] The number of acquired training materials reaches a third quantity; wherein, the third quantity is less than the quantity of training materials required to reach the model training conditions in the non-iterative mode; and / or,

[0185] The continuous duration for acquiring training materials reaches a third duration; wherein, the third duration is less than the continuous duration required to acquire training materials to reach the model training conditions in the non-iterative mode.

[0186] In some embodiments, as Figure 7 shown, the device further includes:

[0187] An acquisition unit 640, configured to acquire training materials according to the intelligent analysis data of the intelligent analysis device during the operation of the intelligent analysis device.

[0188] In some embodiments, before the updating unit 630 updates the target model according to the trained target model, it further includes:

[0189] Saving the target model;

[0190] After the updating unit 630 updates the target model according to the trained target model, it further includes:

[0191] If the difference between the false alarm rate of the updated target model within a preset statistical period and the false alarm rate of the statistically counted target model exceeds a preset threshold, then roll back the updated target model to the target model.

[0192] In some embodiments, before the determining unit 610 determines the training mode for training the target model, it further includes:

[0193] Determining whether to enable self-learning of the target model;

[0194] In the case of determining that self-learning of the target model is enabled, determining to perform the operation of determining the training mode for training the target model.

[0195] An embodiment of the present application provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor is configured to execute the machine-executable instructions to implement the model evolution method described above.

[0196] Please refer to Figure 8 , which is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. The electronic device may include a processor 801 and a memory 802 storing machine-executable instructions. The processor 801 and the memory 802 may communicate via a system bus 803. And by reading and executing the machine-executable instructions corresponding to the model evolution logic in the memory 802, the processor 801 may execute the model evolution method described above.

[0197] The memory 802 mentioned herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.

[0198] In some embodiments, a machine-readable storage medium is also provided, such as Figure 8 the memory 802 in []. The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the model evolution method described above is implemented. For example, the storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices, etc.

[0199] An embodiment of the present application also provides a computer program, stored in a read storage medium, such as Figure 8 the memory 802 in []. And when the processor executes the computer program, it causes the processor 801 to execute the model evolution method described above.

[0200] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.

[0201] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.

Claims

1. A model evolution method, applied to an intelligent analysis device, characterized in that The method includes: Determining a training mode for training a target model according to the current actual application scenario; wherein, the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource amount, and / or model training trigger conditions used by the intelligent analysis device for model training are different under different training modes; in the case of determining that the model training conditions under the training mode are met, training the target model using the obtained training materials according to the training mode; Updating the target model according to the trained target model so that the intelligent analysis device performs intelligent analysis tasks using the updated target model.

2. The method according to claim 1, characterized in that The training mode includes a time-division multiplexing training mode; in the time-division multiplexing training mode, the intelligent analysis device performs intelligent analysis tasks in a first time period and performs model training in a second time period, and the first time period and the second time period do not overlap; The reaching of the model training conditions under the training mode includes: The system time is in the second time period; or, The system time is in the second time period, and the number of obtained training materials reaches a first quantity; or, The system time is in the second time period, and the continuous duration of obtaining training materials reaches a first duration; or, The system time is in the second time period, and the number of obtained training materials reaches a first quantity, and the continuous duration of obtaining training materials reaches a first duration.

3. The method according to claim 2, wherein The training the target model using the obtained training materials according to the training mode includes: Training the target model using the obtained training materials; wherein, when the system time is in the second time period, the intelligent analysis task stops being executed.

4. The method according to claim 2, characterized in that The training the target model using the obtained training materials according to the training mode includes: Determining whether model configuration parameters are saved; wherein, the model configuration parameters are all configuration parameters of the target model saved by the intelligent analysis device when the system time reaches the end time of the previous second time period and the model training is not completed; If the model configuration parameters are saved, loading the saved model configuration parameters for the target model and training the target model using the obtained training materials; If the model configuration parameters are not saved, training the target model using the obtained training materials; When the system time reaches the end time of the current second time period, if the model training is not completed, save all configuration parameters of the target model.

5. The method according to claim 1, wherein The training mode includes a compatibility mode; The reaching of the model training conditions under the training mode includes: The number of obtained training materials reaches a second quantity; and / or, The continuous duration of obtaining training materials reaches a second duration.

6. The method according to claim 5, characterized in that, The training the target model using the obtained training materials according to the training mode includes: Reducing the specification parameters of the intelligent analysis device for performing intelligent analysis tasks and concurrently executing intelligent analysis tasks and model training.

7. The method according to claim 1, characterized in that The training mode includes an iterative training mode; The reaching of the model training conditions under the training mode includes: The quantity of the acquired training materials reaches a third quantity; wherein, the third quantity is less than the quantity of the training materials required to reach the model training condition in the non-iterative mode; and / or, The continuous duration for acquiring the training materials reaches a third duration; wherein, the third duration is less than the continuous duration for acquiring the training materials required to reach the model training condition in the non-iterative mode.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: During the operation of the intelligent analysis device, acquire training materials according to the intelligent analysis data of the intelligent analysis device.

9. The method according to any one of claims 1 to 7, characterized in that, Before updating the target model based on the trained target model, further include: Save the target model; After updating the target model based on the trained target model, further include: If the difference between the false alarm rate of the updated target model within a preset statistical period and the false alarm rate of the statistically counted target model exceeds a preset threshold, roll back the updated target model to the target model.

10. The method according to any one of claims 1-7, characterized in that, Before determining the training mode for training the target model, further include: Determine whether to enable the self-learning of the target model; In the case of determining to enable the self-learning of the target model, determine to perform the operation of determining the training mode for training the target model.

11. A model evolution device, applied to an intelligent analysis device, characterized in that, The device includes: A determination unit, configured to determine the training mode for training the target model according to the current actual application scenario; wherein, the target model is an algorithm model used by the intelligent analysis device to perform intelligent analysis tasks; the time, resource quantity, and / or model training trigger conditions for the intelligent analysis device to perform model training are different under different training modes; a training unit, configured to, in the case of determining that the model training condition in the training mode is reached, train the target model by using the acquired training materials according to the training mode; An update unit, configured to update the target model based on the trained target model, so that the intelligent analysis device performs intelligent analysis tasks by using the updated target model.

12. The device according to claim 11, characterized in that, The training mode includes a time-division multiplexing training mode; in the time-division multiplexing training mode, the intelligent analysis device performs intelligent analysis tasks in a first time period and performs model training in a second time period, and the first time period and the second time period do not overlap; Reaching the model training condition in the training mode includes: The system time is in the second time period; or, The system time is in the second time period, and the quantity of the acquired training materials reaches a first quantity; or, The system time is in the second time period, and the continuous duration for acquiring the training materials reaches a first duration; or, The system time is in the second time period, and the quantity of the acquired training materials reaches a first quantity, and the continuous duration for acquiring the training materials reaches a first duration; Wherein, the training unit trains the target model by using the acquired training materials according to the training mode, including: Train the target model by using the acquired training materials; wherein, in the case that the system time is in the second time period, the intelligent analysis task stops being executed; Among them, the training unit trains the target model by using the obtained training materials according to the training mode, including: Determine whether model configuration parameters are saved; wherein, the model configuration parameters are all the configuration parameters of the target model saved by the intelligent analysis device when the system time reaches the end time of the previous second time period and the model training is not completed; If the model configuration parameters are saved, load the saved model configuration parameters for the target model and train the target model by using the obtained training materials; If the model configuration parameters are not saved, train the target model by using the obtained training materials; When the system time reaches the end time of the current second time period, if the model training is not completed, save all the configuration parameters of the target model; And / or The training mode includes a compatibility mode; Reaching the model training conditions in the training mode includes: The number of obtained training materials reaches a second quantity; and / or The continuous duration of obtaining training materials reaches a second duration; Among them, the training unit trains the target model by using the obtained training materials according to the training mode, including: Reduce the specification parameters for the intelligent analysis device to execute intelligent analysis tasks, and concurrently execute intelligent analysis tasks and model training; And / or The training mode includes an iterative training mode; Reaching the model training conditions in the training mode includes: The number of obtained training materials reaches a third quantity; wherein, the third quantity is less than the number of training materials required to reach the model training conditions in the non-iterative mode; and / or The continuous duration of obtaining training materials reaches a third duration; wherein, the third duration is less than the continuous duration of obtaining training materials required to reach the model training conditions in the non-iterative mode; And / or The device further includes: An acquisition unit, configured to obtain training materials according to the intelligent analysis data of the intelligent analysis device during the operation of the intelligent analysis device; And / or Before the updating unit updates the target model according to the trained target model, it further includes: Save the target model; After the updating unit updates the target model according to the trained target model, it further includes: If the difference between the false alarm rate of the updated target model within a preset statistical period and the false alarm rate of the statistically counted target model exceeds a preset threshold, roll back the updated target model to the target model; And / or Before the determination unit determines the training mode for training the target model, it further includes: Determine whether to enable self-learning of the target model; When it is determined that the self-learning of the target model is enabled, determine to perform the operation of determining the training mode for training the target model.

13. An electronic device, characterized in that, It includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor is used to execute the machine-executable instructions to implement the method according to any one of claims 1-10.

14. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-10 is implemented.

Citation Information

Patent Citations

  • Processing resource configuration method and device for neural network training and intelligent analysis

    CN111752703A

  • Model training method and device based on GPU resources, electronic equipment and storage medium

    CN114595058A