Indicator lamp control method and device, electronic equipment and computer readable storage medium

By generating configuration files to configure the correspondence between indicator events, identifiers, and states, the problem of complex indicator light customization requirements for customer terminal devices is solved, and simple customization and low-cost indicator light control are achieved.

CN120909882APending Publication Date: 2025-11-07HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511018687.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, modifying the custom indicator lights of customer terminal devices is complex and costly, requiring modification of the corresponding indicator light codes.

Method used

By generating a target configuration file, the correspondence between indicator light event identifiers, indicator light identifier sets, and indicator light states is configured. The configuration file is then queried based on the event identifiers to control the indicator light states.

Benefits of technology

It enables easy fulfillment of customization needs and design requirements without modifying indicator light codes, saving maintenance and testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909882A_ABST
    Figure CN120909882A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an indicator light control method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of electronics. The method comprises the following steps: when a target indicator lamp event occurs, obtaining a target configuration file; wherein the target configuration file is configured with an identifier of an indicator lamp event, an indicator lamp identifier set and a corresponding relation of an indicator lamp state; querying the target configuration file according to the identifier of the target indicator lamp event to obtain a target indicator lamp identifier set and a target indicator lamp state corresponding to the identifier of the target indicator lamp event; and controlling a target indicator lamp corresponding to the target indicator lamp identifier set according to the target indicator lamp state. According to the scheme, different indication lamp customization requirements can be met by modifying the target configuration file.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of electronics, and in particular to an indicator light control method and apparatus, an electronic device, and a computer-readable storage medium. BACKGROUND

[0002] Customer Premises Equipment (CPE) products are usually provided with different indicator lights for different functions, and users can intuitively determine the information of the function corresponding to the indicator light through the state of the indicator light. However, different customers may have customization requirements for the indicator lights, such as customizing indicator lights for only part of the functions, or setting different indicator lights for the same function.

[0003] In related technologies, the code corresponding to the indicator light needs to be modified to meet different customization requirements. However, modifying the code corresponding to the indicator light is relatively complex, and the code maintenance and testing costs are high. SUMMARY

[0004] Embodiments of the present application provide an indicator light control method and apparatus, an electronic device, and a computer-readable storage medium, which can meet different customization requirements for indicator lights by modifying a target configuration file.

[0005] In a first aspect, embodiments of the present application provide an indicator light control method, comprising:

[0006] When a target indicator light event occurs, a target configuration file is obtained; wherein the target configuration file configures a correspondence between an indicator light event identifier, an indicator light identifier set, and an indicator light state;

[0007] According to the identifier of the target indicator light event, the target configuration file is queried to obtain a target indicator light identifier set and a target indicator light state corresponding to the identifier of the target indicator light event;

[0008] The target indicator light corresponding to the target indicator light identifier set is controlled according to the target indicator light state.

[0009] In a second aspect, embodiments of the present application provide an indicator light control apparatus, comprising:

[0010] An obtaining module is configured to obtain a target configuration file when a target indicator light event occurs; wherein the target configuration file configures a correspondence between an indicator light event identifier, an indicator light identifier set, and an indicator light state;

[0011] A querying module is configured to query the target configuration file according to the identifier of the target indicator light event to obtain a target indicator light identifier set and a target indicator light state corresponding to the identifier of the target indicator light event;

[0012] a control module configured to control target indicator lamps corresponding to the target indicator lamp identification set according to the target indicator lamp state.

[0013] In a third aspect, an electronic device is provided. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the indicator lamp control method described above are implemented.

[0014] In a fourth aspect, a computer readable storage medium is provided. The computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the indicator lamp control method described above are implemented.

[0015] In a fifth aspect, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions. A processor of a computer device reads the computer instructions from a computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the method provided in various optional implementation manners described in the embodiments of the present application.

[0016] The embodiments of the present application have the following beneficial effects:

[0017] The target configuration file configures the correspondence between the indicator lamp event identification, the indicator lamp identification set, and the indicator lamp state. When an indicator lamp event occurs, the indicator lamp identification set in the correspondence can be used to determine the indicator lamps controlled by the indicator lamp event, and the indicator lamp state in the correspondence can be used to determine the state of the indicator lamps. Therefore, when a target indicator lamp event occurs, the target indicator lamp identification set and the target indicator lamp state can be determined by querying the target configuration file according to the identification of the target indicator lamp event, so that the target indicator lamps corresponding to the target indicator lamp identification set are controlled according to the target indicator lamp state. In this way, the correspondence in the target configuration file only needs to be modified, and different indicator lamp customization requirements can be achieved. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0019] Figure 1 is a step schematic diagram of the indicator lamp control method provided by an embodiment of the present application;

[0020] Figure 2 This is a schematic flowchart of an embodiment of the indicator light control method provided in this application;

[0021] Figure 3 This is a schematic diagram of the structure of an indicator light control device provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0024] CPE products typically have indicator lights for multiple functions such as Wi-Fi, SMS, signal strength, network connectivity, and internet connectivity. These indicator lights can be used to show users the current status of the device.

[0025] The WIFI indicator light indicates whether the WIFI function is turned on or off; the SMS indicator light indicates whether there is a new SMS; the SIGNAL indicator light indicates the device's signal strength; the NETWORK indicator light indicates whether the device is registered to the network; and the INTERNET indicator light indicates whether the device has the ability to access the external network.

[0026] Optionally, the indicator light may be one or more of the following: light-emitting diodes (LEDs), neon lamps, fluorescent lamps, and organic light-emitting diodes (OLEDs). The LEDs may include, but are not limited to, one or more of the following: monochrome LEDs, dual-color LEDs, tri-color LEDs, and full-color LEDs.

[0027] In one embodiment, such as Figure 1 As shown, an indicator light control method is provided. Although the logical sequence is illustrated in the step diagram, in some cases, the steps shown or described can be performed in a different order than that shown in the diagram. Specifically, this indicator light control method can be applied to a terminal or a server. The terminal can be, but is not limited to, one or more of smartphones, tablets, laptops, desktop computers, and in-vehicle computers. The server can be a single server or a server cluster consisting of multiple servers, etc. This application does not limit the number of terminals or servers.

[0028] The following will be described in detail respectively. It should be noted that the sequence of the following embodiments is not limited as the priority order of the embodiments.

[0029] According to Figure 1 The indicator light control method shown in the figure includes at least steps S110 to S130, which are described in detail as follows:

[0030] In step S110, when a target indicator light event occurs, a target configuration file is obtained.

[0031] The indicator light event refers to an event that will affect the state of the indicator light. The target indicator light event can be any indicator light event. The state of the indicator light can include, but is not limited to, one or more of constant, off, flashing, fading, brightness, and color.

[0032] The target configuration file is generated in advance, and when the target indicator light event occurs, the target configuration file can be directly obtained to determine the control logic of the indicator light according to the corresponding relationship configured in the target configuration file.

[0033] The target configuration file configures the corresponding relationship of the identifier of the indicator light event, the identifier set of the indicator light, and the state of the indicator light. Different identifiers of the indicator light event correspond to different identifier sets of the indicator light and different states of the indicator light.

[0034] According to the identifier of the indicator light event, the indicator light event can be determined. Each indicator light identifier set in the configuration file includes one or more indicator light identifiers, and according to the indicator light identifier set, one or more indicator lights can be determined. The identifier of the indicator light event in the configuration file corresponds to the indicator light event, which can control the state of one or more indicator lights corresponding to the identifier set of the indicator light corresponding to the identifier of the indicator light event to meet the state of the indicator light corresponding to the identifier of the indicator light event.

[0035] In step S120, according to the identifier of the target indicator light event, the target configuration file is queried to obtain the target indicator light identifier set and the target indicator light state corresponding to the identifier of the target indicator light event.

[0036] The preset sets the corresponding relationship of each indicator light event and each indicator light identifier, and the identifier of the target indicator light event can be determined according to the preset corresponding relationship. According to the identifier of the target indicator light event, the target configuration file is queried to obtain the target indicator light identifier set and the target indicator light state corresponding to the identifier of the target indicator light event. The target indicator light event can control the state of one or more target indicator lights corresponding to the target indicator light identifier set to meet the target indicator light state.

