Personalized desktop theme generation method and system, storage medium and program product

By taking images on mobile devices and converting them into grayscale images, and combining random algorithms to layout the text input by users, the cumbersome problems of ordinary users when generating personalized desktop themes are solved, efficient and personalized desktop theme generation is achieved, and the visual expression of mobile devices is improved.

CN119888009AActive Publication Date: 2025-04-25SHENZHEN EFERCRO ELECTRONIC TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411941022.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively solve the cumbersome and time-consuming problems of ordinary users when generating personalized desktop themes. Especially for users without professional design experience, it becomes difficult to choose suitable picture materials and adjust parameters, which reduces the efficiency and applicability of personalized desktop theme generation.

Method used

In response to user click action, call the rear camera to take an image and convert it to a grayscale image. The text input by the user is laid out using a preset position array and a color array combined with a random algorithm to make the text appear random on the grayscale image and increase the degree of personalization. Finally, you use Canvas to draw grayscale images and personalized signatures to generate a personalized desktop theme.

Benefits of technology

It realizes that users quickly create unique desktop themes based on real-time photos, which not only retains the visual characteristics of the original image, but also adds artistic effects through random layout and style processing of text, improving the personalization and visual expression of the mobile device desktop interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888009A_ABST
    Figure CN119888009A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized desktop theme generation method and system, a storage medium and a program product, and the method comprises the steps: popping up a confirmation dialog box on a desktop; popping up a camera permission confirmation interface; calling a rear camera of the mobile equipment and controlling the rear camera to shoot an image; the image is loaded through the Bitmap, the saturation degree of the image loaded through the Bitmap is set to be 0 by using ColorMatrix, and a grayscale image is obtained; drawing the grayscale image on another Bitmap, and drawing and inputting characters input by a user by using Paint; adding Random to the value of the preset position array and the value of the preset color array respectively; determining the length of the character, generating a random subscript within the length by using Random, amplifying the random subscript, and adding the amplified random subscript to a preset position of the character to obtain a personalized signature; using Canvas to draw the gray scale picture and the personalized signature to obtain a personalized picture; and setting the personalized picture as a desktop theme of the mobile equipment. According to the method and the device, the efficiency and applicability of personalized desktop theme generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of personalized data processing, and in particular, relates to a personalized desktop theme generation method, system, storage medium and program product. Background Art

[0002] With the rapid development of computer technology, desktop theme personalization has become an important part of user experience. The desktop themes provided by traditional operating systems are often too standardized and single, making it difficult for users to express their personal style and aesthetic preferences through these preset themes. In addition, the theme customization process usually requires users to have certain design capabilities and professional knowledge, which seriously limits the personalized needs of ordinary users for the desktop environment.

[0003] There are some desktop theme customization tools on the market, which allow users to generate personalized themes by providing image materials and adjusting various parameters. Users can upload their favorite pictures and adjust visual elements such as color, layout, font, etc. through the interface provided by the tool to create a desktop theme that suits their personal preferences.

[0004] However, users need to prepare the required image materials in advance, and frequently adjust various parameters manually during the theme generation process, which makes the entire customization process cumbersome and time-consuming. Especially for ordinary users without professional design experience, how to choose the right image materials and make appropriate parameter adjustments often becomes an insurmountable obstacle, reducing the efficiency and applicability of personalized desktop theme generation. Summary of the invention

[0005] The present application provides a personalized desktop theme generation method, system, storage medium and program product, which are used to improve the efficiency and applicability of personalized desktop theme generation.

[0006] In a first aspect, the present application provides a method for generating a personalized desktop theme, in response to a user clicking a preset button on the desktop of a mobile device, a confirmation dialog box pops up on the desktop; In response to the user clicking a confirmation button in the confirmation dialog box, a camera permission confirmation interface pops up; When it is determined that the user clicks to confirm the authorization in the camera permission confirmation interface, calling the rear camera of the mobile device and controlling the rear camera to capture an image; Load the image through Bitmap, and use ColorMatrix to set the saturation of the image loaded through Bitmap to 0 to obtain a grayscale image; Draw the grayscale image on another Bitmap, and use Paint to draw the text entered by the user; Use the values ​​of the preset position array and the preset color array to add Random respectively, so that the text is randomly displayed at any position of the grayscale image and the text is displayed in different colors; Determine the length of the text, and use Random to generate a random subscript within the length, and then enlarge the random subscript and add it to the preset position of the text to obtain a personalized signature; Use Canvas to draw the grayscale image and the personal signature to obtain the personal image; Set your own image as the desktop theme for your mobile device.

[0007] By adopting the above technical solution, the compliance of image acquisition and the protection of user privacy are ensured by responding to user click operations and calling the rear camera to shoot images after permission confirmation. Converting the captured image into a grayscale image can highlight the light and dark levels of the image and provide a clear background basis for subsequent text layout. After the user enters the text, the preset position array and color array are combined with a random algorithm for text layout, so that the position and color of the text on the grayscale image are random, which increases the personalization of the desktop theme. By determining the length of the text and enlarging the random subscript, the personal signature is visually more layered and beautiful. Finally, Canvas is used to draw the grayscale image and the personal signature in a unified manner to ensure the integrity and coordination of the personal image. This personalized desktop theme generation method allows users to quickly create unique desktop themes based on real-time photos, which not only retains the visual features of the original image, but also adds artistic effects through the random layout and style processing of the text, thereby improving the personalization and visual expression of the desktop interface of the mobile device.

[0008] In combination with some embodiments of the first aspect, in some embodiments, the grayscale image is drawn on another Bitmap, and the text input by the user is drawn and input using Paint, specifically including: Resize the grayscale image according to the preset scaling ratio and draw it on another Bitmap; Get the main color of the grayscale image and set the transparency of the Paint used to draw the text based on the main color. Determine the stroke width and shadow parameters of the Paint used to draw the text according to the brightness distribution of the grayscale image; Use the configured Paint to draw the text entered by the user on another Bitmap.

