Method for restoring luminous state of lamp and corresponding device and medium

By identifying the lamp equipment type and communication protocol identification, and retrieving and applying snapshot status data from the snapshot library, the cumbersome and accurate operation of smart lamps when restoring the luminous state is solved, realizing instant and personalized luminous state recovery, improving user experience and equipment efficiency.

CN120111755BActive Publication Date: 2025-07-18SHENZHEN INTELLIROCKS TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510582377.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-07-18
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

Existing smart lamps are cumbersome and difficult to accurately restore when restoring the luminous state that users like. The preset mode cannot meet personalized needs, affecting the user experience and intelligence level.

Method used

By responding to snapshot application events of the lamp equipment, identifying the device type and communication protocol identification, and retrieving and applying snapshot status data from the snapshot library, achieving accurate and efficient recovery of the lamp equipment.

Benefits of technology

It realizes instant recovery of the luminous state of the lamp, and personalized state reuse across devices, improves user experience and device usage efficiency, and meets the diverse needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111755B_ABST
    Figure CN120111755B_ABST
Patent Text Reader

Abstract

The present application relates to a method for restoring the lighting state of a lamp, a corresponding device, and a medium. The method includes: responding to a snapshot application event of a target lamp device, determining the lamp type of the target lamp device and the communication protocol identifier corresponding to the applied communication link; determining, from a snapshot library, snapshot status data adapted to the communication protocol identifier under the lamp type of the target lamp device; and applying the snapshot status data to the target lamp device through the communication link to control the target lamp device to adjust to the lighting state corresponding to the snapshot status data. Through the snapshot application mechanism, the present application realizes the accurate and rapid restoration of the lighting state of the lamp device, significantly simplifying the user operation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent lighting, and particularly to a method for restoring the lighting state of a lamp, and a corresponding device and medium. Background Art

[0002] Intelligent lamps can play the role of decorating the indoor space and displaying information. With the improvement of people's living quality, intelligent lamps are no longer just satisfied with basic lighting needs, but are gradually developing towards personalization and interaction. Specifically, intelligent lamps can not only provide basic lighting functions, but also meet the personalized needs of users in different scenarios by adjusting various parameters such as brightness, color, and color temperature.

[0003] However, despite the increasingly rich functions of intelligent lamps, users still face some inconveniences during operation. Specifically, when a user adjusts a lamp device to a satisfactory lighting state, multiple parameters usually need to be controlled separately. And when the user wants to restore to a previously preferred lighting state, these parameters often need to be manually adjusted again, which is not only cumbersome and time-consuming, but also difficult to accurately restore. Although there are some intelligent lamps in the prior art that support preset scene modes, and users can quickly switch the lighting state of the lamp device by selecting a preset mode. However, these preset modes are usually fixed and cannot meet the personalized needs of users. In addition, when users frequently switch the state of the lamp device in different scenarios, the existing preset modes are also difficult to cover all possible combinations of lighting states. Therefore, users still need to frequently manually adjust the parameters of the lamp device in actual use, which not only affects the user experience, but also limits the intelligent level of the intelligent lamp device. Summary of the Invention

[0004] The primary object of this application is to solve at least one of the above problems and provide a method for restoring the lighting state of a lamp, and a corresponding device and medium.

[0005] To meet the various objects of this application, the following technical solutions are adopted:

[0006] A method for restoring the lighting state of a lamp provided to meet one of the objects of this application includes the following steps:

[0007] Respond to the snapshot application event of the target lamp device, and determine the lamp type of the target lamp device and the communication protocol identifier corresponding to the applied communication link;

[0008] Determine the snapshot state data adapted to the communication protocol identifier under the lamp type of the target lamp device from the snapshot library;

[0009] Apply the snapshot state data to the target lamp device through the communication link to control the target lamp device to adjust to the lighting state corresponding to the snapshot state data.

[0010] A lighting device luminous state recovery apparatus proposed according to the lighting device luminous state recovery method for one of the purposes of this application, comprising:

[0011] A snapshot application event response module, configured to respond to a snapshot application event of a target lighting device, and determine the lighting device type of the target lighting device and the communication protocol identifier corresponding to the applied communication link;

[0012] A snapshot state data determination module, configured to determine, from a snapshot library, the snapshot state data adapted to the communication protocol identifier for the lighting device type of the target lighting device;

[0013] A luminous state recovery module, configured to apply the snapshot state data to the target lighting device through the communication link, so as to control the target lighting device to adjust to the luminous state corresponding to the snapshot state data.

[0014] On the other hand, a computer device provided for one of the purposes of this application includes a central processing unit and a memory. The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the lighting device luminous state recovery method described in this application.

[0015] On the other hand, a computer-readable storage medium provided for another purpose of this application stores, in the form of computer-readable instructions, a computer program implemented according to the lighting device luminous state recovery method described above. When the computer program is called and run by a computer, it executes the steps included in the corresponding method.

[0016] The technical solution of this application has many advantages, including but not limited to the following aspects:

[0017] This application responds to the snapshot application event of the target lighting device, identifies the lighting device type and the communication protocol identifier corresponding to the communication link, then retrieves the adapted snapshot state data from the snapshot library, and applies the data to the lighting device through the communication link, enabling it to restore to the luminous state previously saved by the user, achieving accurate and efficient luminous state recovery, and significantly improving the user experience.

[0018] First of all, through the matching mechanism of the communication protocol identifier and the lighting device type, this application realizes the cross-device reuse of snapshot state data. This technical feature enables the personalized luminous state set on a single lighting device to be quickly adapted and applied to other lighting devices of the same type, avoiding repeated configuration operations and significantly improving the usage efficiency of lighting devices.

[0019] Secondly, the present application realizes the instant recovery function of the lighting state of the lamp. Through the storage and reuse mechanism of snapshot state data, users only need to save the snapshot to restore to the corresponding saved lighting state at any time, without manually adjusting parameters, avoiding the problem that it is difficult to accurately restore by manual adjustment, and further optimizing the user experience.

[0020] In addition, the present application allows users to customize and save multiple lighting states according to their own preferences and specific scenarios. This highly personalized customization ability not only meets the diverse needs of users, but also improves the interactivity between the lighting device and users, enhancing the user's dependence on the corresponding lighting device and promoting the popularization and application of the lighting device. Brief Description of the Drawings

[0021] The above and / or additional aspects and advantages of the present application will become apparent and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0022] Figure 1 is a schematic flow chart of a typical embodiment of the method for restoring the lighting state of the lamp of the present application;

[0023] Figure 2 is a schematic flow chart of snapshot saving in the embodiment of the present application;

[0024] Figure 3 is a schematic flow chart of snapshot state data conversion in the embodiment of the present application;

[0025] Figure 4 is a schematic flow chart of restoring the lighting state of the lighting device in the embodiment of the present application;

[0026] Figure 5 is a schematic flow chart of obtaining lighting state data in the embodiment of the present application;

