Method and device for determining repeated process of process-based program, equipment and medium

Through automated methods, the repetitive processes in the process-based program are identified by preset matching patterns and historical identification arrays, the problem of low manual detection accuracy in the prior art is solved, and the accuracy and work efficiency of the process-based program is improved.

CN119576794APending Publication Date: 2025-03-07INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411802038.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, relying on manual detection of repetitive processes in process-based programs leads to low accuracy and low work efficiency, and the problem of repetitive processes in process-based programs cannot be effectively solved.

Method used

By obtaining the program file directory of the program file to be detected, the program subfile to be detected corresponding to the program file to be detected is determined, and the filtering process is performed based on the preset file type. Then, the target program line in the target program subfile is identified using the preset matching pattern, and repeated detection is performed through the historical identification array to generate the detection result.

Benefits of technology

It realizes automated detection of repetitive processes in process-based programs, improves the accuracy of process-based programs, reduces manual intervention, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576794A_ABST
    Figure CN119576794A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for determining a repeated process of a process type program and a medium, and relates to the technical field of artificial intelligence. The method comprises the steps of obtaining a program file directory of a to-be-detected program file, and determining a to-be-detected program sub-file corresponding to the to-be-detected program file based on the program file directory; screening the to-be-detected program sub-file based on a preset file type to obtain a target program sub-file, and determining a target matching mode corresponding to the target program sub-file in a preset matching mode set based on a basic file extension name of the target program sub-file; and determining a target program line in the target program sub-file based on the target matching mode, and performing repeatability detection on the target program line based on the historical identification array to generate a detection result. By means of the technical scheme, the repeated process in the process type program can be detected, and the accuracy of the process type program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for determining a repeated process of a process-based program. Background Art

[0002] In the field of programming, flow-based programs are a widely used conditional transfer program. This type of program generally defines a unique identifier (Identity Document) for each execution unit, that is, after executing an ID statement, other ID statements are executed according to the result. In addition, the ID of each ID statement is unique in the entire flow-based program. Therefore, it is very important to detect duplicate processes in flow-based programs.

[0003] In the prior art, the repeated processes in the flow-based program are usually detected by manual detection. However, the manual detection method needs to rely on manual experience, cannot guarantee the accuracy of the flow-based program, and has low work efficiency. Therefore, how to automatically detect the repeated processes in the flow-based program and improve the accuracy of the flow-based program is a problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for determining repeated processes of a process-based program, which can solve the problem that repeated processes exist in the process-based program, resulting in low accuracy of the process-based program.

[0005] According to one aspect of the present invention, a method for determining a repeated process of a flow-based program is provided, comprising:

[0006] Obtaining a program file directory of a program file to be detected, and determining a program sub-file to be detected corresponding to the program file to be detected based on the program file directory;

[0007] The program sub-file to be detected is screened based on a preset file type to obtain a target program sub-file, and a target matching pattern corresponding to the target program sub-file is determined in a preset matching pattern set based on a basic file extension name of the target program sub-file;

[0008] A target program line in the target program subfile is determined based on the target matching pattern, and a repeatability detection is performed on the target program line based on the history identification array to generate a detection result.

[0009] According to another aspect of the present invention, there is provided a device for determining a repeated process of a flow-based program, comprising:

[0010] A data acquisition module, used to acquire a program file directory of a program file to be detected, and determine a program sub-file to be detected corresponding to the program file to be detected based on the program file directory;

[0011] A data screening module, used for screening the program sub-files to be detected based on a preset file type to obtain a target program sub-file, and determining a target matching pattern corresponding to the target program sub-file in a preset matching pattern set based on a basic file extension name of the target program sub-file;

