An adaptive lighting method and device for cutting equipment based on processing status perception

By acquiring the processing status and real-time image quality of the gem cutting machine, and dynamically adjusting the lighting parameters, the problem of the lighting system in gem cutting equipment being unable to be automatically adjusted is solved, improving the observation effect and image quality, and reducing energy consumption.

CN122496961APending Publication Date: 2026-07-31SHENZHEN HIGH PRECISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HIGH PRECISION TECHNOLOGY CO LTD
Filing Date
2026-06-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The lighting systems of existing gemstone cutting equipment cannot automatically adjust with the processing steps, resulting in problems such as improper lighting leading to misjudgment, energy waste, and poor image clarity.

Method used

By acquiring the processing status information and real-time image quality evaluation of the gemstone cutting machine, the lighting parameters are dynamically adjusted to match the current process requirements, and the lighting parameter mapping table is optimized using reinforcement learning algorithms to achieve adaptive lighting.

Benefits of technology

It improves the observation effect and image acquisition quality during the gem cutting process, reduces lighting energy consumption and extends the life of the light source, and adapts to the differences in optical properties of different gem varieties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496961A_ABST
    Figure CN122496961A_ABST
Patent Text Reader

Abstract

This invention provides an adaptive lighting method and apparatus for gem cutting equipment based on processing status perception, comprising: acquiring the current processing status information of the gem cutting machine; matching a preset lighting parameter mapping table to obtain reference lighting parameters corresponding to the current gem processing step identifier; generating a lighting compensation coefficient based on the comparison result; correcting the reference lighting parameters using the lighting compensation coefficient to generate target lighting parameters; listening to the motion control commands of the gem cutting machine, and synchronously sending the target lighting parameters to the lighting device of the gem cutting machine before the start time of the motion control command execution, so as to adjust the brightness, color temperature and flicker frequency output by the lighting device. This invention can upgrade the lighting system of gem cutting equipment from a passive light source to an active perception auxiliary unit, realizing deep collaboration and adaptive evolution of lighting parameters with processing steps, image quality and motion commands.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of gemstone cutting and intelligent lighting control technology, and more specifically, to an adaptive lighting method and device for cutting equipment based on processing status perception. Background Technology

[0002] In gemstone cutting, the lighting system is crucial for operators to observe gem facets, determine cutting angles, identify inclusions, and switch between processes. Traditional gemstone cutting equipment typically uses fixed light sources (such as ring LED lights or halogen lamps), whose brightness, color temperature, and flicker frequency cannot be automatically adjusted according to processing stages and observation needs. Operators must manually adjust the lights based on experience, which is not only inefficient but also makes it difficult to achieve consistent observation results across different processes such as rough grinding, polishing, and quality inspection, easily leading to misjudgments due to inappropriate lighting.

[0003] Furthermore, the existing lighting system is independent of the motion control system of the cutting equipment, often resulting in insufficient lighting during processing, while the lighting remains fully on even when the machine is idle or in standby mode. This leads to unnecessary energy waste and shortened light source lifespan. Additionally, due to the high transparency and high refractive index of gemstones, fixed lighting parameters can easily create localized overexposure or darkness on the gemstone table, resulting in poor image clarity and contrast in the gemstone microscopic vision module, thus affecting the accuracy of automated quality inspection. Summary of the Invention

[0004] This invention aims to overcome the shortcomings of the prior art and provide an adaptive lighting method and device for cutting equipment based on processing status perception. It aims to solve the technical problems in the prior art where the lighting system of a gemstone cutting machine cannot be automatically adjusted with the processing steps, is not synchronized with the equipment movement commands, and has unstable image observation quality.

[0005] In a first aspect, the present invention provides an adaptive lighting method for a cutting device based on processing status perception, the method comprising: Obtain the current processing status information of the gem cutting machine, which includes the current gem processing process identifier and the current gem table image acquired in real time by the gem microscopic vision module; Based on the current gem processing process identifier, a preset lighting parameter mapping table is matched to obtain the reference lighting parameters corresponding to the current gem processing process identifier; Calculate the image quality evaluation index of the current gemstone table image, the image quality evaluation index including sharpness value and contrast value; The sharpness value is compared with a preset sharpness threshold, and the contrast value is compared with a preset contrast threshold. An illumination compensation coefficient is generated based on the comparison results. The reference lighting parameters are corrected using the lighting compensation coefficient to generate the target lighting parameters; Listen to the motion control commands of the gem cutting machine, and before the start time of the execution of the motion control commands, synchronously send the target lighting parameters to the lighting device of the gem cutting machine to adjust the brightness, color temperature and flicker frequency output by the lighting device; After the motion control command is executed, standby lighting parameters are generated and sent to the lighting device to switch the lighting device to a low-power lighting mode.

