Method and device for judging authenticity of data acquisition behavior

By judging the authenticity of the external box image and internal power meter video of the power metering box, combined with the results of the two, the problem of difficult to determine the authenticity of data collection behavior in digital archives is solved, and the accuracy and efficiency of the judgment are improved.

CN120014422APending Publication Date: 2025-05-16BEIJING REMARKABLES UNITED TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411935523.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

During the digital file building process, staff may remake other collected images or videos, making it difficult to determine the authenticity of the data acquisition behavior of the power metering box, which in turn affects the accuracy of the file building data.

Method used

By obtaining the external box image and internal power meter video of the power metering box, the authenticity is judged separately, and combining the results of the two judgments, the authenticity of the data acquisition behavior is determined.

Benefits of technology

It avoids errors in judgment of a single data source, improves the accuracy and efficiency of the authenticity judgment of data collection behavior, and ensures the data accuracy of digital archives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014422A_ABST
    Figure CN120014422A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for judging the authenticity of a data acquisition behavior, and the method comprises the steps: obtaining a first image which comprises an image of an external box body of an electric power metering box; performing authenticity judgment on the first image to obtain a first judgment result; obtaining a first video, wherein the first video comprises a video of an internal electric energy meter of the electric power metering box; performing authenticity judgment on the first video to obtain a second judgment result; and judging the authenticity of the data acquisition behavior of the electric power metering box according to the first judgment result and the second judgment result. According to the method and the device, judgment errors possibly caused by judgment only through a single data source are avoided, and after a negative conclusion is confirmed to be undoubtedly made on the authenticity of the data acquisition behavior of the electric power metering box through the first image, the situation that time is consumed to continue to perform authenticity judgment on the first video is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the technical field of determining the authenticity of data collection behavior. More specifically, the present invention relates to a method for determining the authenticity of data collection behavior of an electric power meter box. Background Art

[0002] The energy meter is used to monitor and record energy consumption in the power system and is generally installed in the power meter box. After the energy meter is installed, it is necessary to create files for the energy meter and the corresponding power meter box. In order to improve the level of power marketing services, various power companies have begun to carry out digital filing, replacing the traditional manual filing, effectively solving many problems that are prone to manual filing, and improving the efficiency of filing work. However, the use of digital filing requires staff to go to the power meter box to take pictures of the power meter box and the energy meter. At this time, if the staff does not actually collect data, but reshoots other collected images or videos, it will cause errors in the filing data and bring a series of problems later.

[0003] In view of this, there is an urgent need to provide a technical solution for determining the authenticity of the data collection behavior of the power meter box, which can realize the determination of the authenticity of the data collection behavior of the power meter box on a mobile terminal during the digital filing process without adding additional hardware equipment or additional operating procedures. Summary of the invention

[0004] In order to at least solve the technical problems mentioned above, the present disclosure proposes a technical solution of a method for determining the authenticity of data collection behavior of an electric power meter box in multiple aspects.

[0005] In a first aspect, the present disclosure provides a method for determining the authenticity of data collection behavior of an electric power meter box, wherein the method comprises: acquiring a first image, the first image comprising an image of an external box body of the electric power meter box; performing authenticity determination on the first image to obtain a first determination result; acquiring a first video, the first video comprising a video of an internal electric energy meter of the electric power meter box; performing authenticity determination on the first video to obtain a second determination result; and determining the authenticity of the data collection behavior of the electric power meter box based on the first determination result and the second determination result.

[0006] In a second aspect, the present disclosure provides a device for determining the authenticity of data collection behavior of an electric power meter box, comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions; wherein, when the program instructions are loaded and executed by the processor, the device executes any one of the embodiments of the present disclosure to obtain a first image of the data collection behavior of the electric power meter box, wherein the first image includes an image of the external box body of the electric power meter box.

[0007] By making authenticity judgments on the first image and the first video respectively, and then judging the authenticity of the data collection behavior of the power meter box based on the first judgment result and the second judgment result, the possible judgment errors caused by judging only by a single data source are avoided. By first judging the authenticity of the first image with less calculation time, and then judging the authenticity of the first video with more calculation time, when the authenticity of the data collection behavior of the power meter box has been negatively concluded without a doubt through the first image, it is avoided to waste time to continue to judge the authenticity of the first video. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0009] Figure 1 A schematic flow chart showing a method for determining the authenticity of data collection behavior of an electric power meter box according to an embodiment of the present disclosure;

[0010] Figure 2 A schematic flow chart of a first image authenticity determination method according to an embodiment of the present disclosure is shown;

[0011] Figure 3 A schematic flow chart of a moire pattern recognition method according to an embodiment of the present disclosure is shown;

[0012] Figure 4 A schematic flow chart showing a method for generating a remake mark detection model according to an embodiment of the present disclosure;

[0013] Figure 5 A schematic flow chart of a first video authenticity determination method according to an embodiment of the present disclosure is shown;

[0014] Figure 6 A schematic flow chart of a method for obtaining barcode information of an electric energy meter barcode of an internal electric energy meter according to an embodiment of the present disclosure is shown;

[0015] Figure 7A schematic flow chart showing a method for generating a barcode detection model for an electric energy meter according to an embodiment of the present disclosure;

[0016] Figure 8 A structural block diagram of a device for determining the authenticity of data collection behavior of an electric power meter box according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0018] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0019] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0020] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0021] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0022] Figure 1 A schematic flow chart of a method for determining the authenticity of data collection behavior of an electric power meter box according to an embodiment of the present disclosure is shown.