[0012] The result generation module is used to determine the target program line in the target program subfile based on the target matching pattern, and perform repeatability detection on the target program line based on the history identification array to generate a detection result.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining a repeated process of a flow program described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a repeated process of a flow program described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for determining a repeated process of a flow program according to any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention determines the program subfile to be detected corresponding to the program file to be detected through the program file directory of the program file to be detected. Then, the program subfile to be detected is screened based on the preset file type to obtain the target program subfile, and the target matching pattern corresponding to the target program subfile is determined in the preset matching pattern set based on the basic file extension name of the target program subfile. Finally, the target program line in the target program subfile is determined based on the target matching pattern, and the target program line is tested for repeatability based on the historical identification array to generate a test result. Since the program line of the non-comment segment is identified by using a predefined matching pattern, and the program line is judged for repeatability by using a predefined array, the problem of the existence of repeated processes in the process-based program, which makes the accuracy of the process-based program low, is solved, and the repeated processes in the process-based program can be automatically detected, thereby improving the accuracy of the process-based program.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flowchart of a method for determining a repeated process of a flow-based program provided in accordance with Embodiment 1 of the present invention;

[0023] Figure 2 is a flowchart of a method for determining a repeated process of a flow-based program provided in accordance with a second embodiment of the present invention;

[0024] Figure 3 is a flowchart of an optional method for determining a repeated process of a process-based program provided according to Embodiment 2 of the present invention;

[0025] Figure 4 is a schematic diagram of a process for determining a repeated flow in a program subfile to be detected provided in Embodiment 2 of the present invention;

[0026] Figure 5 2 is a schematic diagram of the structure of a device for determining a repeated process of a flow-based program according to a third embodiment of the present invention;

[0027] Figure 6It is a structural schematic diagram of an electronic device for implementing the method for determining a repeated process of a flow-based program according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] It is worth noting that in the technical solution of the present application, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse; if the user chooses to refuse, the expert decision-making process will be entered.

[0031] Embodiment 1

[0032] Figure 1 This is a flowchart of a method for determining a repeated process of a flow-type program provided in the first embodiment of the present invention. This embodiment is applicable to the case of determining repeated processes in a flow-type program. The method can be executed by a repeated process determination device for a flow-type program. The repeated process determination device for a flow-type program can be implemented in the form of hardware and / or software. The repeated process determination device for a flow-type program can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S110, obtaining a program file directory of a program file to be detected, and determining a program sub-file to be detected corresponding to the program file to be detected based on the program file directory.

[0034] Among them, the program file to be detected may refer to a set of process-based program files that need to be repeatedly detected. Exemplarily, the program file to be detected may be a folder containing process-based programs. The program file directory may refer to the file storage location of the program file to be detected. Usually, the program file to be detected may be stored in a local computer or a cloud server. The program sub-file to be detected may refer to each process-based program file in the program file to be detected.

[0035] S120, screening the program sub-files to be detected based on preset file types to obtain target program sub-files, and determining a target matching pattern corresponding to the target program sub-file in a preset matching pattern set based on a basic file extension name of the target program sub-file.

[0036] The preset file type may refer to a preset standard file type of a flow program file. Exemplarily, the preset file type may be an extensible markup language (XML) type. The target program subfile may refer to a program subfile to be detected that meets the preset file type requirements.

[0037] Among them, the file extension name can refer to a mechanism used by the operating system to mark the file format. Exemplarily, the file extension name can be the suffix name of the file. Usually, the file extension name is added after the main file name and is separated by ".". The basic file extension name can refer to the file extension name of the target program subfile. Exemplarily, the basic file extension name can be ".java" or ".c". Usually, the programming language corresponding to the target program subfile can be determined by the basic file extension name.

[0038] Among them, the preset matching mode may refer to a preset scene matching rule. Exemplarily, the preset matching mode may include a matching scene type and a corresponding specific matching condition. Usually, different programming languages ​​correspond to different matching modes. The preset matching mode set may refer to a set composed of various preset matching modes. That is, the preset matching mode set may include preset matching modes corresponding to various programming languages.

[0039] Among them, the target matching pattern may refer to a matching pattern in a preset matching pattern set corresponding to the target program subfile. In an optional embodiment, the target matching pattern may include: a definition statement matching pattern, a comment start matching pattern and a comment end matching pattern. Among them, the definition statement matching pattern may refer to a matching pattern for judging whether it is a process ID definition statement. Exemplarily, the definition statement matching pattern may include a standard program segment of a process ID definition statement. The comment start matching pattern may refer to a matching pattern for judging whether it is a comment starting position. Exemplarily, the comment start matching pattern may include a comment start code example. The comment end matching pattern may refer to a matching pattern for judging whether it is a comment end position. Exemplarily, the comment end matching pattern may include a comment end code example.

