Curve set source data extraction method and device

By extracting the curve image source data in the converter type test report, the problem of time-consuming and costly construction and debugging of traditional converter grid-connected models is solved, and an efficient actual measurement modeling process is achieved.

CN120088502APending Publication Date: 2025-06-03STATE GRID HEBEI ELECTRIC POWER RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411947945.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The construction and debugging process of traditional converter grid-connected models is time-consuming and expensive. It requires the construction and optimization of models through actual measured data. The performance indicators of different models of converters are uneven, resulting in the extended test modeling cycle and low modeling efficiency.

Method used

By acquiring the curve image in the converter type test report and preprocessing it, the target RGB value is determined based on the initial RGB value and color judgment threshold of each pixel point of the image, the target RGB value is determined, the active curve, reactive curve and voltage curve of the curve image are separated, and the source data corresponding to the curve image is extracted.

Benefits of technology

It realizes the direct extraction of curve image source data in the converter type test report, eliminating the construction and debugging of the converter grid-connected model in the traditional test modeling process, improving the recognition accuracy and speed, and improving the measured modeling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088502A_ABST
    Figure CN120088502A_ABST
Patent Text Reader

Abstract

The invention provides a curve set source data extraction method and device, and belongs to the field of new energy grid-connected modeling. The method comprises the following steps: acquiring a curve image of a converter type test report, and preprocessing the curve image; obtaining a target RGB value of each pixel point according to the initial RGB value of each pixel point of the image; by taking the target RGB value as a classification basis, separating highly aliasing active curves, reactive curves and voltage curves in the curve images based on an improved supervised clustering method to obtain curve images respectively containing curve pixel points; and converting the position of each curve pixel point in each curve image into the coordinate of a data point through a pixel point-coordinate conversion method, thereby completing the extraction of the converter type test report source data. According to the method, the curve source data can be directly obtained through the test result of the converter authoritative test report, and the actual measurement modeling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of new energy grid-connected modeling, and particularly to a method and device for extracting curve set source data. Background Art

[0002] In modern power systems, the development of new energy grid-connected technology is crucial for improving energy utilization efficiency and grid stability. As the proportion of new energy connected to the grid continues to increase, profound changes have occurred in the topological structure, operating characteristics, transient mechanisms, etc. of the main power grid and distribution network. To analyze the transient characteristics of complex networks, it is necessary to extract the characteristic parameters of new energy through measured modeling. As the core equipment for new energy grid connection, the performance of the converter directly affects the stability and efficiency of the grid-connected system. The traditional process of building and debugging the converter grid-connected model is time-consuming and costly, and it is necessary to establish and optimize the model through measured data.

[0003] In the measured modeling process based on hardware-in-the-loop technology, first, a single-machine grid-connected model needs to be built and debugged. This requires building a model of the photovoltaic-converter-grid in the host computer to construct a semi-physical test environment; then, the converter controller is installed in a semi-physical test box with analog output / analog input and digital output / digital input interfaces, and a closed-loop test is carried out to obtain the fault ride-through data of the grid-connected converter, so as to complete the extraction of the transient characteristics of the converter.

[0004] In the entire measured modeling process, the time and effort consumed in building and debugging the single-machine grid-connected model are the largest. This link involves the cooperation of power grid enterprises, power generation enterprises, and equipment manufacturers, and there are problems such as a large number of involved personnel, a long test cycle, and high uncertainty. In addition, the manufacturing threshold of converter equipment is low, and the converters actually used in grid connection often come from different manufacturers and have different models. The performance indicators of these devices vary, and it is necessary to test the fault ride-through data of different devices separately, which directly leads to an extended measured modeling cycle and low modeling efficiency. Summary of the Invention

[0005] The present invention provides a method and device for extracting curve set source data to directly obtain the source data of the curves in the converter type test report and improve the problem of the measured modeling efficiency of grid-connected converters.

[0006] The present invention is realized through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for extracting curve set source data, including:

[0008] Obtain the curve images in the converter type test report and perform preprocessing to obtain a target image; wherein, the target image includes active power curves, reactive power curves, and voltage curves;

[0009] Determine the target RGB value of each pixel point of the target image according to the initial RGB value and color judgment threshold of each pixel point of the target image; the color judgment threshold includes a dynamic threshold and a preset threshold;