[0023] like Figure 1As shown, a method for determining the authenticity of data collection behavior of an electric power meter box comprises: acquiring a first image, the first image comprising an image of an external box body of the electric power meter box; determining the authenticity of the first image to obtain a first determination result; acquiring a first video, the first video comprising a video of an internal electric energy meter of the electric power meter box; determining the authenticity of the first video to obtain a second determination result; and determining the authenticity of the data collection behavior of the electric power meter box according to the first determination result and the second determination result.

[0024] Specifically, in the embodiment of the present disclosure, the method 100 for determining the authenticity of the data collection behavior of the power meter box includes the following steps:

[0025] Step S110, acquiring a first image. The first image is an image of an external box body including the power meter box.

[0026] Since the power meter box may be installed at a high place, when acquiring the first image, the staff is not required to impose excessively strict restrictions on the shooting position and angle, so that the staff can easily complete the shooting task when working at high altitude. The staff can be required to take several overall images of the external box of the power meter box, and the images taken must be clear and avoid obvious shaking, and then the one with the best quality is selected as the first image for determining the authenticity of the data collection behavior.

[0027] Step S120: Perform authenticity judgment on the first image to obtain a first judgment result.

[0028] The authenticity of the first image is judged by the first image authenticity judgment method to obtain a first judgment result. The first judgment result may include two results, namely, judging that the first image is false or failing to judge that the first image is false. When the first image is not judged to be false, the authenticity of the subsequent first video needs to be judged. When the first image is judged to be false, step S130 and step S140 can be skipped, and step S150 is executed to directly judge the authenticity of the data collection behavior of the power meter box.

[0029] Step S130, obtaining a first video. The first video is a video including an internal electric energy meter of the electric power meter box.

[0030] Similar to step S110, when acquiring the first video, the staff is not required to impose overly strict restrictions on the shooting position, angle, etc., so that the staff can easily complete the shooting task when working at high altitude. The staff can be required to shoot several videos of the internal electric energy meters of the power meter box, and the video contains all the electric energy meters inside the power meter box. The shooting time of each electric energy meter cannot be too short to ensure that each electric energy meter can be clearly recorded in the video, and then the best quality video is selected as the first video for determining the authenticity of the data collection behavior.

[0031] Step S140: Perform authenticity judgment on the first video to obtain a second judgment result.

[0032] The authenticity of the first video is judged by the first video authenticity judgment method to obtain a second judgment result. Similar to the first judgment result, the second judgment result may include two results, namely, judging that the first video is false or failing to judge that the first video is false. When the first video is not judged to be false, it is also necessary to judge in combination with the authenticity of the first image.

[0033] Step S150: judging the authenticity of the data collection behavior of the power meter box according to the first judgment result and the second judgment result.

[0034] A comprehensive judgment is made on the above-mentioned first judgment result and the second judgment result, and then the authenticity of the data collection behavior of the power meter box is determined. The result of the authenticity of the data collection behavior of the power meter box is the "and" relationship of the first judgment result and the second judgment result. That is, when at least one of the first judgment result and the second judgment result is judged to be false, the result of the authenticity of the data collection behavior of the power meter box is false. Therefore, when it can be judged that the first judgment result is false in step S120, the result of the authenticity of the data collection behavior of the power meter box must be false at this time. Since steps S130 and S140 are relatively time-consuming, in order to improve efficiency, steps S130 and S140 can be directly skipped, and step S150 can be directly executed to obtain the conclusion of the authenticity of the data collection behavior of the power meter box. When both the first judgment result and the second judgment result cannot be judged to be false, it is necessary to combine the first judgment result and the second judgment result to make a judgment.

[0035] In this embodiment, when both the first judgment result and the second judgment result are not judged to be false, the authenticity of the data collection behavior of the power meter box is judged to be true.

[0036] The embodiments of the present disclosure can be used to verify the authenticity of the digital filing work of the power meter box. After the power meter box is installed, it needs to be digitally filed. The staff needs to come to the location of the power meter box to shoot and operate the power meter box. During the filing process, the staff may first need to inspect the power meter box. Take an image of the external box body of the power meter box and upload it as digital evidence that the box body of the power meter box is installed correctly and the appearance of the box body is intact. Then, open the door of the power meter box, take a video of the internal electric energy meter of the power meter box again and upload it as digital evidence that the internal electric energy meter of the power meter box is installed correctly and the electric energy meter inside the box is intact. Therefore, the method for determining the authenticity in the present disclosure can complete the determination of the authenticity of the data collection behavior of the power meter box without adding additional hardware equipment or additional operating procedures.

[0037] Figure 2 A schematic flow chart of a first image authenticity determination method according to an embodiment of the present disclosure is shown.

[0038] like Figure 2 As shown, in some embodiments, the authenticity of the first image is judged to obtain a first judgment result, including: performing moiré recognition on the first image to obtain a moiré recognition result; performing copy mark recognition on the first image according to a copy mark detection model to obtain a copy mark recognition result; and obtaining the first judgment result based on the moiré recognition result and the copy mark recognition result.

[0039] Specifically, the authenticity of the first image is judged by the first image authenticity judgment method to obtain a first judgment result. In this embodiment, the first image authenticity judgment method 200 includes the following steps:

[0040] Step S210, performing moiré recognition on the first image to obtain a moiré recognition result.

[0041] The authenticity judgment of the first image includes performing moiré recognition on the first image.

