Page adaptation display method and device, computer equipment and storage medium

By obtaining screen and advertisement size information and adjusting the display size of the page, the page adaptation problem on different screen sizes and resolutions is solved, adaptive display is realized, simplifying the development process and improving the display effect.

CN119045929APending Publication Date: 2024-11-29SHENZHEN HIVE BOX NETWORK TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410924014.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In the prior art, it is difficult to adapt and display on different screen sizes and resolutions, and developers need to manually adjust multiple sets of user interfaces, which increases the workload and difficulty, especially when there is an advertisement bar.

Method used

By obtaining screen and advertisement size information, determining width limit values ​​and independent pixels, adjusting the display size of the page based on this information, realizing adaptive display, and eliminating the impact of the advertisement bar on display.

Benefits of technology

The adaptive display of the same set of design size information on different screen sizes and resolutions is realized, reducing the hassle of manual adjustment and improving the adjustment efficiency and effect of page display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045929A_ABST
    Figure CN119045929A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminal display, and discloses a page adaptive display method and device, computer equipment and a storage medium. The page adaptive display method comprises the steps of obtaining screen attribute information of a target screen and design size information of a target page in a page display request; when it is confirmed that the advertisement column exists in the display area of the target screen, advertisement size information is obtained, and a width limit value is determined according to the screen attribute information and the advertisement size information; comparing a preset width limit threshold value with the width limit value, and determining display independent pixels of the target page according to a comparison result and the screen independent pixels obtained by the screen attribute information; and determining display size information of the target page according to the display independent pixels and the design size information so as to display the target page in a display area of the target screen according to the display size information. According to the method and the device, the influence of advertisements on page display is eliminated, meanwhile, self-adaptive adjustment of the page on the screen is realized, and the display effect of the page is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of terminal display technology, and in particular to a page adaptation display method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of electronic technology, the screen sizes of terminal devices are becoming more and more diverse. In order to make the page have the same display effect on screens of different sizes and resolutions, the page needs to be adapted to the screen for display.

[0003] In the prior art, application developers need to design multiple user interfaces (UI) for the same application to adapt to the display requirements of different screen sizes, which increases the workload of developers and is time-consuming and labor-intensive. For example, the method of adapting the screen of the Android system is to establish multiple values ​​corresponding to the resolution under the "res-values" folder of the project, such as values_480×800, values_720×1280, values_1080×1920 and values_1336×2560, etc., and it is necessary to set different display parameter values ​​for each value. At the same time, for the same terminal device, it is also necessary to adapt the display effect for both horizontal and vertical screen sizes. Sometimes, only using two sets of layouts cannot achieve 100% display adaptation effect, and a large number of adaptation files need to be added for repeated adjustment. In addition, when there is an advertising column on the screen, the part displayed on the page is completely different from the standard screen size, which increases the difficulty of page design.

[0004] Therefore, how to achieve adaptive display on screens of different sizes and resolutions based on a set of UI designs is an urgent problem that needs to be solved. Summary of the invention

[0005] Based on this, it is necessary to provide a page adaptation display method, device, computer equipment and storage medium to address the above technical issues, so as to solve the problem that the page adaptation display on the screen relies on manual adjustment, which is time-consuming and labor-intensive.

[0006] A page adaptation display method, comprising:

[0007] Acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page;

[0008] When confirming that an advertisement column exists in the display area of ​​the target screen, acquiring advertisement size information, and determining a width limit value of the target screen according to the screen attribute information and the advertisement size information;

[0009] Comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information;

[0010] The display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0011] A page adaptation display device, comprising:

[0012] A display request acquisition module, used to acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page;

[0013] A width limit value determination module, configured to obtain advertisement size information when confirming that an advertisement column exists in the display area of ​​the target screen, and determine a width limit value of the target screen according to the screen attribute information and the advertisement size information;

[0014] An independent pixel determination module, used for comparing a preset width limiting threshold with the width limiting value, and determining the display independent pixels of the target page according to the comparison result and the screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information;

[0015] The display adaptation module is used to determine the display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0016] A computer device comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned page adaptation display method when executing the computer-readable instructions.

[0017] A computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the page adaptation display method as described above.

[0018] In the above-mentioned page adaptation display method, device, computer equipment and storage medium, when confirming that there is an advertisement column in the display area of ​​the target screen, the page adaptation display method obtains the advertisement size information, and determines the width limitation information of the target screen according to the screen attribute information and the advertisement size information, thereby eliminating the influence of the advertisement column on the page display and ensuring the size accuracy of the displayable area in the target screen. At the same time, the preset width limitation threshold and the width limitation information are compared, and the display independent pixels of the target page are determined according to the comparison result and the screen independent pixels obtained from the screen attribute information; the display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page on the target screen according to the display size information. The present invention adjusts the design size of the target page to the display size based on the conversion of independent pixels, and can realize the adaptive display of pages with the same set of design size information in screen display areas of different sizes, eliminating the trouble of manual adjustment, improving the adjustment efficiency of page display, and ensuring the display effect of the page. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0020] Figure 1 is a flow chart of a page adaptation display method in one embodiment of the present invention;

[0021] Figure 2 is a structural schematic diagram of a page adaptation display device in one embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The page adaptation display method provided in this embodiment can be applied to an application environment in which the same page is displayed on different client device screens, including a client and a server. Among them, the client communicates with the server. Among them, the client includes but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, as well as smart cabinets with operating interfaces. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The server realizes the display of the page by exchanging data with the client, and can also realize human-computer interaction with the user through the device screen of the client. For example, when the operating system carried by the client device is the Android system, the screen size and resolution of the Android system device are diversified, and the screen size includes 4.8 inches, 5 inches, 5.5 inches, 6 inches, 6.2 inches, etc., and the screen resolution includes 480×800, 720×1280, 768×1266, 1080×1920, 1280×1920 and 1334×2560, etc. The page adaptation display method of this embodiment can realize the adaptive display of pages with the same set of design size information on screens of different sizes and resolutions.

[0025] In one embodiment, if Figure 1 As shown, a page adaptation display method is provided, comprising the following steps S10-S40:

[0026] S10. Obtain a page display request, where the page display request includes screen attribute information of a target screen and design size information of a target page.

[0027] Understandably, the page display request is information for requesting to display a specific page on a specific screen, that is, information for requesting to display a target page on a target screen. The target screen refers to the screen used to load the page to be displayed, and the target page refers to the page currently required to be displayed. The page display request includes screen attribute information of the target screen and design size information of the target page. Screen attribute information refers to various parameter information used to describe the physical characteristics and display capabilities of the screen, such as the size, resolution, and other information of the screen. Design size information refers to size parameter information pre-set when designing a page, such as width size and height size.

[0028] S20. When it is confirmed that an advertisement column exists in the display area of ​​the target screen, advertisement size information is obtained, and a width limit value of the target screen is determined according to the screen attribute information and the advertisement size information.

[0029] Understandably, before preparing to display the target page on the target screen, the server needs to first determine whether there is an advertisement column in the display area of ​​the target screen. When generating a page display request, if there is an advertisement column in the display area of ​​the target screen, the advertisement display information of the advertisement column will be collected in the page display request. The advertisement display information is used to characterize the display feature information corresponding to the advertisement column in the target screen, such as display position, display size and other information. The default display position of the advertisement column is at the top or bottom of the screen. Specifically, after obtaining the page display request, the page display request is parsed to determine whether the advertisement display information is found in the page display request. If the advertisement display information is found, it is confirmed that there is an advertisement column in the display area of ​​the target screen. When there is an advertisement column, the advertisement column will occupy a part of the display area of ​​the target screen. Therefore, in order to ensure that the content of the target page is not blocked, it is necessary to obtain the advertisement size information, and calculate the width limit value for displaying the target page in the target screen according to the screen attribute information and the advertisement size information. The advertisement size information refers to the width and height size parameters used to display the advertisement page, that is, the width and height size parameters of the advertisement column. The width limit value refers to the equivalent pixel value of the minimum width that can be used to display the target page in the display area of ​​the target screen.

[0030] In a specific embodiment, the total display area of ​​the target screen can be divided into an advertisement display area (a display area for displaying advertisement content) and a page display area (a display area for displaying the content of the target page) according to different display contents. The total display area, the advertisement display area, and the page display area of ​​the target screen are all rectangular. The rectangle of the advertisement display area is removed from the rectangle of the total display area, and the remaining rectangle is the page display area. When there is an advertisement column in the display area of ​​the target screen, one side of the rectangle of the advertisement display area coincides with one side of the rectangle of the total display area, such as the position of the advertisement column is by default at the top or bottom of the target screen. At this time, the width limit value refers to the equivalent pixel value of the short side length of the rectangular display area corresponding to the target page, that is, the equivalent pixel value of the short side length after removing the advertisement display area from the total display area.

[0031] Further, in one embodiment, the screen attribute information includes screen size information and screen resolution information; in step S20, determining the width limit value of the target screen according to the screen attribute information and the advertisement size information includes:

[0032] S201, comparing the screen size information and the advertisement size information to obtain the short side size information of the target screen;

[0033] S202, determining the screen pixel density of the target screen according to the screen size information and the screen resolution information;

[0034] S203: Determine a width limit value of the target screen according to the screen pixel density and the short side size information.

[0035] It is understandable that screen attribute information includes screen size information and screen resolution information. The display effect of the screen is affected by both the screen size and resolution. Screen size information refers to the size parameters of the height, width and diagonal of the screen. For example, the screens of Android smartphones are 5 inches, 5.5 inches and 6 inches. Screen resolution information refers to the total number of pixels in the horizontal direction and vertical direction of the screen, in px. For example, the resolution of Android smartphones is 320. × 480, 480 × 800, 720 × 1280 vs 1080 × 1920, etc. The screen pixel density of the target screen can be determined by calculating based on the screen size information and screen resolution information. The screen pixel density refers to the number of physical pixels per inch of the display area, and the unit is dpi. The calculation formula for screen pixel density is: Among them, d represents the screen pixel density, a represents the horizontal pixel count of the screen, b represents the vertical pixel count of the screen, and c represents the screen size parameter. For example, the screen resolution is 1080 × 1920, the screen size is 5 inches, the screen pixel density The calculated result is 440dpi, which means there are 440 physical pixels per inch.

[0036] By comparing the screen size information and the advertisement size information, the short side size information of the target screen can be obtained. The short side size information of the target screen refers to the shorter side length parameter of the two adjacent sides of the page display area rectangle of the target screen, that is, the size parameter of the shorter side in the rectangular display area used to display the target page. The short side size information corresponds to the minimum width. The width limit value of the target screen can be determined based on the screen pixel density and the short side size information, that is, the equivalent pixel value of the minimum width in the page display area of ​​the target screen. The calculation formula for the width limit value is: Among them, sw represents the width limit value, min(h,w) represents the short side size information, and d represents the screen pixel density.

[0037] Furthermore, in one embodiment, the screen size information includes screen width information and screen height information, and the advertisement size information includes advertisement width information and advertisement height information; in step S201, the screen size information and the advertisement size information are compared to obtain the short side size information of the target screen, including:

[0038] S2011. When the screen width information is consistent with the advertisement width information, determine the actual height information of the target screen according to the screen height information and the advertisement height information;

[0039] S2022: Determine a smaller value between the screen width information and the actual height information as the short side size information of the target screen.

[0040] Understandably, the total display area of ​​the target screen can be divided into an advertisement display area and a page display area according to the displayed content. The screen size information includes screen width information and screen height information. The screen width information refers to the width size of the total display area in the horizontal direction, and the screen height information refers to the height size of the total display area in the vertical direction. The advertisement size information includes advertisement width information and advertisement height information. The advertisement width information refers to the width size of the advertisement display area in the horizontal direction, and the advertisement height information refers to the height size of the advertisement display area in the vertical direction.

[0041] When there is an advertisement column, and the screen width information is consistent with the advertisement width information, it indicates that the rectangle of the advertisement display area overlaps with the rectangle of the total display area in the horizontal direction, and thus the screen width information is consistent with the width of the page display area. When there is only one advertisement column, the advertisement column is located at the top or bottom of the target screen; when there are two advertisement columns at the same time, the advertisement columns can be located at the top and bottom of the target screen respectively, and the page display area is located in the middle of the upper and lower advertisement columns. At this time, the actual height information of the target screen can be determined based on the screen height information and the advertisement height information. The actual height information refers to the actual height dimension parameter of the page display area of ​​the target screen in the vertical direction, that is, the height dimension of the display area in the target screen used to display the target page.

[0042] When comparing the screen width information and the actual height information, the size relationship between the lengths of the two adjacent sides of the rectangle of the page display area is actually compared. The short side size information can be represented by min(h,w), where h represents the actual height information (the height size of the page display area) and w represents the screen width information (the width size of the page display area). When the screen width size is smaller than the actual height size, it indicates that the rectangular side of the page display area in the horizontal direction is shorter, and the screen width information is determined as the short side size information of the target screen, that is, the page display area is "vertical screen display". When the screen width size is equal to the actual height size, it indicates that the rectangular side of the page display area in the horizontal direction and the vertical direction are the same length, and the screen width information or the actual height information can be randomly determined as the short side size information of the target screen. When the screen width size is larger than the actual height size, it indicates that the rectangular side of the page display area in the vertical direction is shorter, and the actual height information is determined as the short side size information of the target screen, that is, the page display area is "horizontal screen display".

[0043] This embodiment compares the screen size information and the advertisement size information to obtain the short side size information of the page display area in the target screen, fully considers the impact of the advertisement column on the target page display, and redetermines the minimum width of the page display area. At the same time, the width limit value of the target screen is determined based on the screen pixel density and the short side size information, which can ensure the rationality of the page's adaptation to the horizontal and vertical screen display.

[0044] S30, comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information.

[0045] Understandably, this embodiment adapts to different screen sizes based on the width limit value (smallest width, sw), using sw <n>The dp qualifier is used to represent the width limit. Among them, sw represents the width limit value, N represents the preset width limit threshold, and dp represents the independent pixel unit. The preset width limit threshold is a pre-set width critical value used to determine whether the target page needs to be scaled proportionally when displayed on the target screen, also known as the reference width limit value. For example, the default preset width limit threshold is set to 900. Density independent pixel (dp) is a unit used to abstractly represent the screen display area. Independent pixels are the actual physical pixels of the terminal. The actual physical pixels refer to device pixels. For example, under the device standard screen (160dpi, there are 160 physical pixels per inch in the device), 1 device independent pixel = 1 device pixel; if the screen is enlarged to 200% (320dpi, there are 320 physical pixels per inch in the device), 1 device independent pixel = 2 device pixels. That is, the greater the screen density, the more pixels correspond to 1 device independent pixel. Screen independent pixels refer to independent pixels corresponding to the total display area of ​​the target screen, also known as reference independent pixels. The displayed independent pixels of the target page refer to the actual independent pixels used to display the target page on the target screen, that is, the independent pixels corresponding to the page display area.

[0046] In this embodiment, the server can calculate and process the screen size and resolution data in the screen attribute information to obtain screen independent pixels. After obtaining the screen independent pixels, it is necessary to compare the size relationship between the preset width limit threshold and the width limit value. If the size relationship is different, the screen independent pixels are processed differently to obtain different display independent pixels. For example, when the width limit value is less than the preset width limit threshold, it indicates that the available display area in the target screen is smaller than the area corresponding to the design size of the target page, so it is necessary to scale down the independent pixels, that is, the display independent pixels are obtained by scaling down the screen independent pixels.

[0047] Further, in one embodiment, the screen attribute information includes screen size information and screen resolution information; in step S30, that is, comparing the preset width limit threshold with the width limit value, and determining the display independent pixels of the target page according to the comparison result and the screen independent pixels, includes:

[0048] S301, determining screen independent pixels of the target screen according to the screen size information and the screen resolution information;

[0049] S302, comparing a preset width limiting threshold with the width limiting value, and determining whether the width limiting value reaches the preset width limiting threshold;

[0050] S303: If the width limit value reaches a preset width limit threshold, the screen independent pixel is determined as a display independent pixel of the target page.

[0051] Understandably, when calculating screen independent pixels using the screen size and resolution data in the screen attribute information, the calculation formula for screen independent pixels is: Among them, s dp Indicates independent pixels on the screen, a indicates the number of horizontal pixels on the screen, b indicates the number of vertical pixels on the screen, c indicates the screen size parameter, and d indicates the screen pixel density. In the Android system, the screen resolution is 320 × The pixel density of 160dpi at 480 is the base pixel density. At this time, the conversion relationship between independent pixels and resolution units is 1dp=1px (1 device independent pixel=1 device pixel). Therefore, the ratio of screen pixel density to base pixel density d / 160 can be used to represent screen independent pixels.

[0052] The comparison result between the preset width limit threshold and the width limit value will affect the display independent pixels of the target page. In this embodiment, the preset width limit threshold is set to 900. The comparison results are divided into two cases, one is that the width limit value is greater than or equal to the preset width limit threshold, and the other is that the width limit value is less than the preset width limit threshold. When the comparison result is that the width limit value reaches the preset width limit threshold (sw≥900), it indicates that the page display area of ​​the target screen is sufficient to accommodate the target page to be displayed according to the design size information. The target page does not need to be scaled when displayed in the page display area of ​​the target screen. The design size information can be directly determined as the display size information of the target page. At this time, the screen independent pixels are directly determined as the display independent pixels of the target page. That is, p dp =s dp , where p dp Indicates independent pixels of the page, s dp Indicates screen independent pixels.

[0053] In one embodiment, in step S302, that is, after determining whether the width limit value reaches a preset width limit threshold, the following steps are performed:

[0054] S3021. If the width limit value has not reached a preset width limit threshold, determining the display independent pixels of the target page according to the screen independent pixels and the ratio of the width limit value to the preset width limit threshold.

[0055] Understandably, when the comparison result is that the width limit value has not reached the preset width limit threshold (sw<900), it indicates that the page display area of ​​the target screen cannot accommodate the target page to be displayed according to the design size information, and the target page needs to be scaled when displayed in the page display area of ​​the target screen, that is, the display size information of the target page needs to be determined by converting the design size information. At this time, the display independent pixels of the target page are determined based on the screen independent pixels and the ratio of the width limit value to the preset width limit threshold. That is, Among them, p dp represents the independent pixel of the page, sw represents the width limit value, N represents the preset width limit threshold (in this embodiment, N=900), s dp Indicates screen independent pixels.

[0056] After comparing the preset width limiting threshold and the width limiting value, this embodiment analyzes the degree of match between the screen independent pixels and the display independent pixels of the target page based on the comparison result, so as to avoid the problem that the page cannot be fully displayed when the screen independent pixels are directly determined as the display independent pixels of the target page, and ensure that the target page can be reasonably scaled based on the display independent pixels of the target page.

[0057] S40: Determine display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in a display area of ​​the target screen according to the display size information.

[0058] Understandably, after obtaining the display independent pixels, the dimension data in the design dimension information is converted according to the display independent pixels, and the converted dimension data is determined as the display dimension information of the target page. The display dimension information refers to the actual dimension parameters of the page display area of ​​the target screen for displaying the target page (the dimension information after the design dimension information is converted), and the page display area refers to the display area after removing the advertisement column from the total display area of ​​the target screen. The server displays the target page in the page display area of ​​the target screen according to the display dimension information, which can ensure that the content of the target page will not be blocked by the advertisement column and maintain a good layout and readability.

[0059] For example, if we use px, which corresponds to the resolution pixel, as the unit of measurement to draw a line that is half the screen width, then the same line should be 240px on a 480×800 resolution screen and 160px on a 320×480 resolution screen. Different size information needs to be set for different screens. If independent pixels dp are used as the unit of measurement, the same page can be guaranteed to display the same effect in page display areas of different sizes and resolutions. That is, the design size information can be converted into the display size information of the target page by using display independent pixels, so that it is displayed as half the screen width on both resolution screens.

[0060] In one embodiment, in step S40, that is, determining the display size information of the target page according to the display independent pixels and the design size information, includes:

[0061] S401, searching a preset pixel size association data table for a size adaptation ratio factor corresponding to the display independent pixel;

[0062] S402: converting the design size information according to the size adaptation ratio factor to obtain display size information of the target page.

[0063] It can be understood that the preset pixel size association data table is a pre-set data table that records the association relationship between display independent pixels and size adaptation ratios. The size adaptation ratio factor refers to the conversion ratio between independent pixel units (dp) and resolution pixel units (px). The preset pixel size association data table stores multiple pixel size association data groups in units of display independent pixels. Each display independent pixel corresponds to a size adaptation ratio factor, and the two form a pixel size association data group. For example, when the target screen resolution is 320 × When the width limit reaches the preset width limit threshold, the screen pixel density is 160dpi (equal to the reference pixel density), and the screen independent pixels and the display independent pixels of the target page are both 1 The size adaptation ratio corresponding to the display independent pixel in the preset pixel size association data table is 1dp=1px, that is, the size adaptation ratio factor is 1. At this time, the design size information is converted 1:1 according to the size adaptation ratio factor, that is, the design size information is directly determined as the display size information of the target page. For another example, when the size adaptation ratio corresponding to the display independent pixel in the preset pixel size association data table is 1dp=2px, the size adaptation ratio factor is 0.5. At this time, the design size information is converted 1:2 according to the size adaptation ratio factor, that is, the design size information is proportionally enlarged and determined as the display size information of the target page.

[0064] This embodiment uses a preset pixel size association data table to quickly find the size adaptation ratio factor corresponding to the displayed independent pixel, so as to accurately convert the design size information to obtain the display size information of the target page, and realize the adaptive display of the target page with the same set of design size information in the page display area of ​​different target screens, thereby ensuring the adaptive display effect.

[0065] When confirming that there is an advertisement column in the display area of ​​the target screen, this embodiment obtains advertisement size information, and determines the width limitation information of the target screen based on the screen attribute information and the advertisement size information, thereby eliminating the influence of the advertisement column on the page display and ensuring the size accuracy of the displayable area in the target screen. At the same time, this embodiment compares the preset width limitation threshold and the width limitation information, determines the display independent pixels of the target page based on the comparison result and the screen independent pixels obtained from the screen attribute information; determines the display size information of the target page based on the display independent pixels and the design size information, so as to display the target page on the target screen according to the display size information. This embodiment adjusts the design size of the target page to the display size based on the conversion of independent pixels, so as to realize the adaptive display of pages with the same set of design size information in screen display areas of different sizes, eliminating the trouble of manual adjustment, improving the adjustment efficiency of page display, and ensuring the display effect of the page.

[0066] In another embodiment, in step S10, that is, after obtaining the page display request, the following is further included:

[0067] S101, when it is confirmed that there is no advertisement column in the display area of ​​the target screen, determining a width limit value of the target screen according to the screen attribute information;

[0068] S102, comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and the screen independent pixels;

[0069] S103: Determine display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in a display area of ​​the target screen according to the display size information.

[0070] Understandably, after obtaining the page display request, the page display request is parsed to determine whether the advertisement display information is found in the page display request. If the advertisement display information is not found, it is confirmed that there is no advertisement column in the display area of ​​the target screen, and the display area of ​​the target screen is all used to display the target page, that is, the total display area of ​​the target screen is equal to the page display area. At this time, the screen width information and screen height information of the target screen are directly determined according to the screen attribute information, and the smaller value of the screen width information and the screen height information is determined as the short side size information of the target screen, and then the width limit value of the target screen is determined according to the screen pixel density and the short side size information. Further, the same method as in the above content is used to compare the preset width limit threshold and the width limit value, and the display independent pixels of the target page are determined according to the comparison result and the screen independent pixels; the display size information of the target page is determined according to the display independent pixels and the design size information, so that the target page is displayed in the display area of ​​the target screen according to the display size information.

[0071] When confirming that there is no advertisement bar in the display area of ​​the target screen, this embodiment directly determines the width limit value of the target screen according to the screen size information, so as to realize adaptive display of the target page on the target screen without advertisements and ensure the page display effect.

[0072] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0073] In one embodiment, a page adaptation display device is provided, and the page adaptation display device corresponds one-to-one to the page adaptation display method in the above embodiment. Figure 2 As shown, the page adaptation display device includes a display request acquisition module 10, a width limit value determination module 20, an independent pixel determination module 30 and an adaptation display module 40. The functional modules are described in detail as follows:

[0074] A display request acquisition module 10, used to acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page;

[0075] A width limit value determination module 20 is used to obtain advertisement size information when confirming that there is an advertisement column in the display area of ​​the target screen, and determine the width limit value of the target screen according to the screen attribute information and the advertisement size information;

[0076] An independent pixel determination module 30, configured to compare a preset width limiting threshold with the width limiting value, and determine the display independent pixels of the target page according to the comparison result and the screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information;

[0077] The display adaptation module 40 is used to determine the display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0078] In one embodiment, the width limit value determination module 20 includes:

[0079] A short side size determination unit, configured to compare the screen size information with the advertisement size information to obtain the short side size information of the target screen;

[0080] A screen pixel density determining unit, configured to determine the screen pixel density of the target screen according to the screen size information and the screen resolution information;

[0081] The first width limit value determining unit is used to determine the width limit value of the target screen according to the screen pixel density and the short side size information.

[0082] In one embodiment, the width limit value determination module 20 further includes:

[0083] an actual height determining unit, configured to determine actual height information of the target screen according to the screen height information and the advertisement height information when the screen width information is consistent with the advertisement width information;

[0084] The actual height comparison unit is used to determine the smaller value between the screen width information and the actual height information as the short side size information of the target screen.

[0085] In one embodiment, the independent pixel determination module 30 includes:

[0086] A screen independent pixel determination unit, configured to determine the screen independent pixels of the target screen according to the screen size information and the screen resolution information;

[0087] A first threshold comparison unit, used to compare a preset width limiting threshold with the width limiting value, and determine whether the width limiting value reaches the preset width limiting threshold;

[0088] The first display independent pixel determination unit is configured to determine the screen independent pixel as the display independent pixel of the target page if the width limit value reaches a preset width limit threshold.

[0089] In one embodiment, the independent pixel determination module 30 further includes:

[0090] The second display independent pixel determination unit is used to determine the display independent pixels of the target page according to the screen independent pixels and the ratio of the width limit value to the preset width limit threshold if the width limit value has not reached the preset width limit threshold.

[0091] In one embodiment, the adaptation display module 40 includes:

[0092] An adaptation scale factor determination unit, used to search a preset pixel size association data table for a size adaptation scale factor corresponding to the display independent pixel;

[0093] The size conversion processing unit is used to convert the design size information according to the size adaptation ratio factor to obtain the display size information of the target page.

[0094] In one embodiment, the display request acquisition module 10 includes:

[0095] A second width limit value determining unit, configured to determine a width limit value of the target screen according to the screen attribute information when confirming that no advertisement bar exists in the display area of ​​the target screen;

[0096] a third display independent pixel determination unit, configured to compare a preset width limiting threshold with the width limiting value, and determine the display independent pixels of the target page according to the comparison result and the screen independent pixels;

[0097] The display size information determining unit is used to determine the display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0098] For the specific definition of the page adaptation display device, please refer to the definition of the page adaptation display method above, which will not be repeated here. Each module in the above-mentioned page adaptation display device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0099] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer-readable instructions are executed by the processor, a page adaptation display method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0100] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor executes the computer-readable instructions to implement the following steps:

[0101] Acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page;

[0102] When confirming that an advertisement column exists in the display area of ​​the target screen, acquiring advertisement size information, and determining a width limit value of the target screen according to the screen attribute information and the advertisement size information;

[0103] Comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information;

[0104] The display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0105] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The readable storage media store computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the following steps are implemented:

[0106] Acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page;

[0107] When confirming that an advertisement column exists in the display area of ​​the target screen, acquiring advertisement size information, and determining a width limit value of the target screen according to the screen attribute information and the advertisement size information;

[0108] Comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information;

[0109] The display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0111] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0112] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.< / n>

Claims

1. A page adaptation display method, characterized in that: include: Acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page; When confirming that an advertisement column exists in the display area of ​​the target screen, acquiring advertisement size information, and determining a width limit value of the target screen according to the screen attribute information and the advertisement size information; Comparing a preset width limiting threshold with the width limiting value, and determining display independent pixels of the target page according to the comparison result and screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information; The display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

2. The page adaptation display method according to claim 1, characterized in that: The screen attribute information includes screen size information and screen resolution information; The determining the width limit value of the target screen according to the screen attribute information and the advertisement size information includes: Comparing the screen size information with the advertisement size information to obtain the short side size information of the target screen; Determine the screen pixel density of the target screen according to the screen size information and the screen resolution information; A width limit value of the target screen is determined according to the screen pixel density and the short side size information.

3. The page adaptation display method according to claim 2, characterized in that: The screen size information includes screen width information and screen height information, and the advertisement size information includes advertisement width information and advertisement height information; The comparing the screen size information and the advertisement size information to obtain the short side size information of the target screen includes: When the screen width information is consistent with the advertisement width information, determining the actual height information of the target screen according to the screen height information and the advertisement height information; A smaller value between the screen width information and the actual height information is determined as the short side size information of the target screen.

4. The page adaptation display method according to claim 1, characterized in that: The screen attribute information includes screen size information and screen resolution information; The comparing the preset width limiting threshold with the width limiting value, and determining the display independent pixels of the target page according to the comparison result and the screen independent pixels, comprises: Determine the screen independent pixels of the target screen according to the screen size information and the screen resolution information; Compare a preset width limit threshold with the width limit value to determine whether the width limit value reaches the preset width limit threshold; If the width limit value reaches a preset width limit threshold, the screen independent pixel is determined as the display independent pixel of the target page.

5. The page adaptation display method according to claim 4, characterized in that: After determining whether the width limit value reaches a preset width limit threshold, the method includes: If the width limit value has not reached the preset width limit threshold, the display independent pixels of the target page are determined according to the screen independent pixels and the ratio of the width limit value to the preset width limit threshold.

6. The page adaptation display method according to claim 1, characterized in that: The determining the display size information of the target page according to the display independent pixels and the design size information includes: Searching for a size adaptation ratio factor corresponding to the display independent pixel in a preset pixel size association data table; The design size information is converted according to the size adaptation ratio factor to obtain the display size information of the target page.

7. The page adaptation display method according to claim 1, characterized in that: After obtaining the page display request, the method further includes: When it is confirmed that there is no advertisement column in the display area of ​​the target screen, determining a width limit value of the target screen according to the screen attribute information; Comparing a preset width limiting threshold with the width limiting value, and determining the display independent pixels of the target page according to the comparison result and the screen independent pixels; The display size information of the target page is determined according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

8. A page adaptation display device, characterized in that: include: A display request acquisition module, used to acquire a page display request, wherein the page display request includes screen attribute information of a target screen and design size information of a target page; A width limit value determination module, configured to obtain advertisement size information when confirming that an advertisement column exists in the display area of ​​the target screen, and determine a width limit value of the target screen according to the screen attribute information and the advertisement size information; An independent pixel determination module, used for comparing a preset width limit threshold with the width limit value, and determining the display independent pixels of the target page according to the comparison result and the screen independent pixels, wherein the screen independent pixels are determined according to the screen attribute information; The display adaptation module is used to determine the display size information of the target page according to the display independent pixels and the design size information, so as to display the target page in the display area of ​​the target screen according to the display size information.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the page adaptation display method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors execute the page adaptation display method according to any one of claims 1 to 7.