Component display method, device, electronic device and readable medium

By adjusting component positions on screens of different sizes, the problem of components being unable to click after size is scaled is solved, ensuring that the page is still operable on small screens.

CN114115643BActive Publication Date: 2024-11-12TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111388500.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2024-11-12
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

When displaying pages on screens of different sizes, certain components such as text and buttons may not be clicked or selected, affecting user operations.

Method used

By determining whether the page size of the current page is smaller than the preset page size, the components are displayed based on the size and position relationship of each component in the preset page, and the position of the target component in the overlapping area is calculated, and the target component is moved to a non-overlapping position to ensure that Component operability.

Benefits of technology

Even when pages designed from large screens are displayed on small screens, components can be avoided overlapping and obstructing each other, improving the accuracy of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115643B_ABST
    Figure CN114115643B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a component display method, device, equipment and computer-readable medium. The method includes: if it is determined that the page size of the current page is smaller than the page size of the preset page, displaying the components in the current page based on the size and position relationship of the components in the preset page; determining the component whose position needs to be adjusted as the target component; calculating the target position based on the position of the target component in the overlapping area; the overlapping area is the page area where at least two components in the current page have an overlapping relationship; and moving the target component to the target position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and more particularly to a component method, an apparatus, an electronic device, and a computer-readable medium. Background Art

[0002] In daily life, projects that use data visualization to build specific topics can be called data visualization projects. Data visualization projects involve a wide range of fields, for example, they can involve government, medical, education, industry, business and many other fields.

[0003] A component in a data visualization project can refer to the smallest unit in a page, that is, a controllable target. For example, charts, texts, shapes, input boxes, scroll bars, menus, etc. in a data visualization project are all defined in the form of components.

[0004] When displaying a page on screens of different sizes, the components in the page are usually scaled according to different sizes to adapt to the screens of different sizes.

[0005] However, if a component displayed on a large-size screen is scaled to a small-size screen, due to the reduction in the size of the component, some components such as some texts, buttons, etc., may not be clickable or selectable by the user, affecting the user's operation. Summary of the invention

[0006] In view of this, the embodiments of this specification provide a component method, apparatus, electronic device, and computer-readable medium to avoid affecting the user's operation of the components in the adapted page.

[0007] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0008] A component display method, comprising:

[0009] If it is determined that the page size of the current page is smaller than the page size of the preset page, displaying each component in the current page based on the size and position relationship of each component in the preset page;

[0010] Determine the component whose position needs to be adjusted as the target component;

[0011] Calculating the target position based on the position of the target component in the overlapping area; the overlapping area is a page area where at least two components in the current page have an overlapping relationship;

[0012] The target component is moved to the target location.

[0013] An embodiment of the present invention further provides a component display device, comprising:

[0014] A display module, configured to display each component in the current page based on the size and position relationship of each component in the preset page if it is determined that the page size of the current page is smaller than the page size of the preset page;

[0015] A determination module, used for determining a component whose position needs to be adjusted as a target component;

[0016] A calculation module, used for calculating the target position based on the position of the target component in the overlapping area; the overlapping area is a page area where at least two components in the current page have an overlapping relationship;

[0017] An adjustment module is used to move the target component to the target position.

[0018] An embodiment of the present invention further provides an electronic device, including:

[0019] at least one processor; and,

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0022] If it is determined that the page size of the current page is smaller than the page size of the preset page, displaying each component in the current page based on the size and position relationship of each component in the preset page;

[0023] Determine the component whose position needs to be adjusted as the target component;

[0024] Calculating the target position based on the position of the target component in the overlapping area; the overlapping area is a page area where at least two components in the current page have an overlapping relationship;

[0025] The target component is moved to the target location.

[0026] An embodiment of the present invention further provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the above-mentioned component display method.

[0027] One embodiment of the present specification can achieve at least the following beneficial effects: the embodiment of the present invention directly displays components with size and position relationship with preset pages, and at the same time moves components with overlapping relationship to target positions that do not have overlapping relationship with other components, so that even when a page designed on a large screen is displayed on a small screen, it will not affect the user's operation of the components. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1 A schematic flow chart of a component display method disclosed in an embodiment of the present invention is shown.

