Oil level height detection method, oil supply data acquisition method, detection system and medium

By identifying and screening straight lines in the oil surface image and determining the oil surface height detection line, the problem of inaccurate oil surface height detection in the prior art is solved, and the accurate judgment of the equipment's oil supply status is achieved.

CN119845380APending Publication Date: 2025-04-18SHANGHAI ELECTRICGROUP CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411928413.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art cannot accurately detect the oil level, resulting in inaccurate judgment of the oil supply status of the equipment.

Method used

By obtaining the oil surface image to be tested of the equipment, input the oil surface height detection model, identifying the initial straight line segment, filtering the target straight line segment with a slope less than the threshold, determining the straight line segment with the smallest height difference from the historical oil surface height detection line is the oil surface height detection line, and then calculating the oil surface height.

Benefits of technology

It realizes quantitative and accurate detection of oil surface height, reduces the probability of misjudgment, and can accurately judge the oil supply status of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119845380A_ABST
    Figure CN119845380A_ABST
Patent Text Reader

Abstract

The invention provides an oil level height detection method, an oil supply data acquisition method, a detection system and a medium. The method comprises the following steps: acquiring a to-be-detected oil level image of equipment; inputting the to-be-detected oil level image into the oil level height detection model to obtain a plurality of initial straight line segments in the to-be-detected oil level image; screening out a target straight line segment of which the slope is smaller than a slope threshold value from the plurality of initial straight line segments; the target straight line segment with the minimum height difference with the first oil level height detection line is determined as a second oil level height detection line; and determining the oil level of the equipment based on the second oil level detection line. The oil level height detection line capable of accurately representing the current oil level height is obtained, quantitative and accurate detection of the oil level height is achieved, the probability of misjudgment is effectively reduced, and accurate analysis of the oil supply state of equipment is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of liquid level measurement, and in particular to an oil level detection method, an oil supply data acquisition method, a detection system, and a medium. Background Art

[0002] The current method of detecting oil level cannot obtain accurate values. The temperature difference method can only identify whether the equipment is short of oil. When the equipment is short of oil, the thermal conductivity of the oil decreases, which will cause the temperature of some areas of the equipment to rise abnormally, thereby causing a temperature difference. Infrared thermal imaging technology can detect temperature changes and determine whether the equipment is short of oil, but it is impossible to obtain a quantitative and accurate value. Summary of the invention

[0003] The technical problem to be solved by the present disclosure is to overcome the defect of low accuracy of oil level detection in the prior art, and to provide an oil level detection method, an oil supply data acquisition method, a detection system, and a medium.

[0004] The present invention solves the above technical problems through the following technical solutions:

[0005] In a first aspect, a method for detecting an oil level is provided, the method comprising:

[0006] Acquire the oil level image to be tested of the equipment;

[0007] Input the oil level image to be measured into an oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured; the input parameters of the oil level detection model include the oil level image, and the output parameters include the initial straight line segments;

[0008] Filtering out a target straight line segment whose slope is less than a slope threshold from the multiple initial straight line segments;

[0009] Determine the target straight line segment with the smallest height difference from the first oil level detection line as the second oil level detection line; wherein the first oil level detection line is an oil level detection line identified from a historical oil level image of the device, and the historical oil level image is an oil level image whose acquisition time is earlier than that of the oil level image to be measured and the time interval is less than a time threshold;

[0010] Based on the second oil level detection line, the oil level of the equipment is determined.

[0011] Optionally, the oil level detection model integrates an edge detection algorithm and a straight line detection algorithm, and the step of inputting the oil level image to be measured into the oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured comprises:

[0012] Performing edge detection on the oil surface image to be tested, detecting edge contour lines in the oil surface image to be tested;

[0013] Perform straight line detection on the edge contour line to detect initial straight line segments in the edge contour line.

[0014] Optionally, the step of determining the target straight line segment having the smallest height difference with the first oil level detection line as the second oil level detection line includes:

[0015] Selecting a second oil level detection line from the first type of straight line segments and / or the second type of straight line segments and / or the third type of straight line segments;

