Report data processing method, device, computer equipment and storage medium

By recalculating and laying out the target area of ​​the report, the problem of unstable layout changes when the online report data changes is solved, achieving layout stability and improving user experience.

CN113868258BActive Publication Date: 2024-10-29NANJING SUNING ELECTRONIC INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111159889.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-10-29
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

It is difficult for existing online reports to maintain the layout structure designed by users when data changes, resulting in unstable layout changes and affecting user experience.

Method used

By obtaining the initial area set and target area data of the report, the target area location information is calculated, and based on the positional relationship between the initial area and the target area, the target area is rearranged to generate a new layout so that it is as close as possible to the user's original design. Layout structure.

Benefits of technology

It achieves the effect of keeping the layout stable when the data changes. There is no need to worry about the layout problem after the data changes after filling. The new layout is as close as possible to the layout structure originally designed by the user, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868258B_ABST
    Figure CN113868258B_ABST
Patent Text Reader

Abstract

The present application relates to a report data processing method, device, computer equipment and storage medium. The method includes: obtaining an initial area set corresponding to a report to be processed, the initial area set includes at least one initial area, and the initial area is associated with initial area location information and initial area data information; obtaining target area data corresponding to each initial area according to the initial area data information; determining a target area set according to the target area data and the initial area location information, the target area set includes at least one target area, and the target area is associated with target area location information; determining the regional position relationship of each target area according to the initial area location information and the target area location information; laying out each target area according to the regional position relationship, and obtaining a processed report. The method can calculate a new layout after data changes according to the report layout designed by the user, so that the new layout is as close as possible to the layout structure originally designed by the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a report data processing method, device, computer equipment and storage medium. Background Art

[0002] Before computers, people used paper and pen to record data. After computers appeared, people used computer data processing and interface design functions to generate and display reports. With the popularization and rapid development of computers and the Internet, many jobs have been transferred from local to online. For example, the onlineization of commonly used software such as WORD and EXCEL has greatly improved office efficiency and facilitated collaborative work.

[0003] The onlineization of EXCEL has also spawned online reports that use EXCEL as the main display. The main features of such reports are dynamic data, diversified formats, support for complex EXCEL functions, and complete separation of report data and report formats. Users can only be responsible for designing the layout, while data is provided by indicators and dimension services. Designers can make very complex report formats. There may be multiple data rendering areas in a report, and these areas can achieve dynamic changes by filling in data such as indicators and dimensions.

[0004] Since online reports have the characteristic of dynamic data, the data may be inconsistent each time the report is queried, and the change of data will also affect the change of regional layout in the report. How to display the data as much as possible according to the layout designed by the user when the data changes is an urgent problem that needs to be solved. Summary of the invention

[0005] Based on this, it is necessary to provide a report data processing method, device, computer equipment and storage medium to address the above technical problems, which can calculate the new layout after the data changes according to the report layout designed by the user, without worrying about the layout problem after the data changes after filling, and the new layout should be as close as possible to the layout structure originally designed by the user.

[0006] A report data processing method, the method comprising:

[0007] Acquire an initial region set corresponding to the report to be processed, the initial region set including at least one initial region, and the initial region is associated with initial region location information and initial region data information;

[0008] Acquire target area data corresponding to each initial area in the initial area set according to the initial area data information;

[0009] Determine a target area set according to the target area data and the initial area position information, the target area set including at least one target area, and the target area is associated with the target area position information;

[0010] Determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information;

[0011] The target areas in the target area set are laid out according to the area position relationship to obtain a processed report.

[0012] In one of the embodiments, a target area set is determined based on the target area data and the initial area position information, the target area set includes at least one target area, and the target area is associated with the target area position information, including: calculating the number of rows and columns occupied by the target area data corresponding to each initial area, obtaining the starting row and starting column corresponding to each initial area, and calculating the target area position information corresponding to each target area based on the number of rows, the number of columns and the starting rows and starting columns.

[0013] In one of the embodiments, the regional position relationship of each target area in the target area set is determined according to the initial area position information and the target area position information, including: determining the current initial area from the initial area set, determining the associated initial area corresponding to the current initial area according to a preset initial area order, judging the initial position relationship between the current initial area and the associated initial area according to the initial area position information, determining the current target area corresponding to the current initial area from the target area set, determining the associated target area corresponding to the current target area according to the preset initial area order, judging the target position relationship between the current target area and the associated target area according to the target area position information, when the initial position relationship is the same as the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the target position relationship, and when the initial position relationship is different from the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the initial position relationship.

[0014] In one of the embodiments, the initial position relationship between the current initial area and the associated initial area is determined based on the initial area position information, including: determining the left line segment and the right line segment corresponding to the current initial area based on the initial area position information, determining the upper line segment corresponding to the associated initial area based on the initial area position information, and when the upper line segment intersects with the left line segment and the right line segment, the initial position relationship is determined to be that the associated initial area is arranged in the first position of the current initial area; or, determining the upper line segment and the lower line segment corresponding to the current initial area based on the initial area position information, determining the left line segment corresponding to the associated initial area based on the initial area position information, and when the left line segment intersects with the upper line segment and the lower line segment, the initial position relationship is determined to be that the associated initial area is arranged in the second position of the current initial area.

[0015] In one of the embodiments, each target area in the target area set is laid out according to the regional position relationship to obtain a processed report, including: obtaining the current target area and the corresponding associated target area, obtaining the associated starting row and the associated starting column corresponding to the associated target area, obtaining the current starting row and the current starting column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated starting row, the associated starting column and the current starting row and the current starting column, if not, laying out the current target area and the associated target area according to the regional position relationship, if yes, obtaining the intermediate interval, the intermediate interval being the initial interval between the current initial area and the corresponding associated target area, the current target area being the area after the current initial area is filled with target area data, and laying out the current target area and the associated target area according to the intermediate interval and the regional position relationship.

[0016] In one of the embodiments, each target area in the target area set is laid out according to the area position relationship, and before the processed report is obtained, it also includes: obtaining the current starting row number and the current starting column number corresponding to the current initial area, obtaining the target starting row number and the target starting column number corresponding to the current target area, the current target area is the area after the current initial area is filled with the matching target area data, the current area offset corresponding to the current target area is calculated according to the current starting row number, the current starting column number and the target starting row number and the target starting column number, the first area offset of the list associated area to the right of the current target area is calculated, and the second area offset of the list associated area below the current target area is calculated.

[0017] In one of the embodiments, each target area in the target area set is laid out according to the area position relationship to obtain a processed report, including: obtaining current cell position information corresponding to the current initial area, the current initial area includes at least one current cell, the current cell is associated with the current cell position information, the target cell position corresponding to the current cell is calculated according to the current cell position information and the current area offset, the current target area is obtained according to the target cell position layout, the next initial area is determined, the next initial area is determined as the current initial area, and the step of returning to obtain the current cell position information corresponding to the current initial area is returned until the processed report is obtained.