[0042] Moire pattern is a high-frequency interference stripe that appears on the photosensitive element of a digital camera or scanner, usually in the form of colorful high-frequency irregular stripes. Moire pattern is caused by the fact that when the pixel spatial frequency of the photosensitive element is close to the spatial frequency of the stripes in the image, a new wave-shaped interference pattern will be generated. The actual causes of moire pattern may include the following two: the first is that the photographed object has stripes of a specific frequency, and the pixel spatial frequency of the stripes is close to the pixel spatial frequency of the photosensitive element. For example, a shirt with dense stripes is prone to produce moire patterns in the dense stripe area in the photographed photo, but the human eye will not feel such moire patterns when observing the dense stripe shirt; the second is that the photographed object includes a screen, including a display screen and a mobile device screen. Since such screens actually use dense dot matrix to display images, and the spatial frequency of the dot matrix distribution is close to the pixel spatial frequency of the photosensitive element, when the photosensitive element is captured, it is also easy to produce moire patterns in the photographed screen area.

[0043] In the embodiments of the present disclosure, the object of moiré recognition is the first image, and the captured content is an image of the external box of the power meter box with a relatively high capture quality. The first situation described above is not possible, that is, there are no dense stripes on the external box of the power meter box. Therefore, it is possible to judge whether the first image is a copy by performing moiré recognition on the first image. For example, a staff member displays an image of the external box of the power meter box on a display screen of an electronic device, and then uses another electronic device to capture the image of the external box of the power meter box on the display screen to obtain the first image. At this time, since the image is copied, moiré is more likely to appear in the first captured image. By identifying the moiré, it can be determined whether the first image is a copy.

[0044] Based on the moiré recognition method, moiré recognition is performed on the first image to obtain the spectrum of the first image. According to the distance between the acquired spectrum and the central spectrum, the spectrum of the first image is divided into a first spectrum and a second spectrum. When the distance between the geometric center of the spectrum and the geometric center of the central spectrum is greater than a threshold 1, the spectrum is the first spectrum; when the distance between the geometric center of the spectrum and the geometric center of the central spectrum is less than a threshold 1 and greater than a threshold 2, the spectrum is the second spectrum. By calculating the number of these two types of spectra in the first image, the moiré recognition result is obtained.

[0045] When the first image has the first spectrum, the moiré recognition result is that the first image has the moiré, and therefore the authenticity of the first image is false; when the first image does not have the first spectrum, due to possible errors, it cannot be determined that the first image does not have the moiré, and therefore the authenticity of the first image cannot be determined to be false, and therefore the moiré recognition result may include the number of the second spectrum, which is used to combine with the copy mark recognition result in step S230 to determine the authenticity of the first image.

[0046] Step S220: performing copy mark recognition on the first image according to the copy mark detection model to obtain a copy mark recognition result.

[0047] Based on the generated copy mark detection model, copy mark recognition is performed on the first image to identify the first annotation item in the first image. When the number of the first annotation items identified in the first image is greater than the threshold, the copy mark recognition result is that the first image has copy mark items, so the authenticity of the first image is false; when the number of the first annotation items identified in the first image is less than or equal to the threshold, due to possible errors, it cannot be determined that the first image does not have copy mark items, and the authenticity of the first image cannot be determined to be false, so the copy mark recognition result may include the number of the first annotation items identified in the first image, which is used to combine with the moiré recognition result in step S230 to determine the authenticity of the first image.

[0048] Step S230, obtaining a first judgment result according to the moiré pattern recognition result and the copy mark recognition result.

[0049] The first judgment result is obtained by combining the moiré recognition result and the copy mark recognition result. In the present embodiment, when the moiré recognition result is that the first image has moiré, or when the copy mark recognition result is that the first image has a copy mark item, a conclusion is directly obtained, that is, the first image is judged to be false. In other cases, it is necessary to make a judgment in combination with the number of second spectra and the number of first annotation items. In the present embodiment, when the number of second spectra is greater than or equal to 1 and the number of first annotation items is greater than or equal to 1, that is, when the second spectrum and the first annotation item each have at least one, a conclusion is obtained, and the first image is judged to be false; when the number of second spectra is 0 or the number of first annotation items is 0, a conclusion is obtained, and it is not possible to judge that the first image is false.

[0050] Figure 3 A schematic flow chart of a moiré pattern recognition method according to an embodiment of the present disclosure is shown.

[0051] like Figure 3As shown, in some embodiments, moiré recognition is performed on a first image to obtain a moiré recognition result, including: converting the first image from an RGB color space to a grayscale space; converting the first image from a grayscale space to a spectrum space; processing the first image to obtain target spectrum information; and obtaining a moiré recognition result based on the target spectrum information.

[0052] Specifically, based on the moiré recognition method, moiré recognition is performed on the first image to obtain the spectrum of the first image. The moiré recognition method 300 includes the following steps:

[0053] Step S310: convert the first image from the RGB color space to the grayscale space.

[0054] This step is to grayscale the first colored image. In the RGB color space, each pixel includes three elements, which represent the R color channel value, G color channel value and B color channel value of the point, respectively, and the value range is [0, 255]. In the grayscale space, each pixel includes only one element, which represents the grayscale value of the point, and the value range is [0, 255]. Therefore, it is necessary to establish a mapping between the RGB color space and the grayscale space.

[0055] Common mapping methods include component method, maximum method, average method, and weighted average method.

[0056] The first method is the component method, which uses a specific component of the three RGB components as the grayscale value of the point. The following are three possible expressions:

[0057] f(i,j)=R(i,j)

[0058] f(i,j)=G(i,j)

[0059] f(i,j)=B(i,j)

[0060] Among them, f(i,j) represents the grayscale value of the pixel point (i,j), R(i,j), G(i,j) and B(i,j) represent the R color channel value, G color channel value and B color channel value of the pixel point (i,j) respectively.