[0040] S130, determining a target program line in the target program subfile based on the target matching pattern, and performing a repeatability check on the target program line based on a history identification array to generate a check result.

[0041] Among them, a program line may refer to an instruction or statement consisting of a series of characters that can be recognized and executed by a computer. Usually, a program line contains grammatical elements of a programming language, such as keywords, variables, operators, and function calls. Various calculation logics and operation commands can be expressed through program lines. The target program line may refer to the program line currently selected for repeated process determination in the target program subfile.

[0042] Among them, the historical identification array may refer to a predefined array for storing unique identifiers in target program subfiles. Usually, one program file to be detected corresponds to one historical identification array, and before the repeated process is determined, the historical identification array is empty. Repeatability detection may refer to an operation of determining whether the unique identifier contained in the target program line is a repeated unique identifier. The test result may refer to a repeated result generated based on the repeatability test result. That is, the test result may be a repeatability test result generated when the unique identifier is a repeated unique identifier. Usually, the test result may include the identifier name of the repeated unique identifier, the program line where the repeated unique identifier is located, and the file path of the target program subfile to which it belongs, etc.

[0043] In an optional embodiment, after the repeatability detection of the target program line based on the historical identification array is generated, it can also include: summarizing and processing the various detection results corresponding to the program file to be detected based on the preset result file directory to generate a detection result set; visually processing the detection result set to generate early warning information corresponding to the program file to be detected. Among them, the preset result file can refer to a file preset for storing the detection result. The preset result file directory can refer to the file storage location of the preset result file. The detection result set can refer to a set composed of various detection results corresponding to the same program file to be detected. Visual processing can refer to the operation of visually presenting the detection result set by designing graphic images, so that the content of the detection result set itself is easier to understand. The early warning information can refer to the repeated error prompt information generated according to the detection result set. Usually, the early warning information can include the identification name of the repeated unique identification, the program line where the repeated unique identification is located, and the file path of the target program subfile to which it belongs. Thus, after generating the detection result, the detection result set containing each detection result is visualized to generate the early warning information corresponding to the program file to be detected. It can facilitate staff to obtain relevant information of repetitive processes in a timely manner, make procedural improvements, improve work efficiency, and ensure the accuracy of process-based procedures.

[0044] The technical solution of the embodiment of the present invention determines the program subfile to be detected corresponding to the program file to be detected through the program file directory of the program file to be detected. Then, the program subfile to be detected is screened based on the preset file type to obtain the target program subfile, and the target matching pattern corresponding to the target program subfile is determined in the preset matching pattern set based on the basic file extension name of the target program subfile. Finally, the target program line in the target program subfile is determined based on the target matching pattern, and the target program line is tested for repeatability based on the historical identification array to generate a test result. Since the program line of the non-comment segment is identified by using a predefined matching pattern, and the program line is judged for repeatability by using a predefined array, the problem of the existence of repeated processes in the process-based program, which makes the accuracy of the process-based program low, is solved, and the repeated processes in the process-based program can be automatically detected, thereby improving the accuracy of the process-based program.

[0045] Embodiment 2

[0046] Figure 2A flowchart of a method for determining a repeated process of a flow-based program provided in the second embodiment of the present invention is provided. This embodiment is refined based on the above embodiment. In this embodiment, the operation of determining the program sub-file to be detected corresponding to the program file to be detected based on the program file directory is specifically refined, which may include: obtaining the file capacity corresponding to the program file to be detected, and judging and processing the file capacity based on a preset capacity threshold; if the file capacity meets the preset capacity threshold, the program sub-file contained in the program file directory is used as the program sub-file to be detected corresponding to the program file to be detected. Figure 2 As shown, the method includes:

[0047] S210, obtaining a program file directory of the program file to be detected.

[0048] S220: Obtain the file capacity corresponding to the program file to be detected, and determine and process the file capacity based on a preset capacity threshold.