[0009] By adopting the above technical solution, the size of the grayscale image is adjusted by a preset scaling ratio to ensure that the generated desktop theme is adapted to mobile device displays of different sizes. The transparency of the text Paint is set based on the main color tone of the grayscale image to make the fusion of the text and the background image more natural. The stroke width and shadow parameters of the text Paint are determined according to the brightness distribution of the grayscale image, which enhances the readability of the text in different background areas. This drawing method achieves the harmonious unity of the text and the background image through the refined configuration of the text Paint properties, and enhances the overall beauty of the desktop theme. The adaptive text drawing parameter setting ensures that the text can maintain good visibility and aesthetics on background images of different brightness and complexity, improves the practicality and ornamental value of the personalized desktop theme, and also optimizes the user's visual experience.

[0010] In combination with some embodiments of the first aspect, in some embodiments, the values ​​of the preset position array and the values ​​of the preset color array are added to Random, specifically including: Divide the grayscale image into multiple grid areas of equal size; Calculate the image complexity of each grid area and generate a position array that can be used for text display; Analyze the color distribution of grayscale images and establish a color array of complementary color scheme; A random perturbation algorithm is applied to the position array and the color array respectively to generate a text layout scheme, which includes randomly displaying text at any position of the grayscale image and displaying text in different colors.

[0011] By adopting the above technical solution, the grayscale image is divided into multiple grids of equal size and the image complexity of each grid area is calculated, so as to avoid the text appearing in the area with large visual interference. By analyzing the color distribution of the grayscale image and establishing a complementary color scheme, it is ensured that the text color forms a sharp contrast with the background while maintaining the overall color coordination. The random perturbation algorithm is applied to the position array and the color array, which increases the randomness and interest on the basis of ensuring the rationality of the text layout. This text layout scheme based on image analysis not only takes into account the characteristics of the background image, but also introduces randomization processing, so that the generated desktop theme can maintain a high text readability and have a unique artistic effect, which improves the ornamental value and practicality of the desktop theme, and at the same time enhances the user's freshness to the desktop theme.

[0012] In combination with some embodiments of the first aspect, in some embodiments, after setting the personalized picture as the desktop theme of the mobile device, the method further includes: Obtain ambient light sensor data from the mobile device and dynamically adjust the brightness and contrast of the personalized picture based on the ambient light sensor data; Monitor the acceleration sensor data of the mobile device, and trigger the dynamic floating effect of the text when the mobile device is detected to be shaking; Based on the system time of the mobile device, multiple sets of preset text styles and layout schemes are automatically switched at different time periods; Adaptively adjust the rendering complexity and refresh frequency of personalized images according to the power status of the mobile device.

[0013] By adopting the above technical solutions, the brightness and contrast of personalized pictures are dynamically adjusted through ambient light sensor data, so that the desktop theme maintains the best display effect in different lighting environments. The dynamic floating effect of text is triggered based on acceleration sensor data, which adds dynamic visual effects to the desktop theme. The text style and layout scheme are automatically switched according to the system time, so that the desktop theme shows time-related dynamic changes. The rendering complexity and refresh frequency are adaptively adjusted according to the power status of the device, optimizing performance consumption while ensuring visual effects. This multi-sensor data-driven dynamic adjustment mechanism enables the desktop theme to perceive environmental changes and respond adaptively, improving the intelligence of the desktop theme and user experience. At the same time, adaptive performance adjustment ensures stable operation under different device states and enhances the practicality of the system.

[0014] In combination with some embodiments of the first aspect, in some embodiments, dynamically adjusting the brightness and contrast of the personalized picture according to the ambient light sensor data specifically includes: Determine the light intensity value based on the ambient light sensor data; Mapping light intensity values ​​to multiple preset scene modes, including outdoor strong light, indoor standard light and weak light; According to the current scene mode, select a corresponding image enhancement parameter group from the preset parameter library; Adjust the brightness and contrast of the personalized picture according to the image enhancement parameter group.

[0015] By adopting the above technical solution, the light intensity value is obtained through the ambient light sensor, and it is mapped to preset scene modes such as outdoor strong light, indoor standard light and weak light, so as to accurately identify the lighting environment in which the current device is located. Based on the identified scene mode, the system can select an image enhancement parameter group that matches the current scene from the preset parameter library, and accurately adjust the brightness and contrast of the personalized picture accordingly. This adaptive adjustment mechanism based on the real-time lighting environment enables the personalized desktop theme to maintain the best display effect under different lighting conditions, avoiding the problem that the picture is too dark in strong light, making it difficult to distinguish details, or too bright and dazzling in low light environments. By dynamically optimizing the image display parameters, the clarity and readability of the text content is ensured, and the visual layering of the background image is maintained, thereby improving the user's viewing experience of using the desktop theme in various lighting environments.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after monitoring the acceleration sensor data of the mobile device, the method further includes: Acquire the three-axis data of the acceleration sensor, and perform noise reduction and smoothing on the three-axis data to obtain the effective acceleration value; Calculate the initial speed and direction of the floating text according to the effective acceleration value, and generate the motion trajectory in combination with the preset gravity parameters; Add a damping effect based on the motion trajectory to gradually slow down the text movement until it stops; Record the collision position information during text movement, and trigger rebound effects and particle effects when colliding.

[0017] By adopting the above technical solution, the accurate effective acceleration value is obtained by noise reduction and smoothing of the three-axis data of the acceleration sensor, and the initial speed and direction of the floating text are calculated based on this, and then the complete motion trajectory is generated in combination with the preset gravity parameters. By introducing the damping effect in the motion trajectory, the movement of the text shows a natural deceleration process until it stops, simulating the physical motion laws in the real world. The system also records the collision position information during the movement of the text, triggers the rebound effect and particle effects when the collision occurs, making the movement of the text richer and more vivid. This interactive effect design based on the physics engine gives the desktop theme real physical response characteristics, enhances the fun and interactivity of the interface, and brings users a more immersive experience.

[0018] In combination with some embodiments of the first aspect, in some embodiments, calculating the initial speed and initial direction of the floating text according to the effective acceleration value specifically includes: Decompose the effective acceleration value into horizontal and vertical components to obtain the acceleration values ​​of the X-axis and Y-axis; Calculate the magnitude and direction angle of the synthetic acceleration based on the acceleration values ​​of the X-axis and the Y-axis; Based on the magnitude of the synthetic acceleration and the preset speed conversion coefficient, the initial speed of the text is calculated; Use the direction angle as a reference to calculate the initial direction of the text floating.