[0061] The second method is the maximum value method, which uses the maximum value of the three RGB components as the grayscale value of the point, as shown below:

[0062] f(i,j)=max(R(i,j),G(i,j),B(i,j))

[0063] The third method is the average value method, which uses the average value of the three RGB components as the grayscale value of the point, as shown below:

[0064]

[0065] The fourth method is the weighted average method, which sets weights for the three components of RGB respectively, and calculates the gray value of the point by weighted average method, as shown below:

[0066] f(i,j)=R(i,j)·a+G(i,j)·b+B(i,j)·c

[0067] Wherein, a, b and c are weights of the R color channel value, the G color channel value and the B color channel value, respectively, and a+b+c=1.

[0068] In this embodiment, the fourth weighted average method is used, and a specific color channel is set to a larger weight so that the color channel can provide a greater effect for the gray value. For example, in the OpenCV library, a, b and c are 0.3, 0.59 and 0.11 respectively.

[0069] Step S320: convert the first image from the grayscale space to the spectrum space.

[0070] This step is to transform the first image from a time domain signal into a frequency domain signal through Fourier transform, so as to facilitate the subsequent processing of the image. After the Fourier transform, the spectrum needs to be centered so that the low-frequency spectrum is near the center of the image and the high-frequency spectrum is near the edge of the image. In this embodiment, after the above transformation, the first image becomes a square with a side length of 1024 units. After this, the frequency domain signal can be further processed by various filters, such as a high-pass filter, so that the edge of the object is highlighted and the image is sharpened.

[0071] Step S330: Process the first image to obtain target spectrum information.

[0072] In this embodiment, binarization processing and contour processing are performed on the first image converted into the spectrum space.

[0073] In terms of binarization, the binarization threshold can be determined by the histogram bimodal method, and the first image can be binarized according to the binarization threshold. Through the histogram, two peaks of grayscale values ​​in the first image can be determined, representing the two most frequently occurring grayscale values ​​in the first image, and then the peak valley between the two peaks can be determined, and the grayscale value represented by the peak valley is used as the binarization threshold. In terms of contour processing, the contour topology information of the binary image can be obtained through the findContours function of OpenCV and the obtained contour can be drawn through the drawContours function of OpenCV. After processing, several spectra can be obtained, each of which consists of several interconnected pixels with a grayscale value of 255.

[0074] Then, the spectrum whose area is greater than a certain threshold (in this embodiment, the area threshold is 10 square units) is obtained as the spectrum of the first image. By setting the threshold, noise is prevented from being regarded as the spectrum of the first image. According to the distance between the acquired spectrum and the central spectrum, the spectrum of the first image obtained is screened into two categories: the first spectrum and the second spectrum. When the distance between the geometric center of the spectrum and the geometric center of the central spectrum is greater than threshold 1, the spectrum is the first spectrum. In this embodiment, threshold 1 is 50% of the side length of the first image, that is, 512 units. When the distance between the geometric center of the spectrum and the geometric center of the central spectrum is less than threshold 1 and greater than threshold 2, the spectrum is the second spectrum. In this embodiment, threshold 2 is 15% of the side length of the first image, that is, 154 units. For spectra less than the passing threshold 2, since these spectra belong to low-frequency spectra and do not conform to the law of the moiré corresponding spectrum, such spectra are not considered. Calculate the number of the above two types of spectra in the first image to obtain the moiré recognition result.

[0075] Step S340: obtaining a moiré recognition result according to the target spectrum information.

[0076] There are two types of moiré recognition results. In the first type, when the first spectrum exists, it is determined that the first image has moiré. At this time, step S220 can be skipped, and the first judgment result can be obtained directly according to step S230 based on the moiré recognition result and the remake mark recognition result. Since the moiré recognition result is that the first image has moiré, no matter what the remake mark recognition result is, the authenticity of the first image is false. In the second type, when the first spectrum does not exist, it cannot be determined that the first image does not have moiré due to possible errors. It is necessary to combine it with the subsequent remake mark recognition result to make a judgment on the authenticity of the first image.

[0077] Figure 4 A schematic flowchart of a method for generating a copy mark detection model according to an embodiment of the present disclosure is shown.

[0078] like Figure 4 As shown, in some embodiments, the method for generating a copy mark detection model includes: obtaining an image collected under the data collection behavior, and screening out a second image that lacks authenticity; annotating the first annotation item of the second image; setting the training parameters of the copy mark detection model, and training the copy mark detection model; evaluating the copy mark detection model to obtain a first model with the best accuracy; and testing the first model. When the accuracy of the first model reaches a set threshold, the first model is a copy mark detection model.

[0079] Specifically, in step S220, it is necessary to identify the remake mark of the first image according to the remake mark detection model. Therefore, before determining the authenticity of the data collection behavior of the power meter box, it is necessary to generate a remake mark detection model. The method 400 for generating the remake mark detection model includes the following steps:

[0080] Step S410, acquiring images collected in the data collection behavior, and screening out second images that lack authenticity.

[0081] First, obtain the images collected under the corresponding type of data collection behavior. In this embodiment, this data collection behavior is the image of the external box of the power meter box collected by the staff during the process of filing the power meter box. The images that lack authenticity among these images are screened out as the second image. It should be noted that in the screening, it is necessary to screen in each scene, rather than just screening a certain type of image that lacks authenticity. For example, it is necessary to screen images taken in daytime scenes and images taken in night scenes at the same time to meet the integrity of the model training set.

[0082] Step S420: annotate the first annotation item of the second image.

