Loaded icon display method and loaded icon display device

By determining target vectors and position parameters for each pixel in loading icons, the method improves rendering effects and reduces CPU load, addressing the issues of dynamic display methods.

CN119149153APending Publication Date: 2024-12-17GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411165103.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing methods for displaying loading icons dynamically increase CPU load and reduce the rendering effect, leading to interface refresh jams.

Method used

A method for displaying loading icons by determining target vectors and position parameters for each pixel point based on a reference vector, adjusting pixel values, and displaying the icon using these parameters to improve rendering while reducing CPU resource usage.

Benefits of technology

The method enhances the rendering effect of loading icons while minimizing CPU resource consumption, ensuring smoother and more accurate visual representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149153A_ABST
    Figure CN119149153A_ABST
Patent Text Reader

Abstract

The invention provides a loaded icon display method and a loaded icon display device. The method is applied to an image processing unit. The method comprises the steps of determining a target vector of each pixel point based on each pixel point and an original point in a target loading icon in response to a loading progress of target data; determining a target position parameter of each pixel point based on the target vector and the reference vector of each pixel point; wherein the reference vector is used for indicating a vector of pixel points on the outer boundary from the original point to the initial loading position of the target loading icon; determining a pixel value of each pixel point based on the target position parameter and the loading progress of each pixel point; and displaying the target loading icon based on the pixel value of each pixel point. According to the method, the rendering effect of the loaded icon can be improved under the condition of reducing CPU resource occupation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicles, and more specifically, to a method for displaying a loading icon and a device for displaying a loading icon. Background Art

[0002] In the prior art, in order to allow the user to clearly perceive the current loading status of the data, it is usually indicated that the current data is loading, or the current loading status is indicated by a loading icon.

[0003] Currently, loading icons are usually displayed dynamically by image overlay; however, this display method will increase the CPU load, cause interface refresh jams, and reduce the rendering effect of loading icons. Therefore, how to improve the rendering effect of loading icons while reducing CPU resource usage has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a method for displaying a loading icon and a device for displaying a loading icon. The method can improve the rendering effect of the loading icon while reducing the occupation of CPU resources.

[0005] In a first aspect, a method for displaying a loading icon is provided, and the method is applied to an image processing unit; the method comprises: in response to the loading progress of target data, determining a target vector of each pixel point based on each pixel point and an origin in a target loading icon; determining a target position parameter of each pixel point based on the target vector of each pixel point and a reference vector; wherein the reference vector is used to indicate a vector of a pixel point on an outer boundary from the origin to a starting loading position of the target loading icon; determining a pixel value of each pixel point based on the target position parameter of each pixel point and the loading progress; and displaying the target loading icon based on the pixel value of each pixel point.

[0006] The above technical scheme, in response to the loading progress of the target data, determines the target vector of each pixel point based on each pixel point and the origin in the target loading icon, and determines the target position parameter of each pixel point based on the target vector of each pixel point and the reference vector; since the reference vector indicates the vector of the pixel point on the outer boundary from the origin to the starting loading position of the target loading icon, the target position parameter of each pixel point is determined by the target vector of each pixel point and the reference vector, and the target position parameter can be determined from a finer granularity (pixel point), thereby improving the accuracy of the target position parameter based on the starting loading position of the target loading icon. On this basis, based on the target position parameter of each pixel point and the loading progress, the pixel value of each pixel point is determined and the target loading icon is displayed, which can improve the rendering effect of the target loading icon; in addition, compared with dynamically displaying the loading icon by image overlay, the display method in the present application is applied to the image processing unit, which can reduce CPU resource usage and reduce system load.

[0007] In combination with the first aspect, in some possible implementations, the method also includes: for each pixel point, based on the target vector and the reference vector, determining the target projection parameters of the pixel point and the target function corresponding to the pixel point; wherein the target projection parameters are used to indicate the projection of the target vector on the reference vector, and the target function is used to indicate the mapping relationship between projection parameters and position parameters; based on the target function corresponding to the pixel point and the target projection parameters, determining the target position parameters of the pixel point.

[0008] The above technical scheme determines the target projection parameters of the pixel point and the target function corresponding to the pixel point based on the target vector and the reference vector; since the target projection parameters indicate the projection of the target vector on the reference vector, the target projection parameters are determined by the target vector and the reference vector, which can ensure the accuracy of the target projection parameters, and thus the target position parameters of the pixel point are determined based on the target function and the target projection parameters corresponding to the pixel point, which can improve the accuracy of the target position parameters.