[0010] Determine a first image, a second image, and a third image according to the target RGB value of each pixel point of the target image. The first image includes the active power curve of the target image, the second image includes the reactive power curve of the target image, and the third image includes the voltage curve of the target image;

[0011] Extract the coordinate data of each point on the active power curve, reactive power curve, and voltage curve according to the first image, the second image, and the third image, and obtain the source data corresponding to the curve image.

[0012] Combined with the first aspect, in some possible implementation manners, the determining the target RGB value of each pixel point of the target image according to the initial RGB value and color judgment threshold of each pixel point of the target image includes:

[0013] For each pixel point in the target image, determine the color variance corresponding to the pixel point according to the initial RGB value of the pixel point; the color variance is the variance of the R, G, and B components;

[0014] Calculate the dynamic threshold based on the R, G, and B components of all pixel points of the target image;

[0015] Determine the target RGB value corresponding to the pixel point based on the color variance corresponding to the pixel point, the dynamic threshold, and the preset thresholds corresponding to multiple colors.

[0016] The dynamic threshold includes a first threshold, a second threshold, and a third threshold; the first threshold is the minimum value of the R component of all pixel points of the target image, the second threshold is the minimum value of the G component of all pixel points of the target image, the third threshold is the minimum value of the B component of all pixel points of the target image; the multiple colors include red, green, blue, black, and white.

[0017] Determining the target RGB value corresponding to the pixel point based on the color variance corresponding to the pixel point, the dynamic threshold, and the preset thresholds corresponding to multiple colors includes:

[0018] Obtain the imdata matrix of the target image. The imdata matrix includes the matrix composed of the initial RGB values of each pixel point of the target image; the imdata matrix can be expressed as:

[0019] imdata(i,j,m)RGB(n),(n = 1,2,3)