[0037] In step S130, the target indicator light corresponding to the target indicator light identification set is controlled according to the target indicator light state.

[0038] The indicator light corresponding to each identification in the target indicator light identification set is determined as a target indicator light. The target indicator light is controlled according to the target indicator light state, so that the state of the target indicator light is the target indicator light state corresponding to the identification of the target indicator light event.

[0039] For example, the following three have a corresponding relationship in the target configuration file: identification of the indicator light event = 9, indicator light identification included in the indicator light identification set = 1, and indicator light state = ON (always on). Wherein the identification of the indicator light event = 9 represents that the indicator light event is WIFI opening, and when the WIFI opening event occurs, the identification of the corresponding indicator light event can be determined as 9, so that the target configuration file can be queried to determine that the identification of the indicator light controlled by the WIFI opening event is 1, and the state of the indicator light with the identification of 1 controlled by the WIFI opening event is always on. Then the indicator light with the identification of 1 can be turned on according to the target configuration file.

[0040] The technical scheme of the embodiment of the present application is adopted, the corresponding relationship of the identification of the indicator light event, the indicator light identification set and the indicator light state is configured in the target configuration file; when the indicator light event occurs, the indicator light identification set in the corresponding relationship can be used to determine the indicator lights controlled by the indicator light event, and the indicator light state in the corresponding relationship can be used to determine the state of the indicator lights; therefore, when the target indicator light event occurs, the target indicator light identification set and the target indicator light state can be determined by querying the target configuration file according to the identification of the target indicator light event, so that the target indicator light corresponding to the target indicator light identification set is controlled according to the target indicator light state. In this way, only the corresponding relationship in the target configuration file needs to be modified, and different indicator light customization requirements can be realized.

[0041] On the basis of the above technical scheme, as an embodiment, before the target configuration file is acquired, the method further includes: acquiring the identification of one or more indicator lights controlled by each indicator light event; determining the indicator light identification set corresponding to each indicator light event according to the identification of one or more indicator lights controlled by each indicator light event; acquiring the control result of the state of one or more indicator lights by each indicator light event; determining the indicator light state corresponding to each indicator light event according to the control result of the state of one or more indicator lights by each indicator light event; acquiring the identification of each indicator light event; and generating the target configuration file according to the identification of each indicator light event, the indicator light identification set corresponding to each indicator light event, and the indicator light state corresponding to each indicator light event.

[0042] The customization requirement or the design requirement can be acquired. One or more indicator light identifiers of each indicator light event control are determined according to the customization requirement or the design requirement. For each indicator light event, the identifiers of one or more indicator lights of the indicator light event control are collected, and a set of indicator light identifiers corresponding to the indicator light event is obtained.

[0043] Optionally, the customization requirement or the design requirement can include identifiers of one or more indicator lights controlled by each indicator light event, and one or more indicator light identifiers of each indicator light event control can be determined according to the customization requirement or the design requirement.

[0044] Optionally, the customization requirement or the design requirement can include names of one or more indicator lights controlled by each indicator light event, a mapping relationship between the names and identifiers of each indicator light can be acquired, and one or more indicator light identifiers of each indicator light event control can be determined according to the customization requirement or the design requirement and the mapping relationship.

[0045] Optionally, the customization requirement or the design requirement describes position information of one or more indicator lights controlled by each indicator light event, and identifiers of the indicator lights corresponding to the position information can be acquired, so as to determine one or more indicator light identifiers of each indicator light event control.

[0046] A control result of each indicator light event on a state of one or more indicator lights can be determined according to the customization requirement or the design requirement. The control result of the indicator light event on the state of the indicator light indicates what state the state of the indicator light changes to or remains as when the indicator light event occurs. For example, the control result of an indicator light event on a state of an indicator light can be to control the indicator light to always be on. As shown in Table 1, different indicator light events can correspond to control results of states of each indicator light.

[0047] Table 1

