Power emergency information system page module arrangement method and device and electronic equipment

By obtaining the total number of modules and layout parameters of the power emergency information system page, calculating the optimal value of the arrangement ratio coordination parameters, and combining the golden ratio to automatically arrange modules, the problem of lack of automated module arrangement in the existing technology is solved, and efficient and aesthetically pleasing module arrangement is achieved.

CN116225431BActive Publication Date: 2026-04-21GLOBAL ENERGY INTERCONNECTION RES INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The existing power emergency information system lacks an automated layout method for page modules, which requires manual intervention and testing when the display environment and the number of display modules change, making it impossible to achieve a reasonable layout.

Method used

By obtaining the total number of modules to be arranged and the preset values ​​of layout parameters, the optimal value of the arrangement ratio coordination parameters is calculated by cyclically adjusting the number of modules arranged on the short side of the page. Combined with the arrangement mode function, the arrangement position and spacing of the modules on the page are automatically determined. The golden ratio is used as the preset value of the layout parameters to improve the rationality and aesthetics of the arrangement.

Benefits of technology

The system has achieved automated layout of page modules in the power emergency information system, improving layout efficiency and aesthetics. It can automatically rearrange the layout when the total number of modules changes, reducing manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225431B_ABST
    Figure CN116225431B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for arranging page modules in a power emergency information system. The method includes: obtaining the total number of modules to be arranged within the power emergency information system page and preset layout parameters; adjusting the number of modules arranged on the short side of the page and iteratively calculating the value of a layout ratio coordination parameter to determine the optimal value of the layout ratio coordination parameter, wherein the value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset layout parameters, and the long-short side module layout ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; and arranging the modules to be arranged within the power emergency information system page according to the optimal value of the layout ratio coordination parameter, the corresponding number of modules arranged on the short side of the page, the number of modules arranged on the long side of the page, and a layout mode function. This invention solves the problem of the lack of an automated method for arranging page modules in power emergency information systems in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power emergency command information systems, and in particular to a method, apparatus, and electronic device for arranging page modules in a power emergency information system. Background Technology

[0002] With the advent of the era of big data on the internet, various information systems need to grasp and acquire increasingly more data. Current power emergency information systems lack practically usable methods for automatically arranging modules. When displaying massive amounts of data using multiple modules within a power emergency information system page, the number of modules arranged in rows and columns often needs to be pre-set. In such cases, when the display environment and the number of modules displayed change—that is, when the page length, width, or the number of modules to be displayed changes—manual intervention and testing are often required to redetermine the optimal arrangement of all modules on the page. Therefore, existing technologies suffer from a lack of automated module arrangement methods for power emergency information system pages. Summary of the Invention

[0003] This invention provides a method, apparatus, and electronic device for arranging page modules in a power emergency information system, to at least solve the problem of the lack of automated arrangement methods for page modules in power emergency information systems in related technologies.

[0004] According to a first aspect of the present invention, a method for arranging page modules in a power emergency information system is provided. The method includes: obtaining the total number of modules to be arranged within the power emergency information system page and preset values ​​of layout parameters; adjusting the number of modules arranged on the short side of the page and iteratively calculating the value of a layout ratio coordination parameter to determine an optimal value for the layout ratio coordination parameter, wherein the value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameters, and the long-short side module layout ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; and arranging the modules to be arranged within the power emergency information system page according to the optimal value of the layout ratio coordination parameter, the number of modules arranged on the short side of the page, the number of modules arranged on the long side of the page, and a layout mode function.

[0005] Optionally, adjusting the number of short-side layout modules on the page and iteratively calculating the value of the layout ratio coordination parameter to determine the optimal value of the layout ratio coordination parameter, wherein the value of the layout ratio coordination parameter is the absolute value of the difference between the long-short-side module layout ratio and the preset value of the layout parameter, and the long-short-side module layout ratio is determined by the number of short-side layout modules on the page and the total number of modules to be arranged, including: calculating the value of the layout ratio coordination parameter based on the initial value of the number of short-side layout modules on the page, wherein the initial value of the number of short-side layout modules on the page is 1, and it is incremented by 1 in each loop; calculating the value of the layout ratio coordination parameter in each loop based on the number of short-side layout modules on the page in each loop, and ending the loop when the number of short-side layout modules on the page is greater than half of the total number of modules to be arranged; selecting the value of the layout ratio coordination parameter closest to zero as the optimal value of the layout ratio coordination parameter.

[0006] Optionally, the step of arranging the modules to be arranged within the power emergency information system page according to the optimal value of the arrangement ratio coordination parameter, the number of modules arranged on the short side of the page, the number of modules arranged on the long side of the page, and the arrangement mode function includes: when the value of the arrangement mode function is 1, the number of rows of the modules to be arranged within the power emergency information system page is equal to the number of modules arranged on the short side of the page, and the number of columns of the modules to be arranged within the power emergency information system page is equal to the number of modules arranged on the long side of the page; when the value of the arrangement mode function is 2, the number of rows of the modules to be arranged within the power emergency information system page is equal to the number of modules arranged on the long side of the page, and the number of columns of the modules to be arranged within the power emergency information system page is equal to the number of modules arranged on the short side of the page.