[0020] When the color variance var(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of a pixel at position (i,j) > Var th 1 and imdata(i,j,1) > 255 * 0.8, the pixel is determined to be red, and the target RGB value of the corresponding pixel is (255, 0, 0);

[0021] When the color variance var(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of a pixel at position (i,j) > Var th 2 and imdata(i,j,2) > 255 * 0.8, the pixel is determined to be green, and the target RGB value of the corresponding pixel is (0, 255, 0);

[0022] When the color variance var(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of a pixel at position (i,j) > Var th 3 and imdata(i,j,3) > 255 * 0.8, the pixel is determined to be blue, and the target RGB value of the corresponding pixel is (0, 0, 255);

[0023] When the color variance var(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of a pixel at position (i,j) < Var th 2 and the maximum RGB value max(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of the pixel < 255 * 0.2, the pixel is determined to be black, and the target RGB value of the corresponding pixel is (0, 0, 0);

[0024] When the color variance var(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of a pixel at position (i,j) > Var th 3 and the minimum RGB value min(imdata(i,j,1), imdata(i,j,2), imdata(i,j,3)) of the pixel > 255 * 0.8, the pixel is determined to be white, and the target RGB value of the corresponding pixel is (255, 255, 255);

[0025] where Var th1 , Var th 2 and Var th 3 are the first threshold, the second threshold, and the third threshold, respectively corresponding to the minimum values of the R component, G component, and B component in the imdata matrix, and are obtained through the following formula:

[0026]

[0027] Combined with the first aspect, in some possible implementation manners, determining the first image, the second image, and the third image according to the target RGB values of each pixel point of the target image includes:

[0028] Based on the improved k-means clustering method, classify according to the movement characteristics of the centroid among the pixel points of the target image and the target RGB values, separate the pixel points of the target image, and obtain the active power curve, reactive power curve, and voltage curve;

[0029] Determine the first image according to the active power curve;

[0030] Determine the second image according to the reactive power curve.

[0031] Determine the third image according to the voltage curve.

[0032] Combined with the first aspect, in some possible implementation manners, the preprocessing includes:

[0033] Perform planar convolution on the curve image to obtain the convolved curve image;

[0034] Perform coordinate detection on the convolved curve image to obtain the curve image after coordinate detection;

[0035] Perform inclination correction on the curve image after coordinate detection to obtain the curve image after inclination correction;

[0036] Perform denoising on the curve image after inclination correction to obtain the target image.

[0037] In some possible implementation manners, performing coordinate detection on the convolved curve image to obtain the curve image after coordinate detection includes:

[0038] Based on the line detection and transformation method, detect the edge of the convolved curve image, locate the upper, lower, left, and right edge positions of the convolved curve image, and obtain the picture of the X-axis and Y-axis edge coordinates of the curve image. Obtain the actual coordinate values at this place through optical character recognition, and calculate the scale of the convolved curve image and the true coordinates (X act , Y act ) of each pixel point of the coordinate axis to obtain the curve image after coordinate detection.

[0039] In some possible implementations, the inclination correction of the curve image after coordinate detection to obtain the inclination-corrected curve image includes:

[0040] Performing a polar coordinate transformation on the curve image after coordinate detection to obtain the inclination θ of the straight line and the curvature K of the curve in the image; based on the obtained inclination θ of the straight line and the curvature K of the curve, correcting the curve image based on the fuzzy interpolation algorithm to ensure that the inclination angle of the image is 0, completing the correction of the inclined and curved image, and obtaining the inclination-corrected curve image;

[0041] In some possible implementations, the denoising of the inclination-corrected curve image to obtain the target image includes:

[0042] Converting the RGB value corresponding to the pixel position (i, j) in the RGB color matrix of the inclination-corrected curve image into the value 0 (black) or 1 (white) corresponding to the pixel position (i, j) in the image pixel matrix imdata1 to obtain the imdata1 matrix;

[0043] The dimension of the imdata1 matrix is p×q. Set the traversal row and column vector operators as i and j; the row vector i = [1:5:p - NFnumth + 1], the column vector j = [1:5:q - NFnumth + 1], and traverse with a sliding window of NFnumth×NFnumth;

[0044] Calculate the sum of all elements in the i-th row to the (i + NFnumth - 1)-th row and the j-th column to the (j + NFnumth - 1)-th column of the imdata1 matrix, sum([i:i + NFnumth - 1], [j:j + NFnumth - 1]). If the sum of all elements is less than NFnumth 2 -Width, then capture the midpoint position (ZeroActi, ZeroActj) of the sliding window; where Width is the line width of the curve;

[0045] Set NFnumth as a fixed value of 4, calculate the sum sum(imdata1(ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4)) of [ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4]. If its value is greater than 81 - Width, then assign 1 to all elements in imdata1(ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4), and assign (255, 255, 255) to the corresponding position (r, g, b) matrix in the RGB color matrix of the inclination-corrected curve image to complete the noise filtering and obtain the target image.

[0046] In combination with the first aspect, in some possible implementation manners, the obtaining of the source data corresponding to the curve image by extracting the coordinate data of each point on the active power curve, reactive power curve, and voltage curve according to the first image, second image, and third image includes:

[0047] Based on the figure-data method, according to the positions of the pixel points of the first image, second image, and third image, determine the coordinates of each data point on the active power curve, reactive power curve, and voltage curve, and obtain the source data of the curve image in the converter type test report.

[0048] In a second aspect, the present invention provides a curve set source data extraction device, including:

[0049] An image preprocessing module, configured to obtain the curve image in the converter type test report and perform preprocessing to obtain a target image; wherein, the target image includes an active power curve, a reactive power curve, and a voltage curve;

[0050] A color conversion module, configured to determine the target RGB value of each pixel point of the target image according to the initial RGB value and color judgment threshold of each pixel point of the target image; the color judgment threshold includes a dynamic threshold and a preset threshold;

[0051] A curve separation module, configured to determine the first image, second image, and third image according to the target RGB value of each pixel point of the target image, where the first image includes the active power curve of the target image, the second image includes the reactive power curve of the target image, and the third image includes the voltage curve of the target image;

[0052] A data extraction module, configured to extract the coordinate data of each point on the active power curve, reactive power curve, and voltage curve according to the first image, second image, and third image, and obtain the source data corresponding to the curve image.

[0053] The beneficial effects of the present invention compared with the prior art are:

[0054] The present invention extracts the source data of the curve image in the converter type test report by obtaining the curve image in the converter type test report and performing preprocessing, determining the target RGB value according to the initial RGB value and color judgment threshold of each pixel point in the image; separating the active power curve, reactive power curve and voltage curve of the curve image according to the target RGB value to obtain the first image, the second image and the third image after curve separation respectively; converting the positions of each pixel point on the active power curve, reactive power curve and voltage curve into the coordinates of data points according to the first image, the second image and the third image, so as to complete the extraction of the source data of the curve image in the converter type test report. Since the active power curve, reactive power curve and voltage curve of the curve image are separated according to the target RGB value, the color can provide a basis for distinguishing the curves to which different pixel points belong. Therefore, the direct extraction of transient source data is realized, which not only omits the steps of building and debugging the converter grid connection model in the traditional measured modeling process, but also improves the recognition accuracy and speed, and improves the measured modeling efficiency on the premise of ensuring accurate modeling. Description of the Drawings

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0056] Figure 1 is the implementation flowchart of the method for extracting the source data of the curve set provided by the embodiment of the present invention;

[0057] Figure 2 is the curve image of the converter type test report provided by the embodiment of the present invention;

[0058] Figure 3 is the schematic diagram of the target image provided by the embodiment of the present invention

[0059] Figure 4 is the schematic diagram of the selection of the centroid initial value based on the improved supervised clustering algorithm provided by the embodiment of the present invention;

[0060] Figure 5 is the schematic diagram of the first image provided by the embodiment of the present invention;

[0061] Figure 6 is the schematic diagram of the second image provided by the embodiment of the present invention;

[0062] Figure 7 is the schematic diagram of the third image provided by the embodiment of the present invention;

[0063] Figure 8 is the schematic diagram of the principle of data point coordinate conversion provided by the embodiment of the present invention;

[0064] Figure 9 It is a curve graph redrawn after extracting source data from a curve image provided by an embodiment of the present invention;

[0065] Figure 10 It is a schematic structural diagram of a curve set source data extraction device provided by an embodiment of the present invention. Specific Embodiments

[0066] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0067] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will be described through specific embodiments in conjunction with the accompanying drawings.

[0068] An embodiment of the present invention provides a method for extracting curve set source data, Figure 1 It is a flowchart for implementing the method for extracting curve set source data provided by an embodiment of the present invention. Referring to Figure 1 , the detailed description of the method for extracting curve set source data is as follows:

[0069] Step 101: Obtain a curve image from a converter type test report and perform preprocessing to obtain a target image; wherein, the target image includes an active power curve, a reactive power curve, and a voltage curve.

[0070] An embodiment of the present invention provides a curve image of a converter type test report, as shown in Figure 2 .

[0071] The embodiment of the present invention does not specifically limit the specific implementation means for obtaining the curve image from the converter type test report, and any implementable means can be used.

[0072] In this embodiment, preprocessing the curve image to obtain a target image may include:

[0073] Performing planar convolution on the curve image to obtain a convolved curve image;

[0074] Performing coordinate detection on the convolved curve image to obtain a curve image after coordinate detection;

[0075] Performing inclination correction on the curve image after coordinate detection to obtain a curve image after inclination correction;

[0076] Performing denoising on the curve image after inclination correction to obtain the target image.

[0077] Specifically, based on the straight line detection and transformation method, the edges of the convolved curve image are detected, the upper, lower, left, and right edge positions of the convolved curve image are located, and a picture of the X-axis and Y-axis edge coordinates of the curve image is obtained. The actual coordinate values at this location are obtained through optical character recognition, and the scale of the convolved curve image and the true coordinates (X act , Y act ) of each pixel point on the coordinate axis are calculated to obtain the curve image after coordinate detection.

[0078] Specifically, the curve image after coordinate detection is subjected to polar coordinate transformation to obtain the straight line inclination angle θ and the curve curvature K in the image; based on the obtained straight line inclination angle θ and curve curvature K, the curve image is corrected based on the fuzzy interpolation algorithm to ensure that the inclination angle of the image is 0, and the correction of the tilted and curved image is completed to obtain the curve image after inclination correction.

[0079] The embodiment of the present invention provides a schematic diagram of the edge detection result of the curve image in a type test report, as shown in Figure 4 shown; the angle θ in the figure represents the polar angle obtained by the edge detection of the image, that is, the straight line inclination angle.

[0080] Specifically, based on the sliding window detection method, the curve image after inclination correction is denoised to remove the color points in the area outside the curve;

[0081] The RGB value corresponding to the pixel position (i, j) in the RGB color matrix of the curve image after inclination correction is converted into the value 0 (black) or 1 (white) corresponding to the pixel position (i, j) in the image pixel matrix imdata1 to obtain the imdata1 matrix;

[0082] The dimension of the imdata1 matrix is p×q. Set the traversal row and column vector operators as i and j; the row vector i = [1:5:p - NFnumth + 1], the column vector j = [1:5:q - NFnumth + 1], and traverse with a sliding window of NFnumth×NFnumth;

[0083] Calculate the sum of all elements in the i-th row to the (i + NFnumth - 1)-th row and the j-th column to the (j + NFnumth - 1)-th column of the imdata1 matrix, sum([i:i + NFnumth - 1], [j:j + NFnumth - 1]). If the sum of all elements is less than NFnumth 2 -Width, then capture the midpoint position (ZeroActi, ZeroActj) of the sliding window; where Width is the line width of the curve;

[0084] Set NFnumth as a fixed value of 4, calculate the sum sum(imdata1(ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4)) of [ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4]. If its value is greater than 81 - Width, assign 1 to all elements in imdata1(ZeroActi - 4:ZeroActi + 4, ZeroActj - 4:ZeroActj + 4), and assign (255, 255, 255) to the corresponding position (r, g, b) matrix in the RGB color matrix of the curve image after inclination correction, complete noise filtering, and obtain the target image.

[0085] An embodiment of the present invention provides a schematic diagram of a target image, as Figure 3 shown.

[0086] Step 102, determine the target RGB value of each pixel point of the target image according to the initial RGB value and color judgment threshold of each pixel point of the target image; the color judgment threshold includes a dynamic threshold and a preset threshold.

[0087] In this embodiment, determining the target RGB value of each pixel point of the target image according to the initial RGB value and color judgment threshold of each pixel point of the target image may include:

[0088] For each pixel point in the target image, determine the color variance corresponding to the pixel point according to the initial RGB value of the pixel point; the color variance is the variance of the R, G, and B components;

[0089] Based on the R, G, and B components of all pixel points of the target image, calculate the dynamic threshold;

[0090] Based on the color variance corresponding to the pixel point, the dynamic threshold, and the preset thresholds corresponding to multiple colors, determine the target RGB value corresponding to the pixel point.

[0091] The dynamic threshold includes a first threshold, a second threshold, and a third threshold; the first threshold is the minimum value of the R component of all pixel points of the target image, the second threshold is the minimum value of the G component of all pixel points of the target image, the third threshold is the minimum value of the B component of all pixel points of the target image; the multiple colors include red, green, blue, black, and white.

[0092] Based on the color variance corresponding to the pixel point, the dynamic threshold, and the preset thresholds corresponding to multiple colors, determining the target RGB value corresponding to the pixel point may include:

[0093] Obtain the imdata matrix of the target image. The imdata matrix includes a matrix composed of the initial RGB values of each pixel point of the target image. The imdata matrix can be expressed as:

[0094] imdata(i, j, m) = RGB(n), (n = 1, 2, 3)

[0095] When the color variance var(imdata(i, j, 1), imdata(i, j, 2), imdata(i, j, 3)) of a certain pixel point at position (i, j) > Var th 1 , and imdata(i, j, 1) > 255 * 0.8, it is determined that the pixel point is red, and the target RGB value of the corresponding pixel point is (255, 0, 0);

[0096] When the color variance var(imdata(i, j, l), imdata(i, j, 2), imdata(i, j, 3)) of a certain pixel point at position (i, j) > Var th 2 , and imdata(i, j, 2) > 255 * 0.8, it is determined that the pixel point is green, and the target RGB value of the corresponding pixel point is (0, 255, 0);

[0097] When the color variance var(imdata(i, j, l), imdata(i, j, 2), imdata(i, j, 3)) of a certain pixel point at position (i, j) > Var th 3 , and imdata(i, j, 3) > 255 * 0.8, it is determined that the pixel point is blue, and the target RGB value of the corresponding pixel point is (0, 0, 255);

[0098] When the color variance var(imdata(i, j, l), imdata(i, j, 2), imdata(i, j, 3)) of a certain pixel point at position (i, j) < Var th 2 , and the maximum RGB value max(imdata(i, j, 1), imdata(i, j, 2), imdata(i, j, 3)) of the pixel point < 255 * 0.2, it is determined that the pixel point is black, and the target RGB value of the corresponding pixel point is (0, 0, 0);

[0099] When the color variance var(imdata(i, j, 1), imdata(i, j, 2), imdata(i, j, 3)) of a certain pixel point at position (i, j) > Var th 3When the minimum value of RGB of the pixel point, min(imdata(i, j, 1), imdata(i, j, 2), imdata(i, j, 3)) > 255 * 0.8, it is determined that the pixel point is white, and the target RGB value of the corresponding pixel point is (255, 255, 255);

[0100] Among them, Var th 1 、Var th 2 and Var th 3 are the first threshold, the second threshold and the third threshold, corresponding to the minimum values of the R component, G component and B component in the imdata matrix respectively, and are obtained by the following formula:

[0101]

[0102] Step 103: Determine the first image, the second image and the third image according to the target RGB values of the pixel points of the target image. The first image includes the active power curve of the target image, the second image includes the reactive power curve of the target image, and the third image includes the voltage curve of the target image.

[0103] Specifically, based on the improved k-means clustering method, classification is performed according to the movement characteristics of the centroid among the pixel points of the target image and the target RGB value, and the pixel points of the target image are clustered and segmented to obtain the active power curve, the reactive power curve and the voltage curve, and the first image including the active power curve, the second image including the reactive power curve and the third image including the voltage curve are determined respectively.

[0104] Optionally, in the clustering segmentation, the initial value of the centroid is manually selected, and the number of curve clusters N contained in the image and the RGB values (R 1 ref , G 1 ref , B 1 ref )...(R N ref , G N ref , B N ref ) of each curve color are manually judged;

[0105] Optionally, in the clustering segmentation, the initial value of the centroid is selected according to the integral solution result, and the N initial values of the centroid of N clusters of data (R 1 ini , G 1 ini , B 1 ini )...(R N ini , GN ini , B N ini ) is the center of N spherical regions with a radius of r. The radius r and the center of each spherical region are obtained by triple integration of more than 85% of the data points in the data points of the curve color, that is, at least 85% of the data points in the data points of the curve color can be included in the spherical region. Figure 4 is a schematic diagram of the selection of the initial centroid value based on the improved supervised clustering algorithm provided by the embodiment of the present invention. According to the RGB values of the color, the positions of the respective pixel points of the curve in the RGB space are determined, and multiple spherical regions with a radius of r are obtained by triple integration. Different spherical regions contain more than 85% of the points in the characteristic point clusters of different color curves. Figure 4 shows the position of an initial value of the original RGB feature point, indicating that the method for selecting the initial centroid value according to the integration result adopted by the embodiment of the present invention can improve the efficiency and effect of the selection of the initial centroid value.

[0106] The embodiment of the present invention provides a schematic diagram of a first image, as Figure 5 shown;

[0107] The embodiment of the present invention provides a schematic diagram of a second image, as Figure 6 shown;

[0108] The embodiment of the present invention provides a schematic diagram of a third image, as Figure 7 shown;

[0109] Step 104, according to the first image, the second image, and the third image, extract the coordinate data of each point on the active power curve, the reactive power curve, and the voltage curve to obtain the source data corresponding to the curve image.

[0110] Specifically, based on the figure-data method, according to the detected edge coordinates and the scale, based on the values of i and j representing the pixel point positions in the first image, the second image, and the third image, the coordinate values (x, y) of the data points are deduced; the conversion principle between the pixel point position values (i, j) and the data point coordinates (x, y) is as Figure 8 shown; in the figure, y top represents the coordinate of the upper edge of the curve image on the Y axis, y down represents the coordinate of the lower edge of the curve image on the Y axis, x left represents the coordinate of the left edge of the curve image on the X axis, x right represents the coordinate of the right edge of the curve image on the X axis.

[0111] Determine the coordinates (x, y) of each data point on the active power curve, the reactive power curve, and the voltage curve, and complete the extraction of the source data of the curve image in the converter type test report.

[0112] An embodiment of the present invention provides a curve graph that extracts source data from a curve image and then redraws it, as Figure 9 shown; the curves drawn in the figure include the active current curve I d Test , the reactive current curve I q Test and the voltage curve U Test .

[0113] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0114] The following is an embodiment of the device of the present invention. For the details not described in detail, reference can be made to the corresponding method embodiments above.

[0115] Figure 10 is a schematic structural diagram of a curve set source data extraction device provided by an embodiment of the present invention. For the convenience of description, only the parts related to the embodiments of the present invention are shown and are described in detail as follows:

[0116] As Figure 10 shown, the curve set source data extraction device 100 includes:

[0117] An image preprocessing module 1001, configured to obtain a curve image in a converter type test report and perform preprocessing to obtain a target image; wherein, the target image includes an active curve, a reactive curve, and a voltage curve;

[0118] A color conversion module 1002, configured to determine the target RGB value of each pixel point of the target image according to the initial RGB value and the color judgment threshold of each pixel point of the target image; the color judgment threshold includes a dynamic threshold and a preset threshold;

[0119] A curve separation module 1003, configured to determine a first image, a second image, and a third image according to the target RGB value of each pixel point of the target image. The first image includes the active curve of the target image, the second image includes the reactive curve of the target image, and the third image includes the voltage curve of the target image;

[0120] A data extraction module 1004, configured to extract the coordinate data of each point on the active curve, the reactive curve, and the voltage curve according to the first image, the second image, and the third image, and obtain the source data corresponding to the curve image.

[0121] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not described in detail or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0122] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0123] If a module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0124] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A curve source data extraction method, characterized in that: include: Obtaining the curve image in the converter type test report and performing preprocessing to obtain a target image; wherein the target image includes an active power curve, a reactive power curve and a voltage curve; Determine the target RGB value of each pixel of the target image according to the initial RGB value of each pixel of the target image and the color judgment threshold; the color judgment threshold includes a dynamic threshold and a preset threshold; Determine a first image, a second image, and a third image according to target RGB values ​​of each pixel of the target image, wherein the first image includes an active power curve of the target image, the second image includes a reactive power curve of the target image, and the third image includes a voltage curve of the target image; According to the first image, the second image and the third image, the coordinate data of each point on the active power curve, the reactive power curve and the voltage curve are extracted to obtain the source data corresponding to the curve images.