[0016] Among them, the first type of straight line segments include target straight line segments that are parallel to the upper edge and / or lower edge of the oil level image to be measured and are screened out from initial straight line segments whose slopes are less than a slope threshold; the second type of straight line segments include at least one target straight line segment that is screened out from multiple target straight line segments whose relative distances are less than a distance threshold; the third type of straight line segments include target straight line segments whose heights in the oil level image to be measured are between a lower height threshold and an upper height threshold.

[0017] Optionally, the step of inputting the oil level image to be measured into an oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured comprises:

[0018] Perform channel extraction on the oil level image to be measured to obtain a channel image; the channel image includes at least one of the following: a B channel image, a G channel image, an S channel image, and a V channel image;

[0019] Inputting each frame channel image into the oil level detection model respectively to identify the straight line segments in each frame channel image;

[0020] The straight line segments in each frame channel image are merged to obtain a plurality of initial straight line segments in the oil surface image to be measured.

[0021] Optionally, the step of determining the oil level based on the oil level detection line includes:

[0022] Determine the proportional relationship between the actual height of the viewing mirror of the device and the pixel distance; the pixel distance is the distance between the second oil level height detection line and the bottom of the oil level window in the oil level image to be measured;

[0023] The pixel distance is converted into the oil level height according to the proportional relationship.

[0024] In a second aspect, a method for obtaining fuel supply data is provided, wherein the fuel supply data includes an oil level and an oil pool state, and the method for obtaining fuel supply data includes:

[0025] Obtaining the oil level height using any of the above-mentioned oil level detection methods;

[0026] The oil surface image to be tested is input into the oil pool state detection model to obtain the oil pool state; the oil pool state detection model is obtained by training a neural network with training samples, and the training samples include oil surface images marked with the oil pool state.

[0027] In a third aspect, an oil level detection system is provided, the oil level detection system comprising:

[0028] An acquisition module, used for acquiring an oil level image to be tested of the device;

[0029] An input module, used for inputting the oil level image to be measured into an oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured; the input parameters of the oil level detection model include the oil level image, and the output parameters include the initial straight line segments;

[0030] A screening module, used for screening out a target straight line segment having a slope less than a slope threshold from the plurality of initial straight line segments;

[0031] A determination module, used to determine the target straight line segment with the smallest height difference from the first oil level detection line as the second oil level detection line; wherein the first oil level detection line is an oil level detection line identified from a historical oil level image of the device, and the historical oil level image is an oil level image whose acquisition time is earlier than that of the oil level image to be measured and the time interval is less than a time threshold;

[0032] A calculation module is used to determine the oil level of the equipment based on the second oil level detection line.

[0033] Optionally, the oil level detection model integrates an edge detection algorithm and a straight line detection algorithm, and the input module 22 is specifically used for:

[0034] Performing edge detection on the oil surface image to be tested, detecting edge contour lines in the oil surface image to be tested;

[0035] Perform straight line detection on the edge contour line to detect initial straight line segments in the edge contour line.

[0036] Optionally, the determination module 24 is specifically configured to:

[0037] Selecting a second oil level detection line from the first type of straight line segments and / or the second type of straight line segments and / or the third type of straight line segments;

[0038] Among them, the first type of straight line segments is specifically used to screen out target straight line segments parallel to the upper edge and / or lower edge of the oil level image to be measured from initial straight line segments whose slopes are less than a slope threshold; the second type of straight line segments is specifically used to screen out at least one target straight line segment from multiple target straight line segments whose relative distances are less than a distance threshold; the third type of straight line segments is specifically used for target straight line segments whose heights in the oil level image to be measured are between a lower height threshold and an upper height threshold.

[0039] Optionally, the input module is specifically used for:

[0040] Perform channel extraction on the oil level image to be measured to obtain a channel image; the channel image is specifically used for at least one of the following: a B channel image, a G channel image, an S channel image, and a V channel image;

[0041] Inputting each frame channel image into the oil level detection model respectively to identify the straight line segments in each frame channel image;

[0042] The straight line segments in each frame channel image are merged to obtain a plurality of initial straight line segments in the oil surface image to be measured.

[0043] Optionally, the computing module is specifically used for:

[0044] Determine the proportional relationship between the actual height of the viewing mirror of the device and the pixel distance; the pixel distance is the distance between the second oil level height detection line and the bottom of the oil level window in the oil level image to be measured;

[0045] The pixel distance is converted into the oil level height according to the proportional relationship.