[0027] Figure 6 is a schematic flow chart of detecting lighting state data in the embodiment of the present application;

[0028] Figure 7 is a schematic flow chart of generating targeted guidance information in the embodiment of the present application;

[0029] Figure 8 is a schematic block diagram of the principle of the device for restoring the lighting state of the lamp of the present application;

[0030] Figure 9 is a schematic structural diagram of a computer device adopted by the present application. Detailed Embodiments

[0031] A method for restoring the lighting state of the present application can be programmed as a computer program product and implemented by running on a client or a server. The client can be a terminal device such as a smart phone, a personal computer, a laptop, or a tablet. In a typical embodiment of the present application, the terminal device can be connected and controlled to the lighting device through different communication links. Among them, the communication links include Bluetooth, Wi-Fi, Zigbee, or other Internet of Things communication links. After the connection between the terminal device and the lighting device is successful, the user can adjust parameters such as the switch, color, brightness, and lighting mode of the lighting device on the terminal device, as well as save and apply snapshot operations. Taking a smart home environment as an example, the user installs multiple smart lighting devices in the living room. These smart lighting devices are connected to the user's smart phone through Wi-Fi or Bluetooth. The user can adjust the brightness, color, and lighting mode of these smart lighting devices through the lighting control application on the smart phone to meet different scenario requirements. Among them, the lighting mode can be a color value (such as an RGB value or a color temperature value) and corresponding parameters, a flashing frequency and corresponding parameters, music and corresponding parameters, or other user-defined modes. Such as a specific piece of music and the corresponding volume. After the user adjusts to the lighting state they like, they can trigger a snapshot save event on the lighting control application to save a snapshot of the current lighting state of the lighting device. At this time, the lighting control application records the relevant parameters of the lighting state (including brightness, color, lighting mode, etc.) and associates and stores them in a snapshot library on the local or cloud together with the lighting type and communication protocol identifier. Thereafter, through the snapshot application function in the lighting control application, when the user uses the lighting control application to control other lighting devices of the same type, clicking on the saved snapshot causes the lighting device of the same type to quickly restore to the corresponding lighting state.

[0032] In a typical embodiment of the present application, when the user clicks on the snapshot corresponding control on the terminal device, triggering the snapshot application event of the target lighting device, first, the lighting type of the target lighting device is identified and confirmed, and at the same time, the communication link adopted by the lighting device and its corresponding communication protocol identifier are determined. For example, if the lighting device is connected via Wi-Fi, its communication protocol is identified as the TCP / IP protocol; if it is connected via Bluetooth, it is identified as the Bluetooth protocol. Then, the snapshot status data adapted to the lighting type and the communication protocol identifier is retrieved from the local or server-side snapshot library. The snapshot status data contains the specific values of parameters such as the switch state, brightness, color, and lighting mode of the lighting device saved by the user before. According to the communication protocol of the lighting device, these snapshot status data are converted into corresponding control instructions, such as generating Bluetooth control instructions or Wi-Fi control instructions, and these instructions are sent to the target lighting device through the corresponding communication link, so as to control the lighting device to restore to the lighting state corresponding to the snapshot status data. For example, if the snapshot status data records that the brightness of the lighting device is 70% and the color is warm white light, these parameters are converted into instructions recognizable by the lighting device and sent to the lighting device through the Wi-Fi or Bluetooth link, so that it restores to the specific lighting state saved by the user before.

[0033] In some embodiments, in the snapshot saving stage, when the user triggers the snapshot saving event, the terminal device obtains the current lighting state data of the first lighting device, and the lighting state data includes but is not limited to parameters such as the switch state, brightness value, color value, and lighting mode of the lighting device. Then, according to a variety of preset communication protocols, these lighting state data are converted into snapshot status data adapted to the lighting type of the first lighting device. For example, according to the communication protocol (such as the Bluetooth protocol or Wi-Fi protocol) and lighting type of the lighting device, the corresponding snapshot status data format is generated. Finally, the snapshot status data is associated and stored in the snapshot library with the lighting type of the first lighting device and the corresponding communication protocol identifier, and the snapshot library can be located on the local client device or the cloud server. In this way, the rapid restoration of the lighting state of the lighting device can be realized.

[0034] In some embodiments, combined with Figure 1 , the lighting state restoration method of the present application includes:

[0035] Step S5100: Respond to the snapshot application event of the target lighting device, and determine the lighting type of the target lighting device and the communication protocol identifier corresponding to the applied communication link;

[0036] In the field of intelligent lighting, users often need to perform complex parameter adjustments on lighting devices, such as brightness, color, and various lighting modes, to achieve the ideal lighting state. When the user adjusts to the lighting state they like, they can save a snapshot of the current lighting state. The purpose is to enable the user to directly trigger the corresponding snapshot for application when they want to apply this lighting state to the target lighting device or other lighting devices of the same type next time. Specifically, the terminal device usually provides an intuitive operation interface through the graphical user interface to visually display the list of saved snapshots. The user can select the snapshot they want to display by clicking, swiping, or other interaction methods, triggering the snapshot application event.

[0037] After the terminal device receives the instruction of the snapshot application event, it identifies and determines the lamp type of the target lighting device. The lamp type refers to the type or model of the lighting device, and the lamp type determines the basic functions and adjustable parameters of the lighting device. To accurately identify the lamp type, the terminal device can match through a pre-stored device information database. This device information database contains various lighting device models and their corresponding characteristic parameters, such as brand, model, supported color range, brightness adjustment range, etc. The terminal device reads the device identifier associated with the target lighting device (such as device ID or MAC address) and searches for the corresponding lamp type in the database. This lamp type is used for the user to save a snapshot on the target lighting device and synchronize the snapshot on lighting devices of the same type. Further, the snapshot saved by the user on the target lighting device can be applied on devices of the same type. This application is not limited to saving on the target lighting device and can be implemented on any lighting device.

[0038] While determining the type of the lighting fixture, it is also necessary to identify the communication link used by the target lighting fixture device and its corresponding communication protocol identifier. Intelligent lighting fixture devices are usually connected to terminal devices through multiple communication links. Common communication links include Wi-Fi, Bluetooth, Zigbee, etc. Each communication link has its corresponding communication protocol, which is used to standardize the format and rules of data transmission. For example, Wi-Fi communication usually uses the TCP / IP protocol, while Bluetooth communication uses the Bluetooth protocol. To ensure that the snapshot status data can be correctly transmitted to the lighting fixture device, it is necessary to accurately identify the currently used communication link and its protocol identifier. The terminal device can determine the type of communication link by detecting the connection status with the lighting fixture device. That is, if the terminal device is connected to the lighting fixture device via Bluetooth, it is identified that the current communication link is Bluetooth, and further determine that its communication protocol identifier is the Bluetooth protocol. In some embodiments, the lighting fixture device may support multiple communication links at the same time, and the terminal device can select the optimal communication link according to the user's settings or automatically. For example, if the user preferentially selects a Wi-Fi connection in the settings of the terminal device, and the lighting fixture device supports both Wi-Fi and Bluetooth at the same time, the Wi-Fi link is preferentially selected, and its communication protocol identifier is determined to be the TCP / IP protocol.