2. The curve source data extraction method according to claim 1, characterized in that: Determining the target RGB value of each pixel of the target image according to the initial RGB value of each pixel of the target image and the color judgment threshold comprises: For each pixel in the target image, determine the color variance corresponding to the pixel according to the initial RGB value of the pixel; the color variance is the variance of the three components R, G, and B; Calculate the dynamic threshold based on the R, G, and B components of all pixels of the target image; The target RGB value corresponding to the pixel is determined based on the color variance corresponding to the pixel, the dynamic threshold, and the preset thresholds corresponding to multiple colors.

3. The curve source data extraction method according to claim 2, characterized in that: The dynamic threshold includes a first threshold, a second threshold and a third threshold; the first threshold is the minimum value of the R component of all pixels of the target image, the second threshold is the minimum value of the G component of all pixels of the target image, and the third threshold is the minimum value of the B component of all pixels of the target image; The multiple colors include red, green, blue, black and white; the determining the target RGB value corresponding to the pixel point based on the color variance corresponding to the pixel point, the dynamic threshold and the preset thresholds corresponding to the multiple colors includes: For each pixel in the target image, when the color variance of the pixel is greater than the first threshold and the R component value in the RGB value of the pixel is greater than the preset threshold corresponding to red, determine that the target RGB value of the pixel is a pure red RGB value; For each pixel in the target image, when the color variance of the pixel is greater than the second threshold value, and the G component value in the RGB value of the pixel is greater than the preset threshold value corresponding to green, determine that the target RGB value of the pixel is a pure green RGB value; For each pixel in the target image, when the color variance of the pixel is greater than the third threshold and the B component value in the RGB value of the pixel is greater than the preset threshold corresponding to blue, determine that the target RGB value of the pixel is a pure blue RGB value; For each pixel in the target image, when the color variance of the pixel is less than the second threshold value and the maximum value of the initial RGB value of the pixel is less than the preset threshold value corresponding to black, determine that the target RGB value of the pixel is a pure black RGB value; For each pixel in the target image, when the color variance of the pixel is greater than the third threshold and the minimum value of the initial RGB value of the pixel is greater than the preset threshold corresponding to white, the target RGB value of the pixel is determined to be a pure white RGB value.

