A method, device and medium for implementing animation effects of a Bluetooth light string

By working together with a graphics plotter and an animation frame generator, the problems of large computational resources and difficulty in changing Bluetooth string light animation effects are solved, and efficient and flexible animation effects are achieved.

CN119997318BActive Publication Date: 2026-05-05AGZZX OPTOELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AGZZX OPTOELECTRONICS TECH CO LTD
Filing Date
2025-01-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing animation effects of Bluetooth light strings require a lot of computing resources, which overloads the device's processor, affecting performance and stability. Furthermore, the animation effects are difficult to change and take a long time to change.

Method used

The system employs a graphics plotter and an animation frame generator to work together. It creates LED bead graphics using preset graphics data and generates animation frame objects based on the animation type to draw the display colors of the LED beads, reducing the need for real-time calculations.

Benefits of technology

It improves the efficiency of animation generation and rendering, reduces the demand for computing resources, achieves smooth and rich animation effects, and allows for flexible and efficient dynamic adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119997318B_ABST
    Figure CN119997318B_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and medium for implementing animation effects in Bluetooth light strings. The method includes the following steps: S1, creating a graphics painter based on preset graphic data, the graphics painter drawing multiple LED bead graphics, the multiple LED bead graphics constituting a light string graphic; S2, creating an animation frame generator based on the animation type, the animation frame generator generating animation frame objects; S3, starting a display thread, the display thread acquiring the animation frame objects and sending the animation frame objects to the graphics painter, the graphics painter drawing the display colors of the multiple LED bead graphics according to the animation frame objects, so that the display view displays the corresponding animation effects and / or controls the Bluetooth light string to display the corresponding lighting effects. This animation effect implementation method has high dynamic adjustment efficiency and high flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of display control technology, and in particular to a method, device, and medium for implementing animation effects in Bluetooth light strings. Background Technology

[0002] Smart Bluetooth string lights are lighting products controlled via Bluetooth technology, widely used in home decoration, stage performances, and festival celebrations. Users can control the string lights using a control program on their terminal device, which displays animated effects on the device and controls the Bluetooth string lights to display the same animations. However, existing Bluetooth string light animations require real-time calculations of the color and position of each LED based on the image and specific motion patterns. When processing complex animations or displaying multiple different animations simultaneously, this requires significant computing resources, overloading the terminal device's processor and causing overheating, lag, and severely impacting performance and stability. Furthermore, adjusting the image or animation effects requires complex recalculations, making changes difficult and time-consuming. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method, device and medium for implementing animation effects of Bluetooth light strings, so as to solve the problems of large computing resources required for existing Bluetooth light string animations and the difficulty of changing animation effects.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for implementing animation effects of Bluetooth light strings, comprising the following steps:

[0005] S1. Create a graphic drawing tool according to preset graphic data. The graphic drawing tool draws multiple LED bead graphics, and the multiple LED bead graphics constitute a light string graphic.

[0006] S2. Create an animation frame generator according to the animation type, and the animation frame generator generates animation frame objects;

[0007] S3. Start the display thread. The display thread obtains the animation frame object and sends the animation frame object to the graphics drawing device. The graphics drawing device draws the display colors of multiple LED bead graphics according to the animation frame object, so that the display view displays the corresponding animation effect and / or controls the Bluetooth light string to display the corresponding lighting effect.

[0008] Furthermore, in step S1, a graphics plotter is created based on preset graphics data, including:

[0009] The drawing format is determined based on preset graphic data. The drawing format includes graphic drawing method and graphic drawing parameters. A graphic drawing tool is created based on the drawing format.

[0010] Furthermore, in step S1, the graphic artist draws multiple LED bead patterns, including: the graphic artist generates an array of LED beads and draws multiple LED bead patterns based on the array of LED beads.

[0011] Furthermore, the preset graphic data includes multiple preset graphic parameters that correspond one-to-one with the multiple LED bead graphics, and the preset graphic parameters include the LED bead position and the LED bead size;