[0048]

[0049] According to the control result of the state of one or more indicator lights by each indicator light event, the indicator light state corresponding to each indicator light event can be determined. When the number of indicator lights controlled by one indicator light event is one, the indicator light state corresponding to the indicator light event can include one; when the number of indicator lights controlled by one indicator light event is multiple, but the state changes of the multiple indicator lights are consistent, the indicator light state corresponding to the indicator light event can also include one; when the number of indicator lights controlled by one indicator light event is multiple, and the state changes of the multiple indicator lights are inconsistent, the indicator light state corresponding to the indicator light event can also include multiple, wherein multiple states in the indicator light state correspond to different indicator lights.

[0050] The identifier of each indicator light event can be determined, which can be preset. According to the identifier of each indicator light event, the indicator light identifier set corresponding to each indicator light event, and the indicator light state corresponding to each indicator light event, a target configuration file can be generated.

[0051] By adopting the technical solutions of the embodiments of the present application, the target configuration file meeting the customization requirements or design requirements can be generated in advance, so that when the target indicator light event occurs, the indicator lights can be quickly controlled according to the target configuration file.

[0052] On the basis of the above technical solutions, as an embodiment, the indicator light control method can further include: in response to modification of the target configuration file, generating a new configuration file; and responding to the indicator light event according to the new configuration file.

[0053] For different customization requirements and design requirements, only the corresponding relationship in the target configuration file needs to be modified, and then a new configuration file can be obtained. Subsequently, only the new configuration file needs to be responded to each indicator light event, and the states of different indicator lights can be controlled.

[0054] By adopting the technical solutions of the embodiments of the present application, for different customization requirements and design requirements, only the target configuration file needs to be modified, and the modification operation is relatively simple; without modifying the code of the indicator lights, recompilation is not required, and the code maintenance cost and test cost can be saved; and different customization requirements and design requirements can reuse the corresponding relationship in the target configuration file that does not need to be modified, and only the part that needs to be modified needs to be modified.

[0055] On the basis of the above technical solutions, as an embodiment, according to the target indicator light state, the target indicator light corresponding to the target indicator light identification set can be controlled, which can include: obtaining the identification of each target indicator light included in the target indicator light identification set; determining the name of each target indicator light according to the identification of each target indicator light; determining the state control file of each target indicator light according to the name of each target indicator light; and writing the target indicator light state into the state control file of each target indicator light.

[0056] Referring to Table 2, the mapping relationship between the name and the identification of each indicator light is pre-set, so that the name of each target indicator light can be determined according to the identification of each target indicator light in the target indicator light set. The state control file of each target indicator light can be found in the system according to the name of each target indicator light, so that the control of the state of each target indicator light can be realized by modifying the state control file of each target indicator light. The data corresponding to the target indicator light state can be determined and written into the state control file of each target indicator light.

[0057] Table 2

[0058]

[0059] In an embodiment, when the target indicator light is an LED light, in order to control the state of the LED light to be always on or off, the corresponding LED_NAME can be found through LED_ID, and then the state of the LED light can be controlled by echo“1 / 0”> / sys / class / leds / LED_NAME / brightness.

[0060] / sys / class / leds / is a virtual file system path for managing and controlling LED lights on a device, LED_NAME identifies the name of the LED light, and / sys / class / leds / LED_NAME / brightness is the state control file of the LED light. By writing a value to brightness through echo 0 / 1”, the brightness or on-off state of the LED light can be controlled. Echo 0> / sys / class / leds / LED_NAME / brightness means turning off the LED light corresponding to LED_NAME; and echo 1> / sys / class / leds / LED_NAME / brightness means turning on the LED light corresponding to LED_NAME.

[0061] The technical solution of the embodiment of the application can determine the name of the target indicator light through the mapping relationship between the name and the identifier of the target indicator light, determine the state control file of the target indicator light, and then write different data into the state control file according to the state of the target indicator light, thereby realizing the control of the target indicator light.