[0039] In one embodiment, after determining the communication protocol identifier, the specific version and characteristics of the protocol are further confirmed. Different versions of communication protocols may have differences in data transmission format, transmission rate, and compatibility. For example, there are multiple versions of the Bluetooth protocol, such as Bluetooth 4.0 and Bluetooth 5.0, and these versions of the Bluetooth protocol have significant differences in transmission rate and connection stability. The specific version information of the communication protocol can be obtained by performing a handshake operation with the lighting fixture device. The handshake operation is a communication initialization process, and the terminal device and the lighting fixture device exchange specific signals or data packets to confirm each other's communication capabilities and protocol versions. For example, the terminal device can send a request signal for querying the protocol version to the lighting fixture device. After receiving the signal, the lighting fixture device will return the information of the supported communication protocol version, such as "Bluetooth 5.0". The terminal device determines that the communication protocol identifier of the current communication link is the Bluetooth 5.0 protocol according to the returned information.

[0040] Through the above process, the response to the snapshot application event of the target lighting fixture device is completed, and the type of the lighting fixture device and the communication protocol identifier corresponding to the communication link are accurately determined. This step provides the necessary basic information for subsequently obtaining the adapted snapshot status data from the snapshot library and applying the snapshot status data to the lighting fixture device through the communication link.

[0041] Step S5200: Determine the snapshot status data adapted to the communication protocol identifier under the type of the target lighting fixture device from the snapshot library;

[0042] The snapshot library is a database used to store the snapshot status data of lighting devices, which records the snapshot status data corresponding to the converted luminous status data of lighting devices saved by users at different time points and in different scenarios. For the conversion between the luminous status data and the snapshot status data, please refer to the specific implementation manners hereinafter, and details are not described herein. Each snapshot status data is associated with a specific lighting device type and communication protocol identifier. In this step, the adapted snapshot status data is retrieved from the snapshot library. In one embodiment, the snapshot library is usually classified and stored according to the lighting device type and communication protocol identifier to improve the retrieval efficiency. For example, lighting device types of different brands and models are stored in different data partitions respectively, and each partition is further subdivided according to the communication protocol identifier. This hierarchical storage structure can quickly locate the required snapshot status data.

[0043] In another embodiment, after the user triggers a snapshot application event on the terminal device in the previous step, the unique identifier of the triggered snapshot is obtained. This unique identifier of the snapshot is generated when the user saves the snapshot and is associated with the snapshot control displayed in the snapshot list. Based on this unique identifier of the snapshot, the corresponding snapshot status data is directly retrieved from the snapshot library, and then combined with the lighting device type and communication protocol identifier, the final snapshot status data is determined. If no adapted snapshot status data is found, the terminal device will generate a prompt message to notify the user that there is no adapted data in the current snapshot library and suggest that the user re-save the snapshot or manually adjust the status of the lighting device.

[0044] In another embodiment, after the adapted snapshot status data is retrieved, it needs to be verified. The verification process is mainly to ensure the integrity and consistency of the data, such as checking whether the data format is correct, whether the parameter values are within a reasonable range, etc.

[0045] Through the above process, the adapted snapshot status data that matches the lighting device type and communication protocol identifier of the target lighting device can be successfully retrieved from the snapshot library efficiently and accurately, providing reliable data support for the subsequent restoration of the lighting device status.

[0046] Step S5300: Apply the snapshot status data to the target lighting device through the communication link to control the target lighting device to adjust to the luminous status corresponding to the snapshot status data.

[0047] After the adapted snapshot status data is successfully retrieved in the previous step, the terminal device needs to apply this snapshot status data to the target lighting device through the communication link to restore the luminous status of the lighting device.

[0048] In one embodiment, a corresponding communication protocol is determined based on the current communication link. The communication protocol includes multiple data conversion rules. Based on these data conversion rules, the snapshot status data is parsed to obtain a lamp control instruction. Then, the terminal device sends the control instruction to the target lamp device through the established communication link. After receiving the lamp control instruction, the lamp device executes the instruction and adjusts its own light-emitting state to match the parameters recorded in the snapshot status data. To ensure the accuracy of the state restoration, the terminal device can send a confirmation request to the lamp device through the communication link to verify whether the lamp device has successfully restored to the target light-emitting state. If the lamp device returns a confirmation signal, it indicates that the state restoration is successful; otherwise, the terminal device will resend the control instruction or prompt the user to check whether the communication link is normal.

[0049] In one embodiment, if the lamp device cannot fully support all the parameter values specified in the snapshot status data. For example, some lamp devices may not support certain specific colors or color temperature values, or their hardware capabilities cannot reach the brightness level required in the snapshot status data. At this time, the lamp device is set with a certain fault tolerance and intelligent adjustment mechanism. For example, if the lamp device cannot accurately achieve the color specified in the snapshot status data, it selects the closest color for output and feeds back the adjustment result to the terminal device. The terminal device can display the adjustment result to the user in an intuitive way, allowing the user to understand the difference between the actual restored state and the snapshot status data.

[0050] In another embodiment, during the process of restoring the light-emitting state of the lamp device, the user's interaction experience is considered. For example, the terminal device can display the restoration progress of the lamp device in real time through a graphical user interface (GUI). When the lamp device starts to respond to the snapshot status data, the terminal device can display a progress bar or animation to let the user know that the restoration operation is in progress. If any problems occur during the restoration process, such as a communication link interruption or a lamp device failure, the terminal device needs to promptly prompt the user with an error message and provide corresponding solutions.

[0051] In this embodiment, the terminal device can efficiently and reliably apply the snapshot status data to the target lamp device to achieve precise restoration of the light-emitting state of the lamp device.

[0052] According to the typical embodiments of the present application, it can be known that the technical solutions of the present application have multiple advantages, including but not limited to the following aspects:

[0053] This application responds to the snapshot application event of the target lighting device, identifies the communication protocol identifier corresponding to the lighting device type and communication link, retrieves the adapted snapshot status data from the snapshot library, and applies the data to the lighting device through the communication link to restore it to the luminous state saved by the user before, achieving accurate and efficient restoration of the luminous state and significantly improving the user experience.

[0054] First, through the matching mechanism of the communication protocol identifier and the lighting device type, this application realizes the cross-device reuse of the snapshot status data. This technical feature enables the personalized luminous state set on a single lighting device to be quickly adapted and applied to other lighting devices of the same type, avoiding the operation of repeated configuration and significantly improving the usage efficiency of the lighting device.

[0055] Second, this application realizes the instant restoration function of the lighting luminous state. Through the storage and reuse mechanism of the snapshot status data, the user only needs to save the snapshot to restore to the corresponding saved luminous state at any time, without manually adjusting the parameters, avoiding the problem that it is difficult to accurately restore by manual adjustment and further optimizing the user experience.