[0046] In a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein when the processor executes the computer program, the oil level detection method and the oil supply data acquisition method described in any one of the above items are implemented.

[0047] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the oil level detection method and the oil supply data acquisition method described in any one of the above items are implemented.

[0048] In a sixth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned oil level detection methods and oil supply data acquisition methods.

[0049] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0050] The positive progressive effect of the present disclosure is that the present disclosure can obtain accurate oil level height and realize quantitative and accurate detection of oil level height. The oil level height can be used to judge the oil supply status of the equipment. When the oil level height detection is performed based on the oil level image to be measured, a large number of straight line segments will be obtained, some of which are not oil level detection lines that characterize the oil level height. The first oil level height at the previous moment is taken as the standard, and the heights of multiple target straight line segments are compared with the heights of the first oil level detection line. The target straight line segment with the smallest height difference is determined as the only oil level detection line, and the oil level detection line that can accurately characterize the current oil level height is obtained, thereby realizing accurate oil level detection, effectively reducing the probability of misjudgment, and facilitating accurate analysis of the oil supply status of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A flow chart of an oil level detection method provided for an exemplary embodiment of the present disclosure;

[0052] Figure 2 An equipment layout diagram of an oil level detection method provided for an exemplary embodiment of the present disclosure;

[0053] Figure 3 A schematic diagram of the effect of a cropped oil level image to be measured in an oil level detection method provided by an exemplary embodiment of the present disclosure;

[0054] Figure 4 A flowchart of a method for obtaining fuel supply data provided by an exemplary embodiment of the present disclosure;

[0055] Figure 5 A schematic diagram of the effect obtained by a method for acquiring fuel supply data provided by an exemplary embodiment of the present disclosure;

[0056] Figure 6 Another flow chart of a method for obtaining fuel supply data provided by an exemplary embodiment of the present disclosure;

[0057] Figure 7 A schematic diagram of a module of an oil level detection system provided by an exemplary embodiment of the present disclosure;

[0058] Figure 8 The present invention is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0059] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0060] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.

[0061] In the embodiments of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0062] Example 1

[0063] Figure 1 A flow chart of an oil level detection method provided for an exemplary embodiment of the present disclosure, the oil level detection method comprising:

[0064] Step S101, obtaining an oil level image to be tested of the device.

[0065] The equipment includes but is not limited to various equipment that requires oil supply, such as air conditioning compressors, which can be set according to actual conditions and are not particularly limited here. Figure 2 When the oil level of the air conditioner compressor is detected, the acquisition device and the air conditioner outdoor unit are in the same environment, that is, they are both outdoors (-25℃~35℃), and the air conditioner indoor unit is indoors (0℃~30℃). The device is connected to the detection algorithm system in the observation room. The acquisition device is used to obtain the oil level image to be tested, and transmit the oil level image to be tested to the detection algorithm system for oil level detection. The detection algorithm system implements the oil level detection by executing steps S101-S105.

[0066] Specifically, obtain the oil surface video data of the device, and try to reduce the interference caused by reflections, oil stains on the back plate, etc. Adjust the frame extraction frequency, extract the oil surface video data, and obtain the oil surface image to be tested. The frame extraction frequency is the number of frames extracted per second, which can be set to an integer from 1 to FPS. FPS is the number of frames per second of the oil surface video data. The frame extraction frequency can be selected and set according to the operation of the equipment, and is not specifically limited here.

[0067] After the frame is extracted, the oil surface image to be tested is rotated and corrected so that the oil surface remains parallel to the lower edge of the oil surface image to be tested. Figure 3, the oil level image to be tested is cropped, the position of the oil level window is fixed, the lower edge of the oil level image to be tested coincides with the bottom of the oil level window in the oil level image to be tested, the area irrelevant to the oil level window is eliminated, and the detection accuracy of the oil level height is improved.

[0068] Step S102: input the oil level image to be measured into the oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured.

[0069] The input parameters of the oil level detection model include the oil surface image, and the output parameters include the initial straight line segment.

[0070] Step S103: Filter out a target straight line segment whose slope is less than a slope threshold from the multiple initial straight line segments.

