Nickname display method, nickname display device, nickname display equipment and medium
By generating basic gradient and dynamic sweeping shaders, and combining them with composite shader components, the problem of the lack of visual appeal in traditional nickname display methods is solved, achieving dynamic gradient and sweeping effects for nicknames, thus improving user experience and platform interactivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional nickname display methods lack visual appeal and personalized expression, failing to meet users' needs for unique identity identifiers, thus affecting user retention rates and platform commercial value.
By generating a basic gradient shader and a dynamic sweeping shader, and combining them with composite shader components, dynamic gradients and sweeping effects are achieved in nicknames, enhancing visual appeal and personalized experience.
It significantly enhances the visual appeal and personalized experience of nicknames, strengthens user interaction and platform activity, and improves user retention and commercial value.
Smart Images

Figure CN121685697A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for displaying nicknames. Background Technology
[0002] With the popularization of the Internet and mobile applications, users' needs for interaction and expression on various social platforms and content publishing platforms are increasing. As an important identifier of user identity, nicknames can enhance user experience through personalized and dynamic display in different interface scenarios. At the same time, it also helps platforms increase user interaction and enhance commercial value.
[0003] Traditional nickname display methods rely primarily on fixed color schemes and static effects. The core of this approach is to use a single color value to render the nickname text, while the background typically remains unchanged or uses a simple gradient effect. However, this single color scheme and static display lack visual appeal and personalized expression, failing to meet users' needs for unique identity markers. This limits the user's personalized experience, and in the highly competitive internet market, this limitation directly impacts the platform's user retention rate and activity, thus negatively affecting the platform's commercial potential. Summary of the Invention
[0004] The primary objective of this application is to solve at least one of the aforementioned problems by providing a nickname display method, apparatus, device, or medium thereof.
[0005] To achieve the various objectives of this application, the following technical solution is adopted: A nickname display method provided for one of the purposes of this application includes the following steps: Respond to the user nickname display event and determine the corresponding display scenario; Based on the preset scene priority rules and the display scene, determine the corresponding gradient color configuration parameters and sweep light configuration parameters; Based on the gradient color configuration parameters and the light sweeping configuration parameters, a corresponding basic gradient shader and dynamic light sweeping shader are generated. The base gradient shader and dynamic light sweep shader are input into the composite shader component to obtain the target blend shader, which is used to render and display the user nickname.
[0006] A nickname display device provided for one of the purposes of this application includes: The scene type determination module is set to respond to the user nickname display event and determine the display scene corresponding to the event. The parameter acquisition module is configured to determine the corresponding gradient color configuration parameters and sweep light configuration parameters based on the preset scene priority rules and the display scene. The shader generation module is configured to generate corresponding basic gradient shaders and dynamic sweeping shaders based on the gradient color configuration parameters and the sweeping configuration parameters. The compositing module is configured to input the basic gradient shader and dynamic light sweep shader into the composite shader component to obtain a target blend shader for rendering and displaying the user nickname.
[0007] A computer device provided for one of the purposes of this application includes a central processing unit and a memory, the central processing unit being configured to invoke and run a computer program stored in the memory to perform the steps of the nickname display method described in this application.
[0008] A computer-readable storage medium is provided for another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the described nickname display method, which, when invoked by a computer, performs the steps included in the method.
[0009] Compared with existing technologies, the advantages of this application are as follows: The nickname display method of this application significantly enhances the visual appeal and personalized experience of nicknames through dynamic gradient and sweeping light effects. This method makes nicknames not limited to a single color value or simple static gradient effects, but also gives users' nicknames a unique visual effect, thereby better meeting users' needs for unique identity identification and enhancing user interactivity on the platform.
[0010] Furthermore, this invention generates a basic gradient shader and a dynamic sweeping shader based on gradient color configuration parameters and sweeping light configuration parameters, and then merges them into a target blend shader through a composite shader component. This achieves a dual dynamic effect of simultaneously presenting a gradient background and dynamic sweeping light on the nickname, making the nickname more visually vivid and attractive. This dynamic and multi-layered visual effect not only enhances the user's personalized experience, but also brings higher user activity and commercial value to the platform. Attached Figure Description
[0011] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a typical embodiment of the nickname display method of this application; Figure 2 This is a schematic diagram illustrating the process of the server returning the configuration file and storing it locally on the client in an embodiment of this application; Figure 3 This is a schematic diagram of the nickname customization process based on scene priority in the embodiments of this application; Figure 4 This is a schematic diagram illustrating the process of using a shader object cache pool in an embodiment of this application; Figure 5 This is a schematic diagram illustrating the process of shader object cache pool memory management in an embodiment of this application; Figure 6 This is a schematic diagram of the process for generating a dynamic light-sweeping shader in an embodiment of this application; Figure 7 This application embodiment is a flowchart illustrating the process of terminating or restarting the rendering and display operation based on the nickname's visual status; Figure 8 This is a schematic block diagram of the nickname display device of this application; Figure 9 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation
[0012] One nickname display method of this application can be programmed into a computer program product and deployed on a server for execution. For example, in an exemplary application scenario of this application, it can be deployed on the server of a live streaming platform or other social platform. These platforms provide users with nickname customization and display functions. Users can configure nickname customization profiles and select customization effects through the platform. The platform completes the rendering and display of the nickname according to the user's operation instructions and provides personalized display services to the user.
[0013] In a typical embodiment of this application, the user nickname display event is first responded to, and the corresponding display scenario is determined. This display scenario includes specific interaction scenarios and general display scenarios. The specific interaction scenario corresponds to a specific real-time interactive interface, such as the public message area, the list of users connected to a live chat, or the list of online users in a platform chat room. The general display scenario corresponds to a platform-level general display interface, such as a channel list or a user information display area in a non-specific interaction state. The nickname display event can be triggered by a user entering a specific interface or performing a specific operation. Based on the obtained display scenario, and according to preset scenario priority rules, corresponding gradient color configuration parameters and sweep light configuration parameters are determined. These parameters can be pre-stored in a server or client local database to define the nickname display effect under different display scenarios. Then, based on the gradient color configuration parameters and sweep light configuration parameters, corresponding basic gradient shaders and dynamic sweep light shaders are generated. In one embodiment, using graphics rendering technology, a shader object capable of achieving gradient and sweeping effects is constructed using gradient color configuration parameters and sweeping light configuration parameters. The basic gradient shader and dynamic sweeping light shader are input into the composite shader component to obtain a target blend shader, which is used to render and display the user's nickname. Finally, the target blend shader displays the nickname with a dynamic and colorful effect in the corresponding interface scene, enhancing the visual appeal of the nickname and the user's personalized experience.
[0014] The nickname display method described in this application can be widely applied to various live streaming and social scenarios, such as chat room interaction, public screen message display, and live chat interaction, helping users quickly display personalized nicknames and improving the visual effect of nicknames and the user's interactive experience.
[0015] Please see Figure 1 The nickname display method of this application, in its typical embodiment, includes the following steps: Step S5100: Respond to the user nickname display event and determine the display scenario corresponding to the event; The display scenario refers to the specific interface environment in which users interact or display information on the platform. In some embodiments, the display scenario includes two main categories: specific interaction scenarios and general display scenarios. For example, social platforms usually have chat rooms, which are specific interaction scenarios. In this case, the display scenario may include the public message area, the list of users who are connected to the chat, and the list of online users in the chat room. Other general scenarios of the platform are general display scenarios. In this case, the display scenario of the nickname may include the channel tree, the personal profile page, and other locations.
[0016] Nickname display events can be triggered when a user enters a specific interface or performs a specific action. For example, when a user enters a chat room and speaks, connects with others, or performs other interactive actions, the nickname display event is triggered. In this case, it's necessary to identify the current display scenario of the nickname. Specifically, by monitoring the user's current interface, for example, if the user speaks on the public chat screen, the current scenario can be identified as "chat room public screen"; if the user is connecting with others, the current scenario can be identified as "connection list". Furthermore, user behavior in other common scenarios on the platform is also considered, such as browsing the channel tree or viewing information on the profile page, in which case the display scenario of "channel tree" or "profile page" is identified accordingly.
[0017] In one embodiment, identifying the display scene can be achieved through front-end interface layout analysis. Specifically, the current display scene can be determined by analyzing the structure of the HTML document, for example, by detecting the DOM elements of the current page to identify the area where the user is located. If the user is speaking in the public message area of a chat room, the current scene can be identified as "chat room public message area" by detecting specific HTML elements. At the same time, CSS selectors are used to locate specific interface elements, for example, by detecting whether they contain specific CSS classes, to determine whether the user is in the public message area of the chat room.
[0018] Step S5200: Determine the corresponding gradient color configuration parameters and sweep light configuration parameters according to the preset scene priority rules and the display scene; The scene priority rule is preset by those skilled in the art. This scene priority rule defines the priority of nickname display under different display scenarios. For example, when the display scenario includes a specific interaction scenario and a general display scenario, and the priority rule defines that the specific interaction scenario has a higher priority than the general display scenario, if the nickname is displayed in the specific interaction scenario, the nickname decoration configuration effect configured by the user for the specific interaction scenario will be displayed first. Only when the user has not configured a nickname decoration configuration effect for the specific interaction scenario will the nickname decoration configuration effect corresponding to the general display scenario be selected for display. That is, this step can determine the gradient color configuration parameters and sweep light configuration parameters to be extracted based on this priority.
[0019] In this step, based on preset scene priority rules and the display scene determined in the previous step, the corresponding gradient color configuration parameters and sweep light configuration parameters are determined. The gradient color configuration parameters include the gradient color sequence, the proportion of each color in the color sequence, and the direction of the gradient. The proportion of each color in the color sequence defines the specific ratio of the color transition. The sweep light configuration parameters include the sweep light angle, the sweep light color value, the sweep light width coefficient, and the sweep light movement speed. The sweep light angle defines the direction of the sweep light effect, the sweep light color value defines the color of the sweep light effect, the sweep light width coefficient defines the width of the sweep light effect, and the sweep light movement speed defines the movement speed of the sweep light effect. In some embodiments, the gradient color configuration parameters and sweep light configuration parameters are customized by the user through the nickname customization settings interface provided by the platform and saved in the user's personal nickname customization configuration file. This nickname customization configuration file is stored in the server's database and associated with the user's identity information. When a user logs into the platform, the client requests and downloads the user's nickname customization configuration file from the server and stores it in the client's local storage for quick access and use when needed. This step determines the gradient color configuration parameters and sweep light configuration parameters to be extracted based on the preset scene priority rules and the display scene, and then they can be extracted from the client's local storage.
[0020] Step S5300: Based on the gradient color configuration parameters and the light sweeping configuration parameters, generate the corresponding basic gradient shader and dynamic light sweeping shader; After determining the gradient color configuration parameters and the light sweep configuration parameters, these parameters are translated into specific graphics rendering effects. This process includes the generation and configuration of shaders. Shaders are programs used to process graphics data in graphics rendering. They run on the graphics processing unit (GPU) and can efficiently handle complex graphics effects.
[0021] Specifically, the first step is to generate a basic gradient shader based on the gradient color configuration parameters. If the gradient color configuration parameters determined in the previous step define the color sequence as transitioning from red to yellow, and then to blue, specifying that red accounts for 30%, yellow for 40%, and blue for 30%, and the gradient direction is from left to right, then when generating the basic gradient shader, a shader program is defined through a programming interface using graphics rendering technology. This program gradually transitions the colors from left to right according to the specified color sequence and proportions, ensuring that when rendering the nickname, the background or text color of the nickname can smoothly transition from left to right according to the proportions of 30% red, 40% yellow, and 30% blue, thus achieving the basic gradient effect.
[0022] Further, a dynamic sweep light shader is generated based on the sweep light configuration parameters. If the sweep light configuration parameters determined in the previous step specify a sweep light angle from left to right, a sweep light color value of bright white, a sweep light width coefficient of 10 pixels, and a sweep light movement speed of 100 pixels per second, then when generating the dynamic sweep light shader, the specific meaning and value of these parameters will be analyzed first. Based on the sweep light angle, the horizontal movement direction of the sweep light effect is determined; based on the sweep light color value, the main color of the sweep light is set to bright white to ensure clear visibility under various background colors; based on the sweep light width coefficient, the width of the sweep light band is defined as 10 pixels to give the sweep light effect a certain visual thickness; finally, based on the sweep light movement speed, the movement distance of the sweep light band in each frame is calculated to achieve a smooth animation effect for the dynamic sweep light. By combining these parameters, a shader program that can produce a dynamic sweeping light effect is constructed. When the program runs, it continuously updates the position of the sweeping light according to the changes over time, so that it moves on the display area of the nickname at a set speed and direction, thereby adding a dynamic and eye-catching visual effect to the nickname.
[0023] Step S5400: Input the basic gradient shader and dynamic light sweep shader into the composite shader component to obtain the target blend shader, which is used to render and display the user nickname.
[0024] After generating the base gradient shader and the dynamic sweep shader, the effects of these two shaders need to be merged to produce the final nickname display effect. This process involves calling the composite shader component, which can blend the effects of multiple shaders together to generate a target blend shader. The final target blend shader will be used for the final rendering and display of the user's nickname.
[0025] Specifically, the basic gradient shader and dynamic sweeping light shader are first passed as input to the composite shader component. The composite shader component then processes the effects of these two shaders according to preset blending modes. Blending modes can be varied, such as Overlay, Add, and Multiply. These modes define how the two shader effects interact to produce the final visual effect. For example, if the Overlay blending mode is selected, the composite shader component will overlay the dynamic sweeping light effect on top of the basic gradient effect; that is, the sweeping light effect will add a dynamic highlight layer to the gradient colors, making the nickname more visually appealing. If the Add blending mode is selected, the effects of the two shaders are directly added together, producing a brighter visual effect. If the Multiply blending mode is selected, the effects of the two shaders are modulated together, producing a softer visual effect.
[0026] After determining the blending mode, the composite shader component outputs a target blend shader. This target blend shader contains all the necessary graphics rendering instructions for rendering the nickname on the user's device. Applying this target shader to the text of the user's nickname ensures that each character is rendered according to the preset gradient and sweeping effects, and finally displays the rendered nickname in the corresponding interface scene.
[0027] From the above description of the typical embodiments of this application, it can be understood that this application has many advantages, including but not limited to the following aspects: The nickname display method of this application significantly enhances the visual appeal and personalized experience of nicknames through dynamic gradient and sweeping light effects. This method makes nicknames not limited to a single color value or simple static gradient effects, but also gives users' nicknames a unique visual effect, thereby better meeting users' needs for unique identity identification and enhancing user interactivity on the platform.
[0028] Furthermore, this invention generates a basic gradient shader and a dynamic sweeping shader based on gradient color configuration parameters and sweeping light configuration parameters, and then merges them into a target blend shader through a composite shader component. This achieves a dual dynamic effect of simultaneously presenting a gradient background and dynamic sweeping light on the nickname, making the nickname more visually vivid and attractive. This dynamic and multi-layered visual effect not only enhances the user's personalized experience, but also brings higher user activity and commercial value to the platform.
[0029] For further embodiments, please refer to Figure 2 Before responding to a user nickname display event and determining the corresponding display scenario, the following steps are included: Step S6100: In response to the user login verification pass event, request the server to obtain the nickname decoration configuration file corresponding to the user. The nickname decoration configuration file includes pre-configured gradient color configuration parameters and sweep light configuration parameters. Before accessing a live streaming platform or other social media platform, users need to undergo login verification to ensure the legitimacy and security of their identity and to bind their identity information. Once the user's login verification is successful, the client sends a request to the server to retrieve all nickname / avatar configuration files corresponding to that user. The server receives the request, which contains the user's unique identifier. Based on this identifier, the server retrieves the user's nickname / avatar configuration files from the database and sends them back to the client. The database contains the unique identifiers of all users and their corresponding nickname / avatar configuration files. In one embodiment, the nickname / avatar configuration files are stored in JSON or XML format, containing pre-configured gradient color and light-sweep configuration parameters.
[0030] The pre-configuration of gradient color configuration parameters and sweep light configuration parameters in the nickname decoration configuration file includes multiple methods. In one embodiment, users can customize gradient color sequence, color ratio, gradient direction, and sweep light color, speed, width, and angle parameters through the nickname decoration configuration interface provided by the platform, thereby generating the corresponding nickname decoration configuration file, which is stored on the server.
[0031] In another embodiment, the platform provides users with default nickname customization profiles, which can be categorized based on user permissions, roles, or platform activity themes. For example, the platform provides basic gradient colors and sweeping effects for ordinary users, while offering more complex nickname customization effects for VIP users, including more sophisticated gradient colors and sweeping effects.
[0032] Step S6200: Receive the nickname customization configuration text returned by the server and store it locally on the client for use in response to user nickname display events.
[0033] The client uses local storage mechanisms to store nickname / avatar profiles received from the server. For example, it may use a device file, database, or memory cache to store the received data. In some embodiments, the client stores the nickname / avatar profile in the device's internal storage to ensure data security and privacy. The nickname / avatar profile is returned in a format such as JSON or XML, which the client parses and converts into an internal data structure for more efficient access and use of the data.
[0034] In some embodiments, the client encrypts and stores the received nickname / avatar configuration file to protect user privacy and data security. The encryption process can use symmetric encryption algorithms (such as AES) or asymmetric encryption algorithms (such as RSA). The client generates an encryption key and uses this key to encrypt the configuration file. The encrypted data is stored locally and decrypted only when needed. This effectively prevents unauthorized access or tampering of the configuration file.
[0035] In this embodiment, by using a local storage mechanism to save the nickname customization configuration file on the client, these configuration files can be quickly retrieved when the user's nickname display event occurs. This local storage significantly reduces the latency of retrieving configuration files from the server, thereby speeding up the nickname rendering speed and improving the smoothness and immediacy of the user experience. In addition, the local storage mechanism also reduces the server load, lowers the network transmission requirements, and improves overall efficiency and response speed.
[0036] For further embodiments, please refer to Figure 3Based on preset scene priority rules and the display scene, the corresponding gradient color configuration parameters and sweep light configuration parameters are determined, including the following steps: Step S5210: Determine the scene category to which the display scene belongs. The scene category includes specific interactive scenes and general display scenes. Specific interactive scenarios refer to interfaces where users interact in real time on a platform, such as the public message area, the list of users connecting via voice chat, or the list of online users in a chat room. The characteristic of these specific interactive scenarios is direct interaction between users, such as sending messages, making voice or video calls, etc. In these scenarios, the display effect of nicknames is used to attract the attention of other users and enhance interactivity. For example, in the public message area of a chat room, messages sent by users are displayed on the screen in real time. The dynamic effect of the nickname can increase the attractiveness of the message, making it easier for other users to notice the user who sent the message.
[0037] General display scenarios correspond to platform-level general display interfaces, such as channel lists or user information display areas in non-specific interaction states. The characteristic of general display scenarios is that users are in a browsing state. In general display scenarios, nicknames are displayed more simply and uniformly to maintain interface cleanliness and consistency. For example, in a channel list, user nicknames are displayed in a list format, and the display of nicknames can be defined more concisely for users to quickly browse.
[0038] This step determines the scene category corresponding to the defined display scene. In one embodiment, scene recognition rules are predefined, which distinguish between specific interactive scenes and general display scenes based on the characteristic attributes of the display scene. Specifically, after determining the display scene, key characteristic attributes of the display scene are extracted, such as the type, layout position, and functional purpose of interface elements. These characteristic attributes are then matched with the predefined scene recognition rules. For example, for a specific interactive scene, its characteristic attributes include interface elements having real-time message sending functions, and the existence of specific interactive areas such as a list of connected users or an online user list. For a general display scene, its characteristic attributes are characterized by interface elements mainly displaying information lists, users being in a passive browsing state, and no obvious real-time interactive functional areas. By comparing the degree of matching between these characteristic attributes and the predefined rules, the specific scene category to which the display scene belongs is determined, thus providing a basis for subsequently selecting appropriate gradient color configuration parameters and sweep light configuration parameters according to the scene category.
[0039] Step S5220: When the scene category is a specific interactive scene, determine whether the user has configured an exclusive nickname decoration configuration file for the corresponding display scene based on the scene priority rule. In one embodiment, when the scenario category determined in the previous step is a specific interaction scenario, a process for determining the user's exclusive nickname / avatar configuration file for that scenario is triggered based on the scenario priority rule. Specifically, it monitors whether the current user has configured an exclusive nickname / avatar configuration file corresponding to the specific interaction scenario. The exclusive nickname / avatar configuration file is a nickname / avatar configuration file that the user has pre-set according to their preferences and needs for a specific interaction scenario. By accessing local storage or a server database, it searches for an exclusive nickname / avatar configuration file that matches the current specific interaction scenario. This process includes indexing and retrieving the configuration file. The index information of the configuration file includes metadata such as scenario type identifier, file path, and file version number. This step queries the index information based on the type identifier of the current specific interaction scenario to determine whether a corresponding exclusive nickname / avatar configuration file exists.
[0040] Step S5230: When the exclusive nickname decoration configuration file is configured, extract the corresponding gradient color configuration parameters and light sweep configuration parameters from the client local; After confirming that the user has configured a unique nickname customization profile, the corresponding gradient color configuration parameters and light sweep configuration parameters will be retrieved from the client's local storage. Client local storage typically refers to the storage space on the user's terminal device, used to store the user's nickname customization profile for quick loading and use after the user logs in.
[0041] Specifically, the storage path of the exclusive nickname customization configuration file in the client's local storage is first located. The storage path is pre-set, such as in a specific folder on the user's terminal device, or determined by the index information of the configuration file. After determining the storage path of the configuration file, the configuration file is opened and read, and the corresponding parser is used to parse these configuration files and extract the gradient color configuration parameters and light sweep configuration parameters.
[0042] Step S5240: When the exclusive nickname decoration configuration file is not configured, extract the gradient color configuration parameters and sweep light configuration parameters corresponding to the general display scene from the client local.
[0043] After confirming that the user has not configured a unique nickname customization profile, the gradient color configuration parameters and sweep light configuration parameters corresponding to the general display scenario will be extracted from the client's local storage. Specifically, the storage path of the general nickname customization profile in the client's local storage will be located first. Once the storage path of the general nickname customization profile is determined, the profile will be opened and read to obtain the corresponding gradient color configuration parameters and sweep light configuration parameters.
[0044] In this embodiment, a priority mechanism ensures that user-defined nickname profiles are used first in specific interactive scenarios, thereby significantly improving the personalization and interactivity of the user experience. This mechanism enhances the platform's interactivity, as the more eye-catching and dynamic nickname display effect in specific interactive scenarios can attract the attention of other users and promote interaction between users.
[0045] For further embodiments, please refer to Figure 4 Based on the gradient color configuration parameters and the light sweep configuration parameters, corresponding basic gradient shaders and dynamic light sweep shaders are generated, including the following steps: Step S5310: Based on the gradient color configuration parameters and the light sweeping configuration parameters, determine the corresponding configuration identifier; The configuration identifier is a unique identifier generated based on the gradient color configuration parameters and the sweep configuration parameters. This unique identifier is used for subsequent matching of the corresponding shader object in the shader object cache pool. In one embodiment, a preset configuration identifier calculation rule is established, which defines how to obtain the configuration identifier from the gradient color configuration parameters and the sweep configuration parameters. Specifically, key parameters, such as the gradient color sequence, are first extracted from the gradient color configuration parameters. Simultaneously, key parameters, such as sweep movement speed and sweep angle (any one or more), are extracted from the sweep configuration parameters. These extracted parameters are then combined into a string, which is then hashed to generate a unique hash value. Hash processing is a common data processing method that can convert input data of arbitrary length into output data of fixed length. Common hash algorithms include MD5, SHA-1, or SHA-256, and the generated hash value will serve as the configuration identifier.
[0046] In another embodiment, the configuration identifier can be generated in a more structured way. For example, the extracted key parameters can be encoded into a structured data object, such as JSON or XML, according to a predefined format. This data object can then be serialized to generate a unique string, which can be used directly as the configuration identifier, or further hashed to generate a more compact hash value. Furthermore, the parameters can be sorted or normalized before serialization to ensure the consistency and uniqueness of the generated configuration identifier.
[0047] Step S5320: Query whether there is a shader object matching the configuration identifier in the preset shader object cache pool. The shader object includes the corresponding basic gradient shader and dynamic sweep shader. The shader object cache pool is used to store generated shader objects. This shader object cache pool is stored in memory to improve performance and efficiency and avoid repeatedly generating the same shader objects. Each shader object contains a specific set of gradient and sweep effects, which are uniquely identified by configuration identifiers. That is, each shader object is associated with a corresponding configuration identifier for storage.
[0048] This step checks if a shader object matching the configuration identifier exists in the shader object cache pool. The query process includes a fast lookup operation in the shader object cache pool. Specifically, the current configuration identifier is compared with the configuration identifier of each shader object stored in the shader object cache pool. If a matching configuration identifier is found, it is determined that the corresponding shader object exists in the cache pool. If no matching configuration identifier is found, it is determined that a new shader object needs to be generated and stored in the cache pool for later use.
[0049] Step S5330: When a matching shader object exists, obtain the shader object from the shader object cache pool; When the previous step determines that a matching shader object exists in the shader object cache pool, the shader object is accessed and retrieved through the cache pool management mechanism. In one embodiment, after retrieving the shader object, a series of verification operations are performed, including checking the shader object's version number to ensure it matches the currently used version. If the version number does not match, the object is regenerated to avoid potential compatibility issues. Secondly, the shader object's parameters are verified to ensure they match the parameters defined in the configuration identifier. Once verification is successful, the shader object is loaded into the current rendering environment. In the rendering environment, the shader object will be used to generate dynamic display effects for the nickname. For example, the shader object is bound to the graphics rendering pipeline to ensure that the correct gradient and sweep effects are used when rendering the nickname. This process includes calls to graphics APIs, which provide methods for applying the shader object to the rendering pipeline.
[0050] Step S5340: When no matching shader object exists, construct the shader object based on the gradient color configuration parameters and the light sweep configuration parameters, and store it in the shader object cache pool along with the configuration identifier.
[0051] After querying the preset shader object cache pool in the aforementioned steps, if it is determined that no shader object matches the current configuration identifier, a new shader object will be created based on the gradient color configuration parameters and the light sweep configuration parameters. The specific steps for creating the shader object are consistent with the description in the aforementioned specific embodiments, and will not be repeated here. After constructing the corresponding shader object based on the gradient color configuration parameters and the light sweep configuration parameters, the newly created shader object is associated with the configuration identifier so that the shader object can be quickly found and reused in subsequent steps through the configuration identifier.
[0052] In this embodiment, precise configuration identifier generation and efficient cache management avoid repeatedly generating the same shader objects, reducing unnecessary computational overhead and memory consumption. This mechanism also improves response speed, as shader objects in the cache pool can be directly used for rendering without needing to be recalculated and generated each time. Furthermore, this embodiment is not only suitable for current rendering needs but also adaptable to future changes, as new shader objects can be generated and added to the cache pool at any time based on new configuration parameters without disrupting the existing cache structure and performance advantages.
[0053] For further embodiments, please refer to Figure 5 The memory management of the shader object cache pool includes the following steps: Step S7100: Construct the shading counters for each shading object in the shading object cache pool, and update the shading counters for the shading object whenever it is invoked. This step involves constructing a shader counter for each shader object to count the number of times the corresponding shader object is invoked. Specifically, during initialization, a corresponding shader counter is created for each shader object in the cache pool. This counter is a simple integer variable, and its initial value can be set to 0. The purpose of the shader counter is to record the number of times the shader object is invoked, thereby helping to assess the object's usage frequency and importance.
[0054] Each time a shader object is retrieved from the cache pool, the corresponding shader counter is incremented by 1, indicating that the shader object has been invoked once. This process is automatic, and the counter is updated every time a shader object is invoked. A higher shader counter value indicates that the shader object is used more frequently, and therefore has a greater impact on performance. This information is used for subsequent memory management operations, such as determining which objects should be kept in the cache pool, which should be removed, and which objects may require further optimization.
[0055] Step S7200: When the current memory usage of the shader object cache pool exceeds a preset threshold, remove shader objects with a lower cumulative number of shaded times from the shader counter in the shader object cache pool, so that the memory usage is lower than the preset threshold.
[0056] When the memory usage of the cache pool exceeds a preset threshold, memory is freed up by removing some infrequently used shader objects, ensuring efficient operation. The preset memory threshold can be set according to actual needs and hardware configuration. For example, if running on a device with limited memory resources, the threshold can be set lower to ensure performance issues are not caused by insufficient memory. Conversely, if running on a high-performance device, the threshold can be set higher to fully utilize available memory resources.
[0057] When memory usage exceeds a preset threshold, the usage frequency of each shader object in the cache pool is evaluated. This involves checking the shader counter for each shader object. The shader counter records the number of times each shader object is invoked, serving as a key indicator of usage frequency. Shader objects in the cache pool are sorted based on their shader counter values, and removed sequentially starting with the lowest-ranked (least frequently used) shader object. Simultaneously, the memory usage in the cache pool is monitored in real-time against the preset threshold, and the removal operation stops when the memory usage falls below the preset threshold.
[0058] In this embodiment, by introducing a shader counter, the shader object cache pool can be dynamically adjusted according to actual usage, avoiding unnecessary memory consumption, while also ensuring fast access to frequently used objects and reducing rendering latency.
[0059] For further embodiments, please refer to Figure 6 The process of generating a corresponding dynamic light-scanning shader based on the light-scanning configuration parameters includes the following steps: Step S8100: Analyze the scanning configuration parameters to determine the corresponding scanning angle, scanning color value, scanning width coefficient, and scanning movement speed; In one embodiment of the step of parsing the sweeping configuration parameters, the sweeping angle is first extracted from the sweeping configuration parameters. The sweeping angle defines the direction of the sweeping effect, such as from left to right, from top to bottom, or diagonally. This parameter can be expressed in degrees or radians. For example, if the configuration parameter specifies that the sweeping direction is from left to right, the sweeping angle is parsed as 0 degrees; if it is from top to bottom, it is parsed as 90 degrees. Trigonometric functions can be used to calculate the unit vector of the sweeping direction for use in subsequent shader programs.
[0060] Further, the sweep color value is extracted. The sweep color value defines the color of the sweep effect and is represented in RGB or hexadecimal format. For example, if the configuration parameter specifies that the sweep color is white, the color value is parsed as #FFFFFF or RGB(255, 255, 255), and these color values are converted to a format suitable for the shader program, such as normalizing to the range of 0 to 1.
[0061] Further, the sweep width coefficient is extracted. The sweep width coefficient defines the width of the sweep effect and is expressed in pixels or relative units. For example, if the configuration parameter specifies a sweep width of 10 pixels, the width coefficient is resolved to 10. This parameter is used in the shader program to control the width of the sweep effect.
[0062] Further, the sweeping movement speed is extracted. The sweeping movement speed defines the movement speed of the sweeping effect, which is expressed in pixels per second or a relative unit. For example, if the configuration parameter specifies a sweeping speed of 100 pixels per second, the movement speed is resolved to 100. This parameter is used in the shader program to control the dynamic changes of the sweeping effect, and the movement distance of the sweeping effect is calculated based on this value.
[0063] The order in which the above parameters are extracted is not limited and does not affect the inventive spirit of this application. In some embodiments, the extracted parameters are standardized to ensure consistent performance across different devices and platforms. For example, color values are converted from RGB format to normalized format, angle values are converted from degrees to radians, and width coefficients and movement speeds are converted from pixel units to relative units. Standardization improves compatibility and portability.
[0064] Step S8200: Based on the scanned color value and the scanned width coefficient, construct a color attenuation function that follows a Gaussian distribution; The color attenuation function defines a scalar attenuation coefficient, which determines the relative brightness of each point on the cross-section of the sweeping light band. The center of the band is the brightest, and the brightness smoothly attenuates to zero towards both sides. This scalar attenuation coefficient is multiplied by the sweeping color value to produce the final visual color effect. Specifically, the Gaussian distribution is defined by two parameters: mean (μ) and standard deviation (σ). The mean is fixed at 0, corresponding to the center line of the sweeping path. The standard deviation is the key parameter controlling the attenuation width, which is directly determined by the sweeping width coefficient. The larger the sweeping width coefficient, the larger the set standard deviation value, resulting in a wider and flatter Gaussian curve, and a wider sweeping effect with a smoother edge transition. Conversely, the smaller the sweeping width coefficient, the smaller the standard deviation value, the narrower the Gaussian curve, and the narrower the sweeping effect with a more rapid edge attenuation.
[0065] It's important to clarify that the color attenuation function itself only outputs a scalar value representing brightness intensity (attenuation coefficient) and does not contain color information. The application of the sweep color value (usually an RGB vector, such as pure white (1, 1, 1)) is completed in the subsequent shader rendering process. Specifically, in the fragment shader, the calculated attenuation coefficient is multiplied by the sweep color value to obtain a color effect where the sweep color is complete at the center of the light band and gradually attenuates to transparency towards both sides.
[0066] Step S8300: Based on the scanning movement speed and scanning angle, construct the dynamic displacement transformation matrix of the scanning light strip; The dynamic displacement transformation matrix is used to calculate the current position of the center line of the sweeping light strip during each frame of nickname display rendering, based on the elapsed time, sweeping light movement speed, and sweeping light angle, thereby driving the sweeping light strip to produce a dynamic movement effect. Specifically, firstly, a time base is obtained. In one embodiment, the user terminal uses a high-precision timestamp (e.g., in milliseconds or seconds) that continuously increments since the start of rendering as the base time. The sweeping light movement speed defines the distance the sweeping light strip moves per second, which is calculated based on a normalized coordinate system. Furthermore, to create a cyclic sweeping effect, the translation amount (the distance the sweeping light strip moves) is usually moduloed, allowing the sweeping light strip to cycle back to the starting point after reaching the boundary. Then, the movement direction is processed in conjunction with the sweeping light angle, which defines the angle between the sweeping light strip's movement direction and the horizontal axis of the default coordinate system.
[0067] In one embodiment, the calculated translation is projected onto a direction vector defined by the angle. The exact offset of the sweep light strip centerline in the current frame is then a two-dimensional vector. The dynamic displacement transformation matrix is a static light strip model, which is placed at the position determined by the aforementioned two-dimensional vector through matrix transformation. It's important to note that in fragment shaders, a more common method is to reverse the coordinates of the current pixel and then determine if the point is within the static light strip model. That is, a reverse translation transformation matrix needs to be constructed. The purpose of this matrix is that when a vector representing pixel coordinates is right-multiplied by this matrix, the result is a new coordinate, equivalent to translating the coordinate system in the opposite direction of the light strip movement, thus visually creating the effect of a forward movement of the static light strip model.
[0068] In practice, different implementations exist. One approach is to construct the transformation matrix for the reverse translation and then pass it as a unified variable to the shader program of the graphics processing unit. In the shader, this matrix transformation is applied to the texture coordinates of each pixel to obtain the sampled coordinates. Another implementation avoids explicitly constructing and passing the entire matrix; instead, it only passes the calculated reverse displacement vector as a unified variable to the shader. In the shader, the transformed sampled coordinates are obtained by directly adding this vector to the pixel's texture coordinates.
[0069] Step S8400: The color attenuation function and the dynamic displacement transformation matrix are superimposed and calculated to generate a shader program with dynamic sweeping effect as the dynamic sweeping shader.
[0070] The color attenuation function is superimposed with the dynamic displacement transformation matrix to generate a shader program with dynamic sweeping effect, known as the dynamic sweeping shader. Specifically, in the fragment shader of the graphics processing unit, the shader program receives uniform variables, including but not limited to the inverse displacement vector determined by the dynamic displacement transformation matrix, the standard deviation parameter used for calculating the color attenuation function, and the sweeping color value. Simultaneously, the shader obtains the texture coordinates of the current pixel.
[0071] The shader program first performs a coordinate transformation, using data provided by a dynamic displacement transformation to change the coordinates of the current pixel to determine its position relative to the moving sweeping light strip model. Specifically, it adds the texture coordinates of the current pixel to the inverse displacement vector to obtain a sampled coordinate. This sampled coordinate maps the current pixel back to a coordinate system referenced by the static light strip. Then, based on this transformed sampled coordinate, the shader program calculates the vertical distance from the point to the center line of the sweeping light strip. Next, the shader program calls a color attenuation function, taking the calculated distance value and the standard deviation parameter of the corresponding Gaussian distribution as input to calculate an attenuation coefficient between zero and one. This coefficient represents the sweeping light intensity that the current pixel should present. Further, the shader program multiplies the calculated attenuation coefficient by the configured sweeping light color value to obtain the color value contributed by the sweeping light effect to the pixel. Finally, the shader program multiplies the calculated attenuation coefficient by the configured sweeping light color value to generate the final output color contributed by the sweeping light effect to the pixel, ultimately rendering a Gaussian sweeping light effect on the nickname that dynamically changes brightness following the movement of the light strip.
[0072] In one embodiment, the above calculation process is written as a piece of Open Graphics Shader Language code, which is compiled and used as a dynamic light-sweeping shader. In another embodiment, for graphics application programming interfaces that do not support custom shaders, these calculation logics can be equivalently expressed and encapsulated using low-level graphics API instructions to achieve the same rendering effect.
[0073] In this embodiment, through precise parameter parsing and standardization, a high-quality dynamic light sweeping effect can be generated. This not only enhances the visual appeal of nicknames and improves the user's personalized experience, but also ensures the program's high performance and response speed through efficient resource management and optimized rendering process.
[0074] For further embodiments, please refer to Figure 7 It also includes the following steps: Step S9100: Monitor the visual status of the interface component carrying the user's nickname; This step ensures that rendering only occurs when the user can see the nickname, thus avoiding unnecessary computation and resource waste. Specifically, real-time monitoring of whether the UI component carrying the user's nickname is within the user's field of view can be achieved through viewport detection technology. Viewport detection determines whether a UI component is within the currently visible area (viewport). The viewport is the area of the screen that the user can currently see; its content changes accordingly when the user scrolls the page or resizes the window. By using viewport detection, it can be determined whether the UI component containing the nickname is within the user's field of view.
[0075] In one embodiment, a visibility state identifier is assigned to each interface component to indicate whether the component is currently visible. When an interface component enters the user's field of view, its visibility state identifier is set to "visible"; when the interface component moves out of the user's field of view, its visibility state identifier is set to "invisible". This process is dynamic; the visibility state of the interface components is affected when the user scrolls the page, switches tabs, or adjusts the window size.
[0076] Step S9200: When the visual state indicates that the interface component changes from visible to invisible, terminate the rendering and display operation of the user nickname; When the visibility of the UI component carrying a user's nickname changes from visible to invisible, measures need to be taken to terminate the rendering and display of the user's nickname. In one embodiment, when the visibility status identifier of the UI component changes from "visible" to "invisible," an event is triggered to notify the rendering engine to stop the rendering operation of the nickname. The rendering engine checks the current rendering task queue, determines the nickname rendering task associated with the UI component, and terminates the nickname rendering task.
[0077] In one embodiment, a series of cleanup tasks are performed when the rendering operation is terminated. First, GPU resources associated with nickname rendering, such as textures, buffers, and shader programs, are released. Releasing these resources when the nickname is no longer visible frees up more resources for other visible UI components.
[0078] Step S9300: When the visibility state indicates that the interface component has changed from invisible to visible, restart the rendering and display operation of the user nickname.
[0079] In one embodiment, when the visibility state identifier of an interface component changes from "invisible" to "visible", the rendering engine is notified to restart the rendering operation for the nickname. The rendering engine determines the nickname rendering task associated with the interface component and restarts it, ensuring that rendering can be resumed immediately when the interface component becomes visible again.
[0080] When the rendering operation is restarted, initialization work is performed. Specifically, GPU resources related to nickname rendering, such as textures, buffers, and shader programs, are first reallocated. These resources were released when the nickname was invisible and need to be reloaded. At this time, the resources and configurations required for rendering can be quickly restored based on the saved rendering parameters and state information. At the same time, the rendering state is updated to ensure that the display effect of the nickname is consistent with the user's previous settings. For example, the text content of the nickname is reloaded, the previously saved color configuration and gradient parameters are applied, and the sweeping effect is restarted. When the interface components become visible again, the user will see the same nickname display effect as before.
[0081] In some embodiments, the process of restarting the rendering operation is optimized, for example, by using asynchronous rendering technology, allowing the rendering task to be executed in a background thread. When a UI component becomes visible, an asynchronous signal can be sent to notify the background thread to restart the rendering task. This method can improve response speed and ensure the smoothness of the user interface.
[0082] In addition, resource preloading technology can be used to load potentially needed resources in advance. For example, when a UI component is close to the visible area, the resources required for nickname rendering can be preloaded. At this point, when the UI component becomes fully visible, the rendering operation can begin immediately, reducing the user's waiting time.
[0083] In this embodiment, by monitoring the visual status in real time and adjusting the rendering operation accordingly, unnecessary computation and resource waste can be avoided. This advantage of resource management is even more obvious in multi-tasking and high-concurrency scenarios.
[0084] Please see Figure 8This invention provides a nickname display device to meet one of the purposes of this application. It is a functional embodiment of the nickname display method of this application. The device includes: a scene type determination module 5100, a parameter acquisition module 5200, a shader generation module 5300, and a compositing processing module 5400. The scene type determination module 5100 is configured to respond to a user nickname display event and determine the corresponding display scene. The parameter acquisition module 5200 is configured to determine corresponding gradient color configuration parameters and sweep light configuration parameters according to preset scene priority rules and the display scene. The shader generation module 5300 is configured to generate corresponding basic gradient shaders and dynamic sweep light shaders based on the gradient color configuration parameters and the sweep light configuration parameters. The compositing processing module 5400 is configured to input the basic gradient shader and dynamic sweep light shader into a composite shader component to obtain a target blend shader for rendering and displaying the user nickname.
[0085] In a further embodiment, before the scene type determination module 5100, there are: a request initiation unit, configured to respond to a user login verification pass event and request the server to obtain the nickname decoration configuration file corresponding to the user, the nickname decoration configuration file including pre-configured gradient color configuration parameters and light sweep configuration parameters; and a request response unit, configured to receive the nickname decoration configuration text returned by the server and store it locally on the client for use in response to a user nickname display event.
[0086] In a further embodiment, the parameter acquisition module 5200 includes: a scene category determination unit, configured to determine the scene category to which the display scene belongs, the scene category including specific interactive scenes and general display scenes; a dedicated configuration determination unit, configured to determine whether the user has configured a dedicated nickname decoration configuration file corresponding to the display scene based on the scene priority rule when the scene category is a specific interactive scene; a dedicated parameter extraction unit, configured to extract the corresponding gradient color configuration parameters and sweep light configuration parameters from the client local when the dedicated nickname decoration configuration file is configured; and a general parameter extraction unit, configured to extract the gradient color configuration parameters and sweep light configuration parameters corresponding to the general display scene from the client local when the dedicated nickname decoration configuration file is not configured.
[0087] In a further embodiment, the shader generation module 5300 includes: an identifier determination unit, configured to determine a corresponding configuration identifier based on the gradient color configuration parameters and the light sweep configuration parameters; a cache query unit, configured to query whether a shader object matching the configuration identifier exists in a preset shader object cache pool, the shader object including a corresponding basic gradient shader and a dynamic light sweep shader; a cache acquisition unit, configured to acquire the shader object in the shader object cache pool when a matching shader object exists; and a shader object construction unit, configured to construct the shader object based on the gradient color configuration parameters and the light sweep configuration parameters when no matching shader object exists, and store it in the shader object cache pool along with the configuration identifier.
[0088] In a further embodiment, memory management of the shader object cache pool includes: a counter update unit, configured to construct a shader counter for each shader object in the shader object cache pool, and update the shader counter of the shader object accordingly whenever the shader object is invoked; and a memory usage adjustment unit, configured to remove shader objects with lower cumulative shader counts in the shader counter of the shader object cache pool when the current memory usage of the shader object cache pool exceeds a preset threshold, so that the memory usage is lower than the preset threshold.
[0089] In a further embodiment, the shader generation module 5300 further includes: a parameter parsing unit, configured to parse the sweeping configuration parameters and determine the corresponding sweeping angle, sweeping color value, sweeping width coefficient, and sweeping movement speed; an attenuation function construction unit, configured to construct a color attenuation function that follows a Gaussian distribution based on the sweeping color value and the sweeping width coefficient; a transformation matrix construction unit, configured to construct a dynamic displacement transformation matrix of the sweeping light band based on the sweeping movement speed and the sweeping angle; and a shader synthesis unit, configured to superimpose the color attenuation function and the dynamic displacement transformation matrix to generate a shader program with dynamic sweeping effect as the dynamic sweeping shader.
[0090] In a further embodiment, the system further includes: a visual state monitoring unit, configured to monitor the visual state of the interface component carrying the user nickname; a program termination unit, configured to terminate the rendering and display operation of the user nickname when the visual state indicates that the interface component changes from visible to invisible; and a program restart unit, configured to restart the rendering and display operation of the user nickname when the visual state indicates that the interface component changes from invisible to visible.
[0091] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 9The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a nickname display method. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions, which, when executed by the processor, can cause the processor to execute the nickname display method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0092] In this embodiment, the processor is used to execute... Figure 8 The system defines the specific functions of each module and its sub-modules. The memory stores the program code and various data required to execute these modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the nickname display device of this application. The server can call the server's program code and data to execute the functions of all sub-modules.
[0093] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the nickname display method of any embodiment of this application.
[0094] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0095] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0096] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A nickname display method characterized by comprising: The method comprises the following steps: in response to a user nickname display event, determining a display scenario corresponding to the event; determining corresponding gradient color configuration parameters and scanning light configuration parameters according to preset scenario priority rules and the display scenario; based on the gradient color configuration parameters and the scanning light configuration parameters, generating corresponding basic gradient shaders and dynamic scanning light shaders; inputting the basic gradient shaders and dynamic scanning light shaders into a composite shader component to obtain a target mixed shader for rendering and displaying the user nickname.
2. The nickname display method of claim 1, wherein Before determining the display scenario corresponding to the user nickname display event in response to the user nickname display event, the method comprises the following steps: in response to a user login verification pass event, requesting a server to obtain a nickname dressing configuration file corresponding to the user, the nickname dressing configuration file comprising preconfigured gradient color configuration parameters and scanning light configuration parameters; storing the nickname dressing configuration file returned by the server locally on the client side for corresponding calling in response to the user nickname display event.
3. The nickname display method of claim 1, wherein Determining corresponding gradient color configuration parameters and scanning light configuration parameters according to preset scenario priority rules and the display scenario comprises the following steps: determining a scenario category to which the display scenario belongs, the scenario category comprising a specific interaction scenario and a general display scenario; when the scenario category is the specific interaction scenario, determining whether the user has configured a special nickname dressing configuration file corresponding to the display scenario based on the scenario priority rules; when the special nickname dressing configuration file is configured, extracting corresponding gradient color configuration parameters and scanning light configuration parameters from the client side; when the special nickname dressing configuration file is not configured, extracting gradient color configuration parameters and scanning light configuration parameters corresponding to the general display scenario from the client side.
4. The nickname display method of claim 1, wherein Based on the gradient color configuration parameters and the scanning light configuration parameters, generating corresponding basic gradient shaders and dynamic scanning light shaders comprises the following steps: based on the gradient color configuration parameters and the scanning light configuration parameters, determining corresponding configuration identifiers; querying whether there is a shader object matching the configuration identifier in a preset shader object cache pool, the shader object comprising corresponding basic gradient shaders and dynamic scanning light shaders; when there is a matching shader object, obtaining the shader object in the shader object cache pool; when there is no matching shader object, constructing the shader object based on the gradient color configuration parameters and the scanning light configuration parameters, storing the shader object associated with the configuration identifier in the shader object cache pool.
5. The nickname display method of claim 4, wherein Memory management of the shader object cache pool comprises the following steps: constructing a shading counter of each shader object in the shader object cache pool, and updating the shading counter of the shader object whenever the shader object is called; when the current memory usage of the shader object cache pool exceeds a preset threshold, removing the shader object with a lower accumulated shading number in the shading counter in the shader object cache pool so that the memory usage is lower than the preset threshold.
6. The nickname display method of claim 1, wherein Based on the scanning light configuration parameters, generating corresponding dynamic scanning light shaders further comprises the following steps: The light scanning configuration parameters are analyzed to determine corresponding light scanning angles, light scanning color values, light scanning width coefficients, and light scanning moving speeds; Based on the light scanning color values and the light scanning width coefficients, a color attenuation function corresponding to a Gaussian distribution is constructed; Based on the light scanning moving speeds and the light scanning angles, a dynamic displacement transformation matrix of a light scanning light band is constructed; The color attenuation function and the dynamic displacement transformation matrix are superimposed to generate a shader program with a dynamic light scanning effect as the dynamic light scanning shader.
7. The nickname display method according to any one of claims 1 to 6, characterized by, Further comprising: monitoring the visible state of an interface component bearing the user nickname; terminating the rendering and display operation of the user nickname when the visible state indicates that the interface component changes from visible to invisible; restarting the rendering and display operation of the user nickname when the visible state indicates that the interface component changes from invisible to visible.
8. A nickname display apparatus characterized by comprising: Comprising: a scene type determination module configured to determine a display scene corresponding to a user nickname display event in response to the event; a parameter acquisition module configured to determine corresponding gradient color configuration parameters and light scanning configuration parameters according to preset scene priority rules and the display scene; a shader generation module configured to generate corresponding basic gradient shaders and dynamic light scanning shaders based on the gradient color configuration parameters and the light scanning configuration parameters; a synthesis processing module configured to input the basic gradient shaders and the dynamic light scanning shaders into a composite shader component to obtain a target mixed shader for rendering and displaying the user nickname.
9. A computer device comprising a central processing unit and a memory, characterized in that The central processing unit is configured to call and run a computer program stored in the memory to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable instructions store a computer program implemented according to the method of any one of claims 1 to 7, which is called and run by a computer to perform the steps included in the corresponding method.