Method and system for automatically merging project budget lists
By automatically detecting and identifying the effective areas of the project budget list, semantic recognition and attribute detection, determining the areas to be merged and merging, the problem of low manual summary efficiency in traditional technology is solved, and efficient automatic merging of the project budget list is achieved.
Patent Information
- Application Number
- CN202411743543.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-04-01
AI Technical Summary
Traditional technology requires manual summary of a large number of engineering lists, resulting in low work efficiency.
It provides an automatic merging method for engineering budget inventory, which can obtain the valid area of the target budget inventory, extract cell information, perform semantic recognition and attribute detection, determine the area to be merged, and merge based on preset merge rules.
The automated engineering budget list merger has been realized, greatly improving work efficiency and reducing the time and energy of manual operations.
Smart Images

Figure CN119740561A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transfer learning, and in particular to a method and system for automatically merging engineering budget lists. Background Art
[0002] Spreadsheets are an accurate, flexible, and easy-to-share tool that has been widely used in various fields. They provide fast, convenient, and real-time data entry and analysis capabilities. In real business, spreadsheets not only store information and consolidate data, but also analyze data and present the results in a visual form. As a result, spreadsheets have become an indispensable part of the business of many companies around the world. If companies do not fully analyze spreadsheet data, their business may suffer a loss in profits or market share.
[0003] During the construction process, a large number of Excel spreadsheets need to be manually processed, and a large number of project lists need to be manually statistically summarized, resulting in very low work efficiency. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for automatically merging project budget lists, aiming to solve the problem of low work efficiency caused by the need for manual aggregation of a large number of project lists in traditional technologies.
[0005] In a first aspect, the present invention provides a method for automatically merging a project budget list, the method comprising:
[0006] Obtain at least one target budget list, and traverse all cells of each target budget list to obtain a valid area of each target budget list according to the traversal result;
[0007] Extracting information features from each cell in the valid area, the information features including multiple position information and cell information corresponding to each position information, and performing attribute detection on the cell information according to the position information to obtain an attribute type of each cell in the valid area, the attribute type including all text elements, all non-text elements, and spaces;
[0008] Perform semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other;
[0009] Determining, according to the text information, that each target budget list includes at least one area to be merged corresponding to the project description, wherein the area to be merged includes non-text elements under the project quantity, unit, and unit price;
[0010] Based on a preset merging rule, the areas to be merged with the same project description in the at least one target budget list are merged to obtain a total project budget list.
[0011] Furthermore, the step of performing semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes a project name, a project quantity, a unit, a unit price, and a project description, and the project name and the project description are subordinate to each other, comprises:
[0012] Define that all cells whose attribute types are all text elements are first target cells, and all cells whose attribute types are all non-text elements are second target cells, and perform semantic recognition on the first target cells whose attribute types are all text elements to extract at least one key field therein;
[0013] The key field is matched with a preset database in similarity, so as to filter out text information with the highest similarity from the preset database as the text information of the first target cell.
[0014] Further, the step of determining, according to the text information, that each target budget list includes at least one area to be merged corresponding to the project description, and the area to be merged includes non-text elements under the project quantity, unit and unit price includes:
[0015] The filling direction of each target budget list is obtained according to the text information of the first target cell, and all the first target cells and the second target cells are associated along the filling direction to obtain a plurality of areas to be merged.
[0016] Furthermore, the step of obtaining the filling direction of each target budget list according to the text information of the first target cell includes:
[0017] According to the semantic recognition result, first target cells corresponding to the project name, project quantity, unit and unit price are obtained, which are defined as third target cells, and the position information of all the third target cells is compared;
[0018] If the row coordinates of all the third target cells are equal, the filling direction of the corresponding target budget list is horizontal;
[0019] If the column coordinates of all the third target cells are equal, the filling direction of the corresponding target budget list is vertical.
[0020] Furthermore, the step of obtaining at least one target budget list and traversing all cells of each target budget list to obtain a valid area of each target budget list according to the traversal result includes:
[0021] The valid area is a rectangle. The data length of each cell is obtained, and the value of each cell is defined according to the following formula:
[0022]
[0023] Among them, G ij represents the value of the cell in the i-th row and j-th column, S ij represents the data length of the cell in the i-th row and j-th column, where a and b both represent a preset constant, and a≠b;
[0024] Get G ij = all cells of a, and select the cell with the largest number of rows and columns, and take the cell with the largest number of rows and columns as a vertex of the valid area.
[0025] Furthermore, the step of merging the to-be-merged areas of the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list includes:
[0026] If there is at least one project description corresponding to multiple areas to be merged in the same target budget list, then according to the project description, all non-text elements under the project quantities in the multiple areas to be merged are accumulated, the non-text elements under the units are merged, and the non-text elements under the unit prices are merged to obtain a new area to be merged;
[0027] New areas to be merged and areas to be merged that have not been merged are summarized to obtain a list to be merged, each of which includes a plurality of different project descriptions and areas to be merged corresponding to the project descriptions.
[0028] Furthermore, after the step of obtaining a list of areas to be merged by summarizing the new areas to be merged and the areas to be merged that have not been merged, the step further includes:
[0029] According to the project description, the same areas to be merged in each of the lists to be merged are merged to obtain a total project budget list.
[0030] In a second aspect, the present invention provides a system for automatically merging project budget lists, the system comprising:
[0031] An effective area detection module is used to obtain at least one target budget list and traverse all cells of each target budget list to obtain the effective area of each target budget list according to the traversal result;
[0032] an attribute detection module, for extracting information features from each cell in the valid area, wherein the information features include a plurality of position information and cell information corresponding to each of the position information, and performing attribute detection on the cell information according to the position information to obtain an attribute type of each cell in the valid area, wherein the attribute type includes all text elements, all non-text elements, and spaces;
[0033] A semantic recognition module is used to perform semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other;
[0034] A module for dividing regions to be merged, used for determining, according to the text information, that each target budget list includes at least one region to be merged corresponding to the project description, wherein the region to be merged includes non-text elements under the project quantity, unit and unit price;
[0035] The merging execution module is used to merge the to-be-merged areas of the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list.
[0036] In a third aspect, the present invention provides a storage medium storing one or more programs, which, when executed by a processor, implement the above-mentioned method for automatically merging engineering budget lists.
[0037] In a fourth aspect, the present invention provides an electronic device, the electronic device comprising a memory and a processor, wherein:
[0038] The memory is used to store computer programs;
[0039] When the processor is used to execute the computer program stored in the memory, the above-mentioned method for automatically merging the project budget list is implemented.
[0040] In summary, according to the above-mentioned method for automatically merging project lists, all project budget lists are automatically detected and identified to identify any area where elements exist in all budget lists, and then the same cells are merged or summarized to obtain a total project budget list that summarizes the information in all target budget lists, thereby replacing manual sorting and greatly improving work efficiency. Specifically, each target budget list is first traversed to first identify the valid area of each list, and then feature extraction is performed on the cells in the valid area to perform attribute detection on the cell information contained in each cell, and then the attributes of each cell information are determined, and then targeted semantic recognition is performed on the attributes that are all text elements, and then the specific text information of the cell is obtained, and then each area to be merged is determined based on the text information, and then the same areas to be merged are merged one by one according to the preset merging rules, so as to obtain the total project budget list. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of a method for automatically merging project budget lists proposed in one embodiment of the present invention;
[0042] Figure 2 A schematic diagram of the structure of a system for automatically merging project budget lists according to an embodiment of the present invention.
[0043] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0045] like Figure 1 As shown, an embodiment of the present invention provides a method for automatically merging a project budget list, the method comprising steps S101 to S105, wherein:
[0046] Step S101: obtaining at least one target budget list, and traversing all cells of each target budget list to obtain a valid area of each target budget list according to the traversal result;
[0047] It should be pointed out that in the actual project budget list, since it involves multiple engineering projects and each engineering project involves multiple specific construction projects, in addition, the same target budget list may also have multiple repeated construction projects. Based on this, in order to realize the aggregation of all cells in all lists, it is necessary to first detect the valid area of each target budget list to determine the cells where information exists.
[0048] In some embodiments, the specific detection method is: obtain the data length of each cell, and define the value of each cell according to the following formula:
[0049]
[0050] Among them, G ij represents the value of the cell in the i-th row and j-th column, S ij represents the data length of the cell in the i-th row and j-th column, a and b both represent a preset constant, and a≠b; Get G ij = all cells of a, and select the cell with the largest number of rows and columns, and take the cell with the largest number of rows and columns as a vertex of the valid area.
[0051] That is to say, by obtaining the data length of each cell, it is determined whether the data length of each cell is empty, and then the valid area is delineated based on the fact that the row number and column number of the non-empty cell are the largest.
[0052] Step S102: extracting information features from each cell in the valid area, wherein the information features include multiple position information and cell information corresponding to each position information, and performing attribute detection on the cell information according to the position information to obtain an attribute type of each cell in the valid area, wherein the attribute type includes all text elements, all non-text elements, and spaces;
[0053] It can be understood that after the effective area of each target budget list is identified, feature extraction is performed on each cell contained in the effective area to extract the position information of each cell and the cell information contained therein.
[0054] Step S103: semantic recognition is performed on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other;
[0055] It should be noted that, as shown in Table 1 below, which is an example of a project budget list, the formats are similar, but due to different habits of engineering personnel, there may be different compilation directions. In order to accurately identify the information contained in each budget list, it is first defined that all cells whose attribute types are all text elements are the first target cells, and all cells whose attribute types are all non-text elements are the second target cells, and semantic recognition is performed on the first target cells that are all text elements to extract at least one key field therein; then the key fields are matched with the preset database for similarity to filter out the text information with the highest similarity from the preset database as the text information of the first target cell.
[0056] It should be pointed out that the preset database will also contain multiple key fields, and each text information such as project name, project quantity, unit, unit price and project description will be bound to one or more key fields. For example, if the project description is "hanging embedded complete distribution box", the set key fields are hanging, embedded, and distribution box. Based on this, in order to accurately identify the specific meaning of each cell information, it is necessary to perform similarity matching on the semantically identified table information, and then filter out the most similar text information. It should also be emphasized that because there are some similar project descriptions, in order to distinguish them and avoid semantic recognition errors, similarity matching is required.
[0057] Table 1
[0058] Project Name Project Quantity unit unit price Project Description 1 xx Square meter xx Project Description 2 xx cubic meter xx Project Description 3 xx rice xx Project Description 1 xx set xx Project Description 4 xx indivual xx Project Description 5 xx item xx
[0059] Step S104: determining, according to the text information, that each target budget list includes at least one area to be merged corresponding to the project description, and the area to be merged includes non-text elements under the project quantity, unit and unit price;
[0060] It should be pointed out that a target budget list will determine many areas to be merged, and each area to be merged includes non-text elements under the engineering quantity, unit and unit price. For example, assuming that the location information of project description 1 is the third column of the second row, if the filling direction is horizontal, then the non-text elements under the engineering quantity, unit and unit price in the corresponding area to be merged must be equal to the number of rows of project description 1. As for which column they are in, it needs to be determined based on the semantic recognition result. If the filling direction is vertical, then the non-text elements under the engineering quantity, unit and unit price in the corresponding area to be merged must be equal to the number of columns of project description 1. As for which row they are in, it needs to be determined based on the semantic recognition result.
[0061] In addition, in some embodiments, due to individual differences among engineering management personnel, there may be differences in the preparation of tables. Based on this, in order to determine the filling direction of each target budget list, it is necessary to obtain the first target cells corresponding to the project name, engineering quantity, unit and unit price respectively according to the semantic recognition results, define them as third target cells, and compare the position information of all the third target cells; if the row coordinates of all the third target cells are equal, the corresponding filling direction of the target budget list is horizontal; if the column coordinates of all the third target cells are equal, the corresponding filling direction of the target budget list is vertical.
[0062] Step S105: merging the to-be-merged areas of the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list.
[0063] It should be noted that if there is at least one project description corresponding to multiple areas to be merged in the same target budget list, the same project description may exist in the actual summary form due to the large number of projects, or the staff may not find the existing project description due to omission, and the row or column is written independently. Then, according to the project description, all non-text elements under the project quantity in the multiple areas to be merged are accumulated, the non-text elements under the unit are merged, and the non-text elements under the unit price are merged to obtain a new area to be merged;
[0064] New areas to be merged and areas to be merged that have not been merged are summarized to obtain a list to be merged, each of which includes a plurality of different project descriptions and areas to be merged corresponding to the project descriptions.
[0065] Finally, the same areas to be merged in each of the lists to be merged are merged according to the project description to obtain a total project budget list.
[0066] In summary, according to the above-mentioned method for automatically merging project lists, all project budget lists are automatically detected and identified to identify any area where elements exist in all budget lists, and then the same cells are merged or summarized to obtain a total project budget list that summarizes the information in all target budget lists, thereby replacing manual sorting and greatly improving work efficiency. Specifically, each target budget list is first traversed to first identify the valid area of each list, and then feature extraction is performed on the cells in the valid area to perform attribute detection on the cell information contained in each cell, and then the attributes of each cell information are determined, and then targeted semantic recognition is performed on the attributes that are all text elements, and then the specific text information of the cell is obtained, and then each area to be merged is determined based on the text information, and then the same areas to be merged are merged one by one according to the preset merging rules, so as to obtain the total project budget list.
[0067] like Figure 2 As shown, the embodiment of the present application also provides a system for automatically merging project budget lists, the system comprising:
[0068] The effective area detection module 10 is used to obtain at least one target budget list and traverse all cells of each target budget list to obtain the effective area of each target budget list according to the traversal result;
[0069] The attribute detection module 20 is used to extract information features of each cell in the valid area, wherein the information features include multiple position information and cell information corresponding to each position information, and perform attribute detection on the cell information according to the position information to obtain the attribute type of each cell in the valid area, wherein the attribute type includes all text elements, all non-text elements, and spaces;
[0070] The semantic recognition module 30 is used to perform semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes the project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other;
[0071] A to-be-merged area division module 40 is used to determine, based on the text information, that each target budget list includes at least one to-be-merged area corresponding to the project description, and the to-be-merged area includes non-text elements under the project quantity, unit and unit price;
[0072] The merging execution module 50 is used to merge the to-be-merged areas of the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list.
[0073] Another aspect of the present invention further provides a storage medium on which one or more programs are stored, and when the programs are executed by a processor, the above-mentioned method for automatically merging engineering budget lists is implemented.
[0074] On the other hand, the present invention further proposes an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the above-mentioned method for automatically merging engineering budget lists.
[0075] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0076] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0077] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0078] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as described in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways.
Claims
1. A method for automatically merging a project budget list, characterized in that: The method comprises: Obtain at least one target budget list, and traverse all cells of each target budget list to obtain a valid area of each target budget list according to the traversal result; Extracting information features from each cell in the valid area, the information features including multiple position information and cell information corresponding to each position information, and performing attribute detection on the cell information according to the position information to obtain an attribute type of each cell in the valid area, the attribute type including all text elements, all non-text elements, and spaces; Perform semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other; Determining, according to the text information, that each target budget list includes at least one area to be merged corresponding to the project description, wherein the area to be merged includes non-text elements under the project quantity, unit, and unit price; Based on a preset merging rule, the areas to be merged with the same project description in the at least one target budget list are merged to obtain a total project budget list.
2. The method for automatically merging project budget lists according to claim 1, characterized in that: The step of performing semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes a project name, a project quantity, a unit, a unit price, and a project description, wherein the project name and the project description are subordinate to each other, comprises: Define that all cells whose attribute types are all text elements are first target cells, and all cells whose attribute types are all non-text elements are second target cells, and perform semantic recognition on the first target cells whose attribute types are all text elements to extract at least one key field therein; The key field is matched with a preset database in similarity, so as to filter out text information with the highest similarity from the preset database as the text information of the first target cell.
3. The method for automatically merging project budget lists according to claim 2, characterized in that: The step of determining, according to the text information, that each target budget list includes at least one area to be merged corresponding to the project description, and the area to be merged includes non-text elements under the project quantity, unit and unit price comprises: The filling direction of each target budget list is obtained according to the text information of the first target cell, and all the first target cells and the second target cells are associated along the filling direction to obtain a plurality of areas to be merged.
4. The method for automatically merging project budget lists according to claim 3 is characterized in that: The step of obtaining the filling direction of each target budget list according to the text information of the first target cell includes: According to the semantic recognition result, first target cells corresponding to the project name, project quantity, unit and unit price are obtained, which are defined as third target cells, and the position information of all the third target cells is compared; If the row coordinates of all the third target cells are equal, the filling direction of the corresponding target budget list is horizontal; If the column coordinates of all the third target cells are equal, the filling direction of the corresponding target budget list is vertical.
5. The method for automatically merging project budget lists according to claim 1, characterized in that: The step of obtaining at least one target budget list and traversing all cells of each target budget list to obtain a valid area of each target budget list according to the traversal result includes: The valid area is a rectangle. The data length of each cell is obtained, and the value of each cell is defined according to the following formula: Among them, G ij represents the value of the cell in the i-th row and j-th column, S ij represents the data length of the cell in the i-th row and j-th column, where a and b both represent a preset constant, and a≠b; Get G ij = all cells of a, and select the cell with the largest number of rows and columns, and take the cell with the largest number of rows and columns as a vertex of the valid area.
6. The method for automatically merging project budget lists according to claim 1, characterized in that: The step of merging the to-be-merged areas with the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list includes: If there is at least one project description corresponding to multiple areas to be merged in the same target budget list, then according to the project description, all non-text elements under the project quantities in the multiple areas to be merged are accumulated, the non-text elements under the units are merged, and the non-text elements under the unit prices are merged to obtain a new area to be merged; New areas to be merged and areas to be merged that have not been merged are summarized to obtain a list to be merged, each of which includes a plurality of different project descriptions and areas to be merged corresponding to the project descriptions.
7. The method for automatically merging project budget lists according to claim 6, characterized in that: After the step of obtaining a list of areas to be merged by summarizing the new areas to be merged and the areas to be merged that have not been merged, the step further includes: According to the project description, the same areas to be merged in each of the lists to be merged are merged to obtain a total project budget list.
8. An automatic merging system for project budget lists, characterized in that: The system comprises: An effective area detection module is used to obtain at least one target budget list and traverse all cells of each target budget list to obtain the effective area of each target budget list according to the traversal result; an attribute detection module, for extracting information features from each cell in the valid area, wherein the information features include a plurality of position information and cell information corresponding to each of the position information, and performing attribute detection on the cell information according to the position information to obtain an attribute type of each cell in the valid area, wherein the attribute type includes all text elements, all non-text elements, and spaces; A semantic recognition module is used to perform semantic recognition on all cells whose attribute types are all text elements to obtain text information of the cells, wherein the text information includes project name, project quantity, unit, unit price and project description, and the project name and the project description are subordinate to each other; A module for dividing regions to be merged, used for determining, according to the text information, that each target budget list includes at least one region to be merged corresponding to the project description, wherein the region to be merged includes non-text elements under the project quantity, unit and unit price; The merging execution module is used to merge the to-be-merged areas of the same project description in the at least one target budget list based on a preset merging rule to obtain a total project budget list.
9. A storage medium, characterized in that: The storage medium stores one or more programs, which, when executed by a processor, implement the method for automatically merging engineering budget lists as described in any one of claims 1 to 7.
10. An electronic device, comprising a memory and a processor, wherein: The memory is used to store computer programs; When the processor is used to execute the computer program stored in the memory, it implements the method for automatically merging engineering budget lists as described in any one of claims 1-7.