[0007] Optionally, the method further includes: calculating a layout reference value based on the number of rows and columns of the modules to be arranged in the power emergency information system page; obtaining the length and width of the power emergency information system page; and calculating the length or width of the power emergency information system page after removing the borders based on the preset value of the layout parameters, the layout reference value, and the length or width of the power emergency information system page.

[0008] Optionally, the method further includes: calculating the left-right or top-bottom spacing between modules to be arranged based on preset layout parameters, arrangement reference values, and the length or width of the power emergency information system page; calculating the length of the modules to be arranged based on the number of columns when the modules are arranged in the power emergency information system page, the left-right spacing between the modules to be arranged, and the length of the power emergency information system page after removing the borders; and calculating the width of the modules to be arranged based on the number of rows when the modules are arranged in the power emergency information system page, the top-bottom spacing between the modules to be arranged, and the width of the power emergency information system page after removing the borders.

[0009] Optionally, the method further includes: calculating the coordinate values ​​of the modules to be arranged based on their length and width, as well as the left-right and top-bottom spacing between them; and visually displaying the modules to be arranged on the power emergency information system page.

[0010] Optionally, the golden ratio can be used as the preset value for the layout parameters.

[0011] According to a second aspect of the present invention, a power emergency information system page module layout device is also provided. The device includes: a first acquisition module, configured to acquire the total number of modules to be arranged in the power emergency information system page and a preset value of layout parameters; a determination module, configured to adjust the number of modules arranged on the short side of the page and iteratively calculate the value of a layout ratio coordination parameter to determine the optimal value of the layout ratio coordination parameter, wherein the value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameters, and the long-short side module layout ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; and a layout module, configured to arrange the modules to be arranged in the power emergency information system page according to the number of modules arranged on the short side of the page and the number of modules arranged on the long side of the page corresponding to the optimal value of the layout ratio coordination parameter and a layout mode function.

[0012] Optionally, the determining module includes: a first calculation unit, used to calculate the value of the layout ratio coordination parameter based on the initial value of the number of layout modules on the short side of the page, wherein the initial value of the number of layout modules on the short side of the page is 1, and increments by 1 in each loop; a second calculation unit, used to calculate the value of the layout ratio coordination parameter in each loop based on the number of layout modules on the short side of the page in each loop, and the loop ends when the number of layout modules on the short side of the page is greater than half of the total number of modules to be arranged; and a selection unit, used to select the value of the layout ratio coordination parameter closest to zero as the optimal value of the layout ratio coordination parameter.

[0013] Optionally, the layout module includes: a first layout unit, configured such that when the value of the layout mode function is 1, the number of rows of the module to be arranged in the power emergency information system page is equal to the number of modules arranged on the short side of the page, and the number of columns of the module to be arranged in the power emergency information system page is equal to the number of modules arranged on the long side of the page; and a second layout unit, configured such that when the value of the layout mode function is 2, the number of rows of the module to be arranged in the power emergency information system page is equal to the number of modules arranged on the long side of the page, and the number of columns of the module to be arranged in the power emergency information system page is equal to the number of modules arranged on the short side of the page.

[0014] Optionally, the device further includes: a first calculation module, used to calculate a layout reference value based on the number of rows and columns of the modules to be arranged in the power emergency information system page; a second acquisition module, used to acquire the length and width of the power emergency information system page; and a second calculation module, used to calculate the length or width of the power emergency information system page after removing the borders based on the preset value of the layout parameters, the layout reference value, and the length or width of the power emergency information system page.

[0015] Optionally, the device further includes: a third calculation module, used to calculate the left-right spacing or top-bottom spacing between modules to be arranged according to preset layout parameters, arrangement reference values, and the length or width of the power emergency information system page; a fourth calculation module, used to calculate the length of the modules to be arranged according to the number of columns when the modules are arranged in the power emergency information system page, the left-right spacing between the modules to be arranged, and the length of the power emergency information system page after removing the borders; and a fifth calculation module, used to calculate the width of the modules to be arranged according to the number of rows when the modules are arranged in the power emergency information system page, the top-bottom spacing between the modules to be arranged, and the width of the power emergency information system page after removing the borders.

[0016] Optionally, the device further includes: a sixth calculation module, used to calculate the coordinate values ​​of the modules to be arranged based on the length and width of the modules to be arranged and the left-right and top-bottom spacing between the modules to be arranged; and a visualization display module, used to visualize the modules to be arranged within the power emergency information system page.

[0017] Optionally, the golden ratio can be used as the preset value for the layout parameters.

[0018] According to a third aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.

[0019] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.

[0020] In this embodiment of the invention, the total number of modules to be arranged within the page of the power emergency information system and the preset values ​​of layout parameters are obtained; the number of modules arranged on the short side of the page is adjusted and the value of the arrangement ratio coordination parameter is calculated iteratively to determine the optimal value of the arrangement ratio coordination parameter; the number of modules arranged on the short side and the long side of the page corresponding to the optimal value of the arrangement ratio coordination parameter, as well as the arrangement mode function, are used to arrange the modules to be arranged within the page of the power emergency information system. Since the optimal value of the arrangement ratio coordination parameter is obtained by iterative calculation based on the preset values ​​of layout parameters and the total number of modules to be arranged within the page, and then the number of modules to be arranged on the long and short sides of the page is determined based on the optimal value of the arrangement ratio coordination parameter, the modules within the page are automatically arranged according to the number of modules arranged on the long and short sides of the page and the arrangement mode function, thereby achieving the effect of automatic arrangement of modules to be arranged within the page, solving the problem of the lack of an automated arrangement method for page modules in power emergency information systems in related technologies. In addition, when the total number of modules to be arranged increases, the modules within the page can be rearranged by recalculating the optimal value of the arrangement ratio coordination parameters, thereby improving the automation level of the page module arrangement of the power emergency information system.

[0021] In this embodiment of the invention, the layout reference value is calculated by the number of rows and columns of the modules to be arranged in the power emergency information system page. The layout reference value is then used to calculate the border of the power emergency information system page and the borders between the modules within the page. This achieves the purpose of beautifying the module layout result in the power emergency information system page, and makes the automatic module layout of the power emergency information system page more reasonable and aesthetically pleasing. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the hardware environment for an optional page module layout method for a power emergency information system according to an embodiment of the present invention;

[0025] Figure 2 This is a flowchart illustrating an optional method for arranging page modules in a power emergency information system according to an embodiment of the present invention.

[0026] Figure 3aThis is a schematic diagram of the horizontal page modules of an optional power emergency information system according to a certain embodiment of the present invention, arranged in mode one.

[0027] Figure 3b This is a schematic diagram of the horizontal page module of an optional power emergency information system according to a second mode, based on an embodiment of the present invention.

[0028] Figure 4a This is a schematic diagram of the vertical page modules of an optional power emergency information system according to a certain embodiment of the present invention, arranged in mode one.

[0029] Figure 4b This is a schematic diagram of the vertical page modules of an optional power emergency information system according to a second mode, based on an embodiment of the present invention.

[0030] Figure 5a This is a schematic diagram of the arrangement of square page modules of an optional power emergency information system according to Mode 1, based on an embodiment of the present invention.

[0031] Figure 5b This is a schematic diagram of the arrangement of a square page module of an optional power emergency information system according to mode two, based on an embodiment of the present invention.

[0032] Figure 6 This is a structural block diagram of an optional page module layout device for a power emergency information system according to an embodiment of the present invention;

[0033] Figure 7 This is a structural block diagram of an optional electronic device according to an embodiment of the present invention. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that in the description of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; they can refer to the internal connection between two components; and they can refer to wireless connections or wired connections. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.

[0036] According to one aspect of the present invention, a method for arranging page modules in a power emergency information system is provided. Optionally, in this embodiment, the above-described method for arranging page modules in a power emergency information system can be applied to, for example... Figure 1 In the hardware environment shown. For example... Figure 1 As shown, terminal 102 may include memory 104, processor 106, and display 108 (optional component). Terminal 102 can communicate with server 112 via network 110. Server 112 can provide services (such as application services) to the terminal or clients installed on the terminal. Database 114 can be set up on or independently of server 112 to provide data storage services to server 112. In addition, server 112 may run a processing engine 116, which can be used to execute the steps performed by server 112.

[0037] Optionally, terminal 102 may be, but is not limited to, a terminal capable of computing data, such as a mobile terminal (e.g., mobile phone, tablet computer), laptop computer, PC (Personal Computer), etc. The aforementioned network may include, but is not limited to, a wireless network or a wired network. The wireless network includes Bluetooth, Wi-Fi (Wireless Fidelity), and other networks that enable wireless communication. The aforementioned wired network may include, but is not limited to, a wide area network (WAN), a metropolitan area network (MAN), and a local area network (LAN). The aforementioned server 112 may include, but is not limited to, any hardware device capable of computing.

[0038] Furthermore, in this embodiment, the above-described power emergency information system page module arrangement method can also be applied to, but is not limited to, independent processing devices with powerful processing capabilities, without the need for data interaction. For example, the processing device can be, but is not limited to, a terminal device with powerful processing capabilities; that is, the various operations in the above-described power emergency information system page module arrangement method can be integrated into an independent processing device. The above is merely an example, and no limitation is made in this embodiment.

[0039] Optionally, in this embodiment, the above-described power emergency information system page module arrangement method can be executed by the server 112, by the terminal 102, or by both the server 112 and the terminal 102. The terminal 102 executing the power emergency information system page module arrangement method of this embodiment can also be executed by a client installed on it.

[0040] Taking the application of the page module layout method of the power emergency information system to the central processing unit as an example, Figure 2 This is a flowchart illustrating an optional page module layout method for a power emergency information system according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0041] Step S201: Obtain the total number of modules to be arranged and the preset values ​​of layout parameters within the power emergency information system page. Optionally, the total number of modules to be arranged is the total number of modules that need to be arranged within the power emergency information system page, and the preset values ​​of layout parameters are the basis for reasonably arranging the modules to be arranged within the power emergency information system page, and can be preset according to actual conditions. It should be noted that this module arrangement method for the power emergency information system page can also be used for various information systems in other industries.

[0042] Step S202: Adjust the number of modules arranged on the short side of the page and iteratively calculate the value of the layout ratio coordination parameter to determine the optimal value of the layout ratio coordination parameter. The value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameters. The long-short side module layout ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged. Optionally, let the number of modules arranged on the short side of the page be I, and the total number of modules to be arranged be S. Then, the formula for calculating the number of modules arranged on the long side of the page, R, is as follows:

[0043]

[0044] The layout ratio coordination parameter J represents the proportional coordination of the row and column layout of modules to be arranged within the power emergency information system page. The calculation formula is as follows:

[0045]

[0046] In the formula, The ratio of the long and short sides of the module arrangement is σ, which is the preset value of the layout parameter. The closer the value of the arrangement ratio coordination parameter J is to 0, the closer the arrangement ratio of the modules in the rows and columns is to the preset value of the layout parameter, that is, the better the module arrangement effect.

[0047] By adjusting the number of layout modules I on the short side of the page, the value of the layout ratio coordination parameter J is calculated cyclically to determine the optimal value of the layout ratio coordination parameter J, which is the value of the layout ratio coordination parameter J closest to 0.

[0048] Step S203: Based on the optimal value of the layout ratio coordination parameter, the number of modules arranged on the short side and long side of the page, and the layout mode function, the modules to be arranged are placed within the power emergency information system page. Optionally, after determining the optimal value of the layout ratio coordination parameter in step S202, the number of modules arranged on the short side of the page (I) and the number of modules arranged on the long side of the page (R) corresponding to the optimal value of the layout ratio coordination parameter are obtained. Then, the layout mode of the modules to be arranged is determined according to the layout mode function. One option is to arrange them according to the long side of the power emergency information system page, where the number of modules arranged along the long side is greater than the number of modules arranged along the short side of the page; the other option is to arrange them according to the short side of the power emergency information system page, where the number of modules arranged along the short side is greater than the number of modules arranged along the long side of the page. Based on this information, the number of modules in rows and columns within the power emergency information system page can be determined, thereby automatically arranging the modules to be arranged within the power emergency information system page.

[0049] In this embodiment of the invention, the total number of modules to be arranged within the page of the power emergency information system and the preset values ​​of layout parameters are obtained; the number of modules arranged on the short side of the page is adjusted and the value of the arrangement ratio coordination parameter is calculated iteratively to determine the optimal value of the arrangement ratio coordination parameter; the number of modules arranged on the short side and the long side of the page corresponding to the optimal value of the arrangement ratio coordination parameter, as well as the arrangement mode function, are used to arrange the modules to be arranged within the page of the power emergency information system. Since the optimal value of the arrangement ratio coordination parameter is obtained by iterative calculation based on the preset values ​​of layout parameters and the total number of modules to be arranged within the page, and then the number of modules to be arranged on the long and short sides of the page is determined based on the optimal value of the arrangement ratio coordination parameter, the modules within the page are automatically arranged according to the number of modules arranged on the long and short sides of the page and the arrangement mode function, thereby achieving the effect of automatic arrangement of modules to be arranged within the page, solving the problem of the lack of an automated arrangement method for page modules in power emergency information systems in related technologies. In addition, when the total number of modules to be arranged increases, the modules within the page can be rearranged by recalculating the optimal value of the arrangement ratio coordination parameters, thereby improving the automation level of the page module arrangement of the power emergency information system.

[0050] As an optional embodiment, the value of the layout ratio coordination parameter is calculated iteratively by adjusting the number of modules arranged on the short side of the page, and the optimal value of the layout ratio coordination parameter is determined. The value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameters. The long-short side module layout ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged. This includes: calculating the value of the layout ratio coordination parameter based on the initial value of the number of modules arranged on the short side of the page, where the initial value of the number of modules arranged on the short side of the page is 1, and it is incremented by 1 in each loop; calculating the value of the layout ratio coordination parameter for each loop based on the number of modules arranged on the short side of the page at each loop, and ending the loop when the number of modules arranged on the short side of the page is greater than half of the total number of modules to be arranged; and selecting the layout ratio coordination parameter value closest to zero as the optimal value of the layout ratio coordination parameter.

[0051] Optionally, the layout proportions are coordinated. The initial value of the number of modules arranged on the short side of the page, I, is 1, and it increments by 1 in each loop. The loop ends when the time is up, and the layout ratio coordination parameter J is calculated for each iteration. It should be noted that the calculated layout ratio coordination parameter J is only meaningful when the total number of modules S to be arranged is divisible by the number of modules I arranged on the short side of the page. The value of the layout ratio coordination parameter J closest to 0 is selected as the optimal value. In this embodiment of the invention, the optimal value of the layout ratio coordination parameter is determined by cyclically calculating the absolute value of the difference between the long-short side module arrangement ratio and the preset value of the layout parameters by changing the number of modules on the short side of the page.

[0052] As an optional embodiment, the number of modules to be arranged on the short side of the page and the number of modules to be arranged on the long side of the page, corresponding to the optimal value of the layout ratio coordination parameter, and the layout mode function, are arranged within the page of the power emergency information system. This includes: when the value of the layout mode function is 1, the number of rows of the modules to be arranged within the page of the power emergency information system is equal to the number of modules to be arranged on the short side of the page, and the number of columns of the modules to be arranged within the page of the power emergency information system is equal to the number of modules to be arranged on the long side of the page; when the value of the layout mode function is 2, the number of rows of the modules to be arranged within the page of the power emergency information system is equal to the number of modules to be arranged on the long side of the page, and the number of columns of the modules to be arranged within the page of the power emergency information system is equal to the number of modules to be arranged on the short side of the page.