[0030] Figure 2 A schematic diagram of an interface before the embodiment of the present invention is adopted is shown.

[0031] Figure 3 A schematic diagram of an interface after the embodiment of the present invention is adopted in the embodiment of the present invention is shown.

[0032] Figure 4 The embodiments of this specification provide corresponding to Figure 1 A schematic structural diagram of a component display device;

[0033] Figure 5 The embodiments of this specification provide corresponding to Figure 4 A schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION

[0034] In electronic devices with screens of different sizes, the page displaying the same data visualization project needs to adjust the size and other properties of the components in the page. Usually, in a large-screen project, there may be hundreds or thousands of designed components. If the components in the page are edited and laid out on a larger device and displayed on a smaller screen, if proportional scaling is adopted, some components may not be operated by the user. Therefore, in an embodiment of the present invention, when the page edited and laid out for a larger device is displayed on a smaller device, the properties of the components designed based on the large device are directly displayed on the smaller device, and at the same time, the positions of the mobile components are calculated to avoid overlapping and blocking of the components. For example, when a page originally designed on a 13-inch display screen is displayed on a 9-inch display screen, the method in the embodiment of the present invention can be executed to avoid overlapping and blocking of the components while improving the accuracy of user operations. It should be noted that in the embodiment of the present invention, the screen size difference cannot be greater than the preset size, for example, it cannot exceed 6 inches, and the display method from an ultra-large screen such as a large screen in a square to a mobile terminal is not included in the scope of the embodiment of the present invention.

[0035] The embodiments of the present invention are described in detail below.

[0036] Figure 1It is a flowchart of a component display method disclosed in an embodiment of the present invention.

[0037] An embodiment of the present invention discloses a component display method, comprising:

[0038] S100: If it is determined that the page size of the current page is smaller than the page size of the preset page, display each component in the current page based on the size and position relationship of each component in the preset page.

[0039] In the embodiment of the present invention, if a page displayed on a large-screen electronic device is displayed on a small-screen electronic device, step 100 can be triggered. The relationship between the page size of the current page and the page size of the preset page can be determined to determine whether to perform the subsequent step of adjusting the component.

[0040] In the embodiment of the present invention, the page size of the current page may be determined by acquiring the size of the electronic device screen, and the page size of the preset page may be determined by a preset value in a preset page.

[0041] When it is determined that the page size of the current page is smaller than the page size of the preset page, that is, when switching from the large screen to the small screen to display the page of the data visualization project, the relevant properties of each component in the preset page, such as size and relative position relationship, are directly displayed in the current page, i.e., the display interface of the small-screen electronic device.

[0042] Different from the proportional scaling method in the prior art, the embodiment of the present invention can display various components in the current page based on the size and position relationship of the components of the preset page, so that the operable points can be easily operated by the user. Among them, the operable points refer to the position points in various components that can respond to user operations, such as text boxes, buttons, etc.

[0043] S200, determining the component whose position needs to be adjusted as the target component;

[0044] When it is determined that the size of the preset page is larger than the size of the current page, the position to which the target component is moved can be determined by calculation to avoid mutual overlap between components.

[0045] In step 200, a target component is determined, wherein the target component is a component whose position needs to be adjusted.

[0046] In the embodiment of the present invention, the component that needs to adjust the position may refer to a component that has an overlapping relationship with other components. The components that have an overlapping relationship may be two or more. Each component may include multiple operation points. Of course, the component here may also be a component group including multiple subcomponents. Each subcomponent also has an operation point and can also respond to user operations. That is, the component in the embodiment of the present invention may be an overall combination of multiple subcomponents.

[0047] In the embodiment of the present invention, a target component is determined. The target component may be a component with an overlapping relationship, a component with an important operation point, or a component with a specific identifier. The present invention preferably uses a component with an overlapping relationship as the target component for description.

[0048] The step of determining the component whose position needs to be adjusted as the target component specifically includes:

[0049] Determine whether there are components with overlapping relationships in the current page;

[0050] If so, at least one target component is determined from each set of components having overlapping relationships.

[0051] The step of determining at least one target component from each group of components having overlapping relationships specifically includes:

[0052] The component with the latest creation time in each group of overlapping components is taken as the target component;

[0053] Or, in each group of overlapping components, the one with the largest distance from the boundary of the current page is taken as the target component.

[0054] In the embodiment of the present invention, the target component may also be one of the overlapping components with a later creation time. According to the creation time, the original page style and design method may be kept as much as possible.

[0055] Of course, you can also use the one with the largest distance to the border of the current page as the target component. The border here refers to the border that the component is closest to. Using the one with the largest distance to the border among multiple components as the target component can reduce the moving distance and keep the original style and design aesthetics as much as possible.

[0056] S300, calculating a target position based on the position of the target component in an overlapping area; the overlapping area is a page area in which at least two components in the current page have an overlapping relationship.

[0057] In the embodiment of the present invention, the target component and other components may have an overlapping area, and the target position to which the target component is to be moved may be calculated based on the positional relationship between the target component and the overlapping area.

[0058] There are many algorithms for calculating the target position, and it is sufficient that the target component does not overlap with other components after it moves to the target position. The specific calculation method will be described in detail later.

[0059] The overlapped area and the position of the target component can be calculated by the coordinates of the target component in the page and the coordinates of the component overlapping the target component in the page. Whether there is an overlapped area can be determined by whether the coordinates of a corner of a component are within the coordinate area of ​​another component.

[0060] It is also possible to directly identify whether there is an overlapping area by the layer color of the component. For example, if the layer color of component A is red and the layer color of component B is yellow, the overlapping area is orange, and based on this, it is possible to directly determine which areas are overlapping areas. After obtaining the overlapping area, the specific coordinates of the overlapping area can be calculated based on the pixel size of the overlapping area and the coordinates of the target component.

[0061] It is understandable that the embodiment of the present invention may further set a specific area threshold, and when the pixel size of the overlapping area is smaller than the aforementioned area threshold, the component with the overlapping area may be excluded as a target component.

[0062] S400: Move the target component to the target position.

[0063] In the embodiment of the present invention, after the target position is determined, the target component will be moved to the target position so that there is no overlap between the components, so that the user can directly operate the operation point in the target component.

[0064] Of course, if the target position exceeds the boundary of the current page, which may be a boundary in any direction of up, down, left, or right, further adjustments should be made so that the target component does not overlap with other components.

[0065] After step 400, the method further includes:

[0066] If the target position exceeds the boundary of the current page, determining the adjustment direction based on the ratio of the first center point coordinates of the target component to the second center point coordinates of the overlapping area;

[0067] The position of the target component that exceeds the boundary of the current page is adjusted based on the adjustment direction so that the target component does not have an overlapping relationship with other components.

[0068] In the embodiment of the present invention, if the target position exceeds the boundary, further adjustment should be made so that the target component does not overlap with other components. The adjustment process may be the aforementioned steps 300 to 400.

[0069] It can be seen from the above embodiments that the embodiments of the present invention directly display components with size and position relationship with preset pages, and at the same time move components with overlapping relationship to target positions that do not have overlapping relationship with other components. Even when a page designed on a large screen is displayed on a small screen, it will not affect the user's operation of the components.

[0070] The above embodiments describe how to calculate the target position, and several calculation methods are described in detail below.

[0071] First, the calculation of the target position based on the position of the target component in the overlapping area specifically includes:

[0072] Determine the first center point coordinates of the target component and the second center point coordinates of the overlapping area;

[0073] Calculating a moving direction and a moving distance of the target component based on the first center point coordinates and the second center point coordinates;

[0074] The target position is calculated according to the moving direction and the moving distance.

[0075] In the embodiment of the present invention, the target position to which the target component needs to be moved can be determined according to the center point of the target component and the center point of the overlapping area.