[0049] The file capacity may refer to the number of program sub-files contained in the program file to be detected. Exemplarily, the file capacity may refer to the number of program sub-files to be detected contained in the program file to be detected. The preset capacity threshold may refer to a pre-set value for evaluating the file capacity. Exemplarily, the preset capacity threshold may be zero.

[0050] S230: If the file capacity meets a preset capacity threshold, the program sub-file contained in the program file directory is used as the program sub-file to be detected corresponding to the program file to be detected.

[0051] Specifically, after obtaining the program file directory of the program file to be detected, the file capacity corresponding to the program file to be detected can be judged and processed based on the preset capacity threshold. If the file capacity meets the preset capacity threshold, for example, the file capacity is greater than zero, it indicates that there is a program sub-file under the program file to be detected, and the program sub-file contained in the program file directory can be used as the program sub-file to be detected corresponding to the program file to be detected. On the contrary, if the file capacity does not meet the preset capacity threshold, for example, the file capacity is zero, it indicates that there is no program sub-file under the program file to be detected, and an abnormal result of "no program sub-file" can be output, and the operation of detecting repeated processes is terminated. Thus, by pre-judging whether there is a program sub-file under the program file directory, the subsequent process is performed only when there is a program sub-file under the program file directory. Unnecessary workflows can be avoided, and the detection efficiency of repeated processes is improved.

[0052] S240: Obtain the basic file type of the program sub-file to be detected.

[0053] The basic file type may refer to the file type corresponding to the program sub-file to be detected. Generally, the corresponding basic file type may be determined according to the file extension name of the program sub-file to be detected.

[0054] S250: Perform consistency comparison on the basic file type based on a preset file type. If the basic file type meets a consistency comparison standard, use the program sub-file to be detected as a target program sub-file.

[0055] The consistency comparison standard may refer to a comparison standard that a basic file type is included in a preset file type.

[0056] Specifically, after determining the program sub-file to be detected corresponding to the program file to be detected, the basic file type of the program sub-file to be detected can be compared for consistency according to the preset file type to determine whether the basic file type is included in the preset file type. If the basic file type is included in the preset file type, it indicates that the basic file type meets the consistency comparison standard, and the program sub-file to be detected can be used as the target program sub-file to carry out the subsequent process. On the contrary, if the basic file type is not included in the preset file type, it indicates that the basic file type does not meet the consistency comparison standard, and an error log can be generated according to the consistency comparison result, and the error log can be recorded in a pre-set processing log file directory. Thus, it is pre-determined whether the program sub-file to be detected is a process-based program file by the preset file type, and if so, the subsequent process is carried out. Unnecessary workflows can be avoided, and the detection efficiency of repeated processes is improved.

[0057] S260: Determine a target matching pattern corresponding to the target program sub-file in a preset matching pattern set based on the basic file extension name of the target program sub-file.

[0058] Specifically, after determining the target program subfile, the programming language corresponding to the target program subfile can be determined according to the basic file extension name of the target program subfile. Then, a matching pattern consistent with the programming language is determined in the preset matching pattern set as the target matching pattern corresponding to the target program subfile, providing an effective basis for subsequent operations.

[0059] S270: Perform matching processing on the current program line in the target program subfile based on the definition statement matching pattern to obtain a first matching result.

[0060] The current program line may refer to the program line currently selected for repeating the process. Exemplarily, the current program line may be the first program line in the target program subfile, or may be each program line after the first program line. Usually, each program line in the target program subfile may be used as the current program line in turn.

[0061] The first matching result may refer to a matching result generated after matching the current program line according to the definition statement matching pattern. Exemplarily, the first matching result may be a consistent match or an inconsistent match.

[0062] S280: If the first matching result meets a preset statement matching standard, obtain a subsequent program line corresponding to the current program line.

[0063] Among them, the preset statement matching standard may refer to a preset statement matching result judgment standard. Exemplarily, the preset statement matching standard may be that the first matching result is a consistent match. The subsequent program line may refer to a program line immediately adjacent to the current program line. Exemplarily, the subsequent program line may be a program line after the current program line, or may be other program lines after the subsequent program line.