[0053] Optionally, the layout mode function `mode` has two values. When `mode` = 1, the modules to be arranged are arranged along the longer side of the page, meaning the number of modules arranged along the longer side is greater than the number of modules arranged along the shorter side. When `mode` = 2, the modules to be arranged are arranged along the shorter side of the page, meaning the number of modules arranged along the shorter side is greater than the number of modules arranged along the longer side. When arranging the modules to be arranged within the power emergency information system page, the following formula can be used:

[0054]

[0055] In the formula, n is the number of rows when the modules to be arranged are displayed on the page of the power emergency information system, and m is the number of columns when the modules to be arranged are displayed on the page of the power emergency information system. n and m are determined by the optimal value of the arrangement ratio coordination parameter.

[0056] When the layout mode function `mode` is 1, the modules are arranged according to the long side of the page. The number of modules arranged along the long side `R` is equal to the number of columns `m` of the modules to be arranged in the power emergency information system page, and the number of modules arranged along the short side `I` is equal to the number of rows `n` of the modules to be arranged in the power emergency information system page. When the layout mode function `mode` is 2, the modules are arranged according to the short side of the page. In this case, the values ​​of `n` and `m` are opposite to those of `mode` = 1, which ensures that when the layout mode changes, `n` and `m` still represent the number of rows and columns of the modules to be arranged in the power emergency information system page.

[0057] As an optional embodiment, the method further includes: calculating the layout reference value based on the number of rows and columns of the modules to be arranged in the power emergency information system page; obtaining the length and width of the power emergency information system page; and calculating the length or width of the power emergency information system page after removing the borders based on the layout parameter preset value, the layout reference value, and the length or width of the power emergency information system page.

[0058] Optionally, after determining the number of rows (n) and columns (m) of the modules to be arranged within the power emergency information system page, the module arrangement can be further optimized to avoid placing modules at the edges of the system page. Assuming the system page has borders that disallow module placement, the page after removing these borders becomes an inner page where modules can be placed. The size of this inner page is related to the layout reference value (l), which is specifically calculated using the following formula:

[0059]

[0060] Based on the preset layout parameter value σ, the arrangement reference value l, and the length a or width b of the power emergency information system page, calculate the length X or width Y of the system page (i.e., the inner page) after removing the border. The calculation formula is as follows:

[0061] X = a(1 - (1 - σ) l )

[0062] Y = b(1 - (1 - σ)) l )

[0063] In this embodiment of the invention, a region range, i.e. an inner page, is set for the modules to be arranged in the power emergency information system, which improves the neatness and aesthetics of the page module arrangement in the power emergency information system.

[0064] As an optional embodiment, the method further includes: calculating the left-right or top-bottom spacing between modules to be arranged based on preset layout parameters, arrangement reference values, and the length or width of the power emergency information system page; calculating the length of the modules to be arranged based on the number of columns when the modules are arranged in the power emergency information system page, the left-right spacing between the modules to be arranged, and the length of the power emergency information system page after removing the borders; and calculating the width of the modules to be arranged based on the number of rows when the modules are arranged in the power emergency information system page, the top-bottom spacing between the modules to be arranged, and the width of the power emergency information system page after removing the borders.

[0065] Optionally, the layout reference value l is a quantitative parameter reflecting the layout state of the modules to be arranged. This value is used to further calculate the spacing between any two adjacent modules and the length and width of any single module. The spacing between any two adjacent modules includes left-right and top-bottom spacing. The left and right spacings are equal, as are the top and bottom spacings. The left-right and top-bottom spacings may not be equal. All modules to be arranged have equal lengths and widths, but their lengths and widths may not be equal. Specifically, let the left-right spacing of the modules to be arranged be d1, the top-bottom spacing be d2, the length be p, and the width (or height) be q. The calculation formulas for each parameter are as follows:

[0066]

[0067]

[0068]

[0069]

[0070] In the formula, a and b represent the length and width of the power emergency information system page, respectively; σ is the preset value of the layout parameters; l is the layout reference value; and n and m represent the number of rows and columns of the modules to be arranged within the power emergency information system page, respectively. This embodiment determines the left-right spacing, top-bottom spacing, and size of the modules to be arranged, achieving further optimization of the module layout on the power emergency information system page.

[0071] As an optional embodiment, the method further includes: calculating the coordinate values ​​of the modules to be arranged based on their length and width, as well as the left-right and top-bottom spacing between them; and visually displaying the modules on the power emergency information system page. Optionally, if the power emergency information system page has a length of 'a' and a width of 'b', then the pixel coordinates of the top-left corner of the page are (0,0), the bottom-left corner are (0,b), the top-right corner are (a,0), and the bottom-right corner are (a,b). The coordinate values ​​of the modules to be arranged within the power emergency information system page can be calculated based on their length 'p' and width 'q', as well as the left-right spacing 'd1' and top-bottom spacing 'd2'. Specifically, the coordinates (x,y) of the top-left corner of the module within the power emergency information system page are calculated using the following formula:

[0072] x = jd1 + (j-1)p

[0073] y = id² + (i-1)q

[0074] The coordinate matrix of all modules to be arranged is shown below:

[0075]

[0076] At this point, the location, size, spacing, and layout area of ​​the modules to be arranged have been determined, and the modules to be arranged can be visualized on the power emergency information system page.