[0056] In addition, this application allows users to customize and save multiple luminous states according to their own preferences and specific scenarios. This highly personalized customization ability not only meets the diverse needs of users, but also improves the interactivity between the lighting device and the user, enhances the user's dependence on the corresponding lighting device, and promotes the popularization and application of this lighting device.

[0057] Based on any embodiment of the method of this application, please refer to Figure 2 , before responding to the snapshot application event of the target lighting device, it includes:

[0058] Step S6100, responding to the snapshot saving event acting on the first lighting device, and obtaining the current luminous state data of the first lighting device;

[0059] The user triggers a snapshot saving event through a terminal device (such as a smart phone, a tablet computer or a dedicated lighting control panel). The snapshot saving event is usually triggered by the user on the graphical user interface (GUI) of the terminal device. For example, the user can initiate a snapshot event by clicking the "Save Current State" button or through a voice command. In one embodiment, after receiving the snapshot saving event triggered by the user, the terminal device immediately sends a status query request to the first lighting device, requesting the lighting device to return its current lighting status data. After receiving the status query request, the first lighting device starts an internal lighting status detection mechanism to obtain the current lighting status data. The lighting status data includes parameters such as the switch status and brightness value of the lighting device, as well as the lighting mode and its mode parameters, etc. The lighting device will package these lighting status parameter values into a status data packet and send it back to the terminal device through a pre-established communication link (such as Wi-Fi, Bluetooth or Zigbee).

[0060] In one embodiment, after receiving the lighting status data returned by the first lighting device, the terminal device will parse and verify the received data to ensure the integrity and accuracy of the data. For example, the terminal device will check whether all necessary parameter values are included in the data packet and verify whether these parameter values are within a reasonable range. If it is found that some parameter values are missing in the data packet or the parameter values exceed the reasonable range, the terminal device will send an error feedback signal to the lighting device, requesting the lighting device to re-detect and send the status data.

[0061] Step S6200, corresponding to multiple preset communication protocols, convert the lighting status data into snapshot status data corresponding to the lighting type applicable to the first lighting device;

[0062] There are multiple communication protocols for lighting devices. In order to make the snapshot function have wide compatibility, multiple communication protocols need to be preset, and according to the communication protocol used by the first lighting device, the original lighting status data is converted into snapshot status data adapted to the device.

[0063] After the terminal device obtains the current light-emitting state data of the first lighting device in the previous step, according to the type and communication protocol identifier of the first lighting device, select the corresponding communication protocol from the preset communication protocol library. Then process the light-emitting state data according to multiple protocol rules in the loaded communication protocol. Different lighting devices may have different requirements for the parameter format and value range of the light-emitting state data. In addition to the conversion of the parameter format, the encoding method of the data also needs to be considered. Different communication protocols may have different requirements for data encoding. For example, Wi-Fi communication may support multiple encoding formats, such as UTF-8 or ASCII, while Bluetooth communication may prefer to use binary encoding. According to the requirements of the target communication protocol, select the appropriate encoding method to encode the snapshot state data to convert it into the final snapshot state data.

[0064] Step S6300: Associatively store the snapshot state data with the lighting type and the corresponding communication protocol identifier of the first lighting device in the snapshot library.

[0065] The terminal device needs to associate the generated snapshot state data with the lighting type and communication protocol identifier of the first lighting device and store it in the snapshot library. In one embodiment, the terminal device first binds the snapshot state data with the lighting type of the first lighting device to ensure that the snapshot state data can be accurately matched to the corresponding lighting device in subsequent applications. Then the terminal device associates the snapshot state data with the communication protocol identifier used by the first lighting device to ensure that the snapshot state data can be transmitted to the lighting device through the correct communication link. After the association is completed, the terminal device stores the snapshot state data and its associated lighting type and communication protocol identifier as a complete record in the snapshot library. In another embodiment, the terminal device generates a unique snapshot identifier for each snapshot state data, which is used to quickly locate and retrieve the corresponding snapshot state data in the snapshot library. The snapshot identifier is usually associated with the snapshot control saved by the user on the terminal device, so that the user can quickly select and apply the required snapshot state data through the snapshot list in subsequent applications.

[0066] In this embodiment, the light-emitting state data is converted into a snapshot state data adapted to the type and communication protocol of the first lighting device through a variety of preset communication protocols, which solves the compatibility problem caused by communication protocol differences among different lighting devices. And through the adaptation of the lighting type, subsequently, based on the lighting type, the personalized light-emitting state set by the user on a single lighting device can be quickly adapted and applied to other lighting devices of the same type, significantly improving the versatility and applicability of the snapshot function.

[0067] Based on any embodiment of the method of the present application, please refer to Figure 3, corresponding to multiple preset communication protocols, convert the light emission state data into snapshot state data corresponding to the lamp type suitable for the first lamp device, including:

[0068] Step S6210, according to the communication channel types corresponding to multiple preset communication protocols, respectively generate lamp control instructions that adapt to the lamp type of the first lamp device from the light emission state data;

[0069] Lamp devices usually interact with terminal devices through different communication protocols. Based on multiple preset communication protocols, the light emission state data is respectively converted into lamp control instructions corresponding to each communication protocol. Specifically, each communication channel type has its specific data transmission format. The terminal device first loads the preset communication protocol library and selects the corresponding communication protocol according to the communication channel type of the first lamp device, so as to convert it into a lamp control instruction based on this communication protocol. In this way, the terminal device can generate adapted lamp control instructions for each communication channel type, ensuring that the snapshot state data can be accurately transmitted to the first lamp device through different communication links.

[0070] In one embodiment, during the process of generating the lamp control instruction, the hardware characteristics of the lamp device are considered. Different lamp devices may support different functions and parameter ranges. For example, some lamp devices may only support brightness adjustment, while others may support complex color and mode adjustments. It is necessary to convert the light emission state data into adapted control instructions according to the capabilities of the first lamp device. For example, if the first lamp device is a monochromatic lamp device, the color information in the light emission state data is ignored, only the brightness information is retained, and it is converted into a control instruction for the monochromatic lamp device.

[0071] Step S6220, based on multiple data conversion rules in multiple preset communication protocols, convert the lamp control instructions into snapshot state data adapted to the corresponding communication protocol.

[0072] The terminal device further converts the lamp control instructions into snapshot state data adapted to the communication protocol based on the data conversion rules in multiple preset communication protocols. By applying the data conversion rules in the communication protocol item by item, the terminal device can convert the lamp control instructions into snapshot state data adapted to the communication protocol, ensuring that the data can be applied to the lamp device based on different communication protocols.

[0073] In this embodiment, based on the data conversion rules in multiple preset communication protocols, the lamp control instructions are converted into snapshot state data adapted to the communication protocol, ensuring that the data can be accurately and efficiently transmitted and applied to the lamp device. This embodiment reduces transmission failures or device anomalies caused by protocol mismatches or data format errors.