[0064] S290 , performing matching processing on the subsequent program line based on the comment start matching pattern and the comment end matching pattern to obtain a second matching result.

[0065] The second matching result may refer to the matching result generated after matching the subsequent program lines according to the comment start matching pattern and the comment end matching pattern. Exemplarily, the second matching result may be a comment start mark indicating the comment start position, or a comment end mark indicating the comment end position.

[0066] S2100: If the second matching result meets a preset comment matching standard, the current program line is used as a target program line in a target program subfile.

[0067] The preset annotation matching standard may refer to a preset annotation matching result judgment standard. Exemplarily, the preset annotation matching standard may be that the second matching result is an annotation end mark.

[0068] Specifically, when the first matching result meets the preset statement matching standard, it indicates that the current program line is an ID definition statement, and the program line after the current program line can be used as a subsequent program line, and the subsequent program line is matched according to the comment start matching pattern. If the second matching result is a comment start identifier, it means that the subsequent program line is a comment start line, and the program line after the subsequent program line can be used as a new subsequent program line, and the new subsequent program line is matched according to the comment end matching pattern. If the second matching result of the new subsequent program line is a comment end identifier, it means that the new subsequent program line is a comment end line, and the subsequent process can be carried out; if the second matching result of the new subsequent program line is not a comment end identifier, the program line after the new subsequent program line is used as a subsequent program line, and the new subsequent program line is matched again according to the comment end matching pattern until the second matching result is a comment end identifier. Conversely, if the second matching result is not a comment start identifier, the subsequent program line is matched according to the comment end matching pattern until the second matching result is a comment end identifier. Thus, the target program line of the non-comment segment is identified through the predefined definition statement matching pattern, comment start matching pattern and comment end matching pattern, which can eliminate the interference of the comment segment on the detection process and ensure the accuracy of the detection result.

[0069] S2110. Obtain a target unique identifier corresponding to the target program line.

[0070] The target unique identifier may refer to a unique identifier contained in the target program line.

[0071] S2120: Perform a repeatability check on the target unique identifier based on the historical identifier array.

[0072] Specifically, after determining the target program line in the target program subfile, the target unique identifier corresponding to the target program line can be obtained based on the key field corresponding to the definition statement matching pattern, and then the target unique identifier can be checked for repeatability using the historical identifier array to determine whether the target unique identifier exists in the historical identifier array.

[0073] S2130: If the historical identifier array does not contain the target unique identifier, update the target unique identifier to the historical identifier array.

[0074] Specifically, if the historical identifier array does not contain the target unique identifier, it means that the target unique identifier has not appeared in the previous process. The target unique identifier can be stored in the historical identifier array to provide an effective basis for the subsequent repeated process determination process.

[0075] S2140: If the historical identifier array contains the target unique identifier, generate a detection result.

[0076] Specifically, if the historical identification array contains the target unique identification, it means that the target unique identification has appeared in the previous process, and the target unique identification can be used as a repeated process to generate a detection result. Therefore, by using the pre-defined historical identification array to perform repeatability judgment on the target program line, the program line with repeatability errors can be effectively identified, thereby improving the accuracy of the process-based program.

[0077] The technical solution of the embodiment of the present invention determines the file capacity corresponding to the program file to be detected by a preset capacity threshold value. If the file capacity meets the preset capacity threshold value, the program subfile contained in the program file directory is used as the program subfile to be detected corresponding to the program file to be detected. Further, the basic file type of the program subfile to be detected is compared for consistency based on the preset file type. If the basic file type meets the consistency comparison standard, the program subfile to be detected is used as the target program subfile, and the target matching pattern corresponding to the target program subfile is determined in the preset matching pattern set based on the basic file extension name of the target program subfile. Further, the current program line in the target program subfile is matched based on the definition statement matching pattern in the target matching pattern to obtain a first matching result. If the first matching result meets the preset statement matching standard, the subsequent program line corresponding to the current program line is obtained. The subsequent program line is matched based on the comment start matching pattern and the comment end matching pattern in the target matching pattern to obtain a second matching result. If the second matching result meets the preset comment matching standard, the current program line is used as the target program line in the target program subfile. Finally, the target unique identifier corresponding to the target program line is obtained, and the target unique identifier is tested for repeatability based on the historical identifier array. If the target unique identifier is not included in the historical identifier array, the target unique identifier is updated to the historical identifier array. If the target unique identifier is included in the historical identifier array, a detection result is generated. Since the program lines of the non-comment segment are identified by using a predefined matching pattern, and the program lines are judged for repeatability by using a predefined array, the problem of repeated processes in the flow-based program, which makes the accuracy of the flow-based program low, is solved, and repeated processes in the flow-based program can be automatically detected, thereby improving the accuracy of the flow-based program.

