CN113868258A - Report data processing method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN113868258A
CN113868258A CN202111159889.4A CN202111159889A CN113868258A CN 113868258 A CN113868258 A CN 113868258A CN 202111159889 A CN202111159889 A CN 202111159889A CN 113868258 A CN113868258 A CN 113868258A
Authority
CN
China
Prior art keywords
area
initial
current
target
target area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111159889.4A
Other languages
Chinese (zh)
Inventor
丁方政
徐亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Suning Electronic Information Technology Co ltd
Original Assignee
Nanjing Suning Electronic Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Suning Electronic Information Technology Co ltd filed Critical Nanjing Suning Electronic Information Technology Co ltd
Priority to CN202111159889.4A priority Critical patent/CN113868258A/en
Publication of CN113868258A publication Critical patent/CN113868258A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a report data processing method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information; acquiring 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 position information, wherein the target area set comprises at least one target area, and the target area is associated with target area position information; determining the area position relation of each target area according to the initial area position information and the target area position information; and (5) laying out each target area according to the area position relation to obtain a processed report. By adopting the method, the new layout after the data change can be calculated according to the report layout designed by the user, so that the new layout is as close as possible to the original layout structure designed by the user.

Description

Report data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing report data, a computer device, and a storage medium.
Background
Until computers were unavailable, people recorded data using paper and pens. After the advent of computers, reports were generated and displayed by people using the computer's ability to process data and interface design. With the popularization and rapid development of computers and the internet, much work is shifted from local to network. Common software such as WORD, EXCEL and the like is online, so that the office efficiency is greatly improved, and the cooperative work is facilitated.
The EXCEL online generation also prompts an online report taking the EXCEL as a display main body, and the report has the main characteristics of data dynamism and diversified format, can support the complex function of the EXCEL, and realizes the complete separation of report data and report format. The user may be responsible for designing the layout only, with the data being provided by the metrics, dimension services. Designers can make very complex report forms, and one report form may have a plurality of data rendering areas, and the areas are dynamically changed by filling data such as indexes and dimensions.
Because the online report has the characteristic of data dynamism, the data in each report query is possibly inconsistent, and the change of the data can also influence the change of the regional layout in the report. How to display data according to a layout designed by a user as much as possible when the data is changed is a problem which needs to be solved urgently at present.
Disclosure of Invention
In view of the above, it is necessary to provide a report data processing method, apparatus, computer device and storage medium, which can calculate a new layout after data change according to a report layout designed by a user, without paying attention to the layout problem after data change after filling, and the new layout should be as close as possible to the layout structure originally designed by the user.
A report data processing method comprises the following steps:
acquiring an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
acquiring 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 position information, wherein the target area set comprises at least one target area, and the target area is associated with target area position information;
determining the area position relation of each target area in the target area set according to the initial area position information and the target area position information;
and (4) according to the area position relation, distributing each target area in the target area set to obtain a processed report.
In one embodiment, determining a target area set according to target area data and initial area location information, the target area set including at least one target area, the target area being associated with target area location information, includes: and calculating the number of rows and columns occupied by the target area data corresponding to each initial area, acquiring the initial rows and initial columns corresponding to each initial area, and calculating to obtain the target area position information corresponding to each target area according to each row, each column, each initial row and each initial column.
In one embodiment, determining the area location relationship of each target area in the target area set according to the initial area location information and the target area location information includes: determining a current initial region from the initial region set, determining a related initial region corresponding to the current initial region according to a preset initial region sequence, judging the initial position relation 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 a related target area corresponding to the current target area according to a preset initial area sequence, judging a target position relation between the current target area and the related target area according to the target area position information, when the initial position relation is the same as the target position relation, determining the area position relation between the current target area position and the associated target area as the target position relation, and when the initial position relation is different from the target position relation, determining the area position relation between the current target area position and the associated target area as the initial position relation.
In one embodiment, the determining an initial position relationship between the current initial region and the associated initial region according to the initial region position information includes: determining a left line segment and a right line segment corresponding to the current initial region according to the initial region position information, determining an upper line segment corresponding to the associated initial region according to the initial region position information, and determining an initial position relationship when the upper line segment is intersected with the left line segment and the right line segment so that the associated initial region is laid in the first position of the current initial region; or, determining an upper line segment and a lower line segment corresponding to the current initial region according to the initial region position information, determining a left line segment corresponding to the associated initial region according to the initial region position information, and determining that the initial position relationship is that the associated initial region is laid out in the second position of the current initial region when the left line segment intersects with the upper line segment and the lower line segment.
In one embodiment, the step of laying out each target area in the target area set according to the area position relationship to obtain a processed report includes: the method comprises the steps of obtaining a current target area and a corresponding associated target area, obtaining an associated initial row and an associated initial column corresponding to the associated target area, obtaining a current initial row and a current initial column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated initial row, the associated initial column, the current initial row and the current initial column, if not, laying out the current target area and the associated target area according to an area position relationship, if so, obtaining an intermediate interval, wherein the intermediate interval is an initial interval between the current initial area and the corresponding associated target area, the current target area is an area of the current initial area after target area data filling, and laying out the current target area and the associated target area according to the intermediate interval and the area position relationship.
In one embodiment, 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 method further includes: the method comprises the steps of obtaining a current starting line number and a current starting column number corresponding to a current initial area, obtaining a target starting line number and a target starting column number corresponding to a current target area, wherein the current target area is an area obtained after the current initial area is filled with matched target area data, calculating a current area offset corresponding to the current target area according to the current starting line number, the current starting column number, the target starting line number and the target starting column number, calculating a first area offset of a right list association area of the current target area, and calculating a second area offset of a list association area below the current target area.
In one embodiment, the step of laying out each target area in the target area set according to the area position relationship to obtain a processed report includes: obtaining the position information of a current cell corresponding to a current initial area, wherein the current initial area comprises at least one current cell, the current cell is associated with the position information of the current cell, the position of a target cell corresponding to the current cell is obtained by calculation according to the position information of the current cell and the offset of the current area, the current target area is obtained according to the position layout of the target cell, the next initial area is determined as the current initial area, and the step of returning to obtain the position information of the current cell corresponding to the current initial area is carried out until a processed report is obtained.
A report data processing apparatus, the apparatus comprising:
the report processing device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring an initial area set corresponding to a report to be processed, the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
the second acquisition module is used for acquiring target area data corresponding to each initial area in the initial area set according to the initial area data information;
the first determining module is used for determining a target area set according to the target area data and the initial area position information, wherein the target area set comprises at least one target area, and the target area is associated with the target area position information;
the second determining module is used for determining the area position relationship of each target area in the target area set according to the initial area position information and the target area position information;
and the layout module is used for laying out each target area in the target area set according to the area position relation to obtain a processed report.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
acquiring 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 position information, wherein the target area set comprises at least one target area, and the target area is associated with target area position information;
determining the area position relation of each target area in the target area set according to the initial area position information and the target area position information;
and (4) according to the area position relation, distributing each target area in the target area set to obtain a processed report.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
acquiring 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 position information, wherein the target area set comprises at least one target area, and the target area is associated with target area position information;
determining the area position relation of each target area in the target area set according to the initial area position information and the target area position information;
and (4) according to the area position relation, distributing each target area in the target area set to obtain a processed report.
According to the report data processing method, the report data processing device, the computer equipment and the storage medium, a user can design the layout condition of each initial area and the initial area data information of each initial area in the report to be processed in a user-defined mode, corresponding target area data are obtained according to the initial area data information, and target area position information is obtained through calculation according to the target area data and the initial area position information of each initial area, so that the target area is generated. Further, the area position relationship between the target areas is determined according to the target area position information and the initial area position information, and finally, the target areas are laid out according to the area position relationship to obtain a processed report. Therefore, the new layout after the data change can be calculated according to the report layout designed by the user, the layout problem after the data change after the filling is not concerned, and the new layout is as close to the original layout structure designed by the user as possible.
Drawings
FIG. 1 is a diagram of an application environment of a report data processing method in an embodiment;
FIG. 2 is a flowchart illustrating a report data processing method according to an embodiment;
FIG. 2A is a schematic diagram of an interface of a pending report in one embodiment;
FIG. 2B is a diagram illustrating an interface of a processed report, according to an embodiment;
FIG. 3 is a schematic flow chart of the target region set determination step in one embodiment;
FIG. 4 is a flowchart illustrating a step of determining a location relationship of a region in one embodiment;
FIG. 5 is a flowchart illustrating an initial position relationship determining step according to an embodiment;
FIG. 5A is a diagram illustrating an exemplary acquisition of an initial positional relationship;
FIG. 6 is a flowchart illustrating an initial position relationship determining step according to an embodiment;
FIG. 6A is a diagram illustrating an exemplary acquisition of an initial positional relationship;
FIG. 7 is a flowchart illustrating the steps of a processed report layout in one embodiment;
FIG. 7A is a diagram illustrating an embodiment of a pending report;
FIG. 7B is a diagram illustrating a pending report in one embodiment;
FIG. 8 is a flowchart illustrating a report data processing method according to an embodiment;
FIG. 9 is a flowchart illustrating the steps of a processed report layout in one embodiment;
FIG. 9A is a diagram illustrating a layout of a target area in one embodiment;
FIG. 10 is a diagram illustrating a linked list structure of zone objects in one embodiment;
FIG. 11 is a block diagram showing the structure of a report data processing apparatus according to an embodiment;
FIG. 12 is a diagram showing an internal structure of a computer device in one embodiment;
FIG. 13 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The report data processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Specifically, the terminal 102 creates a report to be processed, creates at least one initial area in the newly created report to be processed, obtains an initial area set, and sends the initial area set to the server 104, the server 104 obtains an initial area set corresponding to the report to be processed, the initial area set includes at least one initial area, the initial area is associated with initial area position 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 position information, the target area set includes at least one target area, the target area is associated with target area position information, determines an area position relationship of each target area in the target area set according to the initial area position information and the target area position information, lays out each target area in the target area set according to the area position relationship, and obtaining a processed report. Finally, the server 104 returns the processed report to the terminal 102.
In another embodiment, the terminal 102 creates a report to be processed, creates at least one initial area in the newly created report to be processed, obtains an initial area set, where the initial area is associated with initial area position 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 position information, where the target area set includes at least one target area, and the target area is associated with target area position information, determines an area position relationship of each target area in the target area set according to the initial area position information and the target area position information, and lays out each target area in the target area set according to the area position relationship, so as to obtain a processed report.
In an embodiment, as shown in fig. 2, a report data processing method is provided, which is described by taking the example that the method is applied to the terminal or the server in fig. 1, and includes the following steps:
step 202, obtaining an initial area set corresponding to the report to be processed, where the initial area set includes at least one initial area, and the initial area is associated with initial area position information and initial area data information.
The report to be processed is an Excel report designed by a user, the user can create a report in a webpage version report design interface according to the favorite, actual business requirements, actual product requirements or actual application scenes of the user, an initial area is created in the report, initial area data information needing to be displayed in the initial area is configured, when the initial area is created in the report, initial area position information corresponding to the initial area is recorded, the design information of the report is stored in a database together, and the design information comprises the initial area position information and the initial area data information corresponding to each initial area.
The initial area position information refers to position information related to an initial area in a report, and includes, but is not limited to, a start row, a start column, an end row, and an end column of the initial area, and the initial area data information is information such as an index, a dimension, and a filtering condition that the initial area needs to be queried.
For example, as shown in fig. 2A, fig. 2A shows an interface schematic diagram of a to-be-processed report in an embodiment, the to-be-processed report of fig. 2A is designed by a user according to actual requirements, the to-be-processed report includes four initial areas, and each initial area is associated with initial area position information and initial area data information.
And 204, acquiring target area data corresponding to each initial area in the initial area set according to the initial area data information.
The target area data is area data 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 matched region data set is obtained according to the initial region identifier, and then the target region data is obtained by screening from the region data set according to the initial region data information.
Step 206, determining a target area set according to the target area data and the initial area position information, wherein the target area set comprises at least one target area, and the target area is associated with the target area position information.
Wherein a new region, i.e. the target region, needs to be determined, since the target region data may not match the initial region location information, i.e. the initial region may not be enough to fill the target region data. The target area is completely matched with the target area data, namely the area size relation of the target area is determined according to the target area data.
Specifically, the specific area location information that needs to be filled in the target area may be calculated according to the target area data, including but not limited to the number of rows and columns occupied by the target area data, and further, the target area is determined according to the calculated specific area location information and the initial area location information, specifically, the target area location information may be calculated according to the new location information of the target area and the initial area location information, and the target area may be generated according to the target area location information.
And step 208, determining the area position relation of each target area in the target area set according to the initial area position information and the target area position information.
Specifically, the position relationship between the target areas is determined by initial area position information and target area position information, the initial area position information is a report layout position designed by a user, and in order to make a new layout as close as possible to an original design layout result of the user, a layout mode between the target areas needs to be determined according to the layout mode between the initial areas described by the initial area position information.
For example, it may be determined that the initial area a is located above the initial area B by the initial area position information, the target area position information includes position information of the target area a and position information of the target area B, and the area position relationship of each target area may be determined that the target area a is located above the target area B according to the initial area a being located above the initial area B.
And step 210, laying out each target area in the target area set according to the area position relationship to obtain a processed report.
Specifically, according to the layout condition between the target areas described by the area position relationship, the target areas in the target area set are laid out to obtain the processed report. When the target areas are arranged in the target area set, the area interval between the initial areas can be considered, so that the interval of the target areas after arrangement is still arranged according to the originally designed area interval, and the design report style of the user can be more approximate.
For example, as shown in fig. 2B, fig. 2B shows an interface schematic diagram of a processed report in an embodiment, fig. 2A is a to-be-processed report, which is designed by a user according to actual business requirements and interests, the to-be-processed report includes four initial areas, each initial area in the to-be-processed report is laid out according to the design of the user, that is, initial area 1 is located above initial area 2, initial area 3 and initial area 4 are located at the right side of initial area 1, initial area 3 is located above initial area 4, fig. 2B is a to-be-processed report, which is laid out according to the area position relationship of each target area in a target area set, target area 1 is located above target area 2, target area 3 and target area 4 are located at the right side of target area 1, target area 3 is located above target area 4, so that after the area data of the initial areas are filled, the layout problem after the data change after filling is not concerned, and the new layout is as close to the original layout structure of the user as possible.
In the report data processing method, a user can design the layout condition of each initial area and the initial area data information of each initial area in the report to be processed in a self-defined manner, corresponding target area data are obtained according to the initial area data information, and target area position information is obtained through calculation according to the target area data and the initial area position information of the initial areas, so that a target area is generated. Further, the area position relationship between the target areas is determined according to the target area position information and the initial area position information, and finally, the target areas are laid out according to the area position relationship to obtain a processed report. Therefore, the new layout after the data change can be calculated according to the report layout designed by the user, the layout problem after the data change after the filling is not concerned, and the new layout is as close to the original layout structure designed by the user as possible.
In one embodiment, as shown in fig. 3, determining a target area set according to target area data and initial area location information, where the target area set includes at least one target area, and the target area is associated with target area location information, includes:
step 302, calculating the number of rows and columns occupied by the target area data corresponding to each initial area.
Step 304, obtain the initial row and initial column corresponding to each initial region.
And step 306, calculating to obtain the target area position information corresponding to each target area according to each row number, each column number, each starting row and each starting column.
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 the rows during area design, 100 rows of data are obtained when 100 dimensions are inquired, and if the indexes are displayed on the columns, 3 columns of data are obtained when 3 indexes exist.
Further, a starting row and a starting column of each initial area are obtained, and the position information of the target area can be obtained by calculation according to the number of rows and columns occupied by the starting row and the starting column and corresponding target area data. Specifically, the starting row and the starting column of the initial area are kept unchanged, that is, the starting row and the starting column of the target area are equal to the starting row and the starting column of the initial area, and according to the number of rows and columns occupied by the target area data, the starting row and the starting column are added to calculate the ending row and the ending column of the target area, so as to obtain the position information of the target area.
For example, if the start row and the start 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, the calculated start row and start column of the target area a remain unchanged, and the end row and end column are (10,10), thereby obtaining the target area position information of the target area a.
In one embodiment, as shown in fig. 4, determining the area location relationship of each target area in the target area set according to the initial area location information and the target area location information includes:
step 402, determining a current initial region from the initial region set, and determining a related initial region corresponding to the current initial region according to a preset initial region sequence.
Step 404, according to the initial area position information, determining an initial position relationship between the current initial area and the associated initial area.
The current initial region is an initial region currently being processed, and one initial region is randomly determined from the initial region set as the current initial region, or the initial regions may be sequentially determined as the current initial region according to a preset region sequence of the initial regions.
The preset region order is a traversal order between the initial regions, and may be a design order of a user determined as the preset initial region order. Specifically, after the current initial region is determined, the associated initial region corresponding to the current initial region is determined according to a preset initial region sequence, where the associated initial region may be a right initial region and/or a lower initial region of the current initial region, and further, an initial position relationship between the current initial region and the associated initial region is determined according to the initial region position information, where the initial position relationship is used to describe a position relationship between the associated initial region and the current initial region. And if the associated initial areas are multiple, judging the initial position relation with the current initial area one by one.
And 406, determining a current target area corresponding to the current initial area from the target area set, and determining an associated target area corresponding to the current target area according to a preset initial area sequence.
Step 408, according to the position information of the target area, determining the target position relationship between the current target area and the associated target area.
The current target area corresponds to the current initial area and is the target area of the current initial area after the area data is filled. Specifically, a current target area corresponding to the current initial area may be searched from the target area set, and similarly, a related target area corresponding to the current target area is determined according to a preset initial area sequence. In fact, the associated target area is also the target area that is filled with area data associated with the initial area. Further, the target position relation between the current target area and the associated target area is judged according to the target area position information.
Step 410, 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.
In step 412, when the initial position relationship is different from the target position relationship, it is determined that the area position relationship between the current target area position and the associated target area is the initial position relationship.
Specifically, in order to enable the initial region to perform region data filling without paying attention to the layout problem after the data filling is changed, and to enable the new layout to be as close to the original layout structure of the user as possible, it is necessary to detect whether the initial positional relationship and the target positional relationship are the same, and if the initial positional relationship and the target positional relationship are the same, the layout of the new target region is described, the original layout structure of the user is maintained, and the region positional relationship between the current target region position and the associated target region is determined to be the target positional relationship.
On the contrary, if the initial position relationship is different from the target position relationship, it indicates that the layout of the new target region has changed seriously, which is completely different from the original layout structure of the user, and this is not qualified, so that the new layout can be made as close as possible to the original layout structure of the user by determining the region position relationship between the current target region position and the associated target region as the initial position relationship.
In one embodiment, as shown in fig. 5, determining an initial position relationship between the current initial region and the associated initial region according to the initial region position information includes:
step 502, determining a left line segment and a right line segment corresponding to the current initial area according to the initial area position information.
And step 504, determining an upper line segment corresponding to the associated initial area according to the initial area position information.
Step 506, when the upper line segment intersects the left line segment and the right line segment, the initial position relationship is determined as that the associated initial region is laid out in the first position of the current initial region.
Specifically, after the current initial area is determined from the initial area set, the left line segment is obtained by using the starting row and the starting column of the current initial area as starting points, and the target row and the starting column as end points, and similarly, the right line segment is obtained by using the starting row and the ending column of the current initial area as starting points, and the target row and the ending column as end points. And acquiring a related initial area corresponding to the current initial area, and taking the initial row and the initial column of the related initial area as starting points and the initial row and the ending column as end points to obtain an upper line segment. Further, whether the upper line segment of the associated initial region intersects with the left line segment and the right line segment of the current initial region or not is judged, the intersection can also be between the upper line segment of the associated initial region and the left line segment and the right line segment of the current initial region, and if yes, the initial position relationship is determined to be that the associated initial region is laid out in the first position of the current initial region. The first position may be determined according to an actual service situation, an actual service requirement, or an actual application scenario, and the first position may be, for example, the lower side.
For example, as shown in fig. 5A, fig. 5A illustrates an obtaining schematic diagram of an initial position relationship in an embodiment, where an area a is a current initial area, an area B is an associated initial area, and a line segment a is obtained by taking a start row (y1) and a start column (x1) of the area a as starting points and 1048576(EXCEL maximum row number) (y2) and the start column (x2) as ending points. A line segment B is obtained by taking the starting row (y3) and the ending column (x3) of the current area as starting points and 1048576(EXCEL maximum row number) (y4) and the ending column (x4) as end points. Then, as shown in fig. 5A, the top line of the other region is obtained, and the line segment C is obtained by using the start row (y1), the start column (x1), the start row (y2), and the end column (x2) of the region B as the starting point, the end row, and the end column. It is determined whether segment C intersects segment A, B or segment C is between segments A, B and if so, area B is stored in the lower list of area a.
In one embodiment, as shown in fig. 6, determining an initial position relationship between the current initial region and the associated initial region according to the initial region position information includes:
step 602, determining an upper line segment and a lower line segment corresponding to the current initial region according to the initial region position information.
And step 604, determining a left line segment corresponding to the associated initial region according to the initial region position information.
Step 606, when the left line segment intersects the upper line segment and the lower line segment, the initial position relationship is determined as the associated initial region is laid out in the second position of the current initial region.
Specifically, an upper line segment corresponding to the current initial region is obtained by taking the starting row and the starting column of the current initial region as starting points and the starting row and the target column as end points, and similarly, a lower line segment corresponding to the current initial region is obtained by taking the ending row and the starting column of the current initial region as starting points and the ending row and the target column as end points. And then acquiring a related initial area corresponding to the current initial area, taking the initial line and the initial column of the related initial area as starting points, and taking the ending line and the initial column as end points to obtain a left line segment corresponding to the related initial area.
Further, whether the left line segment of the associated initial region intersects with the upper line segment and the lower line segment of the current initial region or whether the left line segment of the associated initial region is between the upper line segment and the lower line segment of the current initial region is judged, and if yes, the initial position relationship is determined to be that the associated initial region is laid out in the second position of the current initial region. The second position may be determined according to an actual service situation, an actual service requirement, or an actual application scenario, and the second position may be, for example, the right side.
For example, as shown in fig. 6A, fig. 6A illustrates an obtaining schematic diagram of an initial position relationship in an embodiment, where an area a is a current initial area, an area B is an associated initial area, and a line segment a is obtained by taking a start row (y1) and a start column (x1) of the area a as a starting point and a start row (y1) and a start row (16384) (the maximum number of EXCEL columns) (x2) as an end point. A line segment B is obtained by using the ending row (y3) and the starting column (x3) of the current region as starting points and the ending row (y4) and the ending row (16384) (the EXCEL maximum column number) (x4) as ending points. Then, as shown in fig. 6A, the left line of the other region is obtained, and the line segment C is obtained by starting with the start row (y1) and the start column (x1) of the region B, ending the row (y2), and ending the start column (x 2). It is determined whether segment C intersects segment A, B or segment C is between segments A, B, and if so, area B is stored in the right list of area a.
It should be noted that, according to the position information of the target area, the determination of the target position relationship between the current target area and the associated target area may also be performed according to the determination manner of fig. 5 or fig. 6, which is the same principle and is not described herein again.
In an embodiment, as shown in fig. 7, the step of laying out each target area in the target area set according to the area location relationship to obtain a processed report includes:
step 702, a current target area and a corresponding associated target area are obtained.
Step 704, obtaining a correlation start row and a correlation start column corresponding to the correlation target area, and obtaining a current start row and a current start column corresponding to the current target area.
Step 706, determining whether the associated target area is covered by the current target area according to the associated start row, the associated start column, the current start row and the current start column.
If not, the current target area and the associated target area are laid out according to the area position relationship, step 708.
Specifically, after the current target area is determined, the right target area and the lower target area of the current target area may be determined as the associated target area, an associated start row and an associated start column of the associated target area in the report to be processed are obtained, and a current start row and a current start column of the current initial target area in the report to be processed are obtained at the same time.
Further, whether the associated target area is covered by the current target area is judged by associating the start row, the associated start column, the current start row and the current start column, specifically, if the start row of the associated target area is larger than the start row of the current target area, the end row of the associated target area is smaller than the end row of the current target area, the start column of the associated target area is larger than the start column of the current target area, and the end column of the associated target area is smaller than the end column of the current target area, it can be judged that the associated target area is covered by the current target area. Otherwise, if the associated target area is not covered by the current target area, the current target area and the associated target area may be laid out according to the area position relationship.
Step 710, if yes, acquiring an intermediate interval, where the intermediate interval is an initial interval between the current initial region and the corresponding associated target region, and the current target region is a region of the current initial region after target region data filling.
Step 712, the current target area and the associated target area are laid out according to the intermediate space and the area position relationship.
When the associated target area is judged to be covered by the current target area, in order to obtain a new target area after the initial area is completely filled with data, the design style of the user can be approached as much as possible, therefore, when the associated target area is covered by the current target area, the layout of the associated target area and the current target area needs to be adjusted, specifically, an intermediate interval is obtained, the intermediate interval is an original interval between the initial areas when the user designs, namely the intermediate interval is an original interval between the current initial area and the corresponding associated target area, further, the current target area and the associated target area are re-laid according to the intermediate interval and the area position relation, so that the interval between the current target area and the associated target area is kept consistent with the original interval during design, and the problem of conflict coverage between the associated target area and the current target area can be solved, and the areas can not conflict with other areas after being changed, so that the problems of area overlapping, cell coverage and the like are avoided.
For example, as shown in fig. 7A and 7B, fig. 7A and 7B show schematic diagrams of a report to be processed in an embodiment, where a current target area and an associated target area shown in fig. 7A have an area conflict, that is, the associated target area is covered by the current target area, so that a current initial area corresponding to the current target area is obtained when a user designs, and a design interval between the associated initial areas corresponding to the associated target area is 2, and the current target area and the associated target area are re-laid according to the design interval and the area position relationship, that is, as shown in fig. 7B, where the current target area and the associated target area shown in fig. 7B not only avoid the area conflict, but also can be as close to a design style of the user as possible.
In an embodiment, as shown in fig. 8, before laying out each target area in the target area set according to the area location relationship and obtaining the processed report, the method further includes:
step 802, obtaining a current starting row number and a current starting column number corresponding to the current initial area.
And step 804, acquiring a target starting line number and a target starting column number corresponding to the current target area, wherein the current target area is an area obtained after the current initial area is filled with the matched target area data.
Step 806, calculating to obtain a current area offset corresponding to the current target area according to the current starting line number, the current starting column number, the target starting line number, and the target starting column number.
Step 808, calculating a first area offset of the list-associated area to the right of the current target area, and calculating a second area offset of the list-associated area below the current target area.
Specifically, each initial area and the filled target area are traversed, the initial column number is obtained by subtracting the initial column from the end column of the initial area, and the initial row number is obtained by subtracting the initial row from the end row. And subtracting the initial column from the final column of the target area to obtain the target column number, and subtracting the initial row from the final row to obtain the target row number. And subtracting the initial column number from the target column number to obtain the current area expansion column number, subtracting the initial row number from the target row number to obtain the current area expansion row number, and forming the current area offset by the current area expansion column number and the current area expansion row number. And calculating the corresponding regional offset of each target region according to the method.
The current target area is determined from the target area set, and after the current area offset corresponding to the current target area is obtained through calculation, the area offset corresponding to the associated target area associated with the current target area also needs to be calculated, the associated target area may be located in a right list of the current target area, the area offset of the associated target area is a first area offset, the associated target area may also be located in a lower list of the current target area, and the area offset of the associated target area is a second area offset.
In an embodiment, as shown in fig. 9, the step of laying out each target area in the target area set according to the area location relationship to obtain a processed report includes:
step 902, obtaining current cell position information corresponding to a current initial region, where the current initial region includes at least one current cell and the current cell is associated with the current cell position information.
And 904, calculating to obtain the target cell position corresponding to the current cell according to the current cell position information and the current region offset.
Step 906, obtaining a current target area according to the position layout of the target cells, determining a next initial area, determining the next initial area as the current initial area, and returning to the step to obtain the position information of the current cells corresponding to the current initial area until a processed report is obtained.
However, since the initial region and the filled target region are shifted and the position of the filled target region is changed with respect to the initial region, the cell position in the initial region needs to be changed accordingly. The cells are the most basic constituent units of the initial area, and the cells are associated with cell position information in the report.
Specifically, current cell position information corresponding to the current initial region is obtained, a region offset corresponding to a target region filled in the current initial region is obtained, and a target cell position after the offset is obtained through calculation of the current cell position information and the region offset. And finally, obtaining the current target area according to the position layout of the target cell.
And further, acquiring a next initial area, determining the next initial area as the current initial area, repeating the steps to acquire the position information of the current cell corresponding to the current initial area, and repeating the steps until a processed report is obtained.
For example, as shown in fig. 9A, fig. 9A shows a schematic diagram of a target area layout in an embodiment, where fig. 9A includes a current initial area a, where the current initial area a includes two current cells, which are a current cell a and a current cell b, an area offset between the current initial area a and a filled current target area is obtained, and a target cell position is obtained by calculating current cell position information and the area offset where the current cell is located, as shown in fig. 9A, where the current cell a is located, the target cell position where the current cell a is located is a cell position where the current cell a ' is located, where the current cell b is located, the target cell position where the current cell b is located is a cell position where the current cell b ' is located, and the target area after layout is a current target area a '.
In an application scenario of dynamic change of a multi-region report, the layout problem of a dynamically changed region after no relation change is realized through the following steps, and the changed layout can be as close to the design style of a user as possible, and the specific steps are as follows:
step 1: the user designs a multi-region report.
The first step is as follows: and newly building a report, creating an area, and configuring data information to be displayed in the area.
The second step is that: the client records the starting row, the starting column, the ending row and the ending column of the area.
The third step: and creating other areas, and repeating the first step and the second step.
The fourth step: and storing the design information of the report to a database.
Step 2: and inquiring report regional data.
The first step is as follows: and inquiring all area data in the report according to the report.
The second step is that: and calculating the row number and the column number of the data.
The third step: packaging parameters, the parameters including: design information (start row/column, end row/column), data information (number of rows, number of columns) for each region.
The fourth step: calculating the information of a new area which is not deviated, wherein the initial row and the initial column of the new area are equal to the initial row and the initial column of the original area, calculating the ending row and the ending column of the new area by adding the initial row and the initial column according to the row number and the column number of the data, and if the area data is empty or has no data, the information of the new area is initialized area information.
And step 3: and judging the position relation of the initialization area.
The first step is as follows: and regarding excel as a two-dimensional coordinate system, wherein the rows are y-axis and the columns are x-axis, and traversing the regions according to the region sequence. The priority of the positional relationship is: lower > right > inner.
The second step is that: and acquiring the left and right side lines of the current area. For example, a line segment a is obtained with the start line (y1) and the start column (x1) of the region a as the starting point, and 1048576(EXCEL maximum line number) (y2) and the start column (x2) as the ending point. A line segment B is obtained by taking the starting row (y3) and the ending column (x3) of the current area as starting points and 1048576(EXCEL maximum row number) (y4) and the ending column (x4) as end points. Then, as shown in fig. 3, the top line of the other region is obtained, and the line segment C is obtained by using the start row (y1), the start column (x1), the start row (y2), and the end column (x2) of the region B as the starting point, the start row (y2), and the end column (x 2). It is determined whether segment C intersects segment A, B or segment C is between segments A, B and if so, area B is stored in the lower list of area a.
The third step: and acquiring the upper and lower sidelines of the current area. For example, a line segment a is obtained starting from the start row (y1) and the start column (x1) of the area a and ending at the start row (y1) and 16384(EXCEL maximum column number) (x 2). A line segment B is obtained by using the ending row (y3) and the starting column (x3) of the current region as starting points and the ending row (y4) and the ending row (16384) (the EXCEL maximum column number) (x4) as ending points. Then, as shown in fig. 4, the left edge of the other region is obtained, and the line segment C is obtained by using the start line (y1) and the start column (x1) of the region B as the starting point, the end line (y2) and the start column (x2) as the end point. It is determined whether segment C intersects segment A, B or segment C is between segments A, B, and if so, area B is stored in the right list of area a.
And 4, step 4: and judging the position relation of the area filled with the data.
The first step is as follows: the third step of step 3 is repeated without adding again if region B is already in the lower list of region a. (the data-filled region may generate a new positional relationship)
The second step is that: the fourth step of step 3 is repeated without adding again if region B is already in the right hand list of region a. (the data-filled region may generate a new positional relationship)
The third step: and judging whether the new area covers other areas, if the initial row of the area B is larger than the initial row of the area A, the end row of the area B is smaller than the end row of the area A, the initial column of the area B is larger than the initial column of the area A, and the end column of the area B is smaller than the end column of the area A, judging that the area B is covered by the area A, and storing the area B objects in a lower list and a right list of the area A.
And 5: the region offset is calculated.
The first step is as follows: traversing each area, subtracting the initial column from the end column of the initial area to obtain an initial column number, subtracting the initial row from the end row to obtain an initial row number, subtracting the initial column from the end column of the new area to obtain a new column number, subtracting the initial row from the end row to obtain a new row number, subtracting the initial column number from the new column number to obtain a current area expansion column number, and subtracting the initial row number from the new row number to obtain a current area expansion row number.
The second step is that: for example, as shown in fig. 10, fig. 10 shows a linked list structure diagram of an area object in an embodiment, where the area object is in a linked list structure, and the column offset of the next area is obtained by subtracting an initialized area end column from a new area end column of the previous area. And simultaneously, the maximum ending column of the previous area needs to be recorded, and when the offset is negative, the starting column of the area cannot be smaller than the ending column of the previous area.
The third step: the offset of the list-associated area below the current area is calculated, as shown in fig. 10, the area object is in a linked list structure, and the row offset of the next area is the new area end row of the previous area minus the initialization area end row. And simultaneously, the maximum ending line of the previous area needs to be recorded, and when the offset is negative, the starting line of the area cannot be smaller than the ending line of the previous area.
The fourth step: and (4) judging the position relation again after calculating the offset of each area, and repeating the step (3).
Step 6: sorting and returning data
The first step is as follows: and traversing each region, and subtracting the initial line of the initial region from the initial line of the new region to obtain the line offset of the region. The starting column of the initial region is subtracted from the starting column of the new region to obtain the column offset of the region.
The second step is that: when writing an EXCEL file, the offset of each region is added when writing a cell.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 11, there is provided a report data processing apparatus 1100, including: a first obtaining module 1102, a second obtaining module 1104, a first determining module 1106, a second determining module 1108, and a layout module 1110, wherein:
the first obtaining module 1102 is configured to obtain an initial area set corresponding to the report to be processed, where the initial area set includes at least one initial area, and the initial area is associated with initial area position information and initial area data information.
A second obtaining module 1104, configured to obtain, according to the initial region data information, target region data corresponding to each initial region in the initial region set.
A first determining module 1106, configured to determine a target area set according to the target area data and the initial area location information, where the target area set includes at least one target area, and the target area is associated with target area location information.
A second determining module 1108, configured to determine, according to the initial area location information and the target area location information, an area location relationship of each target area in the target area set.
The layout module 1110 is configured to layout each target area in the target area set according to the area location relationship, so as to obtain a processed report.
In an embodiment, the first determining module 1106 calculates the number of rows and columns occupied by the target area data corresponding to each initial area, obtains a starting row and a starting column corresponding to each initial area, and calculates to obtain the target area position information corresponding to each target area according to each row, each column, each starting row and each starting column.
In one embodiment, the second determination module 1108 determines a current initial region from the initial region set, determining a related initial area corresponding to the current initial area according to a preset initial area sequence, judging an initial position relation between the current initial area and the related initial area according to the initial area position information, determining a current target area corresponding to the current initial area from a target area set, determining a related target area corresponding to the current target area according to a preset initial area sequence, judging a target position relation between the current target area and the related target area according to the target area position information, when the initial position relation is the same as the target position relation, determining the area position relation between the current target area position and the associated target area as the target position relation, and when the initial position relation is different from the target position relation, determining the area position relation between the current target area position and the associated target area as the initial position relation.
In one embodiment, the second determining module 1108 determines a left line segment and a right line segment corresponding to the current initial region according to the initial region position information, determines an upper line segment corresponding to the associated initial region according to the initial region position information, and determines that the initial position relationship is that the associated initial region is laid out in the first position of the current initial region when the upper line segment intersects with the left line segment and the right line segment.
In one embodiment, the second determining module 1108 determines an upper line segment and a lower line segment corresponding to the current initial region according to the initial region location information, determines a left line segment corresponding to the associated initial region according to the initial region location information, and determines that the initial location relationship is that the associated initial region is laid out in the second location of the current initial region when the left line segment intersects with the upper line segment and the lower line segment.
In one embodiment, the layout module 1110 obtains a current target region and a corresponding associated target region, obtains an associated start row and an associated start column corresponding to the associated target region, obtains the current start row and the current start column corresponding to the current target region, determines whether the associated target region is covered by the current target region according to the associated start row, the associated start column, the current start row and the current start column, if not, lays out the current target region and the associated target region according to a region position relationship, if yes, obtains an intermediate interval, where the intermediate interval is an initial interval between the current initial region and the corresponding associated target region, where the current target region is a region of the current initial region after target region data filling, and lays out the current target region and the associated target region according to the intermediate interval and the region position relationship.
In an embodiment, the report data processing apparatus 1100 obtains a current starting line number and a current starting column number corresponding to a current initial area, obtains a target starting line number and a target starting column number corresponding to a current target area, where the current target area is an area where the current initial area is filled with matched target area data, calculates a current area offset corresponding to the current target area according to the current starting line number, the current starting column number, the target starting line number, and the target starting column number, calculates a first area offset of a right list associated area of the current target area, and calculates a second area offset of a list associated area below the current target area.
In one embodiment, the report data processing apparatus 1100 obtains current cell position information corresponding to a current initial area, where the current initial area includes at least one current cell, the current cell is associated with the current cell position information, calculates a target cell position corresponding to the current cell according to the current cell position information and a current area offset, obtains a current target area according to a target cell position layout, determines a next initial area, determines the next initial area as the current initial area, and returns to the step of obtaining the current cell position information corresponding to the current initial area until a processed report is obtained.
For the specific definition of the report data processing apparatus, reference may be made to the above definition of the report data processing method, which is not described herein again. All or part of the modules in the report data processing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs 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 for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a report data processing method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a report data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 12 or fig. 13 are only block diagrams of some configurations relevant to the present application, and do not constitute a limitation on the computer device to which the present application is applied, and a particular computer device may include more or less components than those shown in the drawings, or may combine some components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the method comprises the steps of obtaining an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, the initial area is associated with initial area position information and initial area data information, target area data corresponding to each initial area in the initial area set are obtained according to the initial area data information, a target area set is determined according to the target area data and the initial area position information, the target area set comprises at least one target area, the target area is associated with target area position information, the area position relation of each target area in the target area set is determined according to the initial area position information and the target area position information, each target area in the target area set is distributed according to the area position relation, and the processed report is obtained.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calculating the number of rows and columns occupied by the target area data corresponding to each initial area, acquiring the initial rows and initial columns corresponding to each initial area, and calculating to obtain the target area position information corresponding to each target area according to each row, each column, each initial row and each initial column.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a current initial region from the initial region set, determining a related initial region corresponding to the current initial region according to a preset initial region sequence, judging the initial position relation 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 a related target area corresponding to the current target area according to a preset initial area sequence, judging a target position relation between the current target area and the related target area according to the target area position information, when the initial position relation is the same as the target position relation, determining the area position relation between the current target area position and the associated target area as the target position relation, and when the initial position relation is different from the target position relation, determining the area position relation between the current target area position and the associated target area as the initial position relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a left line segment and a right line segment corresponding to the current initial region according to the initial region position information, determining an upper line segment corresponding to the associated initial region according to the initial region position information, when the upper line segment intersects with the left line segment and the right line segment, determining an initial position relationship that the associated initial region is laid out in a first position of the current initial region, or determining an upper line segment and a lower line segment corresponding to the current initial region according to the initial region position information, determining a left line segment corresponding to the associated initial region according to the initial region position information, when the left line segment intersects with the upper line segment and the lower line segment, determining an initial position relationship that the associated initial region is laid out in a second position of the current initial region.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a current target area and a corresponding associated target area, obtaining an associated initial row and an associated initial column corresponding to the associated target area, obtaining a current initial row and a current initial column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated initial row, the associated initial column, the current initial row and the current initial column, if not, laying out the current target area and the associated target area according to an area position relationship, if so, obtaining an intermediate interval, wherein the intermediate interval is an initial interval between the current initial area and the corresponding associated target area, the current target area is an area of the current initial area after target area data filling, and laying out the current target area and the associated target area according to the intermediate interval and the area position relationship.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a current starting line number and a current starting column number corresponding to a current initial area, obtaining a target starting line number and a target starting column number corresponding to a current target area, wherein the current target area is an area obtained after the current initial area is filled with matched target area data, calculating a current area offset corresponding to the current target area according to the current starting line number, the current starting column number, the target starting line number and the target starting column number, calculating a first area offset of a right list association area of the current target area, and calculating a second area offset of a list association area below the current target area.
In one embodiment, the processor, when executing the computer program, further performs the steps of: obtaining the position information of a current cell corresponding to a current initial area, wherein the current initial area comprises at least one current cell, the current cell is associated with the position information of the current cell, the position of a target cell corresponding to the current cell is obtained by calculation according to the position information of the current cell and the offset of the current area, the current target area is obtained according to the position layout of the target cell, the next initial area is determined as the current initial area, and the step of returning to obtain the position information of the current cell corresponding to the current initial area is carried out until a processed report is obtained.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: the method comprises the steps of obtaining an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, the initial area is associated with initial area position information and initial area data information, target area data corresponding to each initial area in the initial area set are obtained according to the initial area data information, a target area set is determined according to the target area data and the initial area position information, the target area set comprises at least one target area, the target area is associated with target area position information, the area position relation of each target area in the target area set is determined according to the initial area position information and the target area position information, each target area in the target area set is distributed according to the area position relation, and the processed report is obtained.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calculating the number of rows and columns occupied by the target area data corresponding to each initial area, acquiring the initial rows and initial columns corresponding to each initial area, and calculating to obtain the target area position information corresponding to each target area according to each row, each column, each initial row and each initial column.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a current initial region from the initial region set, determining a related initial region corresponding to the current initial region according to a preset initial region sequence, judging the initial position relation 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 a related target area corresponding to the current target area according to a preset initial area sequence, judging a target position relation between the current target area and the related target area according to the target area position information, when the initial position relation is the same as the target position relation, determining the area position relation between the current target area position and the associated target area as the target position relation, and when the initial position relation is different from the target position relation, determining the area position relation between the current target area position and the associated target area as the initial position relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a left line segment and a right line segment corresponding to the current initial region according to the initial region position information, determining an upper line segment corresponding to the associated initial region according to the initial region position information, when the upper line segment intersects with the left line segment and the right line segment, determining an initial position relationship that the associated initial region is laid out in a first position of the current initial region, or determining an upper line segment and a lower line segment corresponding to the current initial region according to the initial region position information, determining a left line segment corresponding to the associated initial region according to the initial region position information, when the left line segment intersects with the upper line segment and the lower line segment, determining an initial position relationship that the associated initial region is laid out in a second position of the current initial region.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a current target area and a corresponding associated target area, obtaining an associated initial row and an associated initial column corresponding to the associated target area, obtaining a current initial row and a current initial column corresponding to the current target area, judging whether the associated target area is covered by the current target area according to the associated initial row, the associated initial column, the current initial row and the current initial column, if not, laying out the current target area and the associated target area according to an area position relationship, if so, obtaining an intermediate interval, wherein the intermediate interval is an initial interval between the current initial area and the corresponding associated target area, the current target area is an area of the current initial area after target area data filling, and laying out the current target area and the associated target area according to the intermediate interval and the area position relationship.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a current starting line number and a current starting column number corresponding to a current initial area, obtaining a target starting line number and a target starting column number corresponding to a current target area, wherein the current target area is an area obtained after the current initial area is filled with matched target area data, calculating a current area offset corresponding to the current target area according to the current starting line number, the current starting column number, the target starting line number and the target starting column number, calculating a first area offset of a right list association area of the current target area, and calculating a second area offset of a list association area below the current target area.
In one embodiment, the processor, when executing the computer program, further performs the steps of: obtaining the position information of a current cell corresponding to a current initial area, wherein the current initial area comprises at least one current cell, the current cell is associated with the position information of the current cell, the position of a target cell corresponding to the current cell is obtained by calculation according to the position information of the current cell and the offset of the current area, the current target area is obtained according to the position layout of the target cell, the next initial area is determined as the current initial area, and the step of returning to obtain the position information of the current cell corresponding to the current initial area is carried out until a processed report is obtained.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A report data processing method, the method comprising:
acquiring an initial area set corresponding to a report to be processed, wherein the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
acquiring 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 position information, wherein the target area set comprises at least one target area, and the target area is associated with target area position information;
determining the area position relation of each target area in the target area set according to the initial area position information and the target area position information;
and according to the area position relationship, distributing each target area in the target area set to obtain a processed report.
2. The method of claim 1, wherein determining a target region set from the target region data and the initial region location information, the target region set comprising at least one target region associated with target region location information comprises:
calculating the number of rows and columns occupied by target area data corresponding to each initial area;
acquiring a starting row and a starting column corresponding to each initial region;
and calculating to obtain the target area position information corresponding to each target area according to each row number, each column number, each starting row and each starting column.
3. The method according to claim 1, wherein the determining the area position relationship of each of the target areas in the target area set according to the initial area position information and the target area position information comprises:
determining a current initial region from the initial region set, and determining a related initial region corresponding to the current initial region according to a preset initial region sequence;
judging the initial position relation between the current initial area and the associated initial area according to the initial area position information;
determining a current target area corresponding to the current initial area from the target area set, and determining an associated target area corresponding to the current target area according to the preset initial area sequence;
judging the target position relation between the current target area and the associated target area according to the target area position information;
when the initial position relation is the same as the target position relation, determining the area position relation between the current target area position and the associated target area as a target position relation;
and when the initial position relationship is different from the target position relationship, determining that the area position relationship between the current target area position and the associated target area is the initial position relationship.
4. The method according to claim 3, wherein the determining an initial position relationship between the current initial region and the associated initial region according to the initial region position information comprises:
determining a left line segment and a right line segment corresponding to the current initial area according to the initial area position information;
determining an upper line segment corresponding to the associated initial region according to the initial region position information;
when the upper line segment intersects with the left line segment and the right line segment, determining the initial position relationship as that the associated initial region is laid out in a first position of the current initial region; or the like, or, alternatively,
determining an upper line segment and a lower line segment corresponding to the current initial area according to the initial area position information;
determining a left line segment corresponding to the associated initial region according to the initial region position information;
when the left line segment intersects the upper line segment and the lower line segment, determining the initial position relationship as the associated initial region is laid out in a second position of the current initial region.
5. The method according to claim 1, wherein said laying out each of said target areas in said set of target areas according to said area position relationship to obtain a processed report includes:
acquiring a current target area and a corresponding associated target area;
acquiring an associated initial row and an associated initial column corresponding to the associated target area, and acquiring a current initial row and a current initial column corresponding to the current target area;
judging whether the associated target area is covered by the current target area or not according to the associated starting row, the associated starting column, the current starting row and the current starting column;
if not, the current target area and the associated target area are laid out according to the area position relation;
if so, acquiring an intermediate interval, wherein the intermediate interval is an initial interval between a current initial region and a corresponding associated target region, and the current target region is a region of the current initial region after target region data filling;
and laying out the current target area and the associated target area according to the intermediate interval and the area position relation.
6. The method according to claim 1, wherein before the step of laying out each target area in the target area set according to the area position relationship to obtain the processed report, the method further comprises:
acquiring a current starting line number and a current starting column number corresponding to a current initial area;
acquiring a target starting line number and a target starting column number corresponding to a current target area, wherein the current target area is an area obtained after the current initial area is filled with matched target area data;
calculating to obtain a current region offset corresponding to the current target region according to the current starting line number, the current starting column number, the target starting line number and the target starting column number;
and calculating a first area offset of the list associated area on the right of the current target area, and calculating a second area offset of the list associated area below the current target area.
7. The method according to claim 6, wherein said laying out each of said target areas in said set of target areas according to said area position relationship to obtain a processed report includes:
acquiring current cell position information corresponding to a current initial area, wherein the current initial area comprises at least one current cell, and the current cell is associated with the current cell position information;
calculating to obtain a target cell position corresponding to the current cell according to the current cell position information and the current region offset;
and obtaining the current target area according to the position layout of the target cells, determining a next initial area, determining the next initial area as the current initial area, and returning to the step of obtaining the position information of the current cells corresponding to the current initial area until a processed report is obtained.
8. A report data processing apparatus, characterized in that the apparatus comprises:
the report processing device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring an initial area set corresponding to a report to be processed, the initial area set comprises at least one initial area, and the initial area is associated with initial area position information and initial area data information;
a second obtaining module, configured to obtain, according to the initial region data information, target region data corresponding to each initial region in the initial region set;
a first determining module, configured to determine a target area set according to the target area data and the initial area location information, where the target area set includes at least one target area, and the target area is associated with target area location information;
a second determining module, configured to determine, according to the initial region position information and the target region position information, a region position relationship of each target region in the target region set;
and the layout module is used for laying out each target area in the target area set according to the area position relation to obtain a processed report.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111159889.4A 2021-09-30 2021-09-30 Report data processing method and device, computer equipment and storage medium Pending CN113868258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111159889.4A CN113868258A (en) 2021-09-30 2021-09-30 Report data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111159889.4A CN113868258A (en) 2021-09-30 2021-09-30 Report data processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113868258A true CN113868258A (en) 2021-12-31