[0012] The graphic drawing tool generates an array of LED beads by: creating an array of LED beads; calculating a scaling factor based on the size of the preset view of the preset graphic and the size of the display view; traversing the preset graphic parameters and generating corresponding LED bead objects based on the scaling factor and the preset graphic parameters, wherein the LED bead objects are stored in the array of LED beads.

[0013] Furthermore, in step S2, creating an animation frame generator based on the animation effect includes: determining the animation type based on the animation effect, and creating an animation frame generator based on the animation type.

[0014] Furthermore, in step S2, the animation frame generator generates an animation frame object, including: calculating the gradient color array of each LED graphic based on the preset color array and the number of LED graphics; creating an animation frame object, configuring animation frame parameters for the animation frame object, and placing the animation frame parameters into a storage frame queue; calculating a refresh cycle, refreshing the animation frame parameters of the animation frame object according to the refresh cycle to generate a new animation frame object, and placing the new animation frame object into the storage frame queue.

[0015] Furthermore, in step S3, the display thread obtains the animation frame object, including: the display thread obtains the animation frame object from the storage frame queue.

[0016] Furthermore, the animation frame object includes at least one of the following: animation type, animation speed, animation direction, and animation graphic density; wherein, the animation graphic density is used to calculate the number of LED graphics that generate motion effects according to the animation frame object.

[0017] Another object of the present invention is to provide an electronic device, comprising: a processor; and a memory storing a computer program configured to, when executed by the processor, implement the above-described animation effect implementation method.

[0018] Another object of the present invention is to provide a computer-readable electronic medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, can realize the above-mentioned animation effect implementation method.

[0019] The beneficial effects of this invention are as follows: The animation effect implementation method provided by this invention uses a graphics plotter to draw the LED bead graphic, and the graphics plotter draws the display color of the LED bead graphic based on the animation frame object generated by the animation frame generator. The graphics plotter and the animation frame generator work in coordination to improve the efficiency of generating and drawing animation frames, so as to present a smooth and rich Bluetooth LED string animation effect. Applying this animation effect implementation method does not require real-time calculation of the color and position of each LED bead, and it requires less computing resources. In addition, the graphics plotter can adjust the image or animation effect by changing parameters without redrawing the entire LED bead graphic. This animation effect implementation method has high dynamic adjustment efficiency and high flexibility. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the steps of the method for achieving animation effects in Bluetooth light strings according to the present invention.

[0021] Figure 2 This is a block diagram of the thread of the animation effect implementation method described in this invention. Detailed Implementation

[0022] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0023] Please refer to Figure 1 as well as Figure 2 A method for implementing animation effects for Bluetooth light strings includes the following steps:

[0024] S1. Create a graphic drawing tool according to preset graphic data. The graphic drawing tool draws multiple LED bead graphics, and the multiple LED bead graphics constitute a light string graphic.

[0025] S2. Create an animation frame generator according to the animation type, and the animation frame generator generates animation frame objects;

[0026] S3. Start the display thread. The display thread obtains the animation frame object and sends the animation frame object to the graphics drawing device. The graphics drawing device draws the display colors of multiple LED bead graphics according to the animation frame object, so that the display view displays the corresponding animation effect and / or controls the Bluetooth light string to display the corresponding lighting effect.

[0027] As can be seen from the above description, the beneficial effects of the present invention are as follows: The animation effect implementation method provided by the present invention uses a graphics plotter to draw the LED bead graphic, and the graphics plotter draws the display color of the LED bead graphic according to the animation frame object generated by the animation frame generator. The graphics plotter and the animation frame generator work in coordination to improve the efficiency of generating and drawing animation frames, so as to present a smooth and rich Bluetooth LED string animation effect. Applying this animation effect implementation method does not require real-time calculation of the color and position of each LED bead, and it requires less computing resources. In addition, the graphics plotter can adjust the graphic or animation effect by changing the parameters without redrawing the entire LED bead graphic. The dynamic adjustment efficiency and flexibility of this animation effect implementation method are high.