[0018] A report data processing device, the device comprising:

[0019] A first acquisition module is used to acquire an initial region set corresponding to the report to be processed, the initial region set including at least one initial region, and the initial region is associated with initial region location information and initial region data information;

[0020] A second acquisition module is used to acquire target area data corresponding to each initial area in the initial area set according to the initial area data information;

[0021] A first determination module is used to determine a target area set according to the target area data and the initial area position information, the target area set includes at least one target area, and the target area is associated with the target area position information;

[0022] A second determination module is used to determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information;

[0023] The layout module is used to layout each target area in the target area set according to the area position relationship to obtain a processed report.

[0024] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0025] Acquire an initial region set corresponding to the report to be processed, the initial region set including at least one initial region, and the initial region is associated with initial region location information and initial region data information;

[0026] Acquire target area data corresponding to each initial area in the initial area set according to the initial area data information;

[0027] Determine a target area set according to the target area data and the initial area position information, the target area set including at least one target area, and the target area is associated with the target area position information;

[0028] Determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information;

[0029] The target areas in the target area set are laid out according to the area position relationship to obtain a processed report.

[0030] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0031] Acquire an initial region set corresponding to the report to be processed, the initial region set including at least one initial region, and the initial region is associated with initial region location information and initial region data information;

[0032] Acquire target area data corresponding to each initial area in the initial area set according to the initial area data information;

[0033] Determine a target area set according to the target area data and the initial area position information, the target area set including at least one target area, and the target area is associated with the target area position information;

[0034] Determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information;

[0035] The target areas in the target area set are laid out according to the area position relationship to obtain a processed report.

[0036] According to the report data processing method, device, computer equipment and storage medium, the user can customize the layout of each initial area in the report to be processed and the initial area data information of each initial area, obtain the corresponding target area data according to the initial area data information, calculate the target area position information according to the target area data and the initial area position information of the initial area, and thus generate the target area. Further, the regional position relationship between each target area is determined according to the target area position information and the initial area position information, and finally, each target area is laid out according to the regional position relationship to obtain a processed report. Therefore, according to the report layout designed by the user, the new layout after the data changes can be calculated, without worrying about the layout problem after the data changes after filling, and the new layout should be as close as possible to the layout structure originally designed by the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 An application environment diagram of a report data processing method in an embodiment;

[0038] Figure 2 A flowchart of a report data processing method in one embodiment;

[0039] Figure 2A This is a schematic diagram of an interface of a report to be processed in one embodiment;

[0040] Figure 2B A schematic diagram of an interface of a processed report in one embodiment;

[0041] Figure 3 A schematic diagram of a flow chart of a target area set determination step in one embodiment;

[0042] Figure 4 A schematic diagram of a flow chart of a step of determining a regional position relationship in one embodiment;

[0043] Figure 5 A schematic diagram of a flow chart of an initial position relationship determination step in an embodiment;

[0044] Figure 5A A schematic diagram of obtaining an initial position relationship in one embodiment;

[0045] Figure 6 A schematic diagram of a flow chart of an initial position relationship determination step in an embodiment;

[0046] Fig. 6AA schematic diagram of obtaining an initial position relationship in one embodiment;

[0047] Figure 7 A flowchart of a report layout step in an embodiment;

[0048] Fig. 7A A schematic diagram of a report to be processed in one embodiment;

[0049] Figure 7B A schematic diagram of a report to be processed in one embodiment;

[0050] Figure 8 A flowchart of a report data processing method in one embodiment;

[0051] Fig. 9 A flowchart of a report layout step in an embodiment;

[0052] Fig. 9A is a schematic diagram of the layout of the target area in one embodiment;

[0053] Fig.10 A schematic diagram of a linked list structure of a region object in one embodiment;

[0054] Fig.11 is a structural block diagram of a report data processing device in an embodiment;

[0055] Fig.12 is an internal structure diagram of a computer device in one embodiment;

[0056] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] The report data processing method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0059] Specifically, the terminal 102 creates a new report to be processed, creates at least one initial region in the new report to be processed, obtains an initial region set, and sends it to the server 104. The server 104 obtains the initial region set corresponding to the report to be processed, the initial region set includes at least one initial region, the initial region is associated with initial region location information and initial region data information, obtains target region data corresponding to each initial region in the initial region set according to the initial region data information, determines a target region set according to the target region data and the initial region location information, the target region set includes at least one target region, the target region is associated with target region location information, determines the regional position relationship of each target region in the target region set according to the initial region location information and the target region location information, and lays out each target region in the target region set according to the regional position relationship to obtain a processed report. Finally, the server 104 returns the processed report to the terminal 102.

[0060] In another embodiment, the terminal 102 creates a new report to be processed, creates at least one initial area in the new report to be processed, obtains an initial area set, the initial area is associated with initial area location information and initial area data information, obtains target area data corresponding to each initial area in the initial area set according to the initial area data information, determines a target area set according to the target area data and the initial area location information, the target area set includes at least one target area, the target area is associated with target area location information, determines an area position relationship between each target area in the target area set according to the initial area location information and the target area location information, arranges each target area in the target area set according to the area position relationship, and obtains a processed report.

[0061] In one embodiment, Figure 2 As shown, a report data processing method is provided, which is applied to Figure 1 The terminal or server in the example is used to illustrate, including the following steps:

[0062] Step 202: obtaining an initial region set corresponding to the report to be processed, wherein the initial region set includes at least one initial region, and the initial region is associated with initial region location information and initial region data information.

[0063] Among them, the pending report here refers to the Excel report that the user has designed. The user can create a new report in the web version of the report design interface according to his or her own preferences, actual business needs, actual product needs or actual application scenarios, create an initial area in the report, and configure the initial area data information to be displayed in the initial area. When creating the initial area in the report, the initial area position information corresponding to the initial area is recorded, and the design information of the report is saved together to the database. The design information includes the initial area position information and initial area data information corresponding to each initial area.

[0064] The so-called initial area location information refers to the location information related to the initial area in the report, including but not limited to the starting row, starting column, ending row, and ending column of the initial area, and the initial area data information is the indicators, dimensions, filtering conditions, and other information that need to be queried for the initial area.

[0065] For example, Figure 2A As shown, Figure 2A A schematic diagram of an interface of a report to be processed in one embodiment is shown. Figure 2A The pending report is designed by the user according to actual needs. The pending report includes four initial regions, each of which is associated with initial region location information and initial region data information.

[0066] Step 204: acquiring target area data corresponding to each initial area in the initial area set according to the initial area data information.