4. The curve source data extraction method according to claim 1, characterized in that: Determining the first image, the second image, and the third image according to the target RGB value of each pixel of the target image includes: Based on an improved supervised clustering method, classification is performed according to the movement characteristics of the centroid between the pixels of the target image and the target RGB value, the pixels of the target image are separated, and the active power curve, the reactive power curve and the voltage curve are obtained; Determining the first image according to the active power curve; Determining the second image according to the reactive power curve; The third image is determined according to the voltage curve.

5. The curve source data extraction method according to claim 1, characterized in that: The pre-processing comprises: Performing a planar convolution on the curve image to obtain a convolved curve image; Performing coordinate detection on the convolved curve image to obtain a curve image after coordinate detection; Performing inclination correction on the curve image after coordinate detection to obtain an inclination-corrected curve image; The inclination-corrected curve image is denoised to obtain a target image.

6. The curve source data extraction method according to claim 5, characterized in that: The performing coordinate detection on the curve image after the convolution to obtain the curve image after the coordinate detection comprises: Based on the straight line detection and transformation method, the edge of the convolved curve image is detected, the upper, lower, left and right edge positions of the convolved curve image are located, and the starting and ending coordinate values ​​of the coordinate axis of the convolved curve image are obtained. The scale of the convolved curve image and the true coordinates of each pixel point on the coordinate axis are calculated to obtain the curve image after coordinate detection.