[0062] On the basis of the above technical solution, as an embodiment, the writing of the state of the target indicator light into the state control file of each target indicator light can include: determining the state of each target indicator light according to the state of the target indicator light; and writing the state of each target indicator light into the state control file of each target indicator light.

[0063] When a plurality of target indicator lights are included and the control of the target indicator light events on the plurality of target indicator lights is the same, the state of the target indicator light can include one state, which is applicable to each target indicator light; therefore, the same control of each target indicator light can be realized by writing the state into the state control file of each target indicator light.

[0064] For example, one target indicator light event can control two target indicator lights to be always on at the same time; therefore, the same control data can be written into the state control files of the two target indicator lights at the same time when the target indicator light event occurs, and the control data is used to control the target indicator light to be always on.

[0065] When a plurality of target indicator lights are included but the control of the target indicator light events on the plurality of target indicator lights is different, the state of the target indicator light can include a plurality of states, which correspond to the plurality of target indicator lights in one-to-one correspondence, wherein the correspondence between the plurality of states and the plurality of target indicator lights is determined when the target configuration file is generated. Each state can be written into the state control file of the target indicator light corresponding to the state, thereby realizing different control of each target indicator light.

[0066] For example, one target indicator light event can control one target indicator light to be always on and another target indicator light to be turned off at the same time; therefore, different control data can be written into the state control files of the two target indicator lights respectively when the target indicator light event occurs, wherein one control data is used to control the corresponding target indicator light to be always on, and the other control data is used to control the corresponding target indicator light to be turned off.

[0067] The technical scheme of the embodiment of the present application comprises a plurality of indicator lights in an indicator light identifier set, and the states of the plurality of indicator lights are controlled identically, and the indicator light state corresponding to the indicator light identifier set in the target configuration file can only comprise one, thereby saving storage resources; the indicator light identifier set comprises a plurality of indicator lights, but the states of the plurality of indicator lights are controlled differently, and the indicator light state corresponding to the indicator light identifier set corresponds to the indicator light identifier in the set one by one, thereby guaranteeing that different controls of the plurality of indicator lights can be realized according to one target configuration file, thereby satisfying more customization requirements or design requirements of a user.

[0068] On the basis of the above technical scheme, as an embodiment, the writing of the state of each target indicator light into the state control file of each target indicator light can comprise: when the state of the target indicator light is always on, writing a first value into the brightness control file of the target indicator light; and when the state of the target indicator light is off, writing a second value into the brightness control file of the target indicator light.

[0069] The first value and the second value are different; the first value is preconfigured to represent always on, and the second value is preconfigured to represent off; optionally, the first value can be 1, and the second value can be 0.

[0070] The first value can be written into the brightness control file of the target indicator light, and thereby it can be determined according to the brightness control file that the state of the target indicator light should be adjusted / kept as always on.

[0071] The second value can be written into the brightness control file of the target indicator light, and thereby it can be determined according to the brightness control file that the state of the target indicator light should be adjusted / kept as off.

[0072] For example, when the target indicator light is an LED light, the state of the target indicator light can be adjusted / kept as always on by echo "1" > / sys / class / leds / LED_NAME / brightness, and the state of the target indicator light can be adjusted / kept as off by echo "0" > / sys / class / leds / LED_NAME / brightness.

[0073] In one of the embodiments, one or more third values can be preconfigured, and the third value can represent that the target indicator light is always on at a set brightness. The third value can be written into the brightness control file of the target indicator light, and thereby it can be determined according to the brightness control file that the state of the target indicator light should be adjusted / kept as always on, and the brightness value of always on is the set brightness corresponding to the third value.

[0074] For example, the second value is 0, representing off; the first value is 1, representing constant light, and the brightness value is a third preset brightness (the highest brightness); a third value is 0.6, representing constant light, and the brightness value is a second preset brightness (slightly lower than the highest brightness); another third value is 0.3, representing constant light, and the brightness value is a first preset brightness (slightly lower than the second preset brightness). The state of the target indicator lamp can be adjusted / kept to the second preset brightness by echo "0.6" > / sys / class / leds / LED_NAME / brightness, and the state of the target indicator lamp can be adjusted / kept to the first preset brightness by echo "0.3" > / sys / class / leds / LED_NAME / brightness.

[0075] In one embodiment, the state control file of the indicator lamp can further include a color control file, and different colors can be emitted by the indicator lamp by writing different color values into the color control file.

[0076] According to the technical solution of the embodiments of the present application, when the corresponding indicator lamp event occurs, different values can be written into the brightness control file of the indicator lamp, so as to control the brightness and off of the indicator lamp, and the operation is simple.

[0077] Based on the above technical solution, as an embodiment, the querying the target configuration file according to the identifier of the target indicator lamp event can include: obtaining the identifier of the target indicator lamp event corresponding to the target indicator lamp event; and querying the target configuration file according to the identifier of the target indicator lamp event.

[0078] The identifiers of the indicator lamp events corresponding to different indicator lamp events are preset. Therefore, when the target indicator lamp event occurs, the preset identifier of the target indicator lamp event can be obtained, and then the target configuration file can be queried according to the identifier of the target indicator lamp event to obtain the target indicator lamp identifier set and the target indicator lamp state corresponding to the identifier of the target indicator lamp event.

[0079] According to the technical solution of the embodiments of the present application, the identifiers of the indicator lamp events corresponding to different indicator lamp events are preset, so that the target indicator lamp identifier set and the target indicator lamp state corresponding to the identifier of the target indicator lamp event in the target configuration file can be determined, so as to realize the control of the target indicator lamp subsequently.

[0080] Figure 2is a flowchart of an indicator light control method provided by an embodiment of the present application. In step S210, an indicator light identifier and a name are bound, and an identifier of an indicator light event is registered. In step S220, a target configuration file is loaded and initialized. In step S230, it is detected whether an indicator light event is received. When it is detected that an indicator light event is received, step S240 is executed. In step S240, the target configuration file is queried by using the identifier of the indicator light event to obtain an indicator light identifier set and an indicator light state. In step S250, the indicator light is controlled by using the indicator light identifier set and the indicator light state.

[0081] By using the target configuration file, for different customization requirements or design requirements of the indicator light, the code of the indicator light does not need to be modified, and only the target configuration file needs to be modified, so that the customization requirements or design requirements can be met, and the operation is simple and the maintenance cost is low.

[0082] In order to better implement the indicator light control method of the present application, the present application further provides an indicator light control device based on the above-mentioned indicator light control method. The meanings of the terms are the same as those in the above-mentioned indicator light control method, and the specific implementation details can be referred to the description in the method embodiment.

[0083] Please refer to Figure 3 , Figure 3 is a structural diagram of an indicator light control device provided by an embodiment of the present application, wherein the indicator light control device comprises:

[0084] The acquisition module 301 is configured to acquire a target configuration file when a target indicator light event occurs; wherein the target configuration file configures a correspondence relationship among an identifier of an indicator light event, an indicator light identifier set and an indicator light state.

[0085] The query module 302 is configured to query the target configuration file according to the identifier of the target indicator light event to obtain a target indicator light identifier set and a target indicator light state corresponding to the identifier of the target indicator light event.

[0086] The control module 303 is configured to control a target indicator light corresponding to the target indicator light identifier set according to the target indicator light state.

[0087] In one embodiment, the device further comprises:

[0088] The indicator light identifier acquisition module is configured to acquire identifiers of one or more indicator lights controlled by each of the indicator light events;

[0089] The set determination module is configured to determine the indicator light identifier set corresponding to each of the indicator light events according to the identifiers of one or more indicator lights controlled by each of the indicator light events.

[0090] a control result obtaining module, configured to obtain a control result of each of the indicator light events on the state of one or more of the indicator lights;

[0091] a state determining module, configured to determine the indicator light state corresponding to each of the indicator light events according to the control result of each of the indicator light events on the state of one or more of the indicator lights;

[0092] an event identifier obtaining module, configured to obtain an identifier of each of the indicator light events;

[0093] a file generating module, configured to generate the target configuration file according to the identifier of each of the indicator light events, the indicator light identifier set corresponding to each of the indicator light events, and the indicator light state corresponding to each of the indicator light events.