[0071] Since there may be some interfering line segments in the initial straight line segments, for example, the oil level may fluctuate when disturbed, and these fluctuations may form vertical line segments in the oil level image to be tested, and some internal structures of the equipment may also form interfering line segments in the oil level image to be tested, the initial straight line segments detected in the oil level image to be tested are not all oil level detection lines representing the oil level. It is necessary to perform preliminary screening of the initial straight line segments to obtain the target straight line segments, and perform further screening based on the target straight line segments to obtain the oil level detection lines that can be used to characterize the oil level.

[0072] Specifically, the slope of the initial straight line segment is calculated, and the target straight line segment with a slope less than a slope threshold is screened out. The slope threshold can be selected according to actual conditions and is not particularly limited here. Usually, the target straight line segment is parallel to the lower edge of the oil level image to be measured. It can be understood that the initial straight line segment with a slope greater than the slope threshold is not a straight line segment used to represent the oil level.

[0073] Step S104: determine the target straight line segment having the smallest height difference with the first oil level detection line as the second oil level detection line.

[0074] The first oil level detection line is an oil level detection line identified from a historical oil level image of the device, and the historical oil level image is an oil level image whose collection time is earlier than that of the oil level image to be measured and whose time interval is less than a time threshold.

[0075] The time threshold can be set according to the actual situation and is not particularly limited here. Usually, the historical oil level image is an oil level image that is collected earlier than the oil level image to be measured and is closest to the collection time of the oil level image to be measured. It should be noted that the method of determining the first oil level height detection line from the historical oil level image is the same as the method of determining the second oil level height detection line from the oil level image to be measured.

[0076] If the oil surface image to be measured is obtained by extracting frames from oil surface video data, the historical oil surface image is usually an oil surface image of a frame before the oil surface image to be measured.

[0077] Step S105: Determine the oil level of the equipment based on the second oil level detection line.

[0078] In this embodiment, the precise oil level is obtained through the oil level detection line, and quantitative and precise detection of the oil level is achieved. The oil level can be used to judge the oil supply status of the equipment. When the oil level detection is performed based on the oil level image to be measured, a large number of straight line segments will be obtained, some of which are not the oil level detection line that characterizes the oil level. The first oil level at the previous moment is taken as the standard, and the heights of multiple target straight line segments are compared with the heights of the first oil level detection line. The target straight line segment with the smallest height difference is determined as the only oil level detection line, and the oil level detection line that can accurately characterize the current oil level is obtained. Accurate oil level detection can be achieved, which effectively reduces the probability of misjudgment and helps to accurately analyze the oil supply status of the equipment.

[0079] In one embodiment, the oil level detection model integrates an edge detection algorithm and a line detection algorithm. The edge detection algorithm includes but is not limited to Canny edge detection, and the line detection algorithm includes but is not limited to Hough line detection. The specific selection can be made according to actual conditions and is not particularly limited here.

[0080] Step S102 includes: performing edge detection on the oil surface image to be tested, detecting edge contour lines in the oil surface image to be tested, performing straight line detection on the edge contour lines, and detecting initial straight line segments in the edge contour lines.

[0081] In this embodiment, by performing straight line detection on the edge contour line, the complex oil level image to be measured can be simplified into a wheel edge contour line that is easier to process. The obtained edge contour line can be used to determine the oil level height detection line, reducing the calculation complexity.

[0082] In one embodiment, step S104 includes: selecting a second oil level detection line from the first type of straight line segments.

[0083] The first type of straight line segments include target straight line segments that are screened out from initial straight line segments whose slopes are less than a slope threshold and are parallel to the upper edge and / or lower edge of the oil surface image to be measured.

[0084] The target straight line segment representing the oil surface is usually parallel to the upper edge and / or the lower edge of the oil surface image to be measured, so the straight line segments that are not parallel to the upper edge and / or the lower edge can be eliminated.

[0085] In this embodiment, since the target straight line segment representing the oil level is usually parallel to the upper edge and / or lower edge of the oil level image to be measured, further screening from the first type of straight line segments parallel to the upper edge and / or lower edge helps to obtain an oil level detection line that accurately characterizes the current oil level, thereby effectively reducing the probability of misjudgment.

[0086] In one embodiment, step S104 includes: selecting a second oil level detection line from the second type of straight line segments. The second type of straight line segments includes at least one target straight line segment selected from a plurality of target straight line segments whose relative distances are less than a distance threshold.