[0019] By adopting the above technical solution, the effective acceleration value is decomposed into horizontal and vertical components to obtain the precise acceleration values ​​of the X-axis and Y-axis, and the magnitude and direction angle of the composite acceleration are calculated. Based on the magnitude of the composite acceleration, the accurate initial speed of the text is calculated in combination with the preset speed conversion coefficient, and the direction angle is used as a reference to determine the initial direction of the text floating. This precise motion parameter calculation method enables the system to accurately convert the shaking intensity and direction of the device into the motion state of the text, ensuring the correspondence between the interactive effect and the user operation. By establishing a precise mapping relationship between the device shaking and the text movement, the controllability and stability of the interactive effect are improved, so that the floating animation of the text not only meets the user's operational expectations, but also has a smooth and natural visual performance.

[0020] In a second aspect, an embodiment of the present application provides a personalized desktop theme generation system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a system, causes the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a system, the system executes the method described in any possible implementation manner in the first aspect.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. This application provides a method for generating a personalized desktop theme. By responding to user click operations and calling the rear camera to capture images after permission confirmation, the compliance of image acquisition and the protection of user privacy are ensured. Converting the captured image to a grayscale image can highlight the light and dark levels of the image and provide a clear background basis for subsequent text layout. After the user enters the text, the preset position array and color array are combined with a random algorithm for text layout, so that the position and color of the text on the grayscale image are random, which increases the personalization of the desktop theme. By determining the length of the text and enlarging the random subscript, the personal signature is visually more layered and beautiful. Finally, Canvas is used to draw the grayscale image and the personal signature in a unified manner to ensure the integrity and coordination of the personal image. This method for generating a personalized desktop theme allows users to quickly create a unique desktop theme based on real-time photos, which not only retains the visual features of the original image, but also adds artistic effects through the random layout and style processing of the text, thereby improving the personalization and visual expression of the desktop interface of the mobile device.

[0024] 2. The present application provides a method for generating personalized desktop themes, which dynamically adjusts the brightness and contrast of personalized pictures through ambient light sensor data, so that the desktop theme maintains the best display effect in different lighting environments. The dynamic floating effect of text is triggered based on acceleration sensor data, which adds a dynamic visual effect to the desktop theme. The text style and layout scheme are automatically switched according to the system time, so that the desktop theme shows time-related dynamic changes. The rendering complexity and refresh frequency are adaptively adjusted according to the power status of the device, optimizing performance consumption while ensuring visual effects. This multi-sensor data-driven dynamic adjustment mechanism enables the desktop theme to have the ability to perceive environmental changes and respond adaptively, which improves the intelligence of the desktop theme and user experience. At the same time, it ensures stable operation under different device states through adaptive performance adjustment, enhancing the practicality of the system.

[0025] 3. The present application provides a method for generating a personalized desktop theme. By performing noise reduction and smoothing on the three-axis data of the acceleration sensor, an accurate effective acceleration value is obtained, and the initial speed and direction of the floating text are calculated based on this value, and then a complete motion trajectory is generated in combination with the preset gravity parameters. By introducing a damping effect in the motion trajectory, the movement of the text shows a natural deceleration process until it stops, simulating the physical motion laws in the real world. The system also records the collision position information during the movement of the text, triggers rebound effects and particle effects when a collision occurs, and makes the movement of the text more rich and vivid. This interactive effect design based on a physical engine gives the desktop theme real physical response characteristics, enhances the fun and interactivity of the interface, and brings a more immersive user experience to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a method for generating a personalized desktop theme in an embodiment of the present application.

[0027] Figure 2 It is a flow chart of an adaptive optimization method based on device sensor data in an embodiment of the present application.

[0028] Figure 3 It is a schematic diagram of the physical device structure of a personalized desktop theme generation system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0031] The following uses an embodiment and combines Figure 1 , a method for generating a personalized desktop theme in an embodiment of the present application is described: See also Figure 1 , which is a flow chart of a method for generating a personalized desktop theme in an embodiment of the present application.

[0032] S101, in response to a user clicking a preset button on the desktop of a mobile device, a confirmation dialog box pops up on the desktop; The system presets a button on the desktop of the mobile device. When it detects that the user clicks the preset button, the system can pop up a confirmation dialog box on the desktop. The confirmation dialog box is used to confirm with the user whether to perform the subsequent personalized desktop theme generation operation.

[0033] The system can display a floating button on the desktop of the mobile device or set a fixed button at a certain position on the desktop. The system monitors the click event of the button. When a click event is detected, the system calls the dialog component and pops up a confirmation dialog on the desktop. The confirmation dialog can contain text descriptions and confirmation and cancel buttons for the user to choose whether to continue the personalized desktop theme generation operation.

[0034] Considering the usage habits of different users, buttons in fixed positions may be difficult for users to find and click. To solve this problem, the system can provide the function of customizing button positions, allowing users to place preset buttons anywhere on the desktop according to their own habits. In addition, the system can also provide gesture triggering methods. Users can trigger the generation of personalized desktop themes through specific gesture operations (such as double-clicking, long pressing, etc.), instead of button clicking, to improve the user experience.

[0035] S102, in response to the user clicking a confirmation button in a confirmation dialog box, a camera permission confirmation interface pops up; When the user clicks the confirmation button in the confirmation dialog box, it means that the user agrees to generate a personalized desktop theme. Since the subsequent steps require the use of the mobile device's camera to capture images, the system needs to apply for camera permissions from the user first. In response to the user's confirmation operation, the system pops up a camera permission confirmation interface, asking the user whether to allow the system to access and use the camera.

[0036] The system monitors the click event of the confirmation button in the confirmation dialog box. When the event occurs, the system calls the camera permission management module to check whether the application has been granted camera permission. If the application does not have camera permission, the system pops up the camera permission confirmation interface, which contains instructions and allow / reject buttons. The user can choose whether to grant camera permission, and the system performs subsequent processing based on the user's choice.

[0037] Some users may be sensitive to privacy and security and are unwilling to grant camera permissions. To address this issue, the system can explain in detail the purpose of the required permissions when requesting permissions and promise that they will not be used for other purposes to enhance user trust. In addition, the system can also provide alternatives, such as allowing users to select pictures from the album instead of taking them through the camera, giving users more choices and control.