[0076] The coordinates of the center point of the target component and the center point of the overlapping area can be calculated by the coordinates of the target component in the page. Usually, the component is a rectangle. If the overlapping area is other graphics, such as a circle, an ellipse, a diamond, or an irregular graphic, a point of the graphic can be used as the origin, and the center of gravity of the image can be calculated by a preset formula. The coordinates of the center of gravity are used as the coordinates of the center point of the image. The preset formula belongs to a conventional physical formula and is not described here.

[0077] In the embodiment of the present invention, after the coordinates of the first center point and the coordinates of the second center point are determined, the moving direction and moving distance of the component are calculated, and then the target position is calculated based on the moving direction and moving distance.

[0078] The moving direction may be calculated in the following manner.

[0079] Component overlap: Component A, component B, overlapping area C (hereinafter referred to as A, B, C). Then:

[0080] i. Calculate the horizontal and vertical displacement distances from the center point of A to the center point of C, and divide them by half of the width and height of A to obtain the horizontal and vertical offset ratios;

[0081] The formula is as follows (center point = center, horizontal distance = x, vertical distance = y, width = width, height = height).

[0082] ii. Horizontal ratio = (C.center.xA.center.x) / (A.width / 2); wherein C.center.x is used to characterize the horizontal distance of the overlapping area C, A.center.x is used to characterize the horizontal distance of component A, and A.width is used to characterize the width of component A.

[0083] iii. Vertical ratio = (C.center.yA.center.y) / (A.height / 2); wherein C.center.y is used to characterize the vertical distance of the overlapping area C, A.center.y is used to characterize the vertical distance of component A, and A.height is used to characterize the height of component A.

[0084] iv. The larger the absolute value (abs), the smaller the proportion of C's boundary movement from A, and vice versa.

[0085] v. If abs(horizontal ratio)>=abs(vertical ratio), B moves horizontally, otherwise B moves vertically. A positive value means B moves to the right and downward, and a negative value means B moves to the left and upward.

[0086] The second method of calculating the target position based on the position of the target component in the overlapping area specifically includes:

[0087] Determine the length and width of the overlapping area where the target component is located;

[0088] Calculate the shortest distance that the target component moves based on the length and the width;

[0089] The target position is calculated according to the shortest distance and the first center point coordinates of the target component.

[0090] In the embodiment of the present invention, the displacement distance may be calculated only based on the length and width of the overlapping area.

[0091] The target position may be calculated by taking the shorter distance between the length and the width as the displacement distance and determining the displacement direction based on the positional relationship between the first center point of the target component and the component overlapping the target component.

[0092] This method is preferably used in scenes where the overlapping area is a rectangle.

[0093] The third method of calculating the target position based on the position of the target component in the overlapping area specifically includes:

[0094] Determine the coordinates of a third center point of a component placement area that is shortest in distance from the coordinates of the first center point of the target component; the component placement area is used to represent an area in the current page where components can be configured;

[0095] The target position is calculated according to the third center point coordinates.

[0096] In an embodiment of the present invention, a component placement area can be pre-configured. When displayed on a small screen, the absolute coordinates of the placement area will not change. Therefore, the third center point with the shortest distance can be determined based on the distance between the first center point coordinates of the target component and the third center point coordinates of the component placement area, and the target position can be determined based on the third center point.

[0097] This method can reduce the amount of calculation, but may cause the moved positions to still have overlapping areas. It is suitable for scenes with sparsely arranged components.

[0098] Of course, other methods for calculating the target position can also be reasonably used based on the above methods in the present invention, and they cannot be listed exhaustively here, as long as the target position can be determined based on the target component and the overlapping area.

[0099] In the embodiment of the present invention, if there is still an overlapping area after the movement, further adjustment should be performed. Based on the above embodiment, the method further includes:

[0100] If it is determined that the moved target component has an overlapping relationship with other components, the attribute parameters of the moved target component are adjusted so that the moved target component does not have an overlapping relationship with other components.

[0101] In the embodiment of the present invention, the target component moved to the target position may be further adjusted according to the vertical ratio and the horizontal ratio mentioned in the above embodiment.