[0067] The target area data is the area data that needs to be filled in the initial area, and the target area data corresponding to each initial area can be obtained by querying according to the initial area data information. Specifically, the matching area data set is obtained according to the initial area identifier, and then the target area data is obtained by filtering from the area data set according to the initial area data information.

[0068] Step 206: determine a target area set according to the target area data and the initial area position information, the target area set including at least one target area, and the target area is associated with the target area position information.

[0069] Since the target area data may not match the initial area location information, that is, the initial area may not be enough to fill the target area data, a new area, that is, the target area, needs to be determined. The target area here completely matches the target area data, that is, the area size relationship of the target area is determined based on the target area data.

[0070] Specifically, the specific area location information that needs to be filled in the target area can be calculated based on the target area data, including but not limited to the number of rows and columns occupied by the target area data. Furthermore, the target area can be determined based on the calculated specific area location information and the initial area location information. Specifically, the target area location information can be calculated from the location information of the new target area and the initial area location information, and the target area can be generated based on the target area location information.

[0071] Step 208: determining the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information.

[0072] Among them, the regional position relationship here is used to describe the position layout relationship between each target area in the target area set. Specifically, the position relationship between each target area is determined by the initial area position information and the target area position information. The initial area position information is the report layout position designed by the user. In order for the new layout to be as close as possible to the user's original design layout result, it is necessary to determine the layout method between each target area according to the layout method between the initial areas described by the initial area position information.

[0073] For example, the initial area position information can be used to determine that the initial area A is above the initial area B. The target area position information includes the position information of the target area A and the position information of the target area B. Based on the fact that the initial area A is above the initial area B, the regional position relationship of the target areas can be determined as target area A is above target area B.

[0074] Step 210 , layout each target area in the target area set according to the area position relationship, and obtain a processed report.

[0075] Specifically, according to the layout of the target areas described by the regional position relationship, the target areas in the target area set are laid out to obtain a processed report. When laying out the target areas in the target area set, the area intervals between the initial areas can be considered, so that the intervals between the target areas after layout are still laid out according to the initially designed area intervals, which is closer to the user's design report style.

[0076] For example, Figure 2B As shown, Figure 2B A schematic diagram of an interface of a processed report in one embodiment is shown. Figure 2A The report to be processed is designed by the user according to actual business needs and hobbies. The report to be processed includes four initial areas. The initial areas in the report to be processed are arranged according to the layout designed by the user, that is, initial area 1 is located above initial area 2, initial areas 3 and initial areas 4 are located to the right of initial area 1, and initial area 3 is located above initial area 4. Figure 2B For processed reports, the layout of each target area in the target area set is laid out according to the regional position relationship. Target area 1 is located above target area 2, target areas 3 and 4 are located to the right of target area 1, and target area 3 is located above target area 4. After the regional data of the initial area is filled, there is no need to worry about the layout problem after the data changes after filling, and the new layout is as close to the user's original layout structure as possible.

[0077] In the above report data processing method, the user can customize the layout of each initial area in the report to be processed and the initial area data information of each initial area, obtain the corresponding target area data according to the initial area data information, calculate the target area position information according to the target area data and the initial area position information of the initial area, and thus generate the target area. Further, the regional position relationship between each target area is determined according to the target area position information and the initial area position information, and finally, each target area is laid out according to the regional position relationship to obtain a processed report. Therefore, according to the report layout designed by the user, the new layout after the data changes can be calculated, and there is no need to worry about the layout problem after the data changes after filling, and the new layout should be as close as possible to the layout structure originally designed by the user.

[0078] In one embodiment, Figure 3 As shown, a target area set is determined according to the target area data and the initial area position information, the target area set includes at least one target area, and the target area is associated with the target area position information, including:

[0079] Step 302, calculating the number of rows and columns occupied by the target area data corresponding to each initial area.

[0080] Step 304, obtaining the starting row and starting column corresponding to each initial area.

[0081] Step 306 , calculating the target area position information corresponding to each target area according to the number of rows, the number of columns, the starting rows, and the starting columns.

[0082] Specifically, the number of rows and columns occupied by the target area data corresponding to each initial area is calculated. For example, if the dimensions are displayed on rows when designing the area, there will be 100 rows of data if 100 dimensions are queried, and if the indicators are displayed on columns, there will be 3 columns of data if 3 indicators are displayed.

[0083] Furthermore, the starting row and starting column of each initial region are obtained, and the target region position information can be calculated based on the starting row, starting column and the number of rows and columns occupied by the corresponding target region data. Specifically, the starting row and starting column of the initial region are kept unchanged, that is, the starting row and starting column of the target region are equal to the starting row and starting column of the initial region, and the ending row and ending column of the target region are calculated based on the number of rows and columns occupied by the target region data plus the starting row and starting column, so as to obtain the target region position information.

[0084] For example, the starting row and column of the initial area A are (1, 1), and the target area data corresponding to the initial area A is 10 rows and 10 columns. Then the calculated starting row and column of the target area A remain unchanged, and the ending row and column are (10, 10), and the target area position information of the target area A is obtained.

[0085] In one embodiment, Figure 4 As shown, the regional position relationship of each target area in the target area set is determined according to the initial area position information and the target area position information, including:

[0086] Step 402: determine a current initial region from the initial region set, and determine an associated initial region corresponding to the current initial region according to a preset initial region sequence.

[0087] Step 404: Determine the initial position relationship between the current initial region and the associated initial region according to the initial region position information.

[0088] The current initial region is the initial region currently being processed, and an initial region is randomly determined from the initial region set as the current initial region, or the initial regions are sequentially determined as the current initial region according to a preset region order of the initial regions.

[0089] The preset area order is the traversal order between the initial areas, and the user's design order may be determined as the preset initial area order. Specifically, after determining the current initial area, the associated initial area corresponding to the current initial area is determined according to the preset initial area order. The associated initial area may be the initial area to the right and / or the initial area below the current initial area. Further, based on the initial area position information, the initial position relationship between the current initial area and the associated initial area is determined. The so-called initial position relationship is used to describe the position relationship between the associated initial area and the current initial area. If there are multiple associated initial areas, the initial position relationship with the current initial area is determined one by one.

[0090] Step 406: determine a current target area corresponding to the current initial area from the target area set, and determine an associated target area corresponding to the current target area according to a preset initial area sequence.

[0091] Step 408: Determine the target position relationship between the current target area and the associated target area according to the target area position information.

[0092] Among them, the current target area corresponds to the current initial area, and is the target area after the current initial area is filled with regional data. Specifically, the current target area corresponding to the current initial area can be searched from the target area set. Similarly, the associated target area corresponding to the current target area is determined according to the preset initial area sequence. In fact, the associated target area is also the target area for filling regional data with the associated initial area. Further, according to the target area position information, the target position relationship between the current target area and the associated target area is determined.

[0093] Step 410: When the initial position relationship is the same as the target position relationship, determine that the region position relationship between the current target region position and the associated target region is the target position relationship.