[0038] S103, when it is determined that the user clicks to confirm the authorization in the camera permission confirmation interface, calling the rear camera of the mobile device and controlling the rear camera to capture an image; The system determines the user's operation in the camera permission confirmation interface. If the user clicks the Confirm Authorization button, it means that the user agrees to the system's access and use of the camera. At this time, the system calls the camera hardware of the mobile device, specifically the rear camera (the camera on the same side as the screen), and sends a photo command to control the rear camera to take an image.

[0039] The system accesses the camera hardware of the mobile device through the system API or camera SDK, and selects the appropriate calling method according to the device model and system version. When calling the rear camera, you can pass in shooting parameters such as resolution, exposure, focus mode, etc. to control the shooting effect. After shooting, the system obtains the image data from the camera hardware, which can be in Raw format or JPEG format, and saves the image data to memory or local storage for subsequent processing.

[0040] When the camera is called to shoot, the image quality may be poor due to insufficient ambient light. To solve this problem, the system can automatically detect the ambient light intensity before shooting. If the light is insufficient, the flash can be used to assist shooting, or the user can be prompted to turn on the flash manually. In addition, the system can also use the night shooting mode to increase the exposure time and ISO sensitivity to capture images with better brightness and clarity even in low light conditions.

[0041] S104, loading an image through Bitmap, and using ColorMatrix to set the saturation of the image loaded through Bitmap to 0, thereby obtaining a grayscale image; The system loads the image captured in step S103, specifically by loading the image data through a Bitmap object. After loading, the system uses a ColorMatrix object to process the image, and by setting the saturation parameter of the ColorMatrix to 0, removes the color information in the image and converts the image into a grayscale image. Each pixel in a grayscale image contains only brightness information, but no chromaticity information.

[0042] Create a Bitmap object and load the image data into the Bitmap through the Bitmap decoding method (such as decodeByteArray, decodeFile, etc.). Then create a ColorMatrix object, set the saturation parameter of the ColorMatrix to 0, and use the default values ​​for other parameters. Create a Paint object and set the ColorMatrix object to the ColorFilter property of the Paint. Finally, use the drawBitmap method of the Canvas to draw the original Bitmap into a new Bitmap object, and apply the Paint object with the ColorMatrix set to get the decolored grayscale image.

[0043] If the saturation parameter is directly set to 0, the brightness of the grayscale image may be uneven, affecting the visual effect. To solve this problem, the system can adjust the brightness and contrast of the image after converting it to a grayscale image. For example, the system can calculate the brightness histogram of the image, and automatically adjust the brightness range of the image according to the distribution of the histogram, increase the contrast, and make the image brightness distribution more balanced, the grayscale levels richer, and the visual effect better. Adjusting the brightness and contrast can be achieved using other parameters of ColorMatrix, or using a special image enhancement algorithm.

[0044] S105, drawing the grayscale image on another Bitmap, and inputting the text input by the user using Paint; The system draws the grayscale image on another Bitmap and uses Paint to draw the text input by the user. Specifically: the grayscale image is resized according to the preset scaling ratio and then drawn on another Bitmap; Get the main color of the grayscale image and set the transparency of the Paint used to draw the text based on the main color. Determine the stroke width and shadow parameters of the Paint used to draw the text according to the brightness distribution of the grayscale image; Use the configured Paint to draw the text entered by the user on another Bitmap.

[0045] The system creates a new Bitmap object as the drawing target. Then the grayscale image obtained in step S104 is drawn onto the new Bitmap as the background image. Then the system obtains the text content input by the user, creates a Paint object, sets various properties of the Paint such as font, size, color, etc., and then uses the Paint to draw the text onto the background image, obtaining a new image containing the background image and the text.

[0046] Create a blank Bitmap object of the same size as the grayscale image, and then use the drawBitmap method of Canvas to draw the grayscale image onto this blank Bitmap. Then create a Paint object and set the font size, font color, font style and other properties of Paint. Get the text content entered by the user through the interface, and use the drawText method of Canvas to draw the text onto the background image. When drawing text, you can specify parameters such as the starting coordinates and alignment of the text to control the position and arrangement of the text in the image.

[0047] The text entered by the user may be long, and drawing it directly on the image will exceed the image range or overlap and block it. To solve this problem, the system can automatically wrap the text content before drawing the text. According to the width of the background image and the font size of the text, the number of characters that can be accommodated in each line is calculated, and line breaks are automatically inserted at the appropriate position to display the long text in multiple lines. In addition, the system can also automatically adjust the color and size of the text according to the content of the background image, so that the text can be clearly read under different backgrounds. For example, for a darker background image, a brighter text color can be used; for a brighter background image, a darker text color can be used. The text size can also be automatically adjusted according to the complexity of the background image. These adaptive adjustments can further enhance the visual effect of the image.

[0048] S106, adding Random to the value of the preset position array and the value of the preset color array respectively; The system uses the value of the preset position array and the value of the preset color array plus Random respectively, so that the text is randomly displayed at any position of the grayscale image and the text is displayed in different colors. Specifically: the grayscale image is divided into multiple grid areas of equal size; Calculate the image complexity of each grid area and generate a position array that can be used for text display; Analyze the color distribution of grayscale images and establish a color array of complementary color scheme; A random perturbation algorithm is applied to the position array and the color array respectively to generate a text layout scheme, which includes randomly displaying text at any position of the grayscale image and displaying text in different colors.

[0049] The system predefines a position array and a color array, which are used to control the display position and color of text in the image respectively. When drawing text, the system randomly selects a position from the position array as the starting coordinate of the text, and randomly selects a color from the color array as the display color of the text. Adding Random means adding a random offset to the preset array value to achieve more diverse display effects.

[0050] The preset position array can contain multiple coordinate points, each of which represents a possible text display position. The preset color array can contain multiple color values, each of which represents a possible text display color. When drawing each text, the system generates a random number through the Random class, and uses this random number as an index to select values ​​from the position array and color array. The selected position value and color value are not used directly, but a smaller random offset is added to stagger the display position and color of different texts. The system draws the text to the corresponding position of the background image based on the Paint object with the position and color set.