[0083] Use an image annotation tool to annotate the portion of the second image that meets the first annotation item. For example, you can use the open source image annotation tool LabelMe to annotate the image. Taking into account the application scenarios of the embodiments in the present disclosure, you can use the image annotation tool to annotate complex images such as polygons. After annotation, you can generate an annotation file, such as an XML file, to record the annotation results of the second image. In the subsequent model training process, it is necessary to combine the second image and its annotation file to train the remake logo detection model.

[0084] In this embodiment, all the annotated images are divided into a training set, a validation set and a test set in a ratio of 8:1:1, which are used for training, validation and testing of the re-photographed mark detection model, respectively.

[0085] Step S430, setting training parameters of the copy mark detection model, and training the copy mark detection model.

[0086] In the field of machine learning, there are two types of parameters: one is the parameters obtained through training, which are part of the model, and the other is the parameters preset before starting training. These parameters are not obtained through training and are generally called hyperparameters. By optimizing the hyperparameters, the performance and effect of machine learning can be improved. In the embodiment of the present disclosure, the training parameters that can be preset in step S430 include but are not limited to the learning rate, batch size, and number of iterations.

[0087] The learning rate indicates the magnitude of each parameter update. When the learning rate is too large, the parameters obtained through training will fluctuate repeatedly and widely around the optimal solution, and will not converge. When the learning rate is too small, the parameters obtained through training will converge too slowly.

[0088] Batch size refers to the number of samples for training at one time. A smaller batch size can make the model converge faster, but may increase the volatility of training; while a larger batch size can make the training more stable, but the required computing resources will increase. Therefore, in practical applications, it is necessary to select an appropriate batch size based on the specific task and data set.

[0089] The number of iterations can be understood as the number of times data is processed. Each iteration processes a batch of data and then updates the model parameters based on this data. The number of iterations directly affects the training speed and training effect of the model. Generally speaking, the more iterations, the better the training effect of the model may be, but at the same time, we should also pay attention to the problem of overfitting.

[0090] After setting the training parameters, in this embodiment, the YOLOv8 algorithm is used to train the remake logo detection model. YOLO is an object detection system that predicts based on global image information and can perform tasks including object detection, instance segmentation, and image classification. YOLOv8 supports anchor-free detection and includes 5 models. You can select a suitable model based on the platform hardware device level.

[0091] Step S440, evaluating the copy mark detection model to obtain a first model with the best accuracy.

[0092] During the training, the validation set is used to evaluate the remake logo detection model. In this embodiment, the evaluation is performed every 5 generations. After the training is completed, the model with the best accuracy among the evaluated models is obtained, which is the first model.

[0093] Step S450, testing the first model, when the accuracy of the first model reaches a set threshold, the first model is a copy mark detection model.

[0094] Finally, the first model is tested using the test set. When the accuracy of the first model on the test set reaches a set threshold, the first model is used as a copy mark detection model to identify the copy mark of the first image.

[0095] In some embodiments, the first annotation item includes: black border, white border, screen, and mobile device border.

[0096] Specifically, the first annotation item of the second image is annotated to generate a copy mark detection model. For the second image, part of the first annotation item needs to be manually annotated, and the first annotation item may include black edges, white edges, screen and mobile device borders.

[0097] When an image is generated by means of copying, the photographer generally displays the picture to be copied on a display screen of an electronic device, and then uses another electronic device to capture the content on the display screen.

[0098] When a picture is displayed on an electronic device screen, a single color is used to fill the periphery of the picture as the background, and the color is generally black or white, thus forming a black border or a white border. Therefore, by detecting whether there is a black border or a white border, it can be determined whether the image is a copy.

[0099] Since the object of the remake is the screen, it is also possible to detect whether there is a screen, so as to determine whether the image is a remake. For example, the most common LED screen, due to its display principle, the brightness of the object displayed on the LED screen is significantly higher than that of a normal object, and the LED screen is composed of a dot matrix. When shooting the LED screen at a close distance, it is inevitable that the photographed photo will also appear in a dot matrix shape. By marking the screen and acquiring the features of the screen part through learning, and by detecting whether there is a screen, it can be determined whether the image is a remake. The screen can include a display screen (such as a PC screen) and a mobile device screen.

[0100] One of the most common situations is that the image is copied through a mobile device. The copied image may include part of the border of the mobile device being copied. Therefore, by detecting whether there is a mobile device border, it can be determined whether the image is copied.

[0101] Figure 5 A schematic flow chart of a first video authenticity determination method according to an embodiment of the present disclosure is shown.

[0102] like Figure 5As shown, in some embodiments, the authenticity of the first video is judged to obtain a second judgment result, including: based on the first video, obtaining barcode information of the electric energy meter barcode of the internal electric energy meter; comparing the barcode information obtained through the first video with the existing barcode information to obtain a barcode information comparison result; and obtaining a second judgment result based on the barcode information comparison result.

[0103] Specifically, the authenticity of the first video is judged by the first video authenticity judgment method to obtain the second judgment result. In this embodiment, the first video authenticity judgment method 500 includes the following steps:

[0104] Step S510: Based on the first video, obtain barcode information of the electric energy meter barcode of the internal electric energy meter.

[0105] Extracting video frames from the first video. The essence of each video frame is an image. After the video frames are extracted, image processing and image recognition can be performed on the video frames.

[0106] After extracting the video frames, the electric energy meter barcodes of the internal electric energy meters in each video frame are obtained. In this embodiment, each electric energy meter is provided with a corresponding electric energy meter barcode at a prominent position on its front surface, so when acquiring the first video, the electric energy meter barcodes of all electric energy meters in the electric energy meter box can be acquired. By identifying these electric energy meter barcodes, the barcode information of all electric energy meters in the electric energy meter box can be acquired.

