LED verification device, method and electronic device
By using an LED verification device to identify the status and verify the patterns of LED modules in the switch, the problem of users having difficulty distinguishing the flickering patterns is solved, ensuring the stable performance of the switch.
Patent Information
- Application Number
- CN202311318968.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-10-12
AI Technical Summary
The LED modules in existing switches are complex, making it difficult for users to determine whether the current blinking pattern is correct, which affects the working performance of the switch.
An LED verification device is provided, which identifies the current status information through an LED identification module, waits for the flashing to occur and records the time through an LED flashing waiting module, verifies that the flashing mode is consistent with the preset mode through an LED flashing mode checking module, and outputs the current status through an LED status output module, thereby realizing the analysis of LED output and error detection.
It can accurately determine whether the LED blinking pattern meets expectations, detect output errors, support verification and sequence checks of multiple blinking patterns, and ensure that the switch works properly.
Smart Images

Figure CN117499809B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of LED (Light-Emitting Diode) communication, and relates to an LED verification device, in particular to an LED verification device, method and electronic equipment. BACKGROUND
[0002] LED (Light Emitting Diode), i.e. a light-emitting diode, is a kind of solid-state semiconductor device that converts electrical energy into light energy. LED is a common module in a switch, used to indicate that the switch is connected to a power supply, a port connection condition, a full-duplex or half-duplex working mode, a working exception and the like. LED can also be used to monitor the activity and performance of a system. However, the LED module in some existing switches is relatively complex, including multiple flashing modes, which makes it difficult for a user to distinguish whether the current flashing mode is correct, thereby affecting the working performance of the switch. SUMMARY
[0003] The present application provides an LED verification device, method and electronic equipment, which are used to solve the problem that it is difficult to distinguish whether the current flashing mode of LED is correct in the prior art, thereby affecting the working performance of the switch.
[0004] In a first aspect, the present application provides an LED verification device, which comprises: an LED identification module, configured to identify current state information of the LED based on preset configuration information of the LED and level information output by the LED; an LED flashing waiting module, configured to wait for occurrence of flashing based on the current state information of the LED; if the occurrence of flashing is waited for, then record a start time of the current state of the LED and a flashing occurrence time based on the current state information of the LED; otherwise, output the current state information of the LED to an LED state output module; the flashing of the LED is a jump of the LED from a current state to an opposite state, and the flashing occurrence time of the LED is a time when the LED jumps from the current state to the opposite state; an LED flashing mode checking module, configured to determine a flashing mode of the LED based on the start time of the current state of the LED and the flashing occurrence time; verify whether the flashing mode of the LED is consistent with a preset flashing mode of the LED based on configuration parameters of the preset flashing mode of the LED; and an LED state output module, configured to output the current state of the LED based on the current state information of the LED output by the LED flashing waiting module.
[0005] In the present application, the LED identification module identifies the current state information of the LED based on the configuration information preset for the LED and the level information output by the LED; the LED flicker waiting module waits for the occurrence of flicker based on the current state information of the LED; if the occurrence of flicker is waited for, the starting time of the current state of the LED and the flicker occurrence time are recorded based on the current state information of the LED; otherwise, the current state information of the LED is output to the LED state output module; the flicker of the LED is the jump of the LED from the current state to the opposite state, and the flicker occurrence time of the LED is the time when the LED jumps from the current state to the opposite state; the LED flicker mode checking module determines the flicker mode of the LED based on the starting time and the flicker occurrence time of the current state of the LED; based on the configuration parameters of the preset flicker mode of the LED, it is verified whether the flicker mode of the LED is consistent with the preset flicker mode of the LED; the LED state output module is used for outputting the current state of the LED based on the current state information of the LED output by the LED flicker waiting module. The present application analyzes the output of the LED design to obtain the current state of the LED design output, and then judges whether the current LED design output meets the expectation according to the analyzed LED design output state, thereby helping to find the output error problem of the current LED design.
[0006] In an implementation form of the first aspect, the LED identification module comprises: an LED expected output unit, configured to acquire the state information preset for the LED based on the configuration information preset for the LED; and an LED state judgment unit, configured to determine the current state information of the LED based on the state information preset for the LED and the level information output by the LED.
[0007] In an implementation form of the first aspect, the LED flicker waiting module comprises: an LED first recording unit, configured to record the current state information of the LED and the starting time of the current state of the LED; an LED flicker waiting judgment unit, configured to record the flicker waiting time of the LED from the starting time of the current state of the LED, and judge whether the flicker waiting time of the LED exceeds a waiting time threshold to obtain a judgment result; and an LED second recording unit, configured to record the state information of the opposite state of the LED and the flicker occurrence time of the LED.
[0008] In an implementation form of the first aspect, the LED verification device further comprises an LED state output module, configured to output the current state information of the LED based on the judgment result obtained by the LED flicker waiting judgment unit.
[0009] In an implementation form of the first aspect, the LED flicker mode checking module comprises: an LED flicker unit time obtaining unit, configured to obtain the LED flicker time based on the start time of the current state of the LED and the LED flicker occurrence time; an LED error judging unit, configured to obtain the error rate of the LED flicker time based on the configuration parameter of the preset LED flicker mode of the LED and the LED flicker time, and compare the error rate with a preset error rate to verify whether the current LED flicker mode is consistent with the preset LED flicker mode of the LED; wherein the error rate is determined according to the relationship between the expected LED flicker time and the LED flicker time.
[0010] In an implementation form of the first aspect, the LED verification device comprises a plurality of LED flicker mode checking modules; each of the LED flicker mode checking modules is configured to check a preset flicker mode; and each of the LED flicker mode checking modules is configured to perform the checking work in parallel or in series.
[0011] In an implementation form of the first aspect, the LED verification device further comprises an LED flicker mode judging module, configured to judge whether only one of the checking results of the plurality of LED flicker mode checking modules is passed, and if so, the checking is ended, and if not, the LED identification module is returned to be re-identified.
[0012] In an implementation form of the first aspect, the LED verification device further comprises an LED flicker output module, configured to output the preset flicker mode corresponding to the LED flicker mode checking module whose checking result is passed as the LED flicker mode.
[0013] In a second aspect, the present application provides an LED verification method, which comprises: identifying the current state information of the LED based on the preset configuration information of the LED and the level information output by the LED; recording the start time of the current state of the LED and the LED flicker occurrence time based on the current state information of the LED; the LED flicker is the jump of the LED from the current state to the opposite state, and the LED flicker occurrence time is the time when the LED jumps from the current state to the opposite state; determining the LED flicker mode based on the start time of the current state of the LED and the LED flicker occurrence time; and verifying whether the LED flicker mode is consistent with the preset LED flicker mode of the LED based on the configuration parameter of the preset LED flicker mode of the LED.
[0014] In a third aspect, the present application provides an electronic device comprising the LED verification device described above.
[0015] As described above, the LED verification device, method and electronic equipment provided by the present application have the following beneficial effects:
[0016] 1、In the present application, the LED identification module identifies the current state information of the LED based on the configuration information of the LED and the level information output by the LED; the LED flicker waiting module waits for the occurrence of flicker based on the current state information of the LED; if the occurrence of flicker is waited for, the starting time and the flicker occurrence time of the current state of the LED are recorded based on the current state information of the LED; otherwise, the current state information of the LED is output to the LED state output module; the flicker of the LED is the jump of the LED from the current state to the opposite state, and the flicker occurrence time of the LED is the time when the LED jumps from the current state to the opposite state; the LED flicker mode checking module determines the flicker mode of the LED based on the starting time and the flicker occurrence time of the current state of the LED; based on the configuration parameters of the preset flicker mode of the LED, it is verified whether the flicker mode of the LED is consistent with the preset flicker mode of the LED; the LED state output module is used for outputting the current state of the LED based on the current state information of the LED output by the LED flicker waiting module; the present application obtains the current state of the LED design output by analyzing the output of the LED design, and then judges whether the current LED design output meets the expectation according to the analyzed LED design output state, so as to help find the output error problem of the current LED design.
[0017] 2、The present application can flexibly extend to various flicker modes, and when the LED design increases various flicker modes, the LED flicker mode judgment module can realize verification of the various flicker modes of the LED.
[0018] 3、The present application also supports LED sequence checking, such as LED sequence being LED first bright, then flicker, and then dark. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 The LED verification device structure schematic diagram according to the first embodiment of the present application is shown.
[0020] Figure 2 The LED verification device structure schematic diagram according to the second embodiment of the present application is shown.
[0021] Figure 3A structure diagram of the LED verification device according to the third embodiment of the present application is shown.
[0022] Figure 4 A structure diagram of the LED identification module according to the embodiment of the present application is shown.
[0023] Figure 5 A structure diagram of the LED flicker waiting module according to the embodiment of the present application is shown.
[0024] Figure 6 A structure diagram of the LED flicker mode checking module according to the embodiment of the present application is shown.
[0025] Figure 7 A structure diagram of the LED flicker mode judging module checking a plurality of LED flicker mode checking modules according to the embodiment of the present application is shown.
[0026] Figure 8 A flow chart of the LED verification method according to the embodiment of the present application is shown.
[0027] Figure 9 A structure diagram of the electronic device according to the embodiment of the present application is shown.
[0028] Element number explanation
[0029] 100 LED verification device
[0030] 110 LED identification module
[0031] 111 LED expected output unit
[0032] 112 LED state judging unit
[0033] 120 LED flicker waiting module
[0034] 121 LED first recording unit
[0035] 122 LED flicker waiting judging unit
[0036] 123 LED second recording unit
[0037] 130 LED flicker mode checking module
[0038] 131 LED flicker unit time length obtaining unit
[0039] 132 LED error judging unit
[0040] 140 LED state output module
[0041] 141 LED state output unit
[0042] 150 LED flicker mode judging module
[0043] 160 LED flicker output module
[0044] 200 electronic device
[0045] S1-S4 steps DETAILED DESCRIPTION
[0046] Other advantages and effects of the present application can be easily understood by those skilled in the art from the above description. The present application can also be implemented or applied in other different embodiments, and the details in the description can be modified or changed in various ways without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0047] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The shape, number and ratio of the components when actually implemented can be arbitrarily changed, and the layout of the components can be more complex.
[0048] Some LED modules of switches are relatively complex and include multiple flicker modes. Different flicker modes express different information. For example, some flicker modes are as follows: 100 ms or other values are taken as a flicker unit, four flicker units are taken as a flicker period, one flicker unit is bright and the other flicker units are dark in a flicker period, which represents that the working rate of the current switch is 100 m, two flicker units are bright and the other flicker units are dark in a flicker period, which represents that the working rate of the current switch is 1000 m, and three flicker units are bright and the other flicker units are dark in a flicker period, which represents that the working rate of the current switch is 2500 m.
[0049] Different flicker modes can also be flexibly configured according to user preferences. For example, some flicker modes are as follows: 100 ms or other values are taken as a flicker unit, any number of flicker units can be configured as a flicker period, the number of bright flicker units and the number of dark flicker units in a flicker period can be configured, and finally the LED flickers according to the configuration.
[0050] A common and general flicker mode is as follows: 100 ms or other values are taken as a flicker unit, two flicker units are taken as a flicker period, one flicker unit is bright and the other flicker unit is dark.
[0051] The user can configure the information conveyed by the blinking to be either half-duplex or full-duplex at the moment, or to indicate that there is a data packet being sent or received at the moment, or to indicate the working rate.
[0052] The application provides an LED verification device, method and electronic equipment, and solves the problem that it is difficult to determine whether the current blinking mode of an LED is correct in the prior art, thereby affecting the working of a switch.
[0053] The technical solutions in the embodiments of the application will be described in detail below with reference to the drawings in the embodiments of the application.
[0054] Please refer to Figure 1 As shown in the figure, the LED verification device 100 includes an LED identification module 110, an LED blinking waiting module 120, an LED blinking mode checking module 130 and an LED state output module 140. The LED identification module 110 is in communication connection with the LED, identifies the current state information of the LED based on the configuration information preset by the LED and the level information output by the LED, the LED blinking waiting module 120 is in communication connection with the LED identification module 110, waits for the occurrence of blinking based on the current state information of the LED, if the occurrence of blinking is waited for, records the start time of the current state of the LED and the blinking occurrence time based on the current state information of the LED, otherwise, outputs the current state information of the LED to the LED state output module, the blinking of the LED is the jump of the LED from the current state to the opposite state, the blinking occurrence time of the LED is the time when the LED jumps from the current state to the opposite state, the LED blinking mode checking module 130 is in communication connection with the LED blinking waiting module 120, determines the blinking mode of the LED based on the start time of the current state of the LED and the blinking occurrence time, verifies whether the blinking mode of the LED is consistent with the preset blinking mode of the LED based on the configuration parameters of the preset blinking mode of the LED, and the LED state output module 140 is used for outputting the current state of the LED based on the current state information of the LED output by the LED blinking waiting module 120.
[0055] Specifically, the LED verification device provided by the embodiment of the present application is a verification device for LED design, which takes the output of LED design as input, analyzes the output of LED design to obtain the current state of the output of LED design, and then judges whether the current output of LED design meets the expectation according to the analyzed state of the output of LED design, so as to help find the output error of the current LED design.
[0056] As shown in Figure 2 In an embodiment of the present application, the LED identification module 110 includes an LED expected output unit 111 and an LED state judgment unit 112; the LED expected output unit 111 obtains the state information of the LED preset based on the configuration information of the LED preset; and the LED state judgment unit 112 determines the current state information of the LED based on the state information of the LED preset and the level information of the LED output.
[0057] Specifically, the LED identification module 110 outputs the bright or dark information of the current LED according to the polarity of the LED design output configured by the user, and the polarity of the LED design output configured by the user indicates whether the low level of the current LED design output represents the LED bright, the high level represents the LED dark, or the high level of the LED output represents the LED bright, and the low level represents the LED dark.
[0058] As shown in Figure 2 In an embodiment of the present application, the LED flicker waiting module 120 includes an LED first recording unit 121, an LED flicker waiting judgment unit 122 and an LED second recording unit 123; the LED first recording unit 121 is used for recording the current state information of the LED and the starting time of the current state of the LED; the LED flicker waiting judgment unit 122 waits for the occurrence of the flicker based on the current state information of the LED, records the flicker waiting time of the LED from the starting time of the current state of the LED, and judges whether the flicker waiting time of the LED exceeds the waiting time threshold, if not, obtains the flicker occurrence time of the LED, otherwise outputs the current state information of the LED to the LED state output module; wherein the flicker waiting time of the LED is any time period from the starting time of the current state of the LED to the flicker occurrence time; and the LED second recording unit 123 is used for recording the state information of the opposite state of the LED and the flicker occurrence time of the LED.
[0059] Specifically, the LED flicker waiting module 120 waits for the jump of the LED according to the LED bright or dark information output by the current LED design, such as waiting for the LED to be dark if the current LED is bright, and vice versa. If the jump is waited for before the set time threshold, two sampling times are output, one of which is the time when the jump is waited for, and the other is the time when the jump occurs, and the two sampling times are marked as fir_time and sec_time, and the two sampling times are input to the LED flicker mode checking module 130 for jump time checking. If the jump is not waited for before the set time threshold, the LED state output module is entered to judge whether the LED outputs bright or dark. It should be noted that the jump of the LED is also the flicker of the LED.
[0060] Specifically, the start time of the current state of the LED is the waiting flicker time of the LED, that is, the time when the jump is waited for, and the flicker occurrence time of the LED is the time when the jump occurs.
[0061] Please refer to Figure 2 As shown in the figure, in an embodiment of the present application, the LED state output module 140 includes an LED state output unit 141; the LED state output unit 141 outputs the current state of the LED based on the LED current state information output by the LED flicker waiting judgment unit 122.
[0062] Specifically, the LED state output module 140 outputs the LED state as bright or dark according to the bright or dark information output by the LED, and checks whether there is illegal jump (illegal flicker) according to the jump counter. When the number of jumps counted exceeds the allowed value configured by the user, an error is reported.
[0063] Please refer to Figure 2 As shown in the figure, in an embodiment of the present application, the LED flicker mode checking module 130 includes an LED flicker unit time length acquisition unit 131 and an LED error judgment unit 132; the LED flicker unit time length acquisition unit 131 acquires the LED flicker time based on the start time of the current state of the LED and the flicker occurrence time of the LED; the LED error judgment unit 132 obtains the error rate of the LED flicker time based on the configuration parameters of the LED preset flicker mode and the LED flicker time, compares the error rate with the preset error rate, and verifies whether the current flicker mode of the LED is consistent with the preset flicker mode of the LED; wherein the error rate is determined according to the relationship between the expected flicker time of the LED and the flicker time of the LED.
[0064] Specifically, the error rate is a ratio of an absolute value of a difference between the expected flicker time of the LED and the flicker time of the LED and the expected flicker time of the LED.
[0065] Specifically, the LED flicker mode checking module 130 checks according to the input LED flicker mode configuration parameters, the LED flicker mode configuration parameters including a time length of one flicker unit in the LED flicker mode, a number of the flicker units in one flicker cycle in the LED flicker mode, and a bright or dark condition of each flicker unit in one flicker cycle, where the number 1 represents LED bright and the number 0 represents LED dark. According to the above LED flicker mode configuration parameters, the time and the number of LED bright in one flicker cycle can be obtained, and the time and the number of LED dark in one flicker cycle can be obtained.
[0066] The absolute value of the difference between the two sampling times fir_time and sec_time output by the LED flicker waiting module 120 is the output flicker time. The output flicker time and the bright time or the dark time obtained from the LED flicker mode configuration parameters are compared to see whether it is less than the receivable error rate. If it is less than or equal to the receivable error rate, the check passes; if it is greater than the receivable error rate, the check fails. Only when the check passes in the flicker cycle of one LED flicker mode, the error indication signal err_en is output as 0; otherwise, the error indication signal err_en is output as 1.
[0067] Referring to Figure 3 As shown in the figure, in an embodiment of the present application, the LED verification device 100 includes a plurality of LED flicker mode checking modules 130 (for example, LED flicker mode checking module 1, LED flicker mode checking module 2, …, LED flicker mode checking module x); each of the LED flicker mode checking modules 130 checks a preset flicker mode; and each of the LED flicker mode checking modules 130 performs the checking work in parallel or in series.
[0068] Referring to Figure 3 As shown in the figure, in an embodiment of the present application, the LED verification device further includes an LED flicker mode judgment module 150; the LED flicker mode judgment module 150 is used to judge whether only one checking result passes in the checking results of the plurality of LED flicker mode checking modules 130. If yes, the checking ends; if not, the LED recognition module is returned to be recognized again.
[0069] Specifically, the LED verification device according to the present application embodiment includes a plurality of LED flicker mode checking modules 130, each of which is configured to check a preset LED flicker mode. The user configures the configuration parameters of each LED flicker mode to the values required by the corresponding LED flicker mode. The LED flicker mode judgment module 150 performs the checking work in parallel on all the flicker modes, and the length of time for one checking is the longest flicker period in all the flicker modes. Only when one of the LED flicker modes passes the checking, the checking can be ended, and the LED flicker output module outputs the corresponding LED flicker mode state signal.
[0070] After the LED flicker checking is completed, the LED flicker judgment module 150 enters the LED flicker waiting module to continue waiting for the next flicker, and performs the time checking on the next flicker until all the flicker modes have completed the checking of one flicker period.
[0071] Please refer to Figure 3 As shown in the figure, in the present application embodiment, the LED verification device 100 further includes an LED flicker output module 160, which is configured to output the preset LED flicker mode corresponding to the LED flicker mode checking module 130 whose checking result is passed, as the LED flicker mode.
[0072] Specifically, the LED flicker output module 160 outputs the preset LED flicker mode corresponding to the LED flicker mode checking module 130 whose checking result is passed, as the LED flicker mode. After the LED state output module 140 and the LED flicker output module 160 output the LED bright or flicker or jump mode, they return to the LED recognition module 110 to perform the judgment and output of the next LED bright or flicker or jump mode. The LED state output module 140 and the LED flicker output module 160 output the LED bright or flicker or jump mode, which is compared with the LED bright or flicker or jump mode designed to be output by the LED. If they are the same, the checking is passed, otherwise, the checking fails. The LED verification device according to the present application embodiment can support multiple LED sequence checking, such as LED bright first, then flicker, and then dark. At this time, the LED state output module 110 and the LED flicker output module 160 of the LED verification device according to the present application embodiment will output the LED bright, LED flicker, and LED dark sequence in turn.
[0073] The following will be described in detail Figures 4 to 7 The modules in the LED verification device according to the present application embodiment will be described in detail, so as to help the skilled in the art to understand the principle of the LED verification device according to the present application embodiment.
[0074] Referring to Figure 4 As shown in the block diagram of the LED identification module 110 according to an embodiment of the present application, since the external LED diode can be connected to the cathode or the anode, when the external LED diode is connected to the cathode, the LED output low level will light the external LED diode; when the external LED diode is connected to the anode, the LED output high level will light the external LED diode. The polarity configuration of the user input configuration LED design polarity indicates whether the LED design output low level represents LED bright high level represents LED dark, or the LED output high level represents LED bright low level represents LED dark. The LED bright expected output and the LED dark expected output module determines whether the LED bright should output high level or low level according to the polarity configuration, and then compares the high or low level of the LED design output, to obtain the current LED bright state or dark state of the LED design output.
[0075] Referring to Figure 5 As shown in the block diagram of the LED identification module 110 according to an embodiment of the present application, since the external LED diode can be connected to the cathode or the anode, when the external LED diode is connected to the cathode, the LED output low level will light the external LED diode; when the external LED diode is connected to the anode, the LED output high level will light the external LED diode. The polarity configuration of the user input configuration LED design polarity indicates whether the LED design output low level represents LED bright high level represents LED dark, or the LED output high level represents LED bright low level represents LED dark. The LED bright expected output and the LED dark expected output module determines whether the LED bright should output high level or low level according to the polarity configuration, and then compares the high or low level of the LED design output, to obtain the current LED bright state or dark state of the LED design output.
[0076] The signal time_cnt in the waiting time counting module represents the current waiting time count, which is increased by one at each counting unit, while determining whether it is greater than the configured waiting time timeout threshold. If the current waiting time count is greater than the timeout threshold, a timeout occurs. The value of the configured waiting time timeout threshold needs to be greater than the maximum LED flashing period in the LED design.
[0077] If the LED flashes are waited for when time_cnt is less than or equal to the waiting time timeout threshold, the LED flashing counter is increased by one, and the current time is recorded. The two recorded time markers are fir_time and sec_time, the values of which can be sampled by the $time() function. When both fir_time and sec_time are non-zero, fir_time and sec_time are input to a plurality of LED flashing mode checking modules 130 for jump time checking; if one of fir_time and sec_time is zero, the value of the minimum of fir_time and sec_time is refreshed as the current time after waiting for the LED flashing again.
[0078] Specifically, fir_time and sec_time are used to record time, for example, the first sampling to a time time0, whether to use fir_time or sec_time to record depends on the relative size of fir_time and sec_time, the initial value of fir_time and sec_time is 0, which does not meet fir_time<sec_time, so sec_time=time0; the second sampling to a time time1, at this time fir_time is 0, sec_time is time0, which meets fir_time<sec_time, so fir_time is time1, sec_time is still time0. Then when calculating sample_blink_time, the smaller one of fir_time and sec_time will be refreshed to 0, in the above example, sec_time will be refreshed to 0, and fir_time continues to be time1. Then the third sampling to a time time2, fir_time is time1, sec_time is 0, which does not meet fir_time<sec_time, so sec_time=time2. That is, in the present application, the two variables fir_time and sec_time are used to sample time, the used time that is relatively early is eliminated by refreshing to 0 first and then refreshing to the sampling time.
[0079] If the timeout occurs but the LED does not flash, it means that the current LED does not flash, and is in a constant bright or dark state, and the LED state output module 140 outputs the LED bright state or dark state.
[0080] The LED flashing mode judgment module 150 will judge whether there is only one flashing mode in the multiple or one LED flashing mode, and after checking, it will exit the loop and enter the LED flashing output module 160 to output the flashing mode state that passes the check, otherwise it will continue to enter the LED flashing waiting module 120 to continue the next round of LED flashing waiting and time checking until the condition of exiting the loop in the LED flashing mode judgment module 150 is met.
[0081] Please refer to Figure 6The diagram shows a block diagram of the LED blinking mode checking module according to an embodiment of the present invention. The checking unit is one LED blinking cycle of the current switching mode. The checking is performed according to the configuration parameters of the input LED switching mode. The configuration parameters of the LED blinking mode are: the duration of one blinking unit in the LED blinking mode, the number of blinking units in one blinking cycle of the LED blinking mode, and the brightness or darkness of each blinking unit in one blinking cycle. The number 1 can represent the LED being bright and the number 0 can represent the LED being dark.
[0082] Based on the configuration parameters of the LED blinking mode described above, the duration and number of times the LED is on, and the duration and number of times the LED is off, can be obtained within one blink cycle. The LED blinking waiting module 120 outputs two sampling times, fir_time and sec_time. The absolute value of the difference between the two sampling times is the output blinking time. This output blinking time is compared with the on or off time obtained from the LED blinking mode configuration parameters to see if it is less than the acceptable error rate. If it is less than or equal to the acceptable error rate, the check passes; if it is greater than the acceptable error rate, the check fails.
[0083] like Figure 7 As shown, based on the two sampling times fir_time and sec_time output by the LED blinking wait module 120, the output blinking time is denoted as sample_blink_time, and the LED blink count counter blink_cnt is incremented. The output blinking time sample_blink_time and the expected blinking time exp_blink_time obtained from the LED blinking mode configuration parameters are used to calculate the error rate err_rate. This rate is then compared with the configured acceptable error rate exp_err_rate. If it is less than or equal to the configured error rate, the check passes, and the check output indicator signal err_en is set to 0; if it is greater than the configured error rate, the check fails, and the check output indicator signal err_en is set to 1. The configured acceptable error rate exp_err_rate should be determined by the current LED architecture scheme to be an appropriate error rate.
[0084] Please see Figure 7 The diagram shown illustrates the process by which the LED blinking mode determination module 150 checks multiple LED blinking mode checking modules 130 according to an embodiment of the present invention. Multiple LED blinking mode checking modules 130 are instantiated based on the number of existing LED blinking modes, with each module corresponding to a preset LED blinking mode. Users configure the parameters for each LED blinking mode to the values required for that mode.
[0085] The LED flicker mode judgment module 150 checks all the flicker modes in parallel, and the duration of one check should be the longest flicker period among all the flicker modes. Only when one kind of LED flicker mode passes the check, the flag signal chk_end of the check end is 1, the check is ended, and the corresponding LED flicker mode state signal is output to the LED flicker output module 160. The output error indication signal err_en in the LED flicker mode check module 130 corresponding to the LED flicker mode that passes the check is 0, and the output error indication signal err_en in the LED flicker mode check module 130 corresponding to the LED flicker mode that fails the check is 1. After one LED flicker check is completed, the LED flicker mode judgment module 150 enters the LED flicker waiting module 120 to continue to wait for the next jump, and the time check is performed on the next flicker until all the flicker modes have completed the check of one flicker period.
[0086] Among the various LED flicker modes currently existing, there may be some LED flicker modes that have the same flicker. The LED verification device described in the embodiment of the present application requires that after the flicker periods of all the LED flicker modes are checked, only one kind of LED flicker mode passes the check, and then the check is ended, and the corresponding LED flicker mode state signal is output to the LED flicker output module 160. This requires that the user cannot input two LED flicker modes that have the same jump. Or when the flicker of the various LED flicker modes cannot be guaranteed to be different, the LED verification device needs to be informed in advance that when all the flicker modes pass the check, which flicker mode is selected to be output to the LED flicker output module 160 for flicker state output.
[0087] Please refer to Figure 8 In the embodiment of the present application, the LED verification method provided by the embodiment of the present application comprises:
[0088] Step S1, identifying the current state information of the LED based on the configuration information of the LED and the level information output by the LED;
[0089] Step S2, waiting for the occurrence of flicker based on the current state information of the LED. If the occurrence of flicker is waited for, recording the start time of the current state of the LED and the occurrence time of flicker based on the current state information of the LED. Otherwise, outputting the current state information of the LED to the LED state output module. The flicker of the LED is the jump of the LED from the current state to the opposite state, and the occurrence time of the flicker of the LED is the time when the LED jumps from the current state to the opposite state;
[0090] Step S3, determining the flicker mode of the LED based on the starting moment and the flicker occurrence moment of the current state of the LED; verifying whether the flicker mode of the LED is consistent with the preset flicker mode of the LED based on the configuration parameter of the preset flicker mode of the LED.
[0091] Step S4, outputting the current state of the LED based on the current state information of the LED output by the LED flicker waiting module.
[0092] The protection scope of the LED verification method in the embodiments of the present application is not limited to the step execution order listed in the embodiments, and any scheme realized by adding, reducing or replacing steps of the prior art according to the principle of the present application is included in the protection scope of the present application.
[0093] The LED verification device provided in the embodiments of the present application can realize the LED verification method of the present application, but the implementation device of the LED verification method of the present application includes but is not limited to the structure of the LED verification device listed in the embodiments, and any structure deformation and replacement of the prior art according to the principle of the present application is included in the protection scope of the present application.
[0094] In summary, the LED verification device, method and electronic equipment provided in the embodiments of the present application can help to find the output error problem of the current LED design by taking the output of the LED design as input, analyzing the current state of the LED design output, LED bright or dark, or flickering, and judging whether the current LED design output meets the expectation according to the analyzed LED design output state.
[0095] The current LED verification device for LED design can effectively help to find the problem existing in the LED design, such as the LED flicker not meeting the flicker mode requirement configured by the user, the flicker mode configured by the user requiring the LED to bright in one flicker period of 4 flicker units, and the LED to be dark in two flicker units in one flicker period, which indicates that there is a report to be sent, and the result is that the LED is only bright in one flicker unit in one flicker period when there is a report to be sent, and the other flicker units are dark; such as the LED being configured by the user to be bright after the switch builds a link, and the result being that the LED design is still dark after the switch builds a link.
[0096] The LED verification device can flexibly expand the verification of the multiple flashing modes of the LED when the LED design increases the multiple flashing modes.
[0097] In several embodiments provided by the present application, it should be understood that the disclosed system, device or method can be implemented in other manners. For example, the embodiments of the device described above are merely schematic, and the division of modules / units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different modules / units can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0098] The modules / units described as separated components can or can not be physically separated, and the components displayed as modules / units can or can not be physical modules, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules / units can be selected according to actual needs to achieve the purposes of the embodiments of the present application. For example, the functional modules / units in the embodiments of the present application can be integrated in one processing module, or can be physically separated, or two or more modules / units can be integrated in one module / unit.
[0099] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, each example has been described in general terms in the above description. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0100] Please refer to Figure 9As shown, in an embodiment of the present application, an electronic device 200 is provided, which comprises the LED verification device 100 described above.
[0101] The embodiments of the present application further provide a computer readable storage medium. It is understood by those skilled in the art that all or part of the steps of the methods described above can be instructed by a program to complete by a processor, and the program can be stored in a computer readable storage medium. The storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid state disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. integrated with one or more available medium sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0102] The embodiments of the present application can further provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in the embodiments of the present application are generated. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer or data center to another website, computer or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode.
[0103] When the computer program product is executed by a computer, the computer executes the method described in the foregoing method embodiments. The computer program product can be a software installation package, which can be downloaded and executed on the computer when the foregoing method is needed.
[0104] The description of the flow or structure corresponding to each of the above figures has its own emphasis, and the parts not described in detail in a certain flow or structure can be referred to the related description of other flows or structures.
[0105] The above embodiments are only illustrative of the principles of the present application and its efficacy, and are not intended to limit the present application. Any modification or change made by any person skilled in the art without departing from the spirit and scope of the present application shall be covered by the claims of the present application.
Claims
1. An LED verification device, characterized in that, The LED verification device includes: The LED recognition module identifies the current status information of the LED based on the preset configuration information of the LED and the level information output by the LED. The LED blinking waiting module waits for blinking to occur based on the current state information of the LED. If blinking occurs, it records the start time of the current state of the LED and the time when blinking occurs based on the current state information of the LED. Otherwise, it outputs the current state information of the LED to the LED state output module. The blinking of the LED is the LED changing from its current state to the opposite state, and the blinking time is the moment when the LED changes from its current state to the opposite state. The LED blinking mode checking module determines the blinking mode of the LED based on the start time of the current state of the LED and the blinking time. Based on the configuration parameters of the LED's preset blinking mode, it verifies whether the LED blinking mode is consistent with the LED's preset blinking mode. The LED status output module outputs the current status of the LED based on the current status information of the LED output by the LED blinking waiting module.
2. The LED verification device according to claim 1, characterized in that, The LED recognition module includes: The LED expected output unit obtains the preset state information of the LED based on the preset configuration information of the LED; the LED state judgment unit determines the current state information of the LED based on the preset state information of the LED and the level information output by the LED.
3. The LED verification device according to claim 1, characterized in that, The LED blinking waiting module includes: The first LED recording unit is used to record the current state information of the LED and the start time of the current state of the LED; The LED blinking waiting judgment unit waits for the occurrence of blinking based on the current state information of the LED. Starting from the start time of the current state of the LED, it records the blinking waiting time of the LED and determines whether the blinking waiting time of the LED exceeds the waiting time threshold. If it does not exceed the threshold, it obtains the blinking time of the LED; otherwise, it outputs the current state information of the LED to the LED state output module. The second LED recording unit is used to record the state information of the opposite state of the LED and the time when the LED flashes.
4. The LED verification device according to claim 3, characterized in that, The LED status output module includes: The LED status output unit outputs the current status of the LED based on the current status information of the LED output by the LED blinking wait judgment unit.
5. The LED verification device according to claim 1, characterized in that, The LED blinking mode checking module includes: The LED blinking unit duration acquisition unit acquires the blinking time of the LED based on the start time of the current state of the LED and the blinking time of the LED. The LED error judgment unit obtains the expected flashing time of the LED based on the configuration parameters of the LED preset flashing mode; obtains the LED flashing time error rate based on the expected flashing time and the actual flashing time of the LED; and compares the error rate with the preset error rate to verify whether the current flashing mode of the LED is consistent with the preset flashing mode of the LED; wherein, the error rate is determined based on the relationship between the expected flashing time and the actual flashing time of the LED.
6. The LED verification device according to claim 1, characterized in that, The LED verification device includes several LED flashing mode checking modules; each LED flashing mode checking module checks a preset flashing mode; each LED flashing mode checking module performs the checking work in parallel or serially.
7. The LED verification device according to claim 6, characterized in that, The LED verification device also includes: The LED blinking mode judgment module is used to determine whether only one of the inspection results from the LED blinking mode checking modules passes. If so, the check ends; otherwise, it returns to the LED recognition module for re-identification.
8. The LED verification device according to claim 7, characterized in that, The LED verification device also includes: The LED blinking output module is used to output the preset blinking mode corresponding to the LED blinking mode inspection module that has passed the inspection as the blinking mode of the LED.
9. An LED verification method, characterized in that, The LED verification method includes: The current status information of the LED is identified based on the preset configuration information of the LED and the level information output by the LED; Based on the current state information of the LED, wait for the flashing to occur; if the flashing occurs, record the start time of the current state of the LED and the flashing time based on the current state information of the LED; otherwise, output the current state information of the LED to the LED state output module; the flashing of the LED is the LED jumping from the current state to the opposite state, and the flashing time of the LED is the moment when the LED jumps from the current state to the opposite state. The blinking mode of the LED is determined based on the start time of the current state of the LED and the blinking occurrence time; the blinking mode of the LED is verified to be consistent with the preset blinking mode of the LED based on the configuration parameters of the preset blinking mode of the LED. The current state of the LED is output based on the current state information of the LED output by the LED blinking waiting module.
10. An electronic device, characterized in that, The electronic device includes the LED verification device according to any one of claims 1 to 8.
Citation Information
Patent Citations
Wireless interactive multifunctional LED ornamental toy with identity recognition function
CN103127731A
Multi-mode LED lamp string control circuit and LED lamp string
CN204157098U