[0028] Furthermore, in step S1, a graphics plotter is created based on preset graphics data, including:

[0029] The drawing format is determined based on preset graphic data. The drawing format includes graphic drawing method and graphic drawing parameters. A graphic drawing tool is created based on the drawing format.

[0030] As can be seen from the above description, using different drawing methods and setting different drawing parameters for different preset graphic data can improve the efficiency and accuracy of graphic drawing. The animation effect implementation method provided by this invention generates a graphic drawer based on preset graphic data, which can improve the drawing efficiency and drawing accuracy of the graphic drawer, making the animation effect implementation method more flexible.

[0031] Furthermore, in step S1, the graphic artist draws multiple LED bead patterns, including: the graphic artist generates an array of LED beads and draws multiple LED bead patterns based on the array of LED beads.

[0032] Furthermore, the preset graphic data includes multiple preset graphic parameters that correspond one-to-one with the multiple LED bead graphics, and the preset graphic parameters include the LED bead position and the LED bead size;

[0033] The graphic drawing tool generates an array of LED beads by: creating an array of LED beads; calculating a scaling factor based on the size of the preset view of the preset graphic and the size of the display view; traversing the preset graphic parameters and generating corresponding LED bead objects based on the scaling factor and the preset graphic parameters, wherein the LED bead objects are stored in the array of LED beads.

[0034] As described above, the shape drawer can generate multiple LED bead graphic objects that correspond one-to-one with multiple LED bead graphics based on preset graphic data, and these multiple LED bead graphic objects are stored as an LED bead array. Simply put, the shape drawer acts as the controller for graphic drawing; it is responsible for drawing LED bead graphics based on the graphic objects in the LED bead array, thereby converting abstract graphic parameters into concrete LED bead graphics on the display view, and using multiple LED bead graphics to create the display effect of a Bluetooth light string.

[0035] Furthermore, in step S2, creating an animation frame generator based on the animation effect includes: determining the animation type based on the animation effect, and creating an animation frame generator based on the animation type.

[0036] As described above, different animation types can use different animation generation algorithms and set different animation parameters. The animation type is determined according to the selected animation effect, and an animation frame generator is created according to the animation type. This can ensure the reliability and smoothness of the animation frames generated by the animation frame generator.

[0037] Furthermore, in step S2, the animation frame generator generates an animation frame object, including: calculating the gradient color array of each LED graphic based on the preset color array and the number of LED graphics; creating an animation frame object, configuring animation frame parameters for the animation frame object, and placing the animation frame parameters into a storage frame queue; calculating a refresh cycle, refreshing the animation frame parameters of the animation frame object according to the refresh cycle to generate a new animation frame object, and placing the new animation frame object into the storage frame queue.

[0038] Furthermore, in step S3, the display thread obtains the animation frame object, including: the display thread obtains the animation frame object from the storage frame queue.

[0039] As described above, the animation frame generator puts the animation frame object into the storage frame queue, using the storage frame queue as an intermediate buffer. The display thread retrieves the animation frame object from the storage frame queue, thereby improving the smoothness of the animation effect.

[0040] Furthermore, the animation frame object includes at least one of the following: animation type, animation speed, animation direction, and animation graphic density; wherein, the animation graphic density is used to calculate the number of LED graphics that generate motion effects according to the animation frame object.

[0041] Another object of the present invention is to provide an electronic device, comprising: a processor; and a memory storing a computer program configured to, when executed by the processor, implement the above-described animation effect implementation method.

[0042] Another object of the present invention is to provide a computer-readable electronic medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, can realize the above-mentioned animation effect implementation method.

[0043] Example 1

[0044] Please refer to Figures 1 to 2 Embodiment 1 of the present invention provides a method for implementing animation effects of Bluetooth light strings, which includes the following steps:

[0045] S1. Create a graphic drawing tool according to preset graphic data. The graphic drawing tool draws multiple LED bead graphics, and the multiple LED bead graphics constitute a light string graphic.