[0094] In one of the embodiments, the apparatus further includes:

[0095] a new file generating module, configured to generate a new configuration file in response to modification of the target configuration file;

[0096] a responding module, configured to respond to the indicator light events according to the new configuration file.

[0097] In one of the embodiments, the control module 303 includes:

[0098] an identifier obtaining sub-module, configured to obtain an identifier of each of the target indicator lights included in the target indicator light identifier set;

[0099] a name determining sub-module, configured to determine a name of each of the target indicator lights according to the identifier of each of the target indicator lights;

[0100] a file determining sub-module, configured to determine a state control file of each of the target indicator lights according to the name of each of the target indicator lights;

[0101] a writing sub-module, configured to write the target indicator light state into the state control file of each of the target indicator lights.

[0102] In one of the embodiments, the writing sub-module includes:

[0103] a state determining unit, configured to determine the state of each of the target indicator lights according to the target indicator light state;

[0104] a writing unit, configured to write the state of each of the target indicator lights into the state control file of each of the target indicator lights.

[0105] In one of the embodiments, the writing unit includes:

[0106] The first writing subunit is used to write a first value into the brightness control file of the target indicator light when the target indicator light is in a constantly lit state.

[0107] The second writing subunit is used to write a second value into the brightness control file of the target indicator light when the target indicator light is off.

[0108] In one embodiment, the query module 302 includes:

[0109] The target acquisition submodule is used to acquire the identifier of the target indicator light event corresponding to the target indicator light event;

[0110] The query submodule is used to query the target configuration file based on the identifier of the target indicator light event.

[0111] The technical solution adopted in this application embodiment configures a correspondence between indicator light event identifiers, indicator light identifier sets, and indicator light states in the target configuration file. When an indicator light event occurs, the individual indicator lights controlled by the event can be determined based on the indicator light identifier set in the correspondence, and the states of each indicator light can be determined based on the indicator light states in the correspondence. Therefore, when a target indicator light event occurs, the target configuration file can be queried based on the identifier of the target indicator light event to determine the target indicator light identifier set and the target indicator light state, thereby controlling the target indicator light corresponding to the target indicator light identifier set according to the target indicator light state. In this way, different indicator light customization requirements can be achieved simply by modifying the correspondence in the target configuration file.

[0112] For specific limitations regarding the indicator light control device, please refer to the limitations on the indicator light control method above, which will not be repeated here. Each module in the aforementioned indicator light control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independently of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0113] In addition, this application also provides an electronic device, such as Figure 4 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically:

[0114] The electronic device may include components such as a processor 401 with one or more processing cores and a memory 402 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 4The electronic device structure shown in the figures does not constitute a limitation on the electronic device, and can include more or fewer components than shown, or combine certain components, or arrange the components differently. Among them:

[0115] The processor 401 is the control center of the electronic device, connects various parts of the entire electronic device through various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the entire electronic device. Optionally, the processor 401 can include one or more processing cores; preferably, the processor 401 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 401.

[0116] The memory 402 can be used to store software programs and modules, and the processor 401 executes various functions and data processing by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 402 can also include a memory controller to provide access for the processor 401 to the memory 402.

[0117] In one embodiment, the electronic device further includes a power supply 403 for supplying power to various components, and preferably the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 can also include one or more than one direct current or alternating current power supply, a recharging system, a power supply device debugging circuit, a power supply converter or inverter, a power supply state indicator, etc. any component.

[0118] In one embodiment, the electronic device can further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0119] Although not shown, the electronic device can further include a display unit and the like, which will not be described herein. Specifically, in the present embodiment, the processor 401 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and run the application program stored in the memory 402 by the processor 401, thereby implementing the steps in any of the indicator light control methods provided in the present application.

[0120] Those skilled in the art can understand that, Figure 4 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. Specifically, the electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in any embodiment of the present application.

[0122] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the method described in any embodiment of the present application.

[0123] In some embodiments, a computer program product is also provided, including a computer program or instructions, which are executed by a processor to implement the method described in any embodiment of the present application.

