Cost consistency checking method and system for power transmission and transformation project
By using a multi-pattern string matching algorithm based on skip lists and double hash tables to verify the consistency of power transmission and transformation project costs, the problem of low efficiency and poor accuracy of traditional manual verification has been solved. This has enabled intelligent and rapid cost data verification, improving the efficiency and accuracy of project management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional manual verification of power transmission and transformation project costs is inefficient, inaccurate, and lacks real-time capability, making it unsuitable for the rapid advancement of modern engineering projects. Furthermore, existing software tools lack systematic data integration and intelligent analysis capabilities.
A multi-pattern string matching algorithm based on skip lists and double hash tables is used to intelligently verify the cost text data. The algorithm is used to verify the consistency between the submitted and approved cost lists. Skip lists are used to enable the window to move in jumps, and double hash tables are used to quickly locate the matching pattern, reducing the number of comparisons.
It has enabled intelligent and automated verification of power transmission and transformation project cost data, significantly improving verification efficiency and accuracy, reducing manual intervention and the risk of missed verification, shortening the project review cycle, and improving work quality and efficiency.
Smart Images

Figure CN122047223A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data verification technology, and in particular to a method and system for verifying cost consistency in power transmission and transformation projects. Background Technology
[0002] As a core component of power grid construction, power transmission and transformation projects are characterized by large-scale investment, complex technology, long construction periods, and numerous participating entities. During project implementation, numerous stakeholders, including design, construction, procurement, and supervision, are involved, generating massive amounts of cost data, such as equipment and material costs, installation costs, labor costs, and management fees. Ensuring the accuracy, compliance, and high consistency of this cost data with actual project progress and contract terms is crucial for project cost control, budget execution auditing, and investment benefit assessment. Traditionally, the verification of power transmission and transformation project costs has relied primarily on manual methods, involving cost engineers or financial personnel who review a large number of paper or electronic documents, such as design estimates, construction contracts, site approval forms, and invoices.
[0003] However, this traditional manual verification model has significant drawbacks: First, it is extremely inefficient. With tens of thousands of expense items, manual verification is time-consuming and labor-intensive, making it difficult to meet the requirements of rapid progress in modern large-scale projects. Second, accuracy is difficult to guarantee. Oversights and misjudgments caused by human factors are hard to avoid, especially when comparing data from different professions and stages. Third, it lacks real-time capability and cannot dynamically monitor the expense occurrence process. Often, problems are discovered only after they have become established facts, resulting in high correction costs.
[0004] In recent years, with the development of information technology, some engineering projects have begun to try using simple software tools or spreadsheets for auxiliary management. However, these methods still rely heavily on manual operation and lack systematic data integration and intelligent analysis capabilities. Therefore, there is an urgent need for a method that can automate, intelligently, and systematically verify cost consistency in order to control the costs of power transmission and transformation projects. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent verification method and system for cost consistency verification in power transmission and transformation projects.
[0006] The objective of this invention can be achieved through the following technical solutions: A method for verifying cost consistency in power transmission and transformation projects includes the following steps: Obtain the text data of the cost of the power transmission and transformation project, perform preprocessing, and obtain the text string T; The text string T is searched and matched using a multi-pattern string matching algorithm based on skip lists and double hash tables to obtain cost information, and further a submission version of the cost list is formed. The submission version of the cost list contains fields related to equipment and materials, which are called project definition fields. Obtain the approved version of the cost list, wherein the submitted cost list is the approved cost list after review and adjustment. The submitted fee list and the approved fee list are checked for consistency to complete the verification process.
[0007] Furthermore, the steps of the multi-pattern string matching algorithm based on skip lists and double hash tables for retrieval and matching include: 1) Determine the input and output: The input is a set of rule patterns P, a minimum rule pattern length lmin, a text string T, a skip list ST, a first-level hash table HL1 and a second-level hash table HL2, and the output is the hit rule pattern and the matching position of the rule pattern. The rule pattern is set according to the defined field of the project to form the set of rule patterns P. 2) Initialization: Set the end position of the match Rear, and initialize the current position Cur to the minimum rule pattern length lmin; 3) Loop matching: When Cur is less than or equal to the length of T, continuously perform the following operations: First-level hash matching judgment: Hash the substring from T[Cur−lmin] to T[lmin] into the first-level hash table HL1. If the hashing is successful, further judge whether lmin is equal to the first item value L[1] of the pattern length list L in HL1, and whether the current window string is a pattern. If both are satisfied, it means that the first-level hash matching is successful, and output the current matching position and the hit rule pattern. Second-level hash matching judgment: Based on the successful first-level hash matching, further determine whether a second-level hash matching based on HL2 is needed. If needed, perform the second-level hash matching; otherwise, start a new search window based on ST to continue matching. Jump Window Movement: Hash the character at position T[Cur] in the current window to the jump table ST to get the jump value Len, and set Cur = Cur + Len and Rear = Cur. Move the search window and continue the next round of matching until Cur is greater than the length of T.
[0008] Furthermore, the step of performing the second-level hash matching includes: For each item in the pattern length list L, from the second to the last, the corresponding length substrings are hashed to the second-level hash table HL2. If the hashing is successful, it means that the second-level hashing match is successful. The matching position and the hit rule pattern are output, where the corresponding length substring is the substring from T[Cur−lmin] to T[Rear].
[0009] Furthermore, the skip table includes two columns: a character and its corresponding skip value SV. The skip value SV is used to set the search window. The process of creating the skip table includes: Initialization and Traversal Mode: Taking the set of rule patterns P as input and the skip list ST as output, for each rule pattern p in P... i Perform a traversal; Window setup and traversal: For each rule pattern p i Starting from the initial position, consider a window of length `windowlength`, and apply this to the window in regular mode `p`. i The text slides from left to right, where the length windowlength is lmin-1; Handling mismatch situations: 1) Last character mismatch: If the mismatch character mismatch appears as the last character in the window, call the Insert_shift function to insert the distance between the current character and the first occurrence of a different character into the skip list ST, where the mismatch character mismatch represents the rule pattern p. i When matching with the text string T, select the characters where the match fails. 2) Other character mismatches: If the mismatch character mismatch is in another position in the window, first determine the length X of the already joined matching character join, record the position pos of the mismatch character, pos = the position of mismatch + 1, and then search from right to left in the unjoined matching character leftover for the part that matches string[pos,windowend]. If a match is found, the jump distance Y at the position corresponding to leftover is calculated. If Y is less than the jump value value(char) of the current character in the current jump list, the Insert_shift function is used to insert the current character and Y into the jump list and the current loop is exited. If no match is found, decrement X by 1, increment pos by 1, and continue the loop search until X=0. Then insert the current character and windowlength into the skip list. Window sliding: After processing each window position, move the window one position to the right and continue the above steps until all rule patterns in P have been traversed, thus completing the construction of the skip list ST.
[0010] Further, the first-level hash table HL1 includes two columns: Min_keys, which represents the pattern prefixes or rule patterns with a prefix length of lmin in all rule patterns; and L, which represents the list of rule pattern lengths that overlap with the prefix of the current rule pattern in all rule patterns. The process of establishing the first-level hash table HL1 includes: Initialization: Initialize an empty first-level hash table HL1 with the set rule pattern set P and the minimum rule pattern length lmin as input and the first-level hash table HL1 as output; Traverse the rule pattern set: For each rule pattern p in the rule pattern set P i Perform a traversal; Prefix determination and storage: Check rule pattern p i Prefix p of length lmin i If [1...lmin] already exists in HL1, then add the prefix p. i [1...lmin] is added to the Min_keys column of HL1; Pattern length handling: If the rule pattern p i If the length is equal to lmin, then add lmin to HL1. i In the corresponding column L, where L is greater than or equal to lmin; Return result: After traversing all rule patterns in P, return the first-level hash table HL1.
[0011] Furthermore, the second-level hash table HL2 has a column, denoted as the Ovp_keys column, which contains rule patterns whose pattern length is greater than that in HL1 and which overlap with the rule patterns in HL1. The process of building the second-level hash table HL2 includes: Initialization: Initialize an empty second-level hash table HL2 with the set rule pattern set P and the minimum rule pattern length lmin as input and the second-level hash table HL2 as output; Traverse the rule pattern set: For each rule pattern p in the rule pattern set P i Perform a traversal; Length judgment and processing: Check rule pattern p i Is the length greater than the minimum rule pattern length lmin? If so, then set p... i Add the length to HL1 p i If it corresponds to column L, then end; Storage rule patterns: This includes rule patterns p that satisfy a length greater than lmin. iAdd to the Ovp_keys column in HL2 to store rule patterns that overlap with rule patterns or prefixes in HL1 and are longer. Return result: After traversing all rule patterns in P, return the second-level hash table HL2.
[0012] Furthermore, the submitted and approved fee lists include project reserve codes and project definition fields.
[0013] Furthermore, the project definition fields are cost-related fields in the power transmission and transformation project information data, including annual demand plan code, demand plan year, project definition, project description, equipment cost, installation engineering cost, labor cost, management fee, bidding fee, engineering supervision fee, design review fee, and engineering insurance fee. Among them, equipment cost includes equipment code, equipment description, unit price, quantity, and equipment model; installation engineering cost includes project code, project description, project quantity, and unit price; and labor cost includes labor ID, labor quantity, and labor salary.
[0014] Furthermore, the steps for completing the verification process include: Identify the project reserve code and project definition field in the submitted version of the expense list, and compare them with the project reserve code and project definition field in the approved version of the expense list; Determine whether a certain fee exists only in the submitted version of the equipment and materials list but not in the approved version of the fee list. If so, mark the fee in the submitted version of the fee list; otherwise, do not mark it. Further determine whether there is a certain fee that exists only in the approved version of the fee list but not in the submitted version of the fee list. If so, mark the fee in the approved version of the fee list; otherwise, do not mark it. Further analysis is needed to determine whether the annual demand plan code field in the submitted cost list matches the approved cost list. If not, a discrepancy message will be displayed. If yes, then check if the quantities are consistent. If yes, display a consistent message; otherwise, display a inconsistent message.
[0015] This invention also provides a cost consistency verification system for power transmission and transformation projects, characterized in that it includes: Data acquisition and preprocessing module: used to acquire cost text data of power transmission and transformation projects, perform preprocessing, and obtain text strings; The retrieval and matching module is used to perform retrieval and matching on the text string T based on a multi-pattern string matching algorithm using skip lists and double hash tables, to obtain cost information, and further form a submission version of the cost list, wherein the submission version of the cost list contains fields related to equipment and materials, referred to as project definition fields; Approved Version Acquisition Module: Used to obtain the approved version fee list, wherein the submitted version fee list is the approved version fee list after review and adjustment. Comparison module: Used to verify the consistency between the submitted version of the fee list and the approved version of the fee list, and complete the verification process.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention uses a multi-pattern string matching algorithm based on skip lists and double hash tables to search and match text strings to obtain the submitted version of the fee list. By comparing it with the approved version of the fee list, the different versions of the list can be verified in an intelligent way.
[0017] (2) The multi-pattern string matching algorithm based on skip list and double hash table of the present invention utilizes skip list to obtain skip value according to character, realizes window jump movement, avoids character-by-character comparison of text, and reduces unnecessary matching attempts; double hash table (first level hash table HL1 and second level hash table HL2) quickly locates possible matching patterns by storing rule patterns and prefixes, further reduces the search range during matching, significantly reduces the number of comparisons, and improves the search speed.
[0018] (3) The multi-pattern string matching algorithm of this invention based on skip lists and double hash tables allows the algorithm to skip some impossible matching positions and move directly to the region where a match may exist; the double hash table structure can quickly determine whether a text substring may match a regular pattern. The combination of the two significantly speeds up the overall search speed. Compared with some traditional multi-pattern matching algorithms, it can complete the matching task in a shorter time when processing the same size set of text and patterns.
[0019] (4) The present invention significantly reduces the need for manual comparison, thereby reducing time consumption and the risk of missed detection. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram illustrating the skip table construction of the present invention. Detailed Implementation
[0021] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0022] Example 1 This embodiment provides a method for verifying cost consistency in power transmission and transformation projects, such as... Figure 1 As shown, the method includes the following steps: Step 1: Establish a preliminary cost list for the power transmission and transformation project. Based on the annual material demand plan, design documents, and cost estimates submitted for the power transmission and transformation project, and according to the "Project Reserve Code" + "Project Definition" information, cost information is retrieved and analyzed according to the information required for review, and a preliminary design cost list for the project is generated based on this data. The cost list mainly reviews and displays the information shown in Table 1: Table 1 Preliminary Cost List Based on the project review management plan and process, the fee list submitted by the user before the review is the submission version, while the fee list submitted by the user after making adjustments based on the expert review opinions is the final version.
[0023] Step 2, Fee Information Retrieval and Matching: The cost information extracted from feasibility studies, preliminary design reports, and cost estimates for power transmission and transformation projects is characterized by its abundance and complexity. To support the extraction of relevant information from these documents and the generation of cost lists, this paper studies a multi-pattern string matching algorithm. This algorithm simultaneously searches for numerous rule patterns within a given cost text, determining patterns by retrieving keywords from the text. This aligns with the application scenario of multi-pattern string matching. In this embodiment, a solution is proposed that minimizes the number of matching attempts during the string matching process by using skip lists and double hashing techniques, thereby accelerating string pattern matching. This proposed solution is called the multi-pattern string matching algorithm based on skip lists and double hashing techniques. Experimental results show that this algorithm is more efficient in terms of time and space complexity than classic multi-pattern string matching algorithms.
[0024] (1) Basic definition The novel algorithm proposed in this study uses two hash tables to store the target pattern of the rule. During the search phase, the target pattern is matched and detected by mapping the hash values to these hash tables. The following sections introduce some basic definitions used in the algorithm and describe these definitions and their related data structures.
[0025] Definition 1 introduces a variable `lmin`, frequently used in subsequent algorithms, to represent the minimum rule pattern length. Definition 2 illustrates a mainstream skip list. Definition 3 describes a minimum prefix hash table, i.e., a first-level hash table, used to store the target pattern and its prefix with the minimum pattern length. Definition 4 describes a target pattern overlap hash table, i.e., a second-level hash table, used to store target patterns that overlap with the target patterns or their prefixes stored in the first-level hash table.
[0026] Definition 1: Minimum pattern length (lmin) represents the minimum rule pattern length among all rule patterns. The following definitions also explain the meaning of using this reference symbol, and it will be used many times in the subsequent algorithms.
[0027] Definition 2: Skip List (ST) consists of two columns, representing the characters in the character set ∑ and the corresponding skip value SV for each character. The character set ∑ consists of individual letters appearing in the rule pattern P, and the skip value for each letter is an integer used to set a new text search window.
[0028] Example 1 is a practical example of a skip list.
[0029] Example 1: Set of rule patterns P={aaba, aabab, aababc, aababcd, aababcde, abcb, zmnd, qope, jmqfm} The corresponding skip list is shown in Table 2 below. In the first column of the skip list, the '*' sign indicates other characters that do not appear in the character set ∑.
[0030] Table 2 Skip Table Definition 3: The first-level hash table (HL1) is used to store rule patterns whose pattern length is equal to the minimum rule pattern length lmin, or rule pattern prefixes whose pattern prefix length is equal to lmin. The first-level hash table has two columns. The first column stores all pattern prefixes whose pattern prefix length is equal to the minimum pattern length lmin, or rule patterns with the minimum pattern length; this column is denoted by Min_keys. The second column represents a list of all rule pattern lengths in the rule pattern set that overlap with the current pattern prefix; this column is denoted by the letter L.
[0031] Example 2: Set of rule patterns P={aaba, aabab, aababc, aababcd, aababcde, abcb, zmnd, qope, jmqfm} The corresponding first-level hash table is shown in Table 3 below.
[0032] Table 3 First-level hash table Definition 4: The second-level hash table (HL2) is used to store target patterns that overlap with the target patterns or target pattern prefixes stored in the first-level hash table; therefore, it is also called the target pattern overlapping hash table. The second-level hash table (HL2) has only one column, which stores rule patterns whose length is greater than the patterns in the first-level hash table (HL1) and which overlap with the rule patterns in HL1. This column is represented by Ovp_keys.
[0033] Example 3: Set of rule patterns P={aaba, aabab, aababc, aababcd, aababcde, abcb, zmnd, qope, jmqfm} The corresponding second-level hash table is shown in Table 4.
[0034] Table 4 Second-level hash table This concludes the description of the relevant definitions used in the multi-pattern string matching algorithm based on skip lists and double hashing techniques in this study. The following section will elaborate on the ideas behind the algorithm processing stage.
[0035] (2) Pretreatment stage The algorithm's processing phase primarily involves creating two related hash tables: a first-level hash table (HL1) and a second-level hash table (HL2), as well as a skip list (ST) for search window transformation. The following sections will describe several algorithms that illustrate how to create the skip list (ST), the first-level hash table (HL1), and the second-level hash table (HL2).
[0036] 1) Skip list construction algorithm A skip list (ST) is essentially a hash table with characters as keys. Initially, these keys consist of all characters appearing at the lmin position in the rule patterns. As the text string is searched and matched, the key set is dynamically expanded to include characters that are not in the character set but appear in the rule patterns. When the search window is slid, the skip list allows you to use the skip value to slide to the furthest point in the given text where there are no overlapping patterns, thus speeding up the matching search for rule patterns.
[0037] To better understand the skip list building algorithm, further explanation of the functions and variables is needed. The function `Insert_shift(char, n)` inserts the currently input character and its corresponding skip value into the character skip list (ST). The function `Value(char)` retrieves the skip value of the character input to the function in the current skip list (ST). The variable `window` can be seen as some of the constituent characters of the current rule pattern. The variable `windowlength` can be seen as the minimum rule pattern length - 1, i.e., `lmin-1`. In the skip list building algorithm, a complete rule pattern consists of three parts: mismatch characters, joined matching characters, and unjoined matching characters. Their composition relationship is shown in the diagram above. The variable `mismatch` represents the mismatch character, which is the character where the match fails when the current pattern and the text string are matched. The variable `join` represents joined matching characters, which are all characters in the current rule pattern that have matched the text string and are to the right of `mismatch`. The variable `leftover` represents unjoined matching characters, which are all characters in the current rule pattern that have not matched the text string and are to the left of the mismatch character. The variable L represents the length of the substring being processed in the current pattern.
[0038] Combination Figure 2 As shown in Table 5 below, the process of building the skip list is illustrated by the following algorithm: Table 5 Algorithm for Skip List Construction 2) Algorithm for building the first-level hash table The first-level hash table (HL1) stores rule patterns from the rule pattern set whose string length is equal to the minimum rule pattern length lmin, or whose length is equal to lmin's prefix, and lists them in the Min_keys column. Meanwhile, each value inserted into the pattern length list L is the length of the rule pattern that overlaps with the current rule pattern in the second-level hash table, and its value is greater than or equal to lmin. The process of creating the first-level hash table (HL1) is shown in the algorithm in Table 6 below.
[0039] Table 6 Algorithm for Building the First-Level Hash Table 3) Algorithm for building the second-level hash table The second-level hash table (HL2) is used to store rule patterns in the rule pattern set that overlap with rule patterns or rule pattern prefixes stored in the first-level hash table (HL1). Therefore, the length of these rule patterns is longer than that stored in the first-level hash table. The set of rule patterns P used in the first-level hash table (HL1) and the minimum rule pattern length lmin can be used as input to the algorithm for building the second-level hash table. Meanwhile, the main task in creating the second-level hash table is to store overlapping rule patterns with a length greater than lmin in the second-level hash table. A more detailed description of the process of creating the second-level hash table is shown in Table 7 below: Table 7 Algorithm for Building the First-Level Hash Table After the preprocessing phase of the algorithm is complete, all the necessary hash tables and character skip tables have been created for the subsequent search and matching algorithm, and these created hash tables and character skip tables will be applied to all search windows. For example, if the set of rule patterns is: If P = {aaba, aabab, aababc, aababcd, aababcde, aababcde, abcb, zmnd, qope, jmqfm}, then the initialization forms of the skip list (ST), the first-level hash table (HL1), and the second-level hash table (HL2) are as shown in the three lists above.
[0040] (3) Search and matching stage The following section will detail the search steps and some details of the matching algorithm, and then analyze the specific process of the search steps in the matching algorithm based on a specific pattern matching case.
[0041] 1) Algorithm Idea The search method in the rule pattern matching process is driven by the initialization window, so the initial search starting point is at the minimum rule pattern length lmin of the given text. Then, the substring formed at this window is hashed into the first-level hash table (HL1). At this point, the value of the first item in the pattern length list L corresponding to the current key is checked against lmin. If they are equal, the rule pattern formed in the current window matches; otherwise, it does not. If there are many options in the length list L corresponding to the substring formed in the current window, the substring of the next length is hashed into the second-level hash table for another matching check. This process is repeated until the last option in the length list L corresponding to the substring formed in the current search window is obtained. Next, the character appearing at the minimum pattern length lmin in the current search window is hashed into the character skip list (ST) to obtain its corresponding skip value. The next search window is then started based on this skip value to search for and match rule patterns in the text.
[0042] The idea behind the above search algorithm is illustrated in pseudocode, as shown in Table 8 below.
[0043] Table 8 Multi-pattern string matching algorithm 2) Operational Analysis The above describes the idea behind the search matching algorithm and provides pseudocode. To further understand the core idea, we will analyze it using a rule-based pattern matching example. The operation of the multi-pattern string matching algorithm based on skip lists and double hash tables is shown in Example 4.
[0044] Example 4: Search for a set of rule patterns in a given text set T = {aababcdezmndjmqfmaababcd} The processing procedure for P={aaba, aabab, aababc, aababcd, aababcde, aababcb, zmnd, qope, jmqfm} is as follows: Search window 1: Hash(“aaba”) → HL1=true, L=4, 5, 6, 7, 8, Match status: Success.
[0045] The substring "aaba" formed in the current window exists in the first-level hash table HL1. Its corresponding pattern length list is L=4, 5, 6, 7, 8. If it is not empty, it means that the match is successful. Report the currently matched rule pattern "aaba" and the matching position 1 in T. Next, let's look at the matching process of the substring formed by the second item in the list. Process L[2]=5, hash(“aabab”)→HL2=true, matching status: successful. Report the currently matched rule pattern “aabab” and matching position 1. Process L[3]=6, hash(“aababc”)→HL2=true, matching status: successful. Report the currently matched rule pattern “aababc” and matching position 1. Process L[4]=7, hash(“aababcd”)→HL2=true, matching status: successful. Report the currently matched rule pattern “aababcd” and matching position 1. Process L[5]=8, hash(“aababcde”)→HL2=true, matching status: successful. Report the currently matched rule pattern “aababcde” and matching position 1. At this point, the last item in L has been reached, so the matching process of search window 1 ends, and the search of the next window begins based on the last character 'a' of the current window.
[0046] Search window 2: Jump value 'a'=1 Hash(“abab”) → HL1 = false, L does not exist, matching status: failed.
[0047] If the jump value 'a' of the previous window is 1, then the window is moved one position to form the current window. Since the substring "abab" formed by the current window does not exist in HL1, the rule pattern length list L does not exist, and therefore the rule pattern matching fails.
[0048] Search window 3: Jump value 'b'=1 Hash(“babc”) → HL1 = false, L does not exist, matching status: failed.
[0049] Search window 4: Jump value 'c'=1 Hash(“abcd”) → HL1 = false, L does not exist, matching status: failed.
[0050] Search window 5: Jump value 'd'=1 Hash(“bcde”) → HL1 = false, L does not exist, matching status: failed.
[0051] Search window 6: Jump value 'e'=1 Hash(“cdez”) → HL1 = false, L does not exist, matching status: failed.
[0052] Search window 7: Jump value 'z'=3 Hash(“zmnd”) → HL1=true, L=4, Match status: Success. Report the current rule pattern “zmnd” and match position 9. Since there is only one item in the length list L, continue the search in the next window.
[0053] Search window 8: Jump value 'd'=1 Hash("mndj") → HL1 = false, L does not exist, matching status: failed.
[0054] Search window 9: Jump value 'j'=3 Hash(“jmqf”) → HL1=false, L=5, Match status: Success.
[0055] Process L[1]=5 Hash(“jmqfm”) → HL2=true, L=5, Match status: Success. Report the current rule pattern “jmqfm” and match position 13. At this point, the last item in the current length list L has been reached, therefore the matching process in search window 8 has ended.
[0056] Search window 10: Jump value 'f' = 1 Hash(“mqfm”) → HL1=true, L does not exist, matching status: failed.
[0057] Search window 11: Jump value 'm'=1 Hash(“qfma”) → HL1 = false, L does not exist, matching status: failed.
[0058] Search window 12: Jump value 'a'=1 Hash(“fmaa”) → HL1 = false, L does not exist, matching status: failed.
[0059] Search window 13: Jump value 'a' = 1 Hash(“maab”) → HL1 = false, L does not exist, matching status: failed.
[0060] Search window 14: Jump value 'b' = 1 Hash (“aaba”) → HL1=true, L=4, 5, 6, 7, 8, Match status: Success. Then report the rule pattern “aaba” and the matching position 18.
[0061] Process L[2]=5 Hash(“aabab”) → HL2 = True, Match Status: Success. Report rule pattern “aabab” and matching position 18.
[0062] Process L[3]=6 Hash(“aababc”) → HL2 = True, Match Status: Success. Report the current rule pattern “aababc” and the matching position 18.
[0063] Process L[4]=7 Hash(“aababcd”) → HL2 = True, Match Status: Success. Report the current rule pattern “aababcd” and the matching position 18.
[0064] Process L[5]=8, not executed.
[0065] Search window 15: Because Cur > the length of T, the search matching process ends.
[0066] The analysis of the search process above shows that performing rule pattern scanning and matching on a given cost text can save a significant amount of time. During all scanning processes, if no characters can be skipped, the time spent comparing and matching the rule patterns will be equal to the given text length.
[0067] Step 2, Comparison of Expense Lists: A comparison needs to be made between the submitted fee list and the approved fee list to ensure consistency of key information.
[0068] For power transmission and transformation projects awaiting verification, the process first involves matching the "Project Reserve Code" + "Project Definition" fields of the current project with those of the submitted project. Based on the project code information, the corresponding submitted and approved cost lists are extracted and displayed.
[0069] Table 9 below is a comparison table, showing the following field information: Table 9 Comparison Table If a certain expense exists in the submitted expense list but not in the approved expense list, it will be marked in light red in the submitted expense list. If an expense exists in the approved expense list but not in the submitted expense list, it will be marked in light yellow-red in the approved expense list, and the expense not in the submitted expense list should be displayed at the very bottom of the project expense list.
[0070] If the "Annual Demand Plan Code" field is the same in both lists, the "Quantity" field should be compared to see if they are the same. If they are not the same, a check for discrepancies should be displayed; otherwise, a check for consistency should be displayed.
[0071] By digitally empowering the comparison and application research of key information before and after the review of cost lists for power transmission and transformation projects, the project implementation reduces manual review time, improves review efficiency, and avoids the risk of missed inspections. Firstly, it comprehensively improves work efficiency; calculations show that the project review cycle is shortened by 25%. Secondly, it fully supports subsequent material planning and procurement, avoiding the risk of errors in material allocation and procurement.
[0072] Example 2 This embodiment provides a cost consistency verification system for power transmission and transformation projects, including: Data acquisition and preprocessing module: used to acquire cost text data of power transmission and transformation projects, perform preprocessing, and obtain text strings; The retrieval and matching module is used to perform retrieval and matching on the text string T based on a multi-pattern string matching algorithm using skip lists and double hash tables, to obtain cost information, and further form a submission version of the cost list, wherein the submission version of the cost list contains fields related to equipment and materials, referred to as project definition fields; Approved Version Acquisition Module: Used to obtain the approved version fee list, wherein the submitted version fee list is the approved version fee list after review and adjustment. Comparison module: Used to verify the consistency between the submitted version of the fee list and the approved version of the fee list, and complete the verification process.
[0073] The rest are as in Example 1.
[0074] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0076] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0079] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0080] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for verifying cost consistency in power transmission and transformation projects, characterized in that, Includes the following steps: Obtain the text data of the cost of the power transmission and transformation project, perform preprocessing, and obtain the text string T; The text string T is searched and matched using a multi-pattern string matching algorithm based on skip lists and double hash tables to obtain cost information, and further a submission version of the cost list is formed. The submission version of the cost list contains fields related to equipment and materials, which are called project definition fields. Obtain the approved version of the cost list, wherein the submitted cost list is the approved cost list after review and adjustment. The submitted fee list and the approved fee list are checked for consistency to complete the verification process.
2. The method for verifying cost consistency in power transmission and transformation projects according to claim 1, characterized in that, The steps of the multi-pattern string matching algorithm based on skip lists and double hash tables for retrieval and matching include: 1) Determine the input and output: The input is a set of rule patterns P, a minimum rule pattern length lmin, a text string T, a skip list ST, a first-level hash table HL1 and a second-level hash table HL2, and the output is the hit rule pattern and the matching position of the rule pattern. The rule pattern is set according to the defined field of the project to form the set of rule patterns P. 2) Initialization: Set the end position of the match Rear, and initialize the current position Cur to the minimum rule pattern length lmin; 3) Loop matching: When Cur is less than or equal to the length of T, continuously perform the following operations: First-level hash matching judgment: Hash the substring from T[Cur−lmin] to T[lmin] into the first-level hash table HL1. If the hashing is successful, further judge whether lmin is equal to the first item value L[1] of the pattern length list L in HL1, and whether the current window string is a pattern. If both are satisfied, it means that the first-level hash matching is successful, and output the current matching position and the hit rule pattern. Second-level hash matching judgment: Based on the successful first-level hash matching, further determine whether a second-level hash matching based on HL2 is needed. If needed, perform the second-level hash matching; otherwise, start a new search window based on ST to continue matching. Jump Window Movement: Hash the character at position T[Cur] in the current window to the jump table ST to get the jump value Len, and set Cur = Cur + Len and Rear = Cur. Move the search window and continue the next round of matching until Cur is greater than the length of T.
3. The method for verifying cost consistency in power transmission and transformation projects according to claim 2, characterized in that, The steps for performing the second-level hash matching include: For each item in the pattern length list L, from the second to the last, the corresponding length substrings are hashed to the second-level hash table HL2. If the hashing is successful, it means that the second-level hashing match is successful. The matching position and the hit rule pattern are output, where the corresponding length substring is the substring from T[Cur−lmin] to T[Rear].
4. The method for cost consistency verification in power transmission and transformation projects according to claim 2, characterized in that, The skip table includes two columns: a character and its corresponding skip value SV. The skip value SV is used to set the search window. The process of creating the skip table includes: Initialization and Traversal Mode: Taking the set of rule patterns P as input and the skip list ST as output, for each rule pattern p in P... i Perform a traversal; Window setup and traversal: For each rule pattern p i Starting from the initial position, consider a window of length `windowlength`, and apply this to the window in regular mode `p`. i The text slides from left to right, where the length windowlength is lmin-1; Handling mismatch situations: 1) Last character mismatch: If the mismatch character mismatch appears as the last character in the window, call the Insert_shift function to insert the distance between the current character and the first occurrence of a different character into the skip list ST, where the mismatch character mismatch represents the rule pattern p. i When matching with the text string T, select the characters where the match fails. 2) Other character mismatches: If the mismatch character mismatch is in another position in the window, first determine the length X of the already joined matching character join, record the position pos of the mismatch character, pos = the position of mismatch + 1, and then search from right to left in the unjoined matching character leftover for the part that matches string[pos,windowend]. If a match is found, the jump distance Y at the position corresponding to leftover is calculated. If Y is less than the jump value value(char) of the current character in the current jump list, the Insert_shift function is used to insert the current character and Y into the jump list and the current loop is exited. If no match is found, decrement X by 1, increment pos by 1, and continue the loop search until X=0. Then insert the current character and windowlength into the skip list. Window sliding: After processing each window position, move the window one position to the right and continue the above steps until all rule patterns in P have been traversed, thus completing the construction of the skip list ST.
5. The method for verifying cost consistency in power transmission and transformation projects according to claim 2, characterized in that, The first-level hash table HL1 includes two columns: Min_keys, which represents the prefixes of all rule patterns with a prefix length of lmin or the rule patterns with a prefix length of lmin; and L, which represents the list of rule pattern lengths that overlap with the prefix of the current rule pattern. The process of building the first-level hash table HL1 includes: Initialization: Initialize an empty first-level hash table HL1 with the set rule pattern set P and the minimum rule pattern length lmin as input and the first-level hash table HL1 as output; Traverse the rule pattern set: For each rule pattern p in the rule pattern set P i Perform a traversal; Prefix determination and storage: Check rule pattern p i Prefix p of length lmin i If [1...lmin] already exists in HL1, then add the prefix p. i [1...lmin] is added to the Min_keys column of HL1; Pattern length handling: If the rule pattern p i If the length is equal to lmin, then add lmin to HL1. i In the corresponding column L, where L is greater than or equal to lmin; Return result: After traversing all rule patterns in P, return the first-level hash table HL1.
6. The method for verifying cost consistency in power transmission and transformation projects according to claim 2, characterized in that, The second-level hash table HL2 has a column denoted as Ovp_keys, which contains rule patterns whose pattern length is greater than that in HL1 and which overlap with the rule patterns in HL1. The process of building the second-level hash table HL2 includes: Initialization: Initialize an empty second-level hash table HL2 with the set rule pattern set P and the minimum rule pattern length lmin as input and the second-level hash table HL2 as output; Traverse the rule pattern set: For each rule pattern p in the rule pattern set P i Perform a traversal; Length judgment and processing: Check rule pattern p i Is the length greater than the minimum rule pattern length lmin? If so, then set p... i Add the length to HL1 p i If it corresponds to column L, then end; Storage rule patterns: This includes rule patterns p that satisfy a length greater than lmin. i Add to the Ovp_keys column in HL2 to store rule patterns that overlap with rule patterns or prefixes in HL1 and are longer. Return result: After traversing all rule patterns in P, return the second-level hash table HL2.
7. The method for verifying cost consistency in power transmission and transformation projects according to claim 1, characterized in that, The submitted and approved fee lists include project reserve codes and project definition fields.
8. The method for verifying cost consistency in power transmission and transformation projects according to claim 1, characterized in that, The project definition fields are the cost-related fields in the power transmission and transformation project information data, including annual demand plan code, demand plan year, project definition, project description, equipment cost, installation engineering cost, labor cost, management fee, bidding fee, engineering supervision fee, design review fee, and engineering insurance fee. Among them, equipment cost includes equipment code, equipment description, equipment unit price, equipment quantity, and equipment model; installation engineering cost includes project code, project description, project quantity, and engineering installation unit price; and labor cost includes labor ID, labor quantity, and labor salary.
9. The method for verifying cost consistency in power transmission and transformation projects according to claim 1, characterized in that, The steps to complete the verification process include: Identify the project reserve code and project definition field in the submitted version of the expense list, and compare them with the project reserve code and project definition field in the approved version of the expense list; Determine whether a certain fee exists only in the submitted version of the equipment and materials list but not in the approved version of the fee list. If so, mark the fee in the submitted version of the fee list; otherwise, do not mark it. Further determine whether there is a certain fee that exists only in the approved version of the fee list but not in the submitted version of the fee list. If so, mark the fee in the approved version of the fee list; otherwise, do not mark it. Further analysis is needed to determine whether the annual demand plan code field in the submitted cost list matches the approved cost list. If not, a discrepancy message will be displayed. If yes, then check if the quantities are consistent. If yes, display a consistent message; otherwise, display a inconsistent message.
10. A cost consistency verification system for power transmission and transformation projects, characterized in that, include: Data acquisition and preprocessing module: used to acquire cost text data of power transmission and transformation projects, perform preprocessing, and obtain text strings; The retrieval and matching module is used to perform retrieval and matching on the text string T based on a multi-pattern string matching algorithm using skip lists and double hash tables, to obtain cost information, and further form a submission version of the cost list, wherein the submission version of the cost list contains fields related to equipment and materials, referred to as project definition fields; Approved Version Acquisition Module: Used to obtain the approved version fee list, wherein the submitted version fee list is the approved version fee list after review and adjustment. Comparison module: Used to verify the consistency between the submitted version of the fee list and the approved version of the fee list, and complete the verification process.