CN112882775A - Method and device for self-adaptive adjustment of page template - Google Patents

Method and device for self-adaptive adjustment of page template Download PDF

Info

Publication number
CN112882775A
CN112882775A CN201911199830.0A CN201911199830A CN112882775A CN 112882775 A CN112882775 A CN 112882775A CN 201911199830 A CN201911199830 A CN 201911199830A CN 112882775 A CN112882775 A CN 112882775A
Authority
CN
China
Prior art keywords
elements
area
adjusting
height
region
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
CN201911199830.0A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911199830.0A priority Critical patent/CN112882775A/en
Publication of CN112882775A publication Critical patent/CN112882775A/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
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Abstract

The invention discloses a method and a device for self-adaptive adjustment of a page template, and relates to the technical field of computers. One embodiment of the method comprises: dividing the page template into areas, wherein each area comprises at least one element; for each area, when the position of the element is changed, the position of a first element with the changed position is compared with the positions of the rest elements contained in the area, and the position of the first element and a second element intersected with the first element is adjusted until the first element is not intersected with any rest element; taking the second element as an element with position change, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; and adjusting the height of the region according to the position information of the adjusted element, and performing template self-adaptive adjustment according to the height of the region. The embodiment is more convenient for the operation of the elements, and can adaptively adjust the positions of the elements on the page template.

Description