[0077] As an optional implementation, the golden ratio is used as the preset value for the layout parameters. Optionally, the layout parameters serve as a reasonable and effective basis for module arrangement. The golden ratio exists in various fields such as architecture, aesthetics, art, military, and music, embodying the perfection and harmony of division. Therefore, using the golden ratio as the preset value for the layout parameters means... It conforms to the laws of nature and human cognition, and achieves the effect of improving the aesthetics and harmony of the layout of the power emergency information system's page modules.

[0078] As an optional embodiment, Figure 3a , Figure 3b , Figure 4a , Figure 4b , Figure 5a as well as Figure 5b The images show the layout of modules in three different versions of the power emergency information system, arranged according to Mode 1 and Mode 2. Figure 3a and Figure 3b Corresponding to the landscape page of the power emergency information system, Figure 4a and Figure 4b Corresponding to the vertical page of the power emergency information system, Figure 5a and Figure 5b This corresponds to the square page of the power emergency information system. Figure 3a , Figure 4a as well as Figure 5a The image shows the effect of arranging modules according to Pattern 1 on different page layouts. Figure 3b , Figure 4b as well as Figure 5b The image shows the effect of arranging modules according to mode two on different page layouts. Figure 3a and Figure 3b The page length is 1920 pixels, the page width is 1080 pixels, and the total number of modules to be arranged is 15. After calculating the position, size, spacing, and arrangement area of ​​the modules to be arranged, the modules are arranged according to the arrangement mode functions mode=1 (i.e., mode one) and mode=2 (i.e., mode two) respectively. Figure 3a The modules are arranged along the longer side of the page; that is, the number of modules arranged along the 1920-pixel side is greater than the number of modules arranged along the 1080-pixel side. Figure 3b The modules are arranged according to the shorter side of the page, meaning the number of modules arranged along the 1080-pixel side is greater than the number arranged along the 1920-pixel side. Users can choose the optimal layout for display based on the module arrangement effects under different layout mode functions. Similarly, Figure 4a as well as Figure 4b The images show schematic diagrams of the layout of page modules for a power emergency information system with a page length of 1080 pixels, a page width of 2400 pixels, and a total of 10 modules to be arranged, according to both Mode 1 and Mode 2. Figure 5a as well as Figure 5bThe diagrams show the layout of power emergency information system page modules according to Mode 1 and Mode 2, respectively, when the page length and width are both 1000 pixels and the total number of modules to be arranged is 6. It can be seen that the power emergency information system page module layout method of the present invention is applicable to various layouts of power emergency information system pages, and can automatically arrange any number of modules to be arranged, selecting an appropriate mode based on the module content. It has high adaptability, can replace manual layout, and achieves the effect of improving the efficiency of arranging massive amounts of information.

[0079] According to another aspect of the present invention, a power emergency information system page module layout device is also provided for implementing the above-described power emergency information system page module layout method. Figure 6 This is a structural block diagram of an optional page module layout device for a power emergency information system according to an embodiment of the present invention, such as... Figure 6 As shown, the device may include: a first acquisition module 601, used to acquire the total number of modules to be arranged and the preset value of layout parameters within the power emergency information system page; a determination module 602, used to adjust the number of modules arranged on the short side of the page and iteratively calculate the value of the arrangement ratio coordination parameter to determine the optimal value of the arrangement ratio coordination parameter, wherein the value of the arrangement ratio coordination parameter is the absolute value of the difference between the long and short side module arrangement ratio and the preset value of the layout parameters, and the long and short side module arrangement ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; and an arrangement module 603, used to arrange the modules to be arranged within the power emergency information system page according to the number of modules arranged on the short side of the page and the number of modules arranged on the long side of the page corresponding to the optimal value of the arrangement ratio coordination parameter, as well as the arrangement mode function.

[0080] It should be noted that the power emergency information system page module layout module 601 in this embodiment can be used to execute the above step S201, the power emergency information system page module layout module 602 in this embodiment can be used to execute the above step S202, and the power emergency information system page module layout module 603 in this embodiment can be used to execute the above step S203.

[0081] Through the aforementioned modules, the optimal value of the layout ratio coordination parameter is obtained through iterative calculation based on the preset values ​​of the layout parameters and the total number of modules to be arranged on the page. Then, based on the optimal value of the layout ratio coordination parameter, the number of modules to be arranged on the long and short sides of the page is determined. The modules on the page are automatically arranged according to the number of modules on the long and short sides of the page and the layout mode function, thus achieving the effect of automatic arrangement of modules to be arranged on the page. This solves the problem of the lack of automated arrangement methods for page modules in power emergency information systems in related technologies. Furthermore, when the total number of modules to be arranged increases, the optimal value of the layout ratio coordination parameter can be recalculated to achieve a rearrangement of the modules on the page, improving the automation level of page module arrangement in power emergency information systems.

[0082] As an optional embodiment, the determining module includes: a first calculation unit, used to calculate the value of the layout ratio coordination parameter based on the initial value of the number of layout modules on the short side of the page, wherein the initial value of the number of layout modules on the short side of the page is 1, and it is incremented by 1 in each loop; a second calculation unit, used to calculate the value of the layout ratio coordination parameter in each loop based on the number of layout modules on the short side of the page in each loop, and the loop ends when the number of layout modules on the short side of the page is greater than half of the total number of modules to be arranged; and a selection unit, used to select the value of the layout ratio coordination parameter closest to zero as the optimal value of the layout ratio coordination parameter.

