Alarm method, apparatus, device, and medium
Patent Information
- Application Number
- CN202510280041.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2026-09-11
AI Technical Summary
然而,这种基于单一阈值来触发告警,会存在误告警情况,导致告警准确率偏低
[0017]本公开实施例公开的技术方案,通过响应于告警系统生成的告警事件,获取告警事件对应的曲线图像,并将曲线图像输入图像分类模型,得到图像分类模型输出的分类结果,然后根据分类结果输出与告警事件对应的告警信息,如此可以降低误告警的几率,从而提高告警准确率。
Smart Images

Figure CN122733653A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to an alarm method, apparatus, device, and medium. Background Technology
[0002] Time series data, as a type of data with time-series characteristics, can continuously record the changes in the state of a monitored object over time. It is widely used in various fields, such as healthcare, the Internet of Things (IoT), and finance. The monitored object can be a server, sensor, operating system, or other system.
[0003] To ensure the normal operation of monitored objects, continuous monitoring is typically performed using an alarm system. When an anomaly is detected, an alarm is triggered, allowing relevant technicians to address the issue. In related technologies, alarm systems monitor objects by determining the deviation between current time-series data and historical time-series data from the same period. This deviation is then compared to a pre-set deviation threshold. If the deviation exceeds the threshold, an anomaly is identified, and an alarm is triggered. However, this method of triggering alarms based on a single threshold can lead to false alarms, resulting in low alarm accuracy. Summary of the Invention
[0004] This disclosure provides an alarm method, apparatus, device, and medium that can reduce the probability of false alarms and thus improve alarm accuracy.
[0005] In a first aspect, embodiments of this disclosure provide an alarm method, including:
[0006] In response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event;
[0007] The curve image is input into the image classification model to obtain the classification result output by the image classification model;
[0008] Based on the classification results, output the alarm information corresponding to the alarm event.
[0009] Secondly, embodiments of this disclosure provide an alarm device, including:
[0010] The image acquisition module is used to acquire the curve image corresponding to the alarm event in response to the alarm event generated by the alarm system;
[0011] An image processing module is used to input the curve image into an image classification model and obtain the classification result output by the image classification model;
[0012] The control module is used to output alarm information corresponding to the alarm event based on the classification result.
[0013] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0014] A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the alarm method as described in the foregoing first aspect embodiment and various implementations.
[0015] Fourthly, embodiments of this disclosure provide a computer-readable storage medium for storing a computer program that causes a computer to execute the alarm method as described in the foregoing first aspect embodiments and various implementations.
[0016] Fifthly, embodiments of this disclosure provide a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the alarm method as described in the foregoing first aspect embodiments and various implementations.
[0017] The technical solution disclosed in this embodiment responds to an alarm event generated by an alarm system, obtains a curve image corresponding to the alarm event, inputs the curve image into an image classification model, obtains the classification result output by the image classification model, and then outputs alarm information corresponding to the alarm event based on the classification result. This can reduce the probability of false alarms and thus improve the alarm accuracy. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram of a training scenario for an image classification model provided in an embodiment of this disclosure;
[0020] Figure 2 A flowchart illustrating the training process of an image classification model provided in this embodiment of the disclosure;
[0021] Figure 3a A schematic diagram of a white noise curve provided in an embodiment of this disclosure;
[0022] Figure 3b A schematic diagram of an initial curve image provided in an embodiment of this disclosure;
[0023] Figure 3cA schematic diagram of a training curve image corresponding to trend category information provided in an embodiment of this disclosure;
[0024] Figure 3d A schematic diagram of a training curve image corresponding to a sudden increase in category information provided in an embodiment of this disclosure;
[0025] Figure 3e A schematic diagram of a training curve image corresponding to a sudden decrease in category information provided in an embodiment of this disclosure;
[0026] Figure 3f A schematic diagram of a training curve image corresponding to overall water level drop category information provided in an embodiment of this disclosure;
[0027] Figure 3g A schematic diagram of a training curve image corresponding to overall water level rise category information provided in this embodiment of the disclosure;
[0028] Figure 4 A flowchart of an alarm method provided in an embodiment of this disclosure;
[0029] Figure 5 A flowchart for updating an image classification model is provided as an embodiment of this disclosure;
[0030] Figure 6 A schematic block diagram of an alarm device provided in an embodiment of this disclosure;
[0031] Figure 7 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0032] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0034] In this disclosure, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or scheme described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0035] In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more, that is, at least two. "At least one" means one or more. "Any" means any one or any several.
[0036] As mentioned earlier, in related technologies, alarm systems monitor objects by determining the deviation between current time-series data and historical time-series data from the same period, and comparing this deviation with a pre-set deviation threshold. If the deviation exceeds the threshold, an anomaly is detected in the monitored object, triggering an alarm. However, this method of triggering alarms based on a single threshold can lead to false alarms, resulting in low alarm accuracy.
[0037] To address the aforementioned technical problems, this disclosure provides an alarm method, apparatus, device, and medium to solve the problem that triggering alarms based on a single threshold can lead to false alarms and low alarm accuracy.
[0038] The technical solutions provided by the embodiments of this disclosure will be described in detail below through some examples. The embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0039] It should be understood that the technical solutions provided in this disclosure may include a model training part and a model application part. The model involved in this disclosure is an image classification model.
[0040] The training process of the image classification model involved in the embodiments of this disclosure will be described in detail below. Figure 1 This is a schematic diagram of a training scenario for an image classification model provided in an embodiment of the present disclosure. Figure 2 This is a flowchart illustrating the training process of an image classification model according to an embodiment of this disclosure. In this embodiment, the training process of the image classification model can be executed by an alarm device. This alarm device can consist of hardware and / or software and can be integrated into an electronic device. In this disclosure, the electronic device can be, but is not limited to, personal computers, tablets, laptops, and desktop computers, etc. This disclosure does not impose any limitations on the type of electronic device.
[0041] like Figure 2 As shown, the method may include the following steps:
[0042] S101, Obtain the training dataset. The training dataset includes multiple training curve images, and each training curve image includes category information.
[0043] In this embodiment of the disclosure, the training curve image is generated based on time-series data. This time-series data is a series of observations recorded in chronological order, with each observation associated with a specific point in time. That is, each data point in the time-series data may include timestamp information and an observation value, where the timestamp information refers to the specific time the data point was recorded, and the observation value refers to the numerical value recorded at each timestamp.
[0044] In some optional embodiments, this disclosure can use a curve image generation tool to generate multiple training curve images with different category information. Then, these multiple training curve images with different category information are used as a training dataset. The category information can be understood as the label information of the training curve images.
[0045] It should be understood that the aforementioned curve image generation tool can be any script program used to automatically generate curve images.
[0046] The category information of the aforementioned curve image refers to the trend or characteristic of the curve's change in the curve image. Furthermore, this trend or characteristic can include: sudden increase, sudden decrease, overall drop in water level, overall rise in water level, and the same trend.
[0047] A sudden increase refers to a sustained and slow rise in the curve of a graph over a period of time.
[0048] A sudden drop refers to a sustained and slow decline in the curve of a graph over a period of time.
[0049] An overall decline in water level refers to a continuous downward trend in the water level curve on a graph over a period of time.
[0050] An overall rise in water level refers to a continuous upward trend in the water level curve on a graph over a period of time.
[0051] The same trend refers to the fact that the curve fluctuation in the current curve graph over a period of time is consistent with the curve fluctuation trend in the historical curve graph of the previous day or the previous seven days.
[0052] As an optional implementation, when acquiring the training dataset, the user can launch a curve image generation tool. After the tool is running normally, the user can input curve image generation commands in its interactive interface. The tool will then automatically generate a curve image corresponding to the category information carried by the command. These multiple curve images generated by the tool can then be used as training curve images. The user can be selected from those skilled in the art.
[0053] In some optional embodiments, the curve image generation tool described above automatically generates a curve image corresponding to the category information carried by the curve image generation instruction, which may include the following steps:
[0054] Step 1: Generate a random white noise curve according to the curve image generation instructions, such as... Figure 3a As shown.
[0055] Step two: Based on the curve image generation instructions, generate multiple sets of radian curves with different periods, and overlay them to obtain the initial curve image, as shown below. Figure 3b As shown. Figure 3b The curve in the image can be understood as the curve corresponding to the current time, and this curve can be the first curve.
[0056] Step 3: Based on the same trend category information carried in the curve image generation instruction, randomly shift the water level of the first curve in the initial curve image from Step 2 to obtain the training curve image corresponding to the same trend category information, as shown below. Figure 3c As shown. Among them, Figure 3c The first curve in the diagram corresponds to the current time, the second curve corresponds to the previous day of the same period, and the third curve corresponds to the previous seven days of the same period.
[0057] Considering that the amount of training data is crucial to the performance of the model, this disclosure allows for the repeated execution of step three to generate multiple training curve images corresponding to the same trend category information. This improves the generalization ability of the model when training it based on these multiple training curve images corresponding to the same trend category information.
[0058] Step four: Based on the surge and decrease category information carried in the curve image generation instruction, introduce gradually increasing or decreasing random variations into the last multiple data points of the first curve in each training curve image generated in step three, respectively, to obtain the training curve image corresponding to the surge category information and the training curve image corresponding to the decrease category information, as shown below. Figure 3d and 3e As shown.
[0059] In this disclosure, step four can be repeatedly performed to generate multiple training curve images corresponding to sudden increase category information and multiple training curve images corresponding to sudden decrease category information. When training the model based on the multiple training curve images corresponding to the sudden increase category information and the multiple training curve images corresponding to the sudden decrease category information, the generalization ability of the model can be improved.
[0060] Step 5: Based on the overall water level decline category information and overall water level rise category information carried in the curve image generation instruction, for the last segment of data points of the first curve in each training curve image generated in Step 3, introduce random changes in the overall water level decline or overall water level rise, respectively, to obtain the training curve image corresponding to the overall water level decline category information and the training curve image corresponding to the overall water level rise category information, as shown below. Figure 3f and 3g As shown.
[0061] In this disclosure, step five can be repeatedly performed to generate multiple training curve images corresponding to the overall water level decline category information and multiple training curve images corresponding to the overall water level rise category information. Therefore, when training the model based on the multiple training curve images corresponding to the overall water level decline category information and the multiple training curve images corresponding to the overall water level rise category information, the generalization ability of the model can be improved.
[0062] It should be noted that the above Figure 3c , 3d In 3e, 3f, and 3g, the first curve corresponds to the current time, the second curve corresponds to the day before the same period, and the third curve corresponds to the seven days before the same period. Furthermore, the second and third curves can be curves from any other time before the same period. This disclosure is only illustrative of the previous day and the seven days before as examples and is not intended to limit this disclosure.
[0063] S102, Based on the training dataset, train the image classification model to obtain the image classification model.
[0064] The aforementioned image classification model to be trained refers to an image classification model whose network parameters have not been adjusted. In other words, the image classification model to be trained is a model that has not undergone any training but supports image classification functionality.
[0065] Furthermore, in this disclosure, the image classification model to be trained can be selected as a multimodal large model that supports image classification.
[0066] It should be understood that the aforementioned multimodal large model refers to an artificial intelligence model that can simultaneously process and understand multiple categories of data.
[0067] In some alternative embodiments, the image classification model is trained based on the training dataset to obtain the image classification model, which can be achieved through the following steps:
[0068] The first step is to use each training curve image in the training dataset as input data and input it into the image classification model to be trained, so that the image classification model to be trained can classify each training curve image and output the predicted classification result of each training curve image.
[0069] The second step is to determine the difference (or loss) between the predicted classification result and the category information for each training curve image.
[0070] It should be understood that the above category information refers to the category information included in the training curve image, that is, the label information of the training curve image.
[0071] The third step involves determining that the image classification model to be trained performs poorly for any training curve image when the difference (or loss) between the predicted classification result and the category information of that training curve image exceeds a preset threshold. At this point, the image classification model can be trained based on the difference (or loss) between the predicted classification result and the category information of that training curve image to obtain the final image classification model.
[0072] In this disclosure, the preset threshold is an adjustable parameter, which can be flexibly adjusted according to the prediction accuracy of the image classification model. This disclosure does not impose any restrictions on it.
[0073] Optionally, when training the image classification model, the network parameters in the image classification model can be adjusted sequentially based on the difference (or loss) between the predicted classification results and category information of each training curve image to obtain an image classification model with expected prediction results. The network parameters can be parameters such as weights.
[0074] For example, suppose there are 200 training curve images, and the difference between the predicted classification result and the category information for 30 of these training curve images exceeds a preset threshold. Then, the image classification model can be trained first based on the difference between the predicted classification result and the category information for the first training curve image. Next, based on the difference between the predicted classification result and the category information for the second training curve image, the incomplete training model can be trained, and this process can be repeated until the difference between the predicted classification result and the category information for each training curve image output by the latest trained image classification model is less than or equal to the preset threshold.
[0075] In other words, the training of the image classification model disclosed herein can be achieved by continuously adjusting the parameters of the image classification model using backpropagation and gradient descent optimization methods based on the difference between the predicted classification result and the category information of the training curve image, in order to minimize the error between the predicted classification result and the category information. Furthermore, it can be determined whether the difference between the predicted classification result and the category information output by the trained image classification model for the training curve image is still greater than a preset threshold. If it is still greater than the preset threshold, it indicates that the training of the image classification model is not complete. Therefore, the training of the image classification model can be repeated based on the difference between the predicted classification result and the category information of the training curve image until the difference between the predicted classification result and the category information output by the latest trained image classification model for the training curve image is less than or equal to the preset threshold. The latest trained image classification model is then determined as the final image classification model.
[0076] Fourth, when the difference (or loss) between the predicted classification result and the category information for each training curve image is less than or equal to a preset threshold, it is determined that the image classification model to be trained has a good classification effect for that training curve image. At this point, the training operation of the image classification model to be trained can be ended, and this image classification model to be trained can be used as the final image classification model.
[0077] In other words, the image classification model in this application is obtained by training the image classification model to be trained based on the training dataset, wherein the training dataset includes multiple training curve images, and each training curve image includes type information.
[0078] In some optional embodiments, after the image classification model to be trained is completed, the image classification model can optionally be tested to determine its prediction accuracy. Specifically, testing the image classification model can be achieved through the following steps:
[0079] Step S11: Obtain the test dataset, which includes multiple test curve images, each of which includes category information.
[0080] Step S12: Test the image classification model based on the test dataset.
[0081] In some embodiments, the above-mentioned test dataset can be obtained in the following ways;
[0082] The first method involves using a curve image generation tool to generate multiple test curve images, each of which corresponds to category information.
[0083] The specific principle for generating the test curve image is the same as or similar to that for generating the training curve image. For the specific implementation process, please refer to the section on generating the training curve image. It will not be elaborated on here.
[0084] The second approach involves, after obtaining the training dataset for training the image classification model, splitting the training dataset into a training set and a test set. The test set is then used as the test dataset for testing the image classification model.
[0085] Furthermore, each test curve image in the test dataset can be used as input data to the image classification model, so that the image classification model can process each test curve image and obtain the predicted classification result for each test curve image output by the image classification model.
[0086] Next, based on the predicted classification results and corresponding category information of each test curve image, the accuracy of the image classification model is determined. If the accuracy is greater than the accuracy threshold, the image classification model's prediction performance meets the expected requirements, and the model can be deployed online. If the accuracy is less than or equal to the accuracy threshold, the image classification model's prediction performance does not meet the expected requirements. In this case, the model can be retrained based on the training dataset until the accuracy of the retrained model exceeds the accuracy threshold.
[0087] The accuracy threshold is an adjustable parameter that can be flexibly set according to the actual classification and prediction needs. No restrictions are placed on it here.
[0088] In some embodiments, the accuracy of the image classification model is determined based on the predicted classification result and corresponding category information of each test curve image. This can be achieved by creating a confusion matrix and then calculating the accuracy of the image classification model based on the number of True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) in the confusion matrix.
[0089] The accuracy of the image classification model can be calculated using the following formula:
[0090]
[0091] In other words, the image classification model in this application is determined based on a test dataset, which includes multiple test curve images, each of which includes category information.
[0092] The technical solution disclosed in this embodiment trains an image classification model based on a training dataset to obtain an image classification model. Based on this image classification model, the category information of the curve image corresponding to the alarm event can be determined, and alarm information can be output according to the category information, thereby improving the alarm accuracy.
[0093] The training process of the image classification model has been explained in detail above. The following section will combine... Figure 4 The process of classifying curve images using an image classification model is explained in detail.
[0094] Figure 4 This is a flowchart illustrating an alarm method provided in an embodiment of this disclosure, which mainly introduces the process of using the image classification model trained above to predict the category of a curve image.
[0095] Figure 4 This is a flowchart illustrating an alarm method provided in an embodiment of this disclosure. Figure 4 As shown, the alarm method may include the following steps:
[0096] S201, in response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event.
[0097] In this disclosure, an alarm system can refer to an automated tool or application used to continuously monitor a monitored object and trigger an alarm when an anomaly is detected in the monitored object, so that relevant technical personnel can quickly handle the anomaly.
[0098] Furthermore, the aforementioned alarm events refer to the specific events or situations that trigger the alarm system. For example, when the alarm system determines that the memory usage of the monitored server exceeds the usage threshold, it will trigger an alarm for the event of excessive memory usage.
[0099] In some optional embodiments, the alarm system can acquire time-series data of the monitored object in real time and determine the deviation between the time-series data and historical time-series data of the same period. If the deviation is greater than a preset deviation threshold, it is determined that the monitored object has an anomaly, and an alarm event is generated. If the deviation is less than or equal to the preset deviation threshold, it is determined that the monitored object has not an anomaly, and the system continues to acquire time-series data of the monitored object, and determines whether the monitored object has an anomaly based on the time-series data.
[0100] When an anomaly is detected in the monitored object and an alarm event is generated, this disclosure can obtain the time-series data corresponding to the alarm event from the alarm system, and then generate the curve image corresponding to the alarm event based on the time-series data.
[0101] In this disclosure, when generating the curve image corresponding to the alarm event based on the time series data, it can be generated by using curve image generation tools or curve image generation applications, and this disclosure does not impose any restrictions on it.
[0102] In other words, the curve image corresponding to the alarm event obtained in this application is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
[0103] S202, input the curve image into the image classification model, and obtain the classification result output by the image classification model.
[0104] It should be understood that the image classification model mentioned above is specifically the image classification model trained in the aforementioned model training section.
[0105] In some alternative embodiments, since the image classification model can predict the category information of the curve image, the present disclosure can use the acquired curve image as input data to the image classification model, so as to process the curve image through the image classification model and output the classification result for the curve image.
[0106] In other words, this disclosure allows a curve image to be input into an image classification model to determine the category information of the curve image through the image classification model, and the category information to be used as the classification result of the curve image.
[0107] For example, suppose the curve image is image A, which includes a first curve, a second curve, and a third curve. The first curve is the current curve generated based on time-series data corresponding to the alarm event; the second curve is a historical curve generated based on time-series data from the previous day; and the third curve is a historical curve generated based on time-series data from the previous seven days. Then, after inputting image A into an image classification model, the model can perform anomaly classification on image A to determine the classification result of the first curve in image A. The classification result of the first curve in image A may include one of the following:
[0108] 1. Sudden drop: The first curve shows a significant drop or a large drop when compared with itself, or with the second and / or third curves during the same period;
[0109] 2. Overall water level decline: Compared with itself, or compared with the second and / or third curves at the same time, the water level drops and then flattens out;
[0110] 3. Sudden increase: The first curve shows a significant increase or a large increase compared to itself, or compared to the second and / or third curves during the same period;
[0111] 4. Overall water level rise: The first curve, compared to itself, or compared to the second and / or third curves at the same time, shows a rise followed by a leveling off.
[0112] 5. Same trend: When the first curve is compared with itself, or with the second and / or third curves, there is no obvious abrupt change, and the trend remains parallel during the same period;
[0113] 6. Other: Cannot be categorized into the previous 5 categories.
[0114] S203, based on the classification results, output the alarm information corresponding to the alarm event.
[0115] Alarm information refers to a detailed description or content of an alarm event, such as the time, type, and level of the alarm event.
[0116] Furthermore, the alarm information can take many forms, such as visual alarms, audible and visual alarms, telephone alarms, and voice alarms, and there are no restrictions on them here.
[0117] Considering that the classification result of the curve image can be one of the following: sudden decrease, overall water level drop, sudden increase, overall water level rise, same trend, and others, this disclosure can determine whether it is necessary to output alarm information corresponding to the alarm event based on the classification result of the curve image.
[0118] In some optional embodiments, this disclosure may determine whether the classification result is the target classification result; if the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; if the classification result is not the target classification result, then the alarm information corresponding to the alarm event is not output. That is, if the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
[0119] The target classification results are specifically one of the following: sudden decrease, overall drop in water level, sudden increase, overall rise in water level, and others; while the non-target classification results are specifically the same trend category.
[0120] In other words, when the image classification model outputs a classification result for a curve image that falls under the category of "same trend," this disclosure does not execute the output of alarm information corresponding to the alarm event. However, when the image classification model outputs a classification result for a curve image that falls under one of the categories of "sudden decrease," "overall drop in water level," "sudden increase," "overall rise in water level," and "other," it is necessary to execute the output of alarm information corresponding to the alarm event. This enables secondary identification of alarms triggered by the alarm system based on the image classification model, thereby intercepting false alarms triggered by the alarm system, reducing the probability of false alarms, and improving alarm accuracy.
[0121] The technical solution disclosed in this embodiment responds to an alarm event generated by an alarm system, obtains a curve image corresponding to the alarm event, inputs the curve image into an image classification model, obtains the classification result output by the image classification model, and then outputs alarm information corresponding to the alarm event based on the classification result. This can reduce the probability of false alarms and thus improve the alarm accuracy.
[0122] In some embodiments, considering that the time-series data of the monitored object may change, causing the processing performance of the image classification model to gradually decline, this disclosure allows for the acquisition of fine-tuning data for fine-tuning the image classification model during its use, and updates to the image classification model based on the fine-tuning data to ensure that the processing performance of the image classification model remains at its optimal state. The following, in conjunction with... Figure 5 This section provides a detailed explanation of how to update the image classification model.
[0123] like Figure 5 As shown, the method may include the following steps:
[0124] S301, Obtain the fine-tuning dataset.
[0125] S302, Based on the fine-tuning dataset, fine-tune the image classification model to obtain a new image classification model.
[0126] In some embodiments, during the process of outputting alarm information or not outputting alarm information based on the classification results of the curve images, relevant technicians can calibrate the accuracy of each alarm operation within a preset period to obtain multiple curve images with label information. Then, the dataset composed of multiple curve images with label information is determined as a fine-tuning dataset.
[0127] The preset period can be either a fixed period or a variable period, and can be flexibly set according to the model's fine-tuning requirements. For example, when the preset period is a fixed period, it can be every week or every half month, etc.; when the preset period is a variable period, it can be every week for the first time, every two weeks for the second time, and every month for the third time, etc.
[0128] Furthermore, the label information for the aforementioned curve image includes alarm accuracy and alarm inaccuracy.
[0129] Furthermore, based on this fine-tuning dataset, the image classification model can be fine-tuned to obtain a new image classification model, which can improve the classification performance of the image classification model and enhance its generalization ability.
[0130] It should be noted that the specific implementation process of fine-tuning the image classification model based on the fine-tuning dataset can be found in the existing model fine-tuning process, which will not be elaborated on here.
[0131] In some optional embodiments, after fine-tuning the image classification model to obtain a new image classification model, the present disclosure may optionally also obtain a test dataset for testing the new image classification model, and test the new image classification model based on the test dataset.
[0132] In this disclosure, the method for obtaining the test dataset for testing the new image classification model is the same as the method for obtaining the test dataset for testing the image classification model described above. For details of the implementation process, please refer to the method for obtaining the test dataset for testing the image classification model described above. It will not be elaborated on here.
[0133] Optionally, the above-mentioned testing of the new image classification model based on the test dataset can be achieved by inputting each test curve image in the test dataset into the new image classification model, so that the new image classification model processes each test training curve image to obtain the predicted classification result of the new image classification model for each test training curve image.
[0134] Then, based on the predicted classification results and corresponding category information of each test training curve image, the accuracy of the new image classification model is determined.
[0135] The principle for determining the accuracy of the new image classification model is the same as or similar to the principle for determining the accuracy of the image classification model mentioned above. For the specific determination process, please refer to the section on determining the accuracy of the image classification model mentioned above. It will not be elaborated on here.
[0136] S303, Update the image classification model based on the existing image classification model and the new image classification model.
[0137] After obtaining the accuracy of the new image classification model, this disclosure allows for comparison of the accuracy of the new image classification model with that of the existing image classification model. If the accuracy of the new image classification model is greater than that of the existing image classification model, it indicates that the processing performance of the new image classification model is superior. In this case, the existing image classification model can be replaced with the new image classification model to determine the classification result of the curve image, thereby improving the classification accuracy of the curve image. If the accuracy of the new image classification model is less than or equal to that of the existing image classification model, it indicates that the processing performance of the new image classification model is worse than that of the existing image classification model, or comparable to that of the existing image classification model. In this case, the existing image classification model can continue to be used for image classification operations to determine the classification result of the curve image.
[0138] In other words, this disclosure updates the image classification model, including replacing the image classification model with the new image classification model if the accuracy index of the image classification model is lower than that of the new image classification model, otherwise the image classification model update operation is not performed.
[0139] In this way, the image classification model can be continuously updated and optimized based on fine-tuning data, enabling the image classification model to better adapt to constantly changing time-series data, thereby providing users with better monitoring services and improving the user experience.
[0140] The following is a reference to the appendix. Figure 6 This disclosure describes an alarm device based on an embodiment. Figure 6 As shown, the alarm device 400 includes: an image acquisition module 410, an image processing module 420, and a control module 430.
[0141] The image acquisition module 410 is used to acquire the curve image corresponding to the alarm event in response to the alarm event generated by the alarm system.
[0142] Image processing module 420 is used to input the curve image into an image classification model and obtain the classification result output by the image classification model;
[0143] The control module 430 is used to output alarm information corresponding to the alarm event based on the classification result.
[0144] In one optional implementation of this disclosure, the image processing module 420 is specifically used for:
[0145] The curve image is input into the image classification model to determine the category information of the curve image, and the category information is used as the classification result of the curve image.
[0146] In one optional implementation of this disclosure, the control module 430 is specifically used for:
[0147] If the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
[0148] In one optional implementation of this disclosure, the image classification model is obtained by training the image classification model to be trained based on a training dataset. The training dataset includes multiple training curve images, and each training curve image includes category information.
[0149] In one optional implementation of this disclosure, the image classification model is determined based on a test dataset, wherein the test dataset includes multiple test curve images, and each test curve image includes category information.
[0150] In one optional implementation of this disclosure, the alarm device 400 further includes:
[0151] The data acquisition module is used to acquire the fine-tuning dataset;
[0152] The fine-tuning module is used to fine-tune the image classification model based on the fine-tuning dataset to obtain a new image classification model;
[0153] An update module is used to update the image classification model based on the image classification model and the new image classification model.
[0154] In one optional implementation of this disclosure, the updating module is specifically used for:
[0155] If the accuracy metric of the image classification model is lower than that of the new image classification model, then the image classification model is replaced with the new image classification model.
[0156] In one optional implementation of this disclosure, the curve image is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
[0157] It should be understood that the device embodiments and the foregoing method embodiments can correspond to each other, and similar descriptions can be found in the first aspect of the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 6 The device 400 shown can perform Figure 4 The corresponding method embodiments, and the foregoing and other operations and / or functions of each module in device 400 are respectively implemented to achieve Figure 4 For the sake of brevity, the corresponding processes in each method are not described in detail here.
[0158] The apparatus 400 of this disclosure embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the first aspect method embodiment of this disclosure can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the first aspect method disclosed in this disclosure can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the first aspect method embodiment described above.
[0159] Figure 7 This is a schematic block diagram of an electronic device provided as an embodiment of this disclosure. Figure 7 As shown, the electronic device 500 may include a memory 510 and a processor 520. The memory 510 stores a computer program and transmits the program code to the processor 520. In other words, the processor 520 can call and run the computer program from the memory 510 to implement the alarm method described in the first aspect of this disclosure.
[0160] For example, the processor 520 can be used to execute the alarm method described in the first aspect above according to instructions in the computer program.
[0161] In some embodiments, the alarm method includes:
[0162] In response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event;
[0163] The curve image is input into the image classification model to obtain the classification result output by the image classification model;
[0164] Based on the classification results, output the alarm information corresponding to the alarm event.
[0165] In some embodiments, inputting the curve image into an image classification model to obtain the classification result output by the image classification model includes:
[0166] The curve image is input into the image classification model to determine the category information of the curve image, and the category information is used as the classification result of the curve image.
[0167] In some embodiments, outputting alarm information corresponding to the alarm event based on the classification result includes:
[0168] If the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
[0169] In some embodiments, the image classification model is obtained by training the image classification model to be trained based on a training dataset, wherein the training dataset includes multiple training curve images, and each training curve image includes category information.
[0170] In some embodiments, the image classification model is determined based on a test dataset, which includes multiple test curve images, each of which includes category information.
[0171] In some embodiments, the method further includes:
[0172] Obtain the fine-tuning dataset;
[0173] Based on the fine-tuning dataset, the image classification model is fine-tuned to obtain a new image classification model;
[0174] The image classification model is updated based on the existing image classification model and the new image classification model.
[0175] In some embodiments, updating the image classification model based on the image classification model and the new image classification model includes:
[0176] If the accuracy metric of the image classification model is lower than that of the new image classification model, then the image classification model is replaced with the new image classification model.
[0177] In some embodiments, the curve image is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
[0178] In some embodiments of this disclosure, the processor 520 may include, but is not limited to:
[0179] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0180] In some embodiments of this disclosure, the memory 510 includes, but is not limited to:
[0181] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0182] In some embodiments of this disclosure, the computer program may be divided into one or more modules, which are stored in the memory 510 and executed by the processor 520 to complete the alarm method provided in this disclosure. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.
[0183] like Figure 7 As shown, the electronic device 500 may further include:
[0184] Transceiver 530, which can be connected to processor 520 or memory 510.
[0185] The processor 520 can control the transceiver 530 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include antennas, and the number of antennas may be one or more.
[0186] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0187] This disclosure also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the alarm method described in the first aspect above.
[0188] In some embodiments, the alarm method includes:
[0189] In response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event;
[0190] The curve image is input into the image classification model to obtain the classification result output by the image classification model;
[0191] Based on the classification results, output the alarm information corresponding to the alarm event.
[0192] In some embodiments, inputting the curve image into an image classification model to obtain the classification result output by the image classification model includes:
[0193] The curve image is input into the image classification model to determine the category information of the curve image, and the category information is used as the classification result of the curve image.
[0194] In some embodiments, outputting alarm information corresponding to the alarm event based on the classification result includes:
[0195] If the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
[0196] In some embodiments, the image classification model is obtained by training the image classification model to be trained based on a training dataset, wherein the training dataset includes multiple training curve images, and each training curve image includes category information.
[0197] In some embodiments, the image classification model is determined based on a test dataset, which includes multiple test curve images, each of which includes category information.
[0198] In some embodiments, the method further includes:
[0199] Obtain the fine-tuning dataset;
[0200] Based on the fine-tuning dataset, the image classification model is fine-tuned to obtain a new image classification model;
[0201] The image classification model is updated based on the existing image classification model and the new image classification model.
[0202] In some embodiments, updating the image classification model based on the image classification model and the new image classification model includes:
[0203] If the accuracy metric of the image classification model is lower than that of the new image classification model, then the image classification model is replaced with the new image classification model.
[0204] In some embodiments, the curve image is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
[0205] This disclosure also provides a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the alarm method described in the first aspect.
[0206] In some embodiments, the alarm method includes:
[0207] In response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event;
[0208] The curve image is input into the image classification model to obtain the classification result output by the image classification model;
[0209] Based on the classification results, output the alarm information corresponding to the alarm event.
[0210] In some embodiments, inputting the curve image into an image classification model to obtain the classification result output by the image classification model includes:
[0211] The curve image is input into the image classification model to determine the category information of the curve image, and the category information is used as the classification result of the curve image.
[0212] In some embodiments, outputting alarm information corresponding to the alarm event based on the classification result includes:
[0213] If the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
[0214] In some embodiments, the image classification model is obtained by training the image classification model to be trained based on a training dataset, wherein the training dataset includes multiple training curve images, and each training curve image includes category information.
[0215] In some embodiments, the image classification model is determined based on a test dataset, which includes multiple test curve images, each of which includes category information.
[0216] In some embodiments, the method further includes:
[0217] Obtain the fine-tuning dataset;
[0218] Based on the fine-tuning dataset, the image classification model is fine-tuned to obtain a new image classification model;
[0219] The image classification model is updated based on the existing image classification model and the new image classification model.
[0220] In some embodiments, updating the image classification model based on the image classification model and the new image classification model includes:
[0221] If the accuracy metric of the image classification model is lower than that of the new image classification model, then the image classification model is replaced with the new image classification model.
[0222] In some embodiments, the curve image is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
[0223] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0224] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0225] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0226] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this disclosure may be integrated into one control module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0227] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0228] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. An alarm method, characterized in that, include: In response to an alarm event generated by the alarm system, obtain the curve image corresponding to the alarm event; The curve image is input into the image classification model to obtain the classification result output by the image classification model; Based on the classification results, output the alarm information corresponding to the alarm event.
2. The method according to claim 1, characterized in that, The step of inputting the curve image into an image classification model to obtain the classification result output by the image classification model includes: The curve image is input into the image classification model to determine the category information of the curve image, and the category information is used as the classification result of the curve image.
3. The method according to claim 1, characterized in that, The step of outputting alarm information corresponding to the alarm event based on the classification result includes: If the classification result is the target classification result, then the alarm information corresponding to the alarm event is output; otherwise, the alarm information corresponding to the alarm event is not output.
4. The method according to claim 1, characterized in that, The image classification model is obtained by training the image classification model to be trained based on the training dataset. The training dataset includes multiple training curve images, and each training curve image includes category information.
5. The method according to claim 4, characterized in that, The image classification model is determined based on a test dataset, which includes multiple test curve images, each of which includes category information.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the fine-tuning dataset; Based on the fine-tuning dataset, the image classification model is fine-tuned to obtain a new image classification model; The image classification model is updated based on the existing image classification model and the new image classification model.
7. The method according to claim 6, characterized in that, The step of updating the image classification model based on the image classification model and the new image classification model includes: If the accuracy metric of the image classification model is lower than that of the new image classification model, then the image classification model is replaced with the new image classification model.
8. The method according to claim 1, characterized in that, The curve image is obtained based on the time-series data of the monitored object acquired in real time by the alarm system.
9. An alarm device, characterized in that, include: The image acquisition module is used to acquire the curve image corresponding to the alarm event in response to the alarm event generated by the alarm system; An image processing module is used to input the curve image into an image classification model and obtain the classification result output by the image classification model; The control module is used to output alarm information corresponding to the alarm event based on the classification result.
10. An electronic device, characterized in that, include: A processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 8.
12. A computer program product containing program instructions, characterized in that, When the program instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 8.