[0094] Step 412: When the initial position relationship is different from the target position relationship, determine the region position relationship between the current target region position and the associated target region as the initial position relationship.

[0095] Specifically, in order to ensure that after the initial area is filled with regional data, there is no need to worry about the layout problem after the data changes after filling, and the new layout is as close as possible to the user's original layout structure, it is necessary to detect whether the initial position relationship is the same as the target position relationship. If the initial position relationship is the same as the target position relationship, it means that the layout of the new target area maintains the user's original layout structure, and determines that the regional position relationship between the current target area position and the associated target area is the target position relationship.

[0096] On the contrary, if the initial position relationship is different from the target position relationship, it means that the layout of the new target area has undergone serious changes and is completely different from the user's original layout structure. This is unqualified. Therefore, the regional position relationship between the current target area position and the associated target area needs to be determined as the initial position relationship so that the new layout can be as close as possible to the user's original layout structure.

[0097] In one embodiment, Figure 5 As shown, judging the initial position relationship between the current initial area and the associated initial area according to the initial area position information includes:

[0098] Step 502: Determine the left line segment and the right line segment corresponding to the current initial area according to the initial area position information.

[0099] Step 504: Determine the upper line segment corresponding to the associated initial area according to the initial area position information.

[0100] Step 506: When the upper line segment intersects with the left line segment and the right line segment, it is determined that the initial position relationship is that the associated initial area is laid out in the first position of the current initial area.

[0101] Specifically, after the current initial area is determined from the initial area set, the starting row and starting column of the current initial area are used as the starting point, and the target number of rows and starting column are used as the end point to obtain the left line segment. Similarly, the starting row and ending column of the current initial area are used as the starting point, and the target number of rows and ending column are used as the end point to obtain the right line segment. Then the associated initial area corresponding to the current initial area is obtained, and the starting row and starting column of the associated initial area are used as the starting point, and the starting row and ending column are used as the end point to obtain the upper line segment. Further, it is determined whether the upper line segment of the associated initial area intersects with the left line segment and the right line segment of the current initial area. The intersection can also be between the upper line segment of the associated initial area and the left line segment and the right line segment of the current initial area. If so, the initial position relationship is determined to be that the associated initial area is arranged in the first position of the current initial area. Among them, the first position can be determined according to the actual business situation, actual business needs or actual application scenarios, and the first position can be, for example, below.

[0102] For example, Figure 5A As shown, Figure 5A A schematic diagram of obtaining the initial position relationship in one embodiment is shown. Region A is the current initial region, and region B is the associated initial region. A line segment A is obtained by taking the starting row (y1) and starting column (x1) of region A as the starting point, and 1048576 (the maximum number of rows in EXCEL) (y2) and the starting column (x2) as the end point. A line segment B is obtained by taking the starting row (y3) and the ending column (x3) of the current region as the starting point, and 1048576 (the maximum number of rows in EXCEL) (y4) and the ending column (x4) as the end point. Then obtain the upper edge lines of other regions, such as Figure 5A As shown, take the starting row (y1) and starting column (x1) of region B as the starting point, and the starting row (y2) and ending column (x2) as the end point to obtain line segment C. Determine whether line segment C intersects with line segments A and B, or whether line segment C is between line segments A and B. If so, store region B in the list below region A.

[0103] In one embodiment, Figure 6 As shown, judging the initial position relationship between the current initial area and the associated initial area according to the initial area position information includes:

[0104] Step 602: Determine the upper line segment and the lower line segment corresponding to the current initial area according to the initial area position information.

[0105] Step 604: Determine the left line segment corresponding to the associated initial area according to the initial area position information.

[0106] Step 606: When the left line segment intersects with the upper line segment and the lower line segment, it is determined that the initial position relationship is that the associated initial area is laid out in the second position of the current initial area.

[0107] Specifically, the starting row and starting column of the current initial region are used as the starting point, and the starting row and target column number are used as the end point to obtain the upper line segment corresponding to the current initial region. Similarly, the ending row and starting column of the current initial region are used as the starting point, and the ending row and target column number are used as the end point to obtain the lower line segment corresponding to the current initial region. Then, the associated initial region corresponding to the current initial region is obtained, and the starting row and starting column of the associated initial region are used as the starting point, and the ending row and starting column are used as the end point to obtain the left line segment corresponding to the associated initial region.

[0108] Further, it is determined whether the left line segment of the associated initial area intersects with the upper line segment and the lower line segment of the current initial area, or whether the left line segment of the associated initial area is between the upper line segment and the lower line segment of the current initial area. If so, the initial position relationship is determined to be that the associated initial area is arranged in the second position of the current initial area. The second position can be determined according to actual business conditions, actual business needs or actual application scenarios, and the second position can be, for example, the right side.

[0109] For example, Fig. 6A As shown, Fig. 6A A schematic diagram of obtaining the initial position relationship in one embodiment is shown. Region A is the current initial region, and region B is the associated initial region. A line segment A is obtained by taking the starting row (y1) and starting column (x1) of region A as the starting point, and the starting row (y1) and 16384 (the maximum number of columns in EXCEL) (x2) as the end point. A line segment B is obtained by taking the ending row (y3) and starting column (x3) of the current region as the starting point, and the ending row (y4) and 16384 (the maximum number of columns in EXCEL) (x4) as the end point. Then obtain the left line of other regions, such as Fig. 6A As shown, take the starting row (y1) and starting column (x1) of region B as the starting point, and the ending row (y2) and starting column (x2) as the end point to obtain line segment C. Determine whether line segment C intersects with line segments A and B, or whether line segment C is between line segments A and B. If so, store region B in the list to the right of region A.

[0110] It should be noted that, according to the target area position information, the target position relationship between the current target area and the associated target area can also be determined according to Figure 5 or Figure 6 The judgment method is used, and the same principle is used, so I will not repeat it here.

[0111] In one embodiment, Figure 7 As shown, each target area in the target area set is laid out according to the regional position relationship, and a processed report is obtained, including:

[0112] Step 702: Acquire the current target area and the corresponding associated target area.

[0113] Step 704, obtaining the associated start row and the associated start column corresponding to the associated target area, and obtaining the current start row and the current start column corresponding to the current target area.

[0114] Step 706 , judging whether the associated target area is covered by the current target area according to the associated start row, the associated start column and the current start row and the current start column.

[0115] Step 708: If not, the current target area and the associated target areas are laid out according to the area position relationship.

[0116] Specifically, after determining the current target area, the target area to the right and the target area below the current target area can be determined as associated target areas, and the associated starting row and the associated starting column of the associated target area in the report to be processed are obtained. At the same time, the current starting row and the current starting column of the current initial target area in the report to be processed are obtained.

