Page generation method and device and computer readable storage medium
By obtaining the configuration information of the display content and determining the page area and display form, it solves the problem that traditional pages cannot be customized, satisfies users' personalized display needs and improves the flexibility of the page.
Patent Information
- Application Number
- CN202410531231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-08-27
AI Technical Summary
Traditional pages cannot support user-customized display of data content and location areas, and cannot meet user personalized needs.
By obtaining the configuration information of the display content, the target display area, basic data area and visualization area are determined, and the data display form is determined based on these areas to generate a page that meets the user's personalized configuration needs.
It realizes the customization of page content and location, meets the personalized display needs of different users, and improves the flexibility and user experience of the page.
Smart Images

Figure CN118551089A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of page processing technology, and in particular, to a page generation method, device, and computer-readable storage medium. Background Art
[0002] Traditional pages generally display fixed data content in a fixed location area. When there is a lot of data content that can be displayed in the system, different users may want different data content to be displayed on the page, and different data content to be displayed in different location areas. The current pages cannot support users to customize the data content and location area to be displayed. Summary of the invention
[0003] In view of this, the purpose of the embodiments of the present application is to provide a page generation method, device and computer-readable storage medium to solve the problem of being unable to generate pages that meet the personalized needs of users.
[0004] Based on the above purpose, the embodiment of the present application provides a page generation method, including:
[0005] Obtaining configuration information of the display content; wherein the configuration information includes basic data and visualization data;
[0006] Determine a target display area of the display content on the page according to the configuration information;
[0007] Determining a basic data area for displaying the basic data according to the target display area and the basic data;
[0008] Determine a visualization area for displaying the visualization data according to the target display area and the basic data area; wherein both the basic data area and the visualization area are located within the range of the target display area;
[0009] Determining a target display form of the visualization data according to the visualization area;
[0010] The basic data is displayed in the basic data area, and the visualization data is displayed in the visualization area according to the target display form.
[0011] Optionally, the configuration information further includes display attribute information, and the display attribute information includes display position, size and shape;
[0012] Determining a target display area of the display content on a page according to the configuration information includes:
[0013] Using the display position, size and shape as screening conditions, screening out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page;
[0014] Generate a region matching rule according to the basic data and / or the visualization data;
[0015] Determining whether the candidate display area meets the area matching rule;
[0016] If satisfied, taking the candidate display area as the target display area;
[0017] If not satisfied, an error message is generated.
[0018] Optionally, determining a target display area of the display content on a page according to the configuration information includes:
[0019] Generate region matching rules and region allocation rules according to the basic data and / or visualization data;
[0020] Filtering out candidate display areas that meet the area matching rule from multiple display areas to be allocated on the page;
[0021] A target display area that meets the area allocation rule is selected from the candidate display areas.
[0022] Optionally, the obtaining of the configuration information of the display content includes: obtaining configuration information of multiple groups of display content, wherein the priority of the visualization data of each group of display content is different;
[0023] Generate a region allocation rule according to the basic data and / or the visualization data, including:
[0024] Generating the area allocation rule according to the visual data priority order of each group of display content;
[0025] Selecting a target display area that meets the area allocation rule from the candidate display areas includes:
[0026] According to the priority order of the visualization data of each group of display content, a corresponding target display area is selected for each group of display content from the candidate display areas in turn.
[0027] Optionally, selecting a corresponding target display area for each group of display content from the candidate display areas in turn according to the priority order of the visualization data of each group of display content includes:
[0028] When the candidate display areas corresponding to the first group of display contents and the second group of display contents overlap, if the overlapping candidate display areas are allocated to the first group of display contents and there is no candidate display area to be allocated to the second group of display contents, then candidate display areas are reselected for the first group of display contents and the overlapping candidate display areas are allocated to the second group of display contents; wherein the priority of the visualization data of the first group of display contents is higher than the priority of the visualization data of the second group of display contents.
[0029] Optionally, the configuration information further includes a display position and a display shape of the basic data; and determining a basic data area for displaying the basic data according to the target display area and the basic data includes:
[0030] Determine, based on the basic data, a minimum area for displaying the basic data;
[0031] At a position in the target display area corresponding to the display position, the basic data area is determined according to the minimum area and the display shape.
[0032] Optionally, determining a visualization area for displaying the visualization data according to the target display area and the basic data area includes:
[0033] Determine, according to the target display area and the basic data area, a remaining area in the target display area except the basic data area;
[0034] Based on the remaining area, determining the largest regular area;
[0035] The visualization area is determined according to the visualization data and the regular area.
[0036] Optionally, determining the visualization area according to the visualization data and the rule area includes:
[0037] Determining a candidate display form of the visualization data according to the data type of the visualization data;
[0038] Determining a reference display area for displaying the candidate display forms according to the candidate display forms;
[0039] If the reference display area is within the range of the regular area, the regular area is used as the visualization area.
[0040] Optionally, determining a target display form of the visualization data according to the visualization area includes:
[0041] According to the data type of the visualization data, a display form of the visualization data with the best display effect in the visualization area is determined as the target display form.
[0042] The present application also provides a page generation device, including:
[0043] An acquisition module is used to acquire configuration information of display content; wherein the configuration information includes basic data and visualization data;
[0044] A target display area determination module, which determines a target display area of the display content on the page according to the configuration information;
[0045] A basic data area determination module, which determines a basic data area for displaying the basic data according to the target display area and the basic data;
[0046] A visualization area determination module, which determines a visualization area for displaying the visualization data according to the target display area and the basic data area; wherein the basic data area and the visualization area are both located within the range of the target display area;
[0047] A visualization form determination module, which determines a target display form of the visualization data according to the visualization area;
[0048] A display module displays the basic data in the basic data area, and displays the visual data in the visual area according to the target display form.
[0049] Optionally, the configuration information further includes display attribute information, and the display attribute information includes display position, size and shape;
[0050] The target display area determination module is used to use the display position, size and shape as screening conditions to filter out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page; generate area matching rules based on the basic data and / or visualization data; determine whether the candidate display area meets the area matching rules; if so, use the candidate display area as the target display area; if not, generate an error message.
[0051] Optionally, the target display area determination module is used to generate area matching rules and area allocation rules based on the basic data and / or visualization data; screen out candidate display areas that meet the area matching rules from multiple display areas to be allocated on the page; and select a target display area that meets the area allocation rules from the candidate display areas.
[0052] Optionally, the acquisition module is used to acquire configuration information of multiple groups of display contents, and the priority of the visualization data of each group of display contents is different;
[0053] The target display area determination module is used to generate the area allocation rule according to the priority order of the visualization data of each group of display content; and select the corresponding target display area for each group of display content from the candidate display areas in turn according to the priority order of the visualization data of each group of display content.
[0054] Optionally, the target display area determination module is used to, when there is overlap in candidate display areas corresponding to the first group of display content and the second group of display content, if the overlapping candidate display areas are allocated to the first group of display content and there is no candidate display area to be allocated to the second group of display content, then re-select candidate display areas for the first group of display content and allocate the overlapping candidate display areas to the second group of display content; wherein the priority of the visualization data of the first group of display content is higher than the priority of the visualization data of the second group of display content.
[0055] Optionally, the configuration information also includes a display position and a display shape of the basic data;
[0056] The basic data area determination module is used to determine the minimum area for displaying the basic data according to the basic data; and determine the basic data area according to the minimum area and display shape at a position corresponding to the display position in the target display area.
[0057] Optionally, the visualization area determination module is used to determine the remaining area in the target display area except the basic data area based on the target display area and the basic data area; determine the regular area with the largest area based on the remaining area; and determine the visualization area based on the visualization data and the regular area.
[0058] Optionally, the visualization area determination module is used to determine candidate display forms of the visualization data according to the data type of the visualization data; determine a benchmark display area for displaying the candidate display forms according to the candidate display forms; if the benchmark display area is within the range of the rule area, use the rule area as the visualization area.
[0059] Optionally, the visualization form determination module is used to determine, according to the data type of the visualization data, a display form of the visualization data with the best display effect in the visualization area as the target display form.
[0060] An embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the page generation method as described above.
[0061] As can be seen from the above, the page generation method, device and computer-readable storage medium provided in the embodiments of the present application obtain configuration information of the display content, determine the target display area of the display content on the page according to the configuration information, determine the basic data area for displaying the basic data according to the target display area and the basic data, determine the visualization area for displaying the visualization data according to the target display area and the basic data area, determine the target display form of the visualization data according to the visualization area, display the basic data in the basic data area, and display the visualization data in the visualization area according to the target display form, thereby generating a page that meets the user's personalized configuration needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0063] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a display area preset for an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a display area customized by a user in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of the positional relationship between the regular area and the reference display area in an embodiment of the present application; the regular area matches the reference display area;
[0067] Figure 5 A schematic diagram of the positional relationship between the regular area and the reference display area in an embodiment of the present application; the regular area does not match the reference display area;
[0068] Figure 6 This is a block diagram of the device structure of an embodiment of the present application;
[0069] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0071] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0072] like Figure 1 As shown, the embodiment of the present application provides a page generation method, including:
[0073] S101: Acquire configuration information of display content; wherein the configuration information includes basic data and visualization data;
[0074] In this embodiment, the display content is the content that needs to be displayed on the page, and the configuration information of the display content includes the basic data and visualization data that need to be displayed on the page. The basic data and visualization data corresponding to different display contents may be different. The basic data includes data of types such as text and pictures, and the visualization data is data that can be displayed in a specific visualization form. For example, the display content includes the power generation of a certain region in one year, wherein the basic data includes one or more of a text introduction of the region, a text introduction of the power generation overview, and a picture of a power plant, and the visualization data includes power generation statistics that can be displayed in a specific visualization form such as a bar chart and a pie chart.
[0075] In some methods, the user can set configuration information on the configuration interface. For example, in the page design stage, for multiple groups of display content that need to be displayed on the page, the basic data and visualization data of each group of display content can be configured separately. During configuration, the required basic data and visualization data can be selected from the existing data groups, or the required basic data and visualization data can be imported. The above is only an exemplary description, and the configuration method of each configuration information is not specifically limited.
[0076] S102: Determine a target display area on the page for displaying the content according to the configuration information;
[0077] like Figure 2 As shown, multiple display areas to be allocated are pre-set on the page; or, as shown Figure 3 As shown, the user can customize the division of multiple display areas to be allocated on the page. When dividing, the page is divided by drawing one or more boundary lines on the page. For the multiple divided areas, the area with an area larger than a predetermined threshold is used as the display area to be allocated; the generation method of the display area to be allocated is not specifically limited.
[0078] In this embodiment, after the user configures the configuration information of the display content, one of the multiple display areas to be allocated may be selected as the target display area for displaying the display content according to the configuration information.
[0079] S103: Determine a basic data area for displaying basic data according to the target display area and the basic data;
[0080] In this embodiment, since the basic data is data that must be displayed, after determining the target display area of the display content on the page, the basic data area for displaying the basic data is determined within the target display area based on the area required to be occupied by the basic data of the display content.
[0081] S104: determining a visualization area for displaying visualized data according to the target display area and the basic data area; wherein both the basic data area and the visualization area are located within the range of the target display area;
[0082] In this embodiment, after the basic data area within the target display area is determined, the remaining area within the target display area except the basic data area is determined, and a visualization area for displaying visualization data is determined based on the remaining area.
[0083] S105: Determine a target display form of the visualization data according to the visualization area;
[0084] In this embodiment, since there are multiple visualization display forms of visualization data, after the visualization area is determined, the target display form for displaying the visualization data within the visualization area is determined. The target display form may be a display form that can present the visualization data with the best display effect within the visualization area, for example, a display effect with clear data and good readability.
[0085] S106: Display the basic data in the basic data area, and display the visualized data in the visualized area according to the target display format.
[0086] In this embodiment, after determining the target display area on the page for displaying the display content, the basic data area in the target display area for displaying the basic data, the visualization area for displaying the visualization data, and the target display form of the visualization data, within the target display area on the page, the basic data is rendered in the basic data area, and the visualization data is rendered in the visualization area according to the target display form, thereby generating a page including the display content.
[0087] The page generation method provided in the embodiment of the present application allows the user to configure the configuration information of the display content. After the configuration, a target display area for displaying the display content is determined from the display area to be allocated in the page, and a basic data area for displaying the basic data in the target display area is determined according to the basic data in the display content. Then, a visualization area for displaying the visualization data is determined from the remaining area of the target display area, and a target display form of the visualization data is determined according to the visualization area, the basic data is displayed in the basic data area, and the visualization data is displayed in the visualization area according to the target display form, thereby generating a page that meets the user's personalized configuration.
[0088] In some embodiments, the configuration information further includes display attribute information, the display attribute information including display position, size and shape;
[0089] According to the configuration information, determine the target display area of the display content on the page, including:
[0090] Using display location, size and shape as screening conditions, filter out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page;
[0091] Generate region matching rules based on basic data and / or visualization data;
[0092] Determine whether the candidate display area meets the area matching rules;
[0093] If satisfied, the candidate display area is used as the target display area;
[0094] If not satisfied, an error message is generated.
[0095] In this embodiment, the user can not only configure the basic data and visualization data of the display content, but also configure the display attribute information of the display content, that is, the display position, size and shape of the display area for displaying the display content can be configured, so as to determine the target display area according to the configured display attribute information. Among them, the display position is the position where the display content is displayed on the page, for example, the display content is displayed in the middle, upper left corner, right side, etc. of the page, and the size and shape are the size and shape of the display area, for example, a rectangle with specific length and width, a circle with specific radius, etc., which can be flexibly configured by the user.
[0096] After setting the display attribute information, the set display position, size and shape are used as filtering conditions to select candidate display areas that meet the filtering conditions from multiple display areas to be allocated on the page. Figure 2 As shown, after setting the configuration information such as the display position being the middle and the shape being a rectangle, the display area 2 is selected from the display areas to be allocated as the candidate display area. Then it is determined whether the candidate display area meets the area matching rule. If so, the candidate display area is used as the target display area. If not, an error message is generated and a prompt is given, so that the user can reset the configuration information according to the prompt.
[0097] In some embodiments, the region matching rules are generated based on the basic data and / or the visualization data, and the region matching rules are used to determine whether the selected candidate display area matches the basic data area for displaying the basic data and / or the visualization area for displaying the visualization data. In other words, whether the candidate display area can display the basic data and / or the visualization data.
[0098] In some methods, region matching rules are generated according to basic data and / or visualization data, including:
[0099] Based on the basic data, determine the minimum area for displaying the basic data;
[0100] According to the visualization data, determine the minimum area for displaying the visualization data;
[0101] The area matching rule is determined according to the area of the candidate display area, the minimum area for displaying basic data, and / or the minimum area for displaying visual data, and / or the visual data.
[0102] In this embodiment, whether the candidate display area can display basic data and / or visual data can be determined based on the relationship between the area of the candidate display area and the minimum area of the basic data, the minimum area of the visual data, and the original visual data. In some embodiments, the area matching rule can be that the area of the candidate display area is greater than or equal to the minimum area of the basic data, that is, the candidate display area can at least display the basic data; in other embodiments, the area matching rule can be that the area of the candidate display area is greater than or equal to the sum of the minimum area of the basic data and the minimum area of the visual data; wherein the minimum area of the visual data can be divided into two cases, one is the minimum area required for the visual data to be displayed in a specific display form, in which case, the candidate display area can at least display the basic data and the visual data with a specific display form; the other is that the visual data is displayed in the form of original data and does not have the minimum area required for display in a specific display form, then the candidate display area can at least display the basic data and the original visual data without a display form.
[0103] In some embodiments, determining a target display area on a page for displaying content according to the configuration information includes:
[0104] Generate region matching rules and region allocation rules based on basic data and / or visualization data;
[0105] Filter out candidate display areas that meet the area matching rules from multiple display areas to be allocated on the page;
[0106] A target display area that meets the area allocation rules is selected from the candidate display areas.
[0107] In this embodiment, when the configuration information does not include display attribute information, that is, the user has not set the display attribute information, one or more candidate display areas that meet the area matching rule are first screened out from multiple display areas to be allocated, and then the target display area that meets the area allocation rule is selected from the candidate display areas. Since the user has not set information such as display position, size, and shape, it can be understood that the user has no specific requirements for the display position, size, and shape of the display content. First, a candidate display area with an area that can display basic data and / or visual data can be selected from the display area to be allocated, and then the target display area can be selected from multiple candidate display areas according to the area allocation rule.
[0108] In some embodiments, obtaining configuration information of display content includes: obtaining configuration information of multiple groups of display content, and the priority of visualization data of each group of display content is different;
[0109] Generate area allocation rules based on basic data and / or visualization data, including:
[0110] Generate area allocation rules according to the visual data priority order of each group of display content;
[0111] Select the target display area that meets the area allocation rules from the candidate display areas, including:
[0112] According to the visual data priority order of each group of display content, a corresponding target display area is selected for each group of display content from the candidate display areas in turn.
[0113] In this embodiment, when there are multiple groups of display content to be displayed and no display attribute information is set for each group of display content, an area allocation rule can be generated based on the priority of the visualization data of each group of display content, and then the target display area for each group of display content is selected in turn from multiple candidate display areas according to the area allocation rule.
[0114] Among them, the priority of the visualization data is pre-set. For each group of display content, one or more candidate display areas are first selected from the display area to be allocated to obtain the candidate display areas corresponding to each group of display content. Then, according to the priority order of the visualization data of each group of display content, the order of each group of display content is determined. According to the order of each group of display content, the target display area of the current group of display content is selected from the candidate display areas of each group of display content in sequence. For example, the priority of the visualization data of the first group of display content is higher than the priority of the visualization data of the second group of display content. The candidate display areas corresponding to the first group of display content include display area 1 and display area 2, and the candidate display areas corresponding to the second group of display content include display area 2 and display area 3. Then, according to the priority order, the target display area is first selected for the first group of display content, that is, one of its two candidate display areas (display area 1 and display area 2) is first selected as the target display area of the first group of display content, and then the target display area is selected for the second group of display content. At this time, if the target display area selected for the first group of display content is display area 2, the candidate display area of the second group of display content is only display area 3, and display area 3 can only be used as the target display area of the second group of display content.
[0115] In some methods, the priority of visualization data can be determined according to the importance of the visualization data or the amount of data. For example, the higher the importance of the visualization data, the higher the priority, and the target display area is selected for the display content corresponding to the important visualization data. Alternatively, the larger the amount of visualization data, the higher the priority, and the target display area is selected for the display content corresponding to the visualization data with a large amount of data. The larger the amount of visualization data, the larger the area of the display area required, the larger the selected target display area, and the more types of display forms available for visualization data, and the best display form can be selected to display the visualization data, thereby improving the display effect.
[0116] In some methods, after sorting each group of display content in descending order of visual data priority, the target display area of the current group of display content is selected from the candidate display areas of each group of display content in turn, for each group of display content, the candidate display area with the largest area is selected from its corresponding candidate display area as the target display area, and other groups of display content cannot be allocated with the candidate display area. When sorting each group of display content in descending order of visual data priority, after selecting the target display area of the current group of display content from the candidate display areas of each group of display content in turn, for each group of display content, the candidate display area with the smallest area is selected from its corresponding candidate display area as the target display area, and other groups of display content cannot be allocated with the candidate display area.
[0117] In some embodiments, according to the priority order of the visualization data of each group of display content, the corresponding target display area is selected from the candidate display areas for each group of display content in turn, including:
[0118] When the candidate display areas corresponding to the first group of display contents and the second group of display contents overlap, if the overlapping candidate display areas are allocated to the first group of display contents and there is no candidate display area to be allocated to the second group of display contents, then candidate display areas are reselected for the first group of display contents and the overlapping candidate display areas are allocated to the second group of display contents; wherein the priority of the visualization data of the first group of display contents is higher than the priority of the visualization data of the second group of display contents.
[0119] In this embodiment, when there are multiple groups of display content to be displayed and the priority of the visualization data of each group of display content is different, after the corresponding candidate display area is selected for each group of display content, there may be a situation where the candidate display areas of two or more groups of display content overlap. In this case, pre-allocation can be performed to allocate the overlapping candidate display areas to the first group of display content with a higher priority, and the second group of display content can no longer be allocated the candidate display area. If the second group of display content has no other candidate display areas to be allocated, it is necessary to re-select candidate display areas for the first group of display content and allocate the overlapping candidate display areas to the second group of display content to ensure that each group of display content can be allocated to the target display area. For example, the candidate display areas corresponding to the first group of display content include display area 1 and display area 2, and the candidate display areas corresponding to the second group of display content include display area 2. Then, the target display area is selected for the first group of display content first. When the first group of display content selects display area 2 as the target display area, there is no candidate display area to be assigned to the second group of display content, and it is necessary to reselect display area 1 as the target display area for the first group of display content. At this time, the second group of display content can be assigned display area 2 as its target display area.
[0120] In some methods, if there are two groups of display contents with the same priority, the target display area can be allocated to any one of the groups of display contents first, that is, the display contents with the same priority are no longer prioritized, and one group can be randomly selected and allocated first, and the other group can be allocated later.
[0121] In some implementations, when there are multiple groups of display contents to be displayed, and the user has set display attribute information for some groups of display contents, while the display attribute information is not set for other groups of display contents, it is necessary to first allocate a target display area for the display contents with display attribute information set, and then allocate a target display area for the display contents without display attribute information set based on the remaining display areas to be allocated. It can be understood that the display contents with display attribute information such as display position, shape and size defined by the user are preferentially allocated a target display area that meets the user's requirements, so that the display contents that the user wants to display are displayed in the position area set by the user according to the display size and shape, and then the target display area is allocated to the display contents that the user does not require from the remaining unallocated display areas to be allocated, thereby meeting the user's needs to the greatest extent.
[0122] For multiple groups of display contents with display attribute information set, when the display attribute information of two or more groups of display contents overlaps, more specifically, when the display areas of the two or more groups of display contents are determined to overlap according to the display attribute information, a group of display contents is randomly selected from each group of display contents, and a target display area is allocated to the group of display contents according to the display attribute information of the group of display contents, and an error message is generated and prompted for the other groups of display contents that are not selected, so that the user can reconfigure the display attribute information of the other groups of display contents according to the prompted information. For example, the display attribute information of the two groups of display contents are both in the middle of the page, and the area determined by the size and shape of one group of display contents overlaps with the area determined by the size and shape of the other group of display contents. Since the two groups of display contents cannot be displayed in the same display area, the target display area can only be allocated according to the configuration information of one group of display contents, and the other group of display contents needs to be allocated after the configuration information is re-determined, or the user can readjust the display attribute information of the two groups of display contents so that the two groups of display contents are each displayed in the middle position without overlapping corresponding areas.
[0123] In some embodiments, the configuration information further includes a display position and a display shape of the basic data; determining a basic data area for displaying the basic data according to the target display area and the basic data includes:
[0124] Based on the basic data, determine the minimum area for displaying the basic data;
[0125] At a position corresponding to the display position in the target display area, the basic data area is determined according to the minimum area and the display shape.
[0126] In this embodiment, the user can also configure the display position and display shape of the basic data in the target display area. The minimum area of the area for displaying the basic data is determined based on the basic data, and then in the location area corresponding to the display position in the target display area, an area that is consistent with the display shape and has an area greater than or equal to the minimum area is selected as the basic data area. For example, if the display position is set to the top and the display shape is a rectangle, a rectangular area is selected from the top of the target display area, and the area of the rectangular area should be greater than or equal to the minimum area, and the rectangular area is used as the basic data area.
[0127] The minimum area of the basic data can be determined according to the type of the basic data. For example, if the basic data is text, the minimum area is the area of the smallest area that can display the text. Optionally, the user can also set the font, font size and other attributes of the text, so as to calculate the corresponding minimum area according to the set text attributes. If the basic data is a picture, the minimum area is the area corresponding to the picture size.
[0128] In some embodiments, determining a visualization area for displaying visualization data according to a target display area and a basic data area includes:
[0129] According to the target display area and the basic data area, determining the remaining area in the target display area except the basic data area;
[0130] Based on the remaining areas, determine the largest regular area;
[0131] Determine the visualization area based on the visualization data and the rule area.
[0132] In this embodiment, after the target display area and the basic data area are determined, the visualization area is further determined. Since the visualization area needs to occupy a certain area to display visualization data with a specific display form, the visualization area should be a regular area with a certain area, for example, a circular area that can display a pie chart, a rectangular area that can display a bar chart, etc. Therefore, the remaining area in the target display area except the basic data area is first determined, and based on the remaining area, a regular area with vertices within the remaining area and the largest area is determined, and based on the regular area and the visualization data, a visualization area for displaying the visualization data is determined.
[0133] In some embodiments, determining the visualization area according to the visualization data and the rule area includes:
[0134] Determine candidate display forms of the visualized data according to the data type of the visualized data;
[0135] Determine, according to the candidate display forms, a benchmark display area for displaying the candidate display forms;
[0136] If the reference display area is within the range of the rule area, the rule area is used as the visualization area.
[0137] In this embodiment, different data types of visualization data are suitable for different presentation forms. For example, for data with categories (e.g., different cities, different ages, different departments, etc.), it is suitable to be presented in the form of a pie chart or a histogram, and for data with a time sequence, it is suitable to be presented in the form of a line chart or a histogram. According to the data type of the visualization data, one or several presentation forms suitable for presenting the visualization data can be determined as candidate presentation forms. For each candidate presentation form, a corresponding base presentation area is provided for presenting the visualization data in the candidate presentation form. The base presentation area is the minimum area that can achieve the basic effect of the specific presentation form when presenting the visualization data in the specific presentation form. The basic effect can be determined according to the minimum resolution of the presentation form. For example, the base presentation area of a pie chart is the minimum circular area that can clearly display the text mark in the figure, and the base presentation area of a line chart is the minimum rectangular area that can clearly display the text mark in the figure.
[0138] After determining the reference display area of each candidate display form, it is determined whether the reference display area is within the range of the regular area. If so, the visual data with a specific display form can be fully displayed in the regular area, and the regular area can be used as the visualization area. Figure 4 As shown, the regular area is rectangular, the reference display area of the candidate display form is circular, and the rectangular regular area can cover the circular reference display area, then the regular area can be used as the visualization area; Figure 5 As shown, the regular area is rectangular, and the benchmark display area of the candidate display form is rectangular, but the rectangular regular area cannot cover the rectangular benchmark display area. If there are multiple candidate display forms and the regular area cannot cover the benchmark display areas of each candidate display form, an error message is generated and a prompt is given.
[0139] In some methods, when the display content includes multiple groups of visual data, each group of visual data needs to be assigned its own visualization area. After determining the rule area, the rule area can be divided into multiple sub-rule areas corresponding to the number of groups according to the number of groups of visual data. For each group of visual data, the candidate display form of the group of visual data is determined according to the data type of the group of visual data, and the corresponding benchmark display area is determined according to the candidate display form. The area that can cover the benchmark display area is selected from each sub-rule area as the visualization area of the group of visual data. The allocation rule of the sub-rule area can be flexibly set. For example, according to the order of the benchmark display area from large to small, the matching visualization area is selected from multiple sub-rule areas in order from large to small. It can also be ensured that each group of visual data is allocated to the corresponding visualization area by pre-allocation. The specific allocation rule is not limited. If each group of visual data cannot be successfully allocated to the visualization area according to a specific allocation rule, an error message is generated and the user is prompted.
[0140] In some embodiments, determining a target display form of the visualization data according to the visualization area includes:
[0141] According to the data type of the visualized data, the display form that best displays the visualized data in the visualization area is determined as the target display form.
[0142] In this embodiment, after the visualization area is determined, the target display form for displaying the visualization data in the visualization area is further determined. Since visualization data of different data types may have one or more suitable display forms, one or more suitable candidate display forms are first determined according to the data type of the visualization data, and for each candidate display form, the display effect in the visualization area is determined respectively, and the candidate display form with the best display effect is selected as the target display form. In some methods, the display effect can be evaluated from aspects such as readability and clarity. For example, a set of visualization data can be displayed in the form of a bar chart or a line chart, and the two display forms have the same clarity in a certain visualization area, and all kinds of symbols in the figure are clearly visible. However, such visualization data is more readable when presented in the form of a line chart, so the line chart form is used as the target display form; or, a set of visualization data has the same readability when displayed in the form of a bar chart or a line chart, but the bar chart has higher clarity in the visualization area, so the bar chart is used as the target display form; or, the user sets the display form of a set of visualization data according to his or her habits. If the set of visualization data can be clearly presented in the visualization area in the set display form, the set display form is directly used as the target display form.
[0143] In the page generation method provided in the embodiment of the present application, for the display content that needs to be presented on the page, the user can configure basic data, visualization data, display attribute information, display attribute information of basic data and other configuration items, and determine the target display area according to the various configuration information. Within the target display area, a basic data area for displaying the basic data and a visualization area for displaying the visualization data are determined, and then a target display form of the visualization data that can be presented with the best effect in the visualization area is determined, the basic data is displayed in the basic data area, and the visualization data is displayed in the visualization area according to the target display form, thereby generating a page that meets the user's personalized needs.
[0144] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0145] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. 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.
[0146] like Figure 6 As shown, the embodiment of the present application also provides a page generation device, including:
[0147] An acquisition module is used to acquire configuration information of display content; wherein the configuration information includes basic data and visualization data;
[0148] A target display area determination module determines a target display area of the display content on the page according to the configuration information;
[0149] A basic data area determination module, which determines a basic data area for displaying basic data according to a target display area and the basic data;
[0150] A visualization area determination module determines a visualization area for displaying visualization data according to a target display area and the basic data area; wherein both the basic data area and the visualization area are located within the range of the target display area;
[0151] A visualization form determination module determines the target display form of the visualization data according to the visualization area;
[0152] The display module displays basic data in the basic data area and displays visual data in the visualization area according to the target display format.
[0153] In some embodiments, the configuration information further includes display attribute information, and the display attribute information includes display position, size and shape;
[0154] The target display area determination module is used to use display position, size and shape as screening conditions to filter out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page; generate area matching rules based on basic data and / or visualization data; determine whether the candidate display area meets the area matching rules; if so, use the candidate display area as the target display area; if not, generate an error message.
[0155] In some embodiments, the target display area determination module is used to generate area matching rules and area allocation rules based on basic data and / or visualization data; filter out candidate display areas that meet the area matching rules from multiple display areas to be allocated on the page; and select a target display area that meets the area allocation rules from the candidate display areas.
[0156] In some embodiments, the acquisition module is used to acquire configuration information of multiple groups of display content, and the priority of the visualization data of each group of display content is different;
[0157] The target display area determination module is used to generate area allocation rules according to the visual data priority order of each group of display content; according to the visual data priority order of each group of display content, select the corresponding target display area for each group of display content from the candidate display areas in turn.
[0158] In some embodiments, the target display area determination module is used to, when there is overlap between the candidate display areas corresponding to the first group of display content and the second group of display content, if the overlapping candidate display areas are allocated to the first group of display content and there is no candidate display area to be allocated to the second group of display content, then reselect candidate display areas for the first group of display content and allocate the overlapping candidate display areas to the second group of display content; wherein the priority of the visualization data of the first group of display content is higher than the priority of the visualization data of the second group of display content.
[0159] In some embodiments, the configuration information also includes the display position and display shape of the basic data;
[0160] The basic data area determination module is used to determine the minimum area of the basic data display according to the basic data; at the position corresponding to the display position in the target display area, determine the basic data area according to the minimum area and the display shape.
[0161] In some embodiments, the visualization area determination module is used to determine the remaining area in the target display area except the basic data area based on the target display area and the basic data area; determine the regular area with the largest area based on the remaining area; and determine the visualization area based on the visualization data and the regular area.
[0162] In some embodiments, the visualization area determination module is used to determine candidate display forms of visualization data based on the data type of the visualization data; determine a reference display area for displaying the candidate display forms based on the candidate display forms; if the reference display area is within the range of the rule area, use the rule area as the visualization area.
[0163] In some embodiments, the visualization form determination module is used to determine the display form of the visualization data with the best display effect in the visualization area according to the data type of the visualization data, as the target display form.
[0164] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0165] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0166] Figure 7 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0167] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0168] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0169] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0170] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0171] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0172] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0173] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0174] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape 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.
[0175] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0176] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0177] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0178] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. A page generation method, characterized in that: include: Obtaining configuration information of the display content; wherein the configuration information includes basic data and visualization data; Determine a target display area of the display content on the page according to the configuration information; Determining a basic data area for displaying the basic data according to the target display area and the basic data; Determine a visualization area for displaying the visualization data according to the target display area and the basic data area; wherein both the basic data area and the visualization area are located within the range of the target display area; Determining a target display form of the visualization data according to the visualization area; The basic data is displayed in the basic data area, and the visualization data is displayed in the visualization area according to the target display form.
2. The method according to claim 1, characterized in that The configuration information also includes display attribute information, and the display attribute information includes display position, size and shape; Determining a target display area of the display content on a page according to the configuration information includes: Using the display position, size and shape as screening conditions, screening out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page; Generate a region matching rule according to the basic data and / or the visualization data; Determining whether the candidate display area meets the area matching rule; If satisfied, taking the candidate display area as the target display area; If not satisfied, an error message is generated.
3. The method according to claim 1, characterized in that: Determining a target display area of the display content on a page according to the configuration information includes: Generate region matching rules and region allocation rules according to the basic data and / or visualization data; Filtering out candidate display areas that meet the area matching rule from multiple display areas to be allocated on the page; A target display area that meets the area allocation rule is selected from the candidate display areas.
4. The method according to claim 3, characterized in that The obtaining of the configuration information of the display content includes: obtaining the configuration information of multiple groups of display content, wherein the priority of the visualization data of each group of display content is different; Generate a region allocation rule according to the basic data and / or the visualization data, including: Generating the area allocation rule according to the visual data priority order of each group of display content; Selecting a target display area that meets the area allocation rule from the candidate display areas includes: According to the priority order of the visualization data of each group of display content, a corresponding target display area is selected for each group of display content from the candidate display areas in turn.
5. The method according to claim 4, characterized in that According to the visual data priority order of each group of display content, a corresponding target display area is selected for each group of display content from the candidate display areas in turn, including: When the candidate display areas corresponding to the first group of display contents and the second group of display contents overlap, if the overlapping candidate display areas are allocated to the first group of display contents and there is no candidate display area to be allocated to the second group of display contents, then candidate display areas are reselected for the first group of display contents and the overlapping candidate display areas are allocated to the second group of display contents; wherein the priority of the visualization data of the first group of display contents is higher than the priority of the visualization data of the second group of display contents.
6. The method according to claim 1, characterized in that The configuration information also includes the display position and display shape of the basic data; Determining a basic data area for displaying the basic data according to the target display area and the basic data includes: Determine, based on the basic data, a minimum area for displaying the basic data; At a position in the target display area corresponding to the display position, the basic data area is determined according to the minimum area and the display shape.
7. The method according to claim 1, characterized in that Determining a visualization area for displaying the visualization data according to the target display area and the basic data area includes: Determine, according to the target display area and the basic data area, a remaining area in the target display area except the basic data area; Based on the remaining area, determining the largest regular area; The visualization area is determined according to the visualization data and the regular area.
8. The method according to claim 7, characterized in that Determining the visualization area according to the visualization data and the rule area includes: Determining a candidate display form of the visualization data according to the data type of the visualization data; Determining a reference display area for displaying the candidate display forms according to the candidate display forms; If the reference display area is within the range of the regular area, the regular area is used as the visualization area.
9. The method according to claim 1, characterized in that: Determining a target display form of the visualization data according to the visualization area includes: According to the data type of the visualization data, a display form of the visualization data with the best display effect in the visualization area is determined as the target display form.
10. A page generating device, characterized in that: include: An acquisition module is used to acquire configuration information of display content; wherein the configuration information includes basic data and visualization data; A target display area determination module, which determines a target display area of the display content on the page according to the configuration information; A basic data area determination module, which determines a basic data area for displaying the basic data according to the target display area and the basic data; A visualization area determination module, which determines a visualization area for displaying the visualization data according to the target display area and the basic data area; wherein the basic data area and the visualization area are both located within the range of the target display area; A visualization form determination module, which determines a target display form of the visualization data according to the visualization area; A display module displays the basic data in the basic data area, and displays the visual data in the visual area according to the target display form.
11. The device according to claim 10, characterized in that The configuration information also includes display attribute information, and the display attribute information includes display position, size and shape; The target display area determination module is used to filter out candidate display areas that meet the screening conditions from multiple display areas to be allocated on the page using the display position, size and shape as screening conditions; Generate a region matching rule according to the basic data and / or the visualization data; Determine whether the candidate display area meets the area matching rule; if so, use the candidate display area as the target display area; If not satisfied, an error message is generated.
12. The device according to claim 10, characterized in that The target display area determination module is used to generate an area matching rule and an area allocation rule according to the basic data and / or the visualization data; and to screen out candidate display areas that meet the area matching rule from a plurality of display areas to be allocated on the page; A target display area that meets the area allocation rule is selected from the candidate display areas.
13. The device according to claim 12, characterized in that The acquisition module is used to acquire configuration information of multiple groups of display contents, and the priority of the visualization data of each group of display contents is different; The target display area determination module is used to generate the area allocation rule according to the priority order of the visualization data of each group of display content; and select the corresponding target display area for each group of display content from the candidate display areas in turn according to the priority order of the visualization data of each group of display content.
14. The device according to claim 13, characterized in that The target display area determination module is used for, when there is overlap between the candidate display areas corresponding to the first group of display content and the second group of display content, if the overlapping candidate display areas are allocated to the first group of display content and there is no candidate display area to be allocated to the second group of display content, then reselecting candidate display areas for the first group of display content and allocating the overlapping candidate display areas to the second group of display content; wherein the priority of the visualization data of the first group of display content is higher than the priority of the visualization data of the second group of display content.
15. The device according to claim 10, characterized in that The configuration information also includes the display position and display shape of the basic data; The basic data area determination module is used to determine the minimum area for displaying the basic data according to the basic data; At a position in the target display area corresponding to the display position, the basic data area is determined according to the minimum area and the display shape.
16. The device according to claim 10, characterized in that The visualization area determination module is used to determine the remaining area in the target display area except the basic data area according to the target display area and the basic data area; Based on the remaining area, determining the largest regular area; The visualization area is determined according to the visualization data and the regular area.
17. The device according to claim 16, characterized in that The visualization area determination module is used to determine a candidate display form of the visualization data according to the data type of the visualization data; and to determine a reference display area for displaying the candidate display form according to the candidate display form; If the reference display area is within the range of the regular area, the regular area is used as the visualization area.
18. The device according to claim 10, characterized in that The visualization form determination module is used to determine, according to the data type of the visualization data, a display form of the visualization data with the best display effect in the visualization area as the target display form.
19. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 9.
Citation Information
Patent Citations
Man-machine interaction method and device, storage medium and electronic equipment
CN111488089A
Method for intelligently generating large visual screen through multi-data-source configurable chart
CN113849554A
Data visualization method for realizing large data screen
CN114116686A
Self-adaptive user interface generation method based on front-end technology
CN117093199A
Automated chart generation within a document generation application using heuristic model with predefined data types
US10380778B2