[0078] Figure 3The flowchart of an optional method for determining the repeated process of a flow-based program provided by an embodiment of the present invention is shown. Specifically, first, the program file directory, processing log file directory, preset result file directory and preset matching pattern set of the program file to be detected are obtained. After that, the file capacity corresponding to the program file to be detected is obtained, and the processing file capacity is judged based on the preset capacity threshold. If the file capacity does not meet the preset capacity threshold, the judgment result is output to the processing log file directory and the preset result file directory. If the file capacity meets the preset capacity threshold, the program sub-file contained in the program file directory is used as the program sub-file to be detected corresponding to the program file to be detected, and the repeated process of the flow-based program is determined for each program sub-file to be detected in turn according to the subsequent process.

[0079] Figure 4The schematic diagram of a repeated flow determination process in a program subfile to be detected provided by an embodiment of the present invention is shown. Specifically, when determining the repeated flow in each program subfile to be detected, first, the basic file type of the program subfile to be detected is obtained, and the basic file type is compared for consistency based on the preset file type. If the basic file type does not meet the consistency comparison standard, the comparison result is recorded in the processing log file directory. If the basic file type meets the consistency comparison standard, the program subfile to be detected is used as the target program subfile. Afterwards, the target matching pattern corresponding to the target program subfile is determined in the preset matching pattern set based on the basic file extension name of the target program subfile. Wherein, the target matching pattern includes a definition statement matching pattern, a comment start matching pattern and a comment end matching pattern. Further, starting from the first program line in the target program subfile as the current program line, the current program line is matched based on the definition statement matching pattern to obtain a first matching result. If the first matching result does not meet the preset statement matching standard, the first matching result is recorded in the processing log file directory. If the first matching result meets the preset statement matching standard, the subsequent program line corresponding to the current program line is obtained, and the subsequent program line is matched based on the comment start matching mode to obtain the second matching result. If the second matching result is the comment start mark, the comment mark is marked as 1, the next program line of the subsequent program line is used as the new subsequent program line, and the new subsequent program line is matched according to the comment end matching mode. If the second matching result of the new subsequent program line is the comment end mark, the comment mark is marked as 2, and the subsequent process can be carried out; if the second matching result of the new subsequent program line is not the comment end mark, the next program line of the new subsequent program line is used as the subsequent program line in turn, and the new subsequent program line is matched again according to the comment end matching mode until the second matching result is the comment end mark or all lines are processed. On the contrary, if the second matching result is not the comment start mark, the subsequent program line is matched according to the comment end matching mode until the second matching result is the comment end mark. Finally, the target unique identifier corresponding to the target program line is obtained, and the target unique identifier is tested for repeatability based on the historical identifier array. If the target unique identifier is not included in the historical identifier array, the target unique identifier is updated to the historical identifier array. If the target unique identifier is included in the historical identifier array, a detection result is generated. Further, the current program line is added by one and used as the new current program line. The above operation is repeated until all lines are processed. Based on the preset result file directory, the detection results corresponding to the program file to be detected are summarized and processed to generate a detection result set.

[0080] Embodiment 3

[0081] Figure 5This is a schematic diagram of a structure of a repeating process determination device for a flow-based program provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: a data acquisition module 310, a data screening module 320 and a result generation module 330;

[0082] The data acquisition module 310 is used to acquire a program file directory of a program file to be detected, and determine a program sub-file to be detected corresponding to the program file to be detected based on the program file directory;

[0083] The data screening module 320 is used to screen the program sub-file to be detected based on a preset file type to obtain a target program sub-file, and determine a target matching pattern corresponding to the target program sub-file in a preset matching pattern set based on a basic file extension name of the target program sub-file;

[0084] The result generation module 330 is used to determine the target program line in the target program subfile based on the target matching pattern, and perform repeatability detection on the target program line based on the history identification array to generate a detection result.

[0085] The technical solution of the embodiment of the present invention determines the program subfile to be detected corresponding to the program file to be detected through the program file directory of the program file to be detected. Then, the program subfile to be detected is screened based on the preset file type to obtain the target program subfile, and the target matching pattern corresponding to the target program subfile is determined in the preset matching pattern set based on the basic file extension name of the target program subfile. Finally, the target program line in the target program subfile is determined based on the target matching pattern, and the target program line is tested for repeatability based on the historical identification array to generate a test result. Since the program line of the non-comment segment is identified by using a predefined matching pattern, and the program line is judged for repeatability by using a predefined array, the problem of the existence of repeated processes in the process-based program, which makes the accuracy of the process-based program low, is solved, and the repeated processes in the process-based program can be automatically detected, thereby improving the accuracy of the process-based program.

[0086] Optionally, the data acquisition module 310 may be specifically used for:

[0087] Obtaining the file capacity corresponding to the program file to be detected, and determining and processing the file capacity based on a preset capacity threshold;

[0088] If the file capacity meets the preset capacity threshold, the program sub-file contained in the program file directory is used as the program sub-file to be detected corresponding to the program file to be detected.

[0089] Optionally, the data screening module 320 may be specifically used for:

[0090] Obtain the basic file type of the program subfile to be detected;

[0091] The basic file type is compared for consistency based on a preset file type. If the basic file type meets the consistency comparison standard, the program sub-file to be detected is used as the target program sub-file.

[0092] Optionally, the target matching pattern includes: defining a statement matching pattern, a comment start matching pattern, and a comment end matching pattern.

[0093] Optionally, the result generation module 330 may be specifically used for:

[0094] Performing matching processing on the current program line in the target program subfile based on the definition statement matching pattern to obtain a first matching result;

[0095] If the first matching result meets the preset statement matching standard, obtaining the subsequent program line corresponding to the current program line;

[0096] Perform matching processing on the subsequent program line based on the comment start matching pattern and the comment end matching pattern to obtain a second matching result;

[0097] If the second matching result meets the preset comment matching standard, the current program line is used as the target program line in the target program subfile.

[0098] Optionally, the result generation module 330 may be specifically used for:

[0099] Obtaining a target unique identifier corresponding to the target program line;

[0100] Performing duplication detection on the target unique identifier based on the historical identifier array;

[0101] If the target unique identifier is not included in the historical identifier array, updating the target unique identifier to the historical identifier array;

[0102] If the historical identification array contains the target unique identification, a detection result is generated.

[0103] Optionally, the device for determining the repeated process of a process-based program may also include: a post-processing module, which is used to perform repeatability detection on the target program line based on the historical identification array and generate a detection result, and then summarize and process the various detection results corresponding to the program file to be detected based on a preset result file directory to generate a detection result set; and visualize the detection result set to generate warning information corresponding to the program file to be detected.

[0104] The repeated process determination device for a flow-based program provided in an embodiment of the present invention can execute the repeated process determination method for a flow-based program provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0105] Embodiment 4

[0106] Figure 6 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0107] like Figure 6 As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.

[0108] Multiple components in the electronic device 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0109] The processor 420 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 420 performs the various methods and processes described above, such as a method for determining a repetitive process of a process-based program.

[0110] The method includes:

[0111] Obtaining a program file directory of a program file to be detected, and determining a program sub-file to be detected corresponding to the program file to be detected based on the program file directory;

[0112] The program sub-file to be detected is screened based on a preset file type to obtain a target program sub-file, and a target matching pattern corresponding to the target program sub-file is determined in a preset matching pattern set based on a basic file extension name of the target program sub-file;