[0117] Further, by associating the start row, the start column, the current start row, and the current start column, it is determined whether the associated target area is covered by the current target area. Specifically, if the start row of the associated target area is greater than the start row of the current target area, the end row of the associated target area is less than the end row of the current target area, the start column of the associated target area is greater than the start column of the current target area, and the end column of the associated target area is less than the end column of the current target area, it can be determined that the associated target area is covered by the current target area. Otherwise, the associated target area is not covered by the current target area, and the current target area and the associated target area can be laid out according to the regional position relationship.

[0118] Step 710, if any, obtain the intermediate interval, the intermediate interval is the initial interval between the current initial area and the corresponding associated target area, and the current target area is the area after the current initial area is filled with target area data.

[0119] Step 712: Layout the current target area and the associated target areas according to the intermediate interval and the area position relationship.

[0120] Among them, when it is determined that the associated target area is covered by the current target area, in order to make the new target area obtained after the initial area is completely filled with data, it can be as close to the user's design style as possible. Therefore, when the associated target area is covered by the current target area, it is necessary to adjust the layout of the associated target area and the current target area. Specifically, the middle interval is obtained. The so-called middle interval is the original interval between the initial areas when the user is designing, that is, the middle interval is the initial interval between the current initial area and the corresponding associated target area. Further, the current target area and the associated target area are rearranged according to the middle interval and the area position relationship, so that the interval between the current target area and the associated target area remains consistent with the original interval during design, which can solve the problem of conflict and overlap between the associated target area and the current target area, and the area will not conflict with other areas after the area changes, avoiding problems such as area overlap and cell coverage.

[0121] For example, Fig. 7A Shown and Figure 7B As shown, Fig. 7A and Figure 7B A schematic diagram showing a report to be processed in one embodiment is shown. Fig. 7A The current target area and the associated target area are conflicting, that is, the associated target area is covered by the current target area. Therefore, the current initial area corresponding to the current target area is obtained when the user is designing. The design interval between the associated initial area corresponding to the associated target area is 2 grids. Then, the current target area and the associated target area are re-arranged according to the design interval and the regional position relationship, and the current target area and the associated target area are obtained. Figure 7B As shown, Figure 7B The displayed current target area and associated target area not only avoid area conflicts, but also can be as close to the user's design style as possible.

[0122] In one embodiment, Figure 8 As shown, before the target areas in the target area set are laid out according to the area position relationship and the processed report is obtained, the following is also included:

[0123] Step 802, obtaining the current starting row number and the current starting column number corresponding to the current initial area.

[0124] Step 804, obtaining the target starting row number and the target starting column number corresponding to the current target area, where the current target area is the area after the current initial area is filled with the matching target area data.

[0125] Step 806, calculating the current region offset corresponding to the current target region according to the current starting row number, the current starting column number and the target starting row number and the target starting column number.

[0126] Step 808, calculating the first area offset of the list-associated area to the right of the current target area, and calculating the second area offset of the list-associated area below the current target area.

[0127] Specifically, traverse each initial region and the filled target region, subtract the starting column from the ending column of the initial region to obtain the initial number of columns, and subtract the starting row from the ending row to obtain the initial number of rows. Subtract the starting column from the ending column of the target region to obtain the target number of columns, and subtract the starting row from the ending row to obtain the target number of rows. Subtract the initial number of columns from the target number of columns to obtain the number of expanded columns in the current region, and subtract the initial number of rows from the target number of rows to obtain the number of expanded rows in the current region. The current region offset is composed of the number of expanded columns in the current region and the number of expanded rows in the current region. According to this method, the region offset corresponding to each target region is calculated.

[0128] Among them, the current target area is determined from the target area set. After calculating the current area offset corresponding to the current target area, it is also necessary to calculate the area offset corresponding to the associated target area associated with the current target area. The associated target area can be located in the right list of the current target area, and its area offset is the first area offset. The associated target area can also be located in the lower list of the current target area, and its area offset is the second area offset.

[0129] In one embodiment, Fig. 9 As shown, each target area in the target area set is laid out according to the regional position relationship, and a processed report is obtained, including:

[0130] Step 902, obtaining current cell position information corresponding to the current initial region, the current initial region includes at least one current cell, and the current cell is associated with the current cell position information.

[0131] Step 904, calculating the target cell position corresponding to the current cell according to the current cell position information and the current region offset.

[0132] Step 906, obtain the current target area according to the target cell position layout, determine the next initial area, determine the next initial area as the current initial area, return to the step to obtain the current cell position information corresponding to the current initial area, until the processed report is obtained.

[0133] Among them, the initial area and the filled target area are offset, and the filled target area changes its position relative to the initial area. Therefore, the position of the cells in the initial area also needs to change accordingly. Among them, the cell is the most basic component unit of the initial area, and the cell is associated with the cell position information in the report.

[0134] Specifically, the current cell position information corresponding to the current initial area is obtained, the area offset corresponding to the target area filled by the current initial area is obtained, and the target cell position after the offset is calculated by the current cell position information and the area offset. Specifically, the difference between the current cell position information and the area offset is determined as the target cell position, and the so-called target cell position is the position of the current cell after the offset. Finally, the current target area is obtained according to the layout of the target cell position.

[0135] Further, the next initial area is obtained, and the next initial area is determined as the current initial area, and so on, and the step of returning to obtain the current cell position information corresponding to the current initial area is repeated, until the processed report is obtained.

[0136] For example, Fig. 9A As shown, Fig. 9A A schematic diagram showing the layout of the target area in one embodiment is shown. Fig. 9A The current initial area A is included in the current initial area A, which includes two current cells, namely the current cell a and the current cell b. The area offset between the current initial area A and the current target area to be filled is obtained, and the target cell position is calculated by the current cell position information and the area offset of the current cell, such as Fig. 9A As shown, the target cell position where the current cell a is located is the cell position where the current cell a′ is located, the target cell position where the current cell b is located is the cell position where the current cell b′ is located, and the target area after layout is the current target area A′.

[0137] In a multi-region report with dynamic changes, you can use the following steps to achieve a dynamically changed region without worrying about the layout after the change, and the layout after the change can be as close to the user's design style as possible. The specific steps are:

[0138] Step 1: User designs a multi-region report.

[0139] Step 1: Create a new report, create regions, and configure the data information to be displayed in the regions.

[0140] Step 2: The client records the starting row, starting column, ending row, and ending column of the area.

[0141] Step 3: To create other areas, repeat steps 1 and 2.

[0142] Step 4: Save the report design information to the database.

[0143] Step 2: Query the report area data.

[0144] Step 1: Query all regional data in the report based on the report.

[0145] Step 2: Calculate the number of rows and columns of data.

[0146] Step 3: Packaging parameters, including: design information of each area (starting row / column, ending row / column), data information (number of rows, number of columns).