Method and device for self-adaptive adjustment of page template
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for self-adaptive adjustment of a page template.
Background
With the continuous development of computer technology, the continuous promotion of new internet technology and the addition of artificial intelligence, the artificial intelligence system of each business is also in the hundreds of flowers. Generally, when a business system is developed, an artificial intelligence system at the front end may include text, pictures, videos, various visual data, and the like, so that a user can better and more comprehensively know information desired by the user through the artificial intelligence system.
In the design process of the front-end page template, a designer can add elements on the drawing board by clicking or dragging and typeset the element contents on the drawing board. In the process of template design, a designer is required to manually adjust the element positions, and adaptive processing is not realized. Specifically, as shown in fig. 1, fig. 1 is a schematic diagram illustrating a processing manner when an element is added to a page in the prior art, wherein in a page template design process, for technical and performance reasons, when a designer clicks to add an element, the element appears in a fixed position. If the designer drags an element in the drawing board, the positions of other elements in the drawing board are generally not affected. In the dragging process, the element occlusion condition may occur, and a designer needs to manually adjust the element position to move the affected element. In the case of a large number of template elements, if positions are changed by dragging or the like of elements located at the front or upper positions, a designer needs to manually process a large number of elements located behind the template elements one by one, which results in a large amount of work.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
firstly, the method comprises the following steps: in the process of designing the template, when the elements are initially added, the element positions are fixed above, the elements are required to be moved every time the elements are newly added, and when the area is high and the content is more, the elements are required to be dragged down to the top of the page and further adjusted;
secondly, the method comprises the following steps: in the process of adjusting the positions of elements, if there are more elements below the elements, a designer needs to manually adjust the positions of all the shielded elements, each adjustment may affect the elements below, and thus the workload is large.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for adaptively adjusting a page template, which can implement that when moving a page element, only comparison with an element position in an area is needed, so that operation on the element is more convenient, and the element position on the page template can be adaptively adjusted without manually adjusting the element position, thereby saving a lot of labor and time costs.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for adaptively adjusting a page template is provided.
A method for self-adaptive adjustment of a page template comprises the following steps: dividing the page template into areas, wherein each area comprises at least one element; for each area, when the position of an element is changed, respectively comparing the position of a first element with the position of the remaining elements, except the first element, included in the area, and adjusting the position of the first element and a second element intersected with the first element until the first element is not intersected with any of the remaining elements; taking the second element as an element with changed position, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; and adjusting the height of the region according to the adjusted position information of the element, and performing template self-adaptive adjustment according to the height of the region.
Optionally, the position is adjusted to move a lower element of both the first element and the second element downward.
Optionally, the comparing the position of the first element with the position of the remaining elements included in the area except the first element includes: sorting the residual elements from top to bottom according to the position information; and respectively comparing the position of the first element with the position of the rest sorted elements.
Optionally, the adjusting the size of the region according to the adjusted position information of the element includes: acquiring height information of all elements included in the area; and determining the height of the area according to the adjusted position information of the element and the height information of the element.
According to another aspect of the embodiments of the present invention, an apparatus for adaptively adjusting a page template is provided.
An apparatus for adaptive adjustment of a page template, comprising: the region dividing module is used for carrying out region division on the page template, and each region comprises at least one element; the first adjusting module is used for comparing the positions of a first element subjected to position change with the positions of the rest elements except the first element in each area when the positions of the elements are changed, and adjusting the positions of the first element and a second element intersected with the first element until the first element is not intersected with any of the rest elements; a second adjusting module, configured to use the second element as an element with a changed position, and perform position adjustment on the element according to the method for performing position adjustment in the previous step until all elements included in the region are not intersected; and the region adjusting module is used for adjusting the height of the region according to the adjusted position information of the element and carrying out template self-adaptive adjustment according to the height of the region.
Optionally, the position is adjusted to move a lower element of both the first element and the second element downward.
Optionally, the first adjusting module is further configured to: sorting the residual elements from top to bottom according to the position information; and respectively comparing the position of the first element with the position of the rest sorted elements.
Optionally, the region adjusting module is further configured to: acquiring height information of all elements included in the area; and determining the height of the area according to the adjusted position information of the element and the height information of the element.
According to another aspect of the embodiment of the invention, an electronic device for adaptively adjusting a page template is provided.
An electronic device for adaptively adjusting a page template, comprising: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the method for adaptively adjusting the page template provided by the embodiment of the invention.
According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.
A computer readable medium, on which a computer program is stored, where the program, when executed by a processor, implements the method for adaptive adjustment of a page template provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of dividing a page template into areas, comparing the positions of a first element with the positions of the remaining elements, except the first element, in the areas when the positions of the elements are changed in each area, and adjusting the positions of the first element and a second element intersected with the first element until the first element is not intersected with any of the remaining elements; then, taking the second element as an element with position change, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; finally, the height of the area is adjusted according to the position information of the adjusted elements, and the template is adaptively adjusted according to the height of the area, so that the page elements are only required to be compared with the positions of the elements in the area when being moved, the elements are more convenient to operate, and the elements are not required to be selected by rolling to the top of the page even if the page template is very high; in addition, the method for adjusting the positions of the elements can be used for adaptively adjusting the positions of the elements on the page template, the positions of the elements do not need to be manually adjusted, and a large amount of labor and time cost is saved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a diagram illustrating a prior art manner of processing when an element is added to a page;
FIG. 2 is a schematic diagram of the main steps of a method for adaptive adjustment of a page template according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an implementation framework for one embodiment of the present invention;
FIG. 4 is a flow chart illustrating the implementation of the element location comparison process according to one embodiment of the present invention;
FIG. 5 is a schematic diagram of an implementation scenario of an embodiment of the present invention;
FIG. 6 is a schematic diagram of the main blocks of an apparatus for adaptive adjustment of a page template according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to solve the problems in the prior art, the invention provides a self-adaptive moving scheme in the element dragging process in the process of designing a webpage template by a designer. When initializing an add element, the default position is to the newly added element. In the process of dragging the elements by a designer, all elements below the dragged elements can be subjected to self-adaptive position movement, and the designer is not required to manually adjust the positions of the elements. Where a template refers to a fixed format of a mapping or design scheme, sometimes also referred to as a nucleotide sequence used to generate a complementary strand when DNA is replicated or transcribed. The template is a result of fixing and standardizing the structural rule of an object, and the template embodies the standardization of the structural form.
Fig. 2 is a schematic diagram of main steps of a method for adaptively adjusting a page template according to an embodiment of the present invention. As shown in fig. 2, the method for adaptively adjusting a page template according to the embodiment of the present invention mainly includes the following steps S201 to S204.
Step S201: dividing the page template into areas, wherein each area comprises at least one element;
step S202: for each area, when the position of the element is changed, respectively comparing the position of a first element with the position of the remaining elements, except the first element, included in the area, and adjusting the position of the first element and a second element intersected with the first element until the first element is not intersected with any of the remaining elements;
step S203: taking the second element as an element with position change, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected;
step S204: and adjusting the height of the region according to the position information of the adjusted element, and performing template self-adaptive adjustment according to the height of the region.
According to the technical scheme of the invention, the page template is divided into the areas, when the positions of the elements are changed subsequently, the elements in the areas can be compared only without paying attention to the elements in other areas, so that the elements are operated more conveniently, and the elements do not need to be scrolled to the top of the page to select the elements even if the page template is very high. Wherein the height of the area depends on the position information of the elements comprised by the area. The position information of an element can be generally represented by the coordinates of the top left corner of the element relative to the region and the height and width, and if the element is a non-square figure, the top left corner of the circumscribed square is used as the top left corner of the element. And obtaining the coordinates corresponding to 4 vertexes of the element according to the position information of the element, thereby obtaining the specific position of the element. Through the region division, the specific position information of the element in the page template does not need to be concerned, and only the position information of the element in the region is concerned, so that the element position is adjusted better and more intuitively.
FIG. 3 is a schematic diagram of an implementation framework for one embodiment of the present invention. As shown in fig. 3, according to the technical solution of the present invention, the element whose position is changed is compared with all other elements in the area, and the position of the element whose position is intersected is adjusted, so as to generate the final form of the template area. The most critical element position comparison scheme is shown in fig. 4.
According to an embodiment of the invention, the position is adjusted to move the lower element of both the first element and the second element downwards. If the first element and the second element are in the same position, the first element may be moved downward, or the second element may be moved downward, which may be flexibly set. In general, the second element is selected to be moved downward, because the first element is used as a judgment reference in the implementation process of the invention, and when the position of the first element is changed, the designer needs to place the first element at the corresponding position, and then the second element needs to be moved.
Fig. 4 is a flow chart illustrating the implementation of the element position comparison process according to an embodiment of the present invention. As shown in fig. 4, when a designer of a page template drags or otherwise operates a certain page element in a region to move an element, the moved element is a first element with a changed position, and the first element is compared with all other elements in the region. If the range of x-coordinates of the first element (x-coordinate of the top left vertex of the first element x-coordinate)1And the width w of the first element1Add (i.e.) to the range of x-coordinates of the compared element (i.e., the top left vertex x-coordinate of the compared element is added to the width w of the compared element) does not intersect (i.e.: x is the number of1+w1X is less than or equal to x or x + w is less than or equal to x1) Then a position comparison with the next element is made; otherwise, judging the first elementRange of y coordinates (top left vertex y coordinate of first element)1Height h from the first element1Add to) and the range of y coordinates of the compared element (the top left vertex y coordinate of the compared element is added to the height h of the compared element) if they do not intersect (i.e.: y is1+h1Y is not more than y or y + h is not more than y1) Then a position comparison with the next element is made; otherwise, if the range of the y coordinate of the first element is intersected with the range of the y coordinate of the compared element, the y coordinate of the top left vertex of the first element is y1The larger value of the y coordinate y of the top left vertex of the compared element needs to be moved downward until the range of the y coordinate of the first element does not intersect the range of the y coordinate of the compared element. Wherein the first element is moved down if necessary (i.e., y)1>y), then the top left vertex of the first element needs to be given the y coordinate y1Set to the sum of the y coordinate y of the top left vertex of the compared element and the height h of the compared element (i.e., y1Y + h); if necessary, the compared element is moved downward (i.e., y ≧ y)1) Then the y coordinate y of the top left vertex of the compared element needs to be set to the y coordinate y of the top left vertex of the first element1Height h from the first element1The sum of (i.e., y ═ y)1+h1). It should be noted that if the position interval between each element is preset, the position interval needs to be considered when determining whether the elements intersect with each other or calculating the y coordinate of the top left corner vertex of the element that needs to be moved.
If an element in the area is moved, the moved element to be compared is the second element, and the second element needs to be compared with other elements in the area in position like the first element until all elements in the area are not intersected with other elements.
According to another embodiment of the present invention, when the first element in which the position change occurs is compared in position with the remaining elements included in the area other than the first element, respectively, it is also possible to:
sorting the rest elements from top to bottom according to the position information;
and respectively comparing the position of the first element with the position of the rest elements after sorting.
According to the embodiment, the position comparison of the rest elements with the first element from top to bottom according to the position information can make the comparison process of the element positions simpler and more orderly. Thus, each remaining element only needs to be subjected to position comparison with the first element once, if the remaining element is located above the first element, the first element is moved downwards, and if the remaining element is located below the first element, the remaining element is moved downwards. And if the rest elements below the first element are compared firstly and moved once, when the comparison result is compared with the rest elements above the first element, the situation that the elements below the first element are judged again and moved downwards due to the downward movement of the first element is avoided, so that the comparison process of the element positions is more systematic and simple.
According to still another embodiment of the present invention, resizing the region according to the adjusted position information of the element includes:
acquiring height information of all elements included in the area;
and determining the height of the area according to the adjusted position information of the element and the height information of the element.
Because the position information of the element comprises the top left corner vertex coordinate, the height and the width information of the element relative to the area, the height information of the element can be obtained according to the adjusted position information of the element, then the y coordinate range of the element is obtained according to the adjusted top left corner vertex coordinate of the element and the height information of the element, and finally the y coordinate range of the area can be determined according to the y coordinate ranges of all the elements in the area, so that the height of the area is obtained. When element position adjustment and area height adjustment are performed, the distance between each element can be preset, and the height of the area can be obtained according to the position information of the elements and the distance between the elements. The specific implementation manner can be flexibly set according to needs, and the invention is not limited to this.
FIG. 5 is a schematic diagram of an implementation scenario of an embodiment of the present invention. As shown in fig. 5, there are 5 picture elements and 1 text element in the region, for a total of 6 elements. If the designer adjusts the position of the element picture 1 to move down by L, which is less than the height of the text element word 1, the picture 1 will be compared in position with the other 4 picture elements and 1 text element, respectively. According to the sequence of element positions from top to bottom, the picture 1 is compared with the picture 2 in position, and the picture 2 does not need to be moved because the picture 1 moves downwards and is not intersected with the picture 2; the picture 1 moves downwards to intersect with the text element character 1, and the character 1 moves downwards because the moving distance L is smaller than the height of the text element character 1 and the character 1 is below the picture 1; the picture 1 is not intersected with the pictures 3, 4 and 5, so that the pictures 3, 4 and 5 do not need to move, the position comparison of the picture 1 and the elements in the region is finished, and the position comparison in the first round is finished. At this time, since the text element character 1 is changed in position (moved downward) in the first round of position comparison, the text element character 1 is used as a reference for the second round of position comparison, and position comparison is performed with each of the 5 picture elements in the area. According to the sequence of element positions from top to bottom, the character 1 is compared with the picture 2 in position, and the two are not intersected so that element movement is not needed; then, the character 1 is compared with the picture 1 in position, and the character 1 and the picture 1 are not intersected so that element movement is not needed; then, the text 1 will be compared with the pictures 3, 4 and 5, at this time, since the y values of the coordinates of the upper left corners of the 3 elements of the pictures 3, 4 and 5 are the same, the comparison sequence of the pictures 3, 4 and 5 does not need to be judged, and the comparison can be performed in any sequence. Since the text 1 intersects with the pictures 3, 4 and 5, the pictures 3, 4 and 5 need to be moved downward until the text 1 does not intersect, and the second round of position comparison is finished. Since there are no other elements under pictures 3, 4 and 5, there is no need to perform a third round of position comparison.
After all elements are subjected to position comparison and movement, the height of the area can be determined according to the position information of the elements, the area can be automatically enlarged by setting the height of the area, and self-adaptive typesetting among the areas can be realized according to the height of the area, so that the purpose of self-adaptive adjustment of the page template is achieved.
Fig. 6 is a schematic diagram of main blocks of an apparatus for adaptively adjusting a page template according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for adaptively adjusting a page template according to an embodiment of the present invention mainly includes a region dividing module 601, a first adjusting module 602, a second adjusting module 603, and a region adjusting module 604.
The region dividing module 601 is configured to perform region division on the page template, where each region includes at least one element;
a first adjusting module 602, configured to, for each region, when an element position is changed, respectively perform position comparison on a first element with which the position is changed and remaining elements, except the first element, included in the region, and perform position adjustment on the first element and a second element intersecting the first element until the first element is not intersected with any of the remaining elements;
a second adjusting module 603, configured to use the second element as an element with a changed position, and perform position adjustment on the element according to the method for performing position adjustment in the previous step until all elements included in the region are not intersected;
and the area adjusting module 604 is configured to adjust the height of the area according to the adjusted position information of the element, and perform adaptive template adjustment according to the height of the area.
According to an embodiment of the present invention, the position adjustment is to move a lower element of both the first element and the second element downward.
According to an embodiment of the present invention, the first adjusting module 603 may further be configured to:
sorting the residual elements from top to bottom according to the position information;
and respectively comparing the position of the first element with the position of the rest sorted elements.
According to another embodiment of the present invention, the region adjusting module 604 may further be configured to:
acquiring height information of all elements included in the area;
and determining the height of the area according to the adjusted position information of the element and the height information of the element.
According to the technical scheme of the embodiment of the invention, the page template is divided into areas, then, for each area, when the position of an element is changed, the position of a first element which is changed is compared with the positions of the rest elements except the first element in the area, and the positions of the first element and a second element which is intersected with the first element are adjusted until the first element is not intersected with any rest element; then, taking the second element as an element with position change, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; finally, the height of the area is adjusted according to the position information of the adjusted elements, and the template is adaptively adjusted according to the height of the area, so that the page elements are only required to be compared with the positions of the elements in the area when being moved, the elements are more convenient to operate, and the elements are not required to be selected by rolling to the top of the page even if the page template is very high; in addition, the method for adjusting the positions of the elements can be used for adaptively adjusting the positions of the elements on the page template, the positions of the elements do not need to be manually adjusted, and a large amount of labor and time cost is saved.
Fig. 7 shows an exemplary system architecture 700 of a method for page template adaptation or a device for page template adaptation to which an embodiment of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for adaptively adjusting the page template provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the device for adaptively adjusting the page template is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device or server implementing an embodiment of the present invention. The terminal device or the server shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a region partitioning module, a first adjusting module, a second adjusting module, and a region adjusting module. The names of these units or modules do not in some cases constitute a limitation to the units or modules themselves, and for example, the area division module may also be described as a "module for area division of a page template".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: dividing the page template into areas, wherein each area comprises at least one element; for each area, when the position of an element is changed, respectively comparing the position of a first element with the position of the remaining elements, except the first element, included in the area, and adjusting the position of the first element and a second element intersected with the first element until the first element is not intersected with any of the remaining elements; taking the second element as an element with changed position, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; and adjusting the height of the region according to the adjusted position information of the element, and performing template self-adaptive adjustment according to the height of the region.
According to the technical scheme of the embodiment of the invention, the page template is divided into areas, then, for each area, when the position of an element is changed, the position of a first element which is changed is compared with the positions of the rest elements except the first element in the area, and the positions of the first element and a second element which is intersected with the first element are adjusted until the first element is not intersected with any rest element; then, taking the second element as an element with position change, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected; finally, the height of the area is adjusted according to the position information of the adjusted elements, and the template is adaptively adjusted according to the height of the area, so that the page elements are only required to be compared with the positions of the elements in the area when being moved, the elements are more convenient to operate, and the elements are not required to be selected by rolling to the top of the page even if the page template is very high; in addition, the method for adjusting the positions of the elements can be used for adaptively adjusting the positions of the elements on the page template, the positions of the elements do not need to be manually adjusted, and a large amount of labor and time cost is saved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for self-adaptive adjustment of a page template is characterized by comprising the following steps:
dividing the page template into areas, wherein each area comprises at least one element;
for each area, when the position of an element is changed, respectively comparing the position of a first element with the position of the remaining elements, except the first element, included in the area, and adjusting the position of the first element and a second element intersected with the first element until the first element is not intersected with any of the remaining elements;
taking the second element as an element with changed position, and adjusting the position of the element according to the method for adjusting the position in the previous step until all elements included in the area are not intersected;
and adjusting the height of the region according to the adjusted position information of the element, and performing template self-adaptive adjustment according to the height of the region.
2. The method of claim 1, wherein the position adjustment is to move a lower element of both the first element and the second element downward.
3. The method of claim 1, wherein comparing the position of the first element with the position of the remaining elements of the area other than the first element comprises:
sorting the residual elements from top to bottom according to the position information;
and respectively comparing the position of the first element with the position of the rest sorted elements.
4. The method of claim 1, wherein resizing the region according to the adjusted location information of the element comprises:
acquiring height information of all elements included in the area;
and determining the height of the area according to the adjusted position information of the element and the height information of the element.
5. A device for adaptively adjusting a page template is characterized by comprising:
the region dividing module is used for carrying out region division on the page template, and each region comprises at least one element;
the first adjusting module is used for comparing the positions of a first element subjected to position change with the positions of the rest elements except the first element in each area when the positions of the elements are changed, and adjusting the positions of the first element and a second element intersected with the first element until the first element is not intersected with any of the rest elements;
a second adjusting module, configured to use the second element as an element with a changed position, and perform position adjustment on the element according to the method for performing position adjustment in the previous step until all elements included in the region are not intersected;
and the region adjusting module is used for adjusting the height of the region according to the adjusted position information of the element and carrying out template self-adaptive adjustment according to the height of the region.
6. The apparatus of claim 5, wherein the position adjustment is to move a lower element of both the first element and the second element downward.
7. The apparatus of claim 5, wherein the first adjusting module is further configured to:
sorting the residual elements from top to bottom according to the position information;
and respectively comparing the position of the first element with the position of the rest sorted elements.
8. The apparatus of claim 5, wherein the zone adjustment module is further configured to:
acquiring height information of all elements included in the area;
and determining the height of the area according to the adjusted position information of the element and the height information of the element.
9. An electronic device for adaptively adjusting a page template, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201911199830.0A 2019-11-29 2019-11-29 Method and device for self-adaptive adjustment of page template Pending CN112882775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911199830.0A CN112882775A (en) 2019-11-29 2019-11-29 Method and device for self-adaptive adjustment of page template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911199830.0A CN112882775A (en) 2019-11-29 2019-11-29 Method and device for self-adaptive adjustment of page template