[0113] A target program line in the target program subfile is determined based on the target matching pattern, and a repeatability detection is performed on the target program line based on the history identification array to generate a detection result.

[0114] In some embodiments, the method for determining a repeated process of a flow-based program may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the method for determining a repeated process of a flow-based program described above may be performed. Alternatively, in other embodiments, the processor 420 may be configured to execute the method for determining a repeated process of a flow-based program in any other appropriate manner (e.g., by means of firmware).

[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0120] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0121] The present application also discloses a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for determining a repeated process of a flow-based program provided in any embodiment of the present application is implemented. The program product and the method for determining a repeated process of a flow-based program disclosed in each embodiment of the present application belong to the same inventive concept, so they are not described here in detail.

[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for determining a repeated process of a flow program, characterized in that: include: Obtaining a program file directory of a program file to be detected, and determining a program sub-file to be detected corresponding to the program file to be detected based on the program file directory; The program sub-file to be detected is screened based on a preset file type to obtain a target program sub-file, and a target matching pattern corresponding to the target program sub-file is determined in a preset matching pattern set based on a basic file extension name of the target program sub-file; A target program line in the target program subfile is determined based on the target matching pattern, and a repeatability detection is performed on the target program line based on the history identification array to generate a detection result.

2. The method according to claim 1, characterized in that: The determining, based on the program file directory, the program sub-file to be detected corresponding to the program file to be detected comprises: Obtaining the file capacity corresponding to the program file to be detected, and determining and processing the file capacity based on a preset capacity threshold; If the file capacity meets the preset capacity threshold, the program sub-file contained in the program file directory is used as the program sub-file to be detected corresponding to the program file to be detected.

3. The method according to claim 1, characterized in that The screening process of the program sub-file to be detected based on the preset file type to obtain the target program sub-file includes: Obtain the basic file type of the program subfile to be detected; The basic file type is compared for consistency based on a preset file type. If the basic file type meets the consistency comparison standard, the program sub-file to be detected is used as the target program sub-file.

4. The method according to claim 1, characterized in that: The target matching pattern includes: a definition statement matching pattern, a comment start matching pattern and a comment end matching pattern.

5. The method according to claim 4, characterized in that Determining the target program line in the target program subfile based on the target matching pattern includes: Performing matching processing on the current program line in the target program subfile based on the definition statement matching pattern to obtain a first matching result; If the first matching result meets the preset statement matching standard, obtaining the subsequent program line corresponding to the current program line; Perform matching processing on the subsequent program line based on the comment start matching pattern and the comment end matching pattern to obtain a second matching result; If the second matching result meets the preset comment matching standard, the current program line is used as the target program line in the target program subfile.

6. The method according to claim 1, characterized in that The performing repeatability detection on the target program line based on the historical identification array to generate a detection result includes: Obtaining a target unique identifier corresponding to the target program line; Performing duplication detection on the target unique identifier based on the historical identifier array; If the target unique identifier is not included in the historical identifier array, updating the target unique identifier to the historical identifier array; If the historical identification array contains the target unique identification, a detection result is generated.

7. The method according to claim 1, characterized in that After performing repeatability detection on the target program line based on the historical identification array and generating a detection result, the method further includes: Based on a preset result file directory, the detection results corresponding to the program files to be detected are aggregated and processed to generate a detection result set; The detection result set is processed visually to generate warning information corresponding to the program file to be detected.

8. A device for determining a repeated process of a flow program, characterized in that: include: A data acquisition module, used to acquire a program file directory of a program file to be detected, and determine a program sub-file to be detected corresponding to the program file to be detected based on the program file directory; A data screening module, used for screening the program sub-files to be detected based on a preset file type to obtain a target program sub-file, and determining a target matching pattern corresponding to the target program sub-file in a preset matching pattern set based on a basic file extension name of the target program sub-file; The result generation module is used to determine the target program line in the target program subfile based on the target matching pattern, and perform repeatability detection on the target program line based on the history identification array to generate a detection result.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining a repeated process of a flow program according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a repeated process of a flow-based program according to any one of claims 1 to 7 when executed.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for determining a repeated flow of a flow program according to any one of claims 1 to 7.