[0006] Preferably, obtaining the current processing status information of the gemstone cutting machine includes: The stage flag bit issued by the CNC system of the gem cutting machine is read in real time through the communication interface to identify whether the current gem processing process is gem orientation process, rough grinding process, fine grinding process, polishing process or quality inspection process; The gem microscopic vision module is synchronously triggered to capture image frames of the gem facets, which are used as the current gem table image.

[0007] Preferably, the step of matching a preset lighting parameter mapping table with the current gem processing process identifier to obtain the reference lighting parameters corresponding to the current gem processing process identifier includes: If the current gem processing process is identified as the gem orientation process, then the matching reference brightness is 200-400 lumens, the reference color temperature is 5000K-6000K, and the reference flicker frequency is 0Hz. If the current gemstone processing procedure is identified as the rough grinding procedure or the fine grinding procedure, then the matching reference brightness is 500-1000 lumens, the reference color temperature is 4000K-5000K, and the reference flicker frequency is 0Hz. If the current gemstone processing step is identified as the polishing step, then the matching reference brightness is 300-600 lumens, the reference color temperature is 5500K-6500K, and the reference flicker frequency is 0Hz. If the current gemstone processing procedure is identified as the quality inspection procedure, then the matching reference brightness is 600-1200 lumens, the reference color temperature is 6000K-7000K, and the reference strobe frequency is 100Hz-120Hz.

[0008] Preferably, the calculation of the image quality evaluation index for the current gemstone table image includes: The grayscale gradient magnitude of the pixels in the current gem table image is calculated based on the gradient energy function, and the grayscale gradient magnitude of all pixels is accumulated as the sharpness value. Calculate the standard deviation of the grayscale values ​​of all pixels in the current gemstone table image, and use the standard deviation as the contrast value.

[0009] Preferably, the step of comparing the sharpness value with a preset sharpness threshold and comparing the contrast value with a preset contrast threshold, and generating an illumination compensation coefficient based on the comparison result includes: If the sharpness value is lower than the sharpness threshold, a first brightness compensation coefficient is generated, which is used to increase the reference brightness. If the contrast value is lower than the contrast threshold, a first color temperature compensation coefficient is generated, which is used to adjust the reference color temperature towards a cooler color temperature. If the sharpness value is lower than the sharpness threshold and the contrast value is lower than the contrast threshold, then the first brightness compensation coefficient is generated first based on the ratio of the difference in sharpness values, and then the first color temperature compensation coefficient is generated based on the ratio of the difference in contrast values.

[0010] Preferably, the step of monitoring the motion control commands of the gem cutting machine and synchronously sending the target lighting parameters to the lighting device of the gem cutting machine before the start time of the execution of the motion control commands includes: The machine monitors the CNC system of the gem cutting machine in real time for the start command of the grinding disc motor or the start command of the feed axis movement. Within a first preset time window before the rising edge of the grinding wheel motor start command or the feed axis motion start command arrives, the target lighting parameters are encapsulated into a control frame and sent to the driver of the lighting device. When the rising edge of the grinding disc motor start command or the feed axis motion start command arrives, the lighting device has completed the loading of the target lighting parameters.

[0011] Preferably, it further includes: Record the current processing status information, target lighting parameters, and corresponding image quality evaluation indicators generated during each gemstone processing process to form historical adjustment data; Based on the historical adjustment data, a reinforcement learning algorithm is used to optimize the baseline lighting parameters in the lighting parameter mapping table, so that the brightness, color temperature and flicker frequency output by the lighting device can adaptively evolve with the progress of the gemstone cutting process.

[0012] Secondly, the present invention provides an adaptive lighting device for a cutting equipment based on processing status perception, comprising: The current processing status information acquisition module is used to acquire the current processing status information of the gem cutting machine. The current processing status information includes the current gem processing process identifier and the current gem table image acquired in real time by the gem microscopic vision module. The reference lighting parameter acquisition module is used to match a preset lighting parameter mapping table according to the current gem processing process identifier to obtain the reference lighting parameters corresponding to the current gem processing process identifier; The image quality evaluation index calculation module is used to calculate the image quality evaluation index of the current gemstone table image, wherein the image quality evaluation index includes sharpness value and contrast value; The lighting compensation coefficient generation module is used to compare the sharpness value with a preset sharpness threshold and the contrast value with a preset contrast threshold, and generate a lighting compensation coefficient based on the comparison results. The target lighting parameter generation module is used to correct the reference lighting parameters using the lighting compensation coefficient to generate the target lighting parameters; An adjustment module is used to monitor the motion control commands of the gem cutting machine and, before the start time of the execution of the motion control commands, synchronously send the target lighting parameters to the lighting device of the gem cutting machine to adjust the brightness, color temperature and flicker frequency output by the lighting device. The switching module is used to generate standby lighting parameters and send them to the lighting device after the motion control command is executed, so that the lighting device switches to a low-power lighting mode.