[0051] Completely random position and color selection may lead to overlapping text or inconsistent color matching. To solve this problem, the system can add some constraints on the basis of random selection. For example, for the selection of position, the system can detect the distance between different texts to ensure that there is no overlap or occlusion between texts. For the selection of color, the system can select a coordinated color combination based on the principle of color matching, from the perspectives of complementary colors and adjacent colors. In addition, the system can also analyze the main color of the background image, and automatically select the text color that matches it according to the main color to further enhance the overall visual effect. These intelligent constraints and optimizations can ensure display diversity while avoiding poor display quality.

[0052] S107, determining the length of the text, and using Random to generate a random subscript within the length, and then enlarging the random subscript and adding it to the preset position of the text to obtain a personalized signature; The system first determines the length of the text input by the user, that is, the number of characters. Then the system uses the Random class to generate a random integer between 0 and the text length - 1 as the subscript of the selected character. The system enlarges this random subscript, that is, multiplying it by a preset enlargement factor to obtain an enlarged offset. Finally, the system adds this offset to the preset position of the text as the display position of the selected character, draws the selected character on the image, and forms a personalized signature effect.

[0053] Use the string's length method to get the length of the text content, and use Random's nextInt method to generate a random integer within the specified range. The magnification factor can be dynamically calculated based on the image size and text length to ensure that the offset after magnification does not exceed the image range. Multiply the random subscript by the magnification factor, and add the coordinate value of the preset position of the text to get the actual display coordinates of the selected character. Based on the calculated coordinates, use Canvas's drawText method to draw the selected character, and other characters are drawn using the default coordinates and colors.

[0054] Randomly selected character subscripts may result in unclear signature effects or inappropriate positions. To solve this problem, the system can adopt a more intelligent character selection strategy. For example, the system can perform semantic analysis on the text content, identify keywords, and give priority to characters in the keywords as signatures. At the same time, the system can also automatically adjust the magnification factor and character spacing according to the length of the text and the size of the image to ensure that the signature is visually prominent and coordinated. In addition, considering the user's aesthetic preferences, the system can provide a variety of signature templates, each of which defines different character selection and arrangement methods, and users can freely choose their favorite templates. These optimizations can generate more beautiful and personalized signature effects.

[0055] S108. Use Canvas to draw the grayscale image and the personal signature to obtain a personal image, and set the personal image as the desktop theme of the mobile device.

[0056] The system creates a new blank image as the final output image, with the same size as the background grayscale image. The system then uses the Canvas object to draw the background grayscale image onto the output image, and then draws the personal signature onto the output image. Both are drawn according to the previously calculated position and color parameters to form a combined image containing the background image and the personal signature, i.e., the personal image. Finally, the system calls the system API of the mobile device to set the generated personal image as the desktop background image of the mobile device, i.e., the desktop theme.

[0057] Create a blank Bitmap object of the same size as the background grayscale image as the final output image. Then create a Canvas object and pass the Bitmap object of the output image to the Canvas constructor. Call the drawBitmap method of Canvas to draw the background grayscale image onto the output image. Next, for each text, call the drawText method of Canvas according to the position and color parameters calculated previously to draw the text to the corresponding position of the output image. After drawing is completed, save the output image as a picture file in PNG or JPEG format. Finally, call the setBitmap or setStream method of WallpaperManager to set the personalized picture as the desktop wallpaper.

[0058] The generation of personalized pictures requires a certain amount of time and memory, which may cause freezes or insufficient memory on low-end devices. To solve this problem, the system can adopt some optimization measures. For example, during the drawing process, try to reuse existing Bitmap objects and avoid frequent creation and destruction of Bitmaps to reduce memory usage. When drawing text, you can first draw all the text to a temporary Bitmap, and then draw the temporary Bitmap to the output image at one time to reduce the number of drawing times and time overhead. If necessary, you can also consider asynchronously generating personalized pictures in the background thread to avoid blocking the main thread and affecting the user experience.

[0059] In addition, since personalized pictures are frequently set as desktop backgrounds, you need to pay attention to the size and format of the picture files. Too large picture files will take up more storage space and affect system performance. Therefore, when saving personalized pictures, you can appropriately scale and compress the pictures according to the actual resolution of the device screen to minimize the file size while ensuring display quality.

[0060] In the above embodiment, by responding to the user's click operation and calling the rear camera to shoot the image after the permission is confirmed, the compliance of image acquisition and the protection of user privacy are ensured. The captured image is converted into a grayscale image, which can highlight the light and dark levels of the image and provide a clear background basis for the subsequent text layout. After the user enters the text, the preset position array and color array are combined with a random algorithm for text layout, so that the position and color of the text on the grayscale image are random, which increases the personalization of the desktop theme. By determining the length of the text and enlarging the random subscript, the personal signature is visually more layered and beautiful. Finally, Canvas is used to draw the grayscale image and the personal signature in a unified manner to ensure the integrity and coordination of the personal image. This personalized desktop theme generation method allows users to quickly create unique desktop themes based on real-time photos, which not only retains the visual features of the original image, but also adds artistic effects through the random layout and style processing of the text, thereby improving the personalization and visual expression of the desktop interface of the mobile device.

[0061] In order to further improve the display effect and interactive experience of personalized desktop themes, the embodiment of the present application also provides an adaptive optimization method based on device sensor data. After completing the generation and setting of personalized desktop themes, the method dynamically adjusts the display parameters and interactive effects of the desktop themes by real-time monitoring and responding to various sensor data of the mobile device, so that the personalized desktop themes can better adapt to different usage scenarios and device states. Figure 2 , an adaptive optimization method based on device sensor data in an embodiment of the present application is described: See also Figure 2, which is a flow chart of an adaptive optimization method based on device sensor data in an embodiment of the present application.

[0062] S201, obtaining ambient light sensor data of a mobile device, and dynamically adjusting the brightness and contrast of a personalized picture according to the ambient light sensor data; The system obtains ambient light sensor data of the mobile device and dynamically adjusts the brightness and contrast of the personalized picture according to the ambient light sensor data. Specifically: the light intensity value is determined according to the ambient light sensor data; Mapping light intensity values ​​to multiple preset scene modes, including outdoor strong light, indoor standard light and weak light; According to the current scene mode, select a corresponding image enhancement parameter group from the preset parameter library; Adjust the brightness and contrast of the personalized picture according to the image enhancement parameter group.

[0063] The system obtains the light intensity data collected in real time by the ambient light sensor of the mobile device, and dynamically adjusts the brightness and contrast parameters of the personalized picture according to the changes in light intensity, so that the visual effect of the picture can adapt to different lighting environments. Specifically, the system compares the light intensity value collected by the ambient light sensor with multiple preset light thresholds to determine the scene mode of the current lighting environment. The scene mode can include a variety of situations such as strong outdoor light, standard indoor light, and weak light. The system pre-sets a set of image enhancement parameters corresponding to different scene modes, including brightness adjustment coefficients and contrast adjustment coefficients. After determining the scene mode of the current lighting environment, the system retrieves the corresponding image enhancement parameter group from the parameter library, and adjusts the brightness and contrast of the personalized picture accordingly to generate a picture display effect that adapts to the current lighting environment.

[0064] In addition to obtaining ambient light sensor data, the system can also obtain other sensor data of the mobile device, such as distance sensor data, and conduct a comprehensive analysis of the data of multiple sensors to more accurately determine the lighting environment of the device. For example, when the ambient light sensor detects that the light intensity is low, but the distance sensor detects that the device is in a handheld state, the system can determine that the user is in a dimly lit room. At this time, the overall brightness of the personalized picture can be appropriately increased to obtain a better viewing experience. When it is difficult to directly determine the scene mode based on the comprehensive sensor data, the system can also use machine learning algorithms to analyze and model various types of sensor data, automatically learn and summarize the rules for determining scene modes, and intelligently judge and adapt the current scene based on the learned rules.

[0065] A potential technical problem in achieving adaptive adjustment of personalized pictures in complex and changeable lighting environments is how to avoid frequent fluctuations in picture parameters and the resulting flickering discomfort. To address this issue, the system can use a smooth transition method and set a buffer time when adjusting picture parameters to allow changes in picture brightness and contrast to transition smoothly within a certain period of time to avoid drastic visual changes. At the same time, the system can also set a threshold for changes in light intensity, triggering the adjustment of picture parameters only when the amplitude of light changes exceeds a certain range. The system can achieve progressive adaptive adjustment of the brightness and contrast of personalized pictures through smoothing algorithms and threshold control, reduce visual mutations, and improve user perception.

[0066] S202, monitoring the acceleration sensor data of the mobile device, and triggering the dynamic floating effect of the text when the mobile device is detected to be shaking; The system monitors the mobile device's acceleration sensor data in real time to determine whether the device is in a shaking state. When the sensor data shows that the device has a certain shaking amplitude, the system triggers the floating animation effect of the text on the personalized desktop, making the text appear to float in sync with the movement of the device during the shaking, enhancing the dynamic interactive experience of the desktop.

[0067] To achieve the floating effect of text, the system needs to analyze the direction and amplitude of the shaking according to the data of the acceleration sensor while monitoring the shaking of the device, and map these data to the motion parameters of the text. For example, the system can calculate the floating direction and speed of the text based on the acceleration component of the device in three-dimensional space to match it with the actual shaking of the device. At the same time, the system can also set the randomness parameters of text floating to make the movement trajectory of the text more natural and varied. For example, the system can randomly change the direction and speed of the text during the floating process, simulate the randomness and uncertainty of floating objects in nature, and enhance the realism and fun of the text animation.

[0068] When triggering the text floating effect, one issue that needs to be considered is how to avoid too frequent or intense animation effects so as not to affect the user's normal operation and visual experience. To this end, the system can set a threshold for shaking triggers, and the text floating effect is triggered only when the device shakes beyond a certain range. At the same time, the system can also limit the amplitude and speed of text floating to avoid excessive displacement or speed changes to ensure the smoothness and readability of the animation effect. In addition, the system can also dynamically adjust the triggering rules and effect parameters of text floating according to the frequency and duration of the device's shaking, providing a coherent animation experience when the device shakes continuously, and avoiding abrupt and uncoordinated animation effects when shaking intermittently.

[0069] S203, automatically switching multiple sets of preset text styles and layout schemes at different time periods based on the system time of the mobile device; The system automatically switches the style and layout of the desktop text at different time periods according to the system time of the mobile device. By presetting multiple groups of text styles and layout schemes and associating them with different time periods, the system can achieve dynamic changes in the personalized desktop throughout the day, providing a visual experience that adapts to the rhythm of time.

[0070] In the specific implementation, the system can predefine a set of time rules, such as morning, morning, afternoon, evening, night, etc., and design corresponding text styles and layout schemes for each time period. These schemes can be designed differently in terms of font, color, size, arrangement, etc. to echo the atmosphere and psychological feelings of different time periods. For example, in the morning period, the system can use bright and lively color matching and regular layout to give people a fresh and exciting feeling; while in the evening period, the system can switch to soft, soothing tones and imaginative arrangements to create a relaxing and poetic atmosphere. The system can also design transition animations between text styles and layouts according to the passage of time to make visual changes more natural and coherent. For example, in the transition period from morning to morning, the system can smoothly transition the text style and layout to the morning scheme through animation effects such as gradient, movement, and scaling, giving users a pleasing and rhythmic experience.

[0071] S204: Adaptively adjust the rendering complexity and refresh frequency of the personalized image according to the power status of the mobile device.

[0072] The system monitors the battery status of the mobile device and dynamically adjusts the rendering parameters of the personalized image to achieve an adaptive balance between device energy consumption and display effect. When the device has sufficient battery power, the system can appropriately increase the rendering complexity and refresh rate of the image to present a more detailed and smooth visual effect; when the device has low battery power, the system can reduce the complexity and refresh rate of the image rendering to reduce energy consumption and extend the use time of the device.

[0073] When implementing adaptive adjustment of image rendering, the system needs to preset multiple rendering complexity levels and refresh frequency gears, and establish a mapping relationship between them and the power status. For example, the power status can be divided into three intervals: high, medium, and low, and the corresponding rendering level and refresh rate can be set for each interval. When the system detects that the power of the device drops from the high interval to the medium interval, it automatically switches to a lower level of rendering complexity and appropriately reduces the refresh frequency of the image. The adjustment of rendering complexity can be achieved by reducing the level of detail of the image, simplifying texture mapping, reducing light and shadow effects, etc., while ensuring basic display quality, reducing the amount of calculation and memory usage of graphics processing. The adjustment of refresh frequency can save energy consumption of the device by extending the interval between picture frames and reducing the number of image redraws. Through the coordinated regulation of rendering complexity and refresh frequency, the system can dynamically optimize the display effect and energy consumption performance of personalized pictures according to the power status of the device, and realize intelligent adaptive energy-saving strategies.