[0147] Step 4: Calculate the new area information without offset. The starting row and starting column of the new area are equal to the starting row and starting column of the original area. According to the number of rows and columns of the data, plus the starting row and starting column, calculate the ending row and ending column of the new area. If the area data is empty or there is no data, the information of the new area is the initialized area information.

[0148] Step 3: Determine the position relationship of the initialization area.

[0149] Step 1: Think of Excel as a two-dimensional coordinate system, with rows as the y-axis and columns as the x-axis, and traverse the regions in order. The priority of positional relationships is: bottom > right > inside.

[0150] Step 2: Get the left and right edges of the current region. For example, take the starting row (y1) and starting column (x1) of region A as the starting point, 1048576 (maximum number of rows in EXCEL) (y2) and starting column (x2) as the end point, and get a line segment A. Take the starting row (y3) and ending column (x3) of the current region as the starting point, 1048576 (maximum number of rows in EXCEL) (y4) and ending column (x4) as the end point, and get a line segment B. Then get the top edge of other regions, such as Figure 3 As shown, take the starting row (y1) and starting column (x1) of region B as the starting point, and the starting row (y2) and ending column (x2) as the end point to obtain line segment C. Determine whether line segment C intersects with line segments A and B, or whether line segment C is between line segments A and B. If so, store region B in the list below region A.

[0151] Step 3: Get the upper and lower edges of the current region. For example, take the starting row (y1) and starting column (x1) of region A as the starting point, and the starting row (y1) and 16384 (maximum number of columns in EXCEL) (x2) as the end point to get a line segment A. Take the ending row (y3) and starting column (x3) of the current region as the starting point, and the ending row (y4) and 16384 (maximum number of columns in EXCEL) (x4) as the end point to get a line segment B. Then get the left edge of other regions, such as Figure 4As shown, take the starting row (y1) and starting column (x1) of region B as the starting point, and the ending row (y2) and starting column (x2) as the end point to obtain line segment C. Determine whether line segment C intersects with line segments A and B, or whether line segment C is between line segments A and B. If so, store region B in the list to the right of region A.

[0152] Step 4: Determine the positional relationship of the area after data filling.

[0153] Step 1: Repeat step 3 of step 3. If area B is already in the list below area A, there is no need to add it again. (The areas filled with data may have new positional relationships)

[0154] Step 2: Repeat step 4 of step 3. If area B is already in the list to the right of area A, there is no need to add it again. (The area filled with data may have a new position relationship)

[0155] Step 3: Determine whether the new area covers other areas. If the starting row of area B is greater than the starting row of area A, the ending row of area B is less than the ending row of area A, the starting column of area B is greater than the starting column of area A, and the ending column of area B is less than the ending column of area A, then it is determined that area B is covered by area A, and the area B object is stored in the list below and to the right of area A.

[0156] Step 5: Calculate the region offset.

[0157] Step 1: Traverse each area, subtract the starting column from the ending column of the initial area to get the initial number of columns, subtract the starting row from the ending row to get the initial number of rows, subtract the starting column from the ending column of the new area to get the new number of columns, subtract the starting row from the ending row to get the new number of rows, subtract the initial number of columns from the new number of columns to get the number of expanded columns in the current area, and subtract the initial number of rows from the new number of rows to get the number of expanded rows in the current area.

[0158] Step 2: Calculate the offset of the associated area in the list to the right of the current area, for example Fig.10 As shown, Fig.10 A schematic diagram of a linked list structure of a region object in an embodiment is shown. The region object is a linked list structure. The column offset of the next region is the new region end column of the previous region minus the initialization region end column. At the same time, the maximum end column of the previous region needs to be recorded. When the offset is a negative number, the start column of the region cannot be less than the end column of the previous region.

[0159] Step 3: Calculate the offset of the associated area in the list below the current area, such as Fig.10As shown, the region object is a linked list structure, and the row offset of the next region is the new region end row of the previous region minus the initialization region end row. At the same time, the maximum end row of the previous region needs to be recorded. When the offset is a negative number, the start row of the region cannot be less than the end row of the previous region.

[0160] Step 4: After calculating the offset of each area, the position relationship needs to be re-determined and step 3 is repeated.

[0161] Step 6: Organize and return data

[0162] Step 1: Traverse each region, subtract the starting row of the new region from the starting row of the original region to get the row offset of the region. Subtract the starting column of the new region from the starting column of the original region to get the column offset of the region.

[0163] Step 2: When writing an EXCEL file, add the offset of each area when writing cells in that area.

[0164] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0165] In one embodiment, Fig.11 As shown, a report data processing device 1100 is provided, comprising: a first acquisition module 1102, a second acquisition module 1104, a first determination module 1106, a second determination module 1108 and a layout module 1110, wherein:

[0166] The first acquisition module 1102 is used to acquire an initial region set corresponding to the report to be processed, where the initial region set includes at least one initial region, and the initial region is associated with initial region location information and initial region data information.

[0167] The second acquisition module 1104 is used to acquire target area data corresponding to each initial area in the initial area set according to the initial area data information.

[0168] The first determining module 1106 is configured to determine a target region set according to the target region data and the initial region position information, wherein the target region set includes at least one target region, and the target region is associated with the target region position information.

[0169] The second determining module 1108 is used to determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information.

[0170] The layout module 1110 is used to layout the target areas in the target area set according to the area position relationship to obtain a processed report.

[0171] In one embodiment, the first determination module 1106 calculates the number of rows and columns occupied by the target area data corresponding to each initial area, obtains the starting row and starting column corresponding to each initial area, and obtains the target area position information corresponding to each target area based on the number of rows, the number of columns and the starting rows and starting columns.

[0172] In one embodiment, the second determination module 1108 determines the current initial area from the initial area set, determines the associated initial area corresponding to the current initial area according to a preset initial area order, judges the initial position relationship between the current initial area and the associated initial area according to the initial area position information, determines the current target area corresponding to the current initial area from the target area set, determines the associated target area corresponding to the current target area according to the preset initial area order, judges the target position relationship between the current target area and the associated target area according to the target area position information, and when the initial position relationship is the same as the target position relationship, determines the regional position relationship between the current target area position and the associated target area as the target position relationship, and when the initial position relationship is different from the target position relationship, determines the regional position relationship between the current target area position and the associated target area as the initial position relationship.

[0173] In one embodiment, the second determination module 1108 determines the left line segment and the right line segment corresponding to the current initial area according to the initial area position information, and determines the upper line segment corresponding to the associated initial area according to the initial area position information. When the upper line segment intersects with the left line segment and the right line segment, the initial position relationship is determined to be that the associated initial area is laid out in the first position of the current initial area.