[0107] First, the first extracted video frame is analyzed to obtain all the barcode information contained in the video frame and record it in the barcode information set. Then, the second extracted video frame is analyzed to obtain all the barcode information contained in the video frame and record it in the barcode information set. This process is repeated until all the barcode information contained in the last extracted video frame is obtained and recorded in the barcode information set. Finally, the barcode information set is deduplicated to obtain the barcode information of all the electric energy meters in the electric power meter box.

[0108] Step S520: Compare the barcode information obtained through the first video with the existing barcode information to obtain a barcode information comparison result.

[0109] In this embodiment, the barcode information obtained through the first video can be compared with the existing barcode information in the database corresponding to the power meter box. Before the comparison, the barcode information set of the barcode information obtained through the first video can be sorted to facilitate the comparison between the two. In this embodiment, the QuickSort algorithm is preferably used for sorting. The average time complexity of QuickSort is O(nlog 2 n), which has a good balance between time complexity and space complexity.

[0110] Step S530, obtaining a second judgment result according to the barcode information comparison result.

[0111] For example, during the filing process, if the barcode information obtained through the first video is compared with the barcode information already in the database corresponding to the power meter box, the former includes all the barcode information of the latter, and the former has barcode information that is not recorded in the latter, which means that the electric energy meter corresponding to the unrecorded barcode information has not yet been filed; if the former is completely identical to the latter, it means that all the electric energy meters in the power meter box have been filed; if there is no intersection between the former and the latter, it means that the first video does not correspond to the power meter box, and the conclusion is directly obtained, that is, the authenticity of the first video is judged to be false.

[0112] Figure 6 A schematic flow chart of a method for obtaining barcode information of an electric energy meter barcode of an internal electric energy meter according to an embodiment of the present disclosure is shown.

[0113] like Figure 6 As shown, in some embodiments, based on the first video, the barcode information of the electric energy meter barcode of the internal electric energy meter is obtained, including: parsing the first video to obtain a video frame for locating the electric energy meter barcode; locating the electric energy meter barcode image in the video frame according to the electric energy meter barcode detection model to generate the electric energy meter barcode position information; according to the electric energy meter barcode position information, intercepting a third image containing the electric energy meter barcode image from the video frame; performing barcode recognition on the third image to obtain barcode information; and obtaining all the barcode information and performing deduplication operations.

[0114] Specifically, based on the first video, the barcode information of the electric energy meter barcode of the internal electric energy meter is obtained. The method 600 for obtaining the barcode information of the electric energy meter barcode of the internal electric energy meter includes the following steps:

[0115] Step S610: parse the first video to obtain a video frame for locating the barcode of the electric energy meter.

[0116] A video is composed of a number of video frames. The number of video frames in one second is the frame rate. Usually, the frame rate of a video is 30 frames per second or 60 frames per second. In this step, video frames need to be extracted from the first video. When extracting video frames, each video frame of the first video can be extracted, or the spaced video frames of the first video can be extracted according to the requirements of recognition efficiency, that is, the first video frame is extracted from every two frames as the video frame for locating the barcode of the electric energy meter, so as to reduce the extraction of unnecessary video frames.

[0117] Step S620: positioning the electric energy meter barcode image in the video frame according to the electric energy meter barcode detection model to generate the electric energy meter barcode position information.

[0118] Based on the generated electric energy meter barcode detection model, locate the electric energy meter barcode image in each video frame used to locate the electric energy meter barcode. Use the rectangular detection frame in the model to calibrate the electric energy meter barcode image. The four sides of the rectangular detection frame are parallel to the four sides of the video frame, and are used to frame each identifiable electric energy meter barcode image in a video frame. After the framing is completed, the electric energy meter barcode location information is generated. The electric energy meter barcode location information includes the coordinates of the upper left corner of the rectangular detection frame (x 1 ,y 1 ) 1 , the coordinates of the upper left corner of the rectangular detection box (x 1 ,y 1 ) of y 1 , coordinates of the lower right corner of the rectangular detection box (x 2 ,y 2 ) 2 and the coordinates of the lower right corner of the rectangular detection box (x 2 ,y 2 ) of y 2 , can be obtained by x 1 ,y 1 、x 2 and 2 A rectangular detection frame is marked. Each video frame may have corresponding electric energy meter barcode position information, or may not have corresponding electric energy meter barcode position information. When a video frame has corresponding electric energy meter barcode position information, the number of electric energy meter barcode position information (i.e., electric energy meter barcode images identified in the video frame) may be 1 or more. The electric energy meter barcode position information can be saved using a linked list.

[0119] Step S630: According to the electric energy meter barcode position information generated in step S620, a third image including the electric energy meter barcode image is captured from the video frame.

[0120] According to the barcode position information of the electric energy meter, a third image including the barcode image of the electric energy meter is intercepted from the video frame, and used for barcode recognition of the third image in the subsequent step S640. The intercepted third image can be saved in the memory using a FIFO (first in first out) queue, or can be first saved in a non-temporary computer readable medium, and then read into the memory one by one when the barcode recognition is performed on the third image.

[0121] Step S640: perform barcode recognition on the third image to obtain barcode information.

[0122] In this embodiment, the pyzbar library is used to perform barcode recognition on the third image and obtain barcode information. The pyzbar library is a barcode and two-dimensional code generation and recognition library based on Python, which can recognize barcodes and two-dimensional codes in images and convert them into text.

[0123] Step S650, obtain all barcode information and perform a deduplication operation.

[0124] After obtaining the barcode information of all the third images, a deduplication operation needs to be performed. Since the third images are captured from the video frames, there are inevitably a large number of third images with the same barcode information. The barcode information of all the third images can be put into a chain queue, and the chain queue can be sorted while deduplicating to facilitate the comparison of the barcode information in the subsequent step S520.

[0125] In some embodiments, performing barcode recognition on the third image to obtain barcode information includes: preprocessing the third image to improve the quality and recognition accuracy of the third image.

[0126] Specifically, before using the pyzbar library to perform barcode recognition on the third image, the third image can be preprocessed. For example, the third image can be preprocessed by image tilt correction, contrast enhancement, sharpness enhancement, etc. to improve the quality and recognition accuracy of the third image. Image tilt correction first calculates the rotation angle of the barcode, and then uses the rotation angle to correct the image so that the barcode is no longer tilted as a whole. Contrast enhancement is to enhance the brightness of the image through a related algorithm to avoid the impact of the image being too dark on barcode recognition. Sharpness enhancement is to enhance the edge of the image through a related algorithm to improve the distinction between the barcode and the background and reduce the impact of image blur on recognition.

[0127] Figure 7 A schematic flow chart of a method for generating an electric energy meter barcode detection model according to an embodiment of the present disclosure is shown.

[0128] like Figure 7 As shown, in some embodiments, the method for generating an electric energy meter barcode detection model includes: obtaining a video collected under a data collection behavior, and filtering out a fourth image; annotating the second annotation item of the fourth image; setting the training parameters of the electric energy meter barcode detection model, and training the electric energy meter barcode detection model; evaluating the electric energy meter barcode detection model to obtain a second model with the best accuracy; and testing the second model, and when the accuracy of the second model reaches a set threshold, the second model is the electric energy meter barcode detection model.

[0129] Specifically, in step S620, it is necessary to locate the barcode image of the electric energy meter in the video frame according to the electric energy meter barcode detection model to generate the electric energy meter barcode location information. Therefore, before determining the authenticity of the data collection behavior of the power meter box, it is necessary to generate the electric energy meter barcode detection model. The method 700 for generating the electric energy meter barcode detection model includes the following steps:

[0130] Step S710, obtaining the video collected in the data collection behavior, and screening out the fourth image.

[0131] First, obtain the images collected under the corresponding type of data collection behavior. In this embodiment, this data collection behavior is the video of the internal electric energy meter of the electric energy meter box collected by the staff during the process of archiving the electric energy meter box. The video frames containing the electric energy meter barcode image in the video frames of these videos are filtered out as the fourth image. It should be noted that in the screening, it is necessary to screen in each scene, rather than just screening a certain type of video frames, or just screening the video frames of a certain electric energy meter box. For example, it is necessary to screen video frames shot in daytime scenes and video frames shot in night scenes at the same time, and it is necessary to screen video frames shot of internal electric energy meters of different electric energy meter boxes to meet the integrity of the model training set.

[0132] Step S720: annotate the second annotation item of the fourth image.

[0133] Use the image annotation tool to annotate the portion of the fourth image that matches the second annotation item. After annotation, a annotation file can be generated to record the annotation results of the second image. In the subsequent model training process, the fourth image and its annotation file need to be combined to train the electric energy meter barcode detection model.

[0134] In this embodiment, all the annotated images are divided into a training set, a validation set and a test set in a ratio of 8:1:1, which are used for training, validation and testing of the electric energy meter barcode detection model, respectively.

[0135] Step S730, setting the training parameters of the electric energy meter barcode detection model, and training the electric energy meter barcode detection model.

[0136] In the embodiment of the present disclosure, the training parameters that can be pre-set in step S730 include but are not limited to learning rate, batch size, and number of iterations. After setting the training parameters, in this embodiment, the PicoDet algorithm is used to train the electric energy meter barcode detection model. PicoDet is an ultra-lightweight target detection algorithm designed for mobile devices. The model file of the algorithm is small, the detection speed on mobile devices is fast, up to 150FPS, and the target detection accuracy is high, which is suitable for use on the power meter box in this field.

[0137] Step S740, evaluating the electric energy meter barcode detection model to obtain a second model with the best accuracy.

[0138] During the training, the verification set is used to evaluate the electric energy meter barcode detection model. In this embodiment, the evaluation is performed every 5 generations. After the training is completed, the model with the best accuracy among the evaluated models is obtained, which is the second model.

[0139] Step S750, testing the second model, when the accuracy of the second model reaches a set threshold, the second model is an electric energy meter barcode detection model.

[0140] Finally, the second model is tested using the test set. When the accuracy of the second model on the test set reaches the set threshold, the second model is used as the electric energy meter barcode detection model to recognize the electric energy meter barcode image in the video frame.

[0141] In some embodiments, the second annotation item includes: an electric energy meter and an electric energy meter barcode.

[0142] Specifically, the second annotation item of the fourth image is annotated to generate the electric energy meter barcode detection model. For the fourth image, part of the second annotation item needs to be manually annotated, and the second annotation item may include the electric energy meter and the electric energy meter barcode.

[0143] The fourth image is a video frame containing an electric energy meter barcode image, so the image mainly includes an electric energy meter and its corresponding electric energy meter barcode. By distinguishing between the electric energy meter and the electric energy meter barcode, it can be used to identify and locate the electric energy meter barcode image portion in the fourth image. The electric energy meter barcode image is calibrated using the rectangular detection frame in the model. The four sides of the rectangular detection frame are parallel to the four sides of the video frame, respectively, and are used to frame each identifiable electric energy meter barcode image in a video frame. After the framing is completed, the electric energy meter barcode position information is generated for subsequent identification of the electric energy meter barcode to obtain the barcode information.