[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: determining, for each pixel point, a target angle range to which the target angle between the target vector and the reference vector belongs; and determining the target function corresponding to the pixel point based on the target angle range.

[0010] The above technical scheme determines the target angle range to which the target angle between the target vector and the reference vector belongs, and determines the target function corresponding to the pixel point based on the target angle range; since the target angle range is strongly correlated with the position of the pixel point, determining the target function corresponding to the pixel point through the target angle range can ensure the accuracy of the target function.

[0011] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if the target angle range is a first preset range, determining that the objective function corresponding to the pixel point is a first preset function; wherein the projection parameter in the first preset function is negatively correlated with the position parameter; if the target angle range is a second preset range, determining that the objective function corresponding to the pixel point is a second preset function; wherein the projection parameter in the second preset function is positively correlated with the position parameter, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

[0012] In the above technical scheme, if the target angle range is the first preset range, the target function corresponding to the pixel point is determined to be the first preset function; if the target angle range is the second preset range, the target function corresponding to the pixel point is determined to be the second preset function; since the projection parameter is negatively correlated with the position parameter in the first preset function, and the projection parameter is positively correlated with the position parameter in the second preset function, that is, in the entire target loading icon, the position parameter gradually increases, so that during the target data loading process, the display of the target loading icon is smoother.

[0013] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: for each pixel point, adjusting the pixel value based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point; wherein the target pixel value is positively correlated with the target position parameter; based on the target pixel value of each pixel point, displaying the target loading icon.

[0014] The above technical solution adjusts the pixel value based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point, and displays the target loading icon based on the target pixel value of each pixel point; since the target pixel value is positively correlated with the target position parameter, the pixel value is adjusted by the target position parameter of the pixel point, so that the displayed target loading icon can have a gradient color, thereby improving the visual effect.

[0015] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: obtaining smoothing parameters of each pixel point; for each pixel point, obtaining a target adjustment parameter of the pixel point based on the sum of the target position parameter and the smoothing parameter; adjusting the pixel value based on the target adjustment parameter to obtain the target pixel value.

[0016] The above technical scheme obtains the target adjustment parameter of the pixel point based on the sum of the target position parameter and the smoothing parameter, adjusts the pixel value based on the target adjustment parameter to obtain the target pixel value, and displays the target loading icon based on the target pixel value of each pixel point. This can ensure that the edges of the displayed target loading icon are smooth, thereby making the rendering effect of the target loading icon better.

[0017] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: determining a progress parameter corresponding to the loading progress; for each pixel point, if the target position parameter is less than or equal to the progress parameter, determining that the pixel value is a first preset pixel value; if the target position parameter is greater than the progress parameter, determining that the pixel value is a second preset pixel value; wherein the first preset pixel value is not equal to the second preset pixel value.

[0018] The above technical scheme determines the progress parameter corresponding to the loading progress. For each pixel point, if the target position parameter is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value; if the target position parameter is greater than the progress parameter, the pixel value is determined to be a second preset pixel value; since the first preset pixel value is not equal to the second preset pixel value, by comparing the progress parameter with the target position parameter, the pixel value of the pixel point in the target loading icon can be distinguished by the progress parameter, so that as the progress parameter increases, the target loading icon changes dynamically, thereby improving the user experience.

[0019] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: in response to the loading progress of the target data, determining whether the loading progress is an update progress; if the loading progress is the update progress, determining the target vector of each pixel point based on each pixel point and the origin in the target loading icon.

[0020] The above technical solution, in response to the loading progress of the target data, determines whether the loading progress is an update progress, and if the loading progress is an update progress, updates the pixel value of each pixel point; compared to updating the pixel value of each pixel point upon detecting the loading progress of the target data, this solution can avoid multiple pixel value updates for the same loading progress, thereby reducing resource waste.

[0021] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: in response to the loading progress of the target data, determining whether there is a historical loading progress; wherein the historical loading progress is used to indicate the historical progress of the target data detected at a historical moment; if the historical loading progress exists, determining whether the loading progress is equal to the historical loading progress; if the loading progress is not equal to the historical loading progress, determining that the loading progress is the update progress.

[0022] In a second aspect, a display device for a loading icon is provided, which is configured in an image processing unit; the device includes: a first determination module, used to determine the target vector of each pixel point in the target loading icon based on each pixel point and the origin in response to the loading progress of the target data; a second determination module, used to determine the target position parameter of each pixel point based on the target vector of each pixel point and a reference vector; wherein the reference vector is used to indicate the vector of the pixel point on the outer boundary from the origin to the starting loading position of the target loading icon; a third determination module, used to determine the pixel value of each pixel point based on the target position parameter of each pixel point and the loading progress; an icon display module, used to display the target loading icon based on the pixel value of each pixel point.

[0023] In a third aspect, a vehicle is provided, comprising a memory and a processor, wherein the memory is used to store executable program code; the processor is used to call and run the executable program code from the memory, so that the vehicle executes the method for displaying a loading icon in the above-mentioned first aspect or any possible implementation of the first aspect.

[0024] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method for displaying a loading icon in the above-mentioned first aspect or any possible implementation of the first aspect.

[0025] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method for displaying a loading icon in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a scene schematic diagram of a method for displaying a loading icon provided in an embodiment of the present application;

[0027] Figure 2 is a schematic flow chart of a method for displaying a loading icon provided in an embodiment of the present application;

[0028] Figure 3 It is a scene schematic diagram of another method for displaying a loading icon provided in an embodiment of the present application;

[0029] Figure 4 is a schematic flow chart of another method for displaying a loading icon provided in an embodiment of the present application;

[0030] Figure 5 is a schematic flow chart of another method for displaying a loading icon provided in an embodiment of the present application;

[0031] Figure 6 It is a structural schematic diagram of a display device for loading icons provided in an embodiment of the present application;

[0032] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0034] 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 technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0035] It should be noted that the loading icon is usually displayed dynamically by image overlay; however, this display method will increase the CPU load, cause the interface refresh to be stuck, and reduce the rendering effect of the loading icon. In view of this, the present application provides a method for displaying a loading icon and a device for displaying a loading icon, which can improve the rendering effect of the loading icon while reducing the CPU resource occupation.

[0036] Figure 1 It is a scene diagram of a method for displaying a loading icon provided in an embodiment of the present application.

[0037] For example, Figure 1 (a) is a schematic diagram of a target loading icon; Figure 1 (b) in the figure is a schematic diagram of another target loading icon.

[0038] For example, Figure 1As shown in (a), the starting loading position of the target loading icon is the Y axis. In response to the loading progress of the target data, based on each pixel point in the target loading icon and the origin, the target vector of each pixel point is determined. For each pixel point, the target vector is normalized to obtain a target unit vector. The target unit vector is multiplied by the reference vector to obtain a target projection parameter of the target vector on the reference vector, that is, the cosine value of the target angle between the target vector and the reference vector; based on the horizontal coordinate of each pixel point, the target angle range to which the target angle between the target vector and the reference vector belongs is determined, and through the target angle range and the preset range, the target function corresponding to the pixel point is determined to indicate the mapping relationship between the projection parameter and the position parameter; based on the target function corresponding to the pixel point and the target projection parameter, the target position parameter of the pixel point is determined.

[0039] Furthermore, if the loading progress of the target data is detected to be 50%, the pixel value is adjusted based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point, the target pixel value is positively correlated with the target position parameter, and the target loading icon is displayed based on the target pixel value of each pixel point. That is, if the target position parameter is less than or equal to 50%, dark gray is displayed, and if the target position parameter is greater than 50%, light gray is displayed.

[0040] For example, Figure 1 As shown in (b), in response to the loading progress of the target data, the target vector of each pixel is determined based on each pixel in the target loading icon and the origin; the target position parameter of each pixel is determined based on the target vector and the reference vector of each pixel. Further, the smoothing parameter of each pixel is obtained; for each pixel, the target adjustment parameter of the pixel is obtained based on the sum of the target position parameter and the smoothing parameter, and the pixel value is adjusted based on the target adjustment parameter to obtain the target pixel value; and then the target loading icon is displayed based on the target pixel value of each pixel.

[0041] Specifically, based on the sum of the target position parameter and the smoothing parameter, the target adjustment parameter of the pixel point is obtained, and the pixel value is adjusted based on the target adjustment parameter to obtain the target pixel value. For example, if the background color in the target loading icon is white and the coloring is gray, since the target position parameter gradually increases as the loading progress is continuously updated, the target loading icon presents a gray value light gray gradient effect as the loading progress is continuously updated.

[0042] Figure 2 It is a schematic flowchart of a method for displaying a loading icon provided in an embodiment of the present application.

[0043] For example, Figure 2 The method shown may be executed by a graphics processing unit (GPU) of the vehicle.

[0044] For example, Figure 2 As shown, the method 200 includes the following processes:

[0045] S210 , in response to the loading progress of the target data, determining a target vector of each pixel point based on each pixel point and an origin in the target loading icon.

[0046] Exemplarily, the target loading icon is used to indicate a ring loading icon. The ring loading icon can be a circular ring loading icon, a square ring loading icon, etc. The ring loading icon can be determined according to actual conditions and is not specifically limited here.

[0047] For example, the target loading icon is a donut-shaped loading icon. Specifically, a first circle and a second circle are obtained, and the donut-shaped loading icon is determined according to the first circle and the second circle. The radius of the first circle is smaller than the radius of the second circle, and the difference between the radius of the second circle and the radius of the first circle is smaller than a preset threshold. The preset threshold can be set to 2 cm, 3 cm, etc.

[0048] It is understandable that, in response to the loading progress of the target data, the pixel value of each pixel in the target loading icon needs to be updated so that the display effect of the target record icon is consistent with the loading progress.

[0049] For example, each time the loading progress of the target data is detected, the pixel value of each pixel in the target loading icon can be updated. The loading progress can also be compared with the historical loading progress. If there is a historical loading progress that is the same as the loading progress, the pixel value of the pixel in the target loading icon will not be updated. If there is no historical loading progress that is the same as the loading progress, the pixel value of the pixel in the target loading icon will be updated.

[0050] Exemplarily, in response to the loading progress of the target data, each pixel in the target loading icon is obtained, and based on each pixel in the target loading icon and the origin, a vector from the origin to each pixel is determined, that is, a target vector of each pixel. For example, based on the coordinates of each pixel in the target loading icon and the coordinates of the origin, a target vector from the origin to each pixel is determined.

[0051] Exemplarily, the GPU has high data throughput and large-scale parallel processing capabilities, and the GPU can obtain the coordinates of each pixel in the target loading icon in parallel. Specifically, the shader programming in the GPU is parallel graphics programming, which obtains the coordinates of the pixel in the image, and determines the distance from the coordinates of the pixel in the image to the coordinate origin, determines the coordinates of each pixel in the target loading icon based on the distance from the coordinates of the pixel in the image to the coordinate origin, and determines the target vector from the origin to each pixel based on the coordinates of each pixel in the target loading icon and the origin coordinates.

[0052] For example, the target loading icon is a donut-shaped loading icon, and the outer radius of the donut-shaped loading icon is 5 cm, and the inner radius is 4 cm. The coordinates of each pixel in the image are obtained, and the distance from each pixel to the origin is determined. If the distance from the pixel to the origin is less than or equal to 5 cm, and greater than or equal to 4 cm, it is determined that the corresponding pixel is located in the target loading icon.

[0053] S220, determining a target position parameter of each pixel point based on the target vector and the reference vector of each pixel point.

[0054] It should be noted that the reference vector is used to indicate the vector of the pixel points on the outer boundary of the starting loading position of the target loading icon from the origin. For example, the target loading icon is a ring-shaped loading icon, and the outer radius of the ring-shaped loading ring is 1. If the starting loading position of the target loading icon is the vertical axis, and the loading direction is clockwise, the reference vector can be (0,1); if the starting position of the target loading icon is the horizontal axis, and the loading direction is clockwise, the reference vector can be (1,0).

[0055] Exemplarily, the target position parameters of each pixel are determined based on the target vector and the reference vector of each pixel. Specifically, for each pixel, the target projection parameters of the pixel and the target function corresponding to the pixel are determined based on the target vector and the reference vector; wherein the target projection parameters are used to indicate the projection of the target vector on the reference vector, and the target function is used to indicate the mapping relationship between the projection parameters and the position parameters; based on the target function and the target projection parameters corresponding to the pixel, the target position parameters of the pixel are determined.

[0056] Exemplarily, the target unit vector is normalized to obtain the target unit vector, and the target projection parameter of the target unit vector on the reference vector is determined to be the cosine value of the target angle between the target vector and the reference vector through the target unit vector and the reference vector. Then, the target projection parameters of the pixel points on the target vector at the same target angle are equal, and their corresponding target position parameters are equal, thereby ensuring the rendering effect of the target loading icon.

[0057] For example, based on the target unit vector and the reference vector of each pixel, the target projection parameter of each pixel is determined. Specifically, the dot product of the target unit vector of each pixel and the reference vector is determined as the target projection parameter of each pixel. For example, if the coordinates of pixel a are (0.5, 0.5), the pixel a is first normalized to obtain the target unit vector u = a / |a| of pixel a, where |a| is the modulus of pixel a, |a| is 0.71, the target unit vector u is (0.707, 0.707), and the reference vector is (1, 0), then the target projection parameter d of the pixel is determined to be 0.707.

[0058] The above technical scheme determines the target projection parameters of the pixel point and the target function corresponding to the pixel point based on the target vector and the reference vector; since the target projection parameters indicate the projection of the target vector on the reference vector, the target projection parameters are determined by the target vector and the reference vector, which can ensure the accuracy of the target projection parameters, and thus the target position parameters of the pixel point are determined based on the target function and the target projection parameters corresponding to the pixel point, which can improve the accuracy of the target position parameters.

[0059] Exemplarily, for each pixel point, based on the target vector and the reference vector, determine the target function corresponding to the pixel point. Specifically, for each pixel point, determine the target angle range to which the target angle between the target vector and the reference vector belongs, and based on the target angle range, determine the target function corresponding to the pixel point. Specifically, for each pixel point, determine whether the horizontal coordinate of the pixel point is greater than or equal to 0. If the horizontal coordinate of the pixel point is greater than or equal to 0, determine that the target angle range to which the target angle belongs is 0-π. If the horizontal coordinate of the pixel point is less than 0, determine that the target angle range to which the target angle belongs is π-2π, and based on the target angle range, determine the target function corresponding to the pixel point.

[0060] For example, the coordinates of pixel a are (0.5, 0.5), the target vector is determined to be (0.5, 0.5), the reference vector is (0, 1), the dot product of the target vector and the reference vector is 0.5, the modulus of the target vector is determined to be 0.71, the modulus of the reference vector is 1, and the cosine value d of the target angle between the target vector and the reference vector is 0.5 / (1*0.71), that is, d is 0.707. At this time, since the horizontal coordinate 0.5 of the pixel point is greater than 0, the target angle range of pixel a is determined to be 0-π, and the target function is selected according to the target angle range, and the target position parameter is determined by the target function and the target projection parameter d.

[0061] Exemplarily, since one cosine value corresponds to two angles between 0-2π, the target angle range to which the target vector of the pixel point belongs and the target angle of the reference vector is determined by the coordinates of the pixel point, and a unique angle can be determined by the cosine value.

[0062] The above technical scheme determines the target angle range to which the target angle between the target vector and the reference vector belongs, and determines the target function corresponding to the pixel point based on the target angle range; since the target angle range is strongly correlated with the position of the pixel point, determining the target function corresponding to the pixel point through the target angle range can ensure the accuracy of the target function.

[0063] Exemplarily, for each pixel point, the target angle range between the target vector and the reference vector is determined, and the relationship between the target angle range and the preset angle range is determined. If the target angle range is a first preset range, the target function corresponding to the pixel point is determined to be the first preset function, and the projection parameter and the position parameter in the first preset function are negatively correlated; if the target angle range is a second preset range, the target function corresponding to the pixel point is determined to be the second preset function, and the projection parameter and the position parameter in the second preset function are positively correlated, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

[0064] Exemplarily, the first preset range is [0, π], and the second preset range is (π, 2π).

[0065] For example, the reference vector base=(0, 1) is determined, and the target angle between the target vector and the reference vector is determined to be θ. Specifically, the first preset range is [0, π], and the first preset function corresponding to the first preset range is k=degrees(acos(d)) / 360, d is the projection parameter, k is the position parameter, k∈[0, 0.5]; the second preset range is (π, 2π), and the second preset function corresponding to the second preset range is k=(360-degrees(acos(d))) / 360, d is the projection parameter, k is the position parameter, k∈(0.5, 1). If the coordinate of pixel point a is (0.5, 0.5), it is determined that the horizontal coordinate of pixel point a is greater than 0, and the target angle range corresponding to pixel point a is determined to be [0, π], and the target function is determined to be k=degrees(acos(d)) / 360.

[0066] In the above technical scheme, if the target angle range is the first preset range, the target function corresponding to the pixel point is determined to be the first preset function; if the target angle range is the second preset range, the target function corresponding to the pixel point is determined to be the second preset function; since the projection parameter is negatively correlated with the position parameter in the first preset function, and the projection parameter is positively correlated with the position parameter in the second preset function, that is, in the entire target loading icon, the position parameter gradually increases, so that during the target data loading process, the display of the target loading icon is smoother.

[0067] S230, determining the pixel value of each pixel based on the target position parameter of each pixel and the loading progress.

[0068] In one example, the loading progress may be the loading progress of the target data detected for the first time, that is, there is no historical loading progress; it may also be the same loading progress as the historical loading progress, or a loading progress different from the historical loading progress. If the loading progress of the target data is detected, the pixel value of each pixel is updated based on the target position parameter of each pixel and the loading progress. It can be understood that the target data is used to indicate the data for displaying the loading progress based on the target loading icon.

[0069] For example, the target data is the target software. When the target software starts to be downloaded, the first loading progress obtained is 2%, and the pixel value of each pixel point can be updated; as the target software continues to download, the loading progress obtained is 4%, and the loading progress can be compared with the historical loading progress of 2% to determine whether it is equal to the historical loading progress. If it is not equal to the historical loading progress, the pixel value of each pixel point is updated.

[0070] Exemplarily, in response to the loading progress of the target data, a progress parameter corresponding to the loading progress is determined, and the progress parameter is used to indicate the loading progress of the target data in the target loading icon. For each pixel point, if the target position parameter is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value, and if the target position parameter is greater than the progress parameter, the pixel value is determined to be a second preset pixel value, the first preset pixel value is not equal to the second preset pixel value, the first preset pixel value indicates the color pixel value of the target loading icon, and the second preset pixel value indicates the background pixel value of the target loading icon.

[0071] For example, if the loading progress of the target data is 10%, the progress parameter corresponding to the loading progress is determined to be 0.1. For each pixel, if the target position parameter corresponding to the pixel is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value, and the first pixel value is blue (0.14, 0.51, 0.82); if the target position parameter corresponding to the pixel is greater than the progress parameter, the pixel value is determined to be a second preset pixel value white (1, 1, 1), then blue is the color of the target loading icon, and white is the background color of the target loading icon.

[0072] It is understandable that the above-mentioned method is only one method that may be used in practical applications, and does not limit the preset pixel value used in practical applications. The specific preset pixel value can be determined according to the actual situation and is not limited here.

[0073] The above technical scheme determines the progress parameter corresponding to the loading progress. For each pixel point, if the target position parameter is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value; if the target position parameter is greater than the progress parameter, the pixel value is determined to be a second preset pixel value; since the first preset pixel value is not equal to the second preset pixel value, by comparing the progress parameter with the target position parameter, the pixel value of the pixel point in the target loading icon can be distinguished by the progress parameter, so that as the progress parameter increases, the target loading icon changes dynamically, thereby improving the user experience.

[0074] In another example, in response to the loading progress of the target data, it is determined whether the loading progress is an update progress. If the loading progress is an update progress, the pixel value of each pixel is determined based on the target position parameter of each pixel and the loading progress. Specifically, if the loading progress of the target data is detected, it is determined whether there is a historical loading progress, and the historical loading progress is used to indicate the historical progress of the target data detected at a historical moment; if there is no historical loading progress, it is determined that the loading progress is an update progress; if there is a historical loading progress, it is determined whether the loading progress is equal to the historical loading progress; if the loading progress is not equal to the historical loading progress, it is determined that the loading progress is an update progress.

[0075] For example, if the loading progress of the target data is 10%, and there is no historical loading progress, it is determined that 10% is the update progress, and the pixel value of each pixel is determined based on the target position parameter and the loading progress of each pixel. Alternatively, if it is detected that the loading progress of the target data is 10%, and there is a historical loading progress, the historical loading progress includes 1%, 3%, and 8%, and the loading progress is not equal to the historical loading progress, and it is determined that the loading progress is the update progress, then the pixel value of each pixel is determined based on the target position parameter and the loading progress of each pixel. Alternatively, if it is detected that the loading progress of the target data is 10%, and there is a historical loading progress, the historical loading progress includes 1%, 3%, 8%, and 10%, and there is a historical loading progress equal to the loading progress, the pixel value of each pixel is not updated.

[0076] It is understandable that if there is a historical loading progress equal to the loading progress, the pixel value of each pixel displayed in the target loading icon is equal to the updated pixel value, then there is no need to update the pixel value of each pixel in the target loading icon to avoid waste of resources.

[0077] In the above technical solution, if the loading progress of the target data is detected, it is determined whether the loading progress is an update progress. If the loading progress is an update progress, the pixel value of each pixel point is updated. Compared with updating the pixel value of each pixel point when the loading progress of the target data is detected, this solution can avoid multiple pixel value updates for the same loading progress, thereby reducing resource waste.

[0078] Optionally, based on the target position parameters of each pixel point and the loading progress, the method for determining the pixel value of each pixel point can refer to the method in the aforementioned disclosed embodiment, which will not be repeated here.

[0079] S240, displaying a target loading icon based on the pixel value of each pixel point.

[0080] Exemplarily, when the pixel value of each pixel is determined, the target loading icon is displayed based on the pixel value of each pixel. Since the pixel value of each pixel is determined based on the target position parameter and the loading progress of each pixel, it can ensure that the target loading icon is continuously updated according to the loading progress of the target data, and the target loading icon is dynamically displayed.

[0081] In one example, for each pixel point, the pixel value is adjusted based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point, the target pixel value is positively correlated with the target position parameter, and the target loading icon is displayed based on the target pixel value of each pixel point.

[0082] Exemplarily, the target position parameter of the pixel point is determined as the target adjustment parameter, and the product of the target adjustment parameter and the pixel value of each pixel point is determined as the target pixel value. For example, the target loading icon is mapped to a circular loading icon, and the outer circle radius of the circular loading icon is 1. If the progress parameter corresponding to the loading progress of the target data is less than or equal to the target position parameter, the pixel value of the corresponding pixel point is determined to be blue (0.14, 0.51, 0.82); if the progress parameter corresponding to the loading progress of the target data is greater than the target position parameter, the pixel value of the corresponding pixel point is determined to be white (1, 1, 1). Since the target position parameter gradually increases with the continuous update of the loading progress, the starting position in the target loading icon is blue as the loading progress is continuously updated, and the pixel value near the end position is light blue.

[0083] The above technical solution adjusts the pixel value based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point, and displays the target loading icon based on the target pixel value of each pixel point; since the target pixel value is positively correlated with the target position parameter, the pixel value is adjusted by the target position parameter of the pixel point, so that the displayed target loading icon can have a gradient color, thereby improving the visual effect.

[0084] In another example, a smoothing parameter of each pixel point is obtained; for each pixel point, a target adjustment parameter of the pixel point is obtained based on the sum of the target position parameter and the smoothing parameter, and the pixel value is adjusted based on the target adjustment parameter to obtain a target pixel value; and then a target loading icon is displayed based on the target pixel value of each pixel point.

[0085] The above technical scheme obtains the target adjustment parameter of the pixel point based on the sum of the target position parameter and the smoothing parameter, adjusts the pixel value based on the target adjustment parameter to obtain the target pixel value, and displays the target loading icon based on the target pixel value of each pixel point. This can ensure that the edges of the displayed target loading icon are smooth, thereby making the rendering effect of the target loading icon better.

[0086] Exemplarily, based on the sum of the target position parameter and the smoothing parameter, the target adjustment parameter of the pixel point is obtained, and the pixel value is adjusted based on the target adjustment parameter to obtain the target pixel value. For example, if the background color in the target loading icon is white and the coloring is blue, since the target position parameter gradually increases as the loading progress is continuously updated, then as the loading progress is continuously updated, the starting position in the target loading icon is blue, and the position close to the end position is light blue.

[0087] Exemplarily, smoothing processing can be performed by processing the pixel value of each pixel in the target loading icon through smoothstep, and the smoothing parameter can be determined according to smooth interpolation. By smoothing the target loading icon, the pixel value of the target loading icon can be smoothly changed during dynamic display.

[0088] Optionally, the smoothing parameters in the smoothing process may refer to the methods in the subsequent disclosed embodiments, which will not be described in detail here.

[0089] In the above technical scheme, if the loading progress of the target data is detected, the target vector of each pixel point is determined based on each pixel point and the origin in the target loading icon, and the target position parameter of each pixel point is determined based on the target vector of each pixel point and the reference vector; since the reference vector indicates the vector of the pixel point on the outer boundary from the origin to the starting loading position of the target loading icon, the target position parameter of each pixel point is determined by the target vector of each pixel point and the reference vector, and the target position parameter can be determined from a finer granularity (pixel point), thereby improving the accuracy of the target position parameter based on the starting loading position of the target loading icon. On this basis, based on the target position parameter of each pixel point and the loading progress, the pixel value of each pixel point is determined and the target loading icon is displayed, which can improve the rendering effect of the target loading icon; in addition, compared with dynamically displaying the loading icon by image overlay, the display method in the present application is applied to the image processing unit, which can reduce CPU resource usage and reduce system load.

[0090] Figure 3 It is a scene schematic diagram of another method for displaying a loading icon provided in an embodiment of the present application.

[0091] For example, Figure 3As shown, the target loading icon is a circular loading icon, the first circular radius R1 of the circular loading icon is greater than the second circular radius R2, the difference between R1 and R2 is less than the preset threshold, the starting loading position of the target loading icon is the Y axis, and it is loaded clockwise, and the reference vector is base(0,1). In response to the loading progress of the target data, it is determined that the target loading icon needs to be updated, then based on each pixel point and the origin in the target loading icon, the target vector of each pixel point is determined, and the target angle between the target vector and the reference vector is θ, and the range of θ is 0-2π. For each pixel point, the target vector is normalized to obtain the target unit vector, and the target unit vector is multiplied by the reference vector to obtain the target projection parameter of the target vector on the reference vector, that is, the cosine value of the target angle between the target vector and the reference vector. For example, the pixel point is p(0.5,0.5), and the target vector a corresponding to the pixel point p is (0.5,0.5). The target vector a is normalized to obtain the target unit vector A (0.707,0.707). The target unit vector A(0.707,0.707) is dot-multiplied with the reference vector (0,1), and the target projection parameter d corresponding to the pixel point p is 0.707.

[0092] According to the horizontal coordinate of each pixel point, determine the target angle range to which the target angle between the target vector of the pixel point and the reference vector belongs; for example, the pixel point is p (0.5, 0.5), and the horizontal coordinate of the pixel point is greater than 0, then the target angle range is determined to be [0, π], and the target angle range is the first preset range ([0, π]). The target function corresponding to the pixel point p is determined to be k = degrees (acos (d)) / 360, k is the target position parameter, d is the target projection parameter, the target projection parameter d of the pixel point p (0.5, 0.5) is 0.707, then k is determined to be 0.125 through calculation.

[0093] It can be understood that since the angle determined by the target projection parameters is not unique within the range of 0-2π (one cosine value corresponds to two angles), by determining the target angle range of each pixel point and narrowing the angle range to 0-π, a unique angle can be determined by the objective function, thereby determining a unique position parameter through the angle.

[0094] Furthermore, when the target position parameter of each pixel point is determined in parallel, the pixel value of each pixel point is determined based on the target position parameter k and the loading progress. For example, if the loading progress of the target data is 10%, the progress parameter is 0.1, and assuming that the target position parameter of pixel point 1 is 0.88, the target position parameter is greater than the progress parameter, and the pixel value corresponding to pixel point 1 is determined to be white (1,1,1); assuming that the target position parameter of pixel point 2 is 0.08, the target position parameter is less than the progress parameter, and the pixel value corresponding to pixel point 2 is determined to be blue (0.14,0.51,0.82).

[0095] In order to make the progress color of the pixel points in the target loading icon present a gradient effect, the pixel value can be adjusted by the target position parameter to obtain the target pixel value of the pixel point, so as to display the target loading icon based on the target pixel value of each pixel point. Specifically, the product of the target position parameter and the pixel value can be determined as the target pixel value of the pixel point. Since the target position parameter increases from 0 to 1, adjusting the pixel value by the target position parameter can make the target loading icon present a gradient effect.

[0096] For example, the target loading icon can also be smoothed, that is, the smoothing parameters of each pixel in the target loading icon are determined by the smoothstep function, and the pixel value is adjusted by the smoothing parameters of each pixel and the target position parameter to achieve smoothing of the target loading icon, which can ensure the rendering effect of the target recording icon. The adjustment expression of the pixel value of the pixel can be expressed as follows:

[0097] fragColor=(c+k+q)*color

[0098] Where c represents the smoothing parameter, k represents the target position parameter, q represents the pixel range coefficient, which is a preset value, color represents the pixel value of the pixel point, and fragColor represents the target pixel value of the pixel point. The smoothing parameter c can be determined according to the position of the pixel point, c=c1+c2+c3, c1 represents the cross-section smoothing parameter, c2 represents the inner edge smoothing parameter, and c3 represents the outer edge smoothing parameter.

[0099] In order to obtain the cross-sectional smoothing parameter c1, the target position parameter equal to the progress parameter of the loading progress is used as the cross-sectional parameter k1, as shown in Figure 3 As shown, the section parameter k1 will change with the update of the loading progress. For example, at the first moment, the section parameter is the parameter corresponding to section 1, and at the second moment, the section parameter is the parameter corresponding to section 2. The expression of c1 is as follows:

[0100] c1=smoothstep(k1-0.01,k1+0.01,k)

[0101] Among them, when the target position parameter k of the pixel point in the target loading icon is less than or equal to k1-0.01, the value of c1 is 0; when the target position parameter k of the pixel point in the target loading icon is greater than or equal to k1+0.01, the value of c1 is 1; when the target position parameter k of the pixel point in the target loading icon is greater than k1-0.01 and less than k1+0.01, c1 is positively correlated with k, and as k increases from k1-0.01 to k1+0.01, c1 increases from 0 to 1.

[0102] In order to obtain the inner edge smoothing parameter c2 and the outer edge smoothing parameter c3, the target distance S from each pixel point to the origin in the display interface of the target loading icon is first obtained; the expression of c2 is expressed as follows:

[0103] c2=smoothstep(R2-0.01, R2+0.01, S)

[0104] Among them, when the target distance S is less than or equal to R2-0.01, the value of c2 is 0; when the target distance S is greater than or equal to R2+0.01, the value of c2 is 1; when the target distance S is greater than R2-0.01 and less than R2+0.01, c2 is positively correlated with S, and as S increases from R2-0.01 to R2+0.01, c2 increases from 0 to 1.

[0105] The expression of c3 is as follows:

[0106] c3=smoothstep(R1-0.01, R1+0.01, S)

[0107] Among them, when the target distance S is less than or equal to R1-0.01, the value of c3 is 0; when the target distance S is greater than or equal to R1+0.01, the value of c3 is 1; when the target distance S is greater than R1-0.01 and less than R1+0.01, c3 is positively correlated with S, and when S increases from R1-0.01 to R1+0.01, c3 increases from 0 to 1.

[0108] It is understandable that, since GPU shader programming is parallel graphics programming, it is possible to execute the processing of each pixel in the target loading icon in parallel, thereby displaying the target loading icon based on the target pixel value. Since the target position parameter gradually increases as the loading progress is continuously updated, the target loading icon changes color gradually as the loading progress is continuously updated.

[0109] The above technical scheme, in response to the loading progress of the target data, determines the target vector of each pixel point based on each pixel point and the origin in the target loading icon, and determines the target position parameter of each pixel point based on the target vector of each pixel point and the reference vector; since the reference vector indicates the vector of the pixel point on the outer boundary from the origin to the starting loading position of the target loading icon, the target position parameter of each pixel point is determined by the target vector of each pixel point and the reference vector, and the target position parameter can be determined from a finer granularity (pixel point), thereby improving the accuracy of the target position parameter based on the starting loading position of the target loading icon. On this basis, based on the target position parameter of each pixel point and the loading progress, the pixel value of each pixel point is determined and the target loading icon is displayed, which can improve the rendering effect of the target loading icon; in addition, compared with dynamically displaying the loading icon by image overlay, the display method in the present application is applied to the image processing unit, which can reduce CPU resource usage and reduce system load.

[0110] Figure 4 It is a schematic flowchart of another method for displaying a loading icon provided in an embodiment of the present application.

[0111] For example, Figure 4 As shown, the method 400 includes the following processes:

[0112] S401, in response to the loading progress of the target data, determining the target vector of each pixel point based on each pixel point and the origin in the target loading icon.

[0113] Exemplarily, in response to the loading progress of the target data, it is determined whether the loading progress is an update progress, and the update progress is a loading progress that is not equal to the historical loading progress. If the loading progress is an update progress, the target vector of each pixel point is determined based on each pixel point and the origin in the target loading icon.

[0114] Exemplarily, the target loading icon is used to indicate a ring loading icon. The ring loading icon can be a circular ring loading icon, a square ring loading icon, etc. The ring loading icon can be determined according to actual conditions and is not specifically limited here.

[0115] Exemplarily, the GPU has high data throughput and large-scale parallel processing capabilities, and the GPU can obtain the coordinates of each pixel in the target loading icon in parallel. Specifically, the shader programming in the GPU is parallel graphics programming, which obtains the coordinates of the pixel in the image, and determines the distance from the coordinates of the pixel in the image to the coordinate origin, determines the coordinates of each pixel in the target loading icon based on the distance from the coordinates of the pixel in the image to the coordinate origin, and determines the target vector from the origin to each pixel based on the coordinates of each pixel in the target loading icon and the origin coordinates.

[0116] S402, determining target projection parameters based on the target vector and the reference vector of the pixel point.

[0117] Exemplarily, the target projection parameters are used to indicate the projection of the target vector on the reference vector. The target vector of the pixel point is normalized to obtain the target unit vector. The target unit vector is dot-multiplied with the reference vector to obtain the target projection parameters of the target vector on the reference vector, that is, the cosine value of the target angle between the target vector and the reference vector.

[0118] S403, determining a target angle range to which a target angle between a target vector of a pixel point and a reference vector belongs.

[0119] Exemplarily, the target angle range between the target vector of the pixel point and the reference vector is determined by the coordinates of the pixel point. Specifically, it is determined whether the horizontal coordinate of the pixel point is greater than or equal to 0. If the horizontal coordinate of the pixel point is greater than or equal to 0, the target angle range is determined to be [0, π]; if the horizontal coordinate of the pixel point is less than 0, the target angle range is determined to be (π, 2π).

[0120] S404: Determine the target function corresponding to the pixel point based on the target angle range.

[0121] Exemplarily, for each pixel point, the target angle range between the target vector and the reference vector is determined, and the size relationship between the target angle range and the preset angle range is determined. If the target angle range is a first preset range that is less than or equal to the preset angle, the target function corresponding to the pixel point is determined to be the first preset function, and the projection parameter and the position parameter in the first preset function are negatively correlated; if the target angle range is a second preset range that is greater than the preset angle, the target function corresponding to the pixel point is determined to be the second preset function, and the projection parameter and the position parameter in the second preset function are positively correlated, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

[0122] S405, determining the target position parameters of the pixel point based on the target function and the target projection parameters corresponding to the pixel point.

[0123] Exemplarily, since the objective function indicates a mapping relationship between projection parameters and position parameters, when the objective function and the target projection parameters corresponding to the pixel point are determined, the target position parameters of the pixel point are determined.

[0124] It should be noted that the target projection parameters of the pixel point and the target function corresponding to the pixel point are determined based on the target vector and the reference vector; since the target projection parameters indicate the projection of the target vector on the reference vector, determining the target projection parameters through the target vector and the reference vector can ensure the accuracy of the target projection parameters, thereby determining the target position parameters of the pixel point based on the target function and the target projection parameters corresponding to the pixel point, which can improve the accuracy of the target position parameters.

[0125] S406: Determine a progress parameter corresponding to the loading progress.

[0126] It should be noted that there is no order for the execution of step S406 and steps S402-S405. Step S406 may be executed first, or steps S402-S405 may be executed first. No specific limitation is made here.

[0127] Exemplarily, if the loading progress of the target data is detected, the progress parameter corresponding to the loading progress is determined. For example, if the loading progress is 10%, the progress parameter corresponding to the loading progress is determined to be 0.1; if the loading progress is 50%, the progress parameter corresponding to the loading progress is determined to be 0.5.

[0128] S407, determine whether the target position parameter of each pixel point is greater than the progress parameter; if not, execute S408; if yes, execute S409.

[0129] For example, since the target position parameter of each pixel is used to indicate the position of each pixel in the target loading icon, and the progress parameter is used to indicate the loading progress of the target data in the target loading icon, by mapping each pixel and the loading progress of the target data to the same reference system, that is, mapping them to the target position parameter and the progress parameter, the accuracy of the target loading icon display can be ensured during the target data loading process, thereby improving the rendering effect.

[0130] S408: Determine that the pixel value of the pixel point is a first preset pixel value.

[0131] Exemplarily, if the pixel value of a pixel point is less than or equal to the progress parameter, the pixel value of the pixel point is determined to be the first preset pixel value. For example, if the loading progress of the target data is detected to be 10%, the progress parameter corresponding to the loading progress is determined to be 0.1. For each pixel point, if the target position parameter corresponding to the pixel point is less than or equal to the progress parameter, the pixel value is determined to be the first preset pixel value, and the first pixel value is blue (0.14, 0.51, 0.82).

[0132] S409: Determine that the pixel value of the pixel point is a second preset pixel value.

[0133] Exemplarily, if the pixel value of a pixel point is greater than the progress parameter, the pixel value of the pixel point is determined to be a second preset pixel value. For example, if the loading progress of the target data is detected to be 10%, the progress parameter corresponding to the loading progress is determined to be 0.1. For each pixel point, if the target position parameter corresponding to the pixel point is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value, and the first pixel value is blue (0.14, 0.51, 0.82); if the target position parameter corresponding to the pixel point is greater than the progress parameter, the pixel value is determined to be a second preset pixel value white (1, 1, 1), then blue is the color of the target loading icon, and white is the background color of the target loading icon.

[0134] S410: Display a target loading icon based on the pixel value of each pixel point.

[0135] Exemplarily, when the pixel value of each pixel is determined, the target loading icon is displayed based on the pixel value of each pixel. Since the pixel value of each pixel is determined based on the target position parameter and the loading progress of each pixel, it can ensure that the target loading icon is continuously updated according to the loading progress of the target data, and the target loading icon is dynamically displayed.

[0136] Figure 5 It is a schematic flowchart of another method for displaying a loading icon provided in an embodiment of the present application.

[0137] For example, Figure 5 As shown, the method 500 includes the following processes:

[0138] S510 , in response to the loading progress of the target data, determining a target vector of each pixel point based on each pixel point and an origin in the target loading icon.

[0139] Exemplarily, in response to the loading progress of the target data, the pixel value of each pixel is updated. It can be understood that the target data is used to indicate the data for displaying the loading progress based on the target loading icon.

[0140] Exemplarily, the target loading icon is used to indicate a ring loading icon. The ring loading icon can be a circular ring loading icon, a square ring loading icon, etc. The ring loading icon can be determined according to actual conditions and is not specifically limited here.

[0141] Exemplarily, each pixel in the target loading icon is obtained, and based on each pixel in the target loading icon and the origin, a vector from the origin to each pixel is determined, that is, a target vector of each pixel. For example, based on the coordinates of each pixel in the target loading icon and the coordinates of the origin, a target vector from the origin to each pixel is determined.

[0142] Exemplarily, the GPU has high data throughput and large-scale parallel processing capabilities, and the GPU can obtain the coordinates of each pixel in the target loading icon in parallel. Specifically, the shader programming in the GPU is parallel graphics programming, which obtains the coordinates of the pixel in the image, and determines the distance from the coordinates of the pixel in the image to the coordinate origin, determines the coordinates of each pixel in the target loading icon based on the distance from the coordinates of the pixel in the image to the coordinate origin, and determines the target vector from the origin to each pixel based on the coordinates of each pixel in the target loading icon and the origin coordinates.

[0143] S520, determining a target position parameter of each pixel point based on the target vector and the reference vector of each pixel point.

[0144] Exemplarily, for each pixel point, based on the target vector and the reference vector, the target projection parameters of the pixel point and the target function corresponding to the pixel point are determined, the target projection parameters are used to indicate the projection of the target vector on the reference vector, and the target function is used to indicate the mapping relationship between the projection parameters and the position parameters; based on the target function and the target projection parameters corresponding to the pixel point, the target position parameters of the pixel point are determined.

[0145] Specifically, for each pixel point, determine the target angle range to which the target angle between the target vector and the reference vector belongs; if the target angle range is a first preset range, determine that the target function corresponding to the pixel point is the first preset function, and the projection parameter is negatively correlated with the position parameter in the first preset function; if the target angle range is a second preset range, determine that the target function corresponding to the pixel point is the second preset function, and the projection parameter is positively correlated with the position parameter in the second preset function, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

[0146] S530, determining the pixel value of each pixel based on the target position parameter of each pixel and the loading progress.

[0147] Exemplarily, in response to the loading progress of the target data, the pixel value of each pixel is updated based on the target position parameter of each pixel and the loading progress. It can be understood that the target data is used to indicate the data for displaying the loading progress based on the target loading icon.

[0148] Exemplarily, in response to the loading progress of the target data, a progress parameter corresponding to the loading progress is determined, and the progress parameter is used to indicate the loading progress of the target data in the target loading icon. For each pixel point, if the target position parameter is less than or equal to the progress parameter, the pixel value is determined to be a first preset pixel value, and if the target position parameter is greater than the progress parameter, the pixel value is determined to be a second preset pixel value, the first preset pixel value is not equal to the second preset pixel value, the first preset pixel value indicates the color pixel value of the target loading icon, and the second preset pixel value indicates the background pixel value of the target loading icon.

[0149] S540, obtaining a target adjustment parameter based on the sum of the target position parameter and the smoothing parameter corresponding to each pixel point.

[0150] Exemplarily, based on the sum of the target position parameter and the smoothing parameter, the target adjustment parameter of the pixel point is obtained, and the pixel value is adjusted based on the target adjustment parameter to obtain the target pixel value. It can be understood that the smoothing process can be to process the pixel value of each pixel point in the target loading icon through smoothstep, and the smoothing parameter can be determined according to smooth interpolation. By smoothing the target loading icon, the pixel value of the target loading icon can be smoothly changed during the dynamic display process.

[0151] Optionally, the smoothing parameters of each pixel point may refer to the method in the aforementioned disclosed embodiment, which will not be described in detail here.

[0152] S550, adjusting the pixel value of the pixel point based on the target adjustment parameter to obtain a target pixel value.

[0153] Exemplarily, the pixel value of the pixel point is adjusted based on the target adjustment parameter to obtain the target pixel value. For example, the target adjustment parameter may be multiplied by the pixel value corresponding to the pixel point to obtain the target pixel value.

[0154] S560: Display a target loading icon based on the target pixel value of each pixel.

[0155] Exemplarily, when the target pixel value of each pixel is determined, the target loading icon is displayed based on the target pixel value of each pixel; for example, if the background color of the target loading icon is white and the coloring is blue, since the target position parameter gradually increases as the loading progress is continuously updated, then as the loading progress is continuously updated, the starting position in the target loading icon is blue, and the position near the end position is light blue.

[0156] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0157] Combination of the above Figures 1 to 5 The display method of the loading icon provided in the embodiment of the present application is described in detail; Figure 6 and Figure 7 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0158] Figure 6 It is a structural schematic diagram of a display device for loading icons provided in an embodiment of the present application.

[0159] Wherein, the device is configured in an image processing unit.

[0160] For example, Figure 6 As shown, the display device 600 for loading an icon includes:

[0161] The first determination module 610 is used to determine the target vector of each pixel point based on each pixel point and the origin in the target loading icon in response to the loading progress of the target data;

[0162] The second determination module 620 is used to determine the target position parameter of each pixel point based on the target vector and the reference vector of each pixel point; wherein the reference vector is used to indicate the vector of the pixel points on the outer boundary from the origin to the starting loading position of the target loading icon;

[0163] The third determination module 630 is used to determine the pixel value of each pixel point based on the target position parameter of each pixel point and the loading progress;

[0164] Icon display module 640: used to display the target loading icon based on the pixel value of each pixel point.

[0165] Optionally, as an embodiment, the second determining module 620 is specifically configured to:

[0166] For each pixel point, based on the target vector and the reference vector, the target projection parameters of the pixel point and the target function corresponding to the pixel point are determined; wherein the target projection parameters are used to indicate the projection of the target vector on the reference vector, and the target function is used to indicate the mapping relationship between the projection parameters and the position parameters; based on the target function and the target projection parameters corresponding to the pixel point, the target position parameters of the pixel point are determined.

[0167] Optionally, as an embodiment, the second determining module 620 is specifically configured to:

[0168] For each pixel point, a target angle range to which a target angle between a target vector and a reference vector belongs is determined; based on the target angle range, an objective function corresponding to the pixel point is determined.

[0169] Optionally, as an embodiment, the second determining module 620 is specifically configured to:

[0170] If the target angle range is the first preset range, the objective function corresponding to the pixel point is determined to be the first preset function; wherein the projection parameter in the first preset function is negatively correlated with the position parameter; if the target angle range is the second preset range, the objective function corresponding to the pixel point is determined to be the second preset function; wherein the projection parameter in the second preset function is positively correlated with the position parameter, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

[0171] Optionally, as an embodiment, the display device 600 for loading icons includes an adjustment module, and the adjustment module is specifically used for:

[0172] For each pixel point, the pixel value is adjusted based on the target position parameter of the pixel point to obtain the target pixel value of the pixel point; wherein the target pixel value is positively correlated with the target position parameter;

[0173] The icon display module 640 is specifically used for:

[0174] Based on the target pixel value of each pixel, a target loading icon is displayed.

[0175] Optionally, as an embodiment, the adjustment module is specifically used for:

[0176] Obtain smoothing parameters for each pixel point; for each pixel point, obtain a target adjustment parameter for the pixel point based on the sum of the target position parameter and the smoothing parameter; adjust the pixel value based on the target adjustment parameter to obtain a target pixel value.

[0177] Optionally, as an embodiment, the third determining module 630 is specifically configured to:

[0178] Determine the progress parameter corresponding to the loading progress; for each pixel point, if the target position parameter is less than or equal to the progress parameter, determine the pixel value to be a first preset pixel value; if the target position parameter is greater than the progress parameter, determine the pixel value to be a second preset pixel value; wherein the first preset pixel value is not equal to the second preset pixel value.

[0179] Optionally, as an embodiment, the first determining module 610 is specifically configured to:

[0180] In response to the loading progress of the target data, it is determined whether the loading progress is an update progress; if the loading progress is an update progress, a target vector of each pixel point in the target loading icon is determined based on each pixel point and an origin.

[0181] Optionally, as an embodiment, the first determining module 610 is specifically configured to:

[0182] In response to the loading progress of the target data, determine whether there is a historical loading progress; wherein the historical loading progress is used to indicate the historical progress of the target data detected at a historical moment; if there is a historical loading progress, determine whether the loading progress is equal to the historical loading progress; if the loading progress is not equal to the historical loading progress, determine that the loading progress is an update progress.

[0183] It should be noted that the display device 600 for loading icons is implemented in the form of a functional unit. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0184] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0185] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0186] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.

[0187] For example, Figure 7 As shown, the vehicle 700 includes: a memory 710 and a processor 720, wherein the memory 710 stores an executable program code 730, and the processor 720 is used to call and execute the executable program code 730 to perform a method for displaying a loading icon.

[0188] Exemplarily, the memory 710 can be used to store relevant programs of the method for displaying a loading icon provided in the embodiment of the present application; the processor 720 can call the relevant programs of the method for displaying a loading icon stored in the memory 710 to execute the method for displaying a loading icon in the embodiment of the present application; for example, in response to the loading progress of the target data, based on each pixel point and the origin in the target loading icon, determine the target vector of each pixel point; based on the target vector and the reference vector of each pixel point, determine the target position parameter of each pixel point; wherein the reference vector is used to indicate the vector of the pixel points on the outer boundary from the origin to the starting loading position of the target loading icon; based on the target position parameter and the loading progress of each pixel point, determine the pixel value of each pixel point; based on the pixel value of each pixel point, display the target loading icon.

[0189] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0190] In the case of dividing each functional module according to each function, the device may also include a first determination module, a second determination module, a third determination module, an icon display module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0191] It should be understood that the device provided in this embodiment is used to execute the above-mentioned method for displaying a loading icon, and thus can achieve the same effect as the above-mentioned implementation method.

[0192] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing related program codes, etc.

[0193] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0194] In addition, the device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a method for displaying a loading icon provided in the above embodiments.

[0195] The present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a method for displaying a loading icon provided in the above-mentioned embodiment. Among them, computer-readable storage media may include, but are not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVD), Compact Disc Read-Only Memory (CD-ROM), microdrives and magneto-optical disks, Read-Only Memory (ROM), Random Access Memory (RAM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Dynamic Random Access Memory (DRAM), Video Random Access Memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and / or data.

[0196] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a method for displaying a loading icon provided in the above-mentioned embodiment.

[0197] Among them, the vehicle, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0198] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0199] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for displaying a loading icon, characterized in that: The method is applied to an image processing unit; the method comprises: In response to the loading progress of the target data, based on each pixel point and the origin in the target loading icon, determining the target vector of each pixel point; Determine the target position parameters of each pixel point based on the target vector and the reference vector of each pixel point; wherein the reference vector is used to indicate the vector of the pixel points on the outer boundary from the origin to the starting loading position of the target loading icon; Determining a pixel value of each pixel based on a target position parameter of each pixel and the loading progress; Based on the pixel value of each pixel point, the target loading icon is displayed.

2. The method according to claim 1, characterized in that The determining the target position parameter of each pixel point based on the target vector and the reference vector of each pixel point includes: For each pixel point, based on the target vector and the reference vector, determine the target projection parameter of the pixel point and the objective function corresponding to the pixel point; wherein the target projection parameter is used to indicate the projection of the target vector on the reference vector, and the objective function is used to indicate the mapping relationship between the projection parameter and the position parameter; Based on the objective function corresponding to the pixel point and the target projection parameter, a target position parameter of the pixel point is determined.

3. The method according to claim 2, characterized in that The step of determining, for each pixel point, an objective function corresponding to the pixel point based on the target vector and the reference vector includes: For each pixel point, determining a target angle range to which a target angle between the target vector and the reference vector belongs; Based on the target angle range, an objective function corresponding to the pixel point is determined.

4. The method according to claim 3, characterized in that The determining the objective function corresponding to the pixel point based on the target angle range includes: If the target angle range is a first preset range, determining that the target function corresponding to the pixel point is a first preset function; wherein the projection parameter in the first preset function is negatively correlated with the position parameter; If the target angle range is a second preset range, the target function corresponding to the pixel point is determined to be a second preset function; wherein, the projection parameter in the second preset function is positively correlated with the position parameter, and the lower limit value of the first preset range is less than the upper limit value of the second preset range.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: For each pixel point, adjusting the pixel value based on the target position parameter of the pixel point to obtain a target pixel value of the pixel point; wherein the target pixel value is positively correlated with the target position parameter; The displaying the target loading icon based on the pixel value of each pixel point includes: Based on the target pixel value of each pixel point, the target loading icon is displayed.

6. The method according to claim 5, characterized in that The method further comprises: Obtaining smoothing parameters of each pixel point; The step of adjusting the pixel value for each pixel based on the target position parameter of the pixel to obtain the target pixel value of the pixel includes: For each of the pixel points, based on the sum of the target position parameter and the smoothing parameter, a target adjustment parameter of the pixel point is obtained; The pixel value is adjusted based on the target adjustment parameter to obtain the target pixel value.

7. The method according to claim 1, characterized in that The determining the pixel value of each pixel based on the target position parameter of each pixel and the loading progress includes: Determine a progress parameter corresponding to the loading progress; For each pixel point, if the target position parameter is less than or equal to the progress parameter, determining the pixel value to be a first preset pixel value; If the target position parameter is greater than the progress parameter, determining the pixel value to be a second preset pixel value; The first preset pixel value is not equal to the second preset pixel value.

8. The method according to claim 1, characterized in that The step of determining the target vector of each pixel point in response to the loading progress of the target data based on each pixel point and the origin in the target loading icon includes: In response to the loading progress of the target data, determining whether the loading progress is an update progress; If the loading progress is the update progress, a target vector of each pixel is determined based on each pixel and an origin in the target loading icon.

9. The method according to claim 8, characterized in that The step of determining, in response to the loading progress of the target data, whether the loading progress is an update progress includes: In response to the loading progress of the target data, determining whether there is a historical loading progress; wherein the historical loading progress is used to indicate the historical progress of the target data detected at a historical moment; If the historical loading progress exists, determining whether the loading progress is equal to the historical loading progress; If the loading progress is the updating progress, the method includes: If the loading progress is not equal to the historical loading progress, the loading progress is determined to be the update progress.

10. A display device for a loading icon, characterized in that: The device is configured in an image processing unit; the device comprises: A first determination module, configured to determine a target vector of each pixel point based on each pixel point and an origin in the target loading icon in response to the loading progress of the target data; A second determination module is used to determine the target position parameters of each pixel point based on the target vector and the reference vector of each pixel point; wherein the reference vector is used to indicate the vector of the pixel points on the outer boundary from the origin to the starting loading position of the target loading icon; A third determination module, configured to determine a pixel value of each pixel point based on a target position parameter of each pixel point and the loading progress; An icon display module is used to display the target loading icon based on the pixel value of each pixel point.