[0074] Based on any embodiment of the method of the present application, please refer to Figure 4 , and apply the snapshot status data to the target lighting device through the communication link to control the target lighting device to adjust to the lighting state corresponding to the snapshot status data, including:

[0075] Step S5310: Obtain the communication link currently used by the target lighting device and determine the corresponding communication protocol;

[0076] The terminal device obtains the communication link currently used by the target lighting device and determines its corresponding communication protocol. The communication link is the channel for data transmission between the terminal device and the lighting device. The terminal device determines the type of the communication link currently used by detecting the connection status with the lighting device. By obtaining the communication link and determining the corresponding communication protocol, the terminal device provides the necessary basic information for subsequent data parsing and transmission.

[0077] Step S5320: Based on multiple data conversion rules in the communication protocol, parse the snapshot status data to obtain corresponding lighting control instructions;

[0078] After determining the communication protocol currently used by the target lighting device in the previous step, the terminal device needs to parse the snapshot status data according to the data conversion rules in the protocol to generate control instructions recognizable by the lighting device. The communication protocol usually contains multiple data conversion rules for converting general snapshot status data into an instruction format adapted to a specific protocol. For example, if the communication protocol is Bluetooth 5.0, the terminal device will convert parameters such as brightness and color in the snapshot status data into binary format instructions according to the data format requirements of the Bluetooth protocol. For the brightness value, the terminal device will map it to the brightness range specified by the protocol (such as 0-255) and generate the corresponding control byte; for the color value, the terminal device will convert it into RGB format or color temperature value and encode it according to the protocol requirements. By applying the data conversion rules in the communication protocol one by one, the terminal device can parse the snapshot status data into lighting control instructions executable by the lighting device, providing the basis for subsequent instruction transmission and execution.

[0079] Step S5330: Apply the lighting control instructions to the target lighting device through the communication link to control the target lighting device to restore to the lighting state corresponding to the snapshot status data.

[0080] The terminal device sends instructions to the target lighting device through the established communication link. In one embodiment, the terminal device first encapsulates the control instructions into a data format suitable for the current communication protocol and sends them to the lighting device through the communication link. Taking the Zigbee protocol as an example, the control instructions are encapsulated into Zigbee data frames, which include a frame header, a frame body, and a frame tail. The frame header contains information such as the target device address and frame type. The frame body contains specific control instructions, such as brightness values and color values. The frame tail contains check information to ensure data integrity.

[0081] When the lighting device receives the control instructions, the lighting device parses and executes the lighting control instructions according to its own hardware and software logic. During the execution of the lighting control instructions, to ensure the accuracy of state restoration, the terminal device can send a confirmation request to the lighting device through the communication link to verify whether the lighting device has successfully restored to the target light-emitting state. If the lighting device returns a confirmation signal, it indicates that the state restoration is successful; otherwise, the terminal device will resend the lighting control instructions or prompt the user to check whether the communication link is normal. In this way, the terminal device can efficiently and reliably apply the snapshot state data to the target lighting device to achieve precise restoration of the light-emitting state of the lighting device.

[0082] In this embodiment, the terminal device can accurately obtain the current communication link used by the target lighting device and its corresponding communication protocol. Based on the data conversion rules in the communication protocol, the snapshot state data is parsed into control instructions recognizable by the lighting device, solving the compatibility problem of data formats between different communication protocols and significantly improving the accuracy and adaptability of instruction generation. Finally, by encapsulating the lighting control instructions into a data format suitable for the communication protocol and sending them to the lighting device through the communication link, the efficient transmission and accurate execution of the instructions are ensured.

[0083] Based on any embodiment of the method of the present application, please refer to Figure 5 , in response to a snapshot saving event acting on the first lighting device, obtain the current light-emitting state data of the first lighting device, including:

[0084] Step S6110, in response to a snapshot saving event acting on the first lighting device triggered by the user on the terminal device, encapsulate the light-emitting state data set by the user in different light-emitting state adjustment interfaces of the terminal device into corresponding controls, where one or more light-emitting state data are set in the same light-emitting state adjustment interface;

[0085] In one embodiment, the terminal device sets a "snapshot save" function in the lighting device control application. When the user finishes adjusting the lighting device in the lighting state adjustment interface of the terminal device, a snapshot save event can be initiated by clicking the "Save Snapshot" button or using other triggering methods (such as voice commands). After receiving the snapshot save event, the terminal device obtains all the lighting state data set by the user from the current lighting state adjustment interface, and encapsulates the extracted lighting state data into one or more controls. A control is a visual user interface element that can combine complex parameters into an easy-to-operate unit. These different lighting state data may be in different interfaces in the lighting device control application of the terminal device, or multiple different lighting state data may be set in the same lighting state adjustment interface. The terminal device generates an independent control for each group of lighting state data and differentiates them through different labels or icons. In this way, the terminal device can efficiently capture and store the lighting state data set by the user in the adjustment interface, providing basic data support for subsequent snapshot saving and applications.

[0086] Step S6120: Visually present the control in the lighting state selection interface of the terminal device;

[0087] The lighting state selection interface is part of the graphical user interface (GUI) of the terminal device and usually displays the encapsulated controls in the form of a list, grid, or card. Each control corresponds to a group of lighting state data and is differentiated by means of labels, icons, or thumbnails, etc. For example, if the user saves multiple combinations of brightness values and color values, each combination will be encapsulated into a control and displayed as a card with a brightness percentage and color preview on the interface. The user can select the desired control by clicking, swiping, or other interaction methods, and the terminal device will load the corresponding lighting state data according to the user's selection. In addition, the lighting state selection interface can also provide search, sorting, and classification functions to help the user quickly locate the desired control. For example, the user can search for specific lighting state data by keywords or sort the controls according to conditions such as save time and usage frequency. Through this visual presentation method, the terminal device can provide the user with an intuitive and convenient snapshot selection experience, improving the user's operation efficiency and satisfaction. To improve the user experience, a preview function can also be added to each control, for example, by using a small colored square or icon to display the saved color state.

[0088] Step S6130: Obtain the corresponding lighting state data from the memory or local storage of the terminal device according to the control selected by the user in the lighting state selection interface.

[0089] The terminal device retrieves the corresponding light-emitting state data from the memory or local storage according to the unique identifier or index associated with the control selected by the user in the lamp state selection interface. The unique identifier stored in the control corresponds one-to-one with the location of the light-emitting state data in the memory or local storage, and the terminal device quickly locates and loads the corresponding data through this unique identifier. If the light-emitting state data is stored in the memory, the terminal device directly reads it from the memory; if the data is stored in the local database, the terminal device obtains it through database query. In this way, the terminal device can efficiently respond to the user's selection, quickly load the required light-emitting state data, and provide support for subsequent snapshot applications or adjustments.