[0083] As an optional embodiment, the layout module includes: a first layout unit, configured to, when the value of the layout mode function is 1, have the number of rows of the module to be arranged in the power emergency information system page equal to the number of modules arranged on the short side of the page, and have the number of columns of the module to be arranged in the power emergency information system page equal to the number of modules arranged on the long side of the page; and a second layout unit, configured to, when the value of the layout mode function is 2, have the number of rows of the module to be arranged in the power emergency information system page equal to the number of modules arranged on the long side of the page, and have the number of columns of the module to be arranged in the power emergency information system page equal to the number of modules arranged on the short side of the page.

[0084] As an optional embodiment, the device further includes: a first calculation module, used to calculate a layout reference value based on the number of rows and columns of the modules to be arranged in the power emergency information system page; a second acquisition module, used to acquire the length and width of the power emergency information system page; and a second calculation module, used to calculate the length or width of the power emergency information system page after removing the borders based on the preset value of the layout parameters, the layout reference value, and the length or width of the power emergency information system page.

[0085] As an optional embodiment, the device further includes: a third calculation module, used to calculate the left-right spacing or top-bottom spacing between modules to be arranged according to preset layout parameters, arrangement reference values, and the length or width of the power emergency information system page; a fourth calculation module, used to calculate the length of the modules to be arranged according to the number of columns when the modules are arranged in the power emergency information system page, the left-right spacing between the modules to be arranged, and the length of the power emergency information system page after removing the borders; and a fifth calculation module, used to calculate the width of the modules to be arranged according to the number of rows when the modules are arranged in the power emergency information system page, the top-bottom spacing between the modules to be arranged, and the width of the power emergency information system page after removing the borders.

[0086] As an optional embodiment, the device further includes: a sixth calculation module, used to calculate the coordinate values ​​of the modules to be arranged based on the length and width of the modules to be arranged and the left-right and top-bottom spacing between the modules to be arranged; and a visualization display module, used to visualize the modules to be arranged within the power emergency information system page.

[0087] As an optional embodiment, the golden ratio is used as the preset value for layout parameters.

[0088] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.

[0089] According to another aspect of the present invention, an electronic device for implementing the above-described power emergency information system page module layout method is also provided. The electronic device may be a server, a terminal, or a combination thereof.

[0090] Figure 7 This is a structural block diagram of an optional electronic device according to an embodiment of the present invention, such as... Figure 7 As shown, the system includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704. The processor 701, communication interface 702, and memory 703 communicate with each other via the communication bus 704. The memory 703 stores computer programs. When the processor 701 executes the computer program stored in the memory 703, it performs the following steps:

[0091] Obtain the total number of modules to be arranged and the preset values ​​of layout parameters within the power emergency information system page; adjust the number of modules arranged on the short side of the page and iteratively calculate the value of the arrangement ratio coordination parameter to determine the optimal value of the arrangement ratio coordination parameter. The value of the arrangement ratio coordination parameter is the absolute value of the difference between the long-short side module arrangement ratio and the preset value of the layout parameters. The long-short side module arrangement ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; arrange the modules to be arranged within the power emergency information system page according to the optimal value of the arrangement ratio coordination parameter, the corresponding number of modules arranged on the short side of the page and the number of modules arranged on the long side of the page, and the arrangement mode function.

[0092] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0093] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0094] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0095] As an example, such as Figure 7 As shown, the memory 703 may include, but is not limited to, the acquisition module 601, the determination module 602, and the arrangement module 603 in the aforementioned power emergency information system page module arrangement device. Furthermore, it may include, but is not limited to, other module units in the aforementioned power emergency information system page module arrangement device, which will not be elaborated upon in this example.

[0096] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0097] In addition, the aforementioned electronic equipment also includes a display for showing the layout of the power emergency information system page modules.

[0098] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0099] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only. The device implementing the above-mentioned power emergency information system page module layout method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, handheld computer, mobile internet device (MID), PAD, etc. Figure 7 This does not limit the structure of the aforementioned electronic devices. For example, the terminal device may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 7 The different configurations shown.

[0100] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.

[0101] According to another aspect of the present invention, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for a page module layout method of a power emergency information system.

[0102] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.

[0103] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:

[0104] Obtain the total number of modules to be arranged and the preset values ​​of layout parameters within the power emergency information system page; adjust the number of modules arranged on the short side of the page and iteratively calculate the value of the arrangement ratio coordination parameter to determine the optimal value of the arrangement ratio coordination parameter. The value of the arrangement ratio coordination parameter is the absolute value of the difference between the long-short side module arrangement ratio and the preset value of the layout parameters. The long-short side module arrangement ratio is determined by the number of modules arranged on the short side of the page and the total number of modules to be arranged; arrange the modules to be arranged within the power emergency information system page according to the optimal value of the arrangement ratio coordination parameter, the corresponding number of modules arranged on the short side of the page and the number of modules arranged on the long side of the page, and the arrangement mode function.

