CN-122028273-A - Control method for flash lamp and related device
Abstract
The application provides a control method and a related device for a flash lamp, which are used for carrying out double verification on a control instruction generated by an instruction generation model, and can effectively identify and intercept a risk control instruction with invalid instruction name or parameter exceeding a parameter operation interval allowed by equipment, so that various potential problems such as control failure, equipment failure and the like possibly caused by directly executing the control instruction are prevented, and the safety and the executable performance of the generated control instruction are ensured while the interaction convenience is improved by utilizing the instruction generation model.
Inventors
- ZHANG ZHONGEN
- GUI JIANKANG
- KE YAN
- WANG JUN
Assignees
- 深圳市纽尔科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260202
Claims (12)
- 1. A control method for a flash lamp, the method comprising: Responding to interactive operation of a user, and generating a control instruction corresponding to the interactive operation through an instruction generation model; The control instruction is checked according to an instruction judgment library, wherein the instruction judgment library comprises a name head judgment sub-library and a parameter judgment sub-library, the name head judgment sub-library comprises standard name heads respectively corresponding to a plurality of instruction types supported by a flash lamp, and the parameter judgment sub-library comprises parameter operation intervals respectively corresponding to a plurality of standard name heads; And if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library and the parameter of the control instruction meets the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library, controlling the flash lamp based on the control instruction.
- 2. The method according to claim 1, wherein the method further comprises: And if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library and the parameter of the control instruction does not meet the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library, adjusting the control instruction based on the instruction generating model until the adjusted control instruction meets the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library.
- 3. The method of claim 1, wherein verifying the control instruction according to an instruction predicate library comprises: according to the name head judging sub-library of the instruction judging library, carrying out matching verification on the instruction name head of the control instruction; And if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library, carrying out compliance verification on the parameters of the control instruction according to the parameter judging sub-library of the instruction judging library.
- 4. A method according to claim 3, characterized in that the method further comprises: And discarding the control instruction if the instruction name header of the control instruction is not matched with all standard name headers in the name header judging sub-library.
- 5. The method according to claim 1, wherein the method further comprises: Presetting instruction judgment libraries respectively corresponding to the flashlights of various types, wherein each instruction judgment library comprises a name head judgment sub-library and a parameter judgment sub-library which are matched with the parameter range of the flashlights of the corresponding types; The checking the control instruction according to the instruction judgment library comprises the following steps: determining a corresponding target instruction judgment library from a plurality of preset instruction judgment libraries according to the current type of the flash lamp; and checking the control instruction according to the target instruction judgment library.
- 6. The method according to claim 1, wherein the method further comprises: determining a time interval between adjacent interactive operations sent by a user; and if the time interval meets a preset sleep time threshold, controlling the flash lamp to enter a sleep state.
- 7. The method of claim 1, wherein the plurality of command types supported by the flash includes triggering a shutter, triggering focus, entering a lens auto metering mode, entering a manual mode, entering a lens auto metering-to-manual mode, entering a strobe mode.
- 8. The method of any of claims 1-7, wherein the interactive operation of the user is a voice operation and the instruction generation model is a large language model.
- 9. A control device for a flash, the device comprising: a generation unit for responding to the interactive operation of the user and generating a control instruction corresponding to the interactive operation through an instruction generation model; The system comprises a control instruction judging unit, a verification unit and a parameter judging unit, wherein the control instruction is controlled by the control instruction judging unit according to an instruction judging library, the instruction judging library comprises a name head judging sub-library and a parameter judging sub-library, the name head judging sub-library comprises standard name heads respectively corresponding to a plurality of instruction types supported by a flash lamp, and the parameter judging sub-library comprises parameter operation intervals respectively corresponding to a plurality of standard name heads; And the control unit is used for controlling the flash lamp based on the control instruction if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library and the parameter of the control instruction meets the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library.
- 10. An electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor in communication with the memory via the bus when the electronic device is in operation, the machine-readable instructions when executed by the processor performing the method of controlling a flash as claimed in any one of claims 1 to 8.
- 11. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the control method for a flash lamp according to any one of claims 1 to 8.
- 12. A computer program product comprising a computer program which, when run by a processor, performs the control method for a flash lamp according to any one of claims 1 to 8.
Description
Control method for flash lamp and related device Technical Field The application relates to the field of flashlights, in particular to a control method and a related device for a flashlamp. Background The control of conventional flashlights is mainly dependent on manual operation by the user, such as setting parameters directly through physical keys or touch screen interfaces. This approach requires the user to have corresponding expertise and operating experience, and is difficult to achieve fast and flexible complex control. With the rapid development of artificial intelligence technologies such as large language models, flash intelligent control schemes based on natural language interaction begin to appear. The scheme generally converts interaction content input by a user in the form of voice, text and the like into corresponding flash lamp control instructions by means of an instruction generation model, so that an operation threshold is reduced to a certain extent, and the naturalness of interaction is improved. However, since the instruction generation model itself has inherent semantic uncertainty, and in the specialized vertical field of flash lamps, the knowledge base is often incomplete or lacks of targeted training, so that the generated control instruction still has a large risk of inapplicability, if such control instruction is directly executed, the control is invalid due to light weight, and equipment failure or potential safety hazard may be caused due to heavy weight. Disclosure of Invention The application at least provides a control method and a related device for a flash lamp, which are used for carrying out double verification on a control instruction generated by an instruction generation model, and can effectively identify and intercept a risk control instruction with invalid instruction name or parameter exceeding a parameter operation interval allowed by equipment, thereby preventing various potential problems such as control failure, equipment failure and the like possibly caused by directly executing the control instruction, and ensuring the safety and the executable performance of the generated control instruction while improving the interaction convenience by utilizing the instruction generation model. In a first aspect, the present application provides a control method for a flash, the method comprising: Responding to the interactive operation of the user, and generating a control instruction corresponding to the interactive operation through an instruction generation model; the control instruction is checked according to the instruction judging library, wherein the instruction judging library comprises a name head judging sub-library and a parameter judging sub-library, the name head judging sub-library comprises standard name heads respectively corresponding to a plurality of instruction types supported by the flash lamp, and the parameter judging sub-library comprises parameter operation intervals respectively corresponding to the plurality of standard name heads; if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library and the parameter of the control instruction meets the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library, the flash lamp is controlled based on the control instruction. In a second aspect, the present application also provides a control device for a flash, the device comprising: A generation unit for responding to the interactive operation of the user and generating a control instruction corresponding to the interactive operation through an instruction generation model; The system comprises a verification unit, a control unit and a parameter judgment unit, wherein the verification unit is used for verifying a control instruction according to an instruction judgment library, the instruction judgment library comprises a name head judgment sub-library and a parameter judgment sub-library, the name head judgment sub-library comprises standard name heads respectively corresponding to a plurality of instruction types supported by a flash lamp, and the parameter judgment sub-library comprises parameter operation intervals respectively corresponding to a plurality of standard name heads; And the control unit is used for controlling the flash lamp based on the control instruction if the instruction name head of the control instruction is matched with any standard name head in the name head judging sub-library and the parameter of the control instruction meets the parameter operation interval corresponding to the matched standard name head in the parameter judging sub-library. In a third aspect, the application also provides an electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the elec