[go: up one dir, main page]

WO2025020756A1 - Self-adaptive visual area display method, apparatus and system, and medium - Google Patents

Self-adaptive visual area display method, apparatus and system, and medium Download PDF

Info

Publication number
WO2025020756A1
WO2025020756A1 PCT/CN2024/099415 CN2024099415W WO2025020756A1 WO 2025020756 A1 WO2025020756 A1 WO 2025020756A1 CN 2024099415 W CN2024099415 W CN 2024099415W WO 2025020756 A1 WO2025020756 A1 WO 2025020756A1
Authority
WO
WIPO (PCT)
Prior art keywords
size
display
page data
display window
resolution
Prior art date
Application number
PCT/CN2024/099415
Other languages
French (fr)
Chinese (zh)
Inventor
曹宝童
Original Assignee
京东方科技集团股份有限公司
重庆京东方智慧科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司, 重庆京东方智慧科技有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2025020756A1 publication Critical patent/WO2025020756A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus

Definitions

  • the present disclosure relates to the field of display technology, and in particular to a display method, device, system and medium for adaptively viewing areas.
  • page data needs to be displayed on these different display devices. For example, when opening a mobile phone's browser, the page data needs to be displayed in the browser window. For example, when using a 4K large screen to display page data, the page data needs to be displayed in the browser window of the large screen.
  • the present disclosure provides a display method, device, system and medium for an adaptive visible area.
  • the present disclosure provides a method for displaying an adaptive visible area, the method comprising:
  • all elements in the page data are located in the visible area of the display window.
  • the method further includes:
  • the adaptively adjusted page data is displayed in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.
  • adaptively adjusting the size of the element included in the page data includes at least one of the following:
  • obtaining a changed target The target resolution is determined, and sizes of elements included in the page data are adaptively adjusted based on the target resolution.
  • acquiring a changed target resolution includes:
  • the resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen.
  • adaptively adjusting the size of the element included in the page data based on the target resolution includes:
  • the first adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction;
  • the size of the element included in the page data is adjusted.
  • acquiring a size parameter of the display window after the size adjustment, and adaptively adjusting the size of the element included in the page data based on the size parameter comprises:
  • the size of the element included in the adjusted page data is adaptively adjusted.
  • acquiring size parameters of the display window after the size adjustment, and adaptively adjusting the sizes of elements included in the page data based on the size parameters includes:
  • the size of the element included in the page data is adaptively adjusted.
  • a size of the same element in the page data in the display window before the change and a size of the same element in the display window after the change have a first ratio
  • the first ratio is linearly correlated with the second ratio.
  • the adaptive adjustment includes: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is a height direction or a width direction of the display window, and the first direction is perpendicular to the second direction.
  • adjusting the size of the elements included in the page data based on the size of the visible area of the display window includes:
  • adjusting the size of the element included in the page data based on the current resolution and the preset resolution of the page data includes:
  • the size of the element included in the page data is adjusted.
  • the display window includes a plurality of sub-display areas, and different sub-display areas are located in different display devices; and adjusting the size of the elements included in the page data based on the display window to display the page data includes:
  • determining a window resolution of the display window based on screen resolutions corresponding to each of the plurality of display devices
  • the size of the element in the page data is adjusted.
  • adjusting the size of the elements included in the page data includes: scaling each element included in the page data.
  • adjusting the size of the element included in the page data based on the second adjustment parameter includes:
  • the transform method is called to adjust the size of the elements included in the page data.
  • the present disclosure also provides a display system with an adaptive visual area, comprising:
  • the display module includes a response unit and a view unit; wherein:
  • the response unit is used to determine a second adjustment parameter for adjusting an element in the page data based on a current resolution of a display device where the display window is located and a preset resolution of the page data;
  • the view unit is used to adjust the size of the element included in the page data based on the second adjustment parameter transmitted by the response unit.
  • a monitoring unit used for monitoring changes of the display window, and triggering the display module to perform an adaptive adjustment operation when changes of the display window are monitored;
  • the adaptive adjustment operation includes: adaptively adjusting the size of the elements included in the page data, and displaying the adaptively adjusted page data in the changed display window.
  • the display module is further used to instruct the monitoring unit to monitor the change of the display window again after performing the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the change of the display window is monitored;
  • the display method proposed in the embodiment of the present disclosure adjusts the size of the elements included in the page data according to the display window when displaying the page data in the display window.
  • the size of the elements in the page data can be adjusted according to the display window on the display device, so that the size of its page view fits the display window, so that all the elements of the adjusted page data are located in the visible area of the display window; because all the elements of the page data are located in the visible area of the display window, the user can see the entire content of the page data in the visible area of the display window without dragging the scroll bar to browse, thus simplifying the user's operation and further improving the user's browsing experience of the web page.
  • the present disclosure also discloses a computer-readable storage medium storing a computer program.
  • the program enables the processor to execute the display method of the adaptive visible area as described in the present disclosure.
  • FIG2 is a schematic diagram showing an application scenario of the method for displaying an adaptive visible area in an embodiment of the present disclosure
  • FIG3 shows a schematic diagram of a display interface in the related art and a comparative schematic diagram of a display interface displayed using the display method of this embodiment
  • FIG4 is a schematic diagram showing a display interface of a computer at two resolutions in an embodiment of the present disclosure
  • FIG5 is a schematic diagram showing a display method in the case of a spliced screen in an embodiment of the present disclosure
  • FIG6 shows an exemplary flow chart of a method for displaying an adaptive visible area in an embodiment of the present disclosure
  • FIG8 is a schematic diagram showing a size change of a visible area of a display window in an embodiment of the present disclosure
  • FIG9 is a flowchart showing a method for displaying an adaptive visible area according to another embodiment of the present disclosure.
  • FIG10 shows another exemplary flow chart of a method for displaying an adaptive visible area in an embodiment of the present disclosure
  • FIG11 is a schematic diagram showing a framework structure of a display system with adaptive visible area according to an embodiment of the present disclosure
  • FIG. 12 shows a schematic diagram of the framework structure of a display device with adaptive visible area according to an embodiment of the present disclosure.
  • the page data is also called web page data, which is the data displayed when a user opens a web page in a browser. Since different display devices differ in size and screen resolution, the web page data needs to adapt to the size of different display devices. For example, when opening a browser on a mobile phone, the view layout of the displayed web page needs to adapt to the screen of the mobile phone.
  • the present disclosure proposes a display method, which can adapt page data to different display devices.
  • Figure 1 shows a schematic diagram of the step flow of the display method of the adaptive visual area
  • Figure 2 shows a schematic diagram of the application scenario of the display method of the adaptive visual area
  • Figure 3 shows a schematic diagram of the display interface in the related technology and a comparative schematic diagram of the display interface displayed using the display method;
  • the display method of the adaptive visual area can be applied to a display device, specifically, can be applied to the front-end interface of a browser or application on a display device.
  • the display device may include a mobile phone, a computer, a tablet, a 4K large screen, an MP4, and a smart TV, etc.
  • the web front end generally refers to the front end of the browser
  • the front end interface of various applications refers to the front end interface of the APP or client installed on the display device.
  • the display device is a mobile phone
  • the application is an APP, including an APP adapted to the Android system and an APP adapted to the IOS system.
  • the display device is a computer
  • the application is a client located on the computer.
  • the display method of the adaptive visual area disclosed in the present invention can be applied.
  • the method for displaying an adaptive visible area of the present disclosure may specifically include the following steps:
  • Step 101 in response to a display trigger of page data, adjusting the size of elements included in the page data based on the size of a visible area in a display window;
  • the display window is used to display the page data.
  • Step 102 Displaying the adjusted page data in a display window; wherein all elements in the page data are located in a visible area of the display window.
  • the display trigger of the page data can be performed on the display device, specifically, it can occur on the web front end or the front end interface of various applications, where the web front end generally refers to the front end of the browser, and the front end interface of various applications refers to the front end interface of the APP or client installed on the display device.
  • the display device generally has a browser installed, and the user can browse through the browser You can browse the web and install various applications on the display device to provide users with corresponding services through various applications. For example, if you install social communication applications, you can provide users with social services. If you install news applications, you can push news content to users.
  • the web pages of the browser may include but are not limited to H5 pages, etc., wherein the H5 page refers to a web page developed based on HTML5 technology.
  • H5 page refers to a web page developed based on HTML5 technology.
  • a web page it may be referred to as a web page, and the data in the interface may be referred to as page data.
  • the triggering of the display of page data may include opening the browser, triggering the control in the browser, opening the application (APP and client), and triggering the control in the application.
  • opening the browser will generally enter the homepage of the webpage, and the page data that needs to be displayed is the page data of the homepage of the webpage.
  • opening the IE browser will enter the homepage of the IE browser, and the page data of the homepage is displayed on the homepage.
  • the triggering operation of the control in the browser such as single-clicking or double-clicking, will enter the webpage where the control is located, and the page data that needs to be displayed is the data associated with the control.
  • the results searched for the search term will be displayed, and selecting one of the results will enter the webpage corresponding to the result.
  • Figure 2 takes an APP on a mobile phone as an example. There are multiple APPs preset on the mobile phone.
  • the user enters the home page provided by APP1.
  • the NetEase News APP is opened, the user enters the home page of NetEase News.
  • the news corresponding to the entry will be displayed.
  • the display device can monitor the operations occurring on the front-end page through the web end (or APP client), and when the operation that needs to open the page data is monitored on the front-end page, such as the triggering operation of a certain control, it can send the monitored operation and the control identifier targeted by the operation to the cloud connected to the web end (or APP client), and then the cloud can feedback the page data corresponding to the control identifier to the display device.
  • the display device can monitor the operations occurring on the front-end page through the web end (or APP client), and when the operation that needs to open the page data is monitored on the front-end page, such as the triggering operation of a certain control, it can obtain the page data corresponding to the triggered control from the locally cached page data based on the monitored operation and the control identifier targeted by the operation.
  • the web end or APP client
  • the display device can obtain the page data corresponding to the triggered control from the locally cached page data based on the monitored operation and the control identifier targeted by the operation.
  • the display device can monitor operations occurring on the front-end page through the web end (or APP client).
  • an operation that requires opening page data is monitored on the front-end page, such as a triggering operation of a certain control
  • the page data corresponding to the triggered control can be searched from the locally cached page data based on the monitored operation and the control identifier targeted by the operation. If the page data is found, the corresponding page data is extracted from the local cache. If not found, the control identifier is opened. The page data is sent to the cloud and received from the cloud.
  • the size of the visible area in the display window displaying the page data can be determined, wherein the visible area refers to the area where the display window can be visually observed, that is, the area within the user's sight.
  • the visible area generally refers to the entire display area of the computer.
  • the display window is invisible when entering the menu bar. The user can also adjust the length and width of the display window. In this case, the display window occupies part of the display area of the electronic device, and the visible area is the area enclosed by the four sides of the display window.
  • the display window may refer to the screen area 200 of the mobile phone, and the visible area generally refers to the screen area 200 of the mobile phone; of course, for a mobile phone that can change the size of the APP display window, the display window may also be located in a partial display area of the mobile phone screen, and the visible area refers to the area enclosed by the four sides of the display window.
  • the size of the visible area of the display window can be determined first, and then the size of all elements included in the page data can be adjusted according to the size of the visible area.
  • the display device can have an instance for obtaining the size of the visible area of the display window of the web end (or APP), through which the change of the size of the visible area of the display window of the running web end (or APP) can be monitored in real time, and the size of the visible area of the display window of the running web end (or APP) can be passed to the instance for displaying page data in real time, so that the instance for displaying page data can adaptively adjust the size of the elements in the page data according to the size of the visible area of the passed display window, so that the size of the elements can adapt to the size of the visible area, thereby ensuring that all elements of the page data are located in the visible area of the display window.
  • the elements in the page data may include elements such as text, icons, and controls.
  • the page data may also be embedded with a playback window for playing multimedia data, and the corresponding multimedia content is played in the playback window.
  • an element As shown in Figures 2, 3, and 4, a schematic diagram of page data 300 is shown, in which the horizontal line portion represents text, and icons such as pentagons, hexagons, and five-pointed stars represent elements such as icons and controls in the page data.
  • the adjustment of the size of the element may include the adjustment of the width of the element and/or the adjustment of the height of the element. Specifically, depending on the size of the visible area of the display window, the size of the element in the width direction may be adjusted only, or the size of the element in the height direction may be adjusted only. Or adjust the size of an element in both width and height.
  • the width direction can be understood as the width direction of the display screen of the electronic device, that is, the horizontal direction in Figures 2, 3 and 4;
  • the height direction can be understood as the height direction of the display screen of the electronic device, that is, the longitudinal direction in Figures 2, 3 and 4.
  • the display device needs to pass the size of the visible area of the display window of the running web terminal (or APP) to the instance for displaying page data, wherein the instance for displaying page data can run on the display device or on the cloud.
  • the instance for displaying page data can adjust the size of the elements in the acquired page data in the width direction and/or height direction according to the size of the visible area, and render the adjusted elements into the display window according to their original layout;
  • the cloud can adjust the size of the elements in the width direction and/or height direction according to the size of the visible area, and combine the adjusted elements according to the original view layout to form new page data, and send the new page data to the display device, so that the display device can render the received new page data into the display window.
  • the overall size of the view composed of the page data is adjusted, so that the view can adapt to the size of the visible area of the display window, so that all elements of the page data can be located in the visible area of the display window.
  • the adjusted page data can be obtained, and then the adjusted page data can be displayed in the display window.
  • the APP when the APP is triggered on the mobile phone, all elements in the home page data of the APP are located in the display screen of the mobile phone. In this way, there may be no scroll bar or there may be a scroll bar in the user interaction interface of the APP, but since all elements in the home page data are already located in the display screen of the mobile phone, the user can see all the data contained in the home page in the display screen without sliding the scroll bar up and down or left and right. For pages with more page data, this display method can help users quickly browse the content contained in the page.
  • Image 301 in Figure 3 is a schematic diagram of the display interface of displaying page data 300 in a browser on a 4K large screen in the related art
  • Image 302 in Figure 3 is a schematic diagram of the display interface of displaying page data 300 on a 4K large screen using the display method disclosed in the present invention.
  • the page data of the web page is not all located in the visible area, and the user needs to pull up and down the scroll bar 303 to browse all the content; while in the present display method, all elements in the page data are located in the visible area, and the user can browse all the content without pulling up and down the scroll bar.
  • gesture control for example, when displaying page data on a 4K large screen in the manner of 301, if the user needs to slide the scroll bar up and down to browse the page data, he needs to make a gesture to select the scroll bar, and then make another gesture to drag the scroll bar up and down 303.
  • This requires a set of equipment and algorithms to recognize the user's gesture, and then start the corresponding control logic according to the recognized gesture, and generate corresponding operation data according to the control logic to control the web page to slide up and down or switch pages.
  • the user needs to make gestures many times to successfully slide the scroll bar up and down to complete web browsing.
  • the size of the elements included in the page data is adjusted according to the size of the visible area of the display window. Therefore, for different display devices, after the size of the elements in the page data is adjusted, the size of the page view constituted by it adapts to the display window, so that all the elements of the adjusted page data are located in the visible area of the display window; because all the elements of the page data are located in the visible area of the display window, the user can see the entire content of the page data in the visible area of the display window without dragging the scroll bar to browse, thus simplifying the user's operation and further improving the user's browsing experience of the web page.
  • the size of the elements in the page data when the size of the elements in the page data is adjusted based on the size of the visible area of the display window, it can be determined according to the current resolution of the display device where the display window is located. Specifically, in response to the display trigger of the page data, the current resolution of the display device where the display window is located can be obtained, and the size of the elements included in the page data can be adjusted based on the current resolution and the preset resolution of the page data.
  • the visible area of the display window is the display area of the display device, and the display area of the display device is related to the resolution of the display device.
  • the screen resolution of the computer is 1920x1080
  • the display resolution of the computer can be set to 1920x1080, or it can be set to a resolution less than 1920x1080, such as 1680 ⁇ 1050. If it is set to 1680 ⁇ 1050, then compared with the resolution of 1920x1080, its display area is smaller.
  • FIG. 4 a schematic diagram of the display interface of a computer at two resolutions is shown. As shown in FIG.
  • the resolution on the left is 1920x1080, and the resolution on the right is 1680 ⁇ 1050; then for the display window, the size of the visible area of the display window on the left is 1920x1080, and the size of the visible area of the display window on the right is 1680 ⁇ 1050. Therefore, the current resolution of the display device can be used as the size of the visible area.
  • the page data may have a preset resolution, which may be a resolution agreed upon in advance when designing the UI design draft of the page data. It should be noted that:
  • the preset resolution refers to the resolution standard that is referenced when designing page data. For example, if the agreed preset resolution is 1920x1080, the size of the elements in the designed page data is designed according to 1920x1080.
  • the size of the visible area of the display window can be determined according to the preset resolution and the current resolution of the display device, and the size relationship between the size of the page view presented by the page data can be determined, so that the size of the elements in the page data can be adjusted according to the size relationship, and the condition for the adjustment is that all elements in the page data can be located in the visible area.
  • a first size ratio of the page data can be determined based on the preset resolution
  • a second size ratio of the display window can be determined based on the current resolution
  • a second adjustment parameter can be determined based on the first size ratio and the second size ratio
  • the size of the elements included in the page data can be adjusted based on the second adjustment parameter.
  • the second adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction.
  • the resolution includes the size in the width direction and the size in the height direction, so the first size ratio and the second size ratio can both be the ratio of the width component to the height component in the resolution.
  • the preset resolution is 1920x1080
  • the first size ratio is 1920/1080
  • the current resolution is 1680 ⁇ 1050
  • the second size ratio is 1680/1050.
  • the second adjustment parameter can be understood as the value of transforming the first size ratio to the second size ratio, such as transforming 1920/1080 to 1680/1050.
  • the value can be represented by the second adjustment parameter, that is, the second adjustment parameter can be understood as: the view presented by the page data can be adapted to the current resolution after being transformed to which scale in the width and height directions respectively.
  • adjusting the size of the element included in the page data includes scaling each element included in the page data. That is, the element can be scaled according to the second adjustment parameter, wherein the second adjustment parameter can include a scaling ratio of the width and a scaling ratio of the height.
  • the width can be scaled according to the scaling ratio of the width
  • the height can be scaled according to the scaling ratio of the height.
  • scaling the element according to the second adjustment parameter when scaling the element according to the second adjustment parameter, it can be implemented based on the scale method in transform in CSS3, where the scale method focuses on achieving the scaling effect of the element (scaling is "reducing” and “enlarging”).
  • scaling is "reducing” and "enlarging”
  • the display device may feed back the target resolution of the display window monitored by the web end (or APP) to the instance displaying the page data, wherein:
  • the example of display page data may include a preset ratio conversion algorithm, which may determine a second size ratio according to the target resolution of the display window fed back, and then determine a second adjustment parameter according to the relationship between the first size ratio and the second size ratio;
  • the preset resolution corresponding to the page data can be carried in the page data as an attribute parameter of the page data.
  • the instance displaying the page data can read the preset resolution and pass it to the proportional conversion algorithm to determine the first size ratio, and pass the target resolution of the display window fed back to the proportional conversion algorithm to determine the second size ratio. Then the proportional conversion algorithm determines the second adjustment parameter based on the relationship between the first size ratio and the second size ratio.
  • the obtained second adjustment parameter can continue to be passed to the scale method.
  • the responsive unit conversion based on rem is mainly used to realize the adaptation of page data to the display screen.
  • the front-end rem is a relative unit relative to the pixel unit, which uses the font size of the root element as a benchmark instead of a fixed pixel value.
  • the conversion process it is necessary to use units relative to the root element to define various sizes instead of using fixed pixel values.
  • the developer needs to convert between rem and px during the development process, which is relatively burdensome for the developer's mind and has a large development workload.
  • the size that the browser can display is 12px, and the use of rem cannot break through this bottleneck. Even if rem is converted to less than 12px, the browser still displays it at 12px. In reality, the user may want to display it at 4px, but the use of rem cannot achieve this function, that is, the method of using rem cannot make the browser display it at 4px.
  • the size of the element is adjusted according to this relative size relationship, so that the overall view of the page is fine-grainedly adjusted starting from the size of the element, thereby breaking through the bottleneck limit of 12px, so that the browser can display elements with a size smaller than 12px, thereby broadening the function of page display.
  • the display device can be a spliced screen, which is composed of multiple display screens.
  • the spliced screen can be regarded as a complete display screen to adaptively adjust the size of the elements in the page data.
  • the display window includes multiple sub-display areas, and different sub-display areas are located in different display devices; when the size of the elements included in the page data is adjusted based on the display window of the page data to be displayed, the window resolution of the display window can be determined in response to the display trigger of the page data based on the screen resolutions corresponding to each of the multiple display devices; and the size of the elements in the page data can be adjusted based on the window resolution and the preset resolution of the page data.
  • FIG. 5 shows a schematic diagram of a display method in the case of a spliced screen. It is composed of display areas of multiple display devices spliced together. Each display device has its own corresponding screen resolution, which refers to the highest resolution inherent in the display device. In order to enable splicing between display devices, different display devices can have the same screen resolution. As shown in Figure 5, the screen resolutions of display devices 1-4 are all 1920x1080; then the window resolution of the spliced screen can be the resolution obtained after splicing: 3840x2160, so the size of each element in the page data can be adjusted according to the window resolution and the preset resolution.
  • the spliced screen can be regarded as a complete screen. According to the resolution of the complete screen, the sizes of all elements in the page data are adjusted so that all elements in the page data are located in the visible area of the display window. In this way, the user can see all the content contained in the web page on the large screen without moving the scroll bar.
  • FIG. 6 an overall flow chart of the exemplary display method is shown.
  • the Scale object shown in FIG. 6 is the Scale method in this example.
  • the display may be performed in the following process:
  • the base resolution is 1920x1080, and specify the default scaling value as 1 (width and height scaling multiples).
  • the base ratio can be approximately 1.77778 (1920/1080), which is named baseRatio; of course, in addition to this base resolution, the page data can also contain other basic parameters.
  • the display device sends the acquired resolution of the display device to the instance of the display page data, and the ratio conversion algorithm in the instance of the display page data determines the size ratio of the element to be adjusted according to the acquired resolution and the preset resolution of the page data, and the process is as follows:
  • a ratio is calculated, which is called currentRatio.
  • currentRatio is determined.
  • the second adjustment parameter is applied to the page data, for example, the second adjustment parameter is passed to the scale method of the transform attribute in CSS3, and the scale method will scale each element in the page data according to the size ratio.
  • the proportional conversion algorithm will pass the scaling ratio in the width direction and the scaling ratio in the height direction in the second adjustment parameter to the two parameters x and y in the scale object respectively.
  • S7 An instance of displaying the page data will render the scaled view of the page data into the display window. At this time, all elements in the page data are located in the visible area of the display window.
  • This example can be applied to various types of display devices such as mobile phones, 4K screens, spliced screens, computers, MP4s, etc.
  • the view display can present the most perfect ratio according to the display window.
  • the page data may be adaptively adjusted in response to changes in the display window, so that no matter what changes occur in the display window, all elements of the page data are located in the visible area of the display window. For example, after the visible area is reduced, all elements of the page data are still located in the visible area after the size is changed. For example, after the visible area is enlarged, all elements of the page data are located in the visible area. domain and the size increases accordingly to fit the current visible area.
  • FIG. 7 a schematic flow chart of another display method is shown.
  • the change of the display window may be monitored.
  • the following steps may be performed:
  • Step 201 In response to a change in the display window, adaptively adjust the size of the elements included in the page data; wherein the change includes a change in the size of the visible area of the display window and a change in the display resolution;
  • Step 202 Displaying the adaptively adjusted page data in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.
  • the change of the display window includes the change of the height and width of the display window, and there are two situations that cause the display window to change in the width direction and the height direction.
  • One is that the visible area of the display window is changed by manual operation.
  • the resolution of the display device where the display window is located remains unchanged, which is 1920 ⁇ 1080.
  • the display window is adjusted by the user from maximized display to non-maximized display, so that the visible area 200 of the display window is changed; the other is that the screen resolution of the display device where the display window is located is adjusted.
  • the display device where the display window is located is adjusted from high resolution (1920 ⁇ 1080) to low resolution (1680 ⁇ 1050), which also changes the size of the display window.
  • the size of the elements in the page data can be adaptively adjusted based on the size of the visible area of the display window after the change, so that all elements in the page data can always be located in the visible area of the display window.
  • the size of the visible area of the changed display window can be obtained, and then, based on the size of the changed visible area, the size of the elements in the page data is adaptively adjusted, and the adaptively adjusted page data is displayed in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.
  • the display device can call the monitoring interface built into the display device to monitor the size change of the visible area of the display window.
  • the web end or APP
  • the web end can be notified to obtain the size of the visible area of the display window, such as the innerWidth and innerHeight properties of the window object described above, to obtain the size of the visible area after the change.
  • the innerWidth and innerHeight attributes of the window object can feed back the acquired size of the visible area to the instance displaying the page data, so that the instance displaying the page data readjusts the elements in the page data according to the process of the above step S5-57.
  • the process of adaptively adjusting the size of the element in the page data based on the changed size of the visible area of the display window may refer to the process of step S101 described above.
  • a real-time response can be made to changes in the resolution of the display device and the size of the display window, so that after each change in the resolution of the display device or the size of the display window, the view display of the page data is proportionally presented in the most perfect proportion.
  • the user after the user changes the size of the display window, and changes the resolution of the display device causing the size of the display window to change, the user can still see the entire content of the page data in the visible area of the changed display window, thereby optimizing the user's browsing experience.
  • adaptive adjustment of the size of an element in page data may include: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is the height direction or the width direction of the display window, and the first direction is perpendicular to the second direction.
  • the size of the element in the page data displayed in the display window has changed in the first direction, and may also have changed in the second direction, or both in the first direction and the second direction. Specifically, it can be determined according to the change of the visible area of the display window. For example, if the visible area has changed in the width direction but not in the height direction, the size of the element has changed in the width direction before and after the display window has changed, while the size of the element has not changed in the height direction.
  • the size of the element has changed in the height direction before and after the display window has changed, while the size of the element has not changed in the width direction; if the visible area has changed in both the height and width directions, the size of the element has changed in both the height and width directions before and after the display window has changed.
  • the size changes of the elements in the visible area also adapt to the changes of the display window.
  • FIG8 shows a situation where the size of the display window is adjusted by the user. This adjustment causes the size of the visible area of the display window to change.
  • the monitoring interface built into the display device can monitor whether the size of the display window is adjusted. When the size adjustment operation is detected, the monitoring interface can respond to the size adjustment operation of the display window and determine the size parameters of the visible area of the display window after the size adjustment operation. Then, based on the size parameter, the size of the elements included in the page data is adaptively adjusted; wherein the size change includes a change in the width and/or height of the display window.
  • a size parameter of the display window after the size adjustment may be acquired, and the size of the element included in the page data may be adaptively adjusted based on the size parameter.
  • the size adjustment operation may include an operation to extend or shorten the width of the display window. For example, if the user selects the edge of the display window with the mouse and drags the edge to the outside of the display window, the width increases; if the user moves the edge to the inside of the display window, the width decreases.
  • the size adjustment operation may include an operation to extend or shorten the height of the display window.
  • the size adjustment operation may be a predetermined operation, such as double-clicking the left mouse button continuously to reduce the display window to a certain size; and clicking the left mouse button three times continuously to expand the display window to a certain size.
  • the innerWidth and innerHeight properties of the window object can obtain the size of the display window after resizing, and then obtain the size parameter, which can characterize the size transformation relationship between the display window and the page data. Then, according to the process of adjusting the size of the elements in the page data based on the second adjustment parameter in the above embodiment, the size of the elements can be adjusted according to the size parameter.
  • the size of elements in the page data can be adjusted based on size parameters in two ways.
  • One of the ways is that when a size adjustment operation is detected, the size of the elements in the adjusted page data displayed in the display window before the adjustment can be adjusted according to the size change of the visible area of the display window before and after the adjustment.
  • a first size of the visible area of the display window before adjustment and a second size of the display window after the size adjustment operation can be determined, and a size parameter can be determined based on the first size and the second size. Then, the size of the element included in the adjusted page data can be adaptively adjusted based on the size parameter.
  • the instance of displaying page data can determine the size change of the display window before and after adjustment based on the first size and the second size. Based on this size change, the size of the elements in the adjusted page data can be adjusted directly on the basis of the adjusted page data, without the need to adjust the original size.
  • this method is adopted, the size of the element in the page data is adjusted in step 101, and the adjusted page data is saved.
  • the ratio between the dimension in the width direction and the dimension in the height direction in the first size can be taken as the ratio before adjustment, and then the ratio between the dimension in the width direction and the dimension in the height direction in the second size is determined, and this ratio can be called the ratio after adjustment; based on the size relationship between the ratio before adjustment and the ratio after adjustment, the change in the height direction and the change in the width direction of the visible area of the display window are determined.
  • the size of the element in the adjusted page data in the width direction may be scaled according to the ratio before and after the change in the width direction.
  • the ratio before and after the change in the height direction and the ratio before and after the change in the width direction can be determined. Then, the size of the element in the height direction is scaled according to the ratio before and after the change in the height direction, and the size of the element in the width direction is scaled according to the ratio before and after the change in the width direction.
  • the adaptively adjusted page data can be displayed in the visible area of the changed display window. Because the elements of the page data are resized to adapt to the change of the visible area of the display window, all elements in the page data are still located in the visible area of the changed display window.
  • the instance of the display page data may be run in the display device, and when the instance of the display page data displays the adjusted page data on the display window, the first size of the visible area of the display window and the adjusted page data may be saved, such as saving the first size and the adjusted page data in the local of the display device;
  • the innerWidth and innerHeight properties of the window object can be indicated to obtain the second size of the visible area of the display window after adjustment, and the second size is passed to the instance of displaying the page data;
  • a ratio conversion algorithm in an instance of displaying page data determines a size parameter based on a first size and a second size
  • the size parameter is passed to the scale method in the instance that displays the page data.
  • an instance of the display page data can also run in the cloud, and the first size and the adjusted page data can also be saved in the cloud and correspond to the display device, so that when the second size is obtained after the visible area of the display window on the display device changes, the size of the elements in the adjusted page data can be adjusted in the cloud, and then the adaptively adjusted page data is fed back to the display device, so that the display device renders the adaptively adjusted page data into the display window.
  • the size of the elements in the adjusted page data before the change is adaptively adjusted directly according to the size change of the display window before and after the change, thereby simplifying the adjustment process and eliminating the need to adjust based on the original page data. Therefore, the speed of responding to changes in the display window can be improved.
  • Another method is: when a resizing operation is detected, a second size of the visible area of the display window after the resizing operation and a screen resolution of the display device where the display window is located are obtained; a preliminary ratio is determined based on the screen resolution and a preset resolution of the page data; and then, based on the preliminary ratio and the second size, the size of the elements included in the page data is adaptively adjusted.
  • the second size may include the size of the visible area in the height direction and the size in the width direction.
  • the initial ratio for preliminary adjustment of the page data may be determined according to the current resolution of the display device where the display window is located and the preset resolution of the page data.
  • the initial ratio may include the scaling ratio in the height direction and the scaling ratio in the width direction.
  • the scaling ratio may be determined with reference to the process of step S5 above, which will not be described in detail here.
  • the size of the element in the page data may be preliminarily adjusted according to the preliminary ratio to obtain an adjusted element, wherein the adjusted element may be element A;
  • the proportional relationship between the second size and the maximized size can be regarded as the size change before and after the display window is adjusted in the above manner, that is, each size adjustment operation of the display window is regarded as its change relative to the maximized display window; thereby, it is possible to determine the size change in the height direction and the size change in the width direction of the visible area of the adjusted display window compared to the maximized size, thereby obtaining the change ratio in the height direction and the change ratio in the width direction.
  • the size of the element A is adjusted according to the change ratio in the height direction and the change ratio in the width direction, thereby obtaining the adjusted element A'.
  • the element A' is adapted to the adjusted display window.
  • the instance of displaying page data may be run in the cloud.
  • the page data, the resolution of the display window, and the adjustment parameters used when obtaining the adjusted page data may be saved.
  • the resolution and the second adjustment parameters may be saved locally in the display device.
  • the ratio conversion algorithm in the instance of displaying the page data determines the ratio relationship between the second size and the resolution based on the size between the second size and the saved resolution;
  • the proportional conversion algorithm passes the proportional relationship between the second size and the resolution to the scale method.
  • the instance displaying the page data sends the adaptively adjusted page data to the display device, and the display device can display it on the front-end page.
  • the resolution change may include the change of the resolution of the same display device, such as the resolution of a computer is adjusted from 1920 ⁇ 1080 to 1680 ⁇ 1050; it may also include the display window The situation of dragging from one display device to another, such as projecting the display window from display device A to display device B.
  • the resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen.
  • the drag operation of moving the display window from the first display screen to the second display screen may mean that the user selects the display window and drags it.
  • the display window jumps to the second display screen and displays the page data on the second display screen.
  • the resolution of the second display screen can be used as the target resolution, which can be adapted to the collaborative display scenario of multiple display screens.
  • the monitoring interface can be located in the web end, for example, bound to a browser, and can be used to detect whether the display window used by the same user has undergone display screen migration, that is, to monitor whether the display window is in the same display screen. If it is monitored that the display window has migrated between two display screens, the innerWidth and innerHeight properties of the window object on the display device where the migrated display screen (the second display screen) is located can be indicated to obtain the target resolution of the second display screen. At this time, the target resolution can be informed of the instance of the display page data located in the cloud, so that the cloud can adaptively adjust the elements of the page data based on the target resolution and send them to the second display screen for display.
  • the user may adjust the resolution of the display device, such as adjusting the resolution of the computer from 1920 ⁇ 1080 to 1680 ⁇ 1050, then the size of the display area of the display screen changes. In this case, the size of the displayed elements will also change accordingly.
  • the adjusted resolution of the computer can be used as the target resolution.
  • a first adjustment parameter when adjusting the size of elements in page data based on the target resolution, can be determined based on the target resolution and a preset resolution of the page data; then, based on the first adjustment parameter, the size of the elements included in the page data is adjusted.
  • the first adjustment parameter includes a scaling ratio in the height direction and a scaling ratio in the width direction. example.
  • the first adjustment parameter may be similar to the second adjustment parameter.
  • the process of adjusting the size of the elements included in the page data according to the first adjustment parameter may refer to the above-mentioned process of adjusting the size of the elements included in the page data according to the second adjustment parameter, and will not be repeated here.
  • the size of the elements in the displayed page data can be adaptively changed accordingly, so that all elements in the page data are always located in the visible area of the display window before and after the resolution changes; when the display window jumps from one display device to another display device, the size of the elements in the displayed page data can be adapted to the resolution of the other display device, so that all elements in the page data are always located in the visible area of the display window before and after the display device changes.
  • the size of the element of the page data is adjusted based on the size of the display window before and after the change, from a visualization perspective, the size of the same element in the page data in the display window before the change and the size in the display window after the change have a first ratio; the visible area of the first display window and the visible area of the second display window have a second ratio;
  • FIG. 9 an example of the above embodiment is given, as shown in FIG. 9 .
  • steps S1-S7 shown in FIG. 6 the following process may be included:
  • the resize event is the monitoring interface mentioned above, which monitors the size changes of the visible area of the display window, which specifically includes monitoring the size adjustment operation of the display window and the resolution change of the display device where the display window is located.
  • a timer can be started to create a macro task, that is, to activate a resize event.
  • the resize event is activated, the innerWidth and innerHeight properties of the window object are notified, and the height and width of the display window before the change are recorded as (W1, H1); the (W1, H1) can be saved locally on the display device, or (W1, H1) can be fed back to the cloud through the connection between the display device and the cloud;
  • the example of displaying the page data repeats the above steps S5-S7 to The size of the element is adaptively changed, as shown in FIG4 , and the page data after the size change is displayed in the changed display window, obtaining the display effect shown in FIG4 .
  • the example of displaying the page data calculates the size parameters between (W1, H1) and (W2, H2), and adjusts the sizes of the elements in the pre-saved adjusted page data, i.e., the page data obtained in step S6, according to the size parameters.
  • the page data after the size adjustment is displayed in the changed display window, and the display effect shown in Figure 8 is obtained.
  • step S11 Go back to step S8 and activate the resize event, so that the resize event continues to monitor the size changes of the visible area of the display window.
  • each size change of the display window can be monitored and quickly responded to, and the size of the elements in the page data can be adaptively adjusted, thereby ensuring that each view response is applied to the changes in the display window one by one.
  • the present disclosure adjusts the elements in the page data based on the ratio between the size of the visible area of the display window and the preset resolution corresponding to the page data
  • the calculation of the ratio can be performed by a ratio conversion algorithm.
  • the instance displaying the page data when the instance displaying the page data is located locally on the display device, it can quickly respond to the size change of the visible area of the front display window. This is because the path for monitoring the size change of the visible area and informing the instance displaying the page data is shortened and does not rely on network communication. Therefore, the response time can be shortened, thereby achieving the purpose of the page data quickly responding to the size change of the visible area.
  • the size change of the visible area of the front display window can be notified to the cloud by the display device. Since the cloud has more powerful hardware resources than the display device, for page data with more elements, adaptive adjustment of the page data in the cloud can improve the adjustment efficiency, thereby avoiding the problem of long response time caused by insufficient computing power resources on the display device side.
  • instances of displaying page data may be deployed on both the display device side and the cloud side.
  • it may be determined whether to perform adaptive adjustment on the display device or on the cloud side according to the data volume of the page data. For example, when the data volume of the page data is greater than or equal to the preset data volume, the display device may inform the cloud side of the size of the visible area, and the cloud side may perform adaptive adjustment; when the data volume of the page data is less than the preset data volume, the display device may perform adaptive adjustment on the elements in the page data locally according to the size of the visible area.
  • the amount of page data can be notified to the display device by the cloud in advance. If the display device side triggers a display request for the page data, the cloud determines the page data to be displayed and the amount of the page data based on the display request. Then, the amount of the page data can be notified to the display device first, and the display device decides whether to perform adaptive adjustment locally or in the cloud based on the amount of the notified page data. If the display device decides to perform adaptive adjustment locally, the cloud will send the page data to the display device; if the display device decides to inform the cloud to perform adaptive adjustment, the display device needs to inform the cloud of the size of the visible area of the display window, and the cloud will adjust the page data according to the size before sending it to the display device.
  • the performance of the display device can be adapted to achieve the optimal response efficiency.
  • the present disclosure also provides a display system with an adaptive visual area, as shown in FIG10 , which shows a schematic diagram of the framework structure of the display system. As shown in FIG10 , it can specifically include a content provider and a display module, wherein the content provider is used to provide page data, and the display module is used to execute the above-mentioned display method.
  • the content provider is mainly used to support the data and business logic of the application. Its main function is to support the view in the application, provide page data for the view, and respond to the operations in the page in a timely manner. That is, the operation data of the user performing operations on the controls in the page can be fed back to the content provider.
  • the content provider provides the corresponding page data based on the operation data, and hands it over to the display module to render the page data in the display window.
  • the display module can be adapted to various types of display devices, such as mobile display devices, including mobile phones and tablets, and APP (Application, mobile software) installed on the mobile terminal. And display devices with web terminals installed, such as high-definition screens, 4K screens; and large screens with web segments installed, such as spliced screens and 8K screens.
  • display devices with web terminals installed, such as high-definition screens, 4K screens; and large screens with web segments installed, such as spliced screens and 8K screens.
  • the display module in this embodiment may refer to an instance of the above-mentioned display page data, and the display module may be located in a display device or in the cloud.
  • the display module may include a response unit and a view unit; wherein:
  • the response unit is used to determine a second adjustment parameter for adjusting an element in the page data based on a current resolution of a display device where the display window is located and a preset resolution of the page data;
  • the view unit is used to adjust the size of the element included in the page data based on the second adjustment parameter transmitted by the response unit.
  • FIG. 11 another schematic diagram of the framework structure of the display system is shown.
  • the response unit is located between the view unit and the content provider, and acts as a communication bridge between the view unit and the content provider.
  • the response unit is used to provide the second adjustment parameter to the view unit and input the user's operation data to the content provider. Specifically, in this embodiment, it is mainly used to determine the second adjustment parameter for adjusting the elements in the page data based on the window parameters of the display window to display the page data and the preset resolution of the page data, and then pass the second adjustment parameter to the view unit.
  • the view unit is used to process the view layer, that is, to define the structure of the user interface.
  • it is mainly used to adjust the size of the element in the page data based on the second adjustment parameter transmitted by the response unit and then render it into the page, so as to become a view that the user can see.
  • the process of adjusting the size of the element in the page data based on the second adjustment parameter can refer to the process described in the embodiment of the above display method, and will not be repeated here.
  • the process can be:
  • the view unit monitors the operations performed on the controls in the page through DOM events. If it monitors that an operation is performed on a certain control, it means that a new page needs to be entered and the page data on the new page needs to be displayed. Then, the operation data of the operation can be fed back to the response unit. The response unit feeds back the operation data to the content provider. The content provider provides corresponding page data based on the operation data.
  • the view unit scales the size of the elements in the page data based on the mapping performed by the Scale method in the response unit according to the second adjustment parameter, and displays the adjusted page data in the display window.
  • the response unit can realize content distribution between the web front end and the server.
  • Such an architecture can make the display system easier to maintain and test, because only the program of the response unit can be changed to automatically reflect the change in the page view provided by the view unit, which is convenient for testing and maintenance of the display method.
  • the content provider and the view unit can be decoupled, and the two are not connected, thereby ensuring their independence, so that they can be maintained separately.
  • the display system may further include a monitoring unit, configured to monitor changes in the display window, and trigger the display module to perform an adaptive adjustment operation when changes in the display window are monitored;
  • the adaptive adjustment operation includes: adaptively adjusting the size of the elements included in the page data, and displaying the adaptively adjusted page data in the changed display window;
  • the changes include changes in the size of the visible area of the display window and changes in the display resolution.
  • the monitoring unit may monitor changes in the visible area of the display window, and upon detecting changes, the response unit may adaptively adjust the size of elements in the page data according to the size of the changed visible area.
  • the display module can also be used to instruct the monitoring unit to monitor the changes in the display window again after performing the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the changes in the display window are monitored; or, monitor the changes in the display window again after a preset time after the monitoring unit triggers the display module to perform the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the changes in the display window are monitored.
  • the response unit can be located in the web front end or server, the view unit can also be located in the web front end or server, and the monitoring unit can be located in the web front end. That is, the response unit and the view unit in this embodiment can be located in the display device and the cloud, respectively.
  • the response unit in the display module may be located in the cloud, and the view unit may be located in the display device; or the response unit of the display module may be located in the display device, and the view unit may be located in the cloud; or both may be located in the display device or both may be located in the cloud.
  • a response unit, a monitoring unit and a view unit are included on both the cloud side and the display device side; and according to the performance of the display device, when adaptively adjusting the elements of the page data, adjustments can be made on the cloud side or on the display device side to improve response efficiency.
  • the adaptive adjustment process may refer to the adjustment process related to FIG. 7 , which will not be described in detail here.
  • the display module may instruct the monitoring unit to start monitoring changes in the display window, and when changes in the display window are monitored, the display module is triggered to perform the adaptive adjustment operation;
  • the monitoring unit may start a countdown of a preset duration when triggering the display module to perform an adaptive adjustment operation, and when the countdown is reached, monitor the changes in the display window again, and when monitoring the changes in the display window, trigger the display module to perform an adaptive adjustment operation.
  • the size of the elements in the page data changes adaptively, so that each time the size of the visible area of the display window changes, all elements in the page data are located in the visible area.
  • the size of the element is adjusted according to this relative size relationship, so that the overall view of the page is fine-grainedly adjusted starting from the size of the element, thereby breaking through the bottleneck limit of 12px and allowing the browser to display elements smaller than 12px, thereby broadening the page display function.
  • the present disclosure also provides a display device with an adaptive visible area, as shown in FIG12 , which shows a schematic diagram of the structure of the display device.
  • the display device may specifically include the following modules:
  • An adjustment module configured to adjust the size of the elements included in the page data based on the size of the visible area in the display window in response to a display trigger of the page data; wherein the display window is used to display the page data;
  • all elements in the page data are located in the visible area of the display window.
  • the device further comprises:
  • an adaptive adjustment module configured to adaptively adjust the size of the elements included in the page data in response to a size change of the display window
  • the adaptive adjustment module includes at least one of the following:
  • the first adjustment unit includes:
  • the third adjustment unit is used to adjust the size of the element included in the page data based on the first adjustment parameter.
  • a parameter determination subunit configured to determine the size parameter based on the first size and the second size
  • the adjusting subunit is used to adaptively adjust the size of the elements included in the adjusted page data based on the size parameter.
  • a resolution acquisition subunit used to acquire a first size of a visible area of the display window after the size adjustment operation, and a current resolution of a display device where the display window is located;
  • a size of the same element in the page data in the display window before the change and a size of the same element in the display window after the change have a first ratio
  • the first ratio is linearly correlated with the second ratio.
  • the adjustment module includes:
  • a resolution acquisition unit configured to acquire a current resolution of a display device where the display window is located in response to a display trigger of the page data
  • the adjusting unit is used to adjust the size of the elements included in the page data based on the current resolution and the preset resolution of the page data.
  • the adjustment unit is specifically configured to perform the following steps:
  • the size of the element included in the page data is adjusted.
  • determining a window resolution of the display window based on screen resolutions corresponding to each of the plurality of display devices
  • the size of the element in the page data is adjusted.
  • adjusting the size of the elements included in the page data includes: scaling each element included in the page data.
  • the disclosed embodiment also provides an electronic device, the computer program stored in the electronic device enables the processor to execute the display method of the adaptive visible area as described in the disclosed embodiment.
  • the electronic device may refer to an electronic device with a display function, thereby enabling the electronic device to adaptively adjust the size of the elements in the page data according to the visible area of the display window, and can respond to the change in the size of the visible area and also adaptively adjust the size of the elements according to the change.
  • the embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the display method of the adaptive visible area as described in the embodiment of the present disclosure.
  • the computer-readable storage medium may be located in the electronic device, or may be located in the cloud, thereby enabling the electronic device or the cloud to adjust the page number according to the visible area of the display window.
  • the size of the elements in the data is adaptively adjusted, and the size of the elements can be adaptively adjusted according to the change in the size of the visible area.
  • references herein to "one embodiment,” “embodiment,” or “one or more embodiments” mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present disclosure.
  • examples of the term “in one embodiment” do not necessarily all refer to the same embodiment.
  • any reference signs placed between brackets shall not be construed as limiting the claims.
  • the word “comprising” does not exclude the presence of elements or steps not listed in the claims.
  • the word “a” or “an” preceding an element does not exclude the presence of a plurality of such elements.
  • the present disclosure may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of means, several of these means may be embodied by the same item of hardware.
  • the use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A self-adaptive visual area display method, apparatus and system, and a medium, relating to the technical field of display, and aiming to improve the display effect. The display method comprises: in response to triggering of display of page data, on the basis of the size of a visual area in a display window, adjusting the sizes of elements comprised in the page data, wherein the display window is used for displaying the page data; and displaying the adjusted page data in the display window, wherein all the elements in the page data are located in the visual area of the display window.

Description

自适应可视区域的显示方法、装置、系统及介质Display method, device, system and medium of adaptive visual area

本申请要求在2023年07月25日提交中国专利局、申请号为202310922858.2、发明名称为“自适应可视区域的显示方法、装置、系统及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the Chinese Patent Office on July 25, 2023, with application number 202310922858.2 and invention name “Display method, device, system and medium for adaptive visual area”, the entire contents of which are incorporated by reference in this application.

技术领域Technical Field

本公开涉及显示技术领域,特别是涉及一种自适应可视区域的显示方法、装置、系统及介质。The present disclosure relates to the field of display technology, and in particular to a display method, device, system and medium for adaptively viewing areas.

背景技术Background Art

随着显示技术的发展,出现了多种类型的显示设备,如手机、电脑、4K大屏等,其中,需要在这些不同的显示设备上显示页面数据,如打开手机的浏览器,需要在浏览器的窗口中显示页面数据,又例如,利用4K大屏显示页面数据时,便需要位于大屏的浏览器窗口中显示页面数据。With the development of display technology, various types of display devices have emerged, such as mobile phones, computers, 4K large screens, etc. Among them, page data needs to be displayed on these different display devices. For example, when opening a mobile phone's browser, the page data needs to be displayed in the browser window. For example, when using a 4K large screen to display page data, the page data needs to be displayed in the browser window of the large screen.

概述Overview

本公开提供了一种自适应可视区域的显示方法、装置、系统及介质。The present disclosure provides a display method, device, system and medium for an adaptive visible area.

本公开第一方面,提供一种自适应可视区域的显示方法,所述方法包括:In a first aspect, the present disclosure provides a method for displaying an adaptive visible area, the method comprising:

响应于对页面数据的显示触发,基于显示所述页面数据的显示窗口,对所述页面数据所包括的元素的尺寸进行调整;In response to a display trigger of the page data, adjusting the size of the elements included in the page data based on a display window displaying the page data;

将调整后的页面数据显示到所述显示窗口中;Displaying the adjusted page data in the display window;

其中,所述页面数据中的全部元素均位于所述显示窗口的可视区域中。Wherein, all elements in the page data are located in the visible area of the display window.

可选地,所述将调整后的页面数据显示到所述显示窗口之后,所述方法还包括:Optionally, after displaying the adjusted page data in the display window, the method further includes:

响应于所述显示窗口的尺寸变化,对所述页面数据中所包括的元素的尺寸进行适应性调整;In response to the size change of the display window, adaptively adjusting the size of the elements included in the page data;

将适应性调整后的页面数据显示到变化后的显示窗口中,其中,所述页面数据中的全部元素均位于所述变化后的显示窗口的可视区域中。The adaptively adjusted page data is displayed in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.

可选地,所述响应于所述显示窗口的尺寸变化,对所述页面数据中所包括的元素的尺寸进行适应性调整,包括以下至少一者:Optionally, in response to the size change of the display window, adaptively adjusting the size of the element included in the page data includes at least one of the following:

响应于对所述显示窗口执行的尺寸调整操作,获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整;In response to a size adjustment operation performed on the display window, acquiring size parameters of the display window after the size adjustment, and adaptively adjusting the size of the elements included in the page data based on the size parameters;

响应于所述显示窗口所在的显示设备的分辨率变化,获取变化后的目标 分辨率,并基于所述目标分辨率对所述页面数据中所包括的元素的尺寸进行适应性调整。In response to a change in the resolution of the display device where the display window is located, obtaining a changed target The target resolution is determined, and sizes of elements included in the page data are adaptively adjusted based on the target resolution.

可选地,响应于所述显示窗口所在的显示设备的分辨率变化,获取变化后的目标分辨率,包括:Optionally, in response to a change in the resolution of a display device where the display window is located, acquiring a changed target resolution includes:

响应于将所述显示窗口从第一显示屏移动到第二显示屏的拖拽操作,将所述第二显示屏的分辨率作为所述目标分辨率;In response to a drag operation of moving the display window from the first display screen to the second display screen, taking a resolution of the second display screen as the target resolution;

和/或,响应于对所述显示窗口所在的显示设备的分辨率的调整操作,将调整操作后的分辨率作为所述目标分辨率;and/or, in response to an adjustment operation on the resolution of the display device where the display window is located, using the resolution after the adjustment operation as the target resolution;

其中,所述第一显示屏的分辨率不同于第二显示屏的分辨率;和/或,所述第一显示屏的尺寸不同于所述第二显示屏的尺寸。The resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen.

可选地,所述基于所述目标分辨率对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:Optionally, adaptively adjusting the size of the element included in the page data based on the target resolution includes:

基于所述目标分辨率和所述页面数据的预设分辨率,确定第一调整参数;其中,所述第一调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;Determining a first adjustment parameter based on the target resolution and a preset resolution of the page data; wherein the first adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction;

基于所述第一调整参数,对所述页面数据所包括的元素的尺寸进行调整。Based on the first adjustment parameter, the size of the element included in the page data is adjusted.

可选地,所述响应于对所述显示窗口执行的尺寸调整操作,获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:Optionally, in response to the size adjustment operation performed on the display window, acquiring a size parameter of the display window after the size adjustment, and adaptively adjusting the size of the element included in the page data based on the size parameter, comprises:

确定所述尺寸调整操作前所述显示窗口的可视区域的第一尺寸,以及所述尺寸调整操作后的显示窗口的第二尺寸;Determining a first size of a visible area of the display window before the size adjustment operation, and a second size of the display window after the size adjustment operation;

基于所述第一尺寸和所述第二尺寸,确定所述尺寸参数;Determining the size parameter based on the first size and the second size;

基于所述尺寸参数,对所述调整后页面数据中所包括的元素的尺寸进行适应性调整。Based on the size parameter, the size of the element included in the adjusted page data is adaptively adjusted.

可选地,所述获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:Optionally, acquiring size parameters of the display window after the size adjustment, and adaptively adjusting the sizes of elements included in the page data based on the size parameters, includes:

获取所述尺寸调整操作后所述显示窗口的可视区域的第一尺寸,以及所述显示窗口所在显示设备的当前分辨率;Acquire a first size of a visible area of the display window after the size adjustment operation, and a current resolution of a display device where the display window is located;

基于所述当前分辨率以及所述页面数据的预设分辨率,确定初步比例;Determining a preliminary ratio based on the current resolution and a preset resolution of the page data;

基于所述初步比例和所述第一尺寸,对所述页面数据中所包括的元素的尺寸进行适应性调整。Based on the preliminary ratio and the first size, the size of the element included in the page data is adaptively adjusted.

可选地,所述页面数据中的同一元素在变化前的显示窗口中的尺寸,与在变化后的显示窗口中的尺寸之间具有第一比例;Optionally, a size of the same element in the page data in the display window before the change and a size of the same element in the display window after the change have a first ratio;

所述第一显示窗口的可视区域与所述第二显示窗口的可视区域之间具有 第二比例;There is a gap between the visible area of the first display window and the visible area of the second display window. Second ratio;

其中,所述第一比例与所述第二比例呈线性相关。The first ratio is linearly correlated with the second ratio.

可选地,所述适应性调整,包括:对所述元素在第一方向上的尺寸的调整;和/或,对所述元素在第二方向上的尺寸的调整;其中,所述第一方向为所述显示窗口的高度方向或宽度方向,所述第一方向垂直于所述第二方向。Optionally, the adaptive adjustment includes: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is a height direction or a width direction of the display window, and the first direction is perpendicular to the second direction.

可选地,所述响应于对页面数据的显示触发,基于显示窗口的可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整,包括:Optionally, in response to triggering display of the page data, adjusting the size of the elements included in the page data based on the size of the visible area of the display window includes:

响应于对页面数据的显示触发,获取所述显示窗口所在的显示设备的当前分辨率;In response to a display trigger of the page data, obtaining a current resolution of the display device where the display window is located;

基于所述当前分辨率和所述页面数据的预设分辨率,对所述页面数据所包括的元素的尺寸进行调整。Based on the current resolution and a preset resolution of the page data, sizes of elements included in the page data are adjusted.

可选地,所述基于所述当前分辨率和所述页面数据的预设分辨率,对所述页面数据所包括的元素的尺寸进行调整,包括:Optionally, adjusting the size of the element included in the page data based on the current resolution and the preset resolution of the page data includes:

基于所述预设分辨率,确定所述页面数据的第一尺寸比例;Based on the preset resolution, determining a first size ratio of the page data;

基于所述当前分辨率,确定所述显示窗口的第二尺寸比例;Based on the current resolution, determining a second size ratio of the display window;

基于所述第一尺寸比例和所述第二尺寸比例,确定第二调整参数;其中,所述第二调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;Determining a second adjustment parameter based on the first size ratio and the second size ratio; wherein the second adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction;

基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整。Based on the second adjustment parameter, the size of the element included in the page data is adjusted.

可选地,所述显示窗口包括多个子显示区域,不同的子显示区域位于不同的显示设备中;所述基于待显示所述页面数据的显示窗口,对所述页面数据所包括的元素的尺寸进行调整,包括:Optionally, the display window includes a plurality of sub-display areas, and different sub-display areas are located in different display devices; and adjusting the size of the elements included in the page data based on the display window to display the page data includes:

响应于对所述页面数据的显示触发,基于多个所述显示设备各自对应的屏幕分辨率,确定所述显示窗口的窗口分辨率;In response to a display trigger of the page data, determining a window resolution of the display window based on screen resolutions corresponding to each of the plurality of display devices;

基于所述窗口分辨率和所述页面数据的预设分辨率,对所述页面数据中的元素的尺寸进行调整。Based on the window resolution and a preset resolution of the page data, the size of the element in the page data is adjusted.

可选地,对所述页面数据中所包括的元素的尺寸进行调整,包括:对所述页面数据中所包括的每个元素进行缩放。Optionally, adjusting the size of the elements included in the page data includes: scaling each element included in the page data.

可选地,所述基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整,包括:Optionally, adjusting the size of the element included in the page data based on the second adjustment parameter includes:

将所述第二调整参数映射到缩放函数scale方法中,作为scale方法中的缩放参数;Mapping the second adjustment parameter to a scaling function scale method as a scaling parameter in the scale method;

基于所述scale方法中的缩放参数,调用transform方法对所述页面数据中所包括的元素的尺寸进行调整。 Based on the scaling parameters in the scale method, the transform method is called to adjust the size of the elements included in the page data.

本公开还提供了一种自适应可视区域的显示系统,包括;The present disclosure also provides a display system with an adaptive visual area, comprising:

内容提供端,用于提供页面数据;Content provider, used to provide page data;

显示模块,用于基于所述页面数据,执行所述的显示方法。The display module is used to execute the display method based on the page data.

可选地,所述显示模块包括响应单元和视图单元;其中:Optionally, the display module includes a response unit and a view unit; wherein:

所述响应单元,用于基于显示窗口所在的显示设备的当前分辨率和所述页面数据的预设分辨率,确定对所述页面数据中的元素进行调整的第二调整参数;The response unit is used to determine a second adjustment parameter for adjusting an element in the page data based on a current resolution of a display device where the display window is located and a preset resolution of the page data;

所述视图单元,用于基于所述响应单元传输的所述第二调整参数,对所述页面数据所包括的元素的尺寸进行调整。The view unit is used to adjust the size of the element included in the page data based on the second adjustment parameter transmitted by the response unit.

可选地,显示系统还包括:Optionally, the display system further includes:

监听单元,用于监听所述显示窗口的变化,并在监听所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作;A monitoring unit, used for monitoring changes of the display window, and triggering the display module to perform an adaptive adjustment operation when changes of the display window are monitored;

其中,所述适应性调整操作包括:对所述页面数据中所包括的元素的尺寸进行适应性调整,并将适应性调整后的页面数据显示到变化后的显示窗口中。The adaptive adjustment operation includes: adaptively adjusting the size of the elements included in the page data, and displaying the adaptively adjusted page data in the changed display window.

可选地,所述显示模块,还用于在执行所述适应性调整操作后,指示所述监听单元再次监听所述显示窗口的变化,并在监听到所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作;Optionally, the display module is further used to instruct the monitoring unit to monitor the change of the display window again after performing the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the change of the display window is monitored;

或者,or,

在所述监听单元触发所述显示模块执行所述适应性调整操作后的预设时长,再次监听所述显示窗口的变化,并在监听所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作After the monitoring unit triggers the display module to perform the adaptive adjustment operation for a preset time, the display module monitors the change of the display window again, and triggers the display module to perform the adaptive adjustment operation when the display window changes.

本公开实施例提出的显示方法,由于需要在显示窗口中显示页面数据时,根据显示窗口,对页面数据所包括的元素的尺寸进行了调整,这样,对于不同的显示设备,都可以依据显示设备上的显示窗口,对页面数据中的元素的尺寸进行调整,使得其页面视图的尺寸适配显示窗口,从而使得调整后的页面数据的全部元素都位于显示窗口的可视区域中;因页面数据的全部元素都位于显示窗口的可视区域中,这样,用户可以在显示窗口的可视区域中看到页面数据的全部内容,无需拖动滚动条进行浏览,如此,简化了用户的操作,进一步提高用户对网页的浏览体验。The display method proposed in the embodiment of the present disclosure adjusts the size of the elements included in the page data according to the display window when displaying the page data in the display window. In this way, for different display devices, the size of the elements in the page data can be adjusted according to the display window on the display device, so that the size of its page view fits the display window, so that all the elements of the adjusted page data are located in the visible area of the display window; because all the elements of the page data are located in the visible area of the display window, the user can see the entire content of the page data in the visible area of the display window without dragging the scroll bar to browse, thus simplifying the user's operation and further improving the user's browsing experience of the web page.

本公开实施例,还公开了一种电子设备,包括:包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行时实现如所述的自适应可视区域的显示方法。The present disclosure also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the display method of the adaptive visible area as described above when executing the computer program.

本公开实施例,还公开了一种计算机可读存储介质,其存储的计算机程 序使得处理器执行如本公开所述的自适应可视区域的显示方法。The present disclosure also discloses a computer-readable storage medium storing a computer program. The program enables the processor to execute the display method of the adaptive visible area as described in the present disclosure.

上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below.

附图简述BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。需要说明的是,附图中的比例仅作为示意并不代表实际比例。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the proportions in the drawings are only for illustration and do not represent the actual proportions.

图1示出了本公开实施例中自适应可视区域的显示方法的步骤流程图;FIG1 is a flowchart showing a method for displaying an adaptive visible area in an embodiment of the present disclosure;

图2示出了本公开实施例中自适应可视区域的显示方法的一种应用场景示意图;FIG2 is a schematic diagram showing an application scenario of the method for displaying an adaptive visible area in an embodiment of the present disclosure;

图3示出了相关技术中的显示界面示意图和采用本实施例的显示方法进行显示的显示界面的对比示意图;FIG3 shows a schematic diagram of a display interface in the related art and a comparative schematic diagram of a display interface displayed using the display method of this embodiment;

图4示出了本公开实施例中电脑在两种分辨率下的显示界面示意图;FIG4 is a schematic diagram showing a display interface of a computer at two resolutions in an embodiment of the present disclosure;

图5示出了本公开实施例中拼接屏情况下的显示方法示意图;FIG5 is a schematic diagram showing a display method in the case of a spliced screen in an embodiment of the present disclosure;

图6示出了本公开实施例中自适应可视区域的显示方法的一种示例性流程示意图;FIG6 shows an exemplary flow chart of a method for displaying an adaptive visible area in an embodiment of the present disclosure;

图7示出了本公开实施例中一种自适应可视区域的显示方法的步骤流程图;FIG. 7 is a flowchart showing a method for displaying an adaptive visible area according to an embodiment of the present disclosure;

图8示出了本公开实施例中显示窗口的可视区域的一种尺寸变化示意图;FIG8 is a schematic diagram showing a size change of a visible area of a display window in an embodiment of the present disclosure;

图9示出了本公开实施例又一种自适应可视区域的显示方法的步骤流程图;FIG9 is a flowchart showing a method for displaying an adaptive visible area according to another embodiment of the present disclosure;

图10示出了本公开实施例中一种自适应可视区域的显示方法的又一示例性流程示意图;FIG10 shows another exemplary flow chart of a method for displaying an adaptive visible area in an embodiment of the present disclosure;

图11示出了本公开实施例中一种自适应可视区域的显示系统的框架结构示意图;FIG11 is a schematic diagram showing a framework structure of a display system with adaptive visible area according to an embodiment of the present disclosure;

图12示出了本公开实施例中一种自适应可视区域的显示装置的框架结构示意图。FIG. 12 shows a schematic diagram of the framework structure of a display device with adaptive visible area according to an embodiment of the present disclosure.

详细描述Detailed Description

为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公 开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。To make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will be combined with the present disclosure The drawings in the embodiments are used to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

相关技术中,需要在多种不同类型的显示设备上显示页面数据,该页面数据又称为网页数据,是用户在浏览器中打开网页时显示的数据,由于不同的显示设备在尺寸和屏幕分辨率上不同,需要网页数据适应于不同显示设备的尺寸,如在手机上打开浏览器时,需要所显示的网页的视图布局适配手机的屏幕。In the related art, it is necessary to display page data on a variety of different types of display devices. The page data is also called web page data, which is the data displayed when a user opens a web page in a browser. Since different display devices differ in size and screen resolution, the web page data needs to adapt to the size of different display devices. For example, when opening a browser on a mobile phone, the view layout of the displayed web page needs to adapt to the screen of the mobile phone.

有鉴于此,本公开提出了一种显示方法,该显示方法可以使得页面数据适配于不同的显示设备,具体地,参照图1、图2和图3所示,图1示出了该自适应可视区域的显示方法的步骤流程示意图,图2示出了该自适应可视区域的显示方法的应用场景示意图,图3示出了相关技术中的显示界面示意图和采用该显示方法进行显示的显示界面的对比示意图;如图1所示,本自适应可视区域的显示方法可以应用于显示设备,具体地,可以应用于显示设备上的浏览器或应用的前端界面。In view of this, the present disclosure proposes a display method, which can adapt page data to different display devices. Specifically, referring to Figures 1, 2 and 3, Figure 1 shows a schematic diagram of the step flow of the display method of the adaptive visual area, Figure 2 shows a schematic diagram of the application scenario of the display method of the adaptive visual area, and Figure 3 shows a schematic diagram of the display interface in the related technology and a comparative schematic diagram of the display interface displayed using the display method; as shown in Figure 1, the display method of the adaptive visual area can be applied to a display device, specifically, can be applied to the front-end interface of a browser or application on a display device.

其中,显示设备可以包括手机、电脑、平板、4K大屏、MP4以及智能电视等。具体而言,可以应用于web前端或各类应用的前端界面,其中,web前端一般指浏览器的前端,各类应用的前端界面是指在显示设备上安装的APP或客户端的前端界面,如显示设备是手机,则应用是APP,包括适配安卓系统的APP以及适配IOS系统的APP。如显示设备是电脑,则应用是位于电脑的客户端。其中,无论是web前端还是各类APP应用的前端界面,均可以应用本公开的自适应可视区域的显示方法。Among them, the display device may include a mobile phone, a computer, a tablet, a 4K large screen, an MP4, and a smart TV, etc. Specifically, it can be applied to the web front end or the front end interface of various applications, wherein the web front end generally refers to the front end of the browser, and the front end interface of various applications refers to the front end interface of the APP or client installed on the display device. If the display device is a mobile phone, the application is an APP, including an APP adapted to the Android system and an APP adapted to the IOS system. If the display device is a computer, the application is a client located on the computer. Among them, whether it is a web front end or the front end interface of various APP applications, the display method of the adaptive visual area disclosed in the present invention can be applied.

如图1所示,本公开的自适应可视区域的显示方法具体可以包括以下步骤:As shown in FIG1 , the method for displaying an adaptive visible area of the present disclosure may specifically include the following steps:

步骤101:响应于对页面数据的显示触发,基于显示窗口中可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整;Step 101: in response to a display trigger of page data, adjusting the size of elements included in the page data based on the size of a visible area in a display window;

其中,所述显示窗口用于显示所述页面数据。Wherein, the display window is used to display the page data.

步骤102:将调整后的页面数据显示到显示窗口中;其中,页面数据中的全部元素均位于显示窗口的可视区域中。Step 102: Displaying the adjusted page data in a display window; wherein all elements in the page data are located in a visible area of the display window.

本实施例中,对页面数据的显示触发可以在显示设备上进行,具体而言,可以在web前端或各类应用的前端界面上发生,其中,web前端一般指浏览器的前端,各类应用的前端界面是指在显示设备上安装的APP或客户端的前端界面。其中,在该显示设备上一般会安装浏览器,通过浏览器用户可以浏 览网页,以及可以在显示设备上安装各类应用,通过各类应用为用户提供对应的服务,如安装社交通信类应用,可以为用户提供社交服务,如安装新闻类应用,可以为用户推送新闻内容。In this embodiment, the display trigger of the page data can be performed on the display device, specifically, it can occur on the web front end or the front end interface of various applications, where the web front end generally refers to the front end of the browser, and the front end interface of various applications refers to the front end interface of the APP or client installed on the display device. Among them, the display device generally has a browser installed, and the user can browse through the browser You can browse the web and install various applications on the display device to provide users with corresponding services through various applications. For example, if you install social communication applications, you can provide users with social services. If you install news applications, you can push news content to users.

其中,浏览器的网页页面可以包括单不限于H5页面等,其中,H5页面是指基于HTML5技术开发的网页页面。本公开中,无论是web前端提供的网页界面,还是APP所提供的界面在本公开中可以称为网页页面,界面中的数据可以称为页面数据。The web pages of the browser may include but are not limited to H5 pages, etc., wherein the H5 page refers to a web page developed based on HTML5 technology. In the present disclosure, whether it is a web page interface provided by a web front end or an interface provided by an APP, it may be referred to as a web page, and the data in the interface may be referred to as page data.

其中,对页面数据的显示触发可以包括对浏览器的打开操作、对浏览器中控件的触发操作、对应用(APP和客户端)的打开操作以及对应用中控件的触发操作。以浏览器(web端)为例,打开浏览器一般会进入网页的首页,则需要显示的页面数据是网页首页的页面数据,如打开IE浏览器,会进入IE浏览器的首页,在首页中显示的是首页的页面数据。其中,对浏览器中控件的触发操作,如单击或双击,会进入该控件所在的网页页面,则需要显示的页面数据是控件所关联的数据,如进入IE浏览器的首页后,在搜索栏输入一个搜索词并点击,会显示针对该搜索词搜索到的结果,选择其中一个结果,会进入该结果对应的网页。Among them, the triggering of the display of page data may include opening the browser, triggering the control in the browser, opening the application (APP and client), and triggering the control in the application. Taking the browser (web side) as an example, opening the browser will generally enter the homepage of the webpage, and the page data that needs to be displayed is the page data of the homepage of the webpage. For example, opening the IE browser will enter the homepage of the IE browser, and the page data of the homepage is displayed on the homepage. Among them, the triggering operation of the control in the browser, such as single-clicking or double-clicking, will enter the webpage where the control is located, and the page data that needs to be displayed is the data associated with the control. For example, after entering the homepage of the IE browser, enter a search term in the search bar and click it, the results searched for the search term will be displayed, and selecting one of the results will enter the webpage corresponding to the result.

如图2所示,图2以手机上的APP为例,在手机上预设又多个APP,打开其中一个APP1会进入APP1提供的首页页面,如打开网易新闻APP,会进入网易新闻的首页,对网易新闻中的一个词条进行了触发,则会显示该词条对应的新闻。As shown in Figure 2, Figure 2 takes an APP on a mobile phone as an example. There are multiple APPs preset on the mobile phone. When one of the APP1 is opened, the user enters the home page provided by APP1. For example, when the NetEase News APP is opened, the user enters the home page of NetEase News. When an entry in NetEase News is triggered, the news corresponding to the entry will be displayed.

在本实施例中,显示设备可以通过web端(或APP客户端)监听前端页面上所发生的操作,当在前端页面上监听到需要打开页面数据的操作时,如某一控件的触发操作,则可以基于监听到的操作和操作所针对的控件标识发送给与web端(或APP客户端)连接的云端,接着可以由云端反馈该控件标识对应的页面数据给显示设备。或者,在一种示例中,显示设备可以通过web端(或APP客户端)监听前端页面上所发生的操作,当在前端页面上监听到需要打开页面数据的操作时,如某一控件的触发操作,则可以基于监听到的操作和操作所针对的控件标识,从本地缓存的页面数据中获取与触发的控件对应的页面数据。In this embodiment, the display device can monitor the operations occurring on the front-end page through the web end (or APP client), and when the operation that needs to open the page data is monitored on the front-end page, such as the triggering operation of a certain control, it can send the monitored operation and the control identifier targeted by the operation to the cloud connected to the web end (or APP client), and then the cloud can feedback the page data corresponding to the control identifier to the display device. Alternatively, in an example, the display device can monitor the operations occurring on the front-end page through the web end (or APP client), and when the operation that needs to open the page data is monitored on the front-end page, such as the triggering operation of a certain control, it can obtain the page data corresponding to the triggered control from the locally cached page data based on the monitored operation and the control identifier targeted by the operation.

再或者,在又一种示例中,显示设备可以通过web端(或APP客户端)监听前端页面上所发生的操作,当在前端页面上监听到需要打开页面数据的操作时,如某一控件的触发操作,则可以基于监听到的操作和操作所针对的控件标识,先从本地缓存的页面数据中查找与触发的控件对应的页面数据,若查找到,则从本地缓存中提取对应的页面数据,若未查找到,则将控件标 识发送给云端,并接收云端反馈的页面数据。Alternatively, in another example, the display device can monitor operations occurring on the front-end page through the web end (or APP client). When an operation that requires opening page data is monitored on the front-end page, such as a triggering operation of a certain control, the page data corresponding to the triggered control can be searched from the locally cached page data based on the monitored operation and the control identifier targeted by the operation. If the page data is found, the corresponding page data is extracted from the local cache. If not found, the control identifier is opened. The page data is sent to the cloud and received from the cloud.

当触发对页面数据的显示时,需要将上述获取的页面数据显示到显示窗口中,本实施例中,可以确定显示该页面数据的显示窗口中可视区域的尺寸,其中,可视区域是指显示窗口可以被视觉所观察到的区域,即用户目之所及的区域。一般而言,对于电脑、4K大屏、拼接屏上的web端和应用而言,一个显示窗口,其可以被最大化和最小化,以及在最大化和最小化之间其尺寸可以被调整。在最大化的情况下,可视区域一般指电脑的全部显示区域,在最小化的情况下,显示窗口进入菜单栏不可见,用户也可以对显示窗口的长度和宽度进行调整,此种情况下,显示窗口占据电子设备的部分显示区域,可视区域即是显示窗口的四条边所围合的区域。When the display of page data is triggered, the page data obtained above needs to be displayed in the display window. In this embodiment, the size of the visible area in the display window displaying the page data can be determined, wherein the visible area refers to the area where the display window can be visually observed, that is, the area within the user's sight. Generally speaking, for web terminals and applications on computers, 4K large screens, and spliced screens, a display window can be maximized and minimized, and its size can be adjusted between maximization and minimization. In the case of maximization, the visible area generally refers to the entire display area of the computer. In the case of minimization, the display window is invisible when entering the menu bar. The user can also adjust the length and width of the display window. In this case, the display window occupies part of the display area of the electronic device, and the visible area is the area enclosed by the four sides of the display window.

其中,如图2所示,对于手机上的web端和APP应用而言,显示窗口可以是指手机的屏幕区域200,则可视区域一般指手机的屏幕区域200;当然,对于可以变换APP的显示窗口的尺寸的手机而言,显示窗口也可以位于手机屏幕中的部分显示区域,则可视区域是指显示窗口的四条边所围合的区域。Among them, as shown in Figure 2, for the web and APP applications on the mobile phone, the display window may refer to the screen area 200 of the mobile phone, and the visible area generally refers to the screen area 200 of the mobile phone; of course, for a mobile phone that can change the size of the APP display window, the display window may also be located in a partial display area of the mobile phone screen, and the visible area refers to the area enclosed by the four sides of the display window.

在需要显示页面数据时,可以先确定显示窗口的可视区域的尺寸,接着,根据可视区域的尺寸对页面数据中所包括的全部元素的尺寸进行调整。在一种示例中,显示设备可以具有用于获取web端(或APP)的显示窗口的可视区域的尺寸的实例,通过该实例可以实时监听处于运行状态的web端(或APP)的显示窗口的可视区域的尺寸的变化,并实时将处于运行状态的web端(或APP)的显示窗口的可视区域的尺寸传递给用于显示页面数据的实例,使得显示页面数据的实例,可以根据所传递过来的显示窗口的可视区域的尺寸,对页面数据中元素的尺寸进行适应性调整,以使得元素的尺寸大小可以适应可视区域的尺寸,从而保证页面数据的全部元素都位于显示窗口的可视区域中。When it is necessary to display page data, the size of the visible area of the display window can be determined first, and then the size of all elements included in the page data can be adjusted according to the size of the visible area. In one example, the display device can have an instance for obtaining the size of the visible area of the display window of the web end (or APP), through which the change of the size of the visible area of the display window of the running web end (or APP) can be monitored in real time, and the size of the visible area of the display window of the running web end (or APP) can be passed to the instance for displaying page data in real time, so that the instance for displaying page data can adaptively adjust the size of the elements in the page data according to the size of the visible area of the passed display window, so that the size of the elements can adapt to the size of the visible area, thereby ensuring that all elements of the page data are located in the visible area of the display window.

其中,页面数据中的元素可以包括文字、图标、控件等元素,当然,在一些示例中,除包括文字、图标、控件外,页面数据还可以内嵌有播放多媒体数据的播放窗口,在播放窗口中播放对应的多媒体内容。具体而言,只要是需要显示到页面上的内容,无论其是何种类型,都可以称为元素。如图2、图3和图4所示,示出了页面数据300的一种示意性示意图,其中,横线部分代表文字,五边形、六边形、五角星等图标代表页面数据中的图标、控件等元素。Among them, the elements in the page data may include elements such as text, icons, and controls. Of course, in some examples, in addition to text, icons, and controls, the page data may also be embedded with a playback window for playing multimedia data, and the corresponding multimedia content is played in the playback window. Specifically, as long as it is content that needs to be displayed on the page, no matter what type it is, it can be called an element. As shown in Figures 2, 3, and 4, a schematic diagram of page data 300 is shown, in which the horizontal line portion represents text, and icons such as pentagons, hexagons, and five-pointed stars represent elements such as icons and controls in the page data.

其中,对元素的尺寸的调整可以包括对元素的宽度的调整,和/或对元素的高度的调整,具体地,依据显示窗口的可视区域的尺寸,可以仅对元素在宽度方向上的尺寸进行调整,或者仅对元素在高度方向上的尺寸进行调整, 或者同时对元素在宽度方向和高度方向上的尺寸进行调整。The adjustment of the size of the element may include the adjustment of the width of the element and/or the adjustment of the height of the element. Specifically, depending on the size of the visible area of the display window, the size of the element in the width direction may be adjusted only, or the size of the element in the height direction may be adjusted only. Or adjust the size of an element in both width and height.

需要说明的是,所述的宽度方向可以理解为是电子设备的显示屏幕的宽度方向,即图2、图3和图4中的横向方向;高度方向可以理解为是电子设备的显示屏幕的高度方向,即图2、图3和图4中的纵向方向。It should be noted that the width direction can be understood as the width direction of the display screen of the electronic device, that is, the horizontal direction in Figures 2, 3 and 4; the height direction can be understood as the height direction of the display screen of the electronic device, that is, the longitudinal direction in Figures 2, 3 and 4.

在一种示例中,显示设备需要将处于运行状态的web端(或APP)的显示窗口的可视区域的尺寸传递给用于显示页面数据的实例,其中显示页面数据的实例可以运行在显示设备,也可以运行在云端。当运行在显示设备时,显示页面数据的实例可以根据可视区域的尺寸,对获取到的页面数据中的元素在宽度方向和/或高度方向上的尺寸进行调整后,将调整后的元素按照其原来的布局渲染到显示窗口中;当运行在云端时,则可以由云端根据可视区域的尺寸,对元素在宽度方向和/或高度方向上的尺寸进行调整,并按照原有的视图布局对调整后的元素进行组合后,形成新的页面数据,将该新的页面数据发送给显示设备,从而显示设备可以将接收到的该新的页面数据渲染到显示窗口中。In one example, the display device needs to pass the size of the visible area of the display window of the running web terminal (or APP) to the instance for displaying page data, wherein the instance for displaying page data can run on the display device or on the cloud. When running on the display device, the instance for displaying page data can adjust the size of the elements in the acquired page data in the width direction and/or height direction according to the size of the visible area, and render the adjusted elements into the display window according to their original layout; when running on the cloud, the cloud can adjust the size of the elements in the width direction and/or height direction according to the size of the visible area, and combine the adjusted elements according to the original view layout to form new page data, and send the new page data to the display device, so that the display device can render the received new page data into the display window.

其中,通过对每个元素的尺寸的调整,使得页面数据所组成的视图的整体尺寸得到了调整,这样,可以使得该视图适配显示窗口的可视区域的尺寸,从而使得页面数据的全部元素可以均位于显示窗口的可视区域中。By adjusting the size of each element, the overall size of the view composed of the page data is adjusted, so that the view can adapt to the size of the visible area of the display window, so that all elements of the page data can be located in the visible area of the display window.

接着,对每个元素的尺寸进行调整后,可以得到调整后的页面数据,接着,可以将调整后的页面数据显示到显示窗口中。如图2所示,当在手机上触发了APP,则APP的首页数据中的全部元素均位于手机的显示屏幕内,如此,APP的用户交互界面中可以不存在滚动条,或存在滚动条,但是由于首页数据中的全部元素已位于手机的显示屏幕内,因此,用户在显示屏幕内可以看到该首页所包含的全部数据,无需上下滑动滚动条或左右滑动滚动条,对于页面数据较多的页面而言,采用此种显示方式,可以帮助用户快速浏览完页面所包含的内容。Then, after adjusting the size of each element, the adjusted page data can be obtained, and then the adjusted page data can be displayed in the display window. As shown in Figure 2, when the APP is triggered on the mobile phone, all elements in the home page data of the APP are located in the display screen of the mobile phone. In this way, there may be no scroll bar or there may be a scroll bar in the user interaction interface of the APP, but since all elements in the home page data are already located in the display screen of the mobile phone, the user can see all the data contained in the home page in the display screen without sliding the scroll bar up and down or left and right. For pages with more page data, this display method can help users quickly browse the content contained in the page.

如图3所示,以显示设备为4K大屏为例,图3中图像301是相关技术中在4K大屏上展示浏览器中的页面数据300的显示界面示意图,而图3中图像302是采用本公开的显示方法,在4K大屏上展示页面数据300的显示界面示意图,可看出,当同一个页面数据300分别采用相关技术和本公开所示的显示方法进行显示时,相关技术中,其网页的页面数据未全部位于可视区域中,用户需要上下拉动滚动条303才能浏览完全部的内容;而本显示方法中页面数据中的全部元素位于可视区域中,用户无需上下拉动滚动条即可浏览完全部的内容。As shown in Figure 3, taking the display device as a 4K large screen as an example, Image 301 in Figure 3 is a schematic diagram of the display interface of displaying page data 300 in a browser on a 4K large screen in the related art, and Image 302 in Figure 3 is a schematic diagram of the display interface of displaying page data 300 on a 4K large screen using the display method disclosed in the present invention. It can be seen that when the same page data 300 is displayed using the display method shown in the related art and the present invention respectively, in the related art, the page data of the web page is not all located in the visible area, and the user needs to pull up and down the scroll bar 303 to browse all the content; while in the present display method, all elements in the page data are located in the visible area, and the user can browse all the content without pulling up and down the scroll bar.

需要说明的是,对于4K大屏而言,用户对网页页面的交互控制通常采 用手势控制,如在4K大屏上按照301的方式显示页面数据时,若用户需要上下滑动滚动条浏览页面数据,需要比划手势选中滚动条,并再比划手势以上下拖动滚动条303,这就需要一套设备和算法识别用户的手势,再根据识别到的手势启动对应的控制逻辑,按照该控制逻辑生成对应的操作数据,以控制网页页面进行上下滑动或切换页面,一般而言,用户需要比划多次手势,才能成功上下滑动滚动条,以完成网页浏览,此过程非常繁琐且对页面的控制成功率并不高。而采用本公开的显示方法,因页面数据的全部内容已经位于可视区域,便无需用户频繁比划手势以浏览数据,从而优化了用户的浏览体验。It should be noted that for 4K large screens, users usually use interactive control of web pages. With gesture control, for example, when displaying page data on a 4K large screen in the manner of 301, if the user needs to slide the scroll bar up and down to browse the page data, he needs to make a gesture to select the scroll bar, and then make another gesture to drag the scroll bar up and down 303. This requires a set of equipment and algorithms to recognize the user's gesture, and then start the corresponding control logic according to the recognized gesture, and generate corresponding operation data according to the control logic to control the web page to slide up and down or switch pages. Generally speaking, the user needs to make gestures many times to successfully slide the scroll bar up and down to complete web browsing. This process is very cumbersome and the success rate of controlling the page is not high. With the display method disclosed in the present invention, since the entire content of the page data is already in the visible area, the user does not need to frequently make gestures to browse the data, thereby optimizing the user's browsing experience.

采用此实施方案时,由于根据显示窗口的可视区域的尺寸,对页面数据所包括的元素的尺寸进行了调整,这样,对于不同的显示设备,在对页面数据中的元素的尺寸进行调整后,其构成的页面视图的尺寸适配显示窗口,使得调整后的页面数据的全部元素都位于显示窗口的可视区域中;因页面数据的全部元素都位于显示窗口的可视区域中,这样,用户可以在显示窗口的可视区域中看到页面数据的全部内容,无需拖动滚动条进行浏览,如此,简化了用户的操作,进一步提高用户对网页的浏览体验。When this implementation scheme is adopted, the size of the elements included in the page data is adjusted according to the size of the visible area of the display window. Therefore, for different display devices, after the size of the elements in the page data is adjusted, the size of the page view constituted by it adapts to the display window, so that all the elements of the adjusted page data are located in the visible area of the display window; because all the elements of the page data are located in the visible area of the display window, the user can see the entire content of the page data in the visible area of the display window without dragging the scroll bar to browse, thus simplifying the user's operation and further improving the user's browsing experience of the web page.

在一些实施例中,在基于显示窗口的可视区域的尺寸,对页面数据中的元素的尺寸进行调整时,可以根据显示窗口所在的显示设备的当前分辨率确定。具体地,可以响应于对页面数据的显示触发,获取显示窗口所在的显示设备的当前分辨率,并基于当前分辨率和页面数据的预设分辨率,对页面数据所包括的元素的尺寸进行调整。In some embodiments, when the size of the elements in the page data is adjusted based on the size of the visible area of the display window, it can be determined according to the current resolution of the display device where the display window is located. Specifically, in response to the display trigger of the page data, the current resolution of the display device where the display window is located can be obtained, and the size of the elements included in the page data can be adjusted based on the current resolution and the preset resolution of the page data.

本实施例中,对于显示窗口而言,其默认的状态一般是最大化,如上所述,在最大化的情况下,显示窗口的可视区域即为显示设备的显示区域,而显示设备的显示区域与显示设备的分辨率有关,示例地,以显示设备为电脑为例,电脑的屏幕分辨率为1920x1080,可以设置电脑的显示分辨率为1920x1080,也可以设置为小于1920x1080的分辨率,如1680×1050,若设置为1680×1050,则相比于1920x1080的分辨率,其显示区域较小。参照图4所示,示出了电脑在两种分辨率下的显示界面示意图,如图4所示,左侧的分辨率为1920x1080,右侧的分辨率为1680×1050;则对于显示窗口而言,左侧的显示窗口的可视区域的尺寸即为1920x1080,右侧的显示窗口的可视区域的尺寸即为1680×1050。因此,可以将显示设备的当前分辨率,作为可视区域的尺寸。In this embodiment, for the display window, its default state is generally maximized. As mentioned above, in the case of maximization, the visible area of the display window is the display area of the display device, and the display area of the display device is related to the resolution of the display device. For example, taking the display device as a computer, the screen resolution of the computer is 1920x1080, and the display resolution of the computer can be set to 1920x1080, or it can be set to a resolution less than 1920x1080, such as 1680×1050. If it is set to 1680×1050, then compared with the resolution of 1920x1080, its display area is smaller. Referring to FIG. 4, a schematic diagram of the display interface of a computer at two resolutions is shown. As shown in FIG. 4, the resolution on the left is 1920x1080, and the resolution on the right is 1680×1050; then for the display window, the size of the visible area of the display window on the left is 1920x1080, and the size of the visible area of the display window on the right is 1680×1050. Therefore, the current resolution of the display device can be used as the size of the visible area.

其中,对于页面数据而言,其可以具有预设分辨率,该预设分辨率可以是在设计页面数据的UI设计稿时,所预先约定的分辨率,需要说明的是, 该预设分辨率是指设计页面数据时,其所参照的分辨率标准,如约定的预设分辨率为1920x1080,则所设计的页面数据中元素的尺寸便是按照1920x1080来设计的。The page data may have a preset resolution, which may be a resolution agreed upon in advance when designing the UI design draft of the page data. It should be noted that: The preset resolution refers to the resolution standard that is referenced when designing page data. For example, if the agreed preset resolution is 1920x1080, the size of the elements in the designed page data is designed according to 1920x1080.

其中,可以根据预设分辨率和显示设备的当前分辨率,确定显示窗口的可视区域的尺寸,相对页面数据所呈现的页面视图的尺寸之间的大小关系,从而依据该大小关系,对页面数据中元素的尺寸进行调整,其调整的条件是使得页面数据中的全部元素可以位于可视区域中。Among them, the size of the visible area of the display window can be determined according to the preset resolution and the current resolution of the display device, and the size relationship between the size of the page view presented by the page data can be determined, so that the size of the elements in the page data can be adjusted according to the size relationship, and the condition for the adjustment is that all elements in the page data can be located in the visible area.

在该实施例中的一些示例中,在基于当前分辨率和页面数据的预设分辨率,对页面数据所包括的元素的尺寸进行调整时,可以基于预设分辨率,确定页面数据的第一尺寸比例;基于当前分辨率,确定显示窗口的第二尺寸比例;基于第一尺寸比例和第二尺寸比例,确定第二调整参数;基于第二调整参数,对页面数据中所包括的元素的尺寸进行调整。In some examples of this embodiment, when the size of the elements included in the page data is adjusted based on the current resolution and the preset resolution of the page data, a first size ratio of the page data can be determined based on the preset resolution; a second size ratio of the display window can be determined based on the current resolution; a second adjustment parameter can be determined based on the first size ratio and the second size ratio; and the size of the elements included in the page data can be adjusted based on the second adjustment parameter.

其中,第二调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例。The second adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction.

一般而言,分辨率包括宽度方向的尺寸和高度方向的尺寸,则第一尺寸比例和第二尺寸比例,均可以是分辨率中宽度方向的分量和高度方向的分量之比,示例地,预设分辨率为1920x1080,则第一尺寸比例为1920/1080,假设当前分辨率为1680×1050,则第二尺寸比例为1680/1050。Generally speaking, the resolution includes the size in the width direction and the size in the height direction, so the first size ratio and the second size ratio can both be the ratio of the width component to the height component in the resolution. For example, the preset resolution is 1920x1080, then the first size ratio is 1920/1080, assuming that the current resolution is 1680×1050, then the second size ratio is 1680/1050.

其中,第二调整参数可以理解为是将第一尺寸比例变换到第二尺寸比例的值,如将1920/1080变换到1680/1050的值,具体地,该值可以用第二调整参数表示,也就是说,该第二调整参数可以理解为是:将页面数据所呈现的视图分别在宽度和高度方向上进行哪一尺度的变换后,可以适配当前分辨率。Among them, the second adjustment parameter can be understood as the value of transforming the first size ratio to the second size ratio, such as transforming 1920/1080 to 1680/1050. Specifically, the value can be represented by the second adjustment parameter, that is, the second adjustment parameter can be understood as: the view presented by the page data can be adapted to the current resolution after being transformed to which scale in the width and height directions respectively.

接着,便可以按照第二调整参数,对页面数据中的每个元素的尺寸进行调整,具体地,对于页面数据中的不同元素,其都按照第二调整参数进行调整,也就是说,该第二调整参数适配页面数据中的每个元素。Then, the size of each element in the page data can be adjusted according to the second adjustment parameter. Specifically, different elements in the page data are adjusted according to the second adjustment parameter, that is, the second adjustment parameter is adapted to each element in the page data.

其中,在一些实施例中,对页面数据中所包括的元素的尺寸进行调整,包括:对页面数据中所包括的每个元素进行缩放。也就是说,可以按照第二调整参数对元素进行缩放,其中,第二调整参数可以包括宽度的缩放比例以及高度的缩放比例,在对元素进行缩放时,可以分别按照宽度的缩放比例对宽度进行缩放,同时按照高度的缩放比例对高度进行缩放。In some embodiments, adjusting the size of the element included in the page data includes scaling each element included in the page data. That is, the element can be scaled according to the second adjustment parameter, wherein the second adjustment parameter can include a scaling ratio of the width and a scaling ratio of the height. When scaling the element, the width can be scaled according to the scaling ratio of the width, and the height can be scaled according to the scaling ratio of the height.

在一些实施例中,在基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整时,可以将第二调整参数映射到缩放函数scale方法中,作为scale方法中的缩放参数;并基于scale方法中的缩放参数,调用 transform方法对所述页面数据中所包括的元素的尺寸进行调整。In some embodiments, when the size of the element included in the page data is adjusted based on the second adjustment parameter, the second adjustment parameter can be mapped to the scaling function scale method as a scaling parameter in the scale method; and based on the scaling parameter in the scale method, calling The transform method adjusts the size of the elements included in the page data.

具体地,在对元素按照第二调整参数进行缩放时,可以基于CSS3中transform中的scale方法实现,其中,scale方法专注于实现元素的缩放效果(缩放即“缩小”和“放大”)。具体操作如下:Specifically, when scaling the element according to the second adjustment parameter, it can be implemented based on the scale method in transform in CSS3, where the scale method focuses on achieving the scaling effect of the element (scaling is "reducing" and "enlarging"). The specific operations are as follows:

其中,scale方法包括宽度方向的缩放参数和高度方向的缩放参数,CSS3中transform属性的scale方法如下:The scale method includes scaling parameters in the width direction and scaling parameters in the height direction. The scale method of the transform attribute in CSS3 is as follows:

1)scaleX(x):元素仅水平缩放(宽度方向的缩放);1) scaleX(x): the element is scaled horizontally only (scaling in the width direction);