[0090] In this embodiment, the terminal device can encapsulate various light-emitting state data set by the user in the adjustment interface into independent controls, visually display these controls in the form of a list, grid, or card in the lamp state selection interface, and combine search, sorting, and classification functions to provide the user with an intuitive and convenient snapshot selection experience, greatly improving the user's operation efficiency and satisfaction.

[0091] Based on any embodiment of the method of the present application, please refer to Figure 6 , after responding to the snapshot saving event acting on the first lighting device and obtaining the current light-emitting state data of the first lighting device, it includes:

[0092] Step S7100: Detect the light-emitting state data according to the preset safe operation rules, and determine whether the light-emitting state data meets multiple specific rule descriptions in the safe operation rules;

[0093] Users can adjust various parameters of the lighting device through the terminal device, such as brightness, color, and blinking frequency. However, not all parameter combinations set by users are safe. For example, too high brightness or too fast blinking frequency may damage the hardware of the lighting device and may even have an adverse impact on user health. To ensure the safe operation of the lighting device within a safe range, it is necessary to strictly detect the light-emitting state data before saving it.

[0094] The preset safe operation rules are the basis for the terminal device to judge whether the light-emitting state data is safe. These safe operation rules are usually formulated by the lighting device manufacturer or system developer according to the hardware characteristics and safety standards of the lighting device. For example, the safe operation rules stipulate that the brightness shall not exceed the maximum rated brightness of the lighting device (such as 100%), the color change frequency shall not exceed a certain threshold (such as no more than 5 times per second), or the blinking frequency must be within the safe range of the human eye (such as below 50 Hz). The safe operation rules are stored in the rule library of the terminal device for calling during the detection process.

[0095] The terminal device first loads the preset safe operation rules and compares and verifies the parameters in the light-emitting state data one by one. For example, for the brightness value, the terminal device checks whether it is within the minimum and maximum brightness ranges supported by the lighting device; for the color parameters, the terminal device verifies whether they conform to the color space supported by the lighting device (such as RGB values or color temperature values); for each light-emitting mode and its mode parameters, the terminal device determines whether it is a preset mode supported by the lighting device or a user-defined mode, and whether the parameters conform to the rules.

[0096] In one embodiment, when it is detected that some parameters in the light-emitting state data are close to the boundaries of the safe operation rules. For example, the brightness may be close to but not exceed the maximum allowable value. In this case, the terminal device issues a warning to prompt the user that the parameter is close to the safety limit and recommends that the user make adjustments.

[0097] Step S7200: If the light-emitting state data does not meet one or more of the specific rule descriptions, call a large language model to generate targeted guidance information according to the specific rule descriptions that are not met and for the light-emitting state data;

[0098] When it is detected that the light-emitting state data does not meet one or more of the safe operation rules, the terminal device calls a large language model to generate targeted guidance information. To help the user understand which parameters do not conform to the safety rules and how to adjust these parameters to meet the requirements.

[0099] To generate high-quality guidance information, a large language model (LLM) is called. The large language model is an artificial intelligence model based on deep learning that can understand and generate natural language text. By inputting the specific rule descriptions that do not meet the rules and the light-emitting state data, the large language model can generate easily understandable and guiding text information. For example, if the brightness set by the user exceeds the maximum rated value of the lighting device, the brightness set by the user is 120%, but the maximum allowable brightness of the lighting device is 100%. After receiving this information, the large language model will generate targeted guidance information according to its trained knowledge and language understanding ability. For example, generate the following targeted guidance text: "The brightness you set exceeds the safety range of the lighting device. To protect the lighting device and ensure its normal operation, please adjust the brightness to 100% or below."

[0100] In one embodiment, to further improve the quality of the guiding information, more context information can be provided when inputting to the large language model. For example, the model number of the lighting device, the current lighting state, the parameter values set by the user, and the specific rule descriptions of the safety rules can be provided. This can help the large language model generate more accurate and specific guiding information. For example, "The model number of the lighting device you are using is XYZ, and its maximum allowable brightness is 100%. The currently set brightness is 120%, which may cause the lighting device to overheat and shorten its service life. It is recommended that you adjust the brightness to 100% or lower to ensure the safe operation of the lighting device."

[0101] In another embodiment, in addition to generating targeted guiding information, the capabilities of the large language model can be utilized to generate graphical or interactive guiding information. For example, the large language model can be requested to generate a description of the graphical interface layout containing adjustment suggestions, or to generate an interactive dialogue script to guide the user to adjust the parameters step by step. This diverse guiding method can meet the needs of different users.

[0102] By calling the large language model to generate targeted guiding information, the user is prompted to adjust the lighting state data to ensure that the lighting device operates within a safe range, while enhancing the user's operation experience.

[0103] Step S7300: Visually present the targeted guiding information on the terminal device to guide the user to modify the lighting state data according to the targeted guiding information until the modified lighting state data complies with the safe operation rules.

[0104] After generating the targeted guiding information, the terminal device needs to display this information to the user in an intuitive and easy-to-understand manner so that the user can adjust the lighting state data according to the prompts. The terminal device uses a graphical user interface (GUI) to display the targeted guiding information. This graphical user interface is usually integrated into the lighting device control application of the terminal device and is connected to the adjustment interface commonly used by the user. For example, when the user sets an unsafe brightness value in the adjustment interface, the terminal device will display guiding information in a prominent position (such as the top notification bar or a pop-up window) of the graphical user interface: "The brightness you set exceeds the safe range of the lighting device. To protect the lighting device and ensure its normal operation, please adjust the brightness to 100% or lower."

[0105] In one embodiment, the visualization of the targeted guidance information not only requires clear text descriptions but can also incorporate graphical elements to enhance users' understanding. For example, a progress bar or slider can be added next to the targeted guidance information to visually show the gap between the current brightness and the safe range. If the brightness set by the user is 120%, the progress bar can display that the part exceeding the safe range is marked in red, while the part within the safe range is marked in green.

[0106] In another embodiment, in addition to static targeted guidance information, a dynamic interactive approach can be adopted to guide users to modify parameters. For example, when the user clicks the "Adjust Brightness" button in the targeted guidance information, it can automatically jump to the brightness adjustment interface and position the slider at the currently set brightness value. At this time, the adjustable range of the slider can be restricted within the safe range (e.g., maximum 100%), and when the user moves the slider, the relationship between the current brightness value and the safe range can be displayed in real-time. For example, when the user moves the slider to 90%, the interface can display: "The current brightness is 90%, which meets the safety requirements." This dynamic interaction not only improves the convenience of user operation but also enhances users' understanding of safety rules.

[0107] In another embodiment, to further enhance the user experience, more operation options can be provided in the targeted guidance information. For example, in addition to allowing users to manually adjust parameters, an "Auto Adjust" button can be provided. When the user clicks this button, the parameters will be automatically adjusted to within the safe range, and the user will be prompted: "The brightness has been automatically adjusted to 100%, meeting the safety requirements." This auto-adjustment function can help users who are not familiar with the parameters of the lighting equipment quickly solve problems and reduce the operation burden on users.

