A method, device and system for detecting the working state of an electronic device
By processing the equipment images of electronic devices such as smart speakers and automatically judging the status of their bright parts, the problem of low manual detection efficiency is solved, and automated detection and efficient detection of electronic devices are realized.
Patent Information
- Application Number
- CN202210087184.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-01-25
AI Technical Summary
In the prior art, the production and testing stage of smart speakers relies on manual testing, which is inefficient and time-consuming, making it difficult to achieve automated testing.
By acquiring the device image of the electronic device, intercepting the image of the target area where the bright part is located, converting it into a grayscale map, and determining whether the electronic device is in a normal wake-up state based on the grayscale value and brightness value.
Automatic detection of electronic equipment such as smart speakers has been realized, which has improved detection efficiency and reduced human resources consumption.
Smart Images

Figure CN114501287B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic product detection, and in particular to a method, device and system for detecting the working status of an electronic device. Background Art
[0002] Smart speakers combine emerging technologies such as voice recognition and natural language processing with traditional speakers, making them capable of playing audio resources, intelligent voice interaction, and smart home control. Smart speakers are regarded as the future entrance to smart homes due to their rich product functions, and have become one of the fastest-growing electronic products in recent times.
[0003] The production inspection stage of smart speakers is an important process to ensure the normal operation of smart speakers. The tests in the production inspection stage can include whether the smart speaker can be awakened normally and whether it can connect to the network normally. The current testing method needs to rely on manual testing, such as playing voice commands to trigger the smart speaker to start working, and manually identifying whether the smart speaker is awakened. In order to ensure the stability of the smart speaker, a large number of repetitive tests are often required in the production inspection stage. The current manual testing method not only consumes a lot of human resources, but also has low detection efficiency.
[0004] It can be seen that how to realize automatic detection of electronic devices is a problem that needs to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device and system for detecting the working status of an electronic device, which can realize automatic detection of the electronic device.
[0006] In order to solve the above technical problems, the present application provides a method for detecting the working state of an electronic device, comprising:
[0007] Acquire a device image of the electronic device;
[0008] intercepting a target area image where a bright component of the electronic device is located from the device image;
[0009] Converting the target area image into a grayscale image;
[0010] When the grayscale value of the grayscale image meets the set wake-up condition, it is determined that the electronic device is in a normal wake-up state.
[0011] Optionally, it also includes:
[0012] Obtaining a brightness value of the electronic device recorded by a light sensor;
[0013] When the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, it is determined that the electronic device is in a normal wake-up state.
[0014] Optionally, it also includes:
[0015] When the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or when the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, the device image and timestamp of the electronic device are recorded, and a manual verification mark is set.
[0016] Optionally, after intercepting the target area image where the bright component of the electronic device is located from the device image, the method further includes:
[0017] Counting the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode;
[0018] When the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value, it is determined that the electronic device belongs to the working mode corresponding to the target color.
[0019] Optionally, after acquiring the device image of the electronic device, the method further includes:
[0020] Determine whether the brightness of the background image in the device image exceeds a set threshold; wherein the background image is the image in the device image excluding the target area image;
[0021] If the brightness of the background image in the device image exceeds a set threshold, a grayscale histogram normalization operation is performed on the grayscale image to obtain an adjusted grayscale image;
[0022] Correspondingly, when the grayscale value of the grayscale image meets the set wake-up condition, determining that the electronic device is in a normal wake-up state includes:
[0023] When the grayscale value of the adjusted grayscale image meets the set wake-up condition, it is determined that the electronic device is in a normal wake-up state.
[0024] Optionally, when the grayscale value of the grayscale image meets a set wake-up condition, determining that the electronic device is in a normal wake-up state includes:
[0025] Calculating the grayscale mean of the grayscale image;
[0026] Determine whether the grayscale mean is greater than or equal to a set grayscale lower limit;
[0027] If the grayscale mean is greater than or equal to the set grayscale lower limit, it is determined that the electronic device is in a normal wake-up state.
[0028] Optionally, when the grayscale value of the grayscale image meets the set wake-up condition, after determining that the electronic device is in a normal wake-up state, the method further includes:
[0029] Increase the wakeup count by one;
[0030] Determine whether the wake-up count value reaches a set count threshold within a set test time;
[0031] When the wake-up count value reaches a set count threshold within a set test time, it is determined that the wake-up state of the electronic device is stable.
[0032] Optionally, after determining that the electronic device is in a normal wake-up state, the method further includes:
[0033] The device image and its corresponding timestamp are recorded, and the electronic device is controlled to execute the operation process corresponding to the normal wake-up state.
[0034] The embodiment of the present application also provides a device for detecting the working state of an electronic device, including an acquisition unit, an interception unit, a conversion unit and a determination unit;
[0035] The acquisition unit is used to acquire a device image of the electronic device;
[0036] The interception unit is used to intercept the target area image where the bright component of the electronic device is located from the device image;
[0037] The conversion unit is used to convert the target area image into a grayscale image;
[0038] The determining unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets a set wake-up condition.
[0039] Optionally, the acquisition unit is used to acquire a brightness value of the electronic device recorded by a light sensor;
[0040] The determining unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold.
[0041] Optionally, it further includes a setting unit;
[0042] The setting unit is used to record the device image and timestamp of the electronic device and set a manual verification mark when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or when the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold.
[0043] Optionally, it also includes a statistical unit and a determination unit;
[0044] The statistical unit is used to count the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode;
[0045] The determination unit is used to determine that the electronic device belongs to the working mode corresponding to the target color when the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value.
[0046] Optionally, it also includes a judging unit and an adjusting unit;
[0047] The judging unit is used to judge whether the brightness of the background image in the device image exceeds a set threshold; wherein the background image is the image in the device image excluding the target area image;
[0048] The adjustment unit is used to perform a grayscale histogram normalization operation on the grayscale image to obtain an adjusted grayscale image if the brightness of the background image in the device image exceeds a set threshold;
[0049] Correspondingly, the determining unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the adjusted grayscale image meets the set wake-up condition.
[0050] Optionally, the determination unit is used to calculate the grayscale mean of the grayscale image; determine whether the grayscale mean is greater than or equal to a set grayscale lower limit; if the grayscale mean is greater than or equal to the set grayscale lower limit, determine that the electronic device is in a normal wake-up state.
[0051] Optionally, it also includes an accumulation unit, a counting judgment unit and a counting determination unit;
[0052] The accumulating unit is used to add one to the wake-up count value;
[0053] The counting judgment unit is used to judge whether the wake-up count value reaches a set counting threshold within a set test time;
[0054] The counting determination unit is used to determine that the wake-up state of the electronic device is stable when the wake-up count value reaches a set count threshold within a set test time.
[0055] Optionally, a recording unit is also included;
[0056] The recording unit is used to record the device image and its corresponding timestamp, and control the electronic device to execute the operation process corresponding to the normal wake-up state.
[0057] The present application also provides a device for detecting the working state of an electronic device, including:
[0058] Memory for storing computer programs;
[0059] A processor is used to execute the computer program to implement the steps of the above-mentioned method for detecting the working status of an electronic device.
[0060] The embodiment of the present application also provides a system for detecting the working state of an electronic device, including an image collector and a processor;
[0061] The image collector is used to collect a device image of the electronic device and transmit the device image to the processor;
[0062] The processor is used to obtain a device image of the electronic device; capture a target area image where a bright component of the electronic device is located from the device image; convert the target area image into a grayscale image; and determine that the electronic device is in a normal wake-up state when a grayscale value of the grayscale image meets a set wake-up condition.
[0063] Optionally, a light sensor is also included;
[0064] The light sensor is used to record the brightness value of the electronic device;
[0065] The processor is connected to the light sensor and is used to obtain the brightness value of the electronic device recorded by the light sensor; when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, it is determined that the electronic device is in a normal wake-up state.
[0066] It can be seen from the above technical solution that the device image of the electronic device is obtained; the bright component provided on the electronic device will be lit in a normal working state and will be extinguished in a non-working state. In the present application, the lighting of the bright component on the electronic device can be relied upon to realize the automated detection of the electronic device production inspection stage. In order to reduce the interference of images of other areas other than the bright component and to improve the efficiency of image analysis, the target area image where the bright component of the electronic device is located can be captured from the device image. In order to realize the evaluation of the brightness of the target area image, the target area image can be converted into a grayscale image; when the grayscale value of the grayscale image meets the set wake-up condition, it can be determined that the electronic device is in a normal wake-up state. Compared with the manual detection method, in this technical solution, the brightness of the area where the bright component on the electronic device is located can be evaluated, thereby achieving automated detection of the electronic device production inspection stage, which greatly improves the detection efficiency of electronic device production inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0068] Figure 1 A flowchart of a method for detecting the working status of an electronic device provided in an embodiment of the present application;
[0069] Figure 2 A schematic diagram of the structure of a device for detecting the working state of an electronic device provided in an embodiment of the present application;
[0070] Figure 3 A structural diagram of a device for detecting the working status of an electronic device provided in another embodiment of the present application;
[0071] Figure 4 A schematic diagram of the structure of a system for detecting the working status of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0073] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0074] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0075] Next, a method for detecting the working status of an electronic device provided in an embodiment of the present application is described in detail. Figure 1 A flowchart of a method for detecting the working state of an electronic device provided in an embodiment of the present application, the method comprising:
[0076] S101: Acquire a device image of an electronic device.
[0077] The electronic device may be a device that needs to be tested for working status during the production test phase. The types of electronic devices can be various. For ease of introduction, in the embodiments of the present application, a smart speaker is used as an example for explanation.
[0078] Taking the wake-up test of an electronic device as an example, the device image of the electronic device is obtained. The device image of the electronic device can be collected after the wake-up word is played.
[0079] S102: capturing, from the device image, an image of a target area where bright components of the electronic device are located.
[0080] The outer ring of the smart speaker is generally provided with a light component. The light component can indicate the working status of the smart speaker by turning on and off. In practical applications, the light component can use lights of various colors to indicate different states. For example, the light is off in the sleep state, the light is blue in the normal wake-up state, the light is yellow in the setting mode, and the light is red when the network connection is interrupted.
[0081] In the actual production test phase, the most important test item is wake-up detection, which is to detect whether the smart speaker can be correctly awakened by the wake-up word, whether it is mistakenly awakened without issuing the wake-up word, and whether it can be awakened every time if the interval between multiple consecutive awakenings is short.
[0082] Considering that the bright component is generally set in a certain position area of the electronic device and does not occupy the entire outer surface of the electronic device, in order to improve the efficiency and accuracy of image analysis, when analyzing the device image, the target area image where the bright component of the electronic device is located can be intercepted from the device image.
[0083] S103: Convert the target area image into a grayscale image.
[0084] When the bright component is lit, the grayscale value of each pixel on the target area image will be relatively high; when the bright component is extinguished, the grayscale value of each pixel on the target area image will be relatively low. Therefore, in the embodiment of the present application, the on and off status of the bright component can be identified based on the grayscale value of each pixel on the target area image, thereby determining the working state of the electronic device.
[0085] In practical applications, the gray value Gray corresponding to each pixel in the target area image can be determined according to the following formula:
[0086] Gray=(R*30+G*59+B*11+50) / 100;
[0087] Among them, R, G, and B represent the brightness values corresponding to the red, green, and blue channels of the pixel respectively.
[0088] S104: When the grayscale value of the grayscale image meets the set wake-up condition, determine that the electronic device is in a normal wake-up state.
[0089] The wake-up condition may include the minimum value of the corresponding grayscale value in the wake-up state.
[0090] In practical applications, the grayscale mean of the grayscale image can be calculated, and it is determined whether the grayscale mean is greater than or equal to the set grayscale lower limit. The grayscale lower limit can be set according to the grayscale value of the image corresponding to the bright component in the lit state.
[0091] If the grayscale mean is greater than or equal to the set grayscale lower limit, it means that the bright component of the electronic device is lit, and it can be determined that the electronic device is in a normal wake-up state.
[0092] In an embodiment of the present application, after determining that the electronic device is in a normal wake-up state, the device image and its corresponding timestamp can be recorded, and the electronic device can be controlled to execute the operation process corresponding to the normal wake-up state.
[0093] During the production inspection stage, electronic equipment is often tested multiple times. The device images recorded in each test can be summarized in the form of a video, so that operators can quickly browse the test status of the electronic equipment.
[0094] It can be seen from the above technical solution that the device image of the electronic device is obtained; the bright component provided on the electronic device will be lit in a normal working state and will be extinguished in a non-working state. In the present application, the lighting of the bright component on the electronic device can be relied upon to realize the automated detection of the electronic device production inspection stage. In order to reduce the interference of images of other areas other than the bright component and to improve the efficiency of image analysis, the target area image where the bright component of the electronic device is located can be captured from the device image. In order to realize the evaluation of the brightness of the target area image, the target area image can be converted into a grayscale image; when the grayscale value of the grayscale image meets the set wake-up condition, it can be determined that the electronic device is in a normal wake-up state. Compared with the manual detection method, in this technical solution, the brightness of the area where the bright component on the electronic device is located can be evaluated, thereby achieving automated detection of the electronic device production inspection stage, which greatly improves the detection efficiency of electronic device production inspection.
[0095] In an embodiment of the present application, in order to improve the accuracy of detecting the wake-up state of an electronic device, in addition to identifying the working state of the electronic device based on the grayscale value of the device image, the brightness of the bright parts can also be identified by relying on a light sensor to determine the working state of the electronic device, thereby achieving dual detection of the working state of the electronic device.
[0096] In a specific implementation, the brightness value of the electronic device recorded by the light sensor can be obtained; when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, it can be determined that the electronic device is in a normal wake-up state.
[0097] When the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, it means that the wake-up state identified based on the light sensor and the wake-up state identified based on the image analysis are inconsistent. At this time, manual intervention and analysis can be performed. To facilitate manual analysis, the device image and timestamp of the electronic device can be recorded first, and a manual verification mark can be set.
[0098] When the wake-up status results obtained by the two detection methods are inconsistent, the device image and timestamp are recorded, so that the operator can determine whether the wake-up status of the electronic device is normal by manually viewing the device image. And based on the timestamp, the device images that are adjacent to the current device image in time can also be obtained, thereby improving the accuracy of the analysis.
[0099] In the embodiment of the present application, the bright component can indicate different types of working states by emitting different colors of light. Therefore, in the embodiment of the present application, in addition to detecting the wake-up state of the electronic device based on the grayscale value of the image, the working state of the electronic device can also be determined based on the color corresponding to each pixel in the target area image.
[0100] In a specific implementation, after capturing the target area image where the bright components of the electronic device are located from the device image, the colors corresponding to the pixels in the target area image can be counted; wherein each color has its corresponding working mode; when the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value, it is determined that the electronic device belongs to the working mode corresponding to the target color.
[0101] In addition to the bright parts, the captured target area image may also contain some background areas. Therefore, the target area image may contain multiple colors. Compared with the background area, the bright parts account for the highest proportion in the target area image. Therefore, based on the proportion of each color, it is possible to determine which color the bright parts belong to, thereby determining what type of working state the electronic device is in.
[0102] The set ratio value can be set based on actual needs, for example, it can be set to 80%. Assume that the image in the target area contains two colors, white and red, with a total of 1000 pixels, of which there are 100 white pixels and 900 red pixels. The ratio corresponding to the red pixels is 900 / 1000=90%, which is greater than the set 80%. At this time, it can be determined that the bright component is in red, and red indicates that the electronic device is disconnected from the network.
[0103] In the embodiment of the present application, based on the color corresponding to each pixel in the target area image, the different colors of the bright parts under the electronic device can be identified. Different colors can represent different types of working states, and automatic identification and detection of different working states of the electronic device can be achieved.
[0104] Considering that in actual applications, the background brightness of the electronic device may be high, when the bright component is in a white light state, it is difficult to distinguish the brightness of the bright component from the brightness of the background environment based on the grayscale value.
[0105] Therefore, in an embodiment of the present application, after acquiring a device image of an electronic device, it can be determined whether the brightness of a background image in the device image exceeds a set threshold; wherein the background image is an image in the device image excluding the target area image.
[0106] The brightness of the background image can also be evaluated by grayscale values. When the grayscale average value of the background image reaches a set threshold, it can be determined that the ambient light intensity is too high, which will affect the evaluation of the brightness of the bright parts. Therefore, when the brightness of the background image in the device image exceeds the set threshold, a grayscale histogram normalization operation can be performed on the grayscale image to obtain an adjusted grayscale image. Accordingly, when the grayscale value of the adjusted grayscale image meets the set wake-up condition, it can be determined that the electronic device is in a normal wake-up state.
[0107] By performing a grayscale histogram normalization operation on the grayscale image of the bright component, the brightness contrast between the bright component and the environment can be increased, so that the working state of the electronic device can be analyzed more accurately based on the grayscale image of the bright component.
[0108] In an embodiment of the present application, in order to further improve the accuracy of wake-up state detection, multiple wake-up tests can be performed on the electronic device within a set time period.
[0109] In a specific implementation, when the grayscale value of the grayscale image meets the set wake-up condition and it is determined that the electronic device is in a normal wake-up state, the wake-up count value is increased by one; and it is determined whether the wake-up count value reaches the set count threshold within the set test time.
[0110] If the wake-up count value does not reach the set count threshold within the set test time, it means that the wake-up state of the electronic device is not stable. At this time, the device image corresponding to the electronic device during the test time and the timestamp corresponding to each frame of the image can be recorded, and a prompt message of unstable state can be set.
[0111] When the wake-up count value reaches the set count threshold within the set test time, it can be determined that the wake-up state of the electronic device is stable.
[0112] By performing multiple wake-up tests on the electronic device within the test time, the accuracy of the wake-up test results can be improved to avoid misjudgment caused by the electronic device not being woken up at a certain time.
[0113] Figure 2 A schematic diagram of the structure of a device for detecting the working state of an electronic device provided in an embodiment of the present application, comprising an acquisition unit 21, an interception unit 22, a conversion unit 23 and a determination unit 24;
[0114] An acquisition unit 21 is used to acquire a device image of an electronic device;
[0115] A capture unit 22, used to capture a target area image where a bright component of the electronic device is located from the device image;
[0116] A conversion unit 23, used for converting the target area image into a grayscale image;
[0117] The determination unit 24 is configured to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets a set wake-up condition.
[0118] Optionally, an acquisition unit is used to acquire a brightness value of the electronic device recorded by the light sensor;
[0119] The determination unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold.
[0120] Optionally, it further includes a setting unit;
[0121] A setting unit is used to record the device image and timestamp of the electronic device and set a manual verification mark when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or when the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold.
[0122] Optionally, it also includes a statistical unit and a determination unit;
[0123] A statistical unit, used to count the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode;
[0124] The determination unit is used to determine that the electronic device belongs to the working mode corresponding to the target color when the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value.
[0125] Optionally, it also includes a judging unit and an adjusting unit;
[0126] A judging unit, used to judge whether the brightness of the background image in the device image exceeds a set threshold; wherein the background image is the image in the device image excluding the target area image;
[0127] An adjustment unit, configured to perform a grayscale histogram normalization operation on the grayscale image to obtain an adjusted grayscale image if the brightness of the background image in the device image exceeds a set threshold;
[0128] Correspondingly, the determining unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the adjusted grayscale image meets the set wake-up condition.
[0129] Optionally, the determination unit is used to calculate the grayscale mean of the grayscale image; determine whether the grayscale mean is greater than or equal to a set grayscale lower limit; if the grayscale mean is greater than or equal to the set grayscale lower limit, determine that the electronic device is in a normal wake-up state.
[0130] Optionally, it also includes an accumulation unit, a counting judgment unit and a counting determination unit;
[0131] An accumulation unit, used for increasing the wake-up count value by one;
[0132] A counting judgment unit, used to judge whether the wake-up count value reaches a set counting threshold within a set test time;
[0133] The counting determination unit is used to determine that the wake-up state of the electronic device is stable when the wake-up count value reaches a set count threshold within a set test time.
[0134] Optionally, a recording unit is also included;
[0135] The recording unit is used to record the device image and its corresponding timestamp, and control the electronic device to execute the operation process corresponding to the normal wake-up state.
[0136] Figure 2 The description of the features in the corresponding embodiments can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0137] It can be seen from the above technical solution that the device image of the electronic device is obtained; the bright component provided on the electronic device will be lit in a normal working state and will be extinguished in a non-working state. In the present application, the lighting of the bright component on the electronic device can be relied upon to realize the automated detection of the electronic device production inspection stage. In order to reduce the interference of images of other areas other than the bright component and to improve the efficiency of image analysis, the target area image where the bright component of the electronic device is located can be captured from the device image. In order to realize the evaluation of the brightness of the target area image, the target area image can be converted into a grayscale image; when the grayscale value of the grayscale image meets the set wake-up condition, it can be determined that the electronic device is in a normal wake-up state. Compared with the manual detection method, in this technical solution, the brightness of the area where the bright component on the electronic device is located can be evaluated, thereby achieving automated detection of the electronic device production inspection stage, which greatly improves the detection efficiency of electronic device production inspection.
[0138] Figure 3 A structural diagram of a device for detecting the working state of an electronic device provided in another embodiment of the present application, such as Figure 3 As shown, the device for detecting the working state of an electronic device comprises: a memory 20 for storing a computer program;
[0139] The processor 21 is used to implement the steps of the method for detecting the working status of an electronic device in the above embodiment when executing a computer program.
[0140] The device for detecting the working status of an electronic device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0141] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0142] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, the relevant steps of the method for detecting the working state of the electronic device disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, device images of electronic devices, target area images, wake-up conditions, etc.
[0143] In some embodiments, the device for detecting the working status of an electronic device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0144] Those skilled in the art will understand that Figure 3The structure shown in the figure does not constitute a limitation on the device for detecting the working status of an electronic device, and may include more or fewer components than those shown in the figure.
[0145] It is understandable that if the detection method of the working state of the electronic device in the above embodiment 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 such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, disk or optical disk and other media that can store program codes.
[0146] Figure 4 A schematic diagram of the structure of a system for detecting the working state of an electronic device provided in an embodiment of the present application, comprising an image collector 41 and a processor 42;
[0147] The image collector 41 is used to collect device images of the electronic device and transmit the device images to the processor 42;
[0148] The processor 42 is used to obtain a device image of the electronic device; capture a target area image where a bright component of the electronic device is located from the device image; convert the target area image into a grayscale image; and determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition.
[0149] Optionally, a light sensor is also included;
[0150] Light sensor, used to record the brightness value of electronic equipment;
[0151] The processor 42 is connected to the light sensor and is used to obtain the brightness value of the electronic device recorded by the light sensor; when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, it is determined that the electronic device is in a normal wake-up state.
[0152] The light sensor can use TSL2540. TSL2540 has two output channels, which represent the brightness values of visible light and infrared light respectively. In practical applications, the processor can read the brightness value in its visible light register.
[0153] After determining that the electronic device is in a normal wake-up state, the wake-up counter can be increased by 1, and the test device can automatically play voice commands to perform subsequent detection steps. When the set test termination condition is reached, such as setting the test time to 24h, the detection program can be automatically terminated.
[0154] Figure 4 The description of the features in the corresponding embodiments can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0155] It can be seen from the above technical solution that the device image of the electronic device is obtained; the bright component provided on the electronic device will be lit in a normal working state and will be extinguished in a non-working state. In the present application, the lighting of the bright component on the electronic device can be relied upon to realize the automated detection of the electronic device production inspection stage. In order to reduce the interference of images of other areas other than the bright component and to improve the efficiency of image analysis, the target area image where the bright component of the electronic device is located can be captured from the device image. In order to realize the evaluation of the brightness of the target area image, the target area image can be converted into a grayscale image; when the grayscale value of the grayscale image meets the set wake-up condition, it can be determined that the electronic device is in a normal wake-up state. Compared with the manual detection method, in this technical solution, the brightness of the area where the bright component on the electronic device is located can be evaluated, thereby achieving automated detection of the electronic device production inspection stage, which greatly improves the detection efficiency of electronic device production inspection.
[0156] The above is a detailed introduction to a method, device and system for detecting the working status of an electronic device provided in an embodiment of the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0157] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0158] The above is a detailed introduction to a method, device and system for detecting the working status of an electronic device provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for detecting the working state of an electronic device, characterized in that: include: Acquire a device image of the electronic device; intercepting a target area image where a bright component of the electronic device is located from the device image; Converting the target area image into a grayscale image; When the grayscale value of the grayscale image meets the set wake-up condition, determining that the electronic device is in a normal wake-up state; After intercepting the target area image where the bright component of the electronic device is located from the device image, the method further includes: Counting the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode; When the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value, it is determined that the electronic device belongs to the working mode corresponding to the target color; the target area image contains multiple colors, and compared with the background area, the proportion of bright parts in the target area image is the highest. Based on the color corresponding to each pixel in the target area image, the different colors of bright parts under the electronic device are recognized; Obtaining a brightness value of the electronic device recorded by a light sensor; When the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, determining that the electronic device is in a normal wake-up state; When the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or when the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold, the device image and timestamp of the electronic device are recorded, and a manual verification mark is set; based on the timestamp, the device images that are adjacent to and before the current device image in time are obtained.
2. The method for detecting the working status of an electronic device according to claim 1, characterized in that: After acquiring the device image of the electronic device, the method further includes: Determine whether the brightness of the background image in the device image exceeds a set threshold; wherein the background image is the image in the device image excluding the target area image; If the brightness of the background image in the device image exceeds a set threshold, a grayscale histogram normalization operation is performed on the grayscale image to obtain an adjusted grayscale image; Correspondingly, when the grayscale value of the grayscale image meets the set wake-up condition, determining that the electronic device is in a normal wake-up state includes: When the grayscale value of the adjusted grayscale image meets the set wake-up condition, it is determined that the electronic device is in a normal wake-up state.
3. The method for detecting the working status of an electronic device according to claim 1, characterized in that: When the grayscale value of the grayscale image meets the set wake-up condition, after determining that the electronic device is in a normal wake-up state, the method further includes: Increase the wakeup count by one; Determine whether the wake-up count value reaches a set count threshold within a set test time; When the wake-up count value reaches a set count threshold within a set test time, it is determined that the wake-up state of the electronic device is stable.
4. The method for detecting the working status of an electronic device according to claim 1, characterized in that: After determining that the electronic device is in a normal wake-up state, the method further includes: The device image and its corresponding timestamp are recorded, and the electronic device is controlled to execute the operation process corresponding to the normal wake-up state.
5. A device for detecting the working state of an electronic device, characterized in that: It includes an acquisition unit, an interception unit, a conversion unit and a determination unit; The acquisition unit is used to acquire a device image of the electronic device; The interception unit is used to intercept the target area image where the bright component of the electronic device is located from the device image; The conversion unit is used to convert the target area image into a grayscale image; The determining unit is configured to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets a set wake-up condition; It also includes a statistics unit and a determination unit; the statistics unit is used to count the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode; the determination unit is used to determine that the electronic device belongs to the working mode corresponding to the target color when the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value; the target area image contains multiple colors, and compared with the background area, the proportion of bright parts in the target area image is the highest. Based on the colors corresponding to each pixel in the target area image, the different colors of bright parts under the electronic device are recognized; The acquisition unit is used to acquire the brightness value of the electronic device recorded by the light sensor; the determination unit is used to determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold; and also includes a setting unit; the setting unit is used to record the device image and timestamp of the electronic device and set a manual verification mark when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or when the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold; Based on the timestamp, obtain the device images that are adjacent to the current device image in time.
6. A device for detecting the working status of an electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method for detecting the working status of an electronic device as claimed in any one of claims 1 to 4.
7. A system for detecting the working status of an electronic device, characterized in that: Including image acquisition device and processor; The image collector is used to collect a device image of the electronic device and transmit the device image to the processor; The processor is used to obtain a device image of the electronic device; intercept a target area image where the bright component of the electronic device is located from the device image; convert the target area image into a grayscale image; and determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition; after intercepting the target area image where the bright component of the electronic device is located from the device image, count the colors corresponding to each pixel in the target area image; wherein each color has its corresponding working mode; when the ratio of the number of pixels corresponding to the target color to the number of all pixels in the target area image exceeds a set ratio value, determine that the electronic device belongs to the working mode corresponding to the target color; the target area image contains multiple colors, and compared with the background area, the proportion of the bright component in the target area image is the highest, and based on the color corresponding to each pixel in the target area image, the different colors of the bright component of the electronic device are recognized; Obtain the brightness value of the electronic device recorded by the light sensor; determine that the electronic device is in a normal wake-up state when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold; record the device image and timestamp of the electronic device and set a manual verification mark when the grayscale value of the grayscale image meets the set wake-up condition and the brightness value is less than the set brightness threshold, or the grayscale value of the grayscale image does not meet the set wake-up condition and the brightness value is greater than or equal to the set brightness threshold; obtain the device image that is adjacent to the current device image in time based on the timestamp.
Citation Information
Patent Citations
Indicating light status real time monitor and identification method for power equipment fault indicator
CN101419663A
Indicating light optical state automatic test method and system
CN104897367A
Method and device for processing image, equipment and medium
CN112836692A