[0013] Thirdly, the present invention provides a readable medium including executable instructions, which, when executed by a processor of an electronic device, cause the electronic device to perform any of the methods described in the first aspect.

[0014] Fourthly, the present invention provides an electronic device including a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor performs the method as described in any of the first aspects.

[0015] This invention provides an adaptive lighting method and device for cutting equipment based on processing status perception. It automatically matches optimal brightness, color temperature, and flicker parameters for different processes such as gemstone orientation, rough grinding, fine grinding, polishing, and quality inspection. In particular, the 100-120Hz flicker lighting in the quality inspection process helps observe the gemstone's fire and the dynamic effects of internal inclusions, significantly improving operator comfort and defect identification capabilities. By calculating the sharpness and contrast of the gemstone table image in real time and dynamically compensating for lighting parameters, it effectively solves the problem of overexposure or dark areas on the surface of transparent gemstones, ensuring that the images acquired by the gemstone microscopic vision module always meet the requirements of subsequent quality inspection or automated analysis. Precisely loading lighting parameters before starting the grinding wheel motor or feed axis achieves "on-demand lighting," avoiding ineffective lighting energy consumption and reducing lighting system energy consumption by more than 40% while extending the lifespan of LED light sources. Utilizing reinforcement learning algorithms to continuously optimize the lighting parameter mapping table based on historical processing data, the system can adapt to the differences in optical properties of different gemstone varieties and batches of materials, achieving adaptive evolution and becoming increasingly intelligent with use.

[0016] The further effects of the aforementioned non-conventional preferred method will be explained below in conjunction with specific embodiments. Attached Figure Description

[0017] To more clearly illustrate the embodiments of the present invention or the existing technical solutions, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic diagram of an adaptive lighting method for a cutting device based on processing status perception, provided in an embodiment of the present invention; Figure 2 A schematic diagram of another adaptive lighting method for cutting equipment based on processing status perception provided in an embodiment of the present invention; Figure 3 A schematic diagram illustrating the composition of an adaptive lighting device for a cutting equipment based on processing status perception, provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0020] See Figure 1 The image shows a specific embodiment of an adaptive lighting method for a cutting device based on processing state perception provided by the present invention. In this embodiment, the adaptive lighting method for a cutting device based on processing state perception includes:

[0021] Step 101: Obtain the current processing status information of the gem cutting machine. The current processing status information includes the current gem processing process identifier and the current gem table image acquired in real time by the gem micro vision module. Specifically, the process of obtaining the current processing status information is as follows: The stage flag bit issued by the CNC system of the gem cutting machine is read in real time through a communication interface (e.g., EtherCAT real-time bus, RS485 interface, or Modbus TCP protocol). This stage flag bit is a numerical code corresponding to the current processing step; for example, 0x01 represents the gem orientation step, 0x02 represents the rough grinding step, 0x03 represents the fine grinding step, 0x04 represents the polishing step, and 0x05 represents the quality inspection step. Based on the read stage flag bit value, the current gem processing step is identified as one of the following: gem orientation step, rough grinding step, fine grinding step, polishing step, or quality inspection step.

[0022] Simultaneously, the controller triggers the gem microscopic vision module to capture a frame of image. The gem microscopic vision module is an industrial digital camera installed above or to the side of the gem cutting machine's processing station, with its lens aimed at the surface of the gem to be processed (i.e., the gem facets). Upon receiving the trigger signal, the camera immediately exposes and acquires a frame of gem facet image, which serves as the current gem table image for subsequent image quality analysis.

[0023] Step 102: Based on the current gem processing process identifier, match the preset lighting parameter mapping table to obtain the reference lighting parameters corresponding to the current gem processing process identifier; Furthermore, the lighting parameter mapping table in this embodiment is pre-stored in non-volatile memory (e.g., EEPROM or internal Flash), which establishes a correspondence between process identifiers and reference lighting parameters. The specific matching rules are as follows:

[0024] If the current gemstone processing step is identified as gemstone orientation, the corresponding reference brightness is 200-400 lumens, the reference color temperature is 5000K-6000K, and the reference strobe frequency is 0Hz. Gemstone orientation refers to the stage where the operator or machine determines the principal axis direction, cleavage planes, or optimal cutting angle of the rough gemstone crystal. This stage requires uniform, soft lighting to avoid strong reflections obscuring internal features.

[0025] If the current gemstone processing step is identified as rough grinding or fine grinding, the matching reference brightness is 500-1000 lumens, the reference color temperature is 4000K-5000K, and the reference flicker frequency is 0Hz. Rough grinding and fine grinding stages generate a large amount of chips and dust, requiring high-brightness lighting to clearly see the grinding boundaries.

[0026] If the current gemstone processing step is identified as polishing, the corresponding reference brightness is 300-600 lumens, the reference color temperature is 5500K-6500K, and the reference flicker frequency is 0Hz. The polishing stage requires a medium to high color temperature to determine surface gloss and minor scratches.

[0027] If the current gemstone processing step is marked as a quality inspection step, the corresponding reference brightness is 600-1200 lumens, the reference color temperature is 6000K-7000K, and the reference strobe frequency is 100Hz-120Hz. The quality inspection stage requires high brightness, cool white light, and strobe illumination to utilize the strobe effect of the human eye or camera to observe the gemstone's fire, internal inclusions, and cut symmetry. A strobe frequency of 100Hz-120Hz is higher than the critical flicker frequency of the human eye, will not cause visual fatigue, but can create a "freeze-motion" observation effect on the facets of a gemstone moving at high speeds.

[0028] Step 103: Calculate the image quality evaluation index of the current gemstone table image. The image quality evaluation index includes sharpness value and contrast value. Furthermore, image quality evaluation metrics include sharpness and contrast values. This embodiment uses the following calculation method:

[0029] (a) The calculation process for the sharpness value is as follows: Based on the gradient energy function, the Sobel operator is used to calculate the grayscale gradient magnitudes of the current gem table image in the horizontal (X) and vertical (Y) directions respectively. For each pixel in the image, the square of its gradient magnitude is... ,in and Each pixel The Sobel gradient values ​​in the X and Y directions. The sharpness value is obtained by summing the squared gradient magnitudes of all pixels and then taking the square root. Its expression is:

[0030] , in, The number of rows (height) of the image. The number of columns (width) of the image. Sharpness value. The larger the value, the sharper the image edges and the clearer the gemstone facet details.

[0031] (ii) The calculation process for the contrast value is as follows: Calculate the standard deviation of the grayscale values ​​of all pixels in the current gemstone table image. Assume the image has a total of... The pixel, the The grayscale value of each pixel is The average grayscale value of all pixels is Its expression is:

[0032] , Then contrast value The standard deviation is expressed as: , Contrast value The larger the value, the more dispersed the grayscale distribution of the image and the stronger the contrast between light and dark.

[0033] Step 104: Compare the sharpness value with the preset sharpness threshold and the contrast value with the preset contrast threshold, and generate the illumination compensation coefficient based on the comparison results. Furthermore, the sharpness threshold and contrast threshold are empirical values ​​predetermined through calibration experiments; for example, the sharpness threshold is set to 120 (dimensionless), and the contrast threshold is set to 45 (dimensionless). The specific comparison logic for this step is as follows:

[0034] If the sharpness value is lower than the sharpness threshold, it indicates that the current gemstone table image is blurry (possible causes include insufficient lighting leading to a decrease in the camera's signal-to-noise ratio). In this case, a first brightness compensation coefficient is generated. This first brightness compensation coefficient is used to increase the baseline brightness, and its value is proportional to the sharpness difference. ,in This is the current resolution value. For the sharpness threshold, This is a scaling factor (e.g., 2 lumens / unit).

[0035] If the contrast value is lower than the contrast threshold, it indicates that the current gemstone table image is generally grayish and lacks detail (possible causes include color temperature shift leading to an imbalance in the response of different color channels). In this case, a first color temperature compensation coefficient is generated. This first color temperature compensation coefficient is used to adjust the reference color temperature towards a cooler color temperature, i.e., increasing the color temperature value. Its value is proportional to the contrast difference. ,in This is the current contrast value. The contrast threshold. This is a scaling factor (e.g., 15K / unit).

[0036] If both the sharpness and contrast values ​​are below the sharpness threshold, a first brightness compensation coefficient is generated based on the ratio of the difference in sharpness values, followed by a first color temperature compensation coefficient based on the ratio of the difference in contrast values. This priority is based on the fact that insufficient brightness is the primary cause of image blur; increasing brightness first may naturally improve contrast. If brightness is still insufficient, then the color temperature is adjusted.

[0037] Step 105: Correct the reference lighting parameters using the lighting compensation coefficient to generate the target lighting parameters; Specifically, target brightness = reference brightness + first brightness compensation coefficient (if no brightness compensation coefficient is generated, the compensation coefficient is 0). Target color temperature = reference color temperature + first color temperature compensation coefficient (if no color temperature compensation coefficient is generated, the compensation coefficient is 0). Target flicker frequency = reference flicker frequency. In this embodiment, only the reference flicker frequency of the quality inspection process is a non-zero value (100Hz-120Hz), while the flicker frequency of other processes is 0Hz (i.e., constant-on mode), and the flicker frequency is not included in the compensation correction.

[0038] Step 106: Listen to the motion control command of the gem cutting machine. Before the start of the execution of the motion control command, send the target lighting parameters to the lighting device of the gem cutting machine in a synchronized manner to adjust the brightness, color temperature and flicker frequency of the lighting device output. Furthermore, the motion control command refers to the instruction issued by the motion control system to drive the grinding wheel motor or feed axis of the gemstone cutting machine to begin movement. The specific implementation method of this step is as follows:

[0039] The machine monitors the CNC system of the gem cutting machine for start commands to the grinding wheel motor or the feed axis movement via a real-time bus (such as EtherCAT, CANopen, or Profinet). These commands are represented in hardware as the rising edge of a digital signal.

[0040] Within a first preset time window (e.g., 0.5ms to 1ms) before the rising edge is detected, the target lighting parameters (brightness value, color temperature value, flicker frequency value) are encapsulated into a control frame according to a predefined communication protocol and sent to the LED driver of the lighting device.

[0041] Since the parameter loading time of the LED driver is typically less than 0.5ms, the lighting device has already completed the loading of the target lighting parameters and output stable light when the rising edge of the grinding wheel motor start command or the feed axis motion start command actually arrives. This pre-loading mechanism ensures that the lighting is in place when the machining operation begins, avoiding lighting delay at the moment of start-up.

[0042] Step 107: After the motion control command is executed, generate standby lighting parameters and send them to the lighting device so that the lighting device switches to low-power lighting mode.

[0043] Furthermore, "after the motion control command is executed" refers to the state where the current machining action has ended and there are no subsequent actions. When the CNC system issues a stop command for the grinding wheel motor, or when the sensor detects that the machining pause has exceeded a preset time (e.g., 5 seconds), the controller generates a set of standby lighting parameters. These standby lighting parameters can be a brightness of 50-100 lumens, a color temperature of 3000K (warm white light), and a flicker frequency of 0Hz. After sending these parameters to the LED driver, the power of the lighting device drops to less than 5% of the rated power, thereby achieving energy saving and extending the life of the light source.

[0044] As can be seen from the above technical solution, the beneficial effects of this embodiment are: by using process matching reference lighting and image quality closed-loop feedback, adaptive adjustment of lighting is achieved during gem cutting, which significantly improves the observation effect and image acquisition quality of each process.

[0045] Figure 1 The embodiments shown are merely basic examples of the method of the present invention. Other preferred embodiments of the method can be obtained by making certain optimizations and extensions based on them.

[0046] like Figure 2 The image shows another specific embodiment of the adaptive lighting method for cutting equipment based on processing status perception according to the present invention. This embodiment further describes the method based on the foregoing embodiments, and includes the following steps:

[0047] Step 201: Record the current processing status information, target lighting parameters, and corresponding image quality evaluation indicators generated during each gemstone processing process to form historical adjustment data; Specifically, after each complete gem processing task (from orientation to quality inspection), the controller saves the following data generated during the processing to local non-volatile storage (such as an SD card, EMMC, or a remote server database): Each process is labeled (gemstone orientation, rough grinding, fine grinding, polishing, quality inspection); The system automatically generates target lighting parameters (final actual output brightness, color temperature, and flicker frequency) for each process. The final image quality evaluation metrics (sharpness and contrast values) acquired after stabilization; If the operator manually overrides the lighting parameters through the human-machine interface during the processing (e.g., increases or decreases the brightness from the system's recommended value), the manual intervention value and the image quality index after the intervention will be recorded simultaneously.

[0048] Each processing task generates a record, and multiple records are accumulated to form historical adjustment data.

[0049] Step 202: Based on historical adjustment data, use reinforcement learning algorithm to optimize the baseline lighting parameters in the lighting parameter mapping table, so that the brightness, color temperature and flicker frequency output by the lighting device can adaptively evolve with the progress of the gem cutting process.

[0050] Furthermore, the reinforcement learning algorithm used in this embodiment is the Q-learning algorithm, and its model architecture, training samples, inputs and outputs, and optimization process are as follows: (I) Model Architecture and Environment Definition The lighting control process of a gem cutting machine is modeled as a Markov decision process. The following elements are defined:

[0051] Environment: This includes the actual processing conditions of the gem cutting machine, the type of gem being processed, the current process, and the image quality fed back by the gem microscopic vision module.

[0052] Intelligent agent: The Q-learning algorithm module running in the controller.

[0053] State space: State vector S = {process identifier, sharpness deviation level, contrast deviation level}.

[0054] Action Space: In each state, the agent can choose the action A∈{Increase the reference brightness by +50 lumens, decrease the reference brightness by -50 lumens, increase the reference color temperature by +100K, decrease the reference color temperature by -100K, and keep the current parameters unchanged}.

[0055] Reward function: Calculates a reward based on the final image quality achieved after a processing task is completed. Its expression is: , in, and These are the final, stabilized sharpness and contrast values, respectively. and The target threshold, and This is a weighting coefficient. If the operator intervenes manually and the adjustment exceeds 20%, a penalty is applied. The total reward at this point is .

[0056] (ii) Sources and generation methods of training samples Each historical adjustment data point constitutes a quadruple. ,in This is the state before the adjustment. For the action performed, As a reward value, This is the new state after the adjustment.

[0057] (III) Model Input and Output Input: During the training phase, the input consists of states from historical samples. and actions and corresponding rewards and the next state The input for the inference stage is the current process identifier and the current image quality deviation level.

[0058] Output: The output is the optimal action, which indicates the adjustment to be made to the reference brightness or reference color temperature.

[0059] (iv) Optimization process and convergence conditions The Q-value is updated using the standard update formula of the Q-learning algorithm: , in, The learning rate is set to 0.1. The discount factor is set to 0.9. After each offline training iteration, the updated value will be... The value table is mapped to a new lighting parameter mapping table rule. After multiple iterations (typically 1000-2000 processing tasks), the optimal action in each state is determined. When the rate of change of the value is less than 1%, it is considered that... The value table converged.

[0060] In this embodiment, the reinforcement learning algorithm runs entirely locally on the embedded controller, without relying on cloud computing power, and the training samples are derived from historical data generated by the device itself. Its technical advantage lies in enabling the lighting system to adapt to differences in the optical properties of different batches of gemstone materials (e.g., the difference in optimal lighting color temperature caused by the different refractive indices of Burmese rubies and Mozambique rubies).

[0061] After the Q-learning algorithm iteration and optimization described above, the updated reference lighting parameters (including reference brightness, reference color temperature, and reference flicker frequency) will be permanently written into the corresponding process entry in the lighting parameter mapping table, replacing the original initial empirical values. Subsequently, when the gemstone cutting machine performs the same process again, the controller directly reads the optimized reference lighting parameters from the updated mapping table and generates the target lighting parameters according to the steps of the aforementioned embodiment, driving the lighting device to output the optimized brightness, color temperature, and flicker frequency.

[0062] Specifically, this adaptive evolution is reflected in the following three dimensions: (i) Evolution of Brightness Dimension: If the system discovers in multiple batches that increasing the reference brightness can consistently achieve higher or more stable sharpness values ​​for a certain process (e.g., rough grinding), the Q-learning algorithm will gradually increase the reference brightness for that process (e.g., from the initial 500 lumens to 620 lumens); conversely, if excessive brightness causes local overexposure of the facets and reduces sharpness, the system will gradually decrease the reference brightness. After a sufficient number of iterations, the reference brightness for each process converges to the optimal value suitable for the current gemstone batch.

[0063] (II) Evolution of Color Temperature Dimension: For gemstones with different refractive indices and colors (such as rubies, emeralds, and moissanite), the system learns the optimal observation color temperature through historical data. For example, for dark-colored corundum gemstones, the algorithm tends to shift the reference color temperature of the quality inspection process from 6500K to 7000K cool white light to enhance the contrast of internal inclusions; while for light-colored diamonds or moissanite, the color temperature may be stabilized at 6000K-6200K to avoid color distortion. This evolution means that the color temperature parameter no longer depends on human experience, but is automatically driven by historical image quality feedback.

[0064] (III) Evolution of the Flicker Frequency Dimension: Although the initial flicker frequency of the quality inspection process is set to an intermediate value of 100Hz-120Hz, the flicker frequencies of fire and brilliance vary among different gemstones. The system records the fire and brilliance clarity evaluation indicators measured at different flicker frequencies, and gradually adjusts the benchmark flicker frequency of the quality inspection process through reinforcement learning to match it with the optimal observation frequency for the currently processed gemstone variety. For example, for moissanite with high dispersion, the stabilized flicker frequency may converge to 118Hz; while for quartz with low dispersion, it may converge to 105Hz.

[0065] Furthermore, adaptive evolution employs a "memory and forgetting" mechanism: the system retains the optimization results of the most recent 500 iterations. When a significant change in gemstone type or batch is detected (e.g., the operator inputs a new material type through the human-machine interface), the system can selectively reset or partially retain the learned baseline parameters, avoiding cross-type data interference. Through this mechanism, the brightness, color temperature, and flicker frequency output by the lighting device can truly evolve continuously with the gemstone cutting process, becoming increasingly aligned with actual processing needs over time.

[0066] As can be seen from the above technical solutions, the beneficial effects of this embodiment are: by using reinforcement learning to learn from historical adjustment data, the lighting parameter mapping table continuously evolves with actual processing data, improving the system's adaptability to different gemstone varieties and batches, and reducing the need for manual intervention.

[0067] This invention also provides an adaptive lighting device for cutting equipment based on processing status perception. See also Figure 3The image shows a specific embodiment of an adaptive lighting device for a cutting equipment based on processing status perception provided by the present invention. This embodiment's device is used to perform... Figures 1-2 The physical apparatus of the method. Its technical solution is essentially the same as the above embodiments, and the corresponding descriptions in the above embodiments also apply to this embodiment. The apparatus includes:

[0068] The current processing status information acquisition module 301 is configured to acquire the current processing status information of the gem cutting machine. The current processing status information includes the current gem processing process identifier and the current gem table image acquired in real time by the gem micro vision module. The reference lighting parameter acquisition module 302 is configured to match a preset lighting parameter mapping table with the current gem processing process identifier to obtain the reference lighting parameters corresponding to the current gem processing process identifier. The image quality evaluation index calculation module 303 is configured to calculate the image quality evaluation index of the current gem table image, which includes sharpness value and contrast value. The lighting compensation coefficient generation module 304 is configured to compare the sharpness value with a preset sharpness threshold and the contrast value with a preset contrast threshold, and generate a lighting compensation coefficient based on the comparison results. The target lighting parameter generation module 305 is configured to correct the reference lighting parameters using a lighting compensation coefficient to generate the target lighting parameters; The adjustment module 306 is configured to listen to the motion control commands of the gem cutting machine and send the target lighting parameters to the lighting device of the gem cutting machine synchronously before the start of the execution of the motion control commands, so as to adjust the brightness, color temperature and flicker frequency output by the lighting device. The switching module 307 is configured to generate standby lighting parameters and send them to the lighting device after the motion control command is executed, so that the lighting device switches to a low-power lighting mode.

[0069] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may also include non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for other services.

[0070] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be categorized as address buses, data buses, and other types. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0071] Memory is used to store instructions for execution. Specifically, instructions for execution are computer programs that can be executed. Memory can include main memory and non-volatile memory, and it provides the processor with execution instructions and data.

[0072] In one possible implementation, the processor reads the corresponding execution instructions from non-volatile memory into main memory and then executes them. Alternatively, it may obtain the corresponding execution instructions from other devices to form a cutting equipment adaptive lighting device based on processing state awareness at the logical level. The processor executes the execution instructions stored in the memory to implement the cutting equipment adaptive lighting method based on processing state awareness provided in any embodiment of the present invention.

[0073] The above is as described in the present invention. Figure 3The method for an adaptive lighting device for a cutting equipment based on processing state perception, as provided in the illustrated embodiment, can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed through integrated logic circuits in the processor's hardware or through software instructions. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0074] The steps of the method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0075] This invention also proposes a readable medium storing execution instructions. When these instructions are executed by a processor of an electronic device, the device can perform an adaptive lighting method for a cutting device based on processing state perception, as provided in any embodiment of this invention, specifically for executing, as... Figure 1 , Figure 2 The method shown.

[0076] The electronic devices in the foregoing embodiments may be computers.

[0077] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or computer program products. Therefore, the present invention can be implemented in a completely hardware embodiment, a completely software embodiment, or a combination of software and hardware.

[0078] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0079] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0080] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A cutting device adaptive lighting method based on machining state perception, characterized in that, The method includes: Obtain the current processing status information of the gem cutting machine, which includes the current gem processing process identifier and the current gem table image acquired in real time by the gem microscopic vision module; Based on the current gem processing process identifier, a preset lighting parameter mapping table is matched to obtain the reference lighting parameters corresponding to the current gem processing process identifier; Calculate the image quality evaluation index of the current gemstone table image, the image quality evaluation index including sharpness value and contrast value; The sharpness value is compared with a preset sharpness threshold, and the contrast value is compared with a preset contrast threshold. An illumination compensation coefficient is generated based on the comparison results. The reference lighting parameters are corrected using the lighting compensation coefficient to generate the target lighting parameters; Listen to the motion control commands of the gem cutting machine, and before the start time of the execution of the motion control commands, synchronously send the target lighting parameters to the lighting device of the gem cutting machine to adjust the brightness, color temperature and flicker frequency output by the lighting device; After the motion control command is executed, standby lighting parameters are generated and sent to the lighting device to switch the lighting device to a low-power lighting mode.

2. The method of claim 1, wherein, The acquisition of the current processing status information of the gemstone cutting machine includes: The stage flag bit issued by the CNC system of the gem cutting machine is read in real time through the communication interface to identify whether the current gem processing process is gem orientation process, rough grinding process, fine grinding process, polishing process or quality inspection process; The gem microscopic vision module is synchronously triggered to capture image frames of the gem facets, which are used as the current gem table image.

3. The method of claim 2, wherein, The step of matching the current gem processing process identifier with a preset lighting parameter mapping table to obtain the reference lighting parameters corresponding to the current gem processing process identifier includes: If the current gem processing process is identified as the gem orientation process, then the matching reference brightness is 200-400 lumens, the reference color temperature is 5000K-6000K, and the reference flicker frequency is 0Hz. If the current gemstone processing procedure is identified as the rough grinding procedure or the fine grinding procedure, then the matching reference brightness is 500-1000 lumens, the reference color temperature is 4000K-5000K, and the reference flicker frequency is 0Hz. If the current gemstone processing step is identified as the polishing step, then the matching reference brightness is 300-600 lumens, the reference color temperature is 5500K-6500K, and the reference flicker frequency is 0Hz. If the current gemstone processing procedure is identified as the quality inspection procedure, then the matching reference brightness is 600-1200 lumens, the reference color temperature is 6000K-7000K, and the reference strobe frequency is 100Hz-120Hz.

4. The method of claim 1, wherein, The image quality evaluation metrics for calculating the current gemstone table image include: The grayscale gradient magnitude of the pixels in the current gem table image is calculated based on the gradient energy function, and the grayscale gradient magnitude of all pixels is accumulated as the sharpness value. Calculate the standard deviation of the grayscale values ​​of all pixels in the current gemstone table image, and use the standard deviation as the contrast value.

5. The method of claim 3, wherein, The step of comparing the sharpness value with a preset sharpness threshold and comparing the contrast value with a preset contrast threshold, and generating an illumination compensation coefficient based on the comparison results, includes: If the sharpness value is lower than the sharpness threshold, a first brightness compensation coefficient is generated, which is used to increase the reference brightness. If the contrast value is lower than the contrast threshold, a first color temperature compensation coefficient is generated, which is used to adjust the reference color temperature towards a cooler color temperature. If the sharpness value is lower than the sharpness threshold and the contrast value is lower than the contrast threshold, then the first brightness compensation coefficient is generated first based on the ratio of the difference in sharpness values, and then the first color temperature compensation coefficient is generated based on the ratio of the difference in contrast values.

6. The method of claim 1, wherein, The method of monitoring the motion control commands of the gem cutting machine and synchronously sending the target lighting parameters to the lighting device of the gem cutting machine before the start time of the execution of the motion control commands includes: The machine monitors the CNC system of the gem cutting machine in real time for the start command of the grinding disc motor or the start command of the feed axis movement. Within a first preset time window before the rising edge of the grinding wheel motor start command or the feed axis motion start command arrives, the target lighting parameters are encapsulated into a control frame and sent to the driver of the lighting device. When the rising edge of the grinding disc motor start command or the feed axis motion start command arrives, the lighting device has completed the loading of the target lighting parameters.