[0046] S2. Create an animation frame generator according to the animation type, and the animation frame generator generates animation frame objects;

[0047] S3. Start the display thread. The display thread obtains the animation frame object and sends the animation frame object to the graphics drawing device. The graphics drawing device draws the display colors of multiple LED bead graphics according to the animation frame object, so that the display view displays the corresponding animation effect and / or controls the Bluetooth light string to display the corresponding lighting effect.

[0048] In this embodiment, the animation frame generator runs as an independent thread. It generates animation frame objects based on the number of LED bead graphics and the color requirements of the LED bead graphics, combined with a preset animation effect algorithm. The graphics painter runs in the user interface thread. The graphics painter can first draw multiple LED bead graphics, then obtain the animation frame objects from the display thread, and draw the display colors of multiple LED bead graphics according to the animation frame graphics, so that the display view displays the corresponding LED bead animation effects. The display thread serves to connect the animation frame generator and the graphics painter.

[0049] In step S1 of this embodiment, creating a graphics plotter based on preset graphic data includes: determining a drawing format based on the preset graphic data, wherein the drawing format includes a graphics drawing method and graphics drawing parameters, and creating a graphics plotter based on the drawing format.

[0050] First, the animation effect is determined based on preset graphic data. Different graphic drawing methods and parameters can be selected based on different preset graphic data. The graphic drawer, acting as the controller for graphic drawing, is responsible for transforming abstract graphic parameters into concrete LED graphic displays on the display view.

[0051] In step S1 of this embodiment, the graphic plotter draws multiple LED bead patterns, including: the graphic plotter generates an array of LED beads and draws multiple LED bead patterns based on the array of LED beads.

[0052] Specifically, the preset graphic data includes multiple preset graphic parameters corresponding one-to-one with the multiple LED bead graphics, and the preset graphic parameters include the LED bead position and LED bead size; the graphic drawing device generates an LED bead array, including:

[0053] Create an array of LED beads; calculate a scaling factor based on the size of the preset view of the preset graphic and the size of the display view; iterate through the preset graphic parameters and generate corresponding LED bead objects based on the scaling factor and the preset graphic parameters, and store the LED bead objects in the LED bead array.

[0054] This embodiment can convert preset graphic parameters into LED bead objects suitable for display in the display view based on a scaling factor. The graphics drawer can then draw and display the corresponding LED bead graphics based on these LED bead objects. Specifically, this embodiment can convert the LED bead size of the preset graphic into an LED bead size suitable for the display view, and also convert the LED bead position of the preset graphic into an LED bead position suitable for the display view, based on the scaling factor.

[0055] Accordingly, in step S2 of this embodiment, creating an animation frame generator based on the animation effect includes: determining the animation type based on the animation effect, and creating an animation frame generator based on the animation type.

[0056] Different animation types can use different generation algorithms and set different animation parameters. According to the required animation effect, choose the appropriate animation type, such as flowing animation, flashing animation, combined animation, etc., to ensure the efficiency and success rate of generating animation frame objects.

[0057] The animation frame generator acts as the controller for generating animation frames. It is responsible for generating a series of consecutive animation frame objects based on the preset animation type and animation parameters.

[0058] In step S2 of this embodiment, the animation frame generator generates an animation frame object, including: calculating the gradient color array of each LED graphic based on the preset color array and the number of LED graphics; creating an animation frame object, configuring animation frame parameters for the animation frame object, and placing the animation frame parameters into a storage frame queue; calculating the refresh cycle, refreshing the animation frame parameters of the animation frame object according to the refresh cycle to generate a new animation frame object, and placing the new animation frame object into the storage frame queue.

[0059] An animation frame generator can generate animation frame objects. The animation generator can configure the animation frame object according to parameters such as the number of LED bead graphics, animation type, animation speed, animation direction, animation graphic density, and preset color array. The various parameters stored in the animation frame object can assist the animation frame generator in calculating the animation frame. The animation graphic density is used to calculate the number of LED bead graphics that produce the animation effect based on the animation frame object.