[0108] Through this visual guidance method, the terminal device can help users quickly understand the problem and take corrective measures to ensure that the luminous state data complies with the safe operation rules before being saved, while improving the operation efficiency and experience of users.

[0109] In this embodiment, the terminal device can comprehensively detect the luminous state data according to the preset safe operation rules to ensure that the lighting equipment operates within the safe range, avoiding equipment damage or unstable operation caused by abnormal parameters. By calling the large language model to generate targeted guidance information, it helps users understand the reasons for parameter anomalies and provides specific adjustment suggestions, significantly improving the user operation experience and problem-solving efficiency. This implementation also visualizes the guidance information on the terminal device in an intuitive and easy-to-understand manner, and combines graphical elements and dynamic interaction functions to further enhance users' understanding of safety rules and the convenience of operation.

[0110] Based on any embodiment of the method in this application, please refer toFigure 7 If the light emission status data does not meet one or more of the specific rule descriptions, call the large language model according to the specific rule descriptions that are not met, and generate targeted guidance information for the light emission status data, including:

[0111] Step S7210: When the light emission status data does not meet one or more of the specific rule descriptions, embed the specific rule descriptions that are not met and the corresponding light emission status data into the guidance information template to obtain a corresponding guidance information generation instruction;

[0112] The guidance information template is a predefined structured text used to guide the large language model to generate targeted guidance information. The guidance information template usually contains a fixed text framework and dynamic insertion points, which are used to embed specific rule descriptions and light emission status data. When the terminal device detects that the light emission status data does not meet the safety rules, it extracts the specific descriptions of the rules that are not met and the corresponding light emission status data. The terminal device embeds the specific rule descriptions that are not met and the corresponding light emission status data into the preset guidance information template to generate a guidance information generation instruction. The generated guidance information generation instruction can include specific parameter exception descriptions and corresponding adjustment suggestions to help users quickly understand the problem and take corrective measures. Through this step, the terminal device can efficiently and accurately generate targeted guidance information to ensure that users can adjust the light emission status data to the safe range according to the prompts.

[0113] Step S7220: Input the guidance information generation instruction into the large language model to control the large language model to generate corresponding targeted guidance information to guide the user to modify the light emission status data.

[0114] After generating the guidance information generation instruction in the previous step, the terminal device inputs this instruction into the large language model and uses the natural language generation ability of the large language model to generate targeted guidance information. The large language model can understand the context information in the guidance information generation instruction and generate clear and easy-to-understand prompt text according to the specific rule descriptions and light emission status data in the instruction. In one embodiment, the large language model can also generate personalized guidance information according to the user's habits and preferences. For example, for users who prefer high brightness, the large language model will suggest "The current brightness value is too high. It is recommended to adjust it to 90% to protect the lifespan of the lighting equipment while maintaining a high lighting effect." By calling the large language model to generate targeted guidance information, the terminal device can prompt the user to adjust the light emission status data in a user-friendly manner, ensure that the lighting equipment operates within the safe range, and improve the user's operation experience at the same time.

[0115] In this embodiment, the terminal device can embed the specific description and luminous state data that do not meet the security rules into the boot information template to generate a structured boot information generation instruction, ensuring the accuracy and pertinence of the boot information, helping the user understand the reason for the parameter abnormality and providing specific adjustment suggestions.

[0116] Please refer to Figure 8 , a device for restoring the luminous state of a lamp provided to meet one of the purposes of the present application, is a functional embodiment of the method for restoring the luminous state of a lamp in the present application. On the other hand, a device for restoring the luminous state of a lamp provided to meet one of the purposes of the present application includes a snapshot application event response module 5100, a snapshot state data determination module 5200, and a luminous state restoration module 5300. Among them, the snapshot application event response module 5100 is configured to respond to the snapshot application event of the target lamp device and determine the lamp type of the target lamp device and the communication protocol identifier corresponding to the applied communication link; the snapshot state data determination module 5200 is configured to determine the snapshot state data adapted to the communication protocol identifier under the lamp type of the target lamp device from the snapshot library; the luminous state restoration module 5300 is configured to apply the snapshot state data to the target lamp device through the communication link to control the target lamp device to adjust to the luminous state corresponding to the snapshot state data.

[0117] In a further embodiment, before the snapshot application event response module 5100, it includes: a snapshot save event response sub-module configured to respond to the snapshot save event acting on the first lamp device and obtain the current luminous state data of the first lamp device; a snapshot state data conversion sub-module configured to convert the luminous state data into snapshot state data adapted to the lamp type of the first lamp device corresponding to multiple preset communication protocols; a snapshot state data storage sub-module configured to associate and store the snapshot state data with the lamp type of the first lamp device and the corresponding communication protocol identifier in the snapshot library.

[0118] In a further embodiment, the snapshot state data conversion sub-module includes: a lamp control instruction generation sub-module configured to generate lamp control instructions adapted to the lamp type of the first lamp device respectively according to the communication channel types corresponding to multiple preset communication protocols; a lamp control instruction conversion sub-module configured to convert the lamp control instructions into snapshot state data adapted to the corresponding communication protocol based on multiple data conversion rules in multiple preset communication protocols.

[0119] In a further embodiment, the light emission state restoration module 5300 includes: a communication protocol determination sub-module configured to obtain the communication link currently used by the target lighting device and determine the corresponding communication protocol; a snapshot state data parsing sub-module configured to parse the snapshot state data based on multiple data conversion rules in the communication protocol to obtain corresponding lighting control instructions; and a lighting control instruction application sub-module configured to apply the lighting control instructions to the target lighting device through the communication link to control the target lighting device to restore to the light emission state corresponding to the snapshot state data.

[0120] In a further embodiment, the snapshot save event response sub-module includes: a control encapsulation sub-module configured to respond to a snapshot save event triggered by a user on a terminal device for a first lighting device, and encapsulate the light emission state data set by the user in different light emission state adjustment interfaces of the terminal device into corresponding controls, where one or more light emission state data are set in the same light emission state adjustment interface; a control visualization sub-module configured to visually present the controls in a lighting state selection interface of the terminal device; and a light emission state data acquisition sub-module configured to obtain the corresponding light emission state data from the memory or local storage of the terminal device according to the control selected by the user in the lighting state selection interface.

[0121] In a further embodiment, after the snapshot save event response sub-module, there is included: a rule detection sub-module configured to detect the light emission state data according to a preset safe operation rule, and determine whether the light emission state data satisfies multiple specific rule descriptions in the safe operation rule; a guidance information generation sub-module configured to, if the light emission state data does not satisfy one or more of the specific rule descriptions, call a large language model according to the unsatisfied specific rule descriptions and generate targeted guidance information for the light emission state data; and a guidance information visualization sub-module configured to visually present the targeted guidance information on the terminal device to guide the user to modify the light emission state data according to the targeted guidance information until the modified light emission state data complies with the safe operation rule.