[0102] Specifically include:

[0103] i. If it exceeds the left or right boundary, move up or down according to the positive or negative vertical ratio.

[0104] ii. If it exceeds the upper and lower boundaries, move left or right according to the positive or negative horizontal ratio.

[0105] Of course, the location for further movement may also be determined based on the placement interval area in the remaining space.

[0106] It is understandable that the parameters such as the length, width and area of ​​the aforementioned placement interval area can be used as a basis for whether the target component can be moved to the area, and will not be elaborated here.

[0107] For ease of understanding, Figure 2A schematic diagram of an interface before the embodiment of the present invention is adopted is shown. Figure 3 A schematic diagram of an interface after the embodiment of the present invention is adopted in the embodiment of the present invention is shown.

[0108] Figure 2 , component 1 (201) and component 2 (202) have an overlapping relationship. Component 3 and component 4 have an overlapping relationship, component 5 and component 6 have an overlapping relationship, and component 7 and component 8 have an overlapping relationship. Interface 300 is the page content displayed by the current page. It can be understood that each component in interface 300 is the content displayed by the large-sized electronic device after being displayed by the small-sized electronic device. Each component is directly displayed according to the size and position relationship of the preset page without scaling.

[0109] pass Figure 3 It can be seen that through the embodiment of the present invention, the components with overlapping relationships have been automatically separated, and the positional relationship and layout between them have not changed significantly, the aesthetic design style of the project is still retained, the workload of designers is reduced, and the application of the project on different devices is expanded.

[0110] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 The embodiments of this specification provide corresponding to Figure 1 A schematic diagram of the structure of a project generation device. Figure 2 As shown, the device may include:

[0111] The display module 41 is used for displaying each component in the current page based on the size and position relationship of each component in the preset page if it is determined that the page size of the current page is smaller than the page size of the preset page;

[0112] A determination module 42, used to determine the component whose position needs to be adjusted as the target component;

[0113] A calculation module 43, configured to calculate a target position based on a position of the target component in an overlapping area; the overlapping area is a page area in which at least two components in the current page have an overlapping relationship;

[0114] The adjustment module 44 is used to move the target component to the target position.

[0115] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.

[0116] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0117] Figure 5 The embodiments of this specification provide corresponding to Figure 1 A schematic diagram of the structure of an electronic device. Figure 5 As shown, the electronic device 500 may include:

[0118] at least one processor 510; and,

[0119] A memory 530 in communication with the at least one processor; wherein,

[0120] The memory 530 stores instructions 520 executable by the at least one processor 510. The instructions are executed by the at least one processor 510 to enable the at least one processor 510 to:

[0121] If it is determined that the page size of the current page is smaller than the page size of the preset page, displaying each component in the current page based on the size and position relationship of each component in the preset page;

[0122] Determine the component whose position needs to be adjusted as the target component;

[0123] Calculating the target position based on the position of the target component in the overlapping area; the overlapping area is a page area where at least two components in the current page have an overlapping relationship;

[0124] The target component is moved to the target location.

[0125] Based on the same idea, the embodiment of this specification also provides a computer-readable medium corresponding to the above method. The computer-readable medium stores computer-readable instructions, which can be executed by a processor to implement the following method:

[0126] If it is determined that the page size of the current page is smaller than the page size of the preset page, displaying each component in the current page based on the size and position relationship of each component in the preset page;

[0127] Determine the component whose position needs to be adjusted as the target component;

[0128] Calculating the target position based on the position of the target component in the overlapping area; the overlapping area is a page area where at least two components in the current page have an overlapping relationship;

[0129] The target component is moved to the target location.

[0130] The above describes specific embodiments of the present specification. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0131] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other.

[0132] The devices, electronic devices and methods provided in the embodiments of this specification correspond to each other, and therefore, the devices and electronic devices also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices and equipment will not be repeated here.

