Page display method and device, equipment and storage medium
By determining and writing the adaptive template specified size parameters on the server, the computing resource consumption problem during client page display is solved, achieving smoother page rendering and better user experience.
Patent Information
- Application Number
- CN202411207377.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, when adjusting the template size parameters of client page content, terminal computing resources need to be consumed, resulting in stuttering of page display and it is difficult to take into account both display effects and resource consumption.
After receiving the client page data request on the server, the appropriate template specifies the size parameters according to the terminal device type to reduce the calculation burden on the client during rendering.
By reducing the computing burden on clients, improving page rendering efficiency, reducing the risk of lag on terminal devices, and improving user experience.
Smart Images

Figure CN119248394A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a page display method, device, equipment and storage medium. Background Art
[0002] At present, the page content of the client is usually displayed in a waterfall flow, that is, a page is divided into multiple relatively independent areas, which can be understood as different templates, and each template is used to display corresponding content. In order to ensure the display effect of the page content of the client on various terminals with different display capabilities, the values of the specified size parameters of the template need to be adaptively adjusted in the terminal, and the values of other size parameters except the specified size parameters can be fixed; for example: the specified size parameter is the template height, the value of the template height needs to be adaptively adjusted in the terminal, and the value of the template width is fixed.
[0003] However, the process of adaptively adjusting the value of the specified size parameter consumes computing resources of the terminal, which may cause adverse effects such as freezing of the page display.
[0004] Therefore, how to balance the display effect of the page and the resource consumption of the terminal has become an urgent problem to be solved. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a page display method, device, equipment and storage medium to achieve a balance between page display effect and terminal resource consumption. The specific technical solution is as follows:
[0006] In a first aspect of the implementation of the present application, a page display method is first provided, which is applied to a server; the method comprises:
[0007] Receiving a page data request for a target page sent by a target client;
[0008] Determine the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes: determining the initial page data including the template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, writing the matched target value as the value of the specified size parameter of the template into the initial page data; the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the target value for the specified size parameter that matches both the template identifier and the display identifier of any template is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier;
[0009] Feedback the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server.
[0010] In a second aspect of the implementation of the present application, a page display method is also provided, which is applied to a target client; the method comprises:
[0011] Sending a page data request for a target page to a server, so that the server executes the steps of the page display method applied to the server;
[0012] Based on the target page data fed back by the server, the target page is rendered. In a third aspect of the implementation of the present application, a page display device is also provided, which is applied to the server; the device comprises:
[0013] A receiving module, for receiving a page data request for a target page sent by a target client; a determining module, for determining the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes determining initial page data including template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both a template identifier of the template and a current display identifier, writing the matched target value into the initial page data as the value of the specified size parameter of the template; the current display identifier includes at least a device type identifier of a target terminal on which the target client is currently running; the target value for a specified size parameter that matches both a template identifier of any template and a display identifier is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier;
[0014] A feedback module is used to feed back the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server. In a fourth aspect of the implementation of the present application, a page display device is also provided, which is applied to the target client; the device comprises:
[0015] A first sending module, used for sending a page data request for a target page to a server, so that the server executes the steps of the page display method applied to the server;
[0016] A rendering module is used to render the target page based on the target page data fed back by the server. In another aspect of the implementation of the present application, a server is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0017] Memory, used to store computer programs;
[0018] The processor is used to implement the page display method executed by the above server when executing the program stored in the memory.
[0019] In another aspect of the implementation of the present application, there is also provided a terminal device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0020] Memory, used to store computer programs;
[0021] The processor is used to implement the page display method executed by the above-mentioned terminal device when executing the program stored in the memory.
[0022] In another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned page display methods is implemented.
[0023] In another aspect of the implementation of the present application, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any of the page display methods described above.
[0024] In the embodiment of the present application, after receiving the page data request for the target page sent by the target client, for each template of the target page, if the server stores a target value for the specified size parameter that matches the template identifier and the current display identifier of the template, the matching target value is written into the initial page data as the value of the specified size parameter of the template, and the page data of the target page is determined. The target client renders the target page based on the page data of the target page fed back by the server. Thus, since the server, in the process of determining the page data of the target page, writes the matching target value into the initial page data as the value of the specified size parameter of the template in response to storing the target value for the specified size parameter that matches the template identifier and the current display identifier of the template, when rendering the page, the target client does not need to consume resources to calculate the value of the specified size parameter that has been written into the page data. It can be seen that the scheme of the present application can take into account both the display effect of the page and the resource consumption of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0026] Figure 1 A schematic diagram of a page display method flow provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of a target page provided in an embodiment of the present application;
[0028] Figure 3 A schematic diagram of template data provided in an embodiment of the present application;
[0029] Figure 4 A schematic diagram of another page display method flow provided in an embodiment of the present application;
[0030] Figure 5 A schematic diagram of a flow chart of another page display method provided in an embodiment of the present application;
[0031] Figure 6 A schematic diagram of a cloud acquisition strategy flow provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram of a cloud data training strategy flow provided in an embodiment of the present application;
[0033] Figure 8 A schematic diagram of the structure of a page display device provided in an embodiment of the present application;
[0034] Fig. 9 A schematic diagram of the structure of another page display device provided in an embodiment of the present application;
[0035] Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0036] Fig.11 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0038] In order to achieve a balance between page display effect and terminal resource consumption, the embodiments of the present application provide a page display method, apparatus, device and storage medium.
[0039] The following first introduces a page display method provided in an embodiment of the present application. The page display method provided in this embodiment is applied to a server; the server and the client perform data exchange, and the server can be deployed on a server. Of course, the server can also be deployed on other electronic devices, such as tablet computers, desktop computers, etc.; this application does not limit this.
[0040] Among them, a page display method provided by an embodiment of the present application may include:
[0041] Receiving a page data request for a target page sent by a target client;
[0042] Determine the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes: determining the initial page data including the template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, writing the matched target value as the value of the specified size parameter of the template into the initial page data; the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the target value for the specified size parameter that matches both the template identifier and the display identifier of any template is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier;
[0043] Feedback the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server. In the embodiment of the present application, after receiving the page data request for the target page sent by the target client, for each template of the target page, if the server stores a target value for the specified size parameter that matches the template identifier and the current display identifier of the template at the same time, the matching target value is written into the initial page data as the value of the specified size parameter of the template, and the page data of the target page is determined. The target client renders the target page based on the page data of the target page fed back by the server. Thus, since the server, in the process of determining the page data of the target page, responds to the storage of the target value for the specified size parameter that matches the template identifier and the current display identifier of the template at the same time, the matching target value is written into the initial page data as the value of the specified size parameter of the template, so that: when the target client renders the page, it does not need to consume resources for calculation for the value of the specified size parameter written in the page data. It can be seen that the solution of the present application can take into account both the display effect of the page and the resource consumption of the terminal.
[0044] A page display method provided in an embodiment of the present application is introduced below in conjunction with the accompanying drawings.
[0045] like Figure 1 As shown, a page display method provided in an embodiment of the present application may include the following steps:
[0046] S101, receiving a page data request for a target page sent by a target client;
[0047] The target client can send a page data request for the target page to the server when the display condition for the target page is met. Usually, in the client, there are many ways to meet the display condition for the target page. For example, the user can enter the target page by clicking the corresponding page entry. At this time, the target client detects that the user clicks the corresponding page entry and can determine that the display condition is met. The user slides up, down, left, and right on other pages to enter the target page. The target client detects that the user slides up, down, left, and right on other pages and can determine that the display condition is met. Of course, the display conditions of the target pages of different clients may be different, and this application does not limit the display conditions of the target page. In this application, the target client detects that the display condition of the target client for the target page is met and can send a page data request for the target page to the server. It should be noted that any client can be used as the target client of this application, and this application introduces the page display method based on the interaction process between the target client and the server.
[0048] Figure 2 A schematic diagram of an exemplary target page of the present application, such as Figure 2 As shown, the target page of the present application is divided into multiple relatively independent areas, which can be called templates. Each template is used to display corresponding content. Specifically, each template can display corresponding pictures, texts, buttons, etc. The content in each template is fixed.
[0049] Each template in the target page is relatively independent. For the target page, there is a situation where the current screen only displays a part of the templates in the target page. In this case, the target client can only obtain the template data of the template to be displayed on the current screen, such as Figure 2, the current screen only displays the waterfall template model1, waterfall template model2, waterfall template model3 and waterfall template model4 in the target page. At this time, only the template data of the four modules of waterfall template model1, waterfall template model2, waterfall template model3 and waterfall template model4 can be obtained. It can be understood that in a specific application scenario, the user can operate the target client, for example, slide the target page to view the contents of other templates of the target page. For example, the current screen displays template A, template B and template C of the target page, and the user slides the target page. The templates to be displayed on the screen are template D, template E and template F, then the template data for template D, template E and template F is requested from the server. The user's sliding operation can be a display condition for the target page.
[0050] Therefore, in one implementation, the page data request of the target page may be a request for a portion of the template data in the target page. Exemplarily, the page data request may carry the requested template ID to complete the request for the template. In this scenario, the target client may obtain the template IDs of the various templates of the target page from the server in advance. Exemplarily, the page data request may not carry the requested template ID, and the server may send the data of the template to be displayed on the screen to the client. Specifically, the server may determine the template data of the template to be sent to the client based on the position of the content of the target page displayed on the current screen and the user's operation. For example, the current screen displays the content of position 1 in the target page, and the user's operation is to slide down. After sliding down, the content to be displayed on the screen is the content of position 2. Then the server sends the template data of each template corresponding to position 2 in the target page.
[0051] Of course, in another implementation, the page data request may also be a request for the entire target page, that is, a request for all template data in the target page.
[0052] S102, determining the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes: determining the initial page data including the template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, writing the matched target value as the value of the specified size parameter of the template into the initial page data; the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the target value for the specified size parameter that matches both the template identifier and any display identifier of any template is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier;
[0053] The template data of each template in the initial page data is the template data of each template required to be requested by the target client. That is, the template data of each template in the initial page data is the template data of each template targeted by the page data request of the target page. Usually, the template data of each template in the initial page data does not contain a specified size parameter.
[0054] In the present application, the specified size parameter may be the height or width of the template; in the solution of the present application, for different scenarios, there may be a situation where the height or width of the template is fixed; for the situation where the value of the height of the template is fixed, the value of the width of the template needs to be adaptively adjusted, and in this case, the specified size parameter is the width of the template; for the situation where the value of the width of the template is fixed, the value of the height of the template needs to be adaptively adjusted, and in this case, the specified size parameter is the height of the template.
[0055] In the present application, other size parameters of the template other than the specified size parameters are fixed, and it is not just the size values that are fixed in a narrow sense. In a broad sense, other size parameters of the template can be fixed ratios of the same type of size parameters relative to the screen. For example, the width of the template is fixed. In one implementation, the fixed value of the width of the template is 300PX, where PX (pixel) represents pixels. In any device, the width of the template is 300PX; in one implementation, the width of the template is fixed to 2 / 5 of the screen width. For a device with a screen resolution of 800PX*1400PX, the number of pixels occupied by the template in the width of the device can be 320PX, and for a device with a screen resolution of 700PX*1200PX, the number of pixels occupied by the template in the width of the device can be 280PX.
[0056] Figure 3 is a schematic diagram of an exemplary template data. Figure 3 As shown, in this application, the template data of each template can be an independent json dictionary structure, which can contain the text data, image data and / or buttons to be displayed by this template, wherein the image data can be the data of the image itself or the image address, and can also contain information such as the font, color and / or image size of the text. In this application, the specified size parameter can be included in the template data, or it can be not included in the template data but exist in the page data, so, for example Figure 3 As shown, the template data may include height data.
[0057] The initial page data is page data pre-set for the target page, including template data of each template of the target page, but the initial page data does not include the value of the specified size parameter of the template.
[0058] In the present application, the server may pre-store the value of the specified size parameter. Specifically, the value of the specified size parameter may be stored in a database corresponding to the server, and each value of the specified size parameter has a matching template identifier and display identifier. In the process of determining the page data of the target page, for each template of the target page, if the server stores a value of the specified size parameter that matches both the template identifier and the current display identifier of the template, it means that the value of the specified size parameter is the value of the specified size parameter that matches the display effect of the template in the terminal currently running the target client.
[0059] The current display identifier refers to the display identifier of the terminal on which the target client currently sending the page data request is running. The display identifier of any terminal is an identifier used to characterize the display capability of the terminal. The display identifier may specifically include identifiers of the model, system and / or resolution, etc. It is understandable that the display identifier is the identification information of the parameters that affect the display effect of the target page. The display identifier may be carried in the page data request.
[0060] Optionally, in one implementation, the target value of the specified size parameter that matches both the template identifier and the display identifier of any template is: obtained by the server classifying the data to be classified of the template; the data to be classified of the template contains the value of the specified size parameter of the template uploaded by each client and the display identifier of the terminal on which it runs; and each client is the same type of client as the target client.
[0061] Optionally, in another implementation, a target value for a specified size parameter that matches both a template identifier and a display identifier of any template may be input manually.
[0062] The above embodiment introduces a processing method for initial page data when the server stores a value of a specified size parameter that matches both the template identifier of the template and the current display identifier. It can be understood that the server may not store a value of a specified size parameter that matches both the template identifier of the template and the current display identifier. Therefore, the predetermined processing method also includes:
[0063] For each template, in response to not storing a value of a specified size parameter that matches both the template identifier and the current display identifier of the template, a specified upload tag is associated with the template in the initial page data; wherein the specified upload tag is used to instruct the target client to upload the value of the specified size parameter of the associated template to the server. For the target value of the specified size parameter of any template stored by the server, based on the classification of the data to be classified of the template, the data to be classified contains the value of the specified size parameter of the template calculated and uploaded by each client and the display identifier of the terminal running. Therefore, if any client requests the page data of the target page from the server as the target client, for any template, when the server does not store a target value of the specified size parameter that matches both the template identifier and the current display identifier of the template, the server can instruct the client to upload the value of the specified size parameter for the template, so that the server can add the value of the specified size parameter uploaded by the client to the data to be classified of the template, and the server will subsequently classify the data to be classified. The designated upload mark can be used to enable the client to upload the value of the designated size parameter of the template associated with the designated upload mark to the server. That is, the data to be classified of any template includes multiple data representing the corresponding relationship between the value of the designated size parameter of the template and the display identifier of the terminal on which the client runs.
[0064] The specified upload tag can fulfill its function as long as it exists in the page data. Of course, in one implementation, the upload tag can exist in the template data. Specifically, for the case where the template data includes the value of the specified size parameter, for any template, if the server stores a target value for the specified size parameter that matches both the template identifier and the current display identifier of the template, then the target value for the specified size parameter is written into the position corresponding to the specified size parameter in the template data. If the server does not store a value for the specified size parameter that matches both the template identifier and the current display identifier of the template, then the specified upload tag corresponding to the template is written into the position corresponding to the specified size parameter in the template data. The template data belongs to the page data.
[0065] It can be understood that in the above embodiment, the designated upload mark is used to trigger the target client to upload the value of the designated size parameter of the template corresponding to the designated upload mark. Therefore, the server can add the received value of the designated size parameter to the data to be classified of the corresponding template. Of course, in another implementation, the designated upload mark may not be used to trigger the upload of the value of the designated size parameter of the template. In this implementation,
[0066] For other templates that do not have the value of the specified size parameter in the page data of the target page, after calculating the value of the specified size parameter of the other template based on the display capability parameter of the target terminal, the value of the specified size parameter of each other template is uploaded to the server as the value of the specified size parameter of the other template. Accordingly, the server can add the received value of the specified size parameter of the other template to the data to be classified of the other template.
[0067] This implementation method changes the processing logic of the client itself. The client can trigger the template for which the value of the specified size parameter does not exist in the page data, and upload the value of the specified size parameter of the template to the server without the need to trigger it with a specified upload tag. In this method, in order for the server to identify the template and display identifier corresponding to the specified size parameter, the template ID of the template, the display identifier of the current terminal, and the second height data of the template can be uploaded to the server at the same time.
[0068] This application does not limit the triggering method for the value of the specified size parameter of any client-uploaded template.
[0069] The specific uploading process for specifying the value of the size parameter is introduced in the following embodiment.
[0070] Optionally, a value of a specified size parameter of the template corresponding to the specified upload mark is calculated by the target client based on a display capability parameter of the target terminal.
[0071] Exemplarily, the following describes an implementation method for calculating the height data of a template that does not have height data using the display capability parameters of the target terminal. In this embodiment, the width of the template is fixed. For the case where the content in the template is a picture, the template width can be set to a fixed value according to the screen ratio. For example, the template width can be set to 2 / 5 of the device screen width, and based on the display capability parameters of the device, the resolution of the device can be obtained. For example, the screen resolution is 800PX*1400PX, and the number of pixels occupied by the template in the device width can be obtained as 320PX. Therefore, for the picture in the template, if the ratio of the picture width to the height is 1 to 2, the width of the picture can be adjusted to 320PX and the length is 640PX. In this embodiment, the picture is the case of covering the entire template, so the width of the template can be obtained as 320PX and the length as 640PX.
[0072] In the case where the content in the template is text, the text content data in the template, the font set for the current text, the font size set for the current text, and the maximum number of lines maxLine set for the text can be obtained. Generally, in this application, each template on the target page can be clicked to enter the corresponding detail page of the template. When there is a large amount of content corresponding to the template, only a part of the content corresponding to the template can be displayed. Therefore, the maximum number of lines that can be displayed for the text content can be预先限定 to limit the amount of content displayed. This embodiment can also determine the maximum width value maxWidth set for the text, and the maximum width value can correspond to the template width. For example, the maximum width value can be 320 PX. For the text content, pre-rendering is performed according to the font and font size of the text content. Among them, pre-rendering only uses the CPU and will not be actually displayed on the screen. During the pre-rendering process, the width / number of lines of the rendered text can be judged; specifically, when the width of the rendered text >= maxWidth, the number of lines of the current text is judged. When the number of lines >= maxLine, the rendering is stopped, and the subsequent content is replaced with an ellipsis "...". When the number of lines < maxLine, a line break is performed and the rendering continues on the next line; the above steps of judging the width / number of lines of the rendered text are repeated until the rendering is stopped, and the pre-rendering is completed. After the pre-rendering is completed, based on the rendered text, the height data of the number of lines occupied by the rendered text can be determined, and thus the height data of the template can be determined. For example, the maximum number of lines set for the text is 9 lines, the maximum width value maxWidth of the text is the template width value of 320 PX, and based on the display capability parameters of the current device, it can be determined that according to the font and font size of the current text, each character occupies 32 PX * 32 PX. If the number of characters in the text is 60, then 6 lines of text can be rendered, and the height data of the template is 192 PX.
[0073] Corresponding to the above implementation method of inputting the target value of the specified dimension parameter that simultaneously matches the template identifier and any display identifier through manual input. When the specified dimension parameter is height and the template content is text, after inputting the target value of the specified dimension parameter, the number of lines corresponding to the target value can be calculated, and only the text corresponding to that number of lines is rendered for the template. For example, the target value is 192 PX, and based on the display capability parameters of the current device, it is determined that according to the font and font size of the current text, each character occupies 32 PX * 32 PX. Then it can be obtained that when the target value is 192 PX, the corresponding number of lines is 6, and only 6 lines of text are rendered and displayed in the template.
[0074] Of course, in actual applications, there can be a gap between each line of text and between the text and the template edge. At this time, the height data of the template needs to consider the distance of the gap between the lines and between the text and the template.
[0075] In this application, the implementation method of calculating the template width with the template height fixed is implemented, and the implementation idea corresponds to the above embodiment. Moreover, in this application, there are many implementation methods for calculating the height data of the template without height data by using the display capability parameters of the target terminal, and this application does not limit this. Any implementation method for calculating the height data of the template without height data by using the display capability parameters of the target terminal can be applied to this application.
[0076] S103: Feedback the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server.
[0077] The page rendering includes: for a target template having a value of a specified size parameter in the page data of the target page, rendering the target template based on the value of the specified size parameter and the template data.
[0078] According to the contents introduced in the above embodiments, the page data of the target page fed back to the target client in the present application includes template data of each template of the target page, and the page data may contain values of specified size parameters of the template. Therefore, for the target template with values of specified size parameters, the target template is rendered based on the existing values of the specified size parameters and the template data.
[0079] For any other template for which the page data of the target page does not contain a value for the specified size parameter, the value for the specified size parameter of the other template can be calculated based on the display capability parameter of the target terminal, and the other template can be rendered based on the calculated value for the specified size parameter and the template data of the other template in the page data of the target page.
[0080] The display identifier in the above embodiment is the identification information corresponding to the display capability parameter. For example, the display capability parameter may be parameters such as the terminal model, system and / or resolution. The screen sizes of different models may be different; for the same model, different versions of the system may have different rendering methods for the target page; for the same model, the user can select the resolution of the current terminal, and the display effect of the target page will be different for different resolutions. Therefore, in order to meet the display effect of the target terminal, it is necessary to comprehensively utilize the various display capability parameters of the target terminal to determine the value of the specified size parameter of the template for which no height data exists.
[0081] In a specific implementation, the method for determining the value of the specified size parameter of each template for which the specified size parameter value does not exist is: the target client calls the first interface of the target terminal, so that the first interface calculates the value of the specified size parameter of each template for which the specified size parameter value does not exist based on the screen resolution of the target terminal and the template data of each template for which the height data does not exist.
[0082] The first interface is an interface provided by the system of the target terminal for calculating the specified size parameters of the content displayed in the target terminal. In this application, the template in the target page belongs to the display content. The calculation process of the first interface is affected by the model and system version of the target terminal. The interfaces for calculating the values of the specified size parameters provided by different systems may be different, and the interfaces for calculating the values of the specified size parameters called by each client may also be different. This application does not limit the interface for calculating the values of the specified size parameters. The template height is calculated by using the interface for calculating the values of the specified size parameters, which can be to pass the template data to the interface and return the value of the adapted specified size parameter. Exemplarily, a template data is text data, and the maximum width of the text and the font size of the text can be passed to the interface, and the interface can return the adapted height. The process of calculating the height is not the application point of this application, and any calculation method can be applied to the solution of this application. The implementation method of calculating the value of the specified size parameter of the template without the value of the specified size parameter using the display capability parameter of the target terminal is specifically introduced in the following embodiments. The specific implementation method of calculating the value of the specified size parameter of the other template based on the display capability parameter of the target terminal in the above embodiment can be implemented by using the above interface.
[0083] In this application, whether it is a template with a specified size parameter value in the page data, or a template without a specified size parameter value and requiring the client to specify the size parameter value using the display capability parameter of the target terminal, when rendering the template using the specified size parameter value and template data, conventional methods can be used. For example, the target rendering interface provided by the terminal system can be used to complete the rendering of the template using the specified size parameter value and the template. In this application, there is no limitation on the method of completing the rendering of the template using the specified size parameter value and template data.
[0084] Optionally, the method further includes steps A01-A02;
[0085] Step A01, in response to receiving a value of a specified size parameter of a template associated with a specified upload mark fed back by the target client;
[0086] Step A02, correspondingly adding the current display mark and the obtained value of the specified size parameter to the data to be classified of the template associated with the specified upload mark;
[0087] The target client responds to the existence of a template with a specified upload tag in the target page data by sending the calculated value of the specified size parameter of the template with the specified upload tag to the server.
[0088] In one implementation, the target display identifier added to the data to be classified may be a correspondence between the target display identifier and the designated upload tag recorded in the process of determining the page data of the target page according to a predetermined processing method, so that when the server receives the value of the designated size parameter of the template with the designated upload tag fed back by the target client, the value of the designated size parameter of the template with the designated upload tag can be matched with the target display identifier corresponding to the designated upload tag.
[0089] In one implementation, the target display identifier added to the data to be classified may be obtained by the client sending the value of the specified size parameter and the target display identifier to the server.
[0090] In the present application, the designated upload tag of each template that does not have a value for the designated size parameter is unique. Therefore, when the server receives the value of the designated size parameter uploaded for the designated upload tag, or the value of the designated size parameter and the target display identifier, it can determine that it is the data of the template corresponding to the designated upload tag.
[0091] It can be understood that the target display identifier and the obtained value of the specified size parameter are added to the data to be classified of the template with the specified upload mark, and each value of the specified size parameter has a matching target display identifier. Further, it can be understood that the data to be classified of the template may include data characterizing the correspondence between the target display identifier, the template and the value of the specified size parameter.
[0092] It should be emphasized that the various clients involved in this application and the target client are all the same client.
[0093] Optionally, the step of adding the target display identifier and the obtained value of the specified size parameter to the data to be classified of the template with the specified upload mark includes:
[0094] The received value of the specified size parameter of the template with the specified upload mark fed back by the target client is stored in the target location;
[0095] When the number of stored values of the specified size parameter of the template with the specified upload mark reaches a threshold, the value of each specified size parameter of the template with the specified upload mark and its corresponding target display identifier are added to the data to be classified of the template with the specified upload mark corresponding to the value of the specified size parameter.
[0096] In this implementation, the server can store the values of the specified size parameters uploaded by each target client without processing them. When the number of values of the specified size parameters reaches a threshold, the values of each specified size parameter are added to the data to be classified of the corresponding template. Subsequently, the server can execute the step of classifying the data to be classified of the template to obtain the target value of the specified size parameter of the template.
[0097] The method of this embodiment can achieve the simultaneous determination of target values of specified size parameters of multiple templates, and can effectively utilize computing resources.
[0098] In the embodiment of the present application, after receiving the page data request for the target page sent by the target client, for each template of the target page, if the server stores a target value for the specified size parameter that matches the template identifier and the current display identifier of the template, the matching target value is written into the initial page data as the value of the specified size parameter of the template, and the page data of the target page is determined. The target client renders the target page based on the page data of the target page fed back by the server. Thus, since the server, in the process of determining the page data of the target page, writes the matching target value into the initial page data as the value of the specified size parameter of the template in response to storing the target value for the specified size parameter that matches the template identifier and the current display identifier of the template, when rendering the page, the target client does not need to consume resources to calculate the value of the specified size parameter that has been written into the page data. It can be seen that the scheme of the present application can take into account both the display effect of the page and the resource consumption of the terminal.
[0099] In addition, the solution of the present application is particularly suitable for terminals with poor computing power, so that the terminal can reduce the computing tasks local to the terminal, effectively improve the display frame rate of the terminal device, and reduce the lag of the terminal device, thereby improving the user experience.
[0100] Next, the method of obtaining the target value of the specified size parameter of any template of the target page by classifying the data to be classified in the template in this application is introduced:
[0101] The method in which the server classifies the data to be classified of the template includes steps B1-B2;
[0102] Step B1, in response to the data to be classified of the template satisfying a predetermined classification trigger condition, classifying the values of the specified size parameter corresponding to the same display identifier in the data to be classified of the template into one category of data;
[0103] The above steps A01-A02 specifically introduce a solution for the target client to upload the value of the specified size parameter. In the present application, for any client, the solution for any client to upload the value of the specified size parameter corresponds to the above steps A01-A02.
[0104] It can be understood that the server can receive multiple values of specified size parameters uploaded by multiple clients, thereby generating data to be classified. Before the classification trigger condition is met, the server can store the data to be classified and perform data verification on the stored data to be classified. If it is detected that the data to be classified is invalid data or erroneous data, it can be discarded to reduce the impact on subsequent processing.
[0105] The classification triggering condition includes: the number of values of the specified size parameter included in the data to be classified of the template reaches a first quantity threshold, and / or the number of categories of display identification included in the data to be classified of the module reaches a second quantity threshold.
[0106] When classifying, the amount of data included in the classified data needs to meet the standard, otherwise after the classification process, the amount of data in each category is small, which is easy to affect the accuracy of the data. For example, if there are only two values of specified size parameters in a category of data, the values of these two specified size parameters and the actual values of the specified size parameters of the category are both biased, and the final value of the specified size parameters of the category will be inaccurate. Therefore, the above conditions need to be met before triggering the classification operation.
[0107] The classification of the present application is to classify the values of the specified size parameters corresponding to the same display identifier in the data to be classified of each template into one category of data, that is, the values of the specified size parameters classified into one category correspond to the same template and display identifier.
[0108] Step B2, for each type of data, based on the value of the specified size parameter in the data of this type, determine the target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type.
[0109] When the present application executes the above steps B1-B2, a pre-written classification program may be used, or a target AI model may be used. When the target AI model is used, each data to be classified in the template may be input into the target AI model for processing to obtain various target values for specified size parameters, wherein each type of target value for the specified size parameter matches the template identifier of the template and the display identifier corresponding to the type of data.
[0110] Optionally, for each type of data, based on the value of the specified size parameter in the type of data, determining a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the type of data includes:
[0111] For each type of data, determine the value of the specified size parameter with the highest occurrence frequency from the data of this type, and obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type;
[0112] or,
[0113] For each type of data, the values of the specified size parameters in the data of this type are averaged to obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type.
[0114] In the process of calculating the value of the specified size parameter, the value of the specified size parameter may be calculated incorrectly. There may be many reasons for the calculation error of the value of the specified size parameter. For example, in this application, the display area size of the target client of the same device is unified. In this case, the value of the specified size parameter of the template calculated is the target value. If the user modifies the display area size of the target client in the device by himself, the value of the specified size parameter of the template calculated is inconsistent with the target value, and a deviation occurs; and in the process of uploading the specified size parameter, there may be data errors and loss, for example, the specified size parameter uploaded by the client has data loss, resulting in the value of the specified size parameter in the uploaded specified size parameter being empty; but most of the values of the specified size parameter are normal data, therefore, the value of the specified size parameter with the highest frequency in each type of data after classification is usually the correct value of the specified size parameter, and the value of the specified size parameter with the highest frequency in this type of data can be used as the target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to this type of data. This improves the accuracy of the target value determined for the specified size parameter.
[0115] By averaging the target values of the specified size parameters in this type of data, the difference between the determined target values of the specified size parameters and the template identifier of the template and the actual height data matched with the display identifier corresponding to this type of data can be reduced, thereby improving the accuracy of the determined target values of the specified size parameters.
[0116] In the embodiment of the present application, the values of the designated size parameters corresponding to the same display identifier in the data to be classified of each template are classified into one category of data. For each category of data, the value of the designated size parameter with the highest frequency of occurrence can be determined from the data of this category, or the values of the designated size parameters in this category of data can be averaged to obtain the target value of the designated size parameter that matches the template identifier of the template and the display identifier corresponding to this category of data. And the classification operation of the present application can be processed using the target AI model. Therefore, according to the scheme of this embodiment, each data to be classified can be quickly and effectively classified, and the corresponding target value of the designated size parameter can be determined for each category of data.
[0117] Next, another page display method of the present application is introduced, which is applied to a target client; in a specific application, the target client can be deployed on a terminal device, which can be a tablet computer, a desktop computer, etc.; the present application does not limit this. Figure 4 As shown, a page display method provided in an embodiment of the present application may include the following steps:
[0118] S401, sending a page data request for a target page to a server, so that the server executes the steps of the page display method applied to the server. The triggering method of sending a page data request for a target page to a server is introduced in the above embodiment, and will not be repeated here.
[0119] In one implementation, each page data request sent by the client to the server may carry the current display identifier of the target terminal on which the target client is currently running. The current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running. The function of the display identifier corresponds to the function of the display identifier in the above embodiment, and will not be elaborated here.
[0120] In one implementation, for any target client, the server may pre-record the display identifier of the target terminal on which the client is running. When the server receives a page data request sent by any target client, the recorded display identifier of the target terminal on which the client is running may be used as the current display identifier corresponding to the client. At this time, the page data request may not carry the display identifier. And the display identifier of the target terminal on which the client is running, which is pre-recorded in the server, may be updated; for example, if the client detects that the display identifier of the target terminal on which it is running has changed, it may send the changed display identifier to the server; the client may also periodically send the display identifier of the target terminal on which it is currently running to the server at regular intervals; this application does not limit the manner in which the display identifier of the target terminal on which the client is running, which is pre-recorded in the server, is updated.
[0121] S402: Render the target page based on the target page data fed back by the server.
[0122] The page rendering includes:
[0123] For a target template having a target value of a specified size parameter in the page data of the target page, rendering the target template based on the target value of the specified size parameter and the template data;
[0124] And, for other templates for which the target value of the specified size parameter does not exist in the page data of the target page, the value of the specified size parameter of the other template is calculated based on the display capability parameter of the target terminal, and the other template is rendered based on the calculated value of the specified size parameter and the template data of the other template in the page data of the target page. The method also includes:
[0125] In response to the existence of a template associated with a designated upload mark in the target page data, the calculated value of the designated size parameter of the template is sent to the server, so that after receiving the value of the designated size parameter of the template, the server adds the value of the designated size parameter and the current display mark to the data to be classified of the template;
[0126] The current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the designated upload mark is a mark associated with the template in the initial page data by the server for each template in response to the fact that there is no stored value for the designated size parameter that matches both the template identifier and the current display identifier of the template. The rendering method and the classification processing method of the data to be classified in this embodiment correspond to the above-mentioned embodiment, and will not be elaborated here.
[0127] In an embodiment of the present application, after the target client sends a page data request for the target page to the server, it can obtain the target page data fed back by the server, and render the target page based on the target page data fed back by the server. In addition, since the server, in the process of determining the page data of the target page, for any template, responds to the target value of the specified size parameter that matches the template identifier and the current display identifier of the template, the matching target value is written into the initial page data as the value of the specified size parameter of the template, so that when the target client renders the page, it does not need to consume resources to calculate the value of the specified size parameter that has been written into the page data. It can be seen that the solution of the present application can take into account both the display effect of the page and the resource consumption of the terminal.
[0128] Next, combine Figure 5 , using a specific embodiment to introduce the page display method of the present application, such as Figure 5 As shown, the method includes:
[0129] S501, the client sends request data to the server.
[0130] S501 corresponds to the above-mentioned S101.
[0131] S502, triggering a cloud data acquisition strategy.
[0132] After receiving the request identifier, the server triggers the cloud data acquisition strategy.
[0133] The cloud data acquisition strategy corresponds to the predetermined processing method in the above embodiment. Figure 6 As shown, the cloud data acquisition strategy includes:
[0134] S601, data summary.
[0135] The client can send a page data request for the target page to the cloud to obtain the page data of the target page. This step corresponds to the above S101.
[0136] like Figure 6 As shown, the server of this application can obtain the target upload data sent by each client; the target upload data corresponds to the value of the specified size parameter of the template with the specified upload mark. The upload method of the target upload data is the same as the upload method of the value of the specified size parameter of the template with the specified upload mark in the above embodiment, and no further details are given here.
[0137] S602, data verification, invalid data filtering.
[0138] For the uploaded page data request, check whether there is an invalid request, and if so, filter the invalid request.
[0139] S603, reading a database.
[0140] Read the height data stored in the database. In this embodiment, the specified size parameter of the template is the height data of the template.
[0141] S604, detecting whether there is corresponding matching height data in the database;
[0142] For each template, it is detected whether the database stores a target value of the height data that matches the template identifier and the current display identifier of the template. If so, S605 is executed, otherwise S606 is executed.
[0143] S605, returning corresponding template data and height data;
[0144] If so, the target value of the matched height data is written into the initial page data as the value of the height data of the template, so that after the page data of the target page is determined, the page data is returned to the client.
[0145] S606, returning the corresponding template data and marking the height as needing to be uploaded.
[0146] If not, the designated upload mark of the template is written into the position of the height data in the template data of the template. In this embodiment, the template data has the position of the height data. The template data returned by S605 and S606 may include the ID data of the template.
[0147] S503; obtain model data;
[0148] The model data, that is, template data, may exist in the page data.
[0149] S504: Check whether the model data carries height data;
[0150] If yes, then execute S505, otherwise execute S506. In this embodiment, the height data may be a part of the model data.
[0151] S505: Rendering the model according to the height data;
[0152] For a template having height data, the template is rendered according to the template data carrying the height data.
[0153] S506: According to the device's own resolution and model information, call the system API and combine the model data to calculate the height.
[0154] The method of calculating the height in this step corresponds to the method of calculating the specified size parameters in the above embodiment.
[0155] S507: Upload the altitude data.
[0156] For templates that do not have height data, in response to detecting the specified upload tag in the template data included in the page data, after calling the terminal system's interface to calculate the value of the template's height data in combination with the template data according to information such as the terminal model, resolution and system version, the target upload data of the template corresponding to the specified upload tag is uploaded to the server.
[0157] Specifically, for templates with specified upload tags, after calculating the template height, the client can upload the template height data value, device type, system model, resolution and template ID as target upload data to the cloud. For example, device type: iPhone14, system model: IOS15, resolution 763*1344, template ID: model1890, template height: 100px.
[0158] S508: Trigger cloud data training strategy.
[0159] Each client uploads the height data to the server, and when the trigger conditions are met, the cloud data training strategy is triggered.
[0160] like Figure 7 As shown, it is a flowchart of the cloud data training strategy.
[0161] The cloud data training strategy corresponds to the manner in which the server in the above embodiment performs classification processing on the data to be classified of the template to obtain the first height data of the template.
[0162] The cloud data training strategy includes:
[0163] S701, data summary;
[0164] Data aggregation means that the server can store the target uploaded data sent by each client. The trigger condition may be that the number of target uploaded data received and stored in the cloud reaches a threshold.
[0165] S702, data verification, invalid data filtering;
[0166] The server can perform data verification on each stored target upload data. For example, the target upload data whose template height data value is not within the set range can be filtered as invalid data, thereby reducing the impact of invalid data on the determination of template height.
[0167] S703, data training;
[0168] Data training refers to the classification and processing of the data uploaded by each target, as well as the determination of the target value of the height data for each type of data.
[0169] S704, AI model.
[0170] Data training can be processed with the target AI model to improve processing efficiency.
[0171] S705, scheduled training.
[0172] For each uploaded target uploaded data, it can be classified and the target value of the height data of each type of data can be determined when the conditions are met. The condition can be that the time from the last determination of the height data reaches a threshold, and / or the received target uploaded data reaches a target number. It can be understood that according to the solution of the present application, the target uploaded data uploaded by the client are all target uploaded data corresponding to the template that does not have height data in the database.
[0173] S706, database writing.
[0174] For each type of data, the corresponding relationship between the height data, template ID and display identifier of the data is written into the database.
[0175] The solution of the embodiment of the present application determines the height data of the template by classifying data on the server side, so that the client can obtain the height data of the template from the server side for use, thereby effectively reducing the time taken by the client to calculate the height through the CPU, saving CPU time, and thereby improving the page rendering speed.
[0176] Based on the above-mentioned embodiment of the page display method, the embodiment of the present disclosure also provides a page display device. Figure 8 A schematic diagram of the structure of a page display device provided in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the page display device is applied to the target server and may include:
[0177] The receiving module 801 is used to receive a page data request for a target page sent by a target client;
[0178] The determination module 802 is used to determine the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes: determining the initial page data including the template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, writing the matched target value as the value of the specified size parameter of the template into the initial page data; the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the target value for the specified size parameter that matches both the template identifier and the display identifier of any template is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier;
[0179] The feedback module 803 is used to feed back the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server.
[0180] In the embodiment of the present application, after receiving the page data request for the target page sent by the target client, for each template of the target page, if the server stores a target value for the specified size parameter that matches the template identifier and the current display identifier of the template, the matching target value is written into the initial page data as the value of the specified size parameter of the template, and the page data of the target page is determined. The target client renders the target page based on the page data of the target page fed back by the server. Thus, since the server, in the process of determining the page data of the target page, writes the matching target value into the initial page data as the value of the specified size parameter of the template in response to storing the target value for the specified size parameter that matches the template identifier and the current display identifier of the template, when rendering the page, the target client does not need to consume resources to calculate the value of the specified size parameter that has been written into the page data. It can be seen that the scheme of the present application can take into account both the display effect of the page and the resource consumption of the terminal. Optionally, the target value of the specified size parameter that matches the template identifier and any display identifier of any template is: obtained by the server classifying the data to be classified of the template; the data to be classified of the template contains the value of the specified size parameter of the template uploaded by each client and the display identifier of the terminal running on it; each client is the same type of client as the target client.
[0181] Optionally, the predetermined processing method further includes:
[0182] For each template, in response to the fact that no value of the specified size parameter matching both the template identifier and the current display identifier of the template is stored, a specified upload tag is associated with the template in the initial page data; wherein the specified upload tag is used to instruct the target client to upload the value of the specified size parameter of the associated template to the server;
[0183] The device also includes:
[0184] An adding module is used to respond to receiving the value of the specified size parameter of the template associated with the specified upload mark fed back by the target client;
[0185] The current display identifier and the obtained value of the specified size parameter are correspondingly added to the data to be classified of the template associated with the specified upload mark.
[0186] Optionally, a value of a specified size parameter of the template corresponding to the specified upload mark is calculated by the target client based on a display capability parameter of the target terminal.
[0187] Optionally, the server classifies the data to be classified in the template in the following manner:
[0188] In response to the data to be classified of the template satisfying a predetermined classification trigger condition, the values of the specified size parameter corresponding to the same display identifier in the data to be classified of the template are classified into one category of data;
[0189] For each type of data, based on the value of the specified size parameter in the data of this type, a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type is determined.
[0190] Optionally, for each type of data, based on the value of the specified size parameter in the type of data, determining a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the type of data includes:
[0191] For each type of data, determine the value of the specified size parameter with the highest occurrence frequency from the data of this type, and obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type;
[0192] or,
[0193] For each type of data, the values of the specified size parameters in the data of this type are averaged to obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type.
[0194] Optionally, the classification trigger condition includes: the number of values of a specified size parameter included in the data to be classified of the template reaches a first quantity threshold, and / or the number of categories of display identification included in the data to be classified of the module reaches a second quantity threshold.
[0195] Fig. 9 A schematic diagram of the structure of a page display device provided in an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the page display device is applied to the target client and may include:
[0196] A first sending module 901 is used to send a page data request for a target page to a server, so that the server executes the steps of the page display method applied to the server;
[0197] The rendering module 902 is used to render the target page based on the target page data fed back by the server.
[0198] In an embodiment of the present application, after the target client sends a page data request for the target page to the server, it can obtain the target page data fed back by the server, and render the target page based on the target page data fed back by the server. In addition, since the server, in the process of determining the page data of the target page, for any template, stores a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, the matching target value is written into the initial page data as the value of the specified size parameter of the template. This makes it possible that when the target client renders the page, it does not need to consume resources to calculate the value of the specified size parameter that has been written into the page data. It can be seen that the solution of the present application can take into account both the display effect of the page and the resource consumption of the terminal. Optionally, the page rendering includes:
[0199] For a target template having a target value of a specified size parameter in the page data of the target page, rendering the target template based on the target value of the specified size parameter and the template data;
[0200] Furthermore, for other templates whose target values of specified size parameters do not exist in the page data of the target page, the values of the specified size parameters of the other templates are calculated based on the display capability parameters of the target terminal, and the other templates are rendered based on the calculated values of the specified size parameters and the template data of the other templates in the page data of the target page.
[0201] Optionally, the device further comprises:
[0202] a second sending module, configured to send the calculated value of the specified size parameter of the template to the server in response to the presence of a template associated with the specified upload mark in the target page data, so that the server, after receiving the value of the specified size parameter of the template, adds the value of the specified size parameter and the current display mark to the data to be classified of the template;
[0203] Among them, the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the designated upload mark is a mark associated with the template in the initial page data by the server for each template in response to the fact that there is no stored value for the specified size parameter that matches both the template identifier of the template and the current display identifier.
[0204] The present application also provides a server, such as Fig.10 As shown, the server includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0205] Memory 1003, used for storing computer programs;
[0206] The processor 1001 is used to implement the page display method executed by the above-mentioned server when executing the program stored in the memory 1003.
[0207] The present application also provides a terminal device, such as Fig.11 As shown, the terminal device includes a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104.
[0208] Memory 1103, used for storing computer programs;
[0209] The processor 1101 is used to implement the page display method executed by the above-mentioned terminal device when executing the program stored in the memory 1103.
[0210] The communication bus mentioned in the above server or terminal device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0211] The communication interface is used for communication between the above-mentioned server or terminal device and other devices.
[0212] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0213] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0214] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the page display method described in any one of the above embodiments is implemented.
[0215] In another embodiment provided by the present application, a computer program product including instructions is also provided, and when the computer program product is run on a computer, the computer executes the page display method described in any one of the above embodiments.
[0216] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0217] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0218] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0219] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A page display method, characterized in that: Applied to the server; the method comprises: Receiving a page data request for a target page sent by a target client; Determine the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes: determining the initial page data including the template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both the template identifier and the current display identifier of the template, writing the matched target value as the value of the specified size parameter of the template into the initial page data; the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the target value for the specified size parameter that matches both the template identifier and the display identifier of any template is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier; Feedback the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server.
2. The method according to claim 1, characterized in that: The target value of the specified size parameter that matches the template identifier and any display identifier of any template at the same time is: obtained by the server classifying the data to be classified of the template; the data to be classified of the template contains the value of the specified size parameter of the template uploaded by each client and the display identifier of the terminal running on it; each client is the same type of client as the target client.
3. The method according to claim 2, characterized in that The predetermined processing method also includes: For each template, in response to the fact that no value of the specified size parameter matching both the template identifier and the current display identifier of the template is stored, a specified upload tag is associated with the template in the initial page data; wherein the specified upload tag is used to instruct the target client to upload the value of the specified size parameter of the associated template to the server; The method further comprises: In response to receiving a value of a specified size parameter of a template associated with a specified upload mark fed back by the target client; The current display identifier and the obtained value of the specified size parameter are correspondingly added to the data to be classified of the template associated with the specified upload mark.
4. The method according to claim 3, characterized in that The value of the designated size parameter of the template corresponding to the designated upload mark is calculated by the target client based on the display capability parameter of the target terminal.
5. The method according to any one of claims 2 to 4, characterized in that: The server classifies the data to be classified in the template in the following ways: In response to the data to be classified of the template satisfying a predetermined classification trigger condition, the values of the specified size parameter corresponding to the same display identifier in the data to be classified of the template are classified into one category of data; For each type of data, based on the value of the specified size parameter in the data of this type, a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type is determined.
6. The method according to claim 5, characterized in that For each type of data, based on the value of the specified size parameter in the type of data, determining a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the type of data, including: For each type of data, determine the value of the specified size parameter with the highest occurrence frequency from the data of this type, and obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type; or, For each type of data, the values of the specified size parameters in the data of this type are averaged to obtain a target value of the specified size parameter that matches the template identifier of the template and the display identifier corresponding to the data of this type.
7. The method according to claim 5, characterized in that The classification triggering condition includes: the number of values of the specified size parameter included in the data to be classified of the template reaches a first quantity threshold, and / or the number of categories of display identification included in the data to be classified of the module reaches a second quantity threshold.
8. A page display method, characterized in that: Applied to a target client; the method comprises: Sending a page data request for a target page to a server, so that the server executes the steps of the page display method according to claim 1; Based on the target page data fed back by the server, the target page is rendered.
9. The method according to claim 8, characterized in that The page rendering includes: For a target template having a target value of a specified size parameter in the page data of the target page, rendering the target template based on the target value of the specified size parameter and the template data; Furthermore, for other templates whose target values of specified size parameters do not exist in the page data of the target page, the values of the specified size parameters of the other templates are calculated based on the display capability parameters of the target terminal, and the other templates are rendered based on the calculated values of the specified size parameters and the template data of the other templates in the page data of the target page.
10. The method according to claim 8, characterized in that The method further comprises: In response to the existence of a template associated with a designated upload mark in the target page data, the calculated value of the designated size parameter of the template is sent to the server, so that after receiving the value of the designated size parameter of the template, the server adds the value of the designated size parameter and the current display mark to the data to be classified of the template; Among them, the current display identifier at least includes the device type identifier of the target terminal on which the target client is currently running; the designated upload mark is a mark associated with the template in the initial page data by the server for each template in response to the fact that there is no stored value for the specified size parameter that matches both the template identifier of the template and the current display identifier.
11. A page display device, characterized in that: Applied to the server; the device comprises: A receiving module, for receiving a page data request for a target page sent by a target client; a determining module, for determining the page data of the target page according to a predetermined processing method; wherein the predetermined processing method includes determining initial page data including template data of each template of the target page, and, for each template, in response to storing a target value for a specified size parameter that matches both a template identifier of the template and a current display identifier, writing the matched target value into the initial page data as the value of the specified size parameter of the template; the current display identifier includes at least a device type identifier of a target terminal on which the target client is currently running; the target value for a specified size parameter that matches both a template identifier of any template and a display identifier is the value of the specified size parameter that needs to be adapted when the template is displayed on a terminal having the display identifier; The feedback module is used to feed back the page data of the target page to the target client, so that the target client renders the target page based on the page data of the target page fed back by the server.
12. A page display device, characterized in that: Applied to a target client; the device comprises: A first sending module, used for sending a page data request for a target page to a server, so that the server executes the steps of the page display method according to claim 1; A rendering module is used to render the target page based on the target page data fed back by the server.
13. A server, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
14. A terminal device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 8-10 when executing a program stored in a memory.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-7 or 8-10 is implemented.