[0124] The specific implementation of each of the above operations can be referred to the previous embodiments, which will not be described herein.

[0125] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by relevant hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0126] To this end, the present application provides a computer readable storage medium, storing a computer program, which can be loaded by a processor to execute the steps in any of the indicator light control methods provided in the present application.

[0127] The specific implementation of each of the above operations can be referred to the previous embodiments, which will not be described herein.

[0128] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0129] The steps of any of the indicator light control methods provided by the present application can be executed due to the instructions stored in the computer readable storage medium, thus the beneficial effects of any of the indicator light control methods provided by the present application can be achieved, which are described in detail in the foregoing embodiments and will not be repeated here.

[0130] Finally, it should be noted that in this document, the terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or terminal devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or terminal devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the processes, methods, articles or terminal devices including the element.

[0131] The above describes in detail the indicator light control method, device, electronic device and computer readable storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples in this document. The above description of the embodiments is only for helping to understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed; in conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method of controlling an indicator light, characterized by, The method comprises: when a target indicator light event occurs, obtaining a target configuration file; wherein the target configuration file is configured with: an identifier of an indicator light event, a corresponding relationship between an indicator light identifier set and an indicator light state; according to the identifier of the target indicator light event, querying the target configuration file to obtain the target indicator light identifier set and the target indicator light state corresponding to the identifier of the target indicator light event; controlling the target indicator light corresponding to the target indicator light identifier set according to the target indicator light state.

2. The method of claim 1, wherein, Before the target configuration file is obtained, the method further comprises: obtaining the identifier of one or more indicator lights controlled by each indicator light event; determining the indicator light identifier set corresponding to each indicator light event according to the identifier of one or more indicator lights controlled by each indicator light event; obtaining the control result of the state of one or more indicator lights by each indicator light event; determining the indicator light state corresponding to each indicator light event according to the control result of the state of one or more indicator lights by each indicator light event; obtaining the identifier of each indicator light event; generating the target configuration file according to the identifier of each indicator light event, the indicator light identifier set corresponding to each indicator light event, and the indicator light state corresponding to each indicator light event.

3. The method of claim 1, wherein, The method further comprises: in response to modification of the target configuration file, generating a new configuration file; controlling the indicator light event according to the new configuration file.

4. The method of claim 1, wherein, The controlling the target indicator light corresponding to the target indicator light identifier set according to the target indicator light state comprises: obtaining the identifier of each target indicator light included in the target indicator light identifier set; determining the name of each target indicator light according to the identifier of each target indicator light; determining the state control file of each target indicator light according to the name of each target indicator light; writing the target indicator light state into the state control file of each target indicator light.

5. The method of claim 4, wherein, The writing the target indicator light state into the state control file of each target indicator light comprises: determining the state of each target indicator light according to the target indicator light state; writing the state of each target indicator light into the state control file of each target indicator light.

6. The method of claim 5, wherein, The writing the state of each target indicator light into the state control file of each target indicator light comprises: when the state of the target indicator light is always on, writing a first value into the brightness control file of the target indicator light; when the state of the target indicator light is off, writing a second value into the brightness control file of the target indicator light.

7. The method of claim 1, wherein, The querying the target configuration file according to the identifier of the target indicator light event comprises: obtaining the identifier of the target indicator light event corresponding to the target indicator light event; querying the target configuration file according to the identifier of the target indicator light event.

8. An indicator light control device, characterized by The method comprises: An acquisition module is configured to acquire a target configuration file when a target indicator light event occurs, wherein the target configuration file configures a correspondence among an indicator light event identifier, an indicator light identifier set, and an indicator light state; An inquiry module is configured to inquire the target configuration file according to the target indicator light event identifier, and obtain the target indicator light identifier set and the target indicator light state corresponding to the target indicator light event identifier. A control module is configured to control target indicator lights corresponding to the target indicator light identifier set according to the target indicator light state.

9. An electronic device, comprising: The computer program is stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the indicator light control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program is stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the indicator light control method according to any one of claims 1 to 7.