Family

ID=79001070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111159889.4A Pending CN113868258A (en) 2021-09-30 2021-09-30 Report data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113868258A (en)

Similar Documents

Publication Publication Date Title
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN104142783A (en) Adaptive tile framework
CN111399833B (en) Service data processing method and device, computer equipment and storage medium
Buschek et al. TouchML: A machine learning toolkit for modelling spatial touch targeting behaviour
CN110955418A (en) Code generation method and device, computer equipment and storage medium
CN112423281B (en) Wireless module upgrading method, device, computer equipment and storage medium
CN110704087A (en) Page generation method and device, computer equipment and storage medium
CN110610334A (en) Warehouse management method and device, computer equipment and storage medium
CN110910475A (en) Picture editing method and device, computer equipment and storage medium
CN110321467A (en) Airport engineering project information methods of exhibiting, device, system, equipment and medium
CN112052374A (en) Page display method and device, computer equipment and storage medium
CN114119300A (en) Electronic protocol matching method and device, computer equipment and storage medium
CN114611481A (en) Template configuration method and device, computer equipment and storage medium
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN110597552A (en) Configuration method, device and equipment of project continuous integration pipeline and storage medium
CN114327449A (en) Page display method and system and computer equipment
CN113868258A (en) Report data processing method and device, computer equipment and storage medium
CN110324410B (en) Method, device, computer equipment and storage medium for initiating webpage request
CN108829932B (en) Interest matching method, device, computer equipment and storage medium
CN115933943A (en) Image display method and device and storage medium
CN112632080B (en) Data storage method, device and equipment based on block chain
CN111124932B (en) Scheme verification method, system, device, computer equipment and storage medium
CN110888901B (en) System management method, device, computer equipment and storage medium
CN110321405B (en) Model matching method, model matching device, computer-readable storage medium and computer equipment
CN110134475B (en) Method and device for displaying interface parameter configuration, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination