CN112395033A - Webpage self-adaption method and related product - Google Patents

Webpage self-adaption method and related product Download PDF

Info

Publication number
CN112395033A
CN112395033A CN202011292323.4A CN202011292323A CN112395033A CN 112395033 A CN112395033 A CN 112395033A CN 202011292323 A CN202011292323 A CN 202011292323A CN 112395033 A CN112395033 A CN 112395033A
Authority
CN
China
Prior art keywords
module
size
determining
page content
screen
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011292323.4A
Other languages
Chinese (zh)
Inventor
童洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202011292323.4A priority Critical patent/CN112395033A/en
Publication of CN112395033A publication Critical patent/CN112395033A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The embodiment of the application provides a webpage self-adaption method and a related product, wherein the method comprises the following steps: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the method comprises the steps that the electronic equipment obtains at least one element module in first page content to be displayed, and determines the module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the fact that whether repeatability exists between the element attributes of a current module and the element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to screen information and the module characteristics of each element module, and the adjusted first page content is displayed; therefore, the method is beneficial to meeting diversified webpage self-adaption requirements in the using process of a user, and is further beneficial to improving the efficiency and convenience of webpage self-adaption.

Description

Webpage self-adaption method and related product
Technical Field
The application relates to the technical field of electronic equipment, in particular to a webpage self-adaption method and a related product.
Background
Various webpage elements such as pictures, videos, texts and the like are usually arranged in the webpage, the webpage elements are zoomed according to the same webpage display scale along with the zooming of the webpage, and the zooming process is the self-adaption of the webpage; however, when the web page element has a certain specific attribute, such as a frame, the frame of the web page element cannot be scaled according to the same web page display scale along with the scaling of the web page, and some attributes of the web page element cannot be scaled any more after being scaled to a certain degree, such as a picture frame. At present, the adaptive adaptation mode of the web page is mainly percentage, when the web page is zoomed, because the web page is zoomed according to the display scale of the web page, and the frame is not zoomed along with the zooming of the web page, the width of a parent container required by a row where the frame which is not zoomed is larger than the actual width of the parent container, and in this case, the web page element at the rightmost side of the row can move to the next row. This causes a change in the layout of the web page, which makes the web page not normally displayed, and therefore the adaptation cannot use elements having absolute widths.
The self-adaption of the webpage plays a very important role in a management system, and can provide good visual experience and operation experience for users. At present, the webpage self-adaptive scheme on the market cannot take care of the hobbies and the use habits of more users.
Disclosure of Invention
The embodiment of the application provides a webpage self-adaption method and a related product, and aims to improve the efficiency and convenience of webpage self-adaption.
In a first aspect, an embodiment of the present application provides a web page adaptive method, where the method includes:
acquiring screen information currently displayed by a screen;
the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the element attributes used for representing whether repeatability exists between the element attributes of a current module and the element attributes of other modules;
and according to the screen information and the module characteristics of each element module, performing self-adaptive adjustment on the first page content, and displaying the adjusted first page content.
In a second aspect, an embodiment of the present application provides a web page adaptation apparatus, which includes a processing unit, a communication unit, and a storage unit, wherein,
the processing unit is used for acquiring the screen information currently displayed by the screen; the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the fact that whether repeatability exists between element attributes of a current module and element attributes of other modules or not; and the display module is used for adaptively adjusting the first page content according to the screen information and the module characteristics of each element module and displaying the adjusted first page content.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods in the second aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in any one of the methods of the second aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic flowchart of a web page adaptive method according to an embodiment of the present disclosure;
fig. 1B is a scene schematic diagram of a web page adaptive method according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of another webpage adaptation method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another webpage adaptation method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a block diagram illustrating functional units of a web page adaptation apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The following describes embodiments of the present application in detail.
Referring to fig. 1A, fig. 1A is a schematic flowchart of a web page adaptive method according to an embodiment of the present application, where the method includes:
s101, the electronic equipment acquires screen information currently displayed on a screen;
wherein the screen information includes a screen size and a screen resolution.
The method comprises the steps that the screen information currently displayed on the screen is acquired, and the screen information is adjusted according to the request, wherein the electronic equipment receives the request of selecting and displaying other sizes by a user.
S102, the electronic equipment acquires at least one element module in first page content to be displayed and determines module characteristics of each element module in the at least one element module;
wherein the element module comprises at least one element, and each element corresponds to an element attribute.
Wherein the module characteristics comprise the existence of repeatability between the element attribute of the current module and the element attributes of other modules.
Wherein the module features include repeatability features and independence features.
Wherein, the repetitive characteristics comprise characters with consistent format and pictures with consistent size.
Wherein the independence feature includes a unique character, a picture, a search box, and the like.
S103, the electronic equipment performs self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content.
Wherein the adaptive adjustment comprises a size rendering of each of the elements based on a percentage mode.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
In one possible example, the electronic device obtaining at least one element module in the first page content to be displayed and determining a module characteristic of each element module of the at least one element module includes: the method comprises the steps that the electronic equipment obtains each element in first page content to be displayed and the element position corresponding to each element; the electronic equipment identifies and classifies each element according to the element position, and determines an element module corresponding to each element; and the electronic equipment determines the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module.
The electronic equipment identifies and classifies each element according to the element position, and determining the element module corresponding to each element comprises determining the element positioned in a first area as a first element module and determining the element positioned in a second area as a second element module according to the element position.
Specifically, the determining of the module feature corresponding to each element module includes that the first element module includes an element J, an element K, and an element L located in the first region, and if the element attributes of the element J, the element K, and the element L are the same, the module feature of the first element module is determined to be a repetitive feature.
In specific implementation, the electronic device acquires each element Z1, Z2, Z3 and Z4 in the first page content to be displayed, and an element position P1, P2, P3 and P4 corresponding to each element; the electronic equipment identifies and classifies each element according to the element position, and determines that an element module corresponding to the element Z1 and the element Z2 is a module 1 and an element module corresponding to the element Z3 and the element Z4 is a module 2; and the electronic equipment determines the module characteristic corresponding to the module 1 as a repeatability characteristic and the module characteristic corresponding to the module 2 as an independence characteristic according to the element attribute corresponding to each element contained in the element module.
As can be seen, in this example, the electronic device obtains each element in the first page content to be displayed and an element position corresponding to each element, then the electronic device performs recognition and classification on each element according to the element position to determine an element module corresponding to each element, and finally the electronic device determines a module feature corresponding to each element module according to an element attribute corresponding to each element included in the element module; the module to which the corresponding element belongs is determined through the element position, and the module characteristic is determined according to the element attribute of the element in the module, so that the accuracy of module division is improved, and the accuracy and the convenience of the webpage self-adaption process are improved.
In one possible example, the electronic device adaptively adjusts the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content, including: the electronic equipment determines that the module features comprise repeatability features, and obtains a preset module size of the element module as a first preset size; the electronic equipment acquires the screen size in the screen information and the static element size in the element module; the electronic equipment determines the size of a dynamic element according to the screen size and the first preset size; the electronic equipment determines at least one target module according to the static element size and the dynamic element size; and the electronic equipment displays the adjusted first page content according to the target module.
Wherein the first preset size comprises a size of the element module in the first page content to be displayed.
Wherein the static element size comprises element sizes of fixed parts in the element module, such as characters and pictures.
Wherein the dynamic element size comprises element sizes of variable parts in the element module, such as the size of a blank part and the size of a search box.
In a specific implementation, as shown in fig. 1B, the electronic device determines that the module features include a repetitive feature, obtains a preset module size of the element module as a first preset size, and obtains static elements including "dangerous seed selection", "insurance status", "recommendation making time", and "framework range", the electronic device obtains a screen size in the screen information and a static element size in the element module, and the electronic device calculates full screen percentages corresponding to different sizes according to the screen size and the first preset size:
Figure BDA0002784148670000061
according to the method, taking the width of one character as 20px as an example:
Figure BDA0002784148670000062
thereby defining the dynamic element size:
Figure BDA0002784148670000063
Figure BDA0002784148670000071
the electronic device may determine, based on the static element size and the dynamic element size, a target module: and the electronic equipment displays the adjusted first page content according to the target module. .
It can be seen that, in this example, the electronic device determines that the module feature includes a repetitive feature, obtains a preset module size of the element module as a first preset size, obtains a screen size in the screen information and a static element size in the element module, then determines a dynamic element size according to the screen size and the first preset size, determines at least one target module according to the static element size and the dynamic element size, and displays the adjusted first page content according to the target module; by the method, a plurality of element modules can share a set of universal design template, so that the method is beneficial to meeting diversified self-adaption requirements and saving development manpower and material resources, and is beneficial to improving the convenience of webpage self-adaption.
In one possible example, the electronic device determines a dynamic element size according to the screen size and the first preset size, including: the electronic equipment determines the percentage of the full screen according to the screen size and the first preset size; the electronic equipment determines a percentage definition class corresponding to the element module according to the full screen percentage and the static element size; the electronic device determines a dynamic element size in each of the element modules according to the percentage definition class adjustment.
Wherein said determining dynamic element sizes in each of said element modules based on said percentage definition class adjustment comprises obtaining different dynamic element sizes based on different percentages.
Wherein the dynamic element size is related to the static element size, the larger the static element size, the smaller the dynamic element size.
In a specific implementation, the electronic device determines a full screen percentage according to the screen size E and the first preset size F, then the electronic device determines a percentage definition class corresponding to the element module according to the full screen percentage and the static element size F1, and the electronic device adjusts and determines the dynamic element size F2 in each element module according to the percentage definition class.
In this example, the electronic device determines a full screen percentage according to the screen size and the first preset size, determines a percentage definition class corresponding to the element module according to the full screen percentage and the static element size, and adjusts and determines a dynamic element size in each element module according to the percentage definition class; the display effect of each element in different webpage self-adaptive modes is adjusted, and the efficiency of webpage self-adaptation is improved.
In one possible example, the electronic device adaptively adjusts the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content, including: the electronic equipment determines that the module features comprise independence features, and obtains that the preset module sizes corresponding to the element modules comprise a second preset size and a third preset size; the electronic equipment acquires the screen size in the screen information; the electronic equipment determines a conventional percentage according to the screen size, the second preset size and the third preset size; the electronic equipment determines a target module according to the conventional percentage and a preset module size corresponding to each element module in the at least one element module; and the electronic equipment displays the adjusted first page content according to the target module.
The obtaining of the preset module size corresponding to the element module includes a second preset size and a third preset size, and the preset module size corresponding to the first element module is the second preset module size, and the preset module size corresponding to the second element module is the third preset size.
And the second preset size and the third preset size are both smaller than the screen size.
In specific implementation, the electronic device determines that the module features include independence features, and obtains that the preset module size corresponding to the element module includes a second preset size r1 corresponding to an element module L1 and a third preset size r2 corresponding to an element module L2; the electronic equipment acquires the screen size in the screen information; the electronic equipment determines a conventional percentage according to the screen size r0, the second preset size r1 and the third preset size r2, then determines a target module according to the conventional percentage and a preset module size corresponding to each element module in the at least one element module, and finally the electronic equipment displays the adjusted first page content according to the target module.
As can be seen, in this example, the electronic device determines that the module features include an independence feature, obtains that the preset module sizes corresponding to the element modules include a second preset size and a third preset size, obtains the screen size in the screen information, then determines a conventional percentage according to the screen size, the second preset size, and the third preset size, then determines a target module according to the conventional percentage and the preset module size corresponding to each element module in the at least one element module, and finally displays the adjusted first page content according to the target module; by the method, the accuracy of webpage self-adaptation is improved.
In one possible example, the electronic device determines a regular percentage according to the screen size, the second preset size, and the third preset size, including: the electronic device determining a first percentage of the second preset size to the screen size; the electronic equipment determines a third target size according to the first percentage and the third preset size; if the electronic equipment detects that the third target size meets a first preset threshold, determining that the first percentage is a conventional percentage.
Wherein the first preset threshold includes that the sum of the third target size and the second preset size is smaller than or equal to the screen size.
In a specific implementation, the electronic device determines a first percentage 40% of the second preset size H2 to the screen size H1, the electronic device determines a third target size J3 according to the first percentage 40% and the third preset size H3; if the electronic device detects that the third target dimension J3 is smaller than H, the first percentage 40% is determined to be a normal percentage.
As can be seen, in this example, the electronic device determines a first percentage of the second preset size to the screen size; the electronic equipment determines a third target size according to the first percentage and the third preset size; if the electronic equipment detects that the third target size meets a first preset threshold, determining that the first percentage is a conventional percentage; the accuracy of webpage self-adaptation is improved.
In one possible example, the electronic device adaptively adjusts the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content, including: the electronic device determining that the module features include repetitive features and independent features; the electronic equipment determines a first side length of each element module in the at least one element module through a script language and a webpage modification style sheet in the first page content to be displayed; the electronic equipment determines a second side length of each element module according to the first side length; the electronic equipment determines a target module according to the first side length and the second side length; and the electronic equipment displays the adjusted first page content according to the target module.
In a specific implementation, the electronic device determines that the module features of the element module K1 include repetitive features, the module features of the element module K2 include independent features, the electronic device determines a first side length a1 of K1 and a first side length a2 of K2 through a script language and a web page modification style sheet in the first page content to be displayed, the electronic device determines a second side length b1 of K1 and a second side length b2 of K2 according to a1 and a2, then the electronic device determines an object module according to the first side length and the second side length, and the electronic device displays the adjusted first page content according to the object module.
It can be seen that, in this example, the electronic device determines that the module features include a repetitive feature and an independence feature, then the electronic device determines a first side length of each element module in the at least one element module through a scripting language and a webpage modification style sheet in the first page content to be displayed, the electronic device determines a second side length of each element module according to the first side length, the electronic device determines a target module according to the first side length and the second side length, and the electronic device displays the adjusted first page content according to the target module; by the method, different element modules are rendered in different sizes when the page to be displayed has various module characteristics, so that the uniformity of the page effect is improved, and the efficiency of webpage self-adaptation is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another adaptive method for web pages according to the embodiment of the present application, consistent with the embodiment shown in fig. 1A; as shown in the figure, the webpage self-adaptive method includes:
s201, the electronic equipment acquires screen information currently displayed on a screen;
s202, the electronic equipment acquires each element in the first page content to be displayed and the element position corresponding to each element;
s203, the electronic equipment identifies and classifies each element according to the element position, and determines an element module corresponding to each element;
s204, the electronic equipment determines the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module;
s205, the electronic equipment performs self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
In addition, the electronic equipment acquires each element in the first page content to be displayed and an element position corresponding to each element, then the electronic equipment identifies and classifies each element according to the element position to determine an element module corresponding to each element, and finally the electronic equipment determines module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module; the module to which the corresponding element belongs is determined through the element position, and the module characteristic is determined according to the element attribute of the element in the module, so that the accuracy of module division is improved, and the accuracy and the convenience of the webpage self-adaption process are improved.
Referring to fig. 3, in accordance with the embodiment shown in fig. 1A, fig. 3 is a schematic flowchart of another web page adaptive method provided in the present application; as shown in the figure, the webpage self-adaptive method includes:
s301, the electronic equipment acquires screen information currently displayed on a screen;
s302, the electronic equipment acquires each element in the first page content to be displayed and the element position corresponding to each element;
s303, the electronic equipment identifies and classifies each element according to the element position, and determines an element module corresponding to each element;
s304, the electronic equipment determines the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module;
s305, the electronic equipment determines that the module features comprise repeatability features, and obtains a preset module size of the element module as a first preset size;
s306, the electronic equipment acquires the screen size in the screen information and the static element size in the element module;
s307, the electronic equipment determines the size of the dynamic element according to the screen size and the first preset size;
s308, the electronic equipment determines at least one target module according to the static element size and the dynamic element size;
s309, the electronic equipment displays the adjusted first page content according to the target module.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
In addition, the electronic device determines that the module features include repetitive features, obtains a preset module size of the element module as a first preset size, obtains a screen size in the screen information and a static element size in the element module, then determines a dynamic element size according to the screen size and the first preset size, determines at least one target module according to the static element size and the dynamic element size, and displays the adjusted first page content according to the target module; by the method, a plurality of element modules can share a set of universal design template, so that the method is beneficial to meeting diversified self-adaption requirements and saving development manpower and material resources, and is beneficial to improving the convenience of webpage self-adaption.
Consistent with the embodiments shown in fig. 1A, fig. 2, and fig. 3, please refer to fig. 4, and fig. 4 is a schematic structural diagram of an electronic device 400 provided in an embodiment of the present application, as shown in the figure, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, where the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for performing the following steps;
acquiring screen information currently displayed by a screen;
the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the element attributes used for representing whether repeatability exists between the element attributes of a current module and the element attributes of other modules;
and according to the screen information and the module characteristics of each element module, performing self-adaptive adjustment on the first page content, and displaying the adjusted first page content.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
In one possible example, the obtaining at least one element module in the first page content to be displayed and determining a module characteristic of each element module in the at least one element module are specifically configured to perform the following operations: acquiring each element in first page content to be displayed and an element position corresponding to each element; according to the element positions, identifying and classifying each element, and determining an element module corresponding to each element; and determining the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module.
In a possible example, the adaptive adjustment is performed on the first page content according to the screen information and the module characteristics of each element module, and the adjusted first page content is displayed, where the instructions in the program are specifically configured to perform the following operations: determining that the module features comprise repeatability features, and acquiring a preset module size of the element module as a first preset size; acquiring the screen size in the screen information and the static element size in the element module; determining the size of a dynamic element according to the screen size and the first preset size; determining at least one target module according to the static element size and the dynamic element size; and displaying the adjusted first page content according to the target module.
In one possible example, the determining of the dynamic element size is performed according to the screen size and the first preset size, and the instructions in the program are specifically configured to: determining the percentage of the full screen according to the screen size and the first preset size; determining a percentage definition class corresponding to the element module according to the full screen percentage and the static element size; determining a dynamic element size in each of the element modules according to the percentage definition class adjustment.
In a possible example, the adaptive adjustment is performed on the first page content according to the screen information and the module characteristics of each element module, and the adjusted first page content is displayed, where the instructions in the program are specifically configured to perform the following operations: determining that the module features comprise independence features, and acquiring that the preset module sizes corresponding to the element modules comprise a second preset size and a third preset size; acquiring the screen size in the screen information; determining a conventional percentage according to the screen size, the second preset size and the third preset size; determining a target module according to the conventional percentage and a preset module size corresponding to each element module in the at least one element module; and displaying the adjusted first page content according to the target module.
In one possible example, the determining of the regular percentage is performed according to the screen size, the second preset size and the third preset size, and the instructions in the program are specifically configured to: determining a first percentage of the second preset size to the screen size; determining a third target size according to the first percentage and the third preset size; if the third target size is detected to meet a first preset threshold, determining that the first percentage is a normal percentage, wherein the first preset threshold comprises that the sum of the third target size and the second preset size is smaller than or equal to the screen size.
In one possible example, the method further includes adaptively adjusting the first page content according to the screen information and the module characteristics of each element module, and displaying the adjusted first page content, where the instructions in the program are specifically configured to perform the following operations: determining that the module features include repetitive features and independent features; determining a first side length of each element module in the at least one element module through a scripting language and a webpage modification style sheet in the first page content to be displayed; determining a second side length of each element module according to the first side length; determining a target module according to the first side length and the second side length; and displaying the adjusted first page content according to the target module.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 is a block diagram of functional units of a web page adaptation apparatus 500 according to an embodiment of the present application. The web page adaptation apparatus 500 is applied to an electronic device, and includes a processing unit 501, a communication unit 502, and a storage unit 503, wherein,
the processing unit 501 is configured to obtain screen information currently displayed on a screen; the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the fact that whether repeatability exists between element attributes of a current module and element attributes of other modules or not; and the display module is used for adaptively adjusting the first page content according to the screen information and the module characteristics of each element module and displaying the adjusted first page content.
It can be seen that, in the embodiments of the present application, a web page adaptation method and related products are provided, where the method includes: the method comprises the steps that the electronic equipment obtains screen information currently displayed on a screen; the electronic equipment acquires at least one element module in first page content to be displayed, and determines module characteristics of each element module in the at least one element module, wherein the module characteristics comprise that whether repeatability exists between element attributes of a current module and element attributes of other modules or not, then the electronic equipment carries out self-adaptive adjustment on the first page content according to the screen information and the module characteristics of each element module, and displays the adjusted first page content; therefore, through the method, a proper self-adaptive method can be selected according to the module characteristics of different element modules in the webpage self-adaptive process, and meanwhile, the method comprises a multi-mode webpage self-adaptive scheme, so that the diversified webpage self-adaptive requirements in the use process of a user can be met, the development cost of webpage self-adaptation can be reduced, and the high efficiency and convenience of webpage self-adaptation can be improved.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
In a possible example, the processing unit 501 is specifically configured to obtain at least one element module in the first page content to be displayed, and determine a module feature of each element module in the at least one element module, where: acquiring each element in first page content to be displayed and an element position corresponding to each element; according to the element positions, identifying and classifying each element, and determining an element module corresponding to each element; and determining the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module.
In a possible example, the processing unit 501 is specifically configured to adaptively adjust the first page content according to the screen information and the module characteristics of each element module, and display the adjusted first page content, and specifically: determining that the module features comprise repeatability features, and acquiring a preset module size of the element module as a first preset size; acquiring the screen size in the screen information and the static element size in the element module; determining the size of a dynamic element according to the screen size and the first preset size; determining at least one target module according to the static element size and the dynamic element size; and displaying the adjusted first page content according to the target module.
In a possible example, the determining a dynamic element size according to the screen size and the first preset size, and the processing unit 501 is specifically configured to: determining the percentage of the full screen according to the screen size and the first preset size; determining a percentage definition class corresponding to the element module according to the full screen percentage and the static element size; determining a dynamic element size in each of the element modules according to the percentage definition class adjustment.
In a possible example, the processing unit 501 is specifically configured to adaptively adjust the first page content according to the screen information and the module characteristics of each element module, and display the adjusted first page content, and specifically: determining that the module features comprise independence features, and acquiring that the preset module sizes corresponding to the element modules comprise a second preset size and a third preset size; acquiring the screen size in the screen information; determining a conventional percentage according to the screen size, the second preset size and the third preset size; determining a target module according to the conventional percentage and a preset module size corresponding to each element module in the at least one element module; and displaying the adjusted first page content according to the target module.
In a possible example, the determining a regular percentage is performed according to the screen size, the second preset size, and the third preset size, and the processing unit 501 is specifically configured to: determining a first percentage of the second preset size to the screen size; determining a third target size according to the first percentage and the third preset size; if the third target size is detected to meet a first preset threshold, determining that the first percentage is a normal percentage, wherein the first preset threshold comprises that the sum of the third target size and the second preset size is smaller than or equal to the screen size.
In a possible example, the method further includes adaptively adjusting the first page content according to the screen information and the module characteristics of each element module, and displaying the adjusted first page content, where the processing unit 501 is specifically configured to: determining that the module features include repetitive features and independent features; determining a first side length of each element module in the at least one element module through a scripting language and a webpage modification style sheet in the first page content to be displayed; determining a second side length of each element module according to the first side length; determining a target module according to the first side length and the second side length; and displaying the adjusted first page content according to the target module.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A webpage self-adaptive method is characterized by being applied to electronic equipment; the method comprises the following steps:
acquiring screen information currently displayed by a screen;
the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the element attributes used for representing whether repeatability exists between the element attributes of a current module and the element attributes of other modules;
and according to the screen information and the module characteristics of each element module, performing self-adaptive adjustment on the first page content, and displaying the adjusted first page content.
2. The method of claim 1, wherein obtaining at least one element module in the first page content to be displayed and determining the module characteristics of each element module in the at least one element module comprises:
acquiring each element in first page content to be displayed and an element position corresponding to each element;
according to the element positions, identifying and classifying each element, and determining an element module corresponding to each element;
and determining the module characteristics corresponding to each element module according to the element attribute corresponding to each element contained in the element module.
3. The method according to claim 2, wherein the adaptively adjusting the first page content according to the screen information and the module characteristics of each element module and displaying the adjusted first page content comprises:
determining that the module features comprise repeatability features, and acquiring a preset module size of the element module as a first preset size;
acquiring the screen size in the screen information and the static element size in the element module;
determining the size of a dynamic element according to the screen size and the first preset size;
determining at least one target module according to the static element size and the dynamic element size;
and displaying the adjusted first page content according to the target module.
4. The method of claim 3, wherein determining a dynamic element size based on the screen size and the first preset size comprises:
determining the percentage of the full screen according to the screen size and the first preset size;
determining a percentage definition class corresponding to the element module according to the full screen percentage and the static element size;
determining a dynamic element size in each of the element modules according to the percentage definition class adjustment.
5. The method according to claim 2, wherein the adaptively adjusting the first page content according to the screen information and the module characteristics of each element module and displaying the adjusted first page content comprises:
determining that the module features comprise independence features, and acquiring that the preset module sizes corresponding to the element modules comprise a second preset size and a third preset size;
acquiring the screen size in the screen information;
determining a conventional percentage according to the screen size, the second preset size and the third preset size;
determining a target module according to the conventional percentage and a preset module size corresponding to each element module in the at least one element module;
and displaying the adjusted first page content according to the target module.
6. The method of claim 5, wherein determining a regular percentage according to the screen size, the second preset size, and the third preset size comprises:
determining a first percentage of the second preset size to the screen size;
determining a third target size according to the first percentage and the third preset size;
if the third target size is detected to meet a first preset threshold, determining that the first percentage is a normal percentage, wherein the first preset threshold comprises that the sum of the third target size and the second preset size is smaller than or equal to the screen size.
7. The method according to any one of claims 3 or 5, wherein the adapting the first page content according to the screen information and the module characteristics of each element module and displaying the adapted first page content, further comprises:
determining that the module features include repetitive features and independent features;
determining a first side length of each element module in the at least one element module through a scripting language and a webpage modification style sheet in the first page content to be displayed;
determining a second side length of each element module according to the first side length;
determining a target module according to the first side length and the second side length;
and displaying the adjusted first page content according to the target module.
8. A webpage self-adapting device is applied to electronic equipment; the web page adaptation apparatus includes a processing unit, a communication unit, and a storage unit, wherein,
the processing unit is used for acquiring the screen information currently displayed by the screen; the method comprises the steps of obtaining at least one element module in first page content to be displayed, and determining module characteristics of each element module in the at least one element module, wherein the module characteristics comprise the fact that whether repeatability exists between element attributes of a current module and element attributes of other modules or not; and the display module is used for adaptively adjusting the first page content according to the screen information and the module characteristics of each element module and displaying the adjusted first page content.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202011292323.4A 2020-11-18 2020-11-18 Webpage self-adaption method and related product Pending CN112395033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011292323.4A CN112395033A (en) 2020-11-18 2020-11-18 Webpage self-adaption method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011292323.4A CN112395033A (en) 2020-11-18 2020-11-18 Webpage self-adaption method and related product