[0087] The straight line segments with a relative distance less than the distance threshold may be caused by measurement errors, which can reduce the complexity of the calculation. The distance threshold can be selected according to the actual situation. If the relative distance between multiple straight line segments is less than the distance threshold, it means that the positions of the multiple straight line segments on the oil surface image to be measured are relatively close, and only at least one target straight line segment can be retained for further screening.

[0088] In this embodiment, the second oil level detection line is selected from the second type of straight line segments, and reducing repeated or similar straight line segments can improve the operating efficiency of oil level detection and reduce the complexity of calculation.

[0089] In one embodiment, step S104 includes: selecting the second oil level detection line from the third type of straight line segments. The third type of straight line segments include target straight line segments whose heights in the oil level image to be detected are between a lower height threshold and an upper height threshold.

[0090] The lower height threshold and the upper height threshold can be set according to actual conditions and are not particularly limited here. Usually, the height of the second oil level detection line in the oil level image to be measured is between the lower height threshold and the upper height threshold, so the initial straight line segments that are too high and too low can be eliminated to obtain the third type of straight line segments, and then the second oil level detection line can be further screened from the third type of straight line segments.

[0091] In this embodiment, further screening is performed on the third type of straight line segments whose heights are between the lower height threshold and the upper height threshold to exclude straight line segments whose heights are too high or too low, thereby reducing the complexity of calculation and effectively reducing the probability of misjudgment.

[0092] In one embodiment, the second oil level detection line is screened from the first type of straight line segments, the second type of straight line segments, and the third type of straight line segments.

[0093] In one embodiment, step S102 includes: performing channel extraction on the oil level image to be measured to obtain a channel image; the channel image includes at least one of the following: a B channel image, a G channel image, an S channel image, and a V channel image. Inputting each frame channel image into the oil level detection model respectively to identify the straight line segments in each frame channel image. Merging the straight line segments in each frame channel image to obtain a plurality of initial straight line segments in the oil level image to be measured.

[0094] Channel extraction is performed on an oil surface image to be tested, and the B (blue) channel, G (green) channel, S (saturation) channel and V (brightness) channel of the image are extracted, and a total of four images are obtained, namely, the B channel image, the G channel image, the S channel image and the V channel image.

[0095] The method of merging straight line segments can be found in the relevant technical description, which will not be repeated here.

[0096] In this embodiment, computer vision technology is used, and a method of multi-channel image detection and comprehensive judgment and analysis of the previous and next frame images of the video is adopted. The current oil level can be obtained based on the current oil level image to be tested, thereby realizing real-time and accurate detection of the oil level. Since the color and clarity of the oil surface vary in different channel images, a more accurate oil level detection line can be obtained based on the channel images of each frame, which is more helpful for detecting the oil level.

[0097] In one embodiment, the obtained B channel image, G channel image, S channel image and V channel image are preprocessed to remove image noise, and the preprocessing includes normalization, bilateral filtering and binarization, etc. The specific selection can be made according to the actual situation and is not particularly limited here.

[0098] Specifically, the B channel image, the G channel image, the S channel image and the V channel image are respectively subjected to maximum and minimum normalization processing. The B channel image, the G channel image, the S channel image and the V channel image are first normalized to the range of 0-1, and then the normalized B channel image, the G channel image, the S channel image and the V channel image are subjected to bilateral filtering and binarization operations to obtain four binarized B channel images, the G channel image, the S channel image and the V channel image.

[0099] After preprocessing, the B channel image, the G channel image, the S channel image and the V channel image are respectively input into the oil level detection model to identify the straight line segments in each frame channel image.

[0100] In this embodiment, the B channel image, the G channel image, the S channel image and the V channel image are preprocessed to improve image quality, reduce calculation cost, and improve the detection accuracy of the oil level detection line.

[0101] In one embodiment, when acquiring the oil level image to be measured, the lower edge of the oil level image to be measured is made to coincide with the bottom of the oil level window in the oil level image to be measured, and in step 105, the oil level height of the device is calculated based on the pixel distance from the second oil level height detection line to the lower edge of the oil level image to be measured.

[0102] In one embodiment, when acquiring the oil level image to be measured, the bottom of the oil level window in the oil level image to be measured is located above the lower edge of the oil level image to be measured. In step 105, the bottom of the oil level window in the oil level image to be measured is first identified, and then the oil level height of the device is calculated based on the pixel distance from the second oil level height detection line to the bottom of the oil level window.

[0103] In one embodiment, step S105 includes: determining the proportional relationship between the actual height of the viewing mirror of the device and the pixel distance. Converting the pixel distance into the oil level height according to the proportional relationship. The pixel distance is the distance between the second oil level height detection line in the oil level image to be measured and the bottom of the oil level window.

[0104] The method for determining the proportional relationship can be found in the relevant technical description and will not be repeated here.

[0105] In this embodiment, pixel distance is an abstract concept in image processing. Converting pixel distance into specific data such as oil level height can enhance the practicality and interpretability of the data, more accurately measure and monitor the oil level height in the equipment, and further calculate the volume of oil based on the oil level height.

[0106] Example 2

[0107] The present disclosure also provides an embodiment of a method for acquiring fuel supply data. Figure 4 A flowchart of a method for obtaining fuel supply data is provided for an exemplary embodiment of the present disclosure. The fuel supply data includes the fuel level and the oil pool state. The method for obtaining fuel supply data includes:

[0108] Step S201, determine the oil level.

[0109] In step S201, the oil level is determined according to the oil level detection method provided in any of the above embodiments.

[0110] Step S202: input the oil level image to be measured into the oil pool state detection model to obtain the oil pool state.

[0111] The oil pool state detection model is obtained by training a neural network with training samples, and the training samples include oil surface images marked with oil pool states.

[0112] Based on the mechanism knowledge of the compressor industry, the oil pool state is defined, which includes but is not limited to five states: single-phase liquid, stratified state, atomized state, bubble state and foam state. The specific settings can be made according to actual conditions and are not particularly limited here.

[0113] The neural network can use the Resnet deep residual neural network model. Specifically, the Resnet deep residual neural network model is used to train the oil surface image labeled with the oil pool state, and the oil pool state detection model is formed after the training is completed. The oil pool state detection model only needs to be trained once. After the training is completed, the subsequent reasoning process only needs to call the file of the trained oil pool state detection model, and no further model training is required.

[0114] The oil surface image to be tested is input into the oil pool state detection model, and the oil pool state detection model outputs the oil pool state of the oil surface image to be tested. Figure 5 , Figure 5 The single-phase liquid in the upper left corner is the oil pool state, and the horizontal line is the oil level detection line.

[0115] By integrating the oil level and oil pool status over a continuous period of time, the oil supply status and operating status of the air-conditioning compressor can be judged.

[0116] Combine the following Figure 6 The method for obtaining fuel supply data is further explained.

[0117] First, the oil level video data of the air-conditioning compressor is collected. Specifically, clear oil level video data of the air-conditioning compressor is obtained to minimize the interference caused by reflections, oil stains on the back plate, etc. After obtaining the oil level video data, the oil level video data is framed at a certain frame frequency, the oil level image to be tested after frame extraction is rotated and cropped, and the oil level window is fixed so that the lower edge of the oil level image to be tested coincides with the bottom of the oil level window in the oil level image to be tested.

[0118] The oil level image to be tested is preprocessed, and the oil level height and the oil pool state are detected based on the preprocessed oil level image to be tested, that is, the oil level image to be tested is input into the oil level detection model and the oil level detection model.

[0119] Finally, the detection results are output, and by integrating the oil level height and oil pool status within a continuous period of time, the result data of the oil level height and oil pool status changing with time is output.

[0120] In this embodiment, the oil level pixel height is integrated with the oil pool status, so that the equipment oil supply data can be used to judge the equipment's oil supply status, thereby improving the accuracy of the equipment oil supply data and facilitating multi-dimensional judgment and analysis of the equipment's actual oil supply status.

[0121] Example 3

[0122] Corresponding to the aforementioned oil level detection method embodiment, the present disclosure also provides an oil level detection system embodiment.

[0123] Figure 7 A schematic diagram of a module of an oil level detection system provided by an exemplary embodiment of the present disclosure, the oil level detection system comprising:

[0124] An acquisition module 21 is used to acquire an oil level image to be measured of the device;