[0144] Figure 8 A structural block diagram of a device for determining the authenticity of data collection behavior of an electric power meter box according to an embodiment of the present disclosure is shown.

[0145] like Figure 8 As shown, a device for determining the authenticity of the data collection behavior of an electric power meter box comprises: a processor configured to execute program instructions; and a memory configured to store program instructions; wherein, when the program instructions are loaded and executed by the processor, the device executes any one of the methods for determining the authenticity of the data collection behavior of the electric power meter box of the disclosed embodiments.

[0146] Specifically, the device 800 can be implemented as various types of devices, including but not limited to mainframes, personal computers (PCs), mobile devices, etc. The device 800 includes a processor 810 and a memory 820. The processor 810 controls the operation of the device 800 by executing the program stored in the memory 820. The processor 810 can be implemented using, including but not limited to, a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. The memory 820 can be used to store various data and instructions processed in the device 800, including the method for determining the authenticity of the data collection behavior of the power meter box in the embodiment of the present disclosure. The memory 820 may include at least one of a volatile memory or a non-volatile memory. The non-volatile memory may include a read-only memory (ROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), etc. The volatile memory may include a dynamic RAM (DRAM), a static RAM (SRAM), a synchronous DRAM (SDRAM), etc. In addition, the memory 820 may also include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, a cache, or a memory stick.

[0147] The authenticity determination method disclosed in the present invention can determine the authenticity of the data collection behavior of the power meter box without adding additional hardware equipment or additional operating procedures. In the embodiment of the present invention, by making authenticity determinations on the first image and the first video respectively, and then determining the authenticity of the data collection behavior of the power meter box based on the first determination result and the second determination result, the determination error that may be caused by determining only through a single data source is avoided. By first determining the authenticity of the first image with less calculation time, and then determining the authenticity of the first video with more calculation time, when the authenticity of the data collection behavior of the power meter box has been determined to be negative through the first image, it is avoided to waste time to continue to determine the authenticity of the first video.

[0148] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for determining the authenticity of data collection behavior of an electric power meter box, characterized in that: The method comprises: Acquire a first image, wherein the first image includes an image of an external box body of the power meter box; Performing authenticity judgment on the first image to obtain a first judgment result; Acquire a first video, wherein the first video includes a video of an internal electric energy meter of the electric power meter box; Performing authenticity judgment on the first video to obtain a second judgment result; and The authenticity of the data collection behavior of the power meter box is determined according to the first judgment result and the second judgment result.

2. The method according to claim 1, characterized in that Performing authenticity judgment on the first image to obtain a first judgment result includes: Performing moiré recognition on the first image to obtain a moiré recognition result; performing copy mark recognition on the first image according to the copy mark detection model to obtain a copy mark recognition result; and The first judgment result is obtained according to the moiré pattern recognition result and the copy mark recognition result.

3. The method according to claim 2, characterized in that Performing moiré recognition on the first image to obtain a moiré recognition result includes: Converting the first image from RGB color space to grayscale space; converting the first image from the grayscale space to a spectral space; Processing the first image to obtain target spectrum information; and The moiré recognition result is obtained according to the target spectrum information.

4. The method according to claim 2, characterized in that: The method for generating the remake mark detection model includes: Acquire images collected under the data collection behavior, and screen out second images that lack authenticity; Annotating the first annotation item of the second image; Setting training parameters of the remake mark detection model and training the remake mark detection model; Evaluating the remake mark detection model to obtain a first model with the best accuracy; and The first model is tested, and when the accuracy of the first model reaches a set threshold, the first model is the copy mark detection model.

5. The method according to claim 4, characterized in that The first annotation items include: black borders, white borders, screen borders, and mobile device borders.

6. The method according to claim 1, characterized in that Performing authenticity judgment on the first video to obtain a second judgment result includes: Based on the first video, obtaining barcode information of an electric energy meter barcode of the internal electric energy meter; Comparing the barcode information obtained through the first video with the existing barcode information to obtain a barcode information comparison result; and The second judgment result is obtained according to the barcode information comparison result.

7. The method according to claim 6, characterized in that Based on the first video, obtaining barcode information of an electric energy meter barcode of the internal electric energy meter includes: Parsing the first video to obtain a video frame for locating the electric energy meter barcode; According to the electric energy meter barcode detection model, the electric energy meter barcode image in the video frame is located to generate the electric energy meter barcode position information; According to the electric energy meter barcode position information, intercepting a third image including the electric energy meter barcode image from the video frame; Performing barcode recognition on the third image to obtain the barcode information; and Obtain all the barcode information and perform a deduplication operation.

8. The method according to claim 7, characterized in that The method for generating the electric energy meter barcode detection model comprises: Acquire the video collected in the data collection behavior, and filter out the fourth image; marking the second marking item of the fourth image; Setting training parameters of the electric energy meter barcode detection model and training the electric energy meter barcode detection model; Evaluating the electric energy meter barcode detection model to obtain a second model with the best accuracy; and The second model is tested, and when the accuracy of the second model reaches a set threshold, the second model is the electric energy meter barcode detection model.

9. The method according to claim 8, characterized in that The second marking items include: an electric energy meter and an electric energy meter barcode.

10. A device for determining the authenticity of data collection behavior of an electric power meter box, comprising: a processor configured to execute program instructions; as well as a memory configured to store the program instructions; It is characterized in that when the program instructions are loaded and executed by the processor, the device executes the method according to any one of claims 1-9.