7. The method according to any one of claims 1 to 6, characterized in that, Also includes: Record the current processing status information, target lighting parameters, and corresponding image quality evaluation indicators generated during each gemstone processing process to form historical adjustment data; Based on the historical adjustment data, a reinforcement learning algorithm is used to optimize the baseline lighting parameters in the lighting parameter mapping table, so that the brightness, color temperature and flicker frequency output by the lighting device can adaptively evolve with the progress of the gemstone cutting process.

8. An adaptive lighting device for a cutting equipment based on processing status perception, characterized in that, include: The current processing status information acquisition module is used to acquire the current processing status information of the gem cutting machine. The current processing status information includes the current gem processing process identifier and the current gem table image acquired in real time by the gem microscopic vision module. The reference lighting parameter acquisition module is used to match a preset lighting parameter mapping table according to the current gem processing process identifier to obtain the reference lighting parameters corresponding to the current gem processing process identifier; The image quality evaluation index calculation module is used to calculate the image quality evaluation index of the current gemstone table image, wherein the image quality evaluation index includes sharpness value and contrast value; The lighting compensation coefficient generation module is used to compare the sharpness value with a preset sharpness threshold and the contrast value with a preset contrast threshold, and generate a lighting compensation coefficient based on the comparison results. The target lighting parameter generation module is used to correct the reference lighting parameters using the lighting compensation coefficient to generate the target lighting parameters; An adjustment module is used to monitor the motion control commands of the gem cutting machine and, before the start time of the execution of the motion control commands, synchronously send the target lighting parameters to the lighting device of the gem cutting machine to adjust the brightness, color temperature and flicker frequency output by the lighting device. The switching module is used to generate standby lighting parameters and send them to the lighting device after the motion control command is executed, so that the lighting device switches to a low-power lighting mode.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 7.