Terminal equipment indicating lamp working method and device, electronic equipment and storage medium
By monitoring the operating status of the terminal device and obtaining indicator parameters, terminating the display of the old status and executing the new status, the problem of incorrect indicator light display of the terminal device is solved and the stability of the indicator light is improved.
Patent Information
- Application Number
- CN202411061811.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-12
Smart Images

Figure CN118945941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of indicator light control, and in particular to a terminal device indicator light operating method, device, electronic device and storage medium. Background Art
[0002] Existing terminal devices usually use real-time operating systems (RTOS) to switch states, and set various flashing combinations of indicator lights to indicate different states of the terminal device. When using multitasking to process transactions, different states of a terminal device may occasionally occur at the same time, causing multiple different states to control the same group of indicator lights. The command conflict causes the indicator lights to display disorderly and fail to work properly. Summary of the invention
[0003] The purpose of the present invention is to provide a terminal device indicator light working method, device, electronic device and storage medium, which can call the indicator light control according to the terminal device operating status and the obtained indicator light parameters to realize direct control of the indicator light display state, thereby solving the technical problem in the prior art that indicator light display confusion is easily caused, thereby improving the stability of the indicator light display state.
[0004] In a first aspect, an embodiment of the present invention provides a method for operating an indicator light of a terminal device, which may include: monitoring the operating status of the terminal device; when it is monitored that the operating status of the terminal device is converted from a first state to a second state, obtaining indicator light parameters corresponding to the second state; calling an indicator light control to terminate the display of the indicator light in the first state; and calling the indicator light control to execute the display of the indicator light in the second state according to the indicator light parameters corresponding to the second state.
[0005] In some optional implementations, the method also includes: when it is monitored that the operating state of the terminal device is converted from the first state to the second state, obtaining the indicator light parameters corresponding to the first state; determining the execution status of the indicator light control for the display of the indicator light in the first state according to the indicator light parameters corresponding to the first state; if the indicator light control has completed the display of the indicator light in the first state, calling the indicator light control to execute the display of the indicator light in the second state according to the indicator light parameters corresponding to the second state; if the indicator light control has not completed the display of the indicator light in the first state, calling the indicator light control to terminate the display of the indicator light in the first state.
[0006] In some optional implementations, the indicator light parameters include clock parameters and flashing parameters. The clock parameters are used to indicate the initial time and current time of the indicator light display in each state of the indicator light control; the flashing parameters are used to indicate the display duration, interval time and number of flashes of the indicator light in each state.
[0007] In some optional implementations, the execution status of the indicator light control for the display of the indicator light in the first state is determined according to the indicator light parameters corresponding to the first state, including: determining the time required for the indicator light control to complete the display of the indicator light in the first state according to the flashing parameters; determining the time spent by the indicator light control to execute the display of the indicator light in the first state according to the clock parameters; determining whether the indicator light control has completed the display of the indicator light in the first state according to the time required to complete the display of the indicator light in the first state and the time spent on executing the display of the indicator light in the first state; if the time spent on executing the display of the indicator light in the first state is less than the time spent on executing the display of the indicator light in the first state, then it is determined that the indicator light control has not completed the display of the indicator light in the first state; if the time spent on executing the display of the indicator light in the first state is greater than or equal to the time spent on executing the display of the indicator light in the first state, then it is determined that the indicator light control has completed the display of the indicator light in the first state.
[0008] In some optional implementations, calling the indicator light control according to the indicator light parameters corresponding to the second state to display the indicator light in the second state includes: calling the flashing interface of the indicator light control according to the indicator light parameters corresponding to the second state to display the indicator light in the second state.
[0009] In some optional implementations, calling the indicator light control to terminate the display of the indicator light in the first state includes: calling a light off interface of the indicator light control to turn off the indicator light, so as to terminate the display of the indicator light in the first state.
[0010] In some optional implementations, the indicator light control is called according to the indicator light parameters corresponding to the second state to display the indicator light in the second state, including: calling the indicator light control's light on interface to turn on the indicator light; calling the indicator light control's flashing interface to display the indicator light in the second state according to the indicator light parameters corresponding to the second state.
[0011] In a second aspect, an embodiment of the present invention provides a terminal device indicator light working device, which may include: a monitoring module for monitoring the operating status of the terminal device; a parameter acquisition module for acquiring indicator light parameters corresponding to the second state when it is monitored that the operating status of the terminal device is converted from a first state to a second state; a calling module for calling the indicator light control to terminate the display of the indicator light in the first state; the calling module is also used to call the indicator light control to execute the display of the indicator light in the second state according to the indicator light parameters corresponding to the second state.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute any method described in the first aspect above.
[0014] The present invention provides a terminal device indicator light working method, device, electronic device and storage medium. The method monitors the operating state of the terminal device, and when it is monitored that the device is converted from a first state to a second state, obtains indicator light parameters corresponding to the second state; calls an indicator light control to terminate the display of the indicator light in the first state, and calls the indicator light control to execute the display of the indicator light in the second state according to the indicator light parameters corresponding to the second state, thereby realizing direct control of the indicator light, alleviating the technical problem of easily causing indicator light display confusion in the prior art, and achieving the technical effect of improving the stability of the indicator light display state. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of a process flow of a terminal device indicator light working method provided by an embodiment of the present invention;
[0017] Figure 2 A schematic diagram of different display states of an indicator light of a terminal device in the prior art provided by an embodiment of the present invention;
[0018] Figure 3 A schematic diagram of the indicator light display state under the control of an indicator light working method of a terminal device provided by an embodiment of the present invention;
[0019] Figure 4 A schematic diagram of the control principle of a terminal device indicator light working method provided by an embodiment of the present invention;
[0020] Figure 5 A schematic diagram of the structure of a terminal device indicator light working device provided by an embodiment of the present invention;
[0021] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] Existing terminal devices usually use a real-time operating system (RTOS) to switch states, and indicate different states of the terminal device by setting indicator lights with various flashing combinations. When using multi-tasking to handle transactions, different states of a terminal device may occasionally occur at the same time, causing multiple different states to control the same group of indicator lights. Command conflicts cause the indicator lights to display in a disordered manner and fail to work properly. For example, the terminal device provides a combination of 4 LED lights to indicate the terminal's operating status. State A flashes yellow 3 times. During the flashing process, state B is triggered and also flashes yellow, but the frequency is inconsistent with that of state A. Specifically, Figure 2 As shown, the solid line represents the light-on time period, and the absence of a solid line represents the light-off state. State A and state B are generated at the same time, resulting in a disordered display of the LED light. In other words, the prior art has a technical problem of easily causing disordered display of the indicator light.
[0024] Based on this, the embodiment of the present invention provides a terminal device indicator light working method, device, electronic device and storage medium. According to the terminal device operation status and the obtained indicator light parameters, the indicator light control is called to realize direct control of the indicator light display state, so as to solve the technical problem that the indicator light display is easily confused in the prior art. To facilitate the understanding of this embodiment, a terminal device indicator light working method disclosed in the embodiment of the present invention is first described in detail, see Figure 1The flowchart of a method for operating an indicator light of a terminal device is shown in FIG. 1 . The method can be executed by an indicator light control device and mainly includes the following steps S110 to S140:
[0025] S110: monitoring the operating status of the terminal device;
[0026] The terminal device may be a device that indicates a certain working status through an indicator light, for example, a server, a modem, a router, etc. The operating status of the terminal device may be a status that can be indicated by an indicator light when the device is in use, for example, the device is powered on, connected, in use, faulty, etc.
[0027] The indicator light for indicating the operating status of the terminal device can be an LED light, and different flashing frequencies or different colors of an LED light can be set as prompts for different operating statuses of the terminal device; multiple LED lights can also be set and different LED light combinations can be used as information prompts under different terminal device operating conditions.
[0028] In the embodiment of the present application, a monitoring interface may be configured in the terminal device to monitor certain events that occur or occur in the terminal device. Usually, in order to conveniently inform the user of the occurrence of these events, an indicator light may be used for prompting. For example, the network status indicator light of a router does not light up when it is not in use, and flashes once per second to provide a prompt when it is working normally; when the router is plugged into a network cable, the indicator light may light up for 5 seconds continuously to indicate that the network cable is plugged in.
[0029] S120: When it is monitored that the operation state of the terminal device is converted from the first state to the second state, obtain an indicator light parameter corresponding to the second state;
[0030] That is to say, when the operating state of the terminal device is switched, the corresponding indicator light display state should also be switched. Since the indicator light display mode used to indicate the state is usually complex and diverse, such as: when the terminal device is running in the first state, the indicator light needs to be displayed in state A (flashing frequency is a times / s, flashing interval is 0.5s); when the terminal device is switched to the second state, the indicator light needs to be displayed in state B (flashing frequency is b times / s, flashing interval is 0.375s), see Figure 2 As shown, the solid line represents the light-on time period, and the absence of a solid line represents the light-off state.
[0031] When the device operating state changes from the first state to the second state, the indicator light has not finished flashing in state A, and a different second state is immediately used to directly control the indicator light to execute another state B using the driver interface. Then the state actually displayed by the indicator light is a mixed mode of state A and state B, which is easy to cause indicator light display conflicts. Therefore, it is necessary to obtain the indicator light parameters corresponding to the newly switched state when monitoring the terminal device to switch the state, and re-control the indicator light.
[0032] The first state and the second state may be any operating state of the terminal device, such as power-on state, connection state, data transmission state, fault state, etc. The corresponding indicator light display state may be a single indicator light on, off, or flashing (with different frequencies and intervals), or a combination of multiple indicator lights, or display by setting different colors of the indicator lights.
[0033] S130: calling the indicator light control to terminate the display of the indicator light in the first state;
[0034] The indicator light control may be a package of data and methods. In this embodiment, the data packaged in the indicator light control are indicator light parameters corresponding to different states.
[0035] In one embodiment, the indicator light parameters include clock parameters and flashing parameters. The clock parameters are used to indicate the initial time and current time of the indicator light control to display each state; the flashing parameters are used to indicate the display duration, interval time and number of flashes of the indicator light in each state.
[0036] For example, see Figure 3 As shown, the indicator light is displayed in state A at the initial time t0, and switches to state B at the current time t1. The initial time displayed in state A is t0, and the current time is t1; the initial time displayed in state B is t1. The display duration of the indicator light in state A is 0.5s, the interval time is 0.5s, and the number of flashes is 3; the display duration of the indicator light in state B is 0.25s, the interval time is 0.375s, and the number of flashes is 3.
[0037] That is to say, starting from time t0, the indicator light actually displays state A until the operating state of the terminal device changes and the indicator light control is called to terminate the display of state A, that is, the indicator light stops displaying state A from time t1.
[0038] S140: Calling the indicator light control according to the indicator light parameter corresponding to the second state to execute the display of the indicator light in the second state.
[0039] That is to say, after detecting the terminal device status switching, the current indicator light display status is terminated first to avoid Figure 2The actual display state of the indicator light in the system is chaotic, and then the indicator light control is called again to display the switched state according to the indicator light parameters corresponding to the updated state, so that the indicator light display of the terminal device is more accurate and stable.
[0040] In one embodiment, the method may further include:
[0041] (S21) when it is monitored that the operation state of the terminal device is converted from the first state to the second state, obtaining the indicator light parameter corresponding to the first state;
[0042] (S22) determining, according to the indicator light parameter corresponding to the first state, an execution status of the indicator light control for displaying the indicator light in the first state;
[0043] (S23) if the indicator light control has completed the display of the indicator light in the first state, calling the indicator light control to display the indicator light in the second state according to the indicator light parameter corresponding to the second state;
[0044] (S24) If the indicator light control has not completed the display of the indicator light in the first state, the indicator light control is called to terminate the display of the indicator light in the first state.
[0045] That is to say, when a change in the operating status of the terminal device is monitored, the first state display of the indicator light is first determined. If the state has been completed, the indicator light directly executes the display of the indicator light in the second state; if the first state has not been completed, the first state is terminated first to avoid display conflicts caused by subsequent state switching.
[0046] In one embodiment, determining, according to the indicator light parameter corresponding to the first state, the execution status of the indicator light control for displaying the indicator light in the first state may include:
[0047] Determine the time required for the indicator light control to complete the display of the indicator light in the first state according to the flashing parameter;
[0048] Determine the time taken by the indicator light control to display the indicator light in the first state according to the clock parameter;
[0049] Determining whether the indicator light control has completed the display of the indicator light in the first state according to the time taken to complete the display of the indicator light in the first state and the time taken to complete the display of the indicator light in the first state;
[0050] If the time spent on executing the display of the indicator light in the first state is less than the time required to complete the display of the indicator light in the first state, it is determined that the indicator light control has not completed the display of the indicator light in the first state;
[0051] If the time spent on executing the display of the indicator light in the first state is greater than or equal to the time required to complete the display of the indicator light in the first state, it is determined that the indicator light control has completed the display of the indicator light in the first state.
[0052] Among them, the clock parameter is used to indicate the initial time and current time of the indicator light control in each state; the flashing parameter is used to indicate the display duration, interval time and flashing times of the indicator light in each state.
[0053] As a specific example, the clock parameters of the first state are: initial time T0, current time Tn; the flashing parameters of the first state include: display duration 0.5s, interval time 0.5s, flashing times 3; the clock parameters of the second state are: initial time Tn; the flashing parameters of the first state include: display duration 0.2s, interval time 0.3s, flashing times 3. The indicator light is displayed in the first state at the initial time T0, and switches to the second state at the current time Tn.
[0054] The time required for the indicator light control to display the indicator light in the first state is: (display duration + interval time) * number of flashes = (0.5s + 0.5s) * 3 = 3s; the time taken for the indicator light control to display the indicator light in the first state is: current time - initial time = (Tn - T0).
[0055] If (Tn-T0) < 3s, the indicator light control has not completed the display of the indicator light in the first state, and it is necessary to first call the indicator light control to terminate the display of the indicator light in the first state to avoid display conflicts caused by subsequent state switching; if (Tn-T0) ≥ 3s, the indicator light control has completed the display of the indicator light in the first state, and the display of the indicator light in the second state can be directly executed.
[0056] In this embodiment, when creating an indicator light control, that is, encapsulating the indicator light parameters, the LED-related clock handle and flashing parameters can be used as attributes of the LED class for internal management, and three interfaces, namely, turning on the light (on), turning off the light (off), and flashing (start), are provided to realize the state switching of the LED display. For specific switching, see Figure 4 The periodic flashing logic can be encapsulated into the flashing interface, and the number of flashes and the time of turning on and off in each cycle can be controlled by parameters.
[0057] In one embodiment, calling the indicator light control according to the indicator light parameters corresponding to the second state to display the indicator light in the second state includes: calling the flashing interface of the indicator light control according to the indicator light parameters corresponding to the second state to display the indicator light in the second state.
[0058] In one embodiment, calling the indicator light control to terminate the display of the indicator light in the first state includes: calling a light-off interface of the indicator light control to turn off the indicator light, so as to terminate the display of the indicator light in the first state.
[0059] In one embodiment, the indicator light control is called according to the indicator light parameters corresponding to the second state to execute the display of the indicator light in the second state, including: calling the light-on interface of the indicator light control to turn on the indicator light; calling the flashing interface of the indicator light control according to the indicator light parameters corresponding to the second state to execute the display of the indicator light in the second state.
[0060] Through the terminal device indicator light working method provided in this embodiment, the LED light state can be directly controlled without paying attention to other data (such as clock, flashing parameter maintenance, etc.), which is convenient for the upper layer to implement business logic; unified control through LED entity objects, only need to call class entity objects and corresponding methods when using, the internal processing logic ensures the switching between various states and the consistency of display, and prevents display confusion caused by display conflicts between two states controlling one LED light; and all LED light display-related codes and data are in the LED light class implementation file, which is convenient for code review, maintenance and optimization.
[0061] Corresponding to the above method, the present application embodiment also provides a terminal device indicator light working device, see Figure 5 As shown, the device comprises:
[0062] Monitoring module 510, used to monitor the operating status of the terminal device;
[0063] The parameter acquisition module 520 is used to acquire the indicator light parameter corresponding to the second state when monitoring that the operation state of the terminal device is converted from the first state to the second state;
[0064] The calling module 530 is used to call the indicator light control to terminate the display of the indicator light in the first state; the calling module can also be used to call the indicator light control to execute the display of the indicator light in the second state according to the indicator light parameters corresponding to the second state.
[0065] The terminal device indicator light working device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effect of the device provided in the embodiment of the present application are the same as those of the aforementioned method embodiment. For the sake of brief description, for parts not mentioned in the device embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment. Technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here. The terminal device indicator light working device provided in the embodiment of the present application has the same technical features as the terminal device indicator light working method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0066] An embodiment of the present application further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned embodiments.
[0067] Figure 6 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device 400 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected via the bus 42; the processor 40 is used to execute an executable module stored in the memory 41, such as a computer program.
[0068] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0069] The bus 42 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0070] Among them, the memory 41 is used to store programs, and the processor 40 executes the program after receiving the execution instruction. The method executed by the process definition device disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0071] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the above-mentioned terminal device indicator light working method in combination with its hardware.
[0072] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 1 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.
[0073] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the terminal device indicator light working method in any of the above embodiments.
[0074] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the terminal device indicator light operating method in any of the above embodiments.
[0075] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0079] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0080] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.
[0081] It should be noted that similar numbers and letters represent similar items in the accompanying drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A terminal device indicator light working method, characterized in that: include: Monitor the operating status of terminal equipment; When it is monitored that the operating state of the terminal device is converted from a first state to a second state, obtaining indicator light parameters corresponding to the second state; Calling the indicator light control to terminate the display of the indicator light in the first state; The indicator light control is called according to the indicator light parameter corresponding to the second state to execute the display of the indicator light in the second state.
2. The terminal device indicator light operating method according to claim 1, characterized in that: The method further comprises: When it is monitored that the running state of the terminal device is converted from the first state to the second state, obtaining indicator light parameters corresponding to the first state; Determining, according to the indicator light parameter corresponding to the first state, an execution status of the indicator light control for displaying the indicator light in the first state; If the indicator light control has completed the display of the indicator light in the first state, then the indicator light control is called according to the indicator light parameter corresponding to the second state to display the indicator light in the second state; If the indicator light control has not completed the display of the indicator light in the first state, the indicator light control is called to terminate the display of the indicator light in the first state.
3. The terminal device indicator light operating method according to claim 2, characterized in that: The indicator light parameters include clock parameters and flashing parameters. The clock parameters are used to indicate the initial time and current time of the indicator light display in each state of the indicator light control; the flashing parameters are used to indicate the display duration, interval time and flashing times of the indicator light in each state.
4. The terminal device indicator light operating method according to claim 3, characterized in that: The determining, according to the indicator light parameter corresponding to the first state, the execution status of the indicator light control for displaying the indicator light in the first state includes: Determine the time required for the indicator light control to complete the display of the indicator light in the first state according to the flashing parameter; Determine the time taken by the indicator light control to display the indicator light in the first state according to the clock parameter; Determining whether the indicator light control has completed the display of the indicator light in the first state according to the time taken to complete the display of the indicator light in the first state and the time taken to complete the display of the indicator light in the first state; If the time spent on executing the display of the indicator light in the first state is less than the time required to complete the display of the indicator light in the first state, it is determined that the indicator light control has not completed the display of the indicator light in the first state; if the time spent on executing the display of the indicator light in the first state is greater than or equal to the time required to complete the display of the indicator light in the first state, it is determined that the indicator light control has completed the display of the indicator light in the first state.
5. The terminal device indicator light operating method according to claim 1, characterized in that: The calling the indicator light control according to the indicator light parameter corresponding to the second state to display the indicator light in the second state includes: The flashing interface of the indicator light control is called according to the indicator light parameter corresponding to the second state to execute the display of the indicator light in the second state.
6. The terminal device indicator light operating method according to claim 1, characterized in that: The calling of the indicator light control to terminate the display of the indicator light in the first state includes: The light-off interface of the indicator light control is called to turn off the indicator light, so as to terminate the display of the indicator light in the first state.
7. The terminal device indicator light operating method according to claim 6, characterized in that: The calling the indicator light control according to the indicator light parameter corresponding to the second state to display the indicator light in the second state includes: Call the light-on interface of the indicator light control to turn on the indicator light; The flashing interface of the indicator light control is called according to the indicator light parameter corresponding to the second state to execute the display of the indicator light in the second state.
8. A terminal equipment indicator light working device, characterized in that: include: A monitoring module, used to monitor the operating status of the terminal device; A parameter acquisition module, configured to acquire an indicator light parameter corresponding to a second state when it is detected that the operation state of the terminal device is changed from a first state to a second state; A calling module, used for calling the indicator light control to terminate the display of the indicator light in the first state; The calling module is further used to call the indicator light control according to the indicator light parameter corresponding to the second state to execute the display of the indicator light in the second state.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute the method according to any one of claims 1 to 7.
