A Pattern-Based Software Process Evidence Collection Method
Through the pattern-based software process evidence collection method, software project documents are automatically processed, which solves the problem of low efficiency of evidence collection in the existing technology and realizes efficient and accurate evidence collection.
Patent Information
- Application Number
- CN202310284587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-03-22
AI Technical Summary
During the software development process, existing technologies require a lot of time and effort to select evidence from massive amounts of work products, resulting in low efficiency in evidence collection.
A pattern-based software process evidence collection method is adopted. By customizing the evidence source and using six query modes (table column mode, table row mode, table content mode, chapter mode, title keyword mode, and full-text keyword mode), evidence collection is automated to achieve efficient query of software project documents and creation of evidence chains.
It improves the accuracy and speed of evidence collection, reduces manual intervention, and improves the efficiency of evidence collection.
Smart Images

Figure CN116450582B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software technology, and in particular to a pattern-based software process evidence collection method. Background Art
[0002] In the information age, software applications are continuously expanding, playing an increasingly important role in the national economy. Society's reliance on software systems is rapidly increasing. Software is not only used in industries vital to national security, such as defense, military, aerospace, energy, telecommunications, and public security, where reliability is crucial, but also in nearly every area of daily life, including enterprise management, information processing, and other common software systems. Simultaneously, with the rapid development of computer technology, data fusion, networking, and communications technology, the requirements for software functionality are becoming increasingly stringent, making software quality assessment a pressing issue. The Capability Maturity Model (CMM) is a standard that describes the various stages of a software organization's development in defining, implementing, measuring, controlling, and improving its software processes. Standards such as CMMI and GJB5000 are fundamentally based on process management, embodying the core concept of "process-assured quality" through the relationships between objectives, activities (practices), and work products (documents and data). During standards-based assessments, assessment experts create evidence chain tables (PIIDs) for the standard to reflect the evidence chain relationships between objectives, activities, and work products.
[0003] Establishing evidence chain relationship tables (PIIDs) requires collecting evidence data covering the entire software development lifecycle. Software development, especially large-scale software development, accumulates vast amounts of data. Therefore, this evidence collection process requires evaluation experts to sift through a vast amount of project work products, often requiring considerable time and effort. Summary of the Invention
[0004] To overcome the shortcomings of the above-mentioned prior art, a pattern-based software process evidence collection method is proposed. The present invention uses patterns to solve the problem of process evidence collection and can effectively solve the above-mentioned problems. The specific technical solutions adopted by the present invention are as follows:
[0005] A pattern-based software process evidence collection method includes the following steps:
[0006] S1. Customize the evidence sources for each practice in the Software Capability Maturity Model. First, select the standards used to control and improve the development stages of the software project to be evaluated, and configure the evidence sources for each practice in the selected standards, that is, the rules used to collect evidence for the practice. Each practice can be configured with one or more evidence sources. The evidence sources are represented as<k,γ> ; where k is the file name keyword used to retrieve files that can be used as evidence; γ is the query pattern used to find evidence-related content in the file. The query pattern is expressed as γ =<name,rule> , where name is the pattern name and rule is the pattern rule.
[0007] S2. Import the work products of the project to be evaluated. The document set D of each development stage of the software project to be evaluated is {d1, d2, ...d N} is imported into the evidence collection system as the query object of the S3 step, d N is the Nth document of the software project to be evaluated, where N is the total number of documents.
[0008] S3. Automatically collect evidence for the evaluation project and create an evidence chain for each practice. An evidence chain consists of a set of evidence generated by related activities. The evidence chain of practice p is represented by ES p ={Evident1,Evident2,…,Evident m}, where Evident i Denotes the evidence obtained from the i-th evidence source configured for practice p. According to the configuration of the evidence source in step S1, the evidence is automatically collected for each practice by scanning the document set D in the project to be evaluated in S2, that is, for each practice given the evidence source<k,γ> , query operations are performed to collect work products that meet the pattern requirements as evidence.
[0009] As an example, the query mode γ in step S1 is<name,rule> include:
[0010] 1) Mode A (named "Table Column Mode"): This mode is used to query whether data exists in a specified column within a specified table in a document. The rule for this mode is as follows:
[0011] tab:col1,col2…col n (1)
[0012] The tab in formula 1 represents the name of the table to be queried, and col i Refers to the name of a specified column in the tab.
[0013] 2) Mode B (named "Table Row Mode"): This mode is used to query whether a specified keyword exists in a set table in a document and whether there is valid data after the keyword. The rule of this mode is expressed as:
[0014] tab:word1,word2…word n :min,max (2)
[0015] The tab in formula 2 represents the name of the table to be queried, and word i Indicates a specified keyword, min and max represent integer numbers used to specify the valid range of data.
[0016] 3) Mode C (named "Table Content Mode"): used to query whether a specified keyword exists in a set table in a document and whether there is valid text after the keyword. The valid text refers to text that contains the set string. The rule of this mode is expressed as
[0017] tab:word1,word2…word n :str (3)
[0018] The tab in formula 3 represents the name of the table to be queried, and word i Represents a specified keyword, and str represents a valid string.
[0019] 4) Mode D (named "Chapter Mode"): used to query whether a document contains a set title, and whether the title has several subtitles. The rule of this mode is expressed as
[0020] title (4)
[0021] The title in formula 4 represents the content of the title to be searched.
[0022] 5) Mode E (named "title keyword mode"): used to query whether the title of the set chapter in the document contains the specified keyword. The rule of this mode is expressed as
[0023] title:str (5)
[0024] The title in formula 5 represents the title of the chapter, and str represents the keywords that need to be included.
[0025] 6) Mode F (named "full text keyword mode"): used to query whether the full text of the document contains the specified keyword. The rule of this mode is expressed as
[0026] str (6)
[0027] In formula 6, str represents the keywords that need to be searched in the full text.
[0028] Preferably, the specific steps of using a predefined query pattern to check whether each document has evidence in step S3 are as follows:
[0029] S31. Based on the file name keyword k, search for related documents from the document set D. Get the file name d of a document in D i .name, calculate d i The edit distance between .name and the file name keyword k. If the edit distance is less than the threshold θ, the file d is considered i It can be used as a source document of evidence and execute step S32 to check d i If the edit distance is greater than the threshold θ, the file d is considered i If it cannot be used as a source file of evidence, the next file in D will be checked. When all documents in D are queried, the current step will be exited.
[0030] S32. Check file d according to the query pattern γ of the evidence source i Is there evidence that satisfies the query pattern? According to the pattern name in γ, the corresponding query steps are executed respectively, as shown in steps S33-S36.
[0031] S33. When the schema name is "table column schema", query document d i Whether there is evidence that satisfies pattern A. The specific steps are as follows S331-S335.
[0032] S331. First, parse the pattern rule to obtain the name tab of the setting table and the specified column names col1, col2...col in the pattern rule. n The pattern rule p is split into two parts by string segmentation. The first part is the name of the table tab. The second part is the name of each column col by string segmentation. i ,col i To specify the column name col1, col2...col n The i-th column name in , i = 1 to n.
[0033] S332. Get document d i Each table in the table name tab;
[0034] S333. Traverse each table t in S332) i Each column y in i , and determine the column name y i With the specified column name col iAre they the same? If they are the same, record the current column y i The index ci i If col1, col2...col in the pattern rule n Any one of them cannot be in table t i If the same column name is found in the array, it means that the pattern A does not match successfully; if both can be found, the index of the found column is represented as an array CI = {ci1, ci2, ..., ci n}.
[0035] S334. Traverse table t i Each row in the . In each row, retrieve the content x of each cell in the query column by indexing the CI array. If any x is an empty string, pattern A fails to match. If the content x of all cells in the query column is non-empty, pattern A successfully matches.
[0036] S34. When the mode name is "table row mode", query document d i Whether there is evidence that satisfies pattern B. The specific steps are as follows S341-S345.
[0037] S341. First, parse the pattern rule to obtain the name tab of the setting table in the pattern rule, each specified keyword word1, word2...word n , the valid range of data min and max. By using the string segmentation method, the pattern rule p is divided into three parts. The first part is to set the table name tab. The second part uses the string segmentation method to obtain each keyword word i The third part obtains the lower limit min and upper limit max of valid data through string segmentation.
[0038] S342. Get the table named tab in the document di
[0039] S343. Traverse each table t obtained in S342) i Each cell in the , and obtain the text content in the cell and perform pattern matching. The text content in a cell is represented as a string x. First, x is preprocessed and the preprocessed string is represented as x'. Then, it is determined whether x' contains all the specified keywords word1, word2...word n If yes, then go to step S344; if no, it means that pattern B is not matched successfully.
[0040] S344. Traverse each character c in the string x' i , judge character c iIs it a numeric character? Get all numeric combinations, expressed as l={l1,l2,…l p Finally, traverse the set l and compare all the numbers with the upper and lower limits min and max of the valid range. If
[0041]
[0042] If yes, it means that pattern B matches successfully; otherwise, it means that pattern B matches unsuccessfully.
[0043] S35. When the mode name is "table content mode", query document d i Whether there is evidence that satisfies pattern C. The specific steps are as follows S351-S356.
[0044] S351. First, parse the pattern rule to obtain the setting table name tab, each specified keyword word1, word2...word n , set the valid string str. By using the string segmentation method, the pattern rule p of pattern C is split into three parts. The first part is to set the table name tab. The second part uses the string segmentation method to obtain each specified keyword word i The third part is the valid string str.
[0045] S352. Get document d i The table whose name is tab is used to set the table name.
[0046] S353. Traverse each table t obtained in S352) i Each cell in the array is matched against the text content in the cell. The text content in a cell is represented as a string x. First, x is preprocessed and the preprocessed string is represented as x'. Then, it is determined whether x' contains the specified keywords word1, word2...word n If yes, then go to step S354; if no, it means that pattern C matching is unsuccessful.
[0047] S354. Calculate the similarity between the table content x' and the set valid string str. First, determine the string lengths of str and x'. If one of str and x' is an empty string and the other is non-empty, the similarity is 0%. If str and x' are identical, the similarity is 100%. For other cases, proceed to step S356 to determine the similarity.
[0048] S355. First, preprocess str and x'. Segment str and x' and count the words that appear in str and x' to build a vocabulary. Then, count the frequency of each word. Represent str and x' as vectors ts_WordList and s_WordList respectively. The value of each position in the vector is the frequency of the word corresponding to that position. Finally, calculate the similarity between vectors ts_WordList and s_WordList, expressed as score. According to the similarity threshold τ, if the score is greater than the threshold τ, it is judged that pattern C matches successfully; otherwise, it means that the match is unsuccessful.
[0049] S36. When the mode name is "chapter mode", query document d i Is there evidence that satisfies pattern D? The specific steps are as follows: S361-S364.
[0050] S361. First, parse the pattern rule to obtain the set title character string title in the pattern rule.
[0051] S362. Get document d i The content in the file is title, and its title level is recorded as i1.
[0052] S363. Determine document d i Is there a title after the title with content title? Traverse the subsequent paragraphs in the document. If a paragraph is a title type, get the title level of the subsequent paragraph as i2. If it satisfies
[0053] i1>i2
[0054] It means that there is a subtitle and pattern D matches successfully; otherwise, pattern D matches unsuccessfully.
[0055] S37. When the pattern name is "title keyword pattern", query document d i Is there evidence that satisfies pattern E? Specific steps are as follows: S371-S375.
[0056] S371. First, parse the pattern rule to obtain the set title name title and the specified keyword str in the pattern rule. Using a string splitting method, using a colon as a separator, split the pattern rule p of pattern E into two parts: the first part is the set title name title, and the second part is the specified keyword str.
[0057] S372. Get document d i The content in the file is title, and its title level is recorded as i1.
[0058] S373. Determine document d iIf the paragraph after the title is a text type, then add the text content of the paragraph to the global string set L; if the paragraph after is a title type, then get the title level i2 of the paragraph after.
[0059] i1>i2
[0060] Then continue to add the text content in the current chapter to the global string set L. If the above comparison formula does not hold, proceed to step S374.
[0061] S374. Search for the keyword str in the global string set L. If str can be found in L, it means that the pattern E matches successfully; otherwise, the pattern E does not match successfully.
[0062] S38. When the mode name is "full-text keyword mode", query document d i Whether there is evidence that satisfies pattern F. The specific steps are as follows S381-S382.
[0063] S381. First, parse the pattern rule to obtain the specified full-text keyword str in the pattern rule.
[0064] S382. Traverse document d i Each paragraph in the search is searched and its text content is obtained. The text content of a paragraph is represented as a string x. First, x is preprocessed, resulting in a string x′. Next, a check is performed to see if x′ contains str. If so, pattern F successfully matches. If no x′ containing str is found after the full-text search is complete, pattern F fails to match.
[0065] The present invention uses a pattern-based detection method to query for practice-related evidence. This method has the following benefits:
[0066] The use of pattern-based evidence collection methods makes the collection of evidence more accurate and faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 Flowchart of the method of the present invention. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings.
[0069] On the contrary, the present invention covers any alternatives, modifications, equivalents, and solutions that fall within the spirit and scope of the present invention as defined by the claims. Furthermore, to facilitate a better understanding of the present invention, certain specific details are described in detail below in the detailed description of the present invention. Those skilled in the art will be able to fully understand the present invention without these details.
[0070] A pattern-based software process evidence collection method includes the following steps:
[0071] S1. Customize the evidence sources for each practice in the Software Capability Maturity Model. First, select the standards used to control and improve the development stages of the software project to be evaluated, and configure the evidence sources for each practice in the selected standards, that is, the rules used to collect evidence for the practice. Each practice can be configured with one or more evidence sources.<k,γ> ; where k is the file name keyword used to retrieve files that can be used as evidence; γ is the query pattern used to find evidence-related content in the file. The query pattern is expressed as γ =<name,rule> , where name is the pattern name and rule is the pattern rule.
[0072] There are 6 query modes:
[0073] 1) Mode A (named "Table Column Mode"): This mode is used to query whether data exists in a specified column within a specified table in a document. The rule for this mode is as follows:
[0074] tab:col1,col2…col n (1)
[0075] The tab in formula 1 represents the name of the table to be queried, and col i Refers to the name of a specified column in the tab.
[0076] 2) Mode B (named "Table Row Mode"): This mode is used to query whether a specified keyword exists in a set table in a document and whether there is valid data after the keyword. The rule of this mode is expressed as:
[0077] tab:word1,word2…word n ,min,max (2)
[0078] The tab in formula 2 represents the name of the table to be queried, and word i Indicates a specified keyword, min and max represent integer numbers used to specify the valid range of data.
[0079] 3) Mode C (named "Table Content Mode"): used to query whether a specified keyword exists in a set table in a document and whether there is valid text after the keyword. The valid text refers to text that contains the set string. The rule of this mode is expressed as
[0080] tab:word1,word2…word n ,str (3)
[0081] The tab in formula 3 represents the name of the table to be queried, and word i Represents a specified keyword, and str represents a valid string.
[0082] 4) Mode D (named "Chapter Mode"): used to query whether a document contains a set title, and whether the title has several subtitles. The rule of this mode is expressed as
[0083] title (4)
[0084] The title in formula 4 represents the content of the title to be searched.
[0085] 5) Mode E (named "title keyword mode"): used to query whether the title of the set chapter in the document contains the specified keyword. The rule of this mode is expressed as
[0086] title:str (5)
[0087] The title in formula 5 represents the title of the chapter, and str represents the keywords that need to be included.
[0088] 6) Mode F (named "full text keyword mode"): used to query whether the full text of the document contains the specified keyword. The rule of this mode is expressed as
[0089] str (6)
[0090] In formula 6, str represents the keywords that need to be searched in the full text.
[0091] S2. Import the work products of the project to be evaluated. The document set D of each development stage of the software project to be evaluated is {d1, d2, ...d N} is imported into the evidence collection system as the query object of the S3 step, d N is the Nth document of the software project to be evaluated, where N is the total number of documents.
[0092] S3. Automatically collect evidence for the evaluation project and create an evidence chain for each practice. An evidence chain consists of a set of evidence generated by related activities. The evidence chain of practice p is represented by ESp ={Evident1,Evident2,…,Evident m}, where Evident i Denotes the evidence obtained from the i-th evidence source configured for practice p. According to the configuration of the evidence source in step S1, the evidence is automatically collected for each practice by scanning the document set D in the project to be evaluated in S2, that is, for each practice given the evidence source<k,γ> , perform the following steps to collect work products as evidence that they meet the pattern requirements:
[0093] S31. Based on the file name keyword k, search for related documents from the document set D. Get the file name d of a document in D i .name, calculate d i The edit distance between .name and the file name keyword k. If the edit distance is less than the threshold θ, the file d is considered i It can be used as a source document of evidence and execute step S32 to check d i If the edit distance is greater than the threshold θ, the file d is considered i If it cannot be used as a source file of evidence, the next file in D will be checked. When all documents in D are queried, the current step will be exited.
[0094] S32. Check file d according to the query pattern γ of the evidence source i Is there evidence that the query pattern is satisfied? According to the pattern name in γ, the corresponding query steps are executed respectively.
[0095] In this embodiment, the specific steps of using a predefined query pattern to check whether there is evidence in each document are as follows:
[0096] S33. When the schema name is "table column schema", query document d i Whether there is evidence that satisfies pattern A. The specific steps are as follows S331-S335.
[0097] S331. First, parse the pattern rule to obtain the name of the setting table tan and the specified column names col1, col2...col in the pattern rule. n The pattern rule p is split into two parts by string segmentation. The first part is to set the table name tan. The second part is to get each column name col by string segmentation. i ,col i To specify the column name col1, col2...col n The i-th column name in , i = 1 to n.
[0098] S332. Get document di Each table in the table name tab; traverse each paragraph in the document, if the text content in the paragraph is the same as the tab, the end address of the paragraph is recorded as the starting address start_addr of the table. Then traverse the document d i All tables in , if table t i The starting address is start_addr, then the record table t i It is document d i The table named tab.
[0099] S333. Traverse each table t in S332) i Each column y in i , and determine the column name y i With the specified column name col i Are they the same? If they are the same, record the current column y i The index ci i If col1, col2...col in the pattern rule n Any one of them cannot be in table t i If the same column name is found in the array, it means that the pattern A does not match successfully; if both can be found, the index of the found column is represented as an array CI = {ci1, ci2, ..., ci n}.
[0100] S334. Traverse table t i Each row in the . In each row, retrieve the content x of each cell in the query column by indexing the CI array. If any x is an empty string, pattern A fails to match. If the content x of all cells in the query column is non-empty, pattern A successfully matches.
[0101] S34. When the pattern name is "table row pattern", query whether there is evidence satisfying pattern B in document di. The specific steps are as follows S341-S345.
[0102] S341. First, parse the pattern rule to obtain the name tab of the setting table in the pattern rule, each specified keyword word1, word2...word n , the valid range of data is min and max. By using the string segmentation method, with colon as the separator, the pattern rule p is divided into three parts. The first part is to set the table name tab. The second part is to use the string segmentation method, with comma as the separator, to obtain each keyword word i The third part uses the string segmentation method, using commas as separators, to obtain the lower limit min and upper limit max of the valid data.
[0103] S342. Get document d i The name of the table is the table name tab. Traverse each paragraph in the document. If the text content in the paragraph is the same as the tab, the end address of the paragraph is recorded as the starting address start_addr of the table. Then traverse the document d i All tables in , if table t i The starting address is start_addr, then the record table t i It is document d i The table named tab.
[0104] S343. Traverse each table t obtained in S342) i Each cell in s is retrieved and the text content in the cell is matched against the pattern. The text content in a cell is represented as a string x. First, x is preprocessed to remove all special characters such as tabs, spaces, and line breaks in s. The preprocessed string is represented as x'. Then, it is determined whether x' contains the specified keywords word1, word2...word n If yes, then go to step S344; if no, it means that pattern B is not matched successfully.
[0105] S344. Traverse each character c in the string x' i , judge character c i Is it a numeric character? If so, record the character c i and its position in x′. Then, the digital characters appearing in adjacent positions are spliced together to form a digital combination l p If they are not adjacent, they will form a single digital combination. q . Express all digital combinations as l={l1,l2,…l p Finally, traverse the set l and compare all the numbers with the upper and lower limits min and max of the valid range. If
[0106]
[0107] If yes, it means that pattern B matches successfully; otherwise, it means that pattern B matches unsuccessfully.
[0108] S35. When the mode name is "table content mode", query document d i Whether there is evidence that satisfies pattern C. The specific steps are as follows S351-S356.
[0109] S351. First, parse the pattern rule to obtain the setting table name tab, each specified keyword word1, word2...word n, set the valid string str. By using the string segmentation method, the pattern rule p of pattern C is split into three parts. The first part is to set the table name tab. The second part uses the string segmentation method to obtain each specified keyword word i The third part is the valid string str.
[0110] S352. Get document d i The name of the table is the table name tab. Traverse each paragraph in the document. If the text content in the paragraph is the same as the tab, the end address of the paragraph is recorded as the starting address start_addr of the table. Then traverse the document d i All tables in , if table t i The starting address is start_addr, then the record table t i It is document d i The table named x in .
[0111] S353. Traverse each table t obtained in S352) i Each cell in the array is retrieved and the text content in the cell is matched against the pattern. The text content in a cell is represented as a string x. First, x is preprocessed to remove all special characters such as tabs, spaces, and line breaks. The preprocessed string is represented as x'. Then, it is determined whether x' contains the specified keywords word1, word2...word n If yes, then go to step S354; if no, it means that pattern C matching is unsuccessful.
[0112] S354. Calculate the similarity between the table content x' and the set valid string str. First, determine the string lengths of str and x'. If one of str and x' is an empty string and the other is non-empty, the similarity is 0%. If str and x' are identical, the similarity is 100%. For other cases, proceed to step S356 to determine the similarity.
[0113] S355. First, preprocess str and x'. Use HanLP to segment str and x'. After segmentation, count the words that appear in str and x' and build a vocabulary. Then, count the frequency of each word, that is, the frequency of occurrence in the document. After that, represent ts and s' as vectors ts_WordList and s_WordList respectively, and the value of each position in the vector is the frequency of the word corresponding to that position. Finally, calculate the cosine similarity of vectors ts_WordList and s_WordList, and the similarity is expressed as score. According to the similarity threshold τ, if the score is greater than the threshold τ, it is judged that pattern C matches successfully; otherwise, it means that the match is unsuccessful.
[0114] S36. When the mode name is "chapter mode", query document d i Whether there is evidence that satisfies pattern D. The specific steps are as follows S361-S364.
[0115] S361. First, parse the pattern rule to obtain the set title character string title in the pattern rule.
[0116] S362. Get document d i The content in the file is title, and its title level is recorded as i1.
[0117] S3621 traverses each paragraph in the document and obtains the paragraph type and content information. The type of a paragraph is represented by type, and the text content within the paragraph is represented by the string x. It determines whether type is a title type. If so, the process proceeds to step S3622. If not, the process continues to traverse subsequent paragraphs in the document.
[0118] S3622. Determine whether the title content is identical to the title string in the pattern rule. First, preprocess x. Remove all special characters such as tabs, spaces, and line breaks from x. The preprocessed string is represented as x'. Then, determine whether x' is identical to title. If so, record the current title level, denoted as i1, and proceed to step S363.
[0119] S363. Determine document d i Continue to traverse the subsequent paragraphs in the document. If a paragraph is a title type, get the title level of the subsequent paragraph as i2. If it satisfies
[0120] i1>i2
[0121] It means that there is a subtitle and pattern D matches successfully; otherwise, pattern D matches unsuccessfully.
[0122] S37. When the pattern name is "title keyword pattern", query document d i Whether there is evidence that satisfies pattern E. The specific steps are as follows S371-S375.
[0123] S371. First, parse the pattern rule to obtain the set title name title and the specified keyword str in the pattern rule. Using a string splitting method, using a colon as a separator, split the pattern rule p of pattern E into two parts: the first part is the set title name title, and the second part is the specified keyword str.
[0124] S372. Get document di The content in the file is title, and its title level is recorded as i1.
[0125] S3721. Traverse document d i Each paragraph in the document is retrieved and its type and content information is obtained. The type of a paragraph is represented by type, and the text content in the paragraph is represented by string x. Determine whether type is a title type. If so, proceed to step S3721. If not, continue traversing subsequent paragraphs in the document.
[0126] S3722. Determine whether the title content is identical to the title string title in the pattern rule. First, preprocess x. Delete all special characters such as tabs, spaces, and newlines from x. The preprocessed string is represented as x'. Then, determine whether x' is identical to title. If so, record the current title level, represented as i1, and proceed to step S373.
[0127] S373. Determine document d i If the paragraph after the title is a text type, then add the text content of the paragraph to the global string set L; if the paragraph after is a title type, then get the title level i2 of the paragraph after.
[0128] i1>i2
[0129] Then continue to add the text content in the current chapter to the global string set L. If the above comparison formula does not hold, proceed to step S374.
[0130] S374. Search for the keyword str in the global string set L. If str can be found in L, it means that the pattern E matches successfully; otherwise, the pattern E does not match successfully.
[0131] S38. When the mode name is "full-text keyword mode", query document d i Whether there is evidence that satisfies pattern F. The specific steps are as follows S381-S382.
[0132] S381. First, parse the pattern rule to obtain the specified full-text keyword str in the pattern rule.
[0133] S382. Traverse document d iEach paragraph in the search string is searched and its text content is obtained. The text content of a paragraph is represented as a string x. First, x is preprocessed. All special characters such as tabs, spaces, and newlines in x are removed. The preprocessed string is x'. Then, whether x' contains str is determined. If so, pattern F successfully matches. If no x' containing str exists after the full-text search is completed, pattern F fails to match.
[0134] Six different evidence query modes are defined in S33 to S38 above. For each practice, relevant documents are searched through S2 according to the file keywords in the evidence source configured in S1, and further evidence query is performed in S3. As long as the document di to be queried meets the requirements of the mode, it is considered that there is evidence; if it does not meet the requirements, it is considered that there is no evidence. Through the above practices of S1 to S3, automatic evidence collection can be achieved, and finally the evidence set required for all practices in the standard can be obtained. This method is applicable to the evaluation process based on the software capability maturity model in software projects. It can effectively provide evidence sets for evaluation and promptly inform relevant evaluation experts for review.
[0135] While specific embodiments of the present invention have been disclosed for illustrative purposes, intended to facilitate understanding and implementation of the present invention, those skilled in the art will appreciate that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the disclosure of the preferred embodiments, and the scope of protection claimed in the present invention shall be determined by the scope of the claims.
Claims
1. A pattern-based software process evidence collection method, comprising the following steps: 1) Select standards for controlling and improving the development stages of the software project to be evaluated, and configure evidence sources for each practice in the selected standards, with one or more evidence sources for each practice; wherein the evidence sources are represented as<k,γ> , k is the file name keyword, used to retrieve files that can be used as evidence; γ is the query mode, used to find evidence-related content in the file; the query mode is Υ=<name,rule> , name is the pattern name, rule is the pattern rule; 2) The document set D of each development stage of the software project to be evaluated is {d1, d2, ...d N } is imported into the evidence collection system as the query object in step 3), d N is the Nth document of the software project to be evaluated, where N is the total number of documents; 3) The evidence collection system collects evidence for each practice in each development stage of the software project to be evaluated from the document set D according to the configuration in step 1) and creates an evidence chain for the corresponding practice, which is as follows: 31) According to the file name keyword k, the relevant documents are searched from the document set D. For each document d i , calculate the document d i The file name of i .name and the edit distance of the file name keyword k; if the edit distance is less than the set threshold θ, the document d i As the source document of evidence, and execute step 32) i 32) Check document d according to the query mode Υ of the evidence source i Is it evidence that satisfies the query pattern? Among them, the evidence chain of practice p is ES p ={Evident1,Evident2,…,Evident m }, Evident m represents the evidence obtained from the mth evidence source configured for practice p.
2. The method according to claim 1, characterized in that The query modes include: Mode A: used to query whether data exists in a specified column in a table set in a document; Mode B: used to query whether a specified keyword exists in a set table in a document and whether there is valid data after the keyword; the valid data refers to data with a value within the set range [min, max]; Mode C: used to query whether a specified keyword exists in a set table in a document and whether there is valid text after the keyword; the valid text refers to text that contains the set string; Mode D: used to query whether a document contains a set title and a number of subtitles under it; Mode E: used to query whether the text of the document's set chapter contains the specified keyword; Mode F: used to query whether the full text of the document contains the specified keywords.
3. The method according to claim 1, characterized in that In step 32), when the schema name is "Schema A", query document d i The method to find out whether there is evidence that pattern A is satisfied is: S331) Analyze the pattern rule corresponding to pattern A, obtain the setting table name tab and the specified column names col1, col2...col in the pattern rule n ; S332) Get the document d i Each table in the table name tab; S333) traverse each table t in S332) i Each column y in i , and determine the column name y i With the specified column name col i Are they the same? i To specify the column name col1, col2...col n The i-th column name in , i = 1 to n; if they are the same, record the current column y i The index ci i , get an index set CI; traverse table t i In each row, the content x of each cell where the query column is located is obtained through the index set CI; if any x is an empty string, it means that pattern A does not match successfully; if the content x of each cell where the query column is located is non-empty, it means that pattern A matches successfully.
4. The method according to claim 1, wherein In step 32), when the schema name is "Schema B", query document d i The method to find out whether there is evidence that pattern B is satisfied is: S341) Parse the pattern rule corresponding to pattern B, obtain the setting table name tab, each specified keyword, and the valid range min and max of the data in the pattern rule; S342) Get document d i The name of the table is the tab where the table name is set; S343) Traverse each table t obtained in S342) i For each cell in the , if the text content in the cell is x ′ If the specified keywords in S341) are included, the process proceeds to step S344). If not, it indicates that the matching of mode B is unsuccessful. S344) traverse x ′ Each character c in i , judge character c i Is it a numeric character? Get all numeric combinations to get the numeric set l. If every number in the set l is within the valid range [min, max], it means that pattern B matches successfully.
5. The method according to claim 1, wherein In step 32), when the pattern name is "pattern C", query document d i The method to prove whether there is evidence that pattern C is satisfied is: S351) Parse the pattern rule corresponding to pattern C to obtain the setting table name tab, each specified keyword, and the set valid string in the pattern rule; S352) Get document d i The name of the table is the tab where the table name is set; S353) Traverse each table t obtained in S352) i The text content of each cell in x ′ , judge x ′ Does it contain the specified keywords in S351? If so, proceed to step S354, if not, pattern C matching is unsuccessful; S354) Calculate x ′ The similarity score with the valid string is: if the score is greater than the set threshold τ, it is judged that the pattern C matches successfully, otherwise it means the match is unsuccessful.
6. The method according to claim 1, wherein In step 32), when the pattern name is "pattern D", query document d i The method to prove whether there is evidence that pattern D is satisfied is: S361) parsing the pattern rule corresponding to pattern D, obtaining the set title string title in the pattern rule; S362) Get document d i The content is title, and its title level is recorded as i1; S363) Determine document d i Check whether there is a subsequent title after the title with content title. If there is a subsequent title, its title level is represented as i2; if i1>i2, then pattern D matches successfully; otherwise, pattern D does not match successfully.
7. The method according to claim 1, characterized in that In step 32), when the pattern name is "Pattern E", query document d i The method to prove whether there is a pattern E is as follows: S371) parsing the pattern rule corresponding to pattern E, obtaining the set title name title and specified keywords in the pattern rule; S372) Get document d i The content is title, and its title level is recorded as i1; S373) Determine document d i For the paragraph following the title with the content title, if the subsequent paragraph is of the body type, the text content of the subsequent paragraph is added to the global string set L; if the subsequent paragraph is of the title type, the title level of the subsequent paragraph is obtained and represented as i2; if i1>i2 is satisfied, the text content of the subsequent paragraph is continued to be added to the global string set L, otherwise the process proceeds to step S374); S374) If the specified keyword in S371) exists in the global string set L, it means that pattern E matches successfully; otherwise, pattern E matches unsuccessfully.
8. The method according to claim 1, characterized in that In step 32), when the pattern name is "pattern F", query document d i The method to prove whether there is a pattern F is as follows: S381) parsing the pattern rule corresponding to pattern F to obtain the specified full-text keywords in the pattern rule; S382) traverse document d i Each paragraph in the , and get the paragraph's text content x ′ , if x ′ If the specified full-text keyword is included, it means that pattern F matches successfully; otherwise, pattern F does not match successfully.
9. A server, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for resolution of natural-language queries against full-text databases
EP0597630A1
User interface and other enhancements for natural language information retrieval system and method
US6026388A