7. The curve source data extraction method according to claim 5, characterized in that: The performing inclination correction on the curve image after the coordinate detection to obtain the curve image after the inclination correction comprises: Based on the interpolation algorithm, the tilt or bending condition of the curve image after the coordinate detection is corrected to ensure that the tilt angle of the image is 0, thereby obtaining a curve image after the tilt angle is corrected.

8. The curve source data extraction method according to claim 5, characterized in that: The denoising of the inclination-corrected curve image to obtain a target image comprises: Binarization is performed on the inclination-corrected curve image, and the RGB value of each pixel point of the inclination-corrected curve image is converted into a Boolean value to obtain an image pixel matrix; the Boolean value includes 0 representing black and 1 representing white; Based on the sliding window, the values ​​of the image pixel matrix are screened and judged to determine the denoising area; Assign 1 to the value of the image pixel matrix in the denoising area to obtain a target image.

9. The curve source data extraction method according to any one of claims 1 to 8, characterized in that: The step of extracting coordinate data of each point on the active power curve, the reactive power curve and the voltage curve according to the first image, the second image and the third image to obtain source data corresponding to the curve images includes: Based on the figure-data method, the coordinates of each data point on the active curve, the reactive curve and the voltage curve are determined according to the positions of the pixels of the first image, the second image and the third image, and the source data of the curve image in the converter type test report is obtained.

10. A curve source data extraction device, characterized in that: include: An image preprocessing module, used to obtain the curve image in the converter type test report, and perform preprocessing to obtain a target image; wherein the target image includes an active power curve, a reactive power curve and a voltage curve; A color conversion module, used to determine the target RGB value of each pixel of the target image according to the initial RGB value of each pixel of the target image and a color judgment threshold; the color judgment threshold includes a dynamic threshold and a preset threshold; A curve separation module, used to determine a first image, a second image and a third image according to the target RGB value of each pixel of the target image, wherein the first image includes an active power curve of the target image, the second image includes a reactive power curve of the target image, and the third image includes a voltage curve of the target image; The data extraction module is used to extract the coordinate data of each point on the active power curve, the reactive power curve and the voltage curve according to the first image, the second image and the third image, so as to obtain the source data corresponding to the curve image.