[0125] An input module 22 is used to input the oil level image to be measured into the oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured; the input parameters of the oil level detection model include the oil level image, and the output parameters include the initial straight line segments;

[0126] A screening module 23, used for screening out a target straight line segment having a slope less than a slope threshold from a plurality of initial straight line segments;

[0127] The determination module 24 is used to determine the target straight line segment with the smallest height difference with the first oil level detection line as the second oil level detection line; wherein the first oil level detection line is an oil level detection line identified from the historical oil level image of the device, and the historical oil level image is an oil level image whose acquisition time is earlier than that of the oil level image to be measured and the time interval is less than the time threshold;

[0128] The calculation module 25 is used to determine the oil level of the equipment based on the second oil level detection line.

[0129] In the present embodiment, quantitative and accurate detection of the oil level can be achieved, and the oil level can be used to judge the oil supply status of the equipment. When the oil level detection is performed based on the oil level image to be measured, a large number of straight line segments will be obtained, some of which are not oil level detection lines that characterize the oil level. The first oil level at the previous moment is taken as the standard, and the heights of multiple target straight line segments are compared with the heights of the first oil level detection line. The target straight line segment with the smallest height difference is determined as the only oil level detection line, and the oil level detection line that can accurately characterize the current oil level is obtained. Accurate oil level detection can be achieved, which effectively reduces the probability of misjudgment and helps to accurately analyze the oil supply status of the equipment.

[0130] Optionally, the oil level detection model integrates an edge detection algorithm and a straight line detection algorithm, and the input module 22 includes:

[0131] An edge detection unit is used to perform edge detection on the oil surface image to be tested, and detect edge contour lines in the oil surface image to be tested;

[0132] The straight line detection unit is used to perform straight line detection on the edge contour line and detect the initial straight line segment in the edge contour line.

[0133] Optionally, the determination module 24 includes:

[0134] A screening unit, used for screening a second oil level detection line from the first type of straight line segments and / or the second type of straight line segments and / or the third type of straight line segments;

[0135] Among them, the first type of straight line segments include target straight line segments that are parallel to the upper edge and / or lower edge of the oil surface image to be measured and are screened out from initial straight line segments whose slopes are less than a slope threshold; the second type of straight line segments include at least one target straight line segment that is screened out from multiple target straight line segments whose relative distances are less than a distance threshold; the third type of straight line segments include target straight line segments whose heights in the oil surface image to be measured are between a lower height threshold and an upper height threshold.

[0136] Optionally, the input module 22 includes:

[0137] An extraction unit is used to perform channel extraction on the oil surface image to be measured to obtain a channel image; the channel image includes at least one of the following: a B channel image, a G channel image, an S channel image, and a V channel image;

[0138] The recognition unit is used to input each frame channel image into the oil level detection model to recognize the straight line segment in each frame channel image;

[0139] The merging unit is used to merge the straight line segments in each frame channel image to obtain a plurality of initial straight line segments in the oil surface image to be measured.

[0140] Optionally, the calculation module 25 includes:

[0141] Determine the proportional relationship between the actual height of the viewing mirror of the device and the pixel distance; the pixel distance is the distance between the second oil level height detection line and the bottom of the oil level window in the oil level image to be measured;

[0142] Convert pixel distance to oil level according to the proportional relationship.

[0143] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.

[0144] Example 4

[0145] Figure 8This is a schematic diagram of the structure of an electronic device shown in an example embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, the oil level detection method and the oil supply data acquisition method described in any of the above embodiments are implemented. Figure 8 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0146] like Figure 8 As shown, the electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).

[0147] The bus 93 includes a data bus, an address bus, and a control bus.

[0148] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .

[0149] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0150] The processor 91 executes various functional applications and data processing by running the computer programs stored in the memory 92, such as the oil level detection method and the oil supply data acquisition method provided in any of the above embodiments.

[0151] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the electronic device 90 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with other modules of the electronic device 90 via a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0152] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0153] Example 5

[0154] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the oil level detection method and the oil supply data acquisition method provided in any of the above embodiments are implemented.

[0155] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0156] Example 6

[0157] The embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned oil level detection methods and oil supply data acquisition methods.