Publications (1)

Publication Number Publication Date
CN112395033A true CN112395033A (en) 2021-02-23

Family

ID=74607328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011292323.4A Pending CN112395033A (en) 2020-11-18 2020-11-18 Webpage self-adaption method and related product

Country Status (1)

Country Link
CN (1) CN112395033A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199195A1 (en) * 2009-02-04 2010-08-05 Jataayu Software Limited Adaptive Rendering Of A Webpage On An Electronic Display Device
US20120144288A1 (en) * 2010-12-02 2012-06-07 International Business Machines Corporation Web page content display priority and bandwidth management
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN104978433A (en) * 2015-07-16 2015-10-14 无锡天脉聚源传媒科技有限公司 Web page display method and device
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
CN106484883A (en) * 2016-10-17 2017-03-08 北京邮电大学 webpage loading method and device
CN106648581A (en) * 2016-09-13 2017-05-10 百度在线网络技术(北京)有限公司 Page display method and apparatus
CN106716351A (en) * 2015-04-21 2017-05-24 广州市动景计算机科技有限公司 Method and electronic device for displaying web page
CN109144656A (en) * 2018-09-17 2019-01-04 广州视源电子科技股份有限公司 Method, apparatus, computer equipment and the storage medium of multielement layout
CN109558132A (en) * 2018-11-26 2019-04-02 上海景域文化传播股份有限公司 Full platform template system
CN109783181A (en) * 2019-01-31 2019-05-21 掌阅科技股份有限公司 Screen is adapted to display methods, electronic equipment and computer storage medium
CN110020291A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 The processing method and processing device of page layout
CN110532488A (en) * 2018-05-23 2019-12-03 腾讯科技(深圳)有限公司 Webpage rendering method, device and electronic equipment
CN110837617A (en) * 2019-10-11 2020-02-25 平安科技(深圳)有限公司 Webpage self-adaptive layout method, server and computer readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199195A1 (en) * 2009-02-04 2010-08-05 Jataayu Software Limited Adaptive Rendering Of A Webpage On An Electronic Display Device
US20120144288A1 (en) * 2010-12-02 2012-06-07 International Business Machines Corporation Web page content display priority and bandwidth management
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN106716351A (en) * 2015-04-21 2017-05-24 广州市动景计算机科技有限公司 Method and electronic device for displaying web page
CN104978433A (en) * 2015-07-16 2015-10-14 无锡天脉聚源传媒科技有限公司 Web page display method and device
CN106648581A (en) * 2016-09-13 2017-05-10 百度在线网络技术(北京)有限公司 Page display method and apparatus
CN106484883A (en) * 2016-10-17 2017-03-08 北京邮电大学 webpage loading method and device
CN110020291A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 The processing method and processing device of page layout
CN110532488A (en) * 2018-05-23 2019-12-03 腾讯科技(深圳)有限公司 Webpage rendering method, device and electronic equipment
CN109144656A (en) * 2018-09-17 2019-01-04 广州视源电子科技股份有限公司 Method, apparatus, computer equipment and the storage medium of multielement layout
CN109558132A (en) * 2018-11-26 2019-04-02 上海景域文化传播股份有限公司 Full platform template system
CN109783181A (en) * 2019-01-31 2019-05-21 掌阅科技股份有限公司 Screen is adapted to display methods, electronic equipment and computer storage medium
CN110837617A (en) * 2019-10-11 2020-02-25 平安科技(深圳)有限公司 Webpage self-adaptive layout method, server and computer readable storage medium

Similar Documents

Publication Publication Date Title
US9111007B2 (en) Adaptive rendering of a webpage on an electronic display device
US9886519B2 (en) Methods and systems for adjusting webpage layout
US9600595B2 (en) Modification of windows across multiple displays
US10339209B2 (en) Webpage display method and device
US20140250374A1 (en) Information processing apparatus, method, and program
US11455460B2 (en) Method for displaying handwritten note in electronic book, electronic device and computer storage medium
CN105528408A (en) Page display method and apparatus
KR20080114809A (en) Techniques for authoring ads for dynamic layout environments
EP3596647B1 (en) Digital component backdrop rendering
CN113190781A (en) Page layout method, device, equipment and storage medium
EP3256937A1 (en) Responsive course design system and method
KR100830369B1 (en) Method for Providng Advertisement and Program Recording Medium
CN105389308B (en) Webpage display processing method and device
CN111581570A (en) Page layout method and computing device
CN110728129A (en) Method, device, medium and equipment for typesetting text content in picture
CN113762235A (en) Method and device for detecting page overlapping area
CN113655999A (en) Rendering method, device and equipment of page control and storage medium
JP2011086050A (en) Information processing terminal and computer program
CN112395033A (en) Webpage self-adaption method and related product
JP6924544B2 (en) Cartoon data display system, method and program
CN112183019B (en) Display method, computing equipment and computer storage medium of electronic book handwritten notes
CN111208955A (en) Printing method, printing device and server
KR101430964B1 (en) Method for controlling display
US11526652B1 (en) Automated optimization of displayed electronic content imagery
CN113703699B (en) Real-time output method and device for electronic file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination