Lighting adjustment method, device, terminal equipment and storage medium
By obtaining control instructions and user identity type and determining target lighting parameters, the problem of the single existing lighting adjustment method is solved, personalized lighting control is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202011144028.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-22
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-10-22
AI Technical Summary
The existing lighting adjustment method is single and cannot provide users with a personalized experience.
By obtaining a control instruction, determining whether it is a light adjustment instruction, obtaining the current user identity type, and determining the target light parameters based on the target light type and user identity type, the adjustment of the smart light is controlled.
It realizes personalized lighting control and improves user experience.
Smart Images

Figure CN112397064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart homes, and in particular to a lighting adjustment method, device, terminal equipment and storage medium. Background Art
[0002] With the development of electronic technology and the improvement of users' living standards, smart homes are becoming more and more popular.
[0003] Smart homes are popular among users because of their intelligence and convenience. For example, users can control the lighting effects of their rooms with voice commands. However, currently, the control methods for room lighting effects are limited and fail to provide a better user experience. Summary of the Invention
[0004] The present invention provides a lighting adjustment method, apparatus, terminal device and storage medium, aiming to solve the technical problem that the existing lighting adjustment method is single and cannot provide a better experience for users.
[0005] To achieve the above objectives, the present invention provides a light adjustment method, which is applied to a light adjustment device. The light adjustment method comprises the following steps:
[0006] Get control instructions;
[0007] Determining whether the acquired control instruction is a lighting adjustment instruction, wherein the lighting adjustment instruction includes a target lighting type;
[0008] If yes, get the current user identity type;
[0009] Determining target light parameters based on the target light type and the current user identity type;
[0010] The corresponding smart light is controlled according to the target light parameters.
[0011] Optionally, the control instruction is a voice control instruction, and before the step of determining whether the acquired control instruction is a lighting control instruction, the method further includes:
[0012] Collect voice information;
[0013] Obtaining the voice text corresponding to the voice information;
[0014] Determining whether there is a preset control keyword in the voice text;
[0015] If so, determine the voice control instruction based on the voice text.
[0016] Optionally, the step of obtaining the current user identity type includes:
[0017] Determining whether there are preset identity keywords in the voice text; if so, determining the current user identity type based on the preset identity keywords;
[0018] or,
[0019] The current user identity type is determined based on the timbre of the voice information.
[0020] Optionally, the step of determining target light control parameters based on the target light type and the current user identity type includes:
[0021] From a preset lighting parameter mapping table, find the lighting parameters corresponding to the target lighting type and the current user identity type as the target lighting parameters; the preset lighting parameter mapping table includes a mapping relationship between lighting types, user identity types and lighting parameters.
[0022] Optionally, the light type is a light color type, and the light parameters include color parameters;
[0023] Before the step of searching the preset lighting parameter mapping table for lighting parameters corresponding to the target lighting type and the current user identity type as the target lighting parameters, the method further includes:
[0024] According to a preset user identity type-video type mapping table, respectively obtain the video playback records corresponding to each user identity type;
[0025] Obtaining corresponding videos according to the video playback records corresponding to each user identity type;
[0026] Extracting color elements as color parameters from video frames of videos corresponding to each of the user identity types;
[0027] The lighting parameter mapping table is determined based on the color parameters corresponding to each of the user identity types, the user identity type, and the preset lighting color type.
[0028] Optionally, the step of extracting color elements as color parameters from video frames of videos corresponding to each user identity type includes:
[0029] Extracting color elements from video frames of videos corresponding to each of the user identity types;
[0030] Determining whether, among the color elements of each of the video frames, there is a color element whose first proportion exceeds a preset first threshold, where the first proportion is a ratio of the number of pixels corresponding to the color element to the number of pixels in the video frame;
[0031] If so, the color element whose first proportion exceeds a preset first threshold is used as a color parameter.
[0032] Optionally, the step of extracting color elements as color parameters from video frames of videos corresponding to each user identity type includes:
[0033] Extracting color elements from video frames of videos corresponding to each of the user identity types;
[0034] Determine whether, among the color elements corresponding to the video, there are color elements whose second proportion exceeds a preset second threshold; the second proportion is a ratio of the number of pixels corresponding to the color element to the number of pixels in the video;
[0035] If so, the color element whose second proportion exceeds the preset second threshold is used as the color parameter.
[0036] In addition, to achieve the above-mentioned object, the present invention further provides a light adjustment device, comprising:
[0037] An instruction acquisition module, used to acquire control instructions;
[0038] a determination module, configured to determine whether the acquired voice control instruction is a light adjustment instruction, wherein the light adjustment instruction includes a target light type;
[0039] Identity acquisition module, used to obtain the current user identity type;
[0040] a determination module, configured to determine target light parameters based on the target light type and the current user identity type;
[0041] The control module is used to control the corresponding smart light according to the target light parameters.
[0042] In addition, to achieve the above-mentioned purpose, the present invention also proposes a terminal device, which includes: a memory, a processor, and a lighting adjustment program stored in the memory and running on the processor, and when the lighting adjustment program is executed by the processor, the steps of the lighting adjustment method described in any one of the above items are implemented.
[0043] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a light adjustment program is stored. When the light adjustment program is executed by a processor, the steps of any one of the above-mentioned light adjustment methods are implemented.
[0044] The technical solution of the present invention adopts a lighting adjustment method, which includes the following steps: obtaining a control instruction; determining whether the obtained control instruction is a lighting adjustment instruction, wherein the lighting adjustment instruction includes a target lighting type; if so, obtaining the current user identity type; determining the target lighting parameters based on the target lighting type and the current user identity type, and controlling the corresponding smart light according to the target lighting parameters; that is, in the present invention, when performing lighting adjustment, not only the lighting adjustment instruction will be referred to, but also the user identity type will be referred to, so that the adjusted lighting effect is more in line with user needs, thereby realizing personalized control and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0046] Figure 1 A schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present invention;
[0047] Figure 2 is a flowchart of a lighting adjustment method according to a first embodiment of the present invention;
[0048] Figure 3 This is a flowchart of obtaining voice control instructions according to the second embodiment of the present invention;
[0049] Figure 4 A schematic diagram of a process for determining a user identity type according to a first embodiment of the present invention;
[0050] Figure 5 Schematic diagram of the process of setting the lighting parameter mapping table according to the first embodiment of the present invention;
[0051] Figure 6 Schematic diagram of the structure of the lighting adjustment device of the present invention.
[0052] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0054] Reference Figure 1 , Figure 1 This is a schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present invention.
[0055] Terminal devices can be user equipment (UE) such as mobile phones, smart phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), handheld devices, vehicle-mounted devices, wearable devices, computing devices, televisions, monitoring devices, or other processing devices connected to wireless modems, mobile stations (MSs), etc. Terminal devices can be control panels, lights, and smart home devices. Devices may be called user terminals, portable terminals, desktop terminals, etc.
[0056] Typically, the terminal device includes: at least one processor 301, a memory 302, and a light adjustment program stored in the memory and executable on the processor, wherein the light adjustment program is configured to implement the steps of the light adjustment method described in any of the following embodiments.
[0057] Processor 301 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 301 may be implemented in at least one of the following hardware forms: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. Processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process operations related to the lighting adjustment method, allowing the lighting adjustment method model to be trained and learned autonomously to improve efficiency and accuracy.
[0058] Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 302 is used to store at least one instruction, which is executed by processor 301 to implement the lighting adjustment method provided in the method embodiments of this application.
[0059] In some embodiments, the terminal may optionally include a communication interface 303 and at least one peripheral device. The processor 301, memory 302, and communication interface 303 may be connected via a bus or signal lines. Each peripheral device may be connected to the communication interface 303 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 304, a display screen 305, and a power supply 306.
[0060] The communication interface 303 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0061] The RF circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 304 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 304 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 304 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0062] Display screen 305 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, or any combination thereof. When display screen 305 is a touch screen display, it is also capable of collecting touch signals on or above the surface of display screen 305. This touch signal can be input as a control signal to processor 301 for processing. In this case, display screen 305 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display screen 305 can be a single display screen, the front panel of the electronic device; in other embodiments, display screen 305 can be at least two, each disposed on different surfaces of the electronic device or in a foldable design; in still other embodiments, display screen 305 can be a flexible display screen, disposed on a curved or foldable surface of the electronic device. Display screen 305 can also be configured as a non-rectangular irregular shape, i.e., a special-shaped screen. Display screen 305 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0063] The power supply 306 is used to power various components in the electronic device. The power supply 306 can be AC power, DC power, disposable batteries, or rechargeable batteries. When the power supply 306 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology. It will be understood by those skilled in the art that Figure 1 The structure shown in the figure does not constitute a limitation on the light adjustment device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0064] In addition, an embodiment of the present invention further proposes a storage medium on which a light adjustment program is stored. When the light adjustment program is executed by a processor, the steps of the light adjustment method described in any of the following embodiments are implemented. Therefore, no further description will be given here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. For example, the program instructions can be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network.
[0065] Those skilled in the art will appreciate that all or part of the steps in any of the following method embodiments can be implemented by a computer program instructing the relevant hardware. The lighting adjustment program can be stored in a computer-readable storage medium. When executed, the program can include the steps in the following method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0066] Based on the above hardware structure, an embodiment of the lighting adjustment method of the present invention is proposed.
[0067] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a lighting adjustment method according to the present invention. The lighting adjustment method includes the following steps:
[0068] Step S11: Obtain control instructions.
[0069] In an embodiment of the present invention, after the light adjustment device is activated, the user can send control instructions to the light adjustment device, and the light adjustment device receives the control instructions sent by the user. The control instructions can be sent by the user through other devices connected to the light adjustment device, for example, the user can send them to the light adjustment device through a mobile phone or smart home device (such as a smart TV, smart refrigerator, etc.). In other words, after receiving the control instructions for the light adjustment device, the other device sends them to the light adjustment device. Alternatively, the control instructions can be sent directly by the user to the light adjustment device.
[0070] In some embodiments, the control instruction may be issued by the user via voice, i.e., a voice control instruction, such as "Xiao C Xiao C, I want cool light." Alternatively, the control instruction may be issued by the user via a user input interface such as a button or a touch screen.
[0071] Step S12: Determine whether the acquired control instruction is a lighting adjustment instruction.
[0072] After receiving a control instruction, the lighting adjustment device determines whether it is a lighting adjustment instruction, wherein the lighting adjustment instruction includes the target light type. It should be noted that lights can be classified into different types in different ways. The light type can be light color, i.e., categorizing lights by color to obtain different light types, such as red, yellow, green, or cool tones or warm tones. Alternatively, the light type can be light brightness, i.e., categorizing lights by brightness to obtain different light types, such as strong light, natural light, or weak light. Of course, lights can also be classified in other ways to obtain different light types.
[0073] For example, assuming that the control instruction is a voice control instruction "I want red light", since the voice control instruction includes the target light type (red), the voice control instruction is a light adjustment instruction.
[0074] Step S13: If yes, obtain the current user identity type.
[0075] In an embodiment of the present invention, when the acquired control instruction is a light adjustment instruction, the current user identity type is acquired. The method for classifying user identity types can be flexibly configured based on actual needs. For example, users can be classified into three identity types based on age: middle-aged and elderly, young people, and children.
[0076] In some implementations, the lighting adjustment instruction may include user identity type information. Therefore, the lighting adjustment instruction may be parsed to obtain the current user identity type.
[0077] In some embodiments, the type of video currently being played by the target video playback device can be obtained, and the current user identity type can be determined based on the type of video currently being played, wherein the target video playback device can be a video playback device connected to the lighting adjustment device, or a video playback device in the same local area network as the lighting adjustment device (for example, a video playback device connected to the same wifi as the lighting adjustment device, or a video playback device belonging to the same smart home network as the lighting adjustment device). The mapping relationship between the video type and the user identity type can be pre-set. For example, for middle-aged and elderly people, the corresponding video type is health videos; for young people, the corresponding video type is variety shows; for children, the corresponding video type is animation. Assuming that the video playback device currently playing "Pleasant Goat and Big Big Wolf" is connected to the lighting adjustment device, the obtained video type is animation, and therefore the current user identity type is child. In order to achieve more precise control, the type of video currently being played by the target video playback device in the same space as the lighting adjustment device can be obtained.
[0078] Step S14: Determine target light parameters based on the target light type and the current user identity type.
[0079] In this embodiment of the present invention, after obtaining the target light type and the current user identity type, target light parameters are determined based on the target light type and the current user identity type. It should be understood that different light types correspond to different light parameters. For example, if the light type is light color, the light parameters are color parameters; if the light type is light brightness, the light parameters are brightness parameters. Furthermore, different user identity types may correspond to different light parameters for the same light type.
[0080] Step S15: Control the corresponding smart light according to the target light parameters.
[0081] In this embodiment of the present invention, the corresponding smart lights are controlled based on the target lighting parameters. If the lighting adjustment device controls only the smart lights in one area, the lighting adjustment device can control the smart lights in that area based on the target lighting parameters. If the lighting adjustment device controls the smart lights in multiple areas, the lighting device can control the smart lights in the corresponding areas based on the target lighting parameters.
[0082] In some embodiments, the lighting control command can also include a target area (e.g., kitchen, bedroom, bathroom, etc.), and the smart lights corresponding to the target area can be controlled according to the target lighting parameters. For example, assuming the collected voice message is "Xiao C Xiao C, turn the bedroom lights to warm light," after determining the target lighting control parameters based on the above method, the smart lights in the bedroom are controlled according to the target lighting parameters.
[0083] The lighting adjustment method proposed in this embodiment obtains a control instruction; determines whether the obtained control instruction is a lighting adjustment instruction, wherein the lighting adjustment instruction includes a target lighting type; if so, obtains the current user identity type; determines the target lighting parameters based on the target lighting type and the current user identity type, and controls the corresponding smart light according to the target lighting parameters; that is, when adjusting the lighting, not only the lighting adjustment instruction but also the user identity type will be referred to, so that the adjusted lighting effect is more in line with user needs, thereby realizing personalized control and improving user experience.
[0084] Based on the first embodiment, a second embodiment of the lighting adjustment method of the present invention is proposed. In this embodiment, the control instruction is a voice control instruction, that is, the user sends the control instruction to the lighting adjustment device by voice. Figure 3 As shown, before step S11, see Figure 3 As shown, the lighting control method further includes:
[0085] S21: Collect voice information.
[0086] In the embodiments of the present invention, the user can issue a control instruction through voice. Therefore, after the voice control device is started, its built-in voice collection module can collect voice information.
[0087] S22: Obtain the voice text corresponding to the voice information.
[0088] After collecting the voice information, the lighting adjustment device can identify the voice information to obtain the voice text. Alternatively, the lighting adjustment device can send the voice information to the server, and the server can identify the voice information to obtain the voice text, and then the lighting adjustment device obtains the voice text corresponding to the voice information from the server.
[0089] S23: Determine whether there is a preset control keyword in the voice text.
[0090] In order to avoid the collected voice information being noise or normal user chat, in the embodiments of the present invention, it can also be determined whether there is a preset control keyword in the voice text. If so, it indicates that the voice information is a control instruction issued for the lighting device, and proceed to step S24; if not, it indicates that the voice information is invalid voice, and the voice information and the corresponding voice text are discarded. Among them, the control keyword can be flexibly set by the user or developer according to actual needs. For example, if it is "Xiaoc Xiaoc", when the parsed voice text includes "Xiaoc Xiaoc", proceed to step S24.
[0091] S24: If so, determine the voice control instruction based on the voice text.
[0092] When there is a preset control keyword in the voice text, determine the voice control instruction based on the voice text. That is to say, perform semantic parsing on the voice text to obtain the voice control instruction. Among them, the voice text can be segmented in the left-to-right manner for semantic parsing.
[0093] The lighting control method provided in this embodiment collects voice information, obtains the voice text corresponding to the voice information, determines whether there is a preset control keyword in the voice text. If so, determines the voice control instruction based on the voice text, and determines whether the obtained voice control instruction is a lighting adjustment instruction, where the lighting adjustment instruction includes the target lighting type; if so, obtains the current user identity type; determines the target lighting parameters based on the target lighting type and the current user identity type, and controls the corresponding intelligent lamp according to the target lighting parameters. The user can issue a lighting adjustment instruction through voice, which is convenient for the user to control. Moreover, by setting the control keyword, the influence of invalid voice is avoided.
[0094] Based on the second embodiment, the third embodiment of the lighting adjustment method of the present invention is proposed.
[0095] In some embodiments, refer to Figure 4 As shown, when the control instruction is a voice control instruction, the steps of obtaining the current user identity type include:
[0096] S31: Determine whether there is a preset identity keyword in the voice text.
[0097] Before step S31, corresponding identity keywords are set for different identity types. When the acquired voice control instruction is a lighting adjustment instruction, it can be determined whether the preset identity keywords exist in the voice text.
[0098] The preset identity keywords can be flexibly set based on actual needs. In some embodiments, when a user issues a voice control command, if a video playback device in the same space as the lighting adjustment device is playing, the audio from the video playback device will be collected in addition to the user's voice. To account for this, keywords corresponding to videos of interest to users of different identity types can be used as identity keywords. For example, assuming that the identity types include middle-aged and elderly, young people, and children, the middle-aged and elderly usually like to watch health videos. Therefore, words that frequently appear in health videos (such as wolfberry, red dates, foot bath, dehumidification, etc.) and / or the names of health programs (such as "Healthy Way", "Health Hall", "Everyday Health", "Health is Most Important", etc.) can be used as identity keywords corresponding to the middle-aged and elderly; young people usually like to watch variety shows. Therefore, words that frequently appear in variety shows (such as tearing name tags, acupressure board, punishment, duel, pick, etc.) and / or the names of variety shows (such as "Run", "Chinese Restaurant", "Talk Show Conference", etc.) can be used as identity keywords corresponding to the middle-aged; children usually like to watch cartoons. Therefore, words that frequently appear in cartoons (such as Pleasant Goat, Big Bear, Little Bear, Peppa Pig, etc.) and / or the names of cartoons (such as "Peppa Pig", "Boonie Bears", "Pleasant Goat and Big Big Wolf", etc.) can be used as identity keywords corresponding to children.
[0099] The identity keywords may be set by users and / or developers.
[0100] Alternatively, identity keywords can also be extracted from the playback records of the target video playback device. Among them, a user identity type and video type mapping table can be pre-set, and then, from the playback records of the target video playback device, the video playback records corresponding to each user identity type are obtained, and the corresponding keywords are extracted from the video playback records as identity keywords. For example, assuming that in the user identity type and video type mapping table, the video type corresponding to the middle-aged and elderly is a health video, the video type corresponding to the youth is a variety show, and the video type corresponding to the child is a cartoon, the health video playback record, variety show video playback record, and cartoon playback record are obtained from the playback records of the target video playback device respectively, and then, keywords (wherein the keywords can be words and / or video names that frequently appear in the video, etc.) are extracted from the video corresponding to the health playback record as the middle-aged and elderly identity keywords; keywords are extracted from the variety show video playback record as the youth identity keywords, and keywords are extracted from the cartoon playback record as the child identity keywords. For a better understanding, an example is used here to illustrate. Assuming that in the playback records of the target video playback device, health videos include "Healthy Way" (the corresponding keywords are health and disease), variety shows include "Run" (the corresponding keywords are name tag tearing and acupressure pad), and cartoons include "Boonie Bears" (the corresponding keywords are Big Bear, Little Bear, and Bald Qiang) and "Peppa Pig" (the corresponding keywords are Peppa and George). Then the identity types and corresponding identity type keywords can be shown in Table 1.
[0101] Table 1
[0102] Identity Type Identity Type Keywords middle-aged and elderly Health and disease youth Name tag tearing, acupressure board Child Big Bear, Little Bear, Bald Qiang, Peppa Pig, George
[0103] S32: If yes, determine the current user identity type based on the preset identity keyword.
[0104] Because corresponding identity keywords are set for different identity types before step S31, when the preset identity keywords are present in the voice text, the current user's identity type is determined based on the identity keywords present in the voice text. For example, suppose that when collecting voice information, a video playback device in the same space as the device collecting the voice is currently playing "Peppa Pig". The user's voice message is "Little C Little C, I want warm light". The voice text corresponding to the collected voice information is "Little C Little C, Peppa, I want warm light". The mapping relationship between identity type and identity keyword is shown in Table 1. Since the identity keyword "Peppa" is present in the voice text, the current user's identity type is determined to be a child.
[0105] In some embodiments, when the control instruction is a voice control instruction, the step of obtaining the current user identity type may include determining the current user identity type based on the timbre of the voice information. It should be understood that different age groups have different timbre, and therefore, the current user identity type may be determined based on the timbre of the collected voice information.
[0106] The lighting control method provided in this embodiment collects voice information, obtains the voice text corresponding to the voice information, and determines whether there are preset control keywords in the voice text. If so, a voice control instruction is determined based on the voice text, and it is determined whether the voice control instruction is a lighting adjustment instruction. If the voice control instruction is a lighting adjustment instruction, the current user identity type is determined by determining whether there are preset identity keywords in the voice text, or by the timbre of the voice information. This can improve the accuracy of identity recognition.
[0107] Based on the first embodiment, a fourth embodiment of the lighting adjustment method of the present invention is proposed. Step S13 includes searching a preset lighting parameter mapping table for lighting parameters corresponding to the target lighting type and the current user identity type, and using these lighting parameters as target lighting parameters. The preset lighting parameter mapping table includes mappings between lighting types, user identity types, and lighting parameters.
[0108] It should be understood that since the target lighting parameters need to be determined based on the preset lighting parameter mapping table, before the step of searching for the lighting parameters corresponding to the target lighting type and the current user identity type from the preset lighting parameter mapping table as the target lighting parameters, it also includes: setting the lighting parameter mapping table.
[0109] In some implementations, the lighting parameter mapping table can be flexibly set by a user or developer according to actual needs.
[0110] For example, if the light type is a light brightness type and the light parameter is a brightness parameter, since different age groups have different responses to light intensity, the brightness parameter corresponding to each light brightness type can be set based on the sensitivity of different age groups to light brightness to set a light parameter mapping table. For example, assuming that the identity types include middle-aged, elderly, young, and children, and the brightness types include normal light, strong light, and weak light, see Table 2, which is an example of a light parameter mapping table. Since middle-aged and elderly people are not very sensitive to light intensity, in order to ensure clear vision for middle-aged and elderly users, under the same light brightness type, the brightness parameter corresponding to middle-aged and elderly people is higher; because too strong light is not conducive to the development and protection of children's vision, under the same light brightness type, the brightness parameter corresponding to children is the lowest, and different light brightness types have different corresponding brightness parameters, with the brightness parameter corresponding to strong light being higher than the brightness parameter corresponding to normal light, and the brightness parameter corresponding to normal light being higher than the brightness parameter corresponding to weak light; assuming that the target light type is strong light and the current user identity type is young, the target brightness parameter is 450Lx (lux).
[0111] Table 2
[0112]
[0113] If the light type is a light color type and the light parameters are color parameters, since different age groups have different aesthetic preferences for color, a light parameter mapping table can be set based on the light type and user identity type, as well as the preferences corresponding to each user identity type. For example, see Table 3, which shows an example of a light parameter mapping table. For yellow, middle-aged and elderly people may prefer golden yellow, young people may prefer light yellow, and children may prefer bright yellow. For red, middle-aged and elderly people may prefer bright red, young people may prefer wine red, and children may prefer pink. If the current user identity type is child and the target light color type is yellow, the target color parameter is bright yellow.
[0114] Table 3
[0115]
[0116] For example, if the light type is a light color type, the light parameter is a color parameter, and the light color types include warm light and cool light, then the color parameters are set according to different identity types and different light types to create a light parameter mapping table. For example, see Table 4, which shows an example of a light parameter mapping table. Assuming the collected voice message is "Xiao C Xiao C, I want warm light," and the current user type is youth, the target color parameter is pink.
[0117] Table 4
[0118]
[0119] In some embodiments, if the light type is a light color type, the light parameter is a color parameter, see Figure 5 As shown, the steps to set the lighting parameter mapping table include:
[0120] Step S41: according to a preset user identity type-video type mapping table, respectively obtain the video playback records corresponding to each user identity type.
[0121] In an embodiment of the present invention, a user identity type-video type mapping table may be pre-set, and then the video playback records corresponding to each user identity type may be obtained from the target video playback device. The user identity type-video type mapping table includes the video type corresponding to each user identity type.
[0122] For a better understanding, here is an example to illustrate. Assume that in the user identity type-video type mapping table, the video type corresponding to the middle-aged and elderly is health video, the video type corresponding to the young is variety show video, and the video type corresponding to children is cartoon. Then, from the playback records of the target video playback device, the health video playback records, variety show video playback records, and cartoon playback records are obtained respectively.
[0123] Step S42: Obtain corresponding videos according to the video playback records corresponding to each user identity type.
[0124] Obtain the corresponding video based on the video playback record corresponding to each user identity type.
[0125] For example, health videos are obtained based on health video playback records, variety show videos are obtained based on variety show video playback records, and cartoons are obtained based on cartoon playback records.
[0126] Step S43: extracting color elements from the video frames of the videos corresponding to the user identity types as color parameters.
[0127] Color elements are extracted from the video frames corresponding to each user identity type as color parameters.
[0128] Step S44: Determine a lighting parameter mapping table based on the color parameters corresponding to each user identity type, the user identity type, and the preset lighting color type.
[0129] Based on the color parameters corresponding to each user identity type, the user identity type, and the preset light color type, a light parameter mapping table is determined. It should be understood that when setting the light parameter mapping table, the color parameters and the light color type are matched.
[0130] For example, assuming that red and blue are extracted from health videos, yellow and green are extracted from variety shows, and orange and purple are extracted from cartoons, and the preset light color types include warm light and cool light, the set light parameter mapping table is shown in Table 5.
[0131] Table 5
[0132]
[0133] The lighting control method provided in this embodiment searches for lighting parameters corresponding to the target lighting type and the current user identity type from a preset lighting parameter mapping table, and uses these lighting parameters as the target lighting parameters. The preset lighting parameter mapping table includes a mapping relationship between the lighting type, the user identity type, and the lighting parameters, thereby speeding up the determination of the target lighting parameters. Furthermore, because the color parameters are extracted from the video frames of interest to each user identity type, the lighting adjusted based on the color parameters is more in line with the user's aesthetic taste.
[0134] Based on the fourth embodiment, a fifth embodiment of the lighting adjustment method of the present invention is proposed, in which step S43 includes:
[0135] Step 1: Extract color elements from the video frames of the video corresponding to each user identity type.
[0136] Color elements are extracted from the video frames of the video corresponding to each user identity type. It should be understood that the acquired video includes video frames, and color elements are extracted from each video frame.
[0137] For example, color elements are extracted from video frames of health videos corresponding to middle-aged and elderly people, color elements are extracted from video frames of variety shows corresponding to young people, and color elements are extracted from video frames of cartoons corresponding to children.
[0138] Step 2: Determine whether there are color elements in each video frame whose first proportion exceeds a preset first threshold.
[0139] A determination is made as to whether, among the color elements of each video frame corresponding to each user identity type, a color element has a first proportion exceeding a preset first threshold. The first proportion is the ratio of the number of pixels corresponding to the color element in the video frame to the number of pixels in the video frame. The preset first threshold can be flexibly set based on actual needs, for example, 90%.
[0140] Continuing with the above example, assuming the first threshold is 80%, a health video consists of two frames, each with 2000 pixels. The first frame contains two color elements, yellow and red, with 100 pixels corresponding to red and 1900 pixels corresponding to yellow. The second frame contains three colors, black, white, and red, with 300, 500, and 1200 pixels, respectively. In the first frame, the first percentage of yellow is 1900 / 2000 = 95%, exceeding 80%, while the first percentage of red is 5%. In the second frame, the first percentages of black, white, and red are 15%, 25%, and 60%, respectively. Therefore, only the first frame contains yellow, and its first percentage exceeds the preset first threshold. For the processing methods for variety shows and cartoons, please refer to the processing methods for health videos and will not be repeated here.
[0141] Step 3: If yes, use the color element whose first proportion exceeds the preset first threshold as the color parameter.
[0142] If so, the color elements corresponding to the respective user identity types, the color elements whose first proportion exceeds the preset first threshold, are used as color parameters.
[0143] Continuing with the above example, let’s use yellow as the color parameter corresponding to middle-aged and elderly people.
[0144] The lighting control method provided in this embodiment extracts color elements from the video frames corresponding to each user identity type, and uses the color elements whose first proportion exceeds a preset first threshold as color parameters. Since the color parameters are determined based on the video viewed by the user, the lighting subsequently adjusted based on the color parameters is more in line with the user's aesthetic taste.
[0145] Based on the fourth embodiment, a sixth embodiment of the lighting adjustment method of the present invention is proposed, in which step S43 includes:
[0146] Step 1: Extract color elements from the video frames of the video corresponding to each user identity type.
[0147] Color elements are extracted from the video frames of the video corresponding to each user identity type. It should be understood that the acquired video includes video frames, and color elements are extracted from each video frame.
[0148] For example, color elements are extracted from video frames of health videos corresponding to middle-aged and elderly people, color elements are extracted from video frames of variety shows corresponding to young people, and color elements are extracted from video frames of cartoons corresponding to children.
[0149] Step 2: Determine whether there are color elements whose second proportion exceeds a preset second threshold among the color elements corresponding to the video.
[0150] A determination is made as to whether, among the color elements in the video corresponding to each user identity type, a color element has a second proportion exceeding a preset second threshold. The second proportion is the ratio of the number of pixels corresponding to the color element to the number of pixels in the video (i.e., the total number of pixels in the video). The preset second threshold can be flexibly set according to actual needs, for example, 95%.
[0151] Continuing with the above example, assuming the second threshold is 30%, for an animated video consisting of three frames, each containing 1000 pixels, the first frame containing gray and red, with 400 pixels corresponding to gray and 600 pixels corresponding to red. The second frame containing red, white, and blue, with 900, 50, and 50 pixels, respectively. The third frame containing white, blue, and red, with 30, 60, and 950 pixels, respectively. The second percentage of red is (600 + 900 + 950) / 3000 = 81.66%, while the second percentages of gray, white, and blue are 400 / 3000 = 13.3%, (50 + 30) / 3000 = 2.6%, and (50 + 60) / 3000 = 36.6%, respectively. Therefore, only the second proportion of red exceeds the second threshold.
[0152] Step 3: If yes, use the color element whose second proportion exceeds the preset second threshold as the color parameter.
[0153] If so, the color elements corresponding to each user identity type, the color elements whose second proportion exceeds the second threshold value, are used as the color parameters corresponding to the user identity type.
[0154] Continuing with the previous example, let red be the color parameter corresponding to the child.
[0155] The lighting control method provided in this embodiment extracts color elements from the video frames corresponding to each user identity type, and uses the color elements whose second proportion exceeds a preset second threshold as color parameters. Since the color parameters are determined based on the video watched by the user, the lighting subsequently adjusted based on the color parameters is more in line with the user's aesthetic taste.
[0156] In an embodiment of the present invention, based on the above-mentioned light control method, a light adjustment device is provided. Figure 6 , Figure 6 Schematic diagram of the structure of a first embodiment of a light adjustment device according to the present invention, the light adjustment device comprises:
[0157] An instruction acquisition module 60 is used to acquire control instructions;
[0158] A determination module 61 is configured to determine whether the acquired voice control instruction is a light adjustment instruction. The light adjustment instruction includes a target light type.
[0159] The identity acquisition module 62 is configured to obtain the current user identity type if yes.
[0160] The determination module 63 is configured to determine target light parameters based on the target light type and the previous user identity type.
[0161] The control module 64 is used to control the corresponding smart light according to the target light parameters.
[0162] It should be noted that the lighting adjustment device can also implement at least one step of the above lighting adjustment method.
[0163] The above descriptions are merely optional embodiments of the present invention and do not limit the patent scope of the present invention. All equivalent structural transformations made using the contents of the present description and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A lighting adjustment method, characterized in that: Applied to a lighting adjustment device, the lighting adjustment method comprises the following steps: Get control instructions; Determining whether the acquired control instruction is a lighting adjustment instruction, wherein the lighting adjustment instruction includes a target lighting type; If yes, get the current user identity type; Determining target light parameters based on the target light type and the current user identity type; Control the corresponding smart light according to the target light parameters; The step of determining target light control parameters based on the target light type and the current user identity type includes: Finding a lighting parameter corresponding to the target lighting type and the current user identity type from a preset lighting parameter mapping table as the target lighting parameter; the preset lighting parameter mapping table includes a mapping relationship between the lighting type, the user identity type, and the lighting parameter; The light type is a light color type, and the light parameters include color parameters; before the step of searching a preset light parameter mapping table for light parameters corresponding to the target light type and the current user identity type and using the light parameters as the target light parameters, the step further includes: According to a preset user identity type-video type mapping table, respectively obtain the video playback records corresponding to each user identity type; Obtaining corresponding videos according to the video playback records corresponding to each user identity type; Extracting color elements as color parameters from video frames of videos corresponding to each of the user identity types; The lighting parameter mapping table is determined based on the color parameters corresponding to each of the user identity types, the user identity type, and the preset lighting color type.
2. The lighting adjustment method according to claim 1, wherein: The control instruction is a voice control instruction, and before the step of determining whether the acquired control instruction is a lighting control instruction, the method further includes: Collect voice information; Obtaining the voice text corresponding to the voice information; Determining whether there is a preset control keyword in the voice text; If so, determine the voice control instruction based on the voice text.
3. The lighting adjustment method according to claim 2, wherein: The step of obtaining the current user identity type includes: Determining whether there are preset identity keywords in the voice text; if so, determining the current user identity type based on the preset identity keywords; or, The current user identity type is determined based on the timbre of the voice information.
4. The lighting adjustment method according to claim 1, wherein: The step of extracting color elements as color parameters from the video frames of the videos corresponding to the user identity types includes: Extracting color elements from video frames of videos corresponding to each of the user identity types; Determining whether, among the color elements of each of the video frames, there is a color element whose first proportion exceeds a preset first threshold, where the first proportion is a ratio of the number of pixels corresponding to the color element to the number of pixels in the video frame; If so, the color element whose first proportion exceeds a preset first threshold is used as a color parameter.
5. The lighting adjustment method according to claim 1, wherein: The step of extracting color elements as color parameters from the video frames of the videos corresponding to the user identity types includes: Extracting color elements from video frames of videos corresponding to each of the user identity types; Determine whether, among the color elements corresponding to the video, there are color elements whose second proportion exceeds a preset second threshold; the second proportion is a ratio of the number of pixels corresponding to the color element to the number of pixels in the video; If so, the color element whose second proportion exceeds the preset second threshold is used as the color parameter.
6. A lighting adjustment device, characterized in that: The light adjustment device comprises: An instruction acquisition module, used to acquire control instructions; a determination module, configured to determine whether the acquired voice control instruction is a light adjustment instruction, wherein the light adjustment instruction includes a target light type; The identity acquisition module is used to obtain the current user identity type; a determination module, configured to determine target light parameters based on the target light type and the current user identity type; A control module, configured to control a corresponding smart light according to the target light parameters; The determining module is further configured to search a preset lighting parameter mapping table for lighting parameters corresponding to the target lighting type and the current user identity type, as target lighting parameters; the preset lighting parameter mapping table includes a mapping relationship between lighting types, user identity types, and lighting parameters; The light type is a light color type, and the light parameters include color parameters; the light adjustment device is further used to obtain video playback records corresponding to each of the user identity types according to a preset user identity type-video type mapping table; obtain corresponding videos according to the video playback records corresponding to each of the user identity types; extract color elements as color parameters from video frames of the videos corresponding to each of the user identity types; and determine the light parameter mapping table based on the color parameters corresponding to each of the user identity types, the user identity type, and the preset light color type.
7. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a light adjustment program stored in the memory and running on the processor, wherein the light adjustment program implements the steps of the light adjustment method according to any one of claims 1 to 5 when executed by the processor.
8. A storage medium, characterized in that: The storage medium stores a light adjustment program, which, when executed by a processor, implements the steps of the light adjustment method according to any one of claims 1 to 5.
Citation Information
Patent Citations
LED dimming method and system
CN107360654A