Publications (1)

Publication Number Publication Date
CN112882775A true CN112882775A (en) 2021-06-01

Family

ID=76038453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911199830.0A Pending CN112882775A (en) 2019-11-29 2019-11-29 Method and device for self-adaptive adjustment of page template

Country Status (1)

Country Link
CN (1) CN112882775A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590992A (en) * 2021-07-30 2021-11-02 咪咕数字传媒有限公司 Page display method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215965A1 (en) * 2007-02-23 2008-09-04 Tabblo, Inc. Method for modifying an initial layout of story elements in a user-generated online story
CN103838475A (en) * 2012-11-26 2014-06-04 腾讯科技(深圳)有限公司 Method and device for textbox input in webpage
CN105260351A (en) * 2015-09-10 2016-01-20 武汉改图网技术有限公司 Online self-service presswork design method based on self-adaptive template
CN106201494A (en) * 2016-06-30 2016-12-07 广州视睿电子科技有限公司 A kind of menu that suspends automatically move method and apparatus
CN106610824A (en) * 2015-10-23 2017-05-03 北京国双科技有限公司 Page height self-adaptation method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215965A1 (en) * 2007-02-23 2008-09-04 Tabblo, Inc. Method for modifying an initial layout of story elements in a user-generated online story
CN103838475A (en) * 2012-11-26 2014-06-04 腾讯科技(深圳)有限公司 Method and device for textbox input in webpage
CN105260351A (en) * 2015-09-10 2016-01-20 武汉改图网技术有限公司 Online self-service presswork design method based on self-adaptive template
CN106610824A (en) * 2015-10-23 2017-05-03 北京国双科技有限公司 Page height self-adaptation method and apparatus
CN106201494A (en) * 2016-06-30 2016-12-07 广州视睿电子科技有限公司 A kind of menu that suspends automatically move method and apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590992A (en) * 2021-07-30 2021-11-02 咪咕数字传媒有限公司 Page display method, device and equipment