[0174] In one embodiment, the second determination module 1108 determines the upper line segment and the lower line segment corresponding to the current initial area according to the initial area position information, and determines the left line segment corresponding to the associated initial area according to the initial area position information. When the left line segment intersects with the upper line segment and the lower line segment, the initial position relationship is determined to be that the associated initial area is laid out in the second position of the current initial area.

[0175] In one embodiment, the layout module 1110 obtains the current target area and the corresponding associated target area, obtains the associated starting row and the associated starting column corresponding to the associated target area, obtains the current starting row and the current starting column corresponding to the current target area, and determines whether the associated target area is covered by the current target area based on the associated starting row, the associated starting column and the current starting row and the current starting column. If not, the current target area and the associated target area are laid out based on the area position relationship. If so, the intermediate interval is obtained, which is the initial interval between the current initial area and the corresponding associated target area. The current target area is the area after the current initial area is filled with target area data, and the current target area and the associated target area are laid out based on the intermediate interval and the area position relationship.

[0176] In one embodiment, the report data processing device 1100 obtains the current starting row number and the current starting column number corresponding to the current initial area, obtains the target starting row number and the target starting column number corresponding to the current target area, the current target area is the area after the current initial area is filled with the matching target area data, and the current area offset corresponding to the current target area is calculated according to the current starting row number, the current starting column number and the target starting row number and the target starting column number, the first area offset of the list associated area to the right of the current target area is calculated, and the second area offset of the list associated area below the current target area is calculated.

[0177] In one embodiment, the report data processing device 1100 obtains the current cell position information corresponding to the current initial area, the current initial area includes at least one current cell, the current cell is associated with the current cell position information, the target cell position corresponding to the current cell is calculated according to the current cell position information and the current area offset, the current target area is obtained according to the target cell position layout, the next initial area is determined, the next initial area is determined as the current initial area, and the step of obtaining the current cell position information corresponding to the current initial area is returned until the processed report is obtained.

[0178] For the specific definition of the report data processing device, please refer to the definition of the report data processing method above, which will not be repeated here. Each module in the above report data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0179] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store processed reports. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a report data processing method is implemented.

[0180] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a report data processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0181] Those skilled in the art will understand that Fig.12 or Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0182] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining an initial area set corresponding to a report to be processed, the initial area set including at least one initial area, the initial area being associated with initial area location information and initial area data information, obtaining target area data corresponding to each initial area in the initial area set according to the initial area data information, determining a target area set according to the target area data and the initial area location information, the target area set including at least one target area, the target area being associated with target area location information, determining an area location relationship between each target area in the target area set according to the initial area location information and the target area location information, laying out each target area in the target area set according to the area location relationship, and obtaining a processed report.

[0183] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the number of rows and columns occupied by the target area data corresponding to each initial area, obtaining the starting row and starting column corresponding to each initial area, and calculating the target area position information corresponding to each target area based on the number of rows, the number of columns and the starting rows and starting columns.

[0184] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the current initial area from the initial area set, determining the associated initial area corresponding to the current initial area according to a preset initial area order, judging the initial position relationship between the current initial area and the associated initial area according to the initial area position information, determining the current target area corresponding to the current initial area from the target area set, determining the associated target area corresponding to the current target area according to the preset initial area order, judging the target position relationship between the current target area and the associated target area according to the target area position information, and when the initial position relationship is the same as the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the target position relationship, and when the initial position relationship is different from the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the initial position relationship.

[0185] In one embodiment, the processor further implements the following steps when executing the computer program: determining the left line segment and the right line segment corresponding to the current initial area according to the initial area position information, determining the upper line segment corresponding to the associated initial area according to the initial area position information, and when the upper line segment intersects with the left line segment and the right line segment, determining the initial position relationship as the associated initial area is arranged in the first position of the current initial area, or determining the upper line segment and the lower line segment corresponding to the current initial area according to the initial area position information, determining the left line segment corresponding to the associated initial area according to the initial area position information, and when the left line segment intersects with the upper line segment and the lower line segment, determining the initial position relationship as the associated initial area is arranged in the second position of the current initial area.

[0186] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current target area and the corresponding associated target area, obtaining the associated starting row and the associated starting column corresponding to the associated target area, obtaining the current starting row and the current starting column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated starting row, the associated starting column and the current starting row and the current starting column; if not, laying out the current target area and the associated target area according to the area position relationship; if so, obtaining the intermediate interval, which is the initial interval between the current initial area and the corresponding associated target area, the current target area is the area after the current initial area is filled with target area data, and laying out the current target area and the associated target area according to the intermediate interval and the area position relationship.

[0187] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current starting row number and the current starting column number corresponding to the current initial area, obtaining the target starting row number and the target starting column number corresponding to the current target area, the current target area is the area after the current initial area is filled with the matching target area data, the current area offset corresponding to the current target area is calculated according to the current starting row number, the current starting column number and the target starting row number and the target starting column number, the first area offset of the list associated area to the right of the current target area is calculated, and the second area offset of the list associated area below the current target area is calculated.

[0188] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining current cell position information corresponding to the current initial area, the current initial area includes at least one current cell, the current cell is associated with the current cell position information, the target cell position corresponding to the current cell is calculated based on the current cell position information and the current area offset, the current target area is obtained according to the target cell position layout, the next initial area is determined, the next initial area is determined as the current initial area, and the step of obtaining the current cell position information corresponding to the current initial area is returned until a processed report is obtained.

[0189] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining an initial area set corresponding to a report to be processed, the initial area set includes at least one initial area, the initial area is associated with initial area location information and initial area data information, obtaining target area data corresponding to each initial area in the initial area set according to the initial area data information, determining a target area set according to the target area data and the initial area location information, the target area set includes at least one target area, the target area is associated with target area location information, determining an area location relationship between each target area in the target area set according to the initial area location information and the target area location information, laying out each target area in the target area set according to the area location relationship, and obtaining a processed report.

[0190] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the number of rows and columns occupied by the target area data corresponding to each initial area, obtaining the starting row and starting column corresponding to each initial area, and calculating the target area position information corresponding to each target area based on the number of rows, the number of columns and the starting rows and starting columns.

[0191] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the current initial area from the initial area set, determining the associated initial area corresponding to the current initial area according to a preset initial area order, judging the initial position relationship between the current initial area and the associated initial area according to the initial area position information, determining the current target area corresponding to the current initial area from the target area set, determining the associated target area corresponding to the current target area according to the preset initial area order, judging the target position relationship between the current target area and the associated target area according to the target area position information, and when the initial position relationship is the same as the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the target position relationship, and when the initial position relationship is different from the target position relationship, determining the regional position relationship between the current target area position and the associated target area as the initial position relationship.