2)scaleY(y):元素仅垂直缩放(高度方向的缩放);2) scaleY(y): the element is scaled vertically only (scaling in the height direction);

3)scale(x,y):元素水平方向和垂直方向同时缩放(宽度方向和高度方向同时缩放);3) scale(x,y): the element is scaled horizontally and vertically at the same time (width and height are scaled at the same time);

其中,scale(x,y)放可以接受两个参数,实现元素宽度方向和高度方向的同时缩放,故而可以将第二调整参数中宽度的缩放比例以及高度的缩放比例分别传给x、y参数,然后通过transform属性作用做HTML来实现视图上的映射,如采用“div.style.transform=`scale(${scale.width},${scale.height})”的方法进行映射,从而改变页面数据中元素的尺寸。Among them, scale(x,y) can accept two parameters to achieve simultaneous scaling of the element in width and height. Therefore, the width scaling ratio and the height scaling ratio in the second adjustment parameter can be passed to the x and y parameters respectively, and then the transform attribute is used to implement HTML mapping on the view, such as using the "div.style.transform=`scale(${scale.width},${scale.height})" method to map, thereby changing the size of the elements in the page data.

具体地,在一种实现方式中,如上所述,显示设备可以将监听到web端(或APP)的显示窗口的目标分辨率,反馈给显示页面数据的实例,其中,Specifically, in one implementation, as described above, the display device may feed back the target resolution of the display window monitored by the web end (or APP) to the instance displaying the page data, wherein:

显示页面数据的实例可以包括预置的比例换算算法,该比例换算算法可以根据所反馈的显示窗口的目标分辨率,确定第二尺寸比例,接着根据第一尺寸比例和第二尺寸比例的关系,确定出第二调整参数;The example of display page data may include a preset ratio conversion algorithm, which may determine a second size ratio according to the target resolution of the display window fed back, and then determine a second adjustment parameter according to the relationship between the first size ratio and the second size ratio;

具体地,页面数据对应的预设分辨率可以携带在页面数据中,作为页面数据的属性参数,显示页面数据的实例可以读取预设分辨率并传入给比例换算算法,从而确定出第一尺寸比例,以及将所反馈的显示窗口的目标分辨率传入给比例换算算法,确定第二尺寸比例,接着比例换算算法根据第一尺寸比例和第二尺寸比例的关系,确定出第二调整参数。Specifically, the preset resolution corresponding to the page data can be carried in the page data as an attribute parameter of the page data. The instance displaying the page data can read the preset resolution and pass it to the proportional conversion algorithm to determine the first size ratio, and pass the target resolution of the display window fed back to the proportional conversion algorithm to determine the second size ratio. Then the proportional conversion algorithm determines the second adjustment parameter based on the relationship between the first size ratio and the second size ratio.

其中,得到的第二调整参数可以继续传入给scale方法,之后,scale方调用transform属性,即采用“div.style.transform=`scale(${scale.width},${scale.height})”映射到原页面数据中,使得原页面数据中的每个元素都按照第二调整参数被缩放。Among them, the obtained second adjustment parameter can continue to be passed to the scale method. After that, the scale method calls the transform attribute, that is, uses "div.style.transform=`scale(${scale.width},${scale.height})" to map it to the original page data, so that each element in the original page data is scaled according to the second adjustment parameter.

采用本实施例的技术方案,由于当前分辨率和页面数据的预设分辨率,对应同一度量单位,即均是采用像素px的度量单位,由此,在依据显示设备的分辨率和页面数据的预设分辨率,对元素的尺寸进行调整时,便是基于同一度量单元下进行的换算,由此,可以简化计算过程,在简化计算过程的情况下,相比相关技术来说,至少具有以下进步: With the technical solution of this embodiment, since the current resolution and the preset resolution of the page data correspond to the same measurement unit, that is, both use the measurement unit of pixel px, when the size of the element is adjusted according to the resolution of the display device and the preset resolution of the page data, the conversion is based on the same measurement unit, thereby simplifying the calculation process. In the case of simplifying the calculation process, compared with the related art, at least the following improvements are made:

相关技术中,主要采用基于rem的响应式单位换算来实现页面数据对显示屏幕的适配。其中,前端rem是一种相对于像素单位的相对单位,它使用根元素的字体大小作为基准,而不是固定的像素值。在转换过程中,需要使用相对于根元素的单位来定义各种尺寸,而不是使用固定的像素值。在开发过程中,需要在CSS代码中使用“rem”作为单位,并在根元素中设置字体大小。由于需要“rem”作为单位,而显示设备又是以px作为单位,因此在编写代码的过程中便需要将rem最终换算为对应的px进行展示。由此,开发过程中需要开发人员在rem和px之间换算,对于开发者的心智负担相对较大,开发工作量较多。此外,浏览器能显示的大小尺寸是12px,而使用rem并不能突破这个瓶颈,即使rem被换算过来小于12px,浏览器还是以12px来显示,而实际中,用户可能希望以4px显示,但是使用rem不能实现这一功能,即使用rem的方法,不能使得浏览器以4px显示。In the related art, the responsive unit conversion based on rem is mainly used to realize the adaptation of page data to the display screen. Among them, the front-end rem is a relative unit relative to the pixel unit, which uses the font size of the root element as a benchmark instead of a fixed pixel value. In the conversion process, it is necessary to use units relative to the root element to define various sizes instead of using fixed pixel values. In the development process, it is necessary to use "rem" as a unit in the CSS code and set the font size in the root element. Since "rem" is required as a unit, and the display device uses px as a unit, it is necessary to convert rem to the corresponding px for display in the process of writing code. Therefore, the developer needs to convert between rem and px during the development process, which is relatively burdensome for the developer's mind and has a large development workload. In addition, the size that the browser can display is 12px, and the use of rem cannot break through this bottleneck. Even if rem is converted to less than 12px, the browser still displays it at 12px. In reality, the user may want to display it at 4px, but the use of rem cannot achieve this function, that is, the method of using rem cannot make the browser display it at 4px.

而采用本公开的上述方法,一方面,由于都是基于分辨率的换算,即都是以px单位为基准的计算,不存在需要将px转换为其他相对单位的过程,因此可以减少开发者的心智负担,即减小开发过程中的工作量,从而提高开发效率,节约开发时长。另一方面,由于是基于屏幕分辨率和预设分辨率之间的相对尺寸关系,按照这一相对尺寸关系,对元素的尺寸进行调整,使得从元素的尺寸着手对页面的整体视图进行了细粒度调整,从而可以突破12px的瓶颈限制,使得浏览器可以显示尺寸小于12px的元素,由此,拓宽了页面显示的功能。By adopting the above method disclosed in the present invention, on the one hand, since all of them are based on resolution conversion, that is, all of them are calculated based on px units, there is no process of converting px into other relative units, so the mental burden of developers can be reduced, that is, the workload in the development process is reduced, thereby improving development efficiency and saving development time. On the other hand, since it is based on the relative size relationship between the screen resolution and the preset resolution, the size of the element is adjusted according to this relative size relationship, so that the overall view of the page is fine-grainedly adjusted starting from the size of the element, thereby breaking through the bottleneck limit of 12px, so that the browser can display elements with a size smaller than 12px, thereby broadening the function of page display.

实际情况中,用户会在多个不同的显示设备上打开浏览页面,以浏览页面数据,这样,同一页面数据需要在不同的显示设备上显示。其中,对于不同的显示设备而言,都可以根据显示设备的当前分辨率,对页面数据中元素的尺寸进行调整,以使页面数据中的全部元素均位于显示窗口的可视区域中。在一些实施例中,显示设备可以是拼接屏,拼接屏由多个显示屏拼接而成,当需要在拼接屏上显示页面数据时,每个显示屏会显示页面数据中的部分内容,此种情况下,可以将拼接屏视为一个完整的显示屏幕,以对页面数据中元素的尺寸进行适应性调整。In actual situations, users will open browsing pages on multiple different display devices to browse page data, so the same page data needs to be displayed on different display devices. Among them, for different display devices, the size of the elements in the page data can be adjusted according to the current resolution of the display device so that all elements in the page data are located in the visible area of the display window. In some embodiments, the display device can be a spliced screen, which is composed of multiple display screens. When the page data needs to be displayed on the spliced screen, each display screen will display part of the content in the page data. In this case, the spliced screen can be regarded as a complete display screen to adaptively adjust the size of the elements in the page data.

相应地,显示窗口包括多个子显示区域,不同的子显示区域位于不同的显示设备中;在基于待显示页面数据的显示窗口,对页面数据所包括的元素的尺寸进行调整时,可以响应于对页面数据的显示触发,基于多个显示设备各自对应的屏幕分辨率,确定显示窗口的窗口分辨率;并基于窗口分辨率,和页面数据的预设分辨率,对页面数据中的元素的尺寸进行调整。Accordingly, the display window includes multiple sub-display areas, and different sub-display areas are located in different display devices; when the size of the elements included in the page data is adjusted based on the display window of the page data to be displayed, the window resolution of the display window can be determined in response to the display trigger of the page data based on the screen resolutions corresponding to each of the multiple display devices; and the size of the elements in the page data can be adjusted based on the window resolution and the preset resolution of the page data.

参照图5所示,示出了拼接屏情况下的显示方法示意图,由于显示窗口 是由多个显示设备的显示区域拼接而成的,每个显示设备具有自身对应的屏幕分辨率,该屏幕分辨率是指显示设备固有的最高分辨率,为了使得显示设备之间可以拼接,不同的显示设备可以具有相同的屏幕分辨率。如图5所示,显示设备1-显示设备4的屏幕分辨率均为1920x1080;则拼接屏的窗口分辨率可以是拼接后得到的分辨率:3840x2160,由此可以根据窗口分辨率和预设分辨率,对页面数据中的每个元素的尺寸进行调整。5 shows a schematic diagram of a display method in the case of a spliced screen. It is composed of display areas of multiple display devices spliced together. Each display device has its own corresponding screen resolution, which refers to the highest resolution inherent in the display device. In order to enable splicing between display devices, different display devices can have the same screen resolution. As shown in Figure 5, the screen resolutions of display devices 1-4 are all 1920x1080; then the window resolution of the spliced screen can be the resolution obtained after splicing: 3840x2160, so the size of each element in the page data can be adjusted according to the window resolution and the preset resolution.

其中,根据窗口分辨率和预设分辨率,对页面数据中的每个元素的尺寸进行调整的过程,可以参照上述根据当前分辨率和预设分辨率,对页面数据中的元素的尺寸进行调整的过程,在此不再赘述。The process of adjusting the size of each element in the page data according to the window resolution and the preset resolution can refer to the process of adjusting the size of the element in the page data according to the current resolution and the preset resolution, which will not be repeated here.

采用此种实施方案时,对于拼接屏而言,可以将拼接屏视为一个完整的屏幕,根据该完整屏幕的分辨率,对页面数据中的全部元素的尺寸进行调整,以使页面数据中的全部元素均位于显示窗口的可视区域中,由此,用户可以在大屏上看到网页上包含的全部内容,而无需移动滚动条。When this implementation scheme is adopted, for the spliced screen, the spliced screen can be regarded as a complete screen. According to the resolution of the complete screen, the sizes of all elements in the page data are adjusted so that all elements in the page data are located in the visible area of the display window. In this way, the user can see all the content contained in the web page on the large screen without moving the scroll bar.

下面,给出上述实施例的一种示例,参照图6所示,示出了该示例性的显示方法的整体流程图,其中,图6所示的Scale对象即为本示例中的Scale方法,具体可以采用如下过程的显示:An example of the above embodiment is given below. Referring to FIG. 6 , an overall flow chart of the exemplary display method is shown. The Scale object shown in FIG. 6 is the Scale method in this example. Specifically, the display may be performed in the following process:

S1,在制作网页的页面数据的UI设计稿时,确定一个基准分辨率,假设,该基准分辨率是1920x1080,指定默认缩放值为1(宽高缩放倍数)。在此基准分辨率下可以得到基准比例约为1.77778(1920/1080),将其命名为baseRatio;当然,除了这个基准分辨率外,页面数据还可以包含其他的基础参数。S1. When making the UI design draft of the page data of a web page, determine a base resolution. Assume that the base resolution is 1920x1080, and specify the default scaling value as 1 (width and height scaling multiples). Under this base resolution, the base ratio can be approximately 1.77778 (1920/1080), which is named baseRatio; of course, in addition to this base resolution, the page data can also contain other basic parameters.

S2,将页面数据上传至服务器,以提供给web前端使用;S2, upload the page data to the server to provide it to the web front end;

S3,对用户在显示设备上执行的操作进行监听,当监听到用户打开网页的操作时,获取网页的页面数据;S3, monitoring the operation performed by the user on the display device, and when the operation of opening a web page by the user is monitored, obtaining the page data of the web page;

S4,获取显示页面数据的显示窗口的尺寸,其中,若显示窗口是最大化,则尺寸是显示设备的屏幕分辨率,若显示窗口不是最大化,则需要获取显示窗口相对于显示设备的分辨率;具体地,可以通过浏览器window对象的innerWidth和innerHeight属性读取当前显示窗口的可视区域的宽度和高度;S4, obtaining the size of the display window for displaying the page data, wherein if the display window is maximized, the size is the screen resolution of the display device, and if the display window is not maximized, it is necessary to obtain the resolution of the display window relative to the display device; specifically, the width and height of the visible area of the current display window can be read through the innerWidth and innerHeight properties of the browser window object;

S5,显示设备将获取的显示设备的分辨率发送到显示页面数据的实例,显示页面数据的实例中的比例换算算法会根据获取到的分辨率,与页面数据的预设分辨率,确定对元素进行调整的尺寸比例,其过程如下:S5, the display device sends the acquired resolution of the display device to the instance of the display page data, and the ratio conversion algorithm in the instance of the display page data determines the size ratio of the element to be adjusted according to the acquired resolution and the preset resolution of the page data, and the process is as follows:

根据当前窗口的宽度和高度,计算出一个比例,该比例称为currentRatio,此时currentRatio已确定。之后,将当前宽高比currentRatio和基准比例baseRatio进行对比,如果currentRatio大于baseRatio,如currentRatio是2, 则表示当前终端的显示比例更宽,则当前需要缩放的宽度比例就是可视区域的显示高度乘以基准比例再除以基础宽度(即1920),即scale.width(缩放的宽度比例)=(可视区域的显示高度×baseRatio)/baseWidth(1920),此处的“×”表示相乘。缩放高度比例则不需要通过基准比例来计算,直接使用当前显示设备的显示高度除以基础高度,因为当前运行时的状态是更高的分辨率缩放,故而宽度需要通过基础比例来计算,高度直接通过window对象获取即可,即高度方向的缩放比例=可视区域的高度/baseHeight(1080)。According to the width and height of the current window, a ratio is calculated, which is called currentRatio. At this time, currentRatio is determined. Then, the current aspect ratio currentRatio is compared with the base ratio baseRatio. If currentRatio is greater than baseRatio, such as currentRatio is 2, It means that the display ratio of the current terminal is wider, so the current width ratio that needs to be scaled is the display height of the visible area multiplied by the base ratio and then divided by the base width (i.e. 1920), that is, scale.width (scaled width ratio) = (display height of the visible area × baseRatio) / baseWidth (1920), where "×" means multiplication. The scaling height ratio does not need to be calculated by the base ratio, but directly uses the display height of the current display device divided by the base height. Because the current runtime state is a higher resolution scaling, the width needs to be calculated by the base ratio, and the height can be directly obtained through the window object, that is, the scaling ratio in the height direction = the height of the visible area / baseHeight (1080).

另一种情况是如果currentRatio不大于baseRatio,则表示当前显示设备的显示比例更高,则此时缩放高度需要来计算得到,即高度方向的缩放比例=可视区域的宽度/baseRatio/baseHeight(1080),而宽度缩放比例则是保持当前即可,通过window对象直接读取,即宽度方向的缩放比例=可视区域的宽度/baseWidth(1080)。Another case is that if currentRatio is not greater than baseRatio, it means that the display ratio of the current display device is higher. In this case, the scaling height needs to be calculated, that is, the scaling ratio in the height direction = the width of the visible area/baseRatio/baseHeight(1080), and the width scaling ratio can be kept current and read directly through the window object, that is, the scaling ratio in the width direction = the width of the visible area/baseWidth(1080).

可见,同一显示设备上不同的显示窗口可以得到不同的缩放比例,该缩放比例即为第二调整参数。It can be seen that different display windows on the same display device can obtain different scaling ratios, and the scaling ratio is the second adjustment parameter.

S6,将该第二调整参数作用于页面数据,例如,将第二调整参数传入给CSS3中transform属性的scale方法,scale方法会按照尺寸比例,对页面数据中的每个元素进行缩放。具体地:比例换算算法会会将第二调整参数中宽度方向的缩放比例和高度方向的缩放比例分别传入scale对象中的x和y两个参数,如只在宽度方向缩放,则采用scaleX(x);如只在高度方向缩放,则采用scaleY(y);如同时在宽度方向和高度方向缩放,则采用scale(x,y):然后scale方法通过transform属性作用做HTML来实现视图上的映射,即div.style.transform=`scale(${scale.width},${scale.height})`,以对页面数据中的每个元素进行缩放。S6, the second adjustment parameter is applied to the page data, for example, the second adjustment parameter is passed to the scale method of the transform attribute in CSS3, and the scale method will scale each element in the page data according to the size ratio. Specifically: the proportional conversion algorithm will pass the scaling ratio in the width direction and the scaling ratio in the height direction in the second adjustment parameter to the two parameters x and y in the scale object respectively. If scaling is only in the width direction, scaleX(x) is used; if scaling is only in the height direction, scaleY(y) is used; if scaling is in both the width and height directions, scale(x,y) is used: then the scale method uses the transform attribute to do HTML to achieve the mapping on the view, that is, div.style.transform = `scale(${scale.width},${scale.height})`, to scale each element in the page data.

S7:显示页面数据的实例,会将缩放后的页面数据的视图渲染到显示窗口中,此时页面数据中的全部元素都位于显示窗口的可视区域中。S7: An instance of displaying the page data will render the scaled view of the page data into the display window. At this time, all elements in the page data are located in the visible area of the display window.

该示例,可以应用于手机、4K屏、拼接屏、电脑、MP4等各种类型的显示设备中,只需要在浏览器中植入根据分辨率进行尺寸比例换算的程序,即可实现页面数据自适应显示窗口的效果,也就是说,可以视图展示是按照显示窗口呈现出了最完美的比例。This example can be applied to various types of display devices such as mobile phones, 4K screens, spliced screens, computers, MP4s, etc. You only need to embed a program in the browser that converts the size ratio according to the resolution to achieve the effect of adaptive display window of page data. In other words, the view display can present the most perfect ratio according to the display window.

在更进一步的实施方式中,在将页面数据中的全部元素显示在显示窗口的可视区域中后,也可以响应于显示窗口的变化,对页面数据进行自适应调整,以使显示窗口无论产生何种变化,页面数据中的全部元素均位于显示窗口的可视区域中。如缩小可视区域后,页面数据的全部元素变换尺寸后仍全部位于可视区域中,如放大可视区域后,页面数据中的全部元素位于可视区 域中且尺寸相应增大,以适配当下的可视区域。又例如,显示设备的分辨率变低后,页面数据的全部元素变小后仍全部位于可视区域中,其尺寸适配当下的分辨率,以得到较清晰的展示效果;再例如,显示设备的分辨率变高后,页面数据的全部元素尺寸变大后仍全部位于可视区域中,其尺寸适配当下的分辨率,以得到更加清晰的展示效果。In a further embodiment, after all elements of the page data are displayed in the visible area of the display window, the page data may be adaptively adjusted in response to changes in the display window, so that no matter what changes occur in the display window, all elements of the page data are located in the visible area of the display window. For example, after the visible area is reduced, all elements of the page data are still located in the visible area after the size is changed. For example, after the visible area is enlarged, all elements of the page data are located in the visible area. domain and the size increases accordingly to fit the current visible area. For another example, when the resolution of the display device becomes lower, all elements of the page data become smaller but still all are in the visible area, and their sizes adapt to the current resolution to obtain a clearer display effect; for another example, when the resolution of the display device becomes higher, all elements of the page data become larger but still all are in the visible area, and their sizes adapt to the current resolution to obtain a clearer display effect.

这样,显示窗口的分辨率或者可视区域变化之后,视图展示都要按比例呈现最完美的比例。In this way, when the resolution of the display window or the visible area changes, the view display will be proportionally presented in the most perfect proportion.

相应地,参照图7所示,示出了又一种显示方法的步骤流程示意图,如图7所示,可以在将调整后的页面数据显示到显示窗口之后,对显示窗口的变化进行监听,在监听到显示窗口发生变化时,可以执行以下步骤:Accordingly, referring to FIG. 7 , a schematic flow chart of another display method is shown. As shown in FIG. 7 , after displaying the adjusted page data in the display window, the change of the display window may be monitored. When the change of the display window is monitored, the following steps may be performed:

步骤201:响应于显示窗口的变化,对页面数据中所包括的元素的尺寸进行适应性调整;其中,变化包括显示窗口的可视区域的尺寸变化和显示分辨率的变化;Step 201: In response to a change in the display window, adaptively adjust the size of the elements included in the page data; wherein the change includes a change in the size of the visible area of the display window and a change in the display resolution;

步骤202:将适应性调整后的页面数据显示到变化后的显示窗口中,其中,页面数据中的全部元素均位于变化后的显示窗口的可视区域中。Step 202: Displaying the adaptively adjusted page data in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.

其中,显示窗口的变化包括了显示窗口的高度和宽度的变化,而促使显示窗口在宽度方向和高度方向上发生变化的情况包括两种,一种是显示窗口的可视区域被人为操作更改,参照图8所示,显示窗口所在的显示设备的分辨率不变,都为1920×1080,但是,显示窗口被用户从最大化显示调整为不进行最大化显示,这样,显示窗口的可视区域200发生了变化;另一种是显示窗口所在的显示设备的屏幕分辨率被调整了,如图4所示,显示窗口所在的显示设备由高分辨率(1920×1080)调整到了低分辨率(1680×1050),也使得显示窗口的大小发生了变化。Among them, the change of the display window includes the change of the height and width of the display window, and there are two situations that cause the display window to change in the width direction and the height direction. One is that the visible area of the display window is changed by manual operation. As shown in FIG8 , the resolution of the display device where the display window is located remains unchanged, which is 1920×1080. However, the display window is adjusted by the user from maximized display to non-maximized display, so that the visible area 200 of the display window is changed; the other is that the screen resolution of the display device where the display window is located is adjusted. As shown in FIG4 , the display device where the display window is located is adjusted from high resolution (1920×1080) to low resolution (1680×1050), which also changes the size of the display window.

这两种变化都会使得显示窗口的可视区域的尺寸发生变化,则可以依据变化后的显示窗口的可视区域的尺寸,对页面数据中元素的尺寸进行适应性调整,以使页面数据中的全部元素可以始终位于显示窗口的可视区域中。Both of these changes will cause the size of the visible area of the display window to change. The size of the elements in the page data can be adaptively adjusted based on the size of the visible area of the display window after the change, so that all elements in the page data can always be located in the visible area of the display window.

具体地,可以获取变化后的显示窗口的可视区域的尺寸,接着,基于变化后的可视区域的尺寸,对页面数据中的元素的尺寸进行适应性调整,并将适应性调整后的页面数据显示到变化后的显示窗口中,其中,页面数据中的全部元素均位于变化后的显示窗口的可视区域中。Specifically, the size of the visible area of the changed display window can be obtained, and then, based on the size of the changed visible area, the size of the elements in the page data is adaptively adjusted, and the adaptively adjusted page data is displayed in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.

具体地,显示设备可以调用内置在显示设备中的监听接口,对显示窗口的可视区域的尺寸的变化进行监听,当监听到尺寸变化时,可以通知获取web端(或APP)的显示窗口的可视区域的尺寸的实例,如上述所述的window对象的innerWidth和innerHeight属性,获取可视区域的变化后的尺 寸。接着,该window对象的innerWidth和innerHeight属性可以将获取到的可视区域的尺寸反馈给显示页面数据的实例,从而显示页面数据的实例又按照上述步骤S5-57的过程,重新对页面数据中的元素进行调整。Specifically, the display device can call the monitoring interface built into the display device to monitor the size change of the visible area of the display window. When the size change is detected, the web end (or APP) can be notified to obtain the size of the visible area of the display window, such as the innerWidth and innerHeight properties of the window object described above, to obtain the size of the visible area after the change. Then, the innerWidth and innerHeight attributes of the window object can feed back the acquired size of the visible area to the instance displaying the page data, so that the instance displaying the page data readjusts the elements in the page data according to the process of the above step S5-57.

在一些实施例中,基于变化后的显示窗口的可视区域的尺寸,对页面数据中的元素的尺寸进行适应性调整的过程,可以参照上述步骤S101的过程即可。In some embodiments, the process of adaptively adjusting the size of the element in the page data based on the changed size of the visible area of the display window may refer to the process of step S101 described above.

采用此种实现方式,可以对显示设备的分辨率变化和显示窗口的尺寸变化做出实时的响应,以在每次显示设备的分辨率或者显示窗口的尺寸变化之后,页面数据的视图展示都按比例呈现最完美的比例,这样,用户在改变显示窗口的尺寸,以及改变显示设备的分辨率致使显示窗口的尺寸发生变化后,用户仍然可以在变化后的显示窗口的可视区域中看到页面数据的全部内容,从而优化了用户的浏览体验。By adopting this implementation method, a real-time response can be made to changes in the resolution of the display device and the size of the display window, so that after each change in the resolution of the display device or the size of the display window, the view display of the page data is proportionally presented in the most perfect proportion. In this way, after the user changes the size of the display window, and changes the resolution of the display device causing the size of the display window to change, the user can still see the entire content of the page data in the visible area of the changed display window, thereby optimizing the user's browsing experience.

在一些实施例中,对页面数据中元素的尺寸的适应性调整可以包括:对元素在第一方向上的尺寸的调整;和/或,对元素在第二方向上的尺寸的调整;其中,第一方向为显示窗口的高度方向或宽度方向,第一方向垂直于第二方向。In some embodiments, adaptive adjustment of the size of an element in page data may include: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is the height direction or the width direction of the display window, and the first direction is perpendicular to the second direction.

也就是说,对于变化前后的显示窗口而言,其在显示窗口中所显示的页面数据中的元素,其在第一方向上的尺寸发生了变化,也可能在第二方向上的尺寸发生了变化,或者第一方向和第二方向上的尺寸均发生了变化。具体而言,可以依据其显示窗口的可视区域的变化情况而定,如可视区域在宽度方向上发生了变化,而高度方向未发生变化,则在显示窗口变化前后,元素在宽度方向上的尺寸发生了变化,而元素在高度方向上的尺寸未发生变化。又如可视区域在高度方向上发生了变化,而宽度方向未发生变化,则在显示窗口变化前后,元素在高度方向上的尺寸发生了变化,而元素在宽度方向上的尺寸未发生变化;如可视区域在高度方向和宽度方向上均发生了变化,则在显示窗口变化前后,元素在高度方向和宽度方向上的尺寸均发生了变化。That is to say, for the display window before and after the change, the size of the element in the page data displayed in the display window has changed in the first direction, and may also have changed in the second direction, or both in the first direction and the second direction. Specifically, it can be determined according to the change of the visible area of the display window. For example, if the visible area has changed in the width direction but not in the height direction, the size of the element has changed in the width direction before and after the display window has changed, while the size of the element has not changed in the height direction. For another example, if the visible area has changed in the height direction but not in the width direction, the size of the element has changed in the height direction before and after the display window has changed, while the size of the element has not changed in the width direction; if the visible area has changed in both the height and width directions, the size of the element has changed in both the height and width directions before and after the display window has changed.

也就是说,在显示窗口的变化前后,位于可视区域中元素的尺寸变化也与显示窗口的变化适配。That is to say, before and after the display window changes, the size changes of the elements in the visible area also adapt to the changes of the display window.

相应地,如上所述,促使显示窗口在宽度和长度上发生变化的情况包括两种,下面,先以图8所示的情况予以说明。具体地,图8示出的是显示窗口的尺寸被用户调整的情况,这一调整致使显示窗口的可视区域的尺寸发生了变化,具体地,内置于显示设备中的监听接口可以监听对显示窗口的尺寸是否进行了调整操作,在监听到尺寸调整操作时,可以响应于对显示窗口的尺寸调整操作,确定尺寸调整操作后的显示窗口的可视区域的尺寸参数;接 着,基于尺寸参数,对页面数据中所包括的元素的尺寸进行适应性调整;其中,尺寸变化包括显示窗口的宽度的变化,和/或高度的变化。Accordingly, as described above, there are two situations that cause the width and length of the display window to change. Below, the situation shown in FIG8 is used to illustrate. Specifically, FIG8 shows a situation where the size of the display window is adjusted by the user. This adjustment causes the size of the visible area of the display window to change. Specifically, the monitoring interface built into the display device can monitor whether the size of the display window is adjusted. When the size adjustment operation is detected, the monitoring interface can respond to the size adjustment operation of the display window and determine the size parameters of the visible area of the display window after the size adjustment operation. Then, based on the size parameter, the size of the elements included in the page data is adaptively adjusted; wherein the size change includes a change in the width and/or height of the display window.

相应地,可以响应于对显示窗口执行的尺寸调整操作,获取尺寸调整后的显示窗口的尺寸参数,并基于尺寸参数对页面数据中所包括的元素的尺寸进行适应性调整。Accordingly, in response to a size adjustment operation performed on the display window, a size parameter of the display window after the size adjustment may be acquired, and the size of the element included in the page data may be adaptively adjusted based on the size parameter.

本实施例中,尺寸调整操作可以包括对显示窗口的宽度的延长操作和缩短操作,例如,用户持鼠标选中显示窗口的边缘,并将边缘向显示窗口的外侧拖动,则宽度增加,将边缘向显示窗口的内侧移动,则宽度减小。同理,尺寸调整操作可以包括对显示窗口的高度的延长操作和缩短操作。当然在又一些实施例中,尺寸调整操作可以是预定的操作,如连续双击鼠标左键,则缩小显示窗口到一定尺寸;连续三击鼠标左键,则扩大显示窗口到一定尺寸。In this embodiment, the size adjustment operation may include an operation to extend or shorten the width of the display window. For example, if the user selects the edge of the display window with the mouse and drags the edge to the outside of the display window, the width increases; if the user moves the edge to the inside of the display window, the width decreases. Similarly, the size adjustment operation may include an operation to extend or shorten the height of the display window. Of course, in some other embodiments, the size adjustment operation may be a predetermined operation, such as double-clicking the left mouse button continuously to reduce the display window to a certain size; and clicking the left mouse button three times continuously to expand the display window to a certain size.

实际中,window对象的innerWidth和innerHeight属性可以获取尺寸调整后的显示窗口的尺寸,进而得到尺寸参数,该尺寸参数可以表征显示窗口与页面数据之间的尺寸变换关系,接着可以按照上述实施例中基于第二调整参数,对页面数据中的元素的尺寸进行调整的过程,按照尺寸参数,对元素的尺寸进行调整。In practice, the innerWidth and innerHeight properties of the window object can obtain the size of the display window after resizing, and then obtain the size parameter, which can characterize the size transformation relationship between the display window and the page data. Then, according to the process of adjusting the size of the elements in the page data based on the second adjustment parameter in the above embodiment, the size of the elements can be adjusted according to the size parameter.

在一些实施例中,基于尺寸参数对页面数据中元素的尺寸的调整可以采用两种方式,其中一种方式是在检测到尺寸调整操作时,可以根据显示窗口在调整前后的可视区域的尺寸变化,对调整前显示窗口所显示的调整后页面数据中元素的尺寸进行调整。In some embodiments, the size of elements in the page data can be adjusted based on size parameters in two ways. One of the ways is that when a size adjustment operation is detected, the size of the elements in the adjusted page data displayed in the display window before the adjustment can be adjusted according to the size change of the visible area of the display window before and after the adjustment.

具体地,可以确定调整前显示窗口的可视区域的第一尺寸,以及尺寸调整操作后的显示窗口的第二尺寸;并基于第一尺寸和第二尺寸之间,确定尺寸参数。接着,可以基于尺寸参数,对调整后页面数据中所包括的元素的尺寸进行适应性调整。Specifically, a first size of the visible area of the display window before adjustment and a second size of the display window after the size adjustment operation can be determined, and a size parameter can be determined based on the first size and the second size. Then, the size of the element included in the adjusted page data can be adaptively adjusted based on the size parameter.

本方式中,在步骤S102中,显示页面数据的实例在将调整后页面数据显示到显示窗口时,可以保存显示窗口的可视区域的第一尺寸,该第一尺寸可以包括显示窗口的可视区域的宽度方向上的尺寸和高度方向上的尺寸;接着,可以响应于上述的尺寸调整操作,通过window对象的innerWidth和innerHeight属性,获取调整后的显示窗口的可视区域的第二尺寸,该第二尺寸也可以包括显示窗口的可视区域的宽度方向上的尺寸和高度方向上的尺寸,并将该第二尺寸传入给显示页面数据的实例。In this method, in step S102, when the instance of displaying page data displays the adjusted page data on the display window, it can save the first size of the visible area of the display window, and the first size can include the size in the width direction and the size in the height direction of the visible area of the display window; then, in response to the above-mentioned size adjustment operation, the second size of the visible area of the display window after adjustment can be obtained through the innerWidth and innerHeight properties of the window object, and the second size can also include the size in the width direction and the size in the height direction of the visible area of the display window, and the second size is passed to the instance of displaying page data.

由此,显示页面数据的实例可以基于第一尺寸和第二尺寸,确定显示窗口调整前后的尺寸变化,基于这一尺寸变化,可以直接在调整后页面数据的基础上,对该调整后页面数据中元素的尺寸进行调整即可,而可以无需对原 始的页面数据中元素的尺寸进行调整。采用此种方式时,可以在步骤101中对页面数据中元素的尺寸进行调整后,保存调整后页面数据。Thus, the instance of displaying page data can determine the size change of the display window before and after adjustment based on the first size and the second size. Based on this size change, the size of the elements in the adjusted page data can be adjusted directly on the basis of the adjusted page data, without the need to adjust the original size. When this method is adopted, the size of the element in the page data is adjusted in step 101, and the adjusted page data is saved.

具体而言,可以将第一尺寸中宽度方向上的尺寸与高度方向上的尺寸之间的比例,作为调整前比例,接着,确定第二尺寸中宽度方向上的尺寸与高度方向上的尺寸之间的比例,该比例可以称为调整后比例;根据调整前比例和调整后比例之间的大小关系,确定显示窗口的可视区域在高度方向上的变化和宽度方向上的变化。Specifically, the ratio between the dimension in the width direction and the dimension in the height direction in the first size can be taken as the ratio before adjustment, and then the ratio between the dimension in the width direction and the dimension in the height direction in the second size is determined, and this ratio can be called the ratio after adjustment; based on the size relationship between the ratio before adjustment and the ratio after adjustment, the change in the height direction and the change in the width direction of the visible area of the display window are determined.

本方式中,第一尺寸和第二尺寸的度量单位可以是长度单位。具体地,若根据调整前比例和调整后比例,确定只在高度方向上发生变化,则可以按照确定其在高度方向上变化前后的比例,按照该比例,对调整后页面数据中元素在高度方向的尺寸进行缩放。例如,显示窗口的可视区域的宽度不变,高度从原来的12cm,变化到10cm,则其比例为10/12=0.83,则可以按照0.83对元素在高度方向上的尺寸进行缩放。In this method, the measurement unit of the first size and the second size can be a length unit. Specifically, if it is determined that only the height direction has changed according to the ratio before and after the adjustment, the size of the element in the height direction of the adjusted page data can be scaled according to the ratio before and after the change in the height direction. For example, the width of the visible area of the display window remains unchanged, and the height changes from the original 12cm to 10cm, then the ratio is 10/12=0.83, and the size of the element in the height direction can be scaled according to 0.83.

同理,若确定只在宽度方向上发生变化,则可以按照确定其在宽度方向上变化前后的比例,按照该比例,对调整后页面数据中元素在宽度方向的尺寸进行缩放。Similarly, if it is determined that the change occurs only in the width direction, the size of the element in the adjusted page data in the width direction may be scaled according to the ratio before and after the change in the width direction.

当然,若确定在宽度方向和高度方向均发生了变化,则可以确定在高度方向变化前后的比例,以及在宽度方向变化前后的比例,接着,按照高度方向变化前后的比例,对元素在高度方向的尺寸进行缩放,以及,按照宽度方向变化前后的比例,对元素在宽度方向的尺寸进行缩放。Of course, if it is determined that changes have occurred in both the width and height directions, the ratio before and after the change in the height direction and the ratio before and after the change in the width direction can be determined. Then, the size of the element in the height direction is scaled according to the ratio before and after the change in the height direction, and the size of the element in the width direction is scaled according to the ratio before and after the change in the width direction.

由此,经过尺寸变化后,可以将适应性调整后的页面数据显示到变化后的显示窗口的可视区域中。因页面数据的元素基于显示窗口的可视区域的变化,进行了适配于该变化的尺寸调整,由此,页面数据中的全部元素仍位于变化后的显示窗口的可视区域中。Thus, after the size change, the adaptively adjusted page data can be displayed in the visible area of the changed display window. Because the elements of the page data are resized to adapt to the change of the visible area of the display window, all elements in the page data are still located in the visible area of the changed display window.

具体地,在该实施例的一种示例性实现方式中,显示页面数据的实例可以运行在显示设备中,当显示页面数据的实例在将调整后页面数据显示到显示窗口时,可以保存显示窗口的可视区域的第一尺寸、调整后页面数据,如将第一尺寸和调整后页面数据保存在显示设备的本地中;Specifically, in an exemplary implementation of this embodiment, the instance of the display page data may be run in the display device, and when the instance of the display page data displays the adjusted page data on the display window, the first size of the visible area of the display window and the adjusted page data may be saved, such as saving the first size and the adjusted page data in the local of the display device;

接着,当监听接口监听到显示窗口的可视区域的尺寸发生变化时,可以指示window对象的innerWidth和innerHeight属性,获取调整后的显示窗口的可视区域的第二尺寸,该第二尺寸传入给显示页面数据的实例;Next, when the monitoring interface monitors that the size of the visible area of the display window changes, the innerWidth and innerHeight properties of the window object can be indicated to obtain the second size of the visible area of the display window after adjustment, and the second size is passed to the instance of displaying the page data;

显示页面数据的实例中的比例换算算法,基于第一尺寸和第二尺寸,确定尺寸参数;A ratio conversion algorithm in an instance of displaying page data determines a size parameter based on a first size and a second size;

该尺寸参数传入到显示页面数据的实例中的scale方法,之后,scale方 法采用“div.style.transform=`scale(${scale.width},${scale.height})”映射到本地存储的调整后页面数据中,使得调整后页面数据中的每个元素都按照尺寸参数被缩放。The size parameter is passed to the scale method in the instance that displays the page data. The method uses "div.style.transform = `scale(${scale.width},${scale.height})" to map to the adjusted page data stored locally, so that each element in the adjusted page data is scaled according to the size parameter.

当然,此种实施方式中,显示页面数据的实例也可以运行在云端中,第一尺寸和调整后页面数据也可以保存在云端,并与显示设备对应,从而在得到显示设备上显示窗口的可视区域变化后的第二尺寸时,可以在云端对调整后页面数据中的元素的尺寸进行调整,接着将自适应调整后的页面数据反馈给显示设备,使得显示设备将该自适应调整后的页面数据渲染到显示窗口中。Of course, in this implementation, an instance of the display page data can also run in the cloud, and the first size and the adjusted page data can also be saved in the cloud and correspond to the display device, so that when the second size is obtained after the visible area of the display window on the display device changes, the size of the elements in the adjusted page data can be adjusted in the cloud, and then the adaptively adjusted page data is fed back to the display device, so that the display device renders the adaptively adjusted page data into the display window.

采用此种方式时,由于根据显示窗口在变化前后的尺寸变化,直接对变化前的调整后页面数据中的元素的尺寸进行适配性调整,由此可以简化调整过程,无需依据原始的页面数据进行调整,因此,可以提高响应显示窗口的变化的速度。When this method is used, the size of the elements in the adjusted page data before the change is adaptively adjusted directly according to the size change of the display window before and after the change, thereby simplifying the adjustment process and eliminating the need to adjust based on the original page data. Therefore, the speed of responding to changes in the display window can be improved.

其中另外一种方式是:在检测到尺寸调整操作时,获取尺寸调整操作后显示窗口的可视区域的第二尺寸,以及显示窗口所在显示设备的屏幕分辨率;基于屏幕分辨率以及页面数据的预设分辨率,确定初步比例;接着,基于初步比例和第二尺寸,对页面数据中所包括的元素的尺寸进行适应性调整。Another method is: when a resizing operation is detected, a second size of the visible area of the display window after the resizing operation and a screen resolution of the display device where the display window is located are obtained; a preliminary ratio is determined based on the screen resolution and a preset resolution of the page data; and then, based on the preliminary ratio and the second size, the size of the elements included in the page data is adaptively adjusted.

本方式中,第二尺寸可以包括可视区域在高度方向上的尺寸以及在宽度方向上的尺寸。其中,可以根据显示窗口所在显示设备的当前分辨率和页面数据的预设分辨率,确定出对页面数据进行初步调整的初步比例,该初步比例可以包括在高度方向上的缩放比例和在宽度方向上的缩放比例,具体地,可以参照上述步骤S5的过程确定,在此不再赘述。In this manner, the second size may include the size of the visible area in the height direction and the size in the width direction. The initial ratio for preliminary adjustment of the page data may be determined according to the current resolution of the display device where the display window is located and the preset resolution of the page data. The initial ratio may include the scaling ratio in the height direction and the scaling ratio in the width direction. Specifically, the scaling ratio may be determined with reference to the process of step S5 above, which will not be described in detail here.

其中,由于该初步比例是指在显示窗口最大化情况下,将页面数据显示到显示窗口时所对应的比例,由于对显示窗口的可视区域的尺寸进行了人为调整,因此在确定好初步比例后,需要依据显示窗口的可视区域的第二尺寸和该初步比例,对元素的尺寸进行调整。Among them, since the preliminary ratio refers to the ratio corresponding to when the page data is displayed on the display window when the display window is maximized, and since the size of the visible area of the display window is manually adjusted, after determining the preliminary ratio, the size of the element needs to be adjusted based on the second size of the visible area of the display window and the preliminary ratio.

具体地,可以首先按照初步比例,对页面数据中元素的尺寸进行初步调整,得到调整后的元素,其中,该调整后的元素可以即为元素A;Specifically, the size of the element in the page data may be preliminarily adjusted according to the preliminary ratio to obtain an adjusted element, wherein the adjusted element may be element A;

接着,确定显示窗口最大化时的最大尺寸,并确定第二尺寸和最大化尺寸之间的比例关系,此种情况下,第二尺寸和最大化尺寸之间的比例关系可以看做是上述方式中显示窗口调整前后的尺寸变化,也就是说,每次的显示窗口的尺寸调整操作,都视作其相对于最大化显示窗口的变化;由此,可以确定出调整后的显示窗口的可视区域相比于最大化尺寸而言,其在高度方向的尺寸变化和在宽度方向的尺寸变化,由此,得到在高度方向的变化比例和在宽度方向的变化比例。 Next, the maximum size of the display window when it is maximized is determined, and the proportional relationship between the second size and the maximized size is determined. In this case, the proportional relationship between the second size and the maximized size can be regarded as the size change before and after the display window is adjusted in the above manner, that is, each size adjustment operation of the display window is regarded as its change relative to the maximized display window; thereby, it is possible to determine the size change in the height direction and the size change in the width direction of the visible area of the adjusted display window compared to the maximized size, thereby obtaining the change ratio in the height direction and the change ratio in the width direction.

之后,按照高度方向的变化比例和在宽度方向的变化比例,对元素A的尺寸进行调整,从而得到调整后的元素A'。这样,元素A'便适配于调整后的显示窗口。Afterwards, the size of the element A is adjusted according to the change ratio in the height direction and the change ratio in the width direction, thereby obtaining the adjusted element A'. In this way, the element A' is adapted to the adjusted display window.

具体地,在该实施例的一种示例性实现方式中,显示页面数据的实例可以运行在云端中,当显示页面数据的实例在将调整后页面数据显示到显示窗口时,可以保存页面数据、显示窗口的分辨率以及对获取调整后页面数据时采用的调整参数,即上述的第二调整参数,如将分辨率和第二调整参数保存在显示设备的本地中;Specifically, in an exemplary implementation of this embodiment, the instance of displaying page data may be run in the cloud. When the instance of displaying page data displays the adjusted page data on the display window, the page data, the resolution of the display window, and the adjustment parameters used when obtaining the adjusted page data, that is, the second adjustment parameters mentioned above, may be saved. For example, the resolution and the second adjustment parameters may be saved locally in the display device.

接着,当监听接口监听到显示窗口的可视区域的尺寸发生变化时,可以指示window对象的innerWidth和innerHeight属性,获取调整后的显示窗口的可视区域的第二尺寸,该第二尺寸传入给显示页面数据的实例;Next, when the monitoring interface monitors that the size of the visible area of the display window changes, the innerWidth and innerHeight properties of the window object can be indicated to obtain the second size of the visible area of the display window after adjustment, and the second size is passed to the instance of displaying the page data;

显示页面数据的实例中的比例换算算法,基于第二尺寸和保存的分辨率之间的尺寸,确定出第二尺寸和分辨率之间之间的比例关系;The ratio conversion algorithm in the instance of displaying the page data determines the ratio relationship between the second size and the resolution based on the size between the second size and the saved resolution;

其中,显示页面数据的实例可以将第二调整参数先传入到scale方法,scale方法采用“div.style.transform=`scale(${scale.width},${scale.height})”映射到页面数据中,使得页面数据中的每个元素都按照尺寸参数被缩放,并保存调整后页面数据;The instance of displaying page data may first pass the second adjustment parameter into the scale method, and the scale method uses "div.style.transform = `scale(${scale.width}, ${scale.height})" to map to the page data, so that each element in the page data is scaled according to the size parameter, and the adjusted page data is saved;

接着,比例换算算法将第二尺寸和分辨率之间之间的比例关系,又传入到scale方法,scale方法采用“div.style.transform=`scale(${scale.width},${scale.height})”映射调整后页面数据中,使得调整后页面数据中的每个元素都按照新传入的比例关系又被缩放。Next, the proportional conversion algorithm passes the proportional relationship between the second size and the resolution to the scale method. The scale method uses "div.style.transform = `scale(${scale.width},${scale.height})" to map the adjusted page data, so that each element in the adjusted page data is scaled according to the newly passed in proportional relationship.

之后,显示页面数据的实例将自适应调整后的页面数据发送给显示设备,显示设备可以在前端页面显示。Afterwards, the instance displaying the page data sends the adaptively adjusted page data to the display device, and the display device can display it on the front-end page.

采用此种实施方式时,可以无需存储前次页面数据被调整后的数据,使得每次响应于尺寸调整操作,均可以以原始的页面数据为依据进行调整,继而可以降低对设备的存储要求。When this implementation is adopted, there is no need to store the data after the last page data is adjusted, so that each time a size adjustment operation is responded to, the adjustment can be made based on the original page data, thereby reducing the storage requirements of the device.

其中,以图4所示的情况予以说明。具体地,图4示出的是显示窗口所在的显示设备的分辨率变化的情况,这一分辨率变化致使显示窗口的可视区域的尺寸发生了变化,具体地,显示设备可以调用监听接口监听显示窗口所在的显示设备的分辨率是否发生变化,相应地,可以响应于显示窗口所在的显示设备的分辨率变化,获取变化后的目标分辨率,并基于目标分辨率对页面数据中所包括的元素的尺寸进行适应性调整。The situation shown in Figure 4 is used for illustration. Specifically, Figure 4 shows the situation where the resolution of the display device where the display window is located changes. This resolution change causes the size of the visible area of the display window to change. Specifically, the display device can call a monitoring interface to monitor whether the resolution of the display device where the display window is located has changed. Accordingly, in response to the resolution change of the display device where the display window is located, the changed target resolution can be obtained, and the size of the elements included in the page data can be adaptively adjusted based on the target resolution.

其中,分辨率发生变化的情况可以包括同一显示设备的分辨率的变化,如计算机的分辨率从1920×1080调整到了1680×1050;也可以包括显示窗口 从一个显示设备拖拽到另一显示设备的情况,如显示窗口从显示设备A投屏到了显示设备B。The resolution change may include the change of the resolution of the same display device, such as the resolution of a computer is adjusted from 1920×1080 to 1680×1050; it may also include the display window The situation of dragging from one display device to another, such as projecting the display window from display device A to display device B.

具体地,响应于将显示窗口从第一显示屏移动到第二显示屏的拖拽操作,将第二显示屏的分辨率作为目标分辨率;和/或,响应于对显示窗口所在的显示设备的分辨率的调整操作,将调整操作后的分辨率作为目标分辨率;Specifically, in response to a drag operation of moving the display window from the first display screen to the second display screen, the resolution of the second display screen is used as the target resolution; and/or, in response to an adjustment operation of the resolution of the display device where the display window is located, the resolution after the adjustment operation is used as the target resolution;

其中,第一显示屏的分辨率不同于第二显示屏的分辨率;和/或,第一显示屏的尺寸不同于第二显示屏的尺寸。The resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen.

本示例中,将显示窗口从第一显示屏移动到第二显示屏的拖拽操作,可以是指,用户选中显示窗口并拖拽,当拖拽到第一显示屏的边缘时,显示窗口跳转到第二显示屏,并在第二显示屏上显示页面数据,则可以将第二显示屏的分辨率作为目标分辨率,此种可以适配于多显示屏的协同显示场景中。In this example, the drag operation of moving the display window from the first display screen to the second display screen may mean that the user selects the display window and drags it. When dragging to the edge of the first display screen, the display window jumps to the second display screen and displays the page data on the second display screen. The resolution of the second display screen can be used as the target resolution, which can be adapted to the collaborative display scenario of multiple display screens.

该示例中,监听接口可以位于web端中,例如与浏览器绑定,其可以用于检测同一用户所使用的显示窗口是否发生了显示屏的迁移,即监听显示窗口是否在同一显示屏中,若监听到显示窗口在两个显示屏中发生了迁移,则可以指示迁移后的显示屏(第二显示屏)所在的显示设备上的window对象的innerWidth和innerHeight属性,去获取第二显示屏的目标分辨率,此时,目标分辨率可以告知给位于云端的显示页面数据的实例,使得云端基于目标分辨率,对页面数据的元素进行自适应调整后,发送给第二显示屏显示。In this example, the monitoring interface can be located in the web end, for example, bound to a browser, and can be used to detect whether the display window used by the same user has undergone display screen migration, that is, to monitor whether the display window is in the same display screen. If it is monitored that the display window has migrated between two display screens, the innerWidth and innerHeight properties of the window object on the display device where the migrated display screen (the second display screen) is located can be indicated to obtain the target resolution of the second display screen. At this time, the target resolution can be informed of the instance of the display page data located in the cloud, so that the cloud can adaptively adjust the elements of the page data based on the target resolution and send them to the second display screen for display.

具体地,在该实施例的一种具体实现中,第一显示屏和第二显示屏可以是同一显示设备连接的两个显示屏,如电脑主机连接两个显示屏,此种情况下,监听接口也可以位于该显示设备中,以监听显示窗口是否在所连接的两个显示屏中发生了迁移,若发生迁移,则可以指示显示设备上的window对象的innerWidth和innerHeight属性,去获取第二显示屏的目标分辨率,然后告知显示设备或云端上的显示页面数据的实例,以基于目标分辨率,对页面数据的元素进行自适应调整后,在第二显示屏显示调整后的页面数据。Specifically, in a specific implementation of this embodiment, the first display screen and the second display screen can be two display screens connected to the same display device, such as a computer host connected to two display screens. In this case, the monitoring interface can also be located in the display device to monitor whether the display window has migrated between the two connected display screens. If migration occurs, the innerWidth and innerHeight properties of the window object on the display device can be indicated to obtain the target resolution of the second display screen, and then the display device or the instance of the display page data on the cloud is informed to adaptively adjust the elements of the page data based on the target resolution, and then display the adjusted page data on the second display screen.

在一些情况下,用户可能会调整显示设备的分辨率,如计算机的分辨率从1920×1080调整到了1680×1050,则显示屏的显示区域的尺寸发生了变化,此种情况下,所显示的元素的尺寸也会发生相应变化,此种情况下,可以将计算机被调整后的分辨率作为目标分辨率。In some cases, the user may adjust the resolution of the display device, such as adjusting the resolution of the computer from 1920×1080 to 1680×1050, then the size of the display area of the display screen changes. In this case, the size of the displayed elements will also change accordingly. In this case, the adjusted resolution of the computer can be used as the target resolution.

在该实施例的一种实现方式中,在基于目标分辨率对页面数据中元素的尺寸进行调整时,可以基于目标分辨率和页面数据的预设分辨率,确定第一调整参数;接着,基于第一调整参数,对页面数据所包括的元素的尺寸进行调整。In one implementation of this embodiment, when adjusting the size of elements in page data based on the target resolution, a first adjustment parameter can be determined based on the target resolution and a preset resolution of the page data; then, based on the first adjustment parameter, the size of the elements included in the page data is adjusted.

其中,第一调整参数包括在高度方向的缩放比例和在宽度方向的缩放比 例。The first adjustment parameter includes a scaling ratio in the height direction and a scaling ratio in the width direction. example.

本实施例中,第一调整参数可以类似于第二调整参数,具体地,按照第一调整参数,对页面数据所包括的元素的尺寸进行调整的过程,可以参照上述按照第二调整参数,对页面数据所包括的元素的尺寸进行调整的过程即可,在此不再赘述。In this embodiment, the first adjustment parameter may be similar to the second adjustment parameter. Specifically, the process of adjusting the size of the elements included in the page data according to the first adjustment parameter may refer to the above-mentioned process of adjusting the size of the elements included in the page data according to the second adjustment parameter, and will not be repeated here.

采用此种实施方式时,可以在显示窗口所在的显示设备的分辨率发生变化时,所显示的页面数据中元素的尺寸跟着发生适配性变化,以使分辨率发生前后,页面数据中的全部元素始终位于显示窗口的可视区域中;也可以在显示窗口从位于一个显示设备跳转到另一显示设备时,所显示的页面数据中元素的尺寸适配另一显示设备的分辨率,以使显示设备发生变化前后,页面数据中的全部元素始终位于显示窗口的可视区域中。When this implementation is adopted, when the resolution of the display device where the display window is located changes, the size of the elements in the displayed page data can be adaptively changed accordingly, so that all elements in the page data are always located in the visible area of the display window before and after the resolution changes; when the display window jumps from one display device to another display device, the size of the elements in the displayed page data can be adapted to the resolution of the other display device, so that all elements in the page data are always located in the visible area of the display window before and after the display device changes.

具体地,由于是基于显示窗口变化前后的尺寸,对页面数据的元素的尺寸进行了调整,在可视化的角度上,页面数据中的同一元素在变化前的显示窗口中的尺寸,与在变化后的显示窗口中的尺寸之间具有第一比例;第一显示窗口的可视区域与所述第二显示窗口的可视区域之间具有第二比例;Specifically, since the size of the element of the page data is adjusted based on the size of the display window before and after the change, from a visualization perspective, the size of the same element in the page data in the display window before the change and the size in the display window after the change have a first ratio; the visible area of the first display window and the visible area of the second display window have a second ratio;

其中,所述第一比例与所述第二比例呈线性相关,具体地,该线性相关可以是指第一比例与第二比例相同。The first ratio is linearly correlated with the second ratio. Specifically, the linear correlation may mean that the first ratio is the same as the second ratio.

下面,再给出上述实施例的一种示例,参照图9所示,如图9所示,除包括上述图6所示的步骤S1-S7外,可以包括以下过程:Hereinafter, an example of the above embodiment is given, as shown in FIG. 9 . As shown in FIG. 9 , in addition to steps S1-S7 shown in FIG. 6 , the following process may be included:

首先,需要给浏览器window对象添加resize事件,该resize事件即为上述所述的监听接口,其以监听显示窗口的可视区域的尺寸变化,其具体包括对显示窗口的尺寸调整操作的监听,以及显示窗口所在的显示设备的分辨率变化的监听。First, you need to add a resize event to the browser window object. The resize event is the monitoring interface mentioned above, which monitors the size changes of the visible area of the display window, which specifically includes monitoring the size adjustment operation of the display window and the resolution change of the display device where the display window is located.

S8:在S7所述的将缩放后的页面数据的视图渲染到显示窗口后,可以启动定时器创建宏任务,即激活resize事件,resize事件被激活时,会通知window对象的innerWidth和innerHeight属性,记录变化前显示窗口的高度和宽度,记为(W1,H1);该(W1,H1)可以保存在显示设备的本地,或者通过显示设备与云端之间的连接,将(W1,H1)反馈给云端;S8: After rendering the scaled page data view to the display window as described in S7, a timer can be started to create a macro task, that is, to activate a resize event. When the resize event is activated, the innerWidth and innerHeight properties of the window object are notified, and the height and width of the display window before the change are recorded as (W1, H1); the (W1, H1) can be saved locally on the display device, or (W1, H1) can be fed back to the cloud through the connection between the display device and the cloud;

S9:resize事件监听到显示窗口所在的显示设备的分辨率变化后,会通知window对象的innerWidth和innerHeight属性,获取变化后的目标分辨率,将目标分辨率传输给位于显示设备后台的显示页面数据的实例,或者通过显示设备与云端之间的连接,将目标分辨率传输给云端,以使云端中的显示页面数据的实例获取这一目标分辨率。S9: After the resize event detects that the resolution of the display device where the display window is located has changed, it will notify the innerWidth and innerHeight properties of the window object, obtain the changed target resolution, and transmit the target resolution to the instance of the display page data located in the background of the display device, or transmit the target resolution to the cloud through the connection between the display device and the cloud, so that the instance of the display page data in the cloud can obtain this target resolution.

接着,显示页面数据的实例重复执行上述步骤S5-S7,以对页面数据中 的元素的尺寸进行适应性变化,如图4所示,并将变化尺寸后的页面数据显示到变化后的显示窗口中,得到了如图4所示的显示效果。Next, the example of displaying the page data repeats the above steps S5-S7 to The size of the element is adaptively changed, as shown in FIG4 , and the page data after the size change is displayed in the changed display window, obtaining the display effect shown in FIG4 .

S10:resize事件在监听到显示窗口被执行了尺寸调整操作时,如用户将显示窗口的宽度缩小,则通知window对象的innerWidth和innerHeight属性,获取缩小宽度后显示窗口的尺寸,包括长度方向的尺寸和高度方向的尺寸,记为(W2,H2);并将(W2,H2)传输给位于显示设备后台的显示页面数据的实例,或者通过显示设备与云端之间的连接,将(W2,H2)传输给云端,以使云端中的显示页面数据的实例获取(W2,H2);S10: When the resize event monitors that the display window has been resized, for example, if the user reduces the width of the display window, the innerWidth and innerHeight properties of the window object are notified to obtain the size of the display window after the width is reduced, including the size in the length direction and the size in the height direction, which is recorded as (W2, H2); and (W2, H2) is transmitted to the instance of the display page data located in the background of the display device, or (W2, H2) is transmitted to the cloud through the connection between the display device and the cloud, so that the instance of the display page data in the cloud obtains (W2, H2);

接着,显示页面数据的实例计算(W1,H1)与(W2,H2)之间的尺寸参数,按照尺寸参数,对预先保存的调整后页面数据,即步骤S6得到的页面数据中元素的尺寸进行调整,件该尺寸调整后的页面数据显示到变化后的显示窗口中,得到了如图8所示的显示效果。Next, the example of displaying the page data calculates the size parameters between (W1, H1) and (W2, H2), and adjusts the sizes of the elements in the pre-saved adjusted page data, i.e., the page data obtained in step S6, according to the size parameters. The page data after the size adjustment is displayed in the changed display window, and the display effect shown in Figure 8 is obtained.

S11:重新回到步骤S8,激活resize事件,使得resize事件继续监听显示窗口的可视区域的尺寸变化,由此,可以监听显示窗口的每一次的尺寸变化,并快速响应显示窗口的尺寸变化,对页面数据中元素的尺寸进行适应性调整,从而保证了每次的视图响应都是一一作用到显示窗口的变化之上的。S11: Go back to step S8 and activate the resize event, so that the resize event continues to monitor the size changes of the visible area of the display window. In this way, each size change of the display window can be monitored and quickly responded to, and the size of the elements in the page data can be adaptively adjusted, thereby ensuring that each view response is applied to the changes in the display window one by one.

由于本公开基于显示窗口的可视区域的尺寸与页面数据对应的预设分辨率之间的比例,对页面数据中的元素进行调整,该比例的计算可以由比例换算算法执行,具体地,当显示页面数据的实例位于显示设备的本地时,可以快速响应前端显示窗口的可视区域的尺寸变化,这是因为将监听到可视区域的尺寸变化告知显示页面数据的实例的路径被缩短,不依赖网络通信,由此,可以缩短响应时长,达到页面数据快速响应可视区域的尺寸变化的目的。Since the present disclosure adjusts the elements in the page data based on the ratio between the size of the visible area of the display window and the preset resolution corresponding to the page data, the calculation of the ratio can be performed by a ratio conversion algorithm. Specifically, when the instance displaying the page data is located locally on the display device, it can quickly respond to the size change of the visible area of the front display window. This is because the path for monitoring the size change of the visible area and informing the instance displaying the page data is shortened and does not rely on network communication. Therefore, the response time can be shortened, thereby achieving the purpose of the page data quickly responding to the size change of the visible area.

其中,当显示页面数据的实例位于云端时,前端显示窗口的可视区域的尺寸变化可以由显示设备告知云端,由于云端具有比显示设备强大的硬件资源,对于所包括元素较多的页面数据而言,在云端对页面数据进行自适应调整,可以提高调整效率,从而避免显示设备端的算力资源不足时导致的响应时间长的问题。Among them, when the instance displaying page data is located in the cloud, the size change of the visible area of the front display window can be notified to the cloud by the display device. Since the cloud has more powerful hardware resources than the display device, for page data with more elements, adaptive adjustment of the page data in the cloud can improve the adjustment efficiency, thereby avoiding the problem of long response time caused by insufficient computing power resources on the display device side.

当然,在一些实施例中,可以在显示设备侧和云端侧都部署显示页面数据的实例,在基于可视区域对页面数据进行自适应调整时,可以依据页面数据的数据量大小,确定在显示设备进行自适应调整还是在云端进行自适应调整。示例地,可以在页面数据的数据量大于或等于预设数据量时,显示设备可以将可视区域的尺寸告知云端,由云端执行自适应调整;在页面数据的数据量小于预设数据量时,显示设备可以根据可视区域的尺寸,在本地对页面数据中的元素执行自适应调整。 Of course, in some embodiments, instances of displaying page data may be deployed on both the display device side and the cloud side. When adaptively adjusting the page data based on the visible area, it may be determined whether to perform adaptive adjustment on the display device or on the cloud side according to the data volume of the page data. For example, when the data volume of the page data is greater than or equal to the preset data volume, the display device may inform the cloud side of the size of the visible area, and the cloud side may perform adaptive adjustment; when the data volume of the page data is less than the preset data volume, the display device may perform adaptive adjustment on the elements in the page data locally according to the size of the visible area.

采用此种实施例时,页面数据的数据量可以提前由云端告知显示设备,如显示设备侧触发了对页面数据的显示请求,则云端根据该显示请求确定需要显示的页面数据,以及页面数据的数据量,接着,将页面数据的数据量可以先告知显示设备,由显示设备根据告知的页面数据的数据量,决定在本地进行自适应调整还是在云端进行自适应调整,若显示设备决定在本地进行自适应调整,则云端将页面数据下发到显示设备;若显示设备决定告知云端进行自适应调整,则显示设备需要将显示窗口的可视区域的尺寸告知云端,由云端根据尺寸对页面数据调整后再下发给显示设备。When this embodiment is adopted, the amount of page data can be notified to the display device by the cloud in advance. If the display device side triggers a display request for the page data, the cloud determines the page data to be displayed and the amount of the page data based on the display request. Then, the amount of the page data can be notified to the display device first, and the display device decides whether to perform adaptive adjustment locally or in the cloud based on the amount of the notified page data. If the display device decides to perform adaptive adjustment locally, the cloud will send the page data to the display device; if the display device decides to inform the cloud to perform adaptive adjustment, the display device needs to inform the cloud of the size of the visible area of the display window, and the cloud will adjust the page data according to the size before sending it to the display device.

采用该实施例的方案,使得在对页面数据进行自适应调整时,可以适配显示设备的性能进行,从而达到最优的响应效率。By adopting the solution of this embodiment, when the page data is adaptively adjusted, the performance of the display device can be adapted to achieve the optimal response efficiency.

基于相同的发明构思,本公开还提供了一种自适应可视区域的显示系统,参照图10所示,示出了该显示系统的框架结构示意图,如图10所示,具体可以包括内容提供端和显示模块,其中,内容提供端用于提供页面数据,显示模块用于执行上述的显示方法。Based on the same inventive concept, the present disclosure also provides a display system with an adaptive visual area, as shown in FIG10 , which shows a schematic diagram of the framework structure of the display system. As shown in FIG10 , it can specifically include a content provider and a display module, wherein the content provider is used to provide page data, and the display module is used to execute the above-mentioned display method.

其中,内容提供端,主要用于支持应用程序的数据和业务逻辑,其主要功能是用于支持应用程序中的视图,为视图提供页面数据以及及时响应页面中的操作,即用户对页面中的控件执行操作的操作数据可以反馈给内容提供端,由内容提供端基于操作数据,提供出对应的页面数据,并交由显示模块将页面数据渲染在显示窗口中。Among them, the content provider is mainly used to support the data and business logic of the application. Its main function is to support the view in the application, provide page data for the view, and respond to the operations in the page in a timely manner. That is, the operation data of the user performing operations on the controls in the page can be fed back to the content provider. The content provider provides the corresponding page data based on the operation data, and hands it over to the display module to render the page data in the display window.

如图10所示,该显示模块可以适配多种类型的显示设备,如移动端的显示设备,包括手机和平板,适配于移动端所安装的APP(Application,手机软件)。以及安装有web端的显示设备,如高清屏、4K屏;以及安装有web段的大屏,如拼接屏和8K屏。As shown in Figure 10, the display module can be adapted to various types of display devices, such as mobile display devices, including mobile phones and tablets, and APP (Application, mobile software) installed on the mobile terminal. And display devices with web terminals installed, such as high-definition screens, 4K screens; and large screens with web segments installed, such as spliced screens and 8K screens.

本实施例中的显示模块可以是指上述的显示页面数据的实例,该显示模块可以位于显示设备,或者可以位于云端。The display module in this embodiment may refer to an instance of the above-mentioned display page data, and the display module may be located in a display device or in the cloud.

在一些实施例中,显示模块可以包括响应单元和视图单元;其中:In some embodiments, the display module may include a response unit and a view unit; wherein:

所述响应单元,用于基于显示窗口所在的显示设备的当前分辨率和所述页面数据的预设分辨率,确定对所述页面数据中的元素进行调整的第二调整参数;The response unit is used to determine a second adjustment parameter for adjusting an element in the page data based on a current resolution of a display device where the display window is located and a preset resolution of the page data;

所述视图单元,用于基于所述响应单元传输的第二调整参数,对所述页面数据所包括的元素的尺寸进行调整。The view unit is used to adjust the size of the element included in the page data based on the second adjustment parameter transmitted by the response unit.

参照图11所示,示出了该显示系统的又一框架结构示意图,如图11所示,响应单元位于视图单元和内容提供端之间,在视图单元和内容提供端之间充当了通信桥梁的作用。 Referring to FIG. 11 , another schematic diagram of the framework structure of the display system is shown. As shown in FIG. 11 , the response unit is located between the view unit and the content provider, and acts as a communication bridge between the view unit and the content provider.

具体地,本实施例中的响应单元可以是上述的比例换算算法和scale方法所在的单元,视图单元可以称为view单元,其可以用于监听对页面数据的操作,即监听位于显示窗口内的操作,以及执行上述transform属性所述的操作,如调用transform属性,即采用“div.style.transform=`scale(${scale.width},${scale.height})”映射到原页面数据中,使得原页面数据中的每个元素被缩放。Specifically, the response unit in this embodiment can be the unit where the above-mentioned scale conversion algorithm and scale method are located, and the view unit can be called a view unit, which can be used to monitor operations on page data, that is, to monitor operations within the display window, and to perform the operations described in the above-mentioned transform attribute, such as calling the transform attribute, that is, using "div.style.transform = `scale(${scale.width},${scale.height})" to map to the original page data, so that each element in the original page data is scaled.

其中,响应单元用于提供第二调整参数给视图单元,并将用户的操作数据输入给内容提供端。具体而言,在本实施例中,主要用于基于待显示所述页面数据的显示窗口的窗口参数和所述页面数据的预设分辨率,确定对所述页面数据中的元素进行调整的第二调整参数,之后,将这一第二调整参数传递给视图单元。The response unit is used to provide the second adjustment parameter to the view unit and input the user's operation data to the content provider. Specifically, in this embodiment, it is mainly used to determine the second adjustment parameter for adjusting the elements in the page data based on the window parameters of the display window to display the page data and the preset resolution of the page data, and then pass the second adjustment parameter to the view unit.

其中,视图单元用于处理视图层,即将定义用户界面的结构,在本实施例中,主要用于基于响应单元传递的第二调整参数,对页面数据中元素的尺寸进行调整后渲染到页面中,从而成为用户可以看到的视图。具体地,基于第二调整参数对页面数据中的元素的尺寸进行调整的过程,可以参照上述显示方法的实施例所述的过程即可,在此不再赘述。The view unit is used to process the view layer, that is, to define the structure of the user interface. In this embodiment, it is mainly used to adjust the size of the element in the page data based on the second adjustment parameter transmitted by the response unit and then render it into the page, so as to become a view that the user can see. Specifically, the process of adjusting the size of the element in the page data based on the second adjustment parameter can refer to the process described in the embodiment of the above display method, and will not be repeated here.

具体而言,其过程可以是:Specifically, the process can be:

视图单元通过DOM事件监听对页面中的控件执行的操作,若监听到对某一控件执行了操作,表示需要进入新的页面,显示新的页面上的页面数据,则可以将该操作的操作数据可以反馈给响应单元,响应单元将操作数据反馈给内容提供端,内容提供端基于操作数据,提供出对应的页面数据;The view unit monitors the operations performed on the controls in the page through DOM events. If it monitors that an operation is performed on a certain control, it means that a new page needs to be entered and the page data on the new page needs to be displayed. Then, the operation data of the operation can be fed back to the response unit. The response unit feeds back the operation data to the content provider. The content provider provides corresponding page data based on the operation data.

响应单元获取浏览器window对象的innerWidth和innerHeight属性读取当前窗口的宽度和高度,并根据页面数据中提供的预设分辨率,确定第二调整参数,将这一第二调整参数作为Scale方法中的x参数和y参数;接着利用Scale方法调用视图单元的transform属性;如采用“div.style.transform=`scale(${scale.width},${scale.height})”映射到transform;The response unit obtains the innerWidth and innerHeight properties of the browser window object to read the width and height of the current window, and determines the second adjustment parameter according to the preset resolution provided in the page data, and uses the second adjustment parameter as the x parameter and y parameter in the Scale method; then the Scale method is used to call the transform property of the view unit; for example, "div.style.transform = `scale(${scale.width},${scale.height})" is used to map to transform;

视图单元基于响应单元中Scale方法进行的映射,按照这一第二调整参数,对页面数据中的元素的尺寸进行缩放后,将调整后的页面数据显示到显示窗口中。The view unit scales the size of the elements in the page data based on the mapping performed by the Scale method in the response unit according to the second adjustment parameter, and displays the adjusted page data in the display window.

采用该实施方式中的显示系统,响应单元可以在web前端和服务器之间实现内容分发,采取这样的架构可以使得显示系统更容易维护和测试,这是因为可以只需改变响应单元的程序即可将改变自动反映在视图单元提供的页面视图中,方便对本显示方法的测试和维护。且可以使得内容提供端和视图单元之间解耦,二者不发生联系,从而保证各自的独立性,以便对二者进行分别维护。 With the display system in this embodiment, the response unit can realize content distribution between the web front end and the server. Such an architecture can make the display system easier to maintain and test, because only the program of the response unit can be changed to automatically reflect the change in the page view provided by the view unit, which is convenient for testing and maintenance of the display method. In addition, the content provider and the view unit can be decoupled, and the two are not connected, thereby ensuring their independence, so that they can be maintained separately.

相应地,在一些实施例中,显示系统还可以包括监听单元,用于监听显示窗口的变化,并在监听所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作;Accordingly, in some embodiments, the display system may further include a monitoring unit, configured to monitor changes in the display window, and trigger the display module to perform an adaptive adjustment operation when changes in the display window are monitored;

其中,所述适应性调整操作包括:对所述页面数据中所包括的元素的尺寸进行适应性调整,并将适应性调整后的页面数据显示到变化后的显示窗口中;The adaptive adjustment operation includes: adaptively adjusting the size of the elements included in the page data, and displaying the adaptively adjusted page data in the changed display window;

其中,变化包括显示窗口的可视区域的尺寸变化和显示分辨率的变化。The changes include changes in the size of the visible area of the display window and changes in the display resolution.

如图11所示,监听单元可以对显示窗口的可视区域的变化进行监听,并在监听到发生变化时,可以使得响应单元根据变化后的可视区域的尺寸,对页面数据中的元素的尺寸进行自适应调整。As shown in FIG. 11 , the monitoring unit may monitor changes in the visible area of the display window, and upon detecting changes, the response unit may adaptively adjust the size of elements in the page data according to the size of the changed visible area.

响应地,显示模块,还可以用于在执行适应性调整操作后,指示监听单元再次监听显示窗口的变化,并在监听到显示窗口发生变化时,触发显示模块执行适应性调整操作;或者,在监听单元触发显示模块执行适应性调整操作后的预设时长,再次监听显示窗口的变化,并在监听显示窗口发生变化时,触发显示模块执行适应性调整操作。In response, the display module can also be used to instruct the monitoring unit to monitor the changes in the display window again after performing the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the changes in the display window are monitored; or, monitor the changes in the display window again after a preset time after the monitoring unit triggers the display module to perform the adaptive adjustment operation, and trigger the display module to perform the adaptive adjustment operation when the changes in the display window are monitored.

在一些实施例中,响应单元可以位于web前端或服务器中,视图单元也以位于web前端或服务器中,监听单元可以位于web前端。也就是说,本实施例中的响应单元和视图单元可以分别位于显示设备和云端中。In some embodiments, the response unit can be located in the web front end or server, the view unit can also be located in the web front end or server, and the monitoring unit can be located in the web front end. That is, the response unit and the view unit in this embodiment can be located in the display device and the cloud, respectively.

例如,显示模块中的响应单元可以位于云端中,视图单元可以位于显示设备中,或者,显示模块的响应单元可以位于显示设备中,视图单元可以位于云端中,再或者,二者都位于显示设备或二者都位于云端中。For example, the response unit in the display module may be located in the cloud, and the view unit may be located in the display device; or the response unit of the display module may be located in the display device, and the view unit may be located in the cloud; or both may be located in the display device or both may be located in the cloud.

或者,如上述实施例所述的,在云端和显示设备侧都包括响应单元、监听单元和视图单元;而根据显示设备的性能,可以在自适应对页面数据的元素进行调整时,采用在云端调整或在显示设备侧调整,以提高响应效率。Alternatively, as described in the above embodiments, a response unit, a monitoring unit and a view unit are included on both the cloud side and the display device side; and according to the performance of the display device, when adaptively adjusting the elements of the page data, adjustments can be made on the cloud side or on the display device side to improve response efficiency.

本实施例中,适应性调整的过程可以参照上述图7有关的调整过程即可,在此不再赘述。In this embodiment, the adaptive adjustment process may refer to the adjustment process related to FIG. 7 , which will not be described in detail here.

本实施例中,显示模块可以在执行适应性调整后,指示监听单元开始监听显示窗口的变化,在监听到显示窗口发生变化时,触发显示模块执行适应性调整操作;In this embodiment, after performing adaptive adjustment, the display module may instruct the monitoring unit to start monitoring changes in the display window, and when changes in the display window are monitored, the display module is triggered to perform the adaptive adjustment operation;

或者,监听单元可以在触发显示模块执行适应性调整操作时,开启预设时长的倒计时,倒计时到达时,再次监听显示窗口的变化,并在监听显示窗口发生变化时,触发显示模块执行适应性调整操作。Alternatively, the monitoring unit may start a countdown of a preset duration when triggering the display module to perform an adaptive adjustment operation, and when the countdown is reached, monitor the changes in the display window again, and when monitoring the changes in the display window, trigger the display module to perform an adaptive adjustment operation.

采用本公开的显示系统和显示方法,具有以下优点:The display system and display method disclosed in the present invention have the following advantages:

第一,因页面数据的全部元素都位于显示窗口的可视区域中,这样,用 户可以在显示窗口的可视区域中看到页面数据的全部内容,无需拖动滚动条进行浏览,如此,简化了用户的操作,进一步提高用户对网页的浏览体验,特别是应用于4K大屏、拼接屏等显示中,可以简化控制操作,优化浏览体验。First, because all elements of the page data are located in the visible area of the display window, Users can see the entire content of the page data in the visible area of the display window without having to drag the scroll bar to browse. This simplifies user operations and further improves the user's browsing experience of web pages. Especially when applied to 4K large screens, spliced screens and other displays, it can simplify control operations and optimize the browsing experience.

第二,可以监听显示窗口的每一次的尺寸变化,并快速响应显示窗口的尺寸变化,对页面数据中元素的尺寸进行适应性调整,从而保证了每次的视图响应都是一一作用到显示窗口的变化之上的,这样,显示窗口的可视区域在尺寸发生变化时,页面数据中元素的尺寸发生适配性变化,以使得每次显示窗口的可视区域的尺寸变化时,页面数据中全部元素均位于可视区域中。Second, it is possible to monitor each size change of the display window and quickly respond to the size change of the display window, and adaptively adjust the size of the elements in the page data, thereby ensuring that each view response is applied one by one to the change of the display window. In this way, when the visible area of the display window changes in size, the size of the elements in the page data changes adaptively, so that each time the size of the visible area of the display window changes, all elements in the page data are located in the visible area.

第三,由于依据显示设备的分辨率和页面数据的预设分辨率,对元素的尺寸进行调整,使得都是以px单位为基准的计算,不存在需要将px转换为其他相对单位的过程,因此可以减少开发者的心智负担,即减小开发过程中的工作量,从而提高开发效率,节约开发时长。Third, since the size of the elements is adjusted according to the resolution of the display device and the preset resolution of the page data, all calculations are based on px units, and there is no need to convert px into other relative units. This can reduce the mental burden of developers, that is, reduce the workload in the development process, thereby improving development efficiency and saving development time.

第四,由于是基于屏幕分辨率和预设分辨率之间的相对尺寸关系,按照这一相对尺寸关系,对元素的尺寸进行调整,使得从元素的尺寸着手对页面的整体视图进行了细粒度调整,从而可以突破12px的瓶颈限制,使得浏览器可以显示尺寸小于12px的元素,由此,拓宽了页面显示的功能。Fourth, since it is based on the relative size relationship between the screen resolution and the preset resolution, the size of the element is adjusted according to this relative size relationship, so that the overall view of the page is fine-grainedly adjusted starting from the size of the element, thereby breaking through the bottleneck limit of 12px and allowing the browser to display elements smaller than 12px, thereby broadening the page display function.

本公开还提供了一种自适应可视区域的显示装置,参照图12所示,示出了该显示装置的结构示意图,如图12所示,具体可以包括以下模块:The present disclosure also provides a display device with an adaptive visible area, as shown in FIG12 , which shows a schematic diagram of the structure of the display device. As shown in FIG12 , the display device may specifically include the following modules:

调整模块,用于响应于对页面数据的显示触发,基于显示窗口中可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整;其中,所述显示窗口用于显示所述页面数据;An adjustment module, configured to adjust the size of the elements included in the page data based on the size of the visible area in the display window in response to a display trigger of the page data; wherein the display window is used to display the page data;

显示模块,用于将调整后的页面数据显示到所述显示窗口中;A display module, used for displaying the adjusted page data in the display window;

其中,所述页面数据中的全部元素均位于所述显示窗口的可视区域中。Wherein, all elements in the page data are located in the visible area of the display window.

可选地,所述装置还包括:Optionally, the device further comprises:

适应性调整模块,用于响应于所述显示窗口的尺寸变化,对所述页面数据中所包括的元素的尺寸进行适应性调整;an adaptive adjustment module, configured to adaptively adjust the size of the elements included in the page data in response to a size change of the display window;

所述显示模块,还用于将适应性调整后的页面数据显示到变化后的显示窗口中,其中,所述页面数据中的全部元素均位于所述变化后的显示窗口的可视区域中。The display module is further used to display the adaptively adjusted page data in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window.

可选地,所述适应性调整模块,包括以下至少一者:Optionally, the adaptive adjustment module includes at least one of the following:

第一调整单元,用于响应于对所述显示窗口执行的尺寸调整操作,获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整; a first adjustment unit, configured to, in response to a size adjustment operation performed on the display window, obtain a size parameter of the display window after the size adjustment, and adaptively adjust the size of the element included in the page data based on the size parameter;

第二调整单元,用于响应于所述显示窗口所在的显示设备的分辨率变化,获取变化后的目标分辨率,并基于所述目标分辨率对所述页面数据中所包括的元素的尺寸进行适应性调整。The second adjustment unit is used to obtain a changed target resolution in response to a change in the resolution of the display device where the display window is located, and adaptively adjust the size of the element included in the page data based on the target resolution.

可选地,所述第一调整单元,具体用于响应于将所述显示窗口从第一显示屏移动到第二显示屏的拖拽操作,将所述第二显示屏的分辨率作为所述目标分辨率;Optionally, the first adjustment unit is specifically configured to, in response to a drag operation of moving the display window from the first display screen to the second display screen, use a resolution of the second display screen as the target resolution;

和/或,响应于对所述显示窗口所在的显示设备的分辨率的调整操作,将调整操作后的分辨率作为所述目标分辨率;and/or, in response to an adjustment operation on the resolution of the display device where the display window is located, using the resolution after the adjustment operation as the target resolution;

其中,所述第一显示屏的分辨率不同于第二显示屏的分辨率;和/或,所述第一显示屏的尺寸不同于所述第二显示屏的尺寸。The resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen.

可选地,所述第一调整单元,包括:Optionally, the first adjustment unit includes:

第一参数确定单元,用于基于所述目标分辨率和所述页面数据的预设分辨率,确定第一调整参数;其中,所述第一调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;A first parameter determination unit, configured to determine a first adjustment parameter based on the target resolution and a preset resolution of the page data; wherein the first adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction;