[0158] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0159] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A method for detecting oil level, characterized in that: The oil level detection method comprises: Acquire the oil level image to be tested of the equipment; Input the oil level image to be measured into an oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured; the input parameters of the oil level detection model include the oil level image, and the output parameters include the initial straight line segments; Filtering out a target straight line segment whose slope is less than a slope threshold from the multiple initial straight line segments; Determine the target straight line segment with the smallest height difference from the first oil level detection line as the second oil level detection line; wherein the first oil level detection line is an oil level detection line identified from a historical oil level image of the device, and the historical oil level image is an oil level image whose acquisition time is earlier than that of the oil level image to be measured and the time interval is less than a time threshold; Based on the second oil level detection line, the oil level of the equipment is determined.

2. The oil level detection method according to claim 1, characterized in that: The oil level detection model integrates an edge detection algorithm and a straight line detection algorithm. The step of inputting the oil level image to be measured into the oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured comprises: Performing edge detection on the oil surface image to be tested, detecting edge contour lines in the oil surface image to be tested; Perform straight line detection on the edge contour line to detect initial straight line segments in the edge contour line.

3. The oil level detection method according to claim 1, characterized in that: The step of determining the target straight line segment with the smallest height difference from the first oil level detection line as the second oil level detection line comprises: Selecting a second oil level detection line from the first type of straight line segments and / or the second type of straight line segments and / or the third type of straight line segments; Among them, the first type of straight line segments include target straight line segments that are parallel to the upper edge and / or lower edge of the oil level image to be measured and are screened out from initial straight line segments whose slopes are less than a slope threshold; the second type of straight line segments include at least one target straight line segment that is screened out from multiple target straight line segments whose relative distances are less than a distance threshold; the third type of straight line segments include target straight line segments whose heights in the oil level image to be measured are between a lower height threshold and an upper height threshold.

4. The oil level detection method according to claim 1, characterized in that: The step of inputting the oil level image to be measured into the oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured comprises: Perform channel extraction on the oil level image to be measured to obtain a channel image; the channel image includes at least one of the following: a B channel image, a G channel image, an S channel image, and a V channel image; Inputting each frame channel image into the oil level detection model respectively to identify the straight line segments in each frame channel image; The straight line segments in each frame channel image are merged to obtain a plurality of initial straight line segments in the oil surface image to be measured.

5. The oil level detection method according to claim 1, characterized in that: The step of determining the oil level based on the second oil level detection line comprises: Determine the proportional relationship between the actual height of the viewing mirror of the device and the pixel distance; the pixel distance is the distance between the second oil level height detection line and the bottom of the oil level window in the oil level image to be measured; The pixel distance is converted into the oil level height according to the proportional relationship.

6. A method for acquiring fuel supply data, characterized in that: The oil supply data includes oil level height and oil pool status, and the oil supply data acquisition method includes: The oil level is obtained by using the oil level detection method according to any one of claims 1 to 5; The oil surface image to be tested is input into the oil pool state detection model to obtain the oil pool state; the oil pool state detection model is obtained by training a neural network with training samples, and the training samples include oil surface images marked with the oil pool state.

7. An oil level detection system, characterized in that: The oil level detection system comprises: An acquisition module, used for acquiring an oil level image to be tested of the device; An input module, used for inputting the oil level image to be measured into an oil level detection model to obtain a plurality of initial straight line segments in the oil level image to be measured; the input parameters of the oil level detection model include the oil level image, and the output parameters include the initial straight line segments; A screening module, used for screening out a target straight line segment having a slope less than a slope threshold from the plurality of initial straight line segments; A determination module, used to determine the target straight line segment with the smallest height difference from the first oil level detection line as the second oil level detection line; wherein the first oil level detection line is an oil level detection line identified from a historical oil level image of the device, and the historical oil level image is an oil level image whose acquisition time is earlier than that of the oil level image to be measured and the time interval is less than a time threshold; A calculation module is used to determine the oil level of the equipment based on the second oil level detection line.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the oil level detection method according to any one of claims 1 to 5 or the oil supply data acquisition method according to claim 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the oil level detection method according to any one of claims 1 to 5 or the oil supply data acquisition method according to claim 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the oil level detection method according to any one of claims 1 to 5 or the oil supply data acquisition method according to claim 6 is implemented.