[0122] In a further embodiment, the guidance information generation sub-module includes: a template embedding sub-module configured to, when the light emission state data does not satisfy one or more of the specific rule descriptions, embed the unsatisfied specific rule descriptions and the corresponding light emission state data into a guidance information template to obtain a corresponding guidance information generation instruction; and a light emission state data modification sub-module configured to input the guidance information generation instruction into the large language model to control the large language model to generate corresponding targeted guidance information to guide the user to modify the light emission state data.

[0123] To solve the above technical problems, the embodiments of the present application further provide a computer device. As Figure 9 shown, it is a schematic internal structure diagram of the computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected through a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. Control information sequences can be stored in the database. When the computer-readable instructions are executed by the processor, the processor can implement a method for restoring the lighting state of a lamp. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. Computer-readable instructions can be stored in the memory of the computer device. When the computer-readable instructions are executed by the processor, the processor can execute the method for restoring the lighting state of the lamp in the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 9 the structure shown in

[0124] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements. Figure 8 In this embodiment, the processor is used to execute the specific functions of each module and its sub-modules in

[0125] The memory stores the program codes and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores the program codes and data required to execute all modules / sub-modules in the device for restoring the lighting state of the lamp in the present application. The server can call the program codes and data of the server to execute the functions of all sub-modules.

[0126] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments of the present application can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0127] Those skilled in the art can understand that the various operations, methods, steps, measures, and solutions in the processes discussed in this application can be alternated, changed, combined, or deleted. Further, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and solutions in the prior art that are the same as those in the various operations, methods, and processes open-sourced in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted.

[0128] The above are only some embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A method for restoring the luminous state of a lighting fixture, characterized in that, Including: In response to a snapshot saving event acting on the first lighting device, obtain the current lighting state data of the first lighting device; Detect the lighting state data according to a preset safe operation rule, and determine whether the lighting state data meets multiple specific rule descriptions in the safe operation rule; If the lighting state data does not meet one or more of the specific rule descriptions, call a large language model to generate targeted guidance information for the lighting state data according to the non - met specific rule descriptions; Visually present the targeted guidance information on the terminal device to guide the user to modify the lighting state data according to the targeted guidance information until the modified lighting state data complies with the safe operation rule; Corresponding to multiple preset communication protocols, convert the lighting state data into snapshot state data corresponding to the lighting type applicable to the first lighting device; Associate and store the snapshot state data with the lighting type of the first lighting device and the corresponding communication protocol identifier in a snapshot library; In response to a snapshot application event of a target lighting device, determine the lighting type of the target lighting device and the communication protocol identifier corresponding to the applied communication link; Determine the snapshot state data adapted to the communication protocol identifier under the lighting type of the target lighting device from the snapshot library; Apply the snapshot state data to the target lighting device through the communication link to control the target lighting device to adjust to the lighting state corresponding to the snapshot state data.

2. The method for restoring the light emitting state of the lamp according to claim 1, characterized in that, Corresponding to multiple preset communication protocols, converting the lighting state data into snapshot state data corresponding to the lighting type applicable to the first lighting device includes: According to the communication channel types corresponding to multiple preset communication protocols, respectively generate lighting control instructions adapted to the lighting type of the first lighting device from the lighting state data; Based on multiple data conversion rules in multiple preset communication protocols, convert the lighting control instructions into snapshot state data adapted to the corresponding communication protocol.

3. The method for restoring the light-emitting state of the lamp according to claim 2, wherein Applying the snapshot state data to the target lighting device through the communication link to control the target lighting device to adjust to the lighting state corresponding to the snapshot state data includes: Obtain the communication link currently used by the target lighting device and determine the corresponding communication protocol; Based on multiple data conversion rules in the communication protocol, parse the snapshot state data to obtain corresponding lighting control instructions; Apply the lighting control instructions to the target lighting device through the communication link to control the target lighting device to restore to the lighting state corresponding to the snapshot state data.

4. The method for restoring the light-emitting state of a lamp according to claim 1, wherein In response to a snapshot saving event acting on the first lighting device, obtaining the current lighting state data of the first lighting device includes: In response to a snapshot saving event triggered by the user on the terminal device and acting on the first lighting device, encapsulate the lighting state data set by the user in different lighting state adjustment interfaces of the terminal device into corresponding controls, where one or more lighting state data are set in the same lighting state adjustment interface; Visually present the control on the lighting state selection interface of the terminal device; Obtain corresponding luminous state data from the memory or local storage of the terminal device according to the control selected by the user in the lamp state selection interface.

5. The method for restoring the light-emitting state of a lamp according to claim 1, wherein If the luminous state data does not meet one or more of the specific rule descriptions, call the large language model according to the specific rule descriptions that are not met, and generate targeted guidance information for the luminous state data, including: When the luminous state data does not meet one or more of the specific rule descriptions, embed the specific rule descriptions that are not met and the corresponding luminous state data into the guidance information template to obtain a corresponding guidance information generation instruction; Input the guidance information generation instruction into the large language model to control the large language model to generate corresponding targeted guidance information to guide the user to modify the luminous state data.

6. A device for restoring the lighting state of a lamp, characterized in that, Including: The snapshot save event response sub-module is set to respond to the snapshot save event acting on the first lighting device and obtain the current luminous state data of the first lighting device; The rule detection sub-module is set to detect the luminous state data according to the preset safe operation rules and judge whether the luminous state data meets multiple specific rule descriptions in the safe operation rules; The guidance information generation sub-module is set to, if the luminous state data does not meet one or more of the specific rule descriptions, call the large language model according to the specific rule descriptions that are not met, and generate targeted guidance information for the luminous state data; The guidance information visualization sub-module is set to visually present the targeted guidance information on the terminal device to guide the user to modify the luminous state data according to the targeted guidance information until the modified luminous state data meets the safe operation rules; The snapshot state data conversion sub-module is set to convert the luminous state data into snapshot state data corresponding to the lamp type applicable to the first lighting device for multiple preset communication protocols; The snapshot state data storage sub-module is set to associate and store the snapshot state data with the lamp type of the first lighting device and the corresponding communication protocol identifier in the snapshot library; The snapshot application event response module is set to respond to the snapshot application event of the target lighting device and determine the lamp type of the target lighting device and the communication protocol identifier corresponding to the applied communication link; The snapshot state data determination module is set to determine the snapshot state data adapted to the communication protocol identifier under the lamp type of the target lighting device from the snapshot library; The luminous state restoration module is set to apply the snapshot state data to the target lighting device through the communication link to control the target lighting device to adjust to the luminous state corresponding to the snapshot state data.

7. A computer device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores in the form of computer-readable instructions a computer program implemented by the method according to any one of claims 1 to 5. When the computer program is called and run by the computer, it executes the steps included in the corresponding method.

Citation Information

Patent Citations

  • Control method and device of lighting equipment, electronic equipment and storage medium

    CN113778299A