[0133] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0134] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0136] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0137] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0142] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0145] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0146] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A component display method, characterized in that: include: When each component in the preset page is switched to the current page for display, if it is determined that the page size of the current page is smaller than the page size of the preset page, the each component is displayed in the current page based on the size and position relationship of the each component in the preset page; The preset page is a page in a large-screen electronic device, the current page is a page in a small-screen electronic device, the components are components whose layout has been edited in the preset page, and the difference between the page size of the preset page and the page size of the current page is less than or equal to the preset size; Determine the component whose position needs to be adjusted as the target component; Determine the first center point coordinates of the target component and the second center point coordinates of the overlapping area; calculate the moving direction and moving distance of the target component based on the first center point coordinates and the second center point coordinates; The target position is calculated according to the moving direction and the moving distance; the overlapping area is a page area where at least two components in the current page have an overlapping relationship; The target component is moved to the target location.

2. The method according to claim 1, characterized in that: The step of determining the component whose position needs to be adjusted as the target component specifically includes: Determine whether there are components with overlapping relationships in the current page; If so, at least one target component is determined from each set of components having overlapping relationships.

3. The method according to claim 2, characterized in that The step of determining at least one target component from each group of components having overlapping relationships specifically includes: The component with the latest creation time in each group of overlapping components is taken as the target component; Or, in each group of overlapping components, the one with the largest distance from the boundary of the current page is taken as the target component.

4. The method according to claim 1, characterized in that: The method further comprises: Determine the length and width of the overlapping area where the target component is located; Calculate the shortest distance that the target component moves based on the length and the width; The target position is calculated according to the shortest distance and the first center point coordinates of the target component.

5. The method according to claim 1, characterized in that The method further comprises: Determine the coordinates of a third center point of a component placement area that is shortest in distance from the coordinates of the first center point of the target component; the component placement area is used to represent an area in the current page where components can be configured; The target position is calculated according to the third center point coordinates.

6. The method according to claim 1, characterized in that The method further comprises: If it is determined that the moved target component has an overlapping relationship with other components, the attribute parameters of the moved target component are adjusted so that the moved target component does not have an overlapping relationship with other components.

7. The method according to claim 1, characterized in that The method further comprises: If the target position exceeds the boundary of the current page, determining the adjustment direction based on the ratio of the first center point coordinates of the target component to the second center point coordinates of the overlapping area; The position of the target component that exceeds the boundary of the current page is adjusted based on the adjustment direction so that the target component does not have an overlapping relationship with other components.

8. A component display device, characterized in that: include: A display module, configured to, when each component in a preset page is switched to a current page for display, display each component in the current page based on the size and position relationship of each component in the preset page if it is determined that the page size of the current page is smaller than the page size of the preset page; The preset page is a page in a large-screen electronic device, the current page is a page in a small-screen electronic device, the components are components whose layout has been edited in the preset page, and the difference between the page size of the preset page and the page size of the current page is less than or equal to the preset size; A determination module, used for determining a component whose position needs to be adjusted as a target component; A calculation module, used to determine the first center point coordinates of the target component and the second center point coordinates of the overlapping area; and calculate the moving direction and moving distance of the target component based on the first center point coordinates and the second center point coordinates; The target position is calculated according to the moving direction and the moving distance; the overlapping area is a page area where at least two components in the current page have an overlapping relationship; An adjustment module is used to move the target component to the target position.

9. An electronic device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: When each component in the preset page is switched to the current page for display, if it is determined that the page size of the current page is smaller than the page size of the preset page, the components are displayed in the current page based on the size and position relationship of each component in the preset page; the preset page is a page in a large-screen electronic device, the current page is a page in a small-screen electronic device, the components are components whose layout has been edited in the preset page, and the difference between the page size of the preset page and the page size of the current page is less than or equal to the preset size; Determine the component whose position needs to be adjusted as the target component; Determine the first center point coordinates of the target component and the second center point coordinates of the overlapping area; calculate the moving direction and moving distance of the target component based on the first center point coordinates and the second center point coordinates; calculate the target position according to the moving direction and the moving distance; the overlapping area is a page area in which at least two components in the current page have an overlapping relationship; The target component is moved to the target location. 10 . A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the component display method according to any one of claims 1 to 7.