[0074] In the process of adaptive adjustment of personalized image rendering, a factor that needs to be weighed is how to strike a proper balance between energy saving and user experience. An overly aggressive energy saving strategy may cause a significant decline in image quality and affect the user's visual experience; while an overly conservative adjustment range may not effectively extend the battery life of the device. To this end, the system can adopt a gradual adjustment strategy to gradually reduce the rendering complexity and refresh frequency in smaller steps as the power decreases, so that the display effect changes more smoothly and naturally. At the same time, the system can also provide users with personalized energy saving options, allowing users to manually adjust the energy saving intensity of image rendering according to their needs and preferences. For example, an energy saving slider control is provided, and users can make a trade-off between high quality and long battery life by dragging the slider, and the system dynamically adjusts the parameters of the rendering strategy accordingly. By combining gradual adjustment with user control, the system can achieve flexible and personalized balance optimization between device energy efficiency and user experience.

[0075] In the above embodiment, the brightness and contrast of the personalized picture are dynamically adjusted through the ambient light sensor data, so that the desktop theme maintains the best display effect in different lighting environments. The dynamic floating effect of the text is triggered based on the acceleration sensor data, which adds a dynamic visual effect to the desktop theme. The text style and layout scheme are automatically switched according to the system time, so that the desktop theme shows time-related dynamic changes. The rendering complexity and refresh frequency are adaptively adjusted according to the power status of the device, which optimizes performance consumption while ensuring visual effects. This multi-sensor data-driven dynamic adjustment mechanism enables the desktop theme to have the ability to perceive environmental changes and respond adaptively, which improves the intelligence of the desktop theme and the user experience. At the same time, it ensures stable operation under different device states through adaptive performance adjustment, enhancing the practicality of the system.

[0076] Further, in another embodiment, the system acquires three-axis data of the acceleration sensor, and performs noise reduction and smoothing processing on the three-axis data to obtain effective acceleration values; Calculate the initial speed and initial direction of the floating text according to the effective acceleration value. Specifically: decompose the effective acceleration value into horizontal and vertical components to obtain the acceleration values ​​of the X-axis and Y-axis; Calculate the magnitude and direction angle of the synthetic acceleration based on the acceleration values ​​of the X-axis and the Y-axis; Based on the magnitude of the synthetic acceleration and the preset speed conversion coefficient, the initial speed of the text is calculated; Use the direction angle as a reference to calculate the initial direction of the text floating; Generate motion trajectory by combining initial velocity, initial direction and preset gravity parameters; Add a damping effect based on the motion trajectory to gradually slow down the text movement until it stops; Record the collision position information during text movement, and trigger rebound effects and particle effects when colliding.

[0077] In the above embodiment, the system realizes the precise synchronization and mapping of the text floating effect and the shaking motion of the device by processing and calculating the three-axis data of the acceleration sensor. First, the system obtains the X-axis, Y-axis and Z-axis data of the acceleration sensor, and performs noise reduction and smoothing processing on these data to eliminate high-frequency noise and burrs in the sensor signal and obtain stable and effective acceleration values. This step can use signal processing algorithms such as Kalman filtering and low-pass filtering to improve the reliability and smoothness of acceleration data.

[0078] After obtaining a valid acceleration value, the system decomposes it into horizontal (X-axis) and vertical (Y-axis) components in order to calculate the horizontal and vertical motion parameters of the text respectively. By synthesizing the X-axis and Y-axis acceleration values, the system can calculate the magnitude and direction angle of the synthesized acceleration vector. The magnitude of the synthesized acceleration reflects the intensity of the device shaking. Based on this, the system calculates the initial speed of the text floating in combination with the preset speed conversion coefficient. The speed conversion coefficient can be adjusted according to actual needs and visual effects to control the speed range of the text floating. The direction angle of the synthesized acceleration can be directly used as the initial direction of the text floating, so that the direction of the text movement is consistent with the direction of the device shaking.

[0079] After determining the initial speed and direction of the floating text, the system can generate the motion trajectory of the text in combination with the laws of physical motion. By introducing preset gravity parameters, the system can simulate the effect of gravity on the movement of text, making it present a real motion form such as a parabola or free fall. At the same time, the system can also add a damping effect to the motion trajectory to simulate the attenuation effect of air resistance on the movement of text, so that the movement speed of the text gradually decreases and eventually tends to be stationary. The damping coefficient can be set according to the desired attenuation rate and visual effect to achieve a natural and smooth text motion trajectory.

[0080] In order to further enhance the interactivity and fun of the text floating effect, the system can also introduce a collision detection and feedback mechanism. During the movement of the text, the system records its position information in real time and detects whether it collides with the screen boundary or other interface elements. When a collision event is detected, the system can trigger the corresponding rebound effect, calculate the rebound angle and speed according to the normal vector of the collision surface, so that the text can show a real interaction with the interface elements. At the same time, particle effects such as bursting and splashing can also be triggered at the collision point to enhance the visual impact of the collision. The system can design a variety of particle effects for different collision situations, such as particles of different colors, sizes, densities and movement trajectories, which can present colorful collision feedback.

[0081] Through the comprehensive application of the above technical solutions, the system implements a text floating effect generation mechanism based on device motion data. This mechanism makes full use of the acceleration sensor data to analyze and map the shaking motion of the device in real time, so that the text floating effect is highly synchronized with the device motion state. At the same time, the system introduces physical characteristics and visual feedback in the generation of motion trajectories to simulate real-world effects such as gravity, damping, and collisions, making the movement of text more natural and interesting. This text floating mechanism that integrates sensor data, physical laws, and visual effects can bring users an immersive interactive experience and enhance the dynamic expressiveness and fun of personalized desktops.

[0082] In actual applications, the system can further optimize and expand the expression and interaction methods of text floating effects. For example, the system can dynamically adjust the speed range and trajectory shape of text floating according to the frequency and amplitude of the device shaking to adapt to the movement states of different intensities and rhythms. In terms of text collision feedback, the system can explore richer and more innovative particle effects, such as explosions, smoke, sparks, etc., which can create cooler and more shocking visual effects. At the same time, the system can also introduce sound feedback and play corresponding sound effects when text collides, such as impact sounds, cracking sounds, etc., to enhance the realism and immersion of the interaction.

[0083] In addition to device shaking, the system can also explore other forms of motion interaction, such as tilting and rotating, and achieve more diversified text dynamic effects through the fusion analysis of sensor data such as gyroscopes. For example, when the device is tilted, the text can slide or fall along the tilt direction; and when the device is rotated, the text can rotate or spiral around a certain center point. Through the perception and mapping of different forms of motion, the system can create a richer and more vivid text interaction experience, bringing the dynamic expressiveness of the personalized desktop to a new level.

[0084] In the above embodiment, accurate effective acceleration values ​​are obtained by denoising and smoothing the three-axis data of the acceleration sensor, and the initial speed and direction of the floating text are calculated based on this, and then a complete motion trajectory is generated in combination with the preset gravity parameters. By introducing a damping effect in the motion trajectory, the movement of the text shows a natural deceleration process until it stops, simulating the physical motion laws in the real world. The system also records the collision position information during the movement of the text, triggers rebound effects and particle effects when a collision occurs, making the movement of the text more rich and vivid. This interactive effect design based on a physical engine gives the desktop theme real physical response characteristics, enhances the fun and interactivity of the interface, and brings a more immersive user experience to users.

[0085] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , which is a schematic diagram of the physical device structure of a personalized desktop theme generation system provided in an embodiment of the present application.

[0086] It should be noted that Figure 3 The structure of the system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0087] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0088] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0089] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0090] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0092] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist independently without being assembled into the system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiment.

[0093] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0094] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0095] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0096] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A method for generating a personalized desktop theme, characterized in that: include: In response to the user clicking a preset button on the desktop of the mobile device, a confirmation dialog box pops up on the desktop; In response to the user clicking a confirmation button in the confirmation dialog box, a camera permission confirmation interface pops up; When it is determined that the user clicks to confirm the authorization in the camera permission confirmation interface, calling the rear camera of the mobile device and controlling the rear camera to capture an image; Load the image through Bitmap, and use ColorMatrix to set the saturation of the image loaded through the Bitmap to 0 to obtain a grayscale image; Draw the grayscale image on another Bitmap, and use Paint to draw and input the text input by the user; Adding Random to the values ​​of the preset position array and the preset color array respectively makes the text randomly displayed at any position of the grayscale image and makes the text display different colors; Determine the length of the text, and use the Random to generate a random subscript within the length, and then enlarge the random subscript and add it to the preset position of the text to obtain a personalized signature; Use Canvas to draw the grayscale image and the personal signature to obtain a personal image; The personalized picture is set as the desktop theme of the mobile device.

2. The method according to claim 1, characterized in that Drawing the grayscale image on another Bitmap and inputting the text input by the user by using Paint specifically includes: Resizing the grayscale image according to a preset scaling ratio and then drawing it on another Bitmap; Obtain the main color tone of the grayscale image, and set the transparency of the Paint used to draw the text based on the main color tone; Determining the stroke width and shadow parameters of the Paint used to draw the text according to the brightness distribution of the grayscale image; Use the configured Paint to draw the text input by the user on the other Bitmap.

3. The method according to claim 1, characterized in that: The method of adding Random to the value of the preset position array and the value of the preset color array includes: Dividing the grayscale image into a plurality of grid areas of equal size; Calculating the image complexity of each of the grid areas and generating a position array that can be used for text display; Analyzing the color distribution of the grayscale image and establishing a color array of a complementary color scheme; A random perturbation algorithm is applied to the position array and the color array respectively to generate a text layout scheme, wherein the text layout scheme includes randomly displaying the text at any position of the grayscale image and displaying the text in different colors.

4. The method according to claim 1, characterized in that: After setting the personalized picture as the desktop theme of the mobile device, the method further includes: Acquire ambient light sensor data of the mobile device, and dynamically adjust the brightness and contrast of the personalized picture according to the ambient light sensor data; Monitoring the acceleration sensor data of the mobile device, and triggering the dynamic floating effect of the text when the shaking of the mobile device is detected; Automatically switch between multiple sets of preset text styles and layout schemes at different time periods based on the system time of the mobile device; According to the power status of the mobile device, the rendering complexity and refresh frequency of the personalized image are adaptively adjusted.

5. The method according to claim 4, characterized in that The dynamically adjusting the brightness and contrast of the personalized picture according to the ambient light sensor data specifically includes: Determining a light intensity value according to the ambient light sensor data; Mapping the light intensity value to a plurality of preset scene modes, wherein the plurality of scene modes include outdoor strong light, indoor standard light and weak light; According to the current scene mode, select a corresponding image enhancement parameter group from the preset parameter library; The brightness and contrast of the personalized picture are adjusted according to the image enhancement parameter group.

6. The method according to claim 4 or 5, characterized in that: After monitoring the acceleration sensor data of the mobile device, the method further includes: Acquire three-axis data of the acceleration sensor, and perform noise reduction and smoothing processing on the three-axis data to obtain effective acceleration values; Calculating the initial speed and initial direction of the floating text according to the effective acceleration value, and generating a motion trajectory in combination with a preset gravity parameter; Adding a damping effect on the basis of the motion trajectory to gradually slow down the text movement until it stops; The collision position information of the text during its movement is recorded, and a rebound effect and a particle effect are triggered upon collision.

7. The method according to claim 6, characterized in that The calculating the initial speed and initial direction of the floating text according to the effective acceleration value specifically includes: Decomposing the effective acceleration value into horizontal and vertical components to obtain acceleration values ​​of the X-axis and the Y-axis; Calculating the magnitude and direction angle of the synthetic acceleration according to the acceleration values ​​of the X-axis and the Y-axis; Based on the magnitude of the synthetic acceleration and in combination with a preset speed conversion coefficient, an initial speed of the text is calculated; The initial direction of the text floating is calculated using the direction angle as a reference.

8. A personalized desktop theme generation system, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for replacing theme of tablet computer

    CN112966141A

  • Desktop theme switching method and device, medium and terminal equipment

    CN118626200A

  • Display device and filter effect display method

    CN119110122A