[0060] The animation frame generator can obtain the number of LED graphics it controls based on the number of LED objects in the LED array; the speed, direction, and color list of the animation effect determine the animation form and change pattern of the LED graphics.

[0061] The graphics plotter draws the display color of each LED graphic based on the gradient color array, so that each LED graphic on the display view displays the corresponding light color according to the gradient color array.

[0062] In step S2 of this embodiment, the refresh cycle is calculated based on the speed of the animation, i.e., how many milliseconds are needed to refresh the animation frame object to generate a new animation frame object, and the new animation frame object is placed into the storage frame queue.

[0063] The animation frame object also includes the flow direction of the LED animation. For example, when the LED animation flows in a forward direction, multiple LED objects are numbered sequentially, and the LED objects in the LED array are traversed in reverse order. The color of the (N-1)th LED object is assigned to the Nth LED object. The graphics renderer draws the display color of each LED graphic according to the animation frame object, which enables the LED string to present an animation effect of light flowing in a forward direction.

[0064] In this embodiment, the animation frame generator can also update the frame index of the animation frame object; after sleeping or after all animation frame objects have been read, the animation frame object is refreshed after a corresponding delay, which can achieve a looping animation effect. The animation effect generation provided in this embodiment requires less computational resources to achieve a looping animation effect, and the achieved animation is smoother.

[0065] In step S3 of this embodiment, the display thread obtains the animation frame object, which includes: the display thread obtains the animation frame object from the storage frame queue.

[0066] In this embodiment, the display thread is used to establish a connection between the graphics renderer and the animation frame generator, so that the animation frame object generated by the animation frame generator can be successfully passed to the graphics renderer for drawing.

[0067] Please refer to Figure 2When the animation effect starts under user control, the animation frame generator is first activated. The animation frame generator generates animation frame objects, and its thread runs continuously in the background, constantly generating new animation frame objects according to preset parameters. Simultaneously, the display thread is activated, sending requests to the storage frame queue to retrieve animation frame objects. If the display thread does not obtain data from the storage frame queue, it continues to wait. When the display thread obtains data from the storage frame queue, it retrieves and overflows one animation frame object from the queue and sends it to the graphics renderer. The graphics renderer then uses the animation frame object to draw the display color of the LED bead graphic, enabling the display view to show the corresponding animation effect and / or control the Bluetooth light string to display the corresponding lighting effect.

[0068] In this embodiment, the display thread and the graphics renderer are kept synchronized to ensure that the latest animation frame objects can be obtained and displayed in a timely manner. Therefore, synchronization mechanisms such as semaphores or condition variables can be used between the display thread and the graphics renderer to achieve coordination and synchronization between the display thread and the graphics renderer.

[0069] In this embodiment, the graphics plotter can draw the shape and outline of the LED bead graphic based on the LED bead object by defining a path. The graphics plotter uses mathematical formulas and algorithms to generate the shape of complex LED bead graphics. By defining a path, the shape and outline of the LED bead graphic can be precisely controlled, and the LED bead graphic can be modified dynamically according to requirements, which is highly flexible.

[0070] The animation effect implementation method provided in this embodiment only requires drawing the LED bead graphic by defining a path and generating an animation frame object according to preset animation parameters. It requires very little computing resources. Therefore, applying this animation effect implementation method can efficiently utilize computing resources and reduce the hardware requirements of the device using this animation effect implementation method.

[0071] In this embodiment, the graphics generator and animation frame generator can be extended according to different needs. For example, when it is necessary to support new types of LED bead graphics, corresponding functions can be added to the graphics generator so that the graphics renderer can use new graphics drawing methods or new image drawing parameters to generate new LED bead graphics, ensuring that the shape or outline of the LED bead graphics meets display requirements. However, the animation frame generator can continue to generate animation frame objects based on the existing LED bead array. When it is necessary to add new animation effects, development can be carried out only in the animation generator without affecting the graphics renderer.

[0072] In summary, the animation effect implementation method provided by this invention uses a graphics plotter to draw the LED bead graphics, and the graphics plotter draws the display color of the LED bead graphics based on the animation frame object generated by the animation frame generator. The graphics plotter and the animation frame generator work in coordination to improve the efficiency of generating and drawing animation frames, so as to present a smooth and rich Bluetooth LED string animation effect. Applying this animation effect implementation method does not require real-time calculation of the color and position of each LED bead, and it requires less computing resources. In addition, the graphics plotter can adjust the graphics or animation effect by changing parameters without redrawing the entire LED bead graphics. This animation effect implementation method has high dynamic adjustment efficiency and high flexibility.

[0073] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for implementing animation effects for Bluetooth light strings, characterized in that, Includes the following steps: S1. Create a graphic drawing tool according to preset graphic data. The graphic drawing tool draws multiple LED bead graphics, and the multiple LED bead graphics constitute a light string graphic. S2. Create an animation frame generator according to the animation type, and the animation frame generator generates animation frame objects; S3. Start the display thread. The display thread obtains the animation frame object and sends the animation frame object to the graphics renderer. The graphics renderer draws the display colors of multiple LED bead graphics according to the animation frame object, so that the display view displays the corresponding animation effect and / or controls the Bluetooth light string to display the corresponding lighting effect. In step S2, the animation frame generator generates an animation frame object, including: calculating the gradient color array for each LED bead graphic based on a preset color array and the number of LED bead graphics; creating an animation frame object, configuring animation frame parameters for the animation frame object, and placing the animation frame parameters into a storage frame queue; calculating a refresh cycle, refreshing the animation frame parameters of the animation frame object according to the refresh cycle to generate a new animation frame object, and placing the new animation frame object into the storage frame queue; In step S3, the display thread obtains the animation frame object, including: the display thread obtains the animation frame object from the storage frame queue; It also includes the following steps The animation frame generator updates the frame index of the animation frame object; after a sleep or after all animation frame objects have been read, it refreshes the animation frame object after a corresponding delay.

2. The animation effect implementation method according to claim 1, characterized in that, In step S1, a graphics plotter is created based on preset graphics data, including: The drawing format is determined based on preset graphic data. The drawing format includes graphic drawing method and graphic drawing parameters. A graphic drawing tool is created based on the drawing format.

3. The animation effect implementation method according to claim 1, characterized in that, In step S1, the graphic artist draws multiple LED bead patterns, including: the graphic artist generates an array of LED beads and draws multiple LED bead patterns based on the array of LED beads.

4. The animation effect implementation method according to claim 3, characterized in that, The preset graphic data includes multiple preset graphic parameters that correspond one-to-one with the multiple LED bead graphics, and the preset graphic parameters include the LED bead position and the LED bead size; The graphic drawing tool generates an array of LED beads by: creating an array of LED beads; calculating a scaling factor based on the size of the preset view of the preset graphic and the size of the display view; traversing the preset graphic parameters and generating corresponding LED bead objects based on the scaling factor and the preset graphic parameters, wherein the LED bead objects are stored in the array of LED beads.

5. The animation effect implementation method according to claim 1, characterized in that, In step S2, creating an animation frame generator based on the animation effect includes: determining the animation type based on the animation effect, and creating an animation frame generator based on the animation type.

6. The animation effect implementation method according to claim 1, characterized in that, The animation frame object includes at least one of the following: animation type, animation speed, animation direction, and animation graphic density; wherein, the animation graphic density is used to calculate the number of LED graphics that generate motion effects according to the animation frame object.

7. An electronic device, characterized in that, include: processor; A memory storing a computer program configured to, when executed by the processor, implement the animation effect implementation method according to any one of claims 1-6.

8. A computer-readable electronic medium, characterized in that, The electronic medium is a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the animation effect implementation method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Lamp effect control method, device, equipment and medium

    CN117615492A