Similar Documents

Publication Publication Date Title
CN110874251A (en) Method and device for realizing picture wooden barrel layout
CN112597126A (en) Data migration method and device
CN112783887A (en) Data processing method and device based on data warehouse
CN112882775A (en) Method and device for self-adaptive adjustment of page template
CN113282852A (en) Method and device for editing webpage
CN113778270A (en) Method and device for dragging icon
US10990256B2 (en) Modifying default display configurations for objects in a user interface
CN112905225A (en) Method and device for creating continuous integration tool construction task
CN112256254A (en) Method and device for generating layout code
CN112667368A (en) Task data processing method and device
CN110851522A (en) Method and device for displaying data
CN111222302A (en) Webpage rendering control method, control device and computer readable medium
CN111831179B (en) Signing method, device and computer readable medium
CN113626113B (en) Page rendering method and device
CN114036249A (en) Map data processing method, map data processing device, electronic equipment and medium
CN113760136A (en) Icon layout method and device
CN110908550B (en) Operation processing method and device in cursor hovering state
CN112925521A (en) Interface generation method and device
CN110895550B (en) Method and device for processing acquired data
CN113377380B (en) User interface component deployment method and device
CN111383293A (en) Image element vectorization method and device
CN113032696A (en) Display method and display device of page picture
CN113760344A (en) Dynamic configuration method, device, electronic equipment and storage medium
CN112183799A (en) Task allocation method and device for synthesizing task list
CN112507671B (en) Method, apparatus, and readable medium for adjusting text distance

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