第三调整单元,用于基于所述第一调整参数,对所述页面数据所包括的元素的尺寸进行调整。The third adjustment unit is used to adjust the size of the element included in the page data based on the first adjustment parameter.

可选地,所述第一调整单元,包括:Optionally, the first adjustment unit includes:

尺寸确定子单元,用于确定所述尺寸调整操作前所述显示窗口的可视区域的第一尺寸,以及所述尺寸调整操作后的显示窗口的第二尺寸;a size determination subunit, configured to determine a first size of a visible area of the display window before the size adjustment operation, and a second size of the display window after the size adjustment operation;

参数确定子单元,用于基于所述第一尺寸和所述第二尺寸,确定所述尺寸参数;a parameter determination subunit, configured to determine the size parameter based on the first size and the second size;

调整子单元,用于基于所述尺寸参数,对所述调整后页面数据中所包括的元素的尺寸进行适应性调整。The adjusting subunit is used to adaptively adjust the size of the elements included in the adjusted page data based on the size parameter.

可选地,所述第一调整单元,包括:Optionally, the first adjustment unit includes:

分辨率获取子单元,用于获取所述尺寸调整操作后所述显示窗口的可视区域的第一尺寸,以及所述显示窗口所在显示设备的当前分辨率;A resolution acquisition subunit, used to acquire a first size of a visible area of the display window after the size adjustment operation, and a current resolution of a display device where the display window is located;

比例确定子单元,用于基于所述当前分辨率以及所述页面数据的预设分辨率,确定初步比例;a ratio determination subunit, configured to determine a preliminary ratio based on the current resolution and a preset resolution of the page data;

尺寸调整子单元,用于基于所述初步比例和所述第一尺寸,对所述页面数据中所包括的元素的尺寸进行适应性调整。The size adjustment subunit is used to adaptively adjust the size of the element included in the page data based on the preliminary ratio and the first size.

可选地,所述页面数据中的同一元素在变化前的显示窗口中的尺寸,与在变化后的显示窗口中的尺寸之间具有第一比例;Optionally, a size of the same element in the page data in the display window before the change and a size of the same element in the display window after the change have a first ratio;

所述第一显示窗口的可视区域与所述第二显示窗口的可视区域之间具有第二比例; A second ratio exists between the visible area of the first display window and the visible area of the second display window;

其中,所述第一比例与所述第二比例呈线性相关。The first ratio is linearly correlated with the second ratio.

可选地,所述适应性调整,包括:对所述元素在第一方向上的尺寸的调整;和/或,对所述元素在第二方向上的尺寸的调整;其中,所述第一方向为所述显示窗口的高度方向或宽度方向,所述第一方向垂直于所述第二方向。Optionally, the adaptive adjustment includes: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is a height direction or a width direction of the display window, and the first direction is perpendicular to the second direction.

可选地,所述调整模块,包括:Optionally, the adjustment module includes:

分辨率获取单元,用于响应于对页面数据的显示触发,获取所述显示窗口所在的显示设备的当前分辨率;A resolution acquisition unit, configured to acquire a current resolution of a display device where the display window is located in response to a display trigger of the page data;

调整单元,用于基于所述当前分辨率和所述页面数据的预设分辨率,对所述页面数据所包括的元素的尺寸进行调整。The adjusting unit is used to adjust the size of the elements included in the page data based on the current resolution and the preset resolution of the page data.

可选地,所述调整单元,具体用于执行以下步骤:Optionally, the adjustment unit is specifically configured to perform the following steps:

基于所述预设分辨率,确定所述页面数据的第一尺寸比例;Based on the preset resolution, determining a first size ratio of the page data;

基于所述当前分辨率,确定所述显示窗口的第二尺寸比例;Based on the current resolution, determining a second size ratio of the display window;

基于所述第一尺寸比例和所述第二尺寸比例,确定第二调整参数;其中,所述第二调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;Determining a second adjustment parameter based on the first size ratio and the second size ratio; wherein the second adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction;

基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整。Based on the second adjustment parameter, the size of the element included in the page data is adjusted.

可选地,所述显示窗口包括多个子显示区域,不同的子显示区域位于不同的显示设备中;所述调整单元,具体用于执行以下步骤:Optionally, the display window includes a plurality of sub-display areas, and different sub-display areas are located in different display devices; the adjustment unit is specifically configured to perform the following steps:

响应于对所述页面数据的显示触发,基于多个所述显示设备各自对应的屏幕分辨率,确定所述显示窗口的窗口分辨率;In response to a display trigger of the page data, determining a window resolution of the display window based on screen resolutions corresponding to each of the plurality of display devices;

基于所述窗口分辨率和所述页面数据的预设分辨率,对所述页面数据中的元素的尺寸进行调整。Based on the window resolution and a preset resolution of the page data, the size of the element in the page data is adjusted.

可选地,对所述页面数据中所包括的元素的尺寸进行调整,包括:对所述页面数据中所包括的每个元素进行缩放。Optionally, adjusting the size of the elements included in the page data includes: scaling each element included in the page data.

本公开实施例还提供了一种电子设备,其存储的计算机程序使得处理器执行如本公开实施例所述的自适应可视区域的显示方法。具体地,该电子设备可以是指具有显示功能的电子设备,由此,使得电子设备可以自身对页面数据按照显示窗口的可视区域,对其中的元素的尺寸进行自适应调整,并可以响应于该可视区域的尺寸变化,对元素的尺寸也依据该变化进行适应性调整。The disclosed embodiment also provides an electronic device, the computer program stored in the electronic device enables the processor to execute the display method of the adaptive visible area as described in the disclosed embodiment. Specifically, the electronic device may refer to an electronic device with a display function, thereby enabling the electronic device to adaptively adjust the size of the elements in the page data according to the visible area of the display window, and can respond to the change in the size of the visible area and also adaptively adjust the size of the elements according to the change.

本公开实施例还提供了一种计算机可读存储介质,其存储的计算机程序使得处理器执行如本公开实施例所述的自适应可视区域的显示方法。The embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the display method of the adaptive visible area as described in the embodiment of the present disclosure.

具体地,该计算机可读存储介质可以位于电子设备中,或者可以位于云端中,由此,使得电子设备或云端可以按照显示窗口的可视区域,对页面数 据中的元素的尺寸进行自适应调整,并可以响应于该可视区域的尺寸变化,对元素的尺寸也依据该变化进行适应性调整。Specifically, the computer-readable storage medium may be located in the electronic device, or may be located in the cloud, thereby enabling the electronic device or the cloud to adjust the page number according to the visible area of the display window. The size of the elements in the data is adaptively adjusted, and the size of the elements can be adaptively adjusted according to the change in the size of the visible area.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。Finally, 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, commodity 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, commodity 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, commodity or device including the elements.

以上对本公开所提供的一种自适应可视区域的显示方法、装置、系统及介质进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。The above is a detailed introduction to the display method, device, system and medium of an adaptive visible area provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for a person skilled in the art, according to the idea of the present disclosure, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本公开的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。References herein to "one embodiment," "embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present disclosure. In addition, please note that examples of the term "in one embodiment" do not necessarily all refer to the same embodiment.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本公开的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并 未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, Well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本公开可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

最后应说明的是:以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的精神和范围。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims (20)

一种自适应可视区域的显示方法,其特征在于,所述方法包括:A method for displaying an adaptive visual area, characterized in that the method comprises: 响应于对页面数据的显示触发,基于显示窗口中可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整;其中,所述显示窗口用于显示所述页面数据;In response to a display trigger of the page data, adjusting the size of the elements included in the page data based on the size of the visible area in the display window; wherein the display window is used to display the page data; 将调整后的页面数据显示到所述显示窗口中;Displaying the adjusted page data in the display window; 其中,所述页面数据中的全部元素均位于所述显示窗口的可视区域中。Wherein, all elements in the page data are located in the visible area of the display window. 根据权利要求1所述的显示方法,其特征在于,所述将调整后的页面数据显示到所述显示窗口之后,所述方法还包括:The display method according to claim 1, characterized in that after displaying the adjusted page data in the display window, the method further comprises: 响应于所述显示窗口的尺寸变化,对所述页面数据中所包括的元素的尺寸进行适应性调整;In response to the size change of the display window, adaptively adjusting the size of the elements included in the page data; 将适应性调整后的页面数据显示到变化后的显示窗口中,其中,所述页面数据中的全部元素均位于所述变化后的显示窗口的可视区域中。The adaptively adjusted page data is displayed in the changed display window, wherein all elements in the page data are located in the visible area of the changed display window. 根据权利要求2所述的显示方法,其特征在于,所述响应于所述显示窗口的尺寸变化,对所述页面数据中所包括的元素的尺寸进行适应性调整,包括以下至少一者:The display method according to claim 2, wherein the adaptively adjusting the size of the elements included in the page data in response to the size change of the display window comprises at least one of the following: 响应于对所述显示窗口执行的尺寸调整操作,获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整;In response to a size adjustment operation performed on the display window, acquiring size parameters of the display window after the size adjustment, and adaptively adjusting the size of the elements included in the page data based on the size parameters; 响应于所述显示窗口所在的显示设备的分辨率变化,获取变化后的目标分辨率,并基于所述目标分辨率对所述页面数据中所包括的元素的尺寸进行适应性调整。In response to a change in the resolution of the display device where the display window is located, a changed target resolution is acquired, and sizes of elements included in the page data are adaptively adjusted based on the target resolution. 根据权利要求3所述的显示方法,其特征在于,响应于所述显示窗口所在的显示设备的分辨率变化,获取变化后的目标分辨率,包括:The display method according to claim 3, characterized in that, in response to a change in the resolution of the display device where the display window is located, obtaining the changed target resolution comprises: 响应于将所述显示窗口从第一显示屏移动到第二显示屏的拖拽操作,将所述第二显示屏的分辨率作为所述目标分辨率;In response to a drag operation of moving the display window from the first display screen to the second display screen, taking a resolution of the second display screen as the target resolution; 和/或,响应于对所述显示窗口所在的显示设备的分辨率的调整操作,将调整操作后的分辨率作为所述目标分辨率; and/or, in response to an adjustment operation on the resolution of the display device where the display window is located, using the resolution after the adjustment operation as the target resolution; 其中,所述第一显示屏的分辨率不同于第二显示屏的分辨率;和/或,所述第一显示屏的尺寸不同于所述第二显示屏的尺寸。The resolution of the first display screen is different from that of the second display screen; and/or the size of the first display screen is different from that of the second display screen. 根据权利要求3所述的显示方法,其特征在于,所述基于所述目标分辨率对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:The display method according to claim 3, characterized in that the adaptively adjusting the size of the elements included in the page data based on the target resolution comprises: 基于所述目标分辨率和所述页面数据对应的预设分辨率,确定第一调整参数;其中,所述第一调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;Determine a first adjustment parameter based on the target resolution and a preset resolution corresponding to the page data; wherein the first adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction; 基于所述第一调整参数,对所述页面数据所包括的元素的尺寸进行调整。Based on the first adjustment parameter, the size of the element included in the page data is adjusted. 根据权利要求3所述的显示方法,其特征在于,所述响应于对所述显示窗口执行的尺寸调整操作,获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:The display method according to claim 3, characterized in that, in response to the size adjustment operation performed on the display window, obtaining the size parameters of the display window after the size adjustment, and adaptively adjusting the size of the elements included in the page data based on the size parameters, comprises: 确定所述尺寸调整操作前所述显示窗口的可视区域的第一尺寸,以及所述尺寸调整操作后的显示窗口的第二尺寸;Determining a first size of a visible area of the display window before the size adjustment operation, and a second size of the display window after the size adjustment operation; 基于所述第一尺寸和所述第二尺寸,确定所述尺寸参数;Determining the size parameter based on the first size and the second size; 基于所述尺寸参数,对所述调整后的页面数据中所包括的元素的尺寸进行适应性调整。Based on the size parameter, the size of the element included in the adjusted page data is adaptively adjusted. 根据权利要求3所述的显示方法,其特征在于,所述获取所述尺寸调整后的显示窗口的尺寸参数,并基于所述尺寸参数对所述页面数据中所包括的元素的尺寸进行适应性调整,包括:The display method according to claim 3, characterized in that the acquiring the size parameters of the display window after the size adjustment and adaptively adjusting the size of the elements included in the page data based on the size parameters comprises: 获取所述尺寸调整操作后所述显示窗口的可视区域的第二尺寸,以及所述显示窗口所在显示设备的当前分辨率;Acquire a second size of the visible area of the display window after the size adjustment operation, and a current resolution of the display device where the display window is located; 基于所述当前分辨率以及所述页面数据的预设分辨率,确定初步比例;Determining a preliminary ratio based on the current resolution and a preset resolution of the page data; 基于所述初步比例和所述第二尺寸,对所述页面数据中所包括的元素的尺寸进行适应性调整。Based on the preliminary ratio and the second size, the size of the element included in the page data is adaptively adjusted. 根据权利要求2所述的显示方法,其特征在于,所述页面数据中的同一元素在变化前的显示窗口中的尺寸,与在变化后的显示窗口中的尺寸之间具有第一比例;The display method according to claim 2, characterized in that the size of the same element in the page data in the display window before the change and the size in the display window after the change have a first ratio; 所述变化前的显示窗口的可视区域与所述变化后的显示窗口的可视区域 之间具有第二比例;The visible area of the display window before the change and the visible area of the display window after the change There is a second ratio between them; 其中,所述第一比例与所述第二比例线性相关。The first ratio is linearly correlated with the second ratio. 根据权利要求2所述的显示方法,其特征在于,所述适应性调整,包括:对所述元素在第一方向上的尺寸的调整;和/或,对所述元素在第二方向上的尺寸的调整;其中,所述第一方向为所述显示窗口的高度方向或宽度方向,所述第一方向垂直于所述第二方向。The display method according to claim 2 is characterized in that the adaptive adjustment includes: adjusting the size of the element in a first direction; and/or adjusting the size of the element in a second direction; wherein the first direction is the height direction or the width direction of the display window, and the first direction is perpendicular to the second direction. 根据权利要求1所述的显示方法,其特征在于,所述响应于对页面数据的显示触发,基于显示窗口的可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整,包括:The display method according to claim 1, characterized in that, in response to the display trigger of the page data, adjusting the size of the elements included in the page data based on the size of the visible area of the display window, comprises: 响应于对页面数据的显示触发,获取所述显示窗口所在的显示设备的当前分辨率;In response to a display trigger of the page data, obtaining a current resolution of the display device where the display window is located; 基于所述当前分辨率和所述页面数据对应的预设分辨率,对所述页面数据所包括的元素的尺寸进行调整。Based on the current resolution and a preset resolution corresponding to the page data, sizes of elements included in the page data are adjusted. 根据权利要求10所述的显示方法,其特征在于,所述基于所述当前分辨率和所述页面数据对应的预设分辨率,对所述页面数据所包括的元素的尺寸进行调整,包括:The display method according to claim 10, characterized in that the adjusting the size of the elements included in the page data based on the current resolution and the preset resolution corresponding to the page data comprises: 基于所述预设分辨率,确定所述页面数据的第一尺寸比例;Based on the preset resolution, determining a first size ratio of the page data; 基于所述当前分辨率,确定所述显示窗口的第二尺寸比例;Based on the current resolution, determining a second size ratio of the display window; 基于所述第一尺寸比例和所述第二尺寸比例,确定第二调整参数;其中,所述第二调整参数包括在高度方向的缩放比例和在宽度方向的缩放比例;Determining a second adjustment parameter based on the first size ratio and the second size ratio; wherein the second adjustment parameter includes a scaling ratio in a height direction and a scaling ratio in a width direction; 基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整。Based on the second adjustment parameter, the size of the element included in the page data is adjusted. 根据权利要求10所述的显示方法,其特征在于,所述基于所述第二调整参数,对所述页面数据中所包括的元素的尺寸进行调整,包括:The display method according to claim 10, wherein adjusting the size of the element included in the page data based on the second adjustment parameter comprises: 将所述第二调整参数映射到缩放函数scale方法中,作为scale方法中的缩放参数;Mapping the second adjustment parameter to a scaling function scale method as a scaling parameter in the scale method; 基于所述scale方法中的缩放参数,调用transform方法对所述页面数据中所包括的元素的尺寸进行调整。Based on the scaling parameters in the scale method, the transform method is called to adjust the size of the elements included in the page data. 根据权利要求1-10任一所述的显示方法,其特征在于,所述显示窗 口包括多个子显示区域,不同的子显示区域位于不同的显示设备中;所述基于待显示所述页面数据的显示窗口,对所述页面数据所包括的元素的尺寸进行调整,包括:The display method according to any one of claims 1 to 10, characterized in that the display window The interface comprises a plurality of sub-display areas, and different sub-display areas are located in different display devices; and the size of the elements included in the page data is adjusted based on the display window to display the page data, including: 响应于对所述页面数据的显示触发,基于多个所述显示设备各自对应的屏幕分辨率,确定所述显示窗口的窗口分辨率;In response to a display trigger of the page data, determining a window resolution of the display window based on screen resolutions corresponding to each of the plurality of display devices; 基于所述窗口分辨率和所述页面数据的预设分辨率,对所述页面数据中的元素的尺寸进行调整。Based on the window resolution and a preset resolution of the page data, the size of the element in the page data is adjusted. 根据权利要求1-10任一所述的显示方法,其特征在于,对所述页面数据中所包括的元素的尺寸进行调整,包括:对所述页面数据中所包括的每个元素进行缩放。The display method according to any one of claims 1-10 is characterized in that adjusting the size of the elements included in the page data comprises: scaling each element included in the page data. 一种自适应可视区域的显示系统,其特征在于,包括;A display system with an adaptive visual area, characterized by comprising: 内容提供端,用于提供页面数据;Content provider, used to provide page data; 显示模块,用于基于所述页面数据,执行权利要求1-14任一所述的显示方法。A display module is used to execute the display method according to any one of claims 1 to 14 based on the page data. 根据权利要求15所述的显示系统,其特征在于,所述显示模块包括响应单元和视图单元;其中:The display system according to claim 15, characterized in that the display module comprises a response unit and a view unit; wherein: 所述响应单元,用于基于显示窗口所在的显示设备的当前分辨率和所述页面数据的预设分辨率,确定对所述页面数据中的元素进行调整的第二调整参数;The response unit is used to determine a second adjustment parameter for adjusting an element in the page data based on a current resolution of a display device where the display window is located and a preset resolution of the page data; 所述视图单元,用于基于所述响应单元传输的所述第二调整参数,对所述页面数据所包括的元素的尺寸进行调整。The view unit is used to adjust the size of the element included in the page data based on the second adjustment parameter transmitted by the response unit. 根据权利要求15所述的显示系统,其特征在于,还包括:The display system according to claim 15, further comprising: 监听单元,用于监听所述显示窗口的变化,并在监听所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作;A monitoring unit, used for monitoring changes of the display window, and triggering the display module to perform an adaptive adjustment operation when changes of the display window are monitored; 其中,所述适应性调整操作包括:对所述页面数据中所包括的元素的尺寸进行适应性调整,并将适应性调整后的页面数据显示到变化后的显示窗口中。The adaptive adjustment operation includes: adaptively adjusting the size of the elements included in the page data, and displaying the adaptively adjusted page data in the changed display window. 根据权利要求17所述的显示系统,其特征在于,所述显示模块,还用于在执行所述适应性调整操作后,指示所述监听单元再次监听所述显示 窗口的变化,并在监听到所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作;The display system according to claim 17, characterized in that the display module is further used to instruct the monitoring unit to monitor the display again after performing the adaptive adjustment operation. When the display window is changed, the display module is triggered to perform an adaptive adjustment operation; 或者,or, 在所述监听单元触发所述显示模块执行所述适应性调整操作后的预设时长,再次监听所述显示窗口的变化,并在监听所述显示窗口发生变化时,触发所述显示模块执行适应性调整操作。After a preset time period after the monitoring unit triggers the display module to perform the adaptive adjustment operation, the display window changes are monitored again, and when the display window changes are monitored, the display module is triggered to perform the adaptive adjustment operation. 一种自适应可视区域的显示装置,其特征在于,所述方法包括:A display device with adaptive visible area, characterized in that the method comprises: 响应于对页面数据的显示触发,基于显示窗口中可视区域的尺寸,对所述页面数据所包括的元素的尺寸进行调整;其中,所述显示窗口用于显示所述页面数据;In response to a display trigger of the page data, adjusting the size of the elements included in the page data based on the size of the visible area in the display window; wherein the display window is used to display the page data; 将调整后的页面数据显示到所述显示窗口中;Displaying the adjusted page data in the display window; 其中,所述页面数据中的全部元素均位于所述显示窗口的可视区域中。Wherein, all elements in the page data are located in the visible area of the display window. 一种计算机可读存储介质,其特征在于,其存储的计算机程序使得处理器执行如权利要求1-14任一项所述的自适应可视区域的显示方法。 A computer-readable storage medium, characterized in that the computer program stored therein enables a processor to execute the display method of the adaptive visible area as described in any one of claims 1-14.
PCT/CN2024/099415 2023-07-25 2024-06-14 Self-adaptive visual area display method, apparatus and system, and medium WO2025020756A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310922858.2 2023-07-25
CN202310922858.2A CN116909505A (en) 2023-07-25 2023-07-25 Display method, device, system and medium of self-adaptive visual area

Publications (1)

Publication Number Publication Date
WO2025020756A1 true WO2025020756A1 (en) 2025-01-30

Family

ID=88364487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/099415 WO2025020756A1 (en) 2023-07-25 2024-06-14 Self-adaptive visual area display method, apparatus and system, and medium

Country Status (2)

Country Link
CN (1) CN116909505A (en)
WO (1) WO2025020756A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909505A (en) * 2023-07-25 2023-10-20 京东方科技集团股份有限公司 Display method, device, system and medium of self-adaptive visual area
CN118484610A (en) * 2024-07-15 2024-08-13 深圳洽客科技有限公司 Webpage self-adaptive typesetting method, typesetting device and computer equipment
CN118760411B (en) * 2024-09-04 2024-12-06 深圳市智联九九通讯技术有限公司 Smart tablet screen expansion method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021232961A1 (en) * 2020-05-18 2021-11-25 Oppo广东移动通信有限公司 Display control method and apparatus, storage medium, and electronic device
CN113867868A (en) * 2021-09-29 2021-12-31 北京达佳互联信息技术有限公司 Display parameter determination method, device and storage medium
CN114281445A (en) * 2021-11-26 2022-04-05 华能酒泉风电有限责任公司 Page display method and device, electronic equipment and storage medium
WO2023029171A1 (en) * 2021-09-06 2023-03-09 掌阅科技股份有限公司 Page layout adaptive adjustment method, and computing device
CN115774510A (en) * 2022-11-29 2023-03-10 深圳供电局有限公司 Resolution adaptation method, device, computer equipment and storage medium
CN116909505A (en) * 2023-07-25 2023-10-20 京东方科技集团股份有限公司 Display method, device, system and medium of self-adaptive visual area

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021232961A1 (en) * 2020-05-18 2021-11-25 Oppo广东移动通信有限公司 Display control method and apparatus, storage medium, and electronic device
WO2023029171A1 (en) * 2021-09-06 2023-03-09 掌阅科技股份有限公司 Page layout adaptive adjustment method, and computing device
CN113867868A (en) * 2021-09-29 2021-12-31 北京达佳互联信息技术有限公司 Display parameter determination method, device and storage medium
CN114281445A (en) * 2021-11-26 2022-04-05 华能酒泉风电有限责任公司 Page display method and device, electronic equipment and storage medium
CN115774510A (en) * 2022-11-29 2023-03-10 深圳供电局有限公司 Resolution adaptation method, device, computer equipment and storage medium
CN116909505A (en) * 2023-07-25 2023-10-20 京东方科技集团股份有限公司 Display method, device, system and medium of self-adaptive visual area

Also Published As

Publication number Publication date
CN116909505A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US10949491B2 (en) Method and apparatus for using proxies to interact with webpage analytics
US11379108B2 (en) Display controlling method, terminal, information processing apparatus, and storage medium
US9600595B2 (en) Modification of windows across multiple displays
US9360988B2 (en) Browsing and quality of service features
WO2025020756A1 (en) Self-adaptive visual area display method, apparatus and system, and medium
US8448074B2 (en) Method and apparatus for providing portioned web pages in a graphical user interface
CN106156066B (en) Page switching method, device and client
US20170220220A1 (en) Advertisement generation apparatus and terminal device
US9563327B1 (en) Intelligent adjustment of graphical user interfaces
CN103678646A (en) Method and device for presenting pages
US20110016386A1 (en) Information processing device which controls display of summaries and previews of content of columns in web content depending on display area sizes, and recording medium which records control program thereof
JP5482842B2 (en) Information processing apparatus and control program thereof
CN102117290A (en) Method and system used for showing page elements in webpage
JP2004513434A (en) Display method and device
JP2007233659A (en) Information distribution system for network service
CN108319683A (en) Webpage display process, device and terminal
WO2014067442A1 (en) Page browsing method and browser
JP2019008668A (en) Client device, image processing system, image display method, and program
JP2021512415A (en) Backdrop rendering of digital components
US11113455B2 (en) Web page rendering on wireless devices
CN117725332A (en) Web page layout self-adaption method, system, equipment and storage medium
US20140359405A1 (en) Method and device of displaying images in text information
US20140129927A1 (en) Page browsing method and browser
JP2006018631A (en) Web document browsing apparatus and method
WO2016107871A1 (en) Adaptive method for device independent web page presentation