[0192] In one embodiment, the processor further implements the following steps when executing the computer program: determining the left line segment and the right line segment corresponding to the current initial area according to the initial area position information, determining the upper line segment corresponding to the associated initial area according to the initial area position information, and when the upper line segment intersects with the left line segment and the right line segment, determining the initial position relationship as the associated initial area is arranged in the first position of the current initial area, or determining the upper line segment and the lower line segment corresponding to the current initial area according to the initial area position information, determining the left line segment corresponding to the associated initial area according to the initial area position information, and when the left line segment intersects with the upper line segment and the lower line segment, determining the initial position relationship as the associated initial area is arranged in the second position of the current initial area.

[0193] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current target area and the corresponding associated target area, obtaining the associated starting row and the associated starting column corresponding to the associated target area, obtaining the current starting row and the current starting column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated starting row, the associated starting column and the current starting row and the current starting column; if not, laying out the current target area and the associated target area according to the area position relationship; if so, obtaining the intermediate interval, which is the initial interval between the current initial area and the corresponding associated target area, the current target area is the area after the current initial area is filled with target area data, and laying out the current target area and the associated target area according to the intermediate interval and the area position relationship.

[0194] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current starting row number and the current starting column number corresponding to the current initial area, obtaining the target starting row number and the target starting column number corresponding to the current target area, the current target area is the area after the current initial area is filled with the matching target area data, the current area offset corresponding to the current target area is calculated according to the current starting row number, the current starting column number and the target starting row number and the target starting column number, the first area offset of the list associated area to the right of the current target area is calculated, and the second area offset of the list associated area below the current target area is calculated.

[0195] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining current cell position information corresponding to the current initial area, the current initial area includes at least one current cell, the current cell is associated with the current cell position information, the target cell position corresponding to the current cell is calculated based on the current cell position information and the current area offset, the current target area is obtained according to the target cell position layout, the next initial area is determined, the next initial area is determined as the current initial area, and the step of obtaining the current cell position information corresponding to the current initial area is returned until a processed report is obtained.

[0196] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0197] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0198] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A report data processing method, the method comprising: Acquire an initial region set corresponding to the report to be processed, the initial region set including at least one initial region, the initial region being associated with initial region location information and initial region data information; Acquire target area data corresponding to each of the initial areas in the initial area set according to the initial area data information; Determine a target area set according to the target area data and the initial area location information, the target area set including at least one target area, and the target area is associated with target area location information; Determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information; The target areas in the target area set are arranged according to the area position relationship to obtain a processed report.

2. The method according to claim 1, characterized in that The determining of a target area set according to the target area data and the initial area location information, wherein the target area set includes at least one target area, and the target area is associated with the target area location information, comprises: Calculate the number of rows and columns occupied by the target area data corresponding to each of the initial areas; Obtaining the starting row and starting column corresponding to each of the initial regions; The target area position information corresponding to each target area is calculated according to each of the row numbers, each of the column numbers, each of the starting rows, and each of the starting columns.

3. The method according to claim 1, characterized in that The determining the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information includes: Determine a current initial region from the initial region set, and determine an associated initial region corresponding to the current initial region according to a preset initial region sequence; Determining, according to the initial area position information, an initial position relationship between the current initial area and the associated initial area; Determine a current target area corresponding to the current initial area from the target area set, and determine an associated target area corresponding to the current target area according to the preset initial area sequence; Determining a target position relationship between the current target area and the associated target area according to the target area position information; When the initial position relationship is the same as the target position relationship, determining the area position relationship between the current target area position and the associated target area as the target position relationship; When the initial position relationship is different from the target position relationship, the area position relationship between the current target area position and the associated target area is determined to be the initial position relationship.

4. The method according to claim 3, characterized in that The determining, according to the initial area position information, an initial position relationship between the current initial area and the associated initial area includes: Determine the left line segment and the right line segment corresponding to the current initial area according to the initial area position information; Determine an upper line segment corresponding to the associated initial area according to the initial area position information; When the upper line segment intersects the left line segment and the right line segment, it is determined that the initial position relationship is that the associated initial area is arranged in the first position of the current initial area; or, Determine the upper line segment and the lower line segment corresponding to the current initial area according to the initial area position information; Determine the left line segment corresponding to the associated initial area according to the initial area position information; When the left line segment intersects with the upper line segment and the lower line segment, the initial position relationship is determined to be that the associated initial area is laid out in the second position of the current initial area.

5. The method according to claim 1, characterized in that The step of arranging the target areas in the target area set according to the area position relationship to obtain a processed report includes: Get the current target area and the corresponding associated target area; Obtain an associated start row and an associated start column corresponding to the associated target area, and obtain a current start row and a current start column corresponding to the current target area; Determining whether the associated target area is covered by the current target area according to the associated starting row, the associated starting column and the current starting row, the current starting column; If not, laying out the current target area and the associated target area according to the area position relationship; If yes, then obtain the intermediate interval, where the intermediate interval is the initial interval between the current initial area and the corresponding associated target area, where the current target area is the area after the current initial area is filled with target area data; The current target area and the associated target area are arranged according to the intermediate interval and the area position relationship.

6. The method according to claim 1, characterized in that Before the target areas in the target area set are arranged according to the area position relationship to obtain a processed report, the method further includes: Get the current starting row number and the current starting column number corresponding to the current initial area; Obtaining the target starting row number and the target starting column number corresponding to the current target area, wherein the current target area is the area after the current initial area is filled with the matching target area data; The current region offset corresponding to the current target region is calculated according to the current starting row number, the current starting column number, the target starting row number, and the target starting column number; A first area offset of a list-associated area to the right of the current target area is calculated, and a second area offset of a list-associated area below the current target area is calculated.

7. The method according to claim 6, characterized in that The step of arranging the target areas in the target area set according to the area position relationship to obtain a processed report includes: Acquire current cell position information corresponding to a current initial region, wherein the current initial region includes at least one current cell, and the current cell is associated with current cell position information; Calculate the target cell position corresponding to the current cell according to the current cell position information and the current area offset; The current target area is obtained according to the target cell position layout, a next initial area is determined, the next initial area is determined as the current initial area, and the step of returning to obtain the current cell position information corresponding to the current initial area is returned until a processed report is obtained.

8. A report data processing device, characterized in that: The device comprises: A first acquisition module is used to acquire an initial region set corresponding to a report to be processed, wherein the initial region set includes at least one initial region, and the initial region is associated with initial region location information and initial region data information; A second acquisition module, configured to acquire target area data corresponding to each of the initial areas in the initial area set according to the initial area data information; A first determination module, configured to determine a target area set according to the target area data and the initial area location information, wherein the target area set includes at least one target area, and the target area is associated with target area location information; A second determination module is used to determine the regional position relationship of each target area in the target area set according to the initial area position information and the target area position information; The layout module is used to layout each of the target areas in the target area set according to the area position relationship to obtain a processed report.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data item display method and device, computing equipment and medium

    CN109597954A

  • Report data extraction method and device and computer equipment

    CN111552712A