[0105] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code such as USB flash drives, ROM, RAM, portable hard drives, magnetic disks, or optical disks. The sequence numbers of the above embodiments of the present invention are merely for description and do not represent the superiority or inferiority of the embodiments. In the above embodiments of the present invention, the descriptions of each embodiment have their own emphasis, and parts not described in detail in a certain embodiment can be referred to the relevant descriptions of other embodiments.

[0106] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0107] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for arranging page modules in a power emergency information system, characterized in that, The method includes: Obtain the total number of modules to be arranged and the preset value of layout parameters in the power emergency information system page, wherein the preset value of the layout parameters is the golden ratio. The algorithm adjusts the number of modules arranged on the short side of the page, iteratively calculates the value of the layout ratio coordination parameter, and determines the optimal value of the layout ratio coordination parameter. The value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameter. The long-short side module layout ratio is the ratio of the total number of modules to be arranged to the number of modules arranged on the short side of the page. This includes: calculating the value of the layout ratio coordination parameter based on the initial value of the number of modules arranged on the short side of the page (where the initial value is 1, incremented by 1 in each loop); calculating the value of the layout ratio coordination parameter for each loop based on the number of modules arranged on the short side of the page at each loop; ending the loop when the number of modules arranged on the short side of the page is greater than half of the total number of modules to be arranged; and selecting the layout ratio coordination parameter value closest to zero as the optimal value of the layout ratio coordination parameter. The arrangement of modules to be arranged within the power emergency information system page is based on the optimal values ​​of the layout ratio coordination parameters, corresponding to the number of modules arranged on the short side and the long side of the page, and the layout mode function. This includes: when the layout mode function is set to 1, the number of rows for the modules to be arranged within the power emergency information system page equals the number of modules arranged on the short side of the page, and the number of columns for the modules to be arranged within the power emergency information system page equals the number of modules arranged on the long side of the page; when the layout mode function is set to 2, the number of rows for the modules to be arranged within the power emergency information system page equals the number of modules arranged on the long side of the page, and the number of columns for the modules to be arranged within the power emergency information system page equals the number of modules arranged on the short side of the page.

2. The method for arranging page modules in a power emergency information system according to claim 1, characterized in that, The method further includes: Calculate the layout baseline value based on the number of rows and columns of the modules to be arranged in the power emergency information system page; Obtain the length and width of the power emergency information system page; The length or width of the power emergency information system page after removing the border is calculated based on the preset value of the layout parameters, the layout reference value, and the length or width of the power emergency information system page.

3. The method for arranging page modules in a power emergency information system according to claim 2, characterized in that, The method further includes: The left-right or top-bottom spacing between the modules to be arranged is calculated based on the preset values ​​of the layout parameters, the arrangement reference values, and the length or width of the power emergency information system page. The length of the module to be arranged is calculated based on the number of columns when the module is arranged in the power emergency information system page, the left and right spacing between the modules to be arranged, and the length of the power emergency information system page after removing the borders. The width of the module to be arranged is calculated based on the number of rows when the module is arranged in the power emergency information system page, the vertical spacing between the modules to be arranged, and the width of the power emergency information system page after removing the borders.

4. The method for arranging page modules in a power emergency information system according to claim 3, characterized in that, The method further includes: Calculate the coordinate values ​​of the modules to be arranged based on their length and width, as well as the left-right and top-bottom spacing between them. The modules to be deployed will be displayed visually on the power emergency information system page.

5. A page module layout device for a power emergency information system, characterized in that, The device includes: The first acquisition module is used to acquire the total number of modules to be arranged and the preset value of layout parameters in the power emergency information system page, wherein the preset value of the layout parameters is the golden ratio. A determination module is used to adjust the number of modules arranged on the short side of the page, iteratively calculate the value of the layout ratio coordination parameter, and determine the optimal value of the layout ratio coordination parameter. The value of the layout ratio coordination parameter is the absolute value of the difference between the long-short side module layout ratio and the preset value of the layout parameter. The long-short side module layout ratio is the ratio of the total number of modules to be arranged to the number of modules arranged on the short side of the page. This includes: calculating the value of the layout ratio coordination parameter based on the initial value of the number of modules arranged on the short side of the page (where the initial value of the number of modules arranged on the short side of the page is 1, and it increments by 1 in each loop); calculating the value of the layout ratio coordination parameter for each loop based on the number of modules arranged on the short side of the page at each loop; ending the loop when the number of modules arranged on the short side of the page is greater than half of the total number of modules to be arranged; and selecting the layout ratio coordination parameter value closest to zero as the optimal value of the layout ratio coordination parameter. The layout module is used to arrange the modules to be arranged within the power emergency information system page according to the optimal value of the layout ratio coordination parameters, the number of layout modules on the short side of the page, the number of layout modules on the long side of the page, and the layout mode function. Specifically: when the value of the layout mode function is 1, the number of rows of the modules to be arranged within the power emergency information system page is equal to the number of layout modules on the short side of the page, and the number of columns of the modules to be arranged within the power emergency information system page is equal to the number of layout modules on the long side of the page; when the value of the layout mode function is 2, the number of rows of the modules to be arranged within the power emergency information system page is equal to the number of layout modules on the long side of the page, and the number of columns of the modules to be arranged within the power emergency information system page is equal to the number of layout modules on the short side of the page.

6. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the method of any one of claims 1 to 4 by running the computer program stored in the memory.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Page layout method and device, electronic equipment and storage medium

    CN113835806A