CN110109678B - Code audit rule base generation method, device, equipment and medium - Google Patents

Code audit rule base generation method, device, equipment and medium Download PDF

Info

Publication number
CN110109678B
CN110109678B CN201910380194.5A CN201910380194A CN110109678B CN 110109678 B CN110109678 B CN 110109678B CN 201910380194 A CN201910380194 A CN 201910380194A CN 110109678 B CN110109678 B CN 110109678B
Authority
CN
China
Prior art keywords
audit
code
rule
audit rule
rule base
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910380194.5A
Other languages
Chinese (zh)
Other versions
CN110109678A (en
Inventor
梅发茂
曾纪钧
刘晔
龙震岳
林佳鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Information Center of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Information Center of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Power Grid Co Ltd, Information Center of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN201910380194.5A priority Critical patent/CN110109678B/en
Publication of CN110109678A publication Critical patent/CN110109678A/en
Application granted granted Critical
Publication of CN110109678B publication Critical patent/CN110109678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a code audit rule base generation method, a device, equipment and a medium. The method comprises the following steps: acquiring a plurality of existing audit rule sets; wherein each audit rule set comprises one or more audit rules, and each audit rule has corresponding rule description; dividing categories to which audit rules contained in each audit rule set belong according to rule description; and uniformly recording the auditing rules belonging to the same category under the corresponding data directory in a redundancy removing mode, and generating a code auditing rule base for technicians to audit the codes according to the code auditing rule base. The code audit rule base generated by the method has good base maintenance capability, can relatively reduce the overall labor cost required by code audit time, and ensures the comprehensiveness and accuracy of code audit. In addition, the invention also provides a code audit rule base generating device, equipment and medium, and the beneficial effects are the same as those described above.

Description

Code audit rule base generation method, device, equipment and medium
Technical Field
The present invention relates to the field of software development, and in particular, to a method, an apparatus, a device, and a medium for generating a code audit rule base.
Background
The picking of the normalization of the software source code according to the code audit rules is an important component for developing the security audit work, and a rule base conforming to the code audit developed inside enterprises is particularly important due to the restrictions of factors such as program development maturity, maintenance capability and the like of the industry background of the implementation units.
The rule base with high availability can meet the requirement of internal development of enterprises, and meanwhile, a developer can conveniently and purposefully reform. However, the audit rules on the market today are always combined, so that the counting personnel are required to audit in combination with the relatively scattered audit rules of each enterprise in the code audit process, and certain variability exists between the existing audit rules of each enterprise while higher redundancy exists, so that a great deal of effort is required to be spent on identifying rules by technicians with higher professional backgrounds in the code audit process, so that the code can be audited relatively comprehensively, the overall labor cost required for realizing code audit is relatively large, and the overall comprehensiveness and accuracy of the code audit are difficult to ensure.
Therefore, the code audit rule base generating method is provided to generate the code audit rule base which can relatively reduce the overall labor cost required by code audit and ensure the comprehensiveness and accuracy of code audit, and is a problem to be solved by the person skilled in the art.
Disclosure of Invention
The invention aims to provide a code audit rule base generation method, device, equipment and medium, so as to generate a code audit rule base which can relatively reduce the overall labor cost required by code audit and ensure the comprehensiveness and accuracy of code audit.
In order to solve the technical problems, the invention provides a code audit rule base generation method, which comprises the following steps:
acquiring a plurality of existing audit rule sets; wherein each audit rule set comprises one or more audit rules, and each audit rule has corresponding rule description;
dividing categories to which audit rules contained in each audit rule set belong according to rule description;
and uniformly recording the auditing rules belonging to the same category under the corresponding data directory in a redundancy removing mode, and generating a code auditing rule base for technicians to audit the codes according to the code auditing rule base.
Preferably, according to the rule description, classifying categories of audit rules included in each audit rule set includes:
according to semantic similarity between each rule description obtained by calculation through a semantic analysis model of the deep learning network and preset standard semantics, obtaining a semantic result of each rule description;
and dividing the category of the corresponding audit rule according to the semantic result described by each rule.
Preferably, the method further comprises:
when the execution process of the code to be checked is abnormal, acquiring abnormal information through a TF-IDF algorithm and extracting a preset number of keywords from the abnormal information;
searching a target audit rule with a keyword in a code audit rule base;
when the code audit rule base has the target audit rule, feeding back the target audit rule to the technician so as to eliminate the abnormality of the technician;
and when the target audit rule does not exist in the code audit rule base, adding the target audit rule in the code audit rule base.
Preferably, the content of the category specifically includes a code language category and a plug-in category.
Preferably, the auditing rules belonging to the same category are uniformly recorded under the corresponding data directory in a redundancy removing mode, and a code auditing rule base is generated for technicians to audit codes according to the code auditing rule base, including:
and uniformly recording the audit rules belonging to the same category under the data catalogs of the corresponding Excel types in a redundancy removing mode, and generating a code audit rule base for technicians to conduct code audit according to the code audit rule base.
In addition, the invention also provides a code audit rule base generating device, which comprises:
the collection acquisition module is used for acquiring a plurality of existing audit rule collections; wherein each audit rule set comprises one or more audit rules, and each audit rule has corresponding rule description;
the category dividing module is used for dividing the category of each audit rule contained in each audit rule set according to the rule description;
and the rule base generation module is used for uniformly recording the audit rules belonging to the same category under the corresponding data directory in a redundancy-removing mode to generate a code audit rule base so as to enable technicians to conduct code audit according to the code audit rule base.
In addition, the invention also provides a code audit rule base generating device, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the code audit rule base generation method when executing the computer program.
In addition, the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the code audit rule base generating method are realized.
According to the code audit rule base generation method provided by the invention, the current existing audit rule sets are firstly obtained, the audit rule sets at least comprise one or more audit rules, each audit rule has rule description, the audit rules contained in each audit rule set are further classified into categories according to rule expression, the audit rules belonging to the same category are uniformly recorded under the data catalogs corresponding to the category in a redundancy removing mode, and finally the code audit rule base is generated, so that a technician can conduct code audit according to the code audit rule base. According to the method, the audit rules in the existing audit rule sets are classified, and then the audit rules of the same kind of purpose are uniformly recorded to the corresponding data catalogue to generate the code audit database, so that a technician can use the code audit rule base to conduct code audit, when the technician conducts code audit through the code audit rule base, all audit rules which are not redundant with each other under the category of the category can be relatively and efficiently known according to the category of the audit rules, the code audit can be achieved without the need of the technician with higher professional background to spend a great deal of effort to conduct identification of the audit rules, and therefore the code audit rule base generated by the method has good library maintenance capability, the whole labor cost required by code audit time can be relatively reduced, and the comprehensiveness and accuracy of the code audit are ensured. In addition, the invention also provides a code audit rule base generating device, equipment and medium, and the beneficial effects are the same as those described above.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a code audit rule base generation method provided by an embodiment of the present invention;
FIG. 2 is a flowchart of another code audit rule base generation method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another code audit rule base generation method according to an embodiment of the present invention;
fig. 4 is a block diagram of a code audit rule base generating device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The rule base with high availability can meet the requirement of internal development of enterprises, and meanwhile, the development side can be conveniently and purposefully modified. However, the audit rules on the market today are always combined, so that the counting personnel are required to audit in combination with the relatively scattered audit rules of each enterprise in the code audit process, and certain variability exists between the existing audit rules of each enterprise while higher redundancy exists, so that a great deal of effort is required to be spent on identifying rules by technicians with higher professional backgrounds in the code audit process, so that the code can be audited relatively comprehensively, the overall labor cost required for realizing code audit is relatively large, and the overall comprehensiveness and accuracy of the code audit are difficult to ensure.
The core of the invention is to provide a code audit rule base generation method, a device, equipment and a medium, so as to generate the code audit rule base which can relatively reduce the overall labor cost required by code audit and ensure the comprehensiveness and accuracy of code audit.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description.
Fig. 1 is a flowchart of a code audit rule base generating method according to an embodiment of the present invention. Referring to fig. 1, the specific steps of the code audit rule base generating method include:
step S10: a plurality of existing audit rule sets are obtained.
Each audit rule set comprises one or more audit rules, and each audit rule has a corresponding rule description.
It should be noted that, the existing audit rule set in this step refers to a set of audit rules that are preset by different enterprises at present in order to determine whether the code format is standard during code audit, that is, each audit rule set includes the current existing audit rule, where the existing audit rule set may be determined according to specific requirements of the enterprise that generates the code audit rule base, and may include an audit rule set, such as an existing rule of the SONAR platform, an existing rule of the Firebug, an Aries P3C rule, a Aries self-existing rule, and so on. Because the final purpose of using the code audit library by technicians is the same as the final purpose of auditing by combining relatively scattered audit rules of each enterprise, the purpose of the step is to establish the code audit rule library with wider coverage range, the number of the obtained existing audit rule sets is more, and the specific selected audit rule sets are determined according to actual requirements.
In addition, the audit rules contained in the audit rule set should each have a corresponding rule description to describe the function, meaning, etc. of the corresponding audit rule.
Step S11: and dividing the category of the audit rule contained in each audit rule set according to the rule description.
Because the rule description can represent the function, meaning and other rule related information of the audit rule, the audit rule in each audit rule set is divided into the types according to the rule description, so that the integral category division of all audit rules in each audit rule set is realized. The classification of the category to which the audit rule included in each audit rule set refers in this step is actually classification of the category to which the audit rule included in the audit rule total database belongs.
It should be noted that, the content of the categories specifically includes code language categories and plug-in categories, that is, corresponding audit rules are provided for different code language categories and plug-in categories, a user can search the audit rules in a targeted manner according to the language types of the code to be audited and the plug-in types used, the code language categories can be specifically divided into java, js, css, html, android, php, python and the like, and the plug-in categories can also be further divided on the basis of the hierarchy of the language categories, that is, the plug-in categories and the code language categories have a hierarchical relationship.
Step S12: and uniformly recording the auditing rules belonging to the same category under the corresponding data directory in a redundancy removing mode, and generating a code auditing rule base for technicians to audit the codes according to the code auditing rule base.
The code audit rule base generated in the step is essentially a 'benchmark' rule base, the 'benchmark' rule base is matched with the requirement of the current research and development capability maturity of enterprises, and is continuously enriched and modified along with the development of the enterprises, and different enterprises have different code audit benchmarks, namely different 'benchmark' rule bases.
Because different existing audit rule sets possibly contain redundant audit rules with the same content, in order to avoid audit rule redundancy in the generated code audit rule library and further ensure that a technician checks the overall efficiency of the audit rules, after the overall category of all audit rules is divided, the audit rules belonging to the same category are uniformly recorded under the corresponding data catalogs in a redundancy removing mode, and then the data catalogs corresponding to all audit rule categories form the overall code audit rule library. It should be noted that, the data directory in this step has an indexing function, and the data directory itself can establish a mapping relationship with its subordinate audit rules, that is, the user can find the corresponding audit rules through the data directory.
According to the code audit rule base generation method provided by the invention, the current existing audit rule sets are firstly obtained, the audit rule sets at least comprise one or more audit rules, each audit rule has rule description, the audit rules contained in each audit rule set are further classified into categories according to rule expression, the audit rules belonging to the same category are uniformly recorded under the data catalogs corresponding to the category in a redundancy removing mode, and finally the code audit rule base is generated, so that a technician can conduct code audit according to the code audit rule base. According to the method, the audit rules in the existing audit rule sets are classified, and then the audit rules of the same kind of purpose are uniformly recorded to the corresponding data catalogue to generate the code audit database, so that a technician can use the code audit rule base to conduct code audit, when the technician conducts code audit through the code audit rule base, all audit rules which are not redundant with each other under the category of the category can be relatively and efficiently known according to the category of the audit rules, the code audit can be achieved without the need of the technician with higher professional background to spend a great deal of effort to conduct identification of the audit rules, and therefore the code audit rule base generated by the method has good library maintenance capability, the whole labor cost required by code audit time can be relatively reduced, and the comprehensiveness and accuracy of the code audit are ensured.
On the basis of the above examples, the present invention also provides the following series of preferred embodiments.
Fig. 2 is a flowchart of another code audit rule base generating method according to an embodiment of the present invention. Referring to fig. 2, the specific steps of the code audit rule base generating method include:
step S20: a plurality of existing audit rule sets are obtained.
Each audit rule set comprises one or more audit rules, and each audit rule has a corresponding rule description.
Step S21: and obtaining semantic results of each rule description according to semantic similarity between each rule description obtained by calculation through a semantic analysis model of the deep learning network and preset standard semantics.
Step S22: and dividing the category of the corresponding audit rule according to the semantic result described by each rule.
Wherein, category feature models have been trained and learned in advance, and generally include: code specification classes, memory leak classes, thread process classes, etc.
The key point of the embodiment is that the rule description of the audit rule is analyzed by utilizing a semantic analysis model of the deep learning network, so that the specific semantics of each audit rule are resolved, the semantic value of the rule description is calculated through the semantic analysis model of the deep learning network, the semantic value is further compared with the semantic value of a preset standard semantic, and when the difference between the semantic value of the rule description and the semantic value of the standard semantic is smaller than a preset threshold range, the rule description is considered to be identical to the standard semantic, so that the specific semantics of the rule description are obtained, and the semantic result of each rule description is obtained.
After the semantic result of the rule description is obtained, the corresponding audit rule is divided according to the semantic result of the rule description, and the purpose of classifying the audit rule according to the rule description of the audit rule is further achieved.
Because the training process of the semantic analysis model based on the deep learning network belongs to the technical content well known in the deep learning field, redundant description is omitted here.
Step S23: and uniformly recording the auditing rules belonging to the same category under the corresponding data directory in a redundancy removing mode, and generating a code auditing rule base for technicians to audit the codes according to the code auditing rule base.
According to the embodiment, the rule description of the auditing rule is operated through the semantic analysis model of the deep learning network, so that the semantics of the rule description are obtained, the auditing rule corresponding to the rule description is classified according to the rule description, the manpower cost caused by manually identifying the semantics of the rule description can be relatively avoided, and the whole manpower cost in the process of generating the code auditing rule library is further reduced.
Fig. 3 is a flowchart of another code audit rule base generating method according to an embodiment of the present invention. Referring to fig. 3, the specific steps of the code audit rule base generating method include:
step S30: a plurality of existing audit rule sets are obtained.
Step S31: and dividing the category of the audit rule contained in each audit rule set according to the rule description.
Step S32: and uniformly recording the auditing rules belonging to the same category under the corresponding data directory in a redundancy removing mode, and generating a code auditing rule base for technicians to audit the codes according to the code auditing rule base.
Step S33: when the execution process of the code to be checked is abnormal, acquiring abnormal information through a TF-IDF algorithm and extracting a preset number of keywords from the abnormal information.
When the code to be audited has an abnormality in the running process of the code to be audited, namely when the running error of the code occurs, the abnormal information generated by the abnormality is obtained, and the reasons for the abnormality are often recorded in the abnormal information, so that when the running process of the code to be audited has the abnormality, a certain number of keywords are extracted from the abnormal information, and the important content of the abnormal information is represented by the keywords.
The TF-IDF algorithm (term frequency-inverse document frequency) is a commonly used weighting technique algorithm for information retrieval and data mining. The TF-IDF algorithm has the advantage of being simple and fast to evaluate the importance of a word to one of the documents in a document set or corpus. The importance of a word increases proportionally with the number of times it appears in the file, but at the same time decreases inversely with the frequency with which it appears in the corpus. The principle of the algorithm execution process is essentially that after the TF-IDF value of each word in the article is calculated, the words are ranked, and the highest value of the words is selected as the keywords. The embodiment can relatively conveniently find the keywords in the abnormal information, and improves the extraction efficiency of the keywords in the abnormal information.
Step S34: searching a target audit rule with keywords in a code audit rule base.
Step S35: and when the target audit rule exists in the code audit rule library, feeding back the target audit rule to the technician so as to eliminate the abnormality of the technician.
Step S36: and when the target audit rule does not exist in the code audit rule base, adding the target audit rule in the code audit rule base.
After extracting the keywords from the abnormal information, matching in a code audit rule base so as to match target audit rules with the same keywords, and feeding back the target audit rules to technicians for the technicians to eliminate the anomalies when the target audit rules exist in the code audit rule base; in contrast, when the target audit rule does not exist in the code audit rule base, it is indicated that the audit rule which is not preset for the code exception exists at present, so that the new target audit rule can be added in the code audit rule base in an autonomous research and development mode, or the corresponding code audit rule is extracted from the full-scale base and added into the audit rule base to serve as the new target audit rule. When the new target audit rule is added, the new target audit rule should be set according to the format of the code after exception removal, that is, the code is ensured to normally run by debugging the code, and then the target audit rule is added according to the code content of the debugging part. The embodiment relatively improves the flexibility of using and updating the code audit rule base.
On the basis of the series of embodiments, as a preferred embodiment, the method uniformly records the audit rules belonging to the same category under the corresponding data directory in a redundancy-removing manner, and generates a code audit rule base for technicians to audit codes according to the code audit rule base, including:
and uniformly recording the audit rules belonging to the same category under the data catalogs of the corresponding Excel types in a redundancy removing mode, and generating a code audit rule base for technicians to conduct code audit according to the code audit rule base.
In addition, based on the Excel type data catalogue, the data can be flexibly processed such as sorting, calculating, summarizing, inquiring and analyzing, and the like, especially when the data catalogue with large data volume is faced, specific content can be targeted inquired through SQL language, so that the service efficiency of technicians on the Excel type data catalogue can be relatively improved, and the overall high availability and flexibility of the code audit rule base can be further ensured.
Fig. 4 is a block diagram of a code audit rule base generating device according to an embodiment of the present invention. The code audit rule base generating device provided by the embodiment of the invention comprises the following steps:
a set acquisition module 10, configured to acquire a plurality of existing audit rule sets; wherein each audit rule set comprises one or more audit rules, and each audit rule has corresponding rule description;
the category dividing module 11 is configured to divide categories to which audit rules included in each audit rule set belong according to rule descriptions;
the rule base generating module 12 is configured to record the audit rules belonging to the same category under the corresponding data records in a redundancy-removing manner, and generate a code audit rule base for a technician to perform code audit according to the code audit rule base.
The code audit rule base generating device provided by the invention firstly acquires the current existing audit rule sets, wherein the audit rule sets at least comprise one or more audit rules, each audit rule has rule description, the audit rules contained in each audit rule set are further classified into categories according to rule expression, the audit rules belonging to the same category are uniformly recorded under the data directory corresponding to the category in a redundancy removing mode, and finally the code audit rule base is generated, so that technicians can conduct code audit according to the code audit rule base. According to the code audit rule library generation device, audit rules in a plurality of existing audit rule sets are classified, and then the audit rules of the same kind of purpose are uniformly recorded to corresponding data catalogues to generate a code audit database, so that a technician can use the code audit rule library to conduct code audit, when the technician conducts code audit through the code audit rule library, all audit rules which are not redundant with each other under the category of the class can be obtained relatively efficiently according to the category of the audit rules, the code audit can be achieved without the need of the technician with higher professional background spending a great deal of effort to conduct identification of the audit rules, and therefore the code audit rule library generated by the device has good library maintenance capability, the whole labor cost required by code audit time can be relatively reduced, and the comprehensiveness and accuracy of the code audit are ensured.
The invention also provides a code audit rule base generating device, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the code audit rule base generation method when executing the computer program.
The code audit rule base generating equipment provided by the invention firstly acquires the current existing audit rule sets, wherein the audit rule sets at least comprise one or more audit rules, each audit rule has rule description, the audit rules contained in each audit rule set are further classified into categories according to rule expression, the audit rules belonging to the same category are uniformly recorded under the data directory corresponding to the category in a redundancy removing mode, and finally the code audit rule base is generated, so that technicians can conduct code audit according to the code audit rule base. According to the device, the audit rules in the existing audit rule sets are classified, and then the audit rules of the same kind of purpose are uniformly recorded to the corresponding data catalogue to generate the code audit database, so that a technician can use the code audit rule base to conduct code audit, when the technician conducts code audit through the code audit rule base, all audit rules which are not redundant with each other under the category of the class can be obtained relatively efficiently according to the category of the audit rules, the code audit can be achieved without the need of the technician with higher professional background to spend a great deal of effort to conduct identification of the audit rules, and therefore the code audit rule base generated by the device has good library maintenance capability, the whole labor cost required by code audit time can be relatively reduced, and the comprehensiveness and accuracy of the code audit are ensured.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the code audit rule base generation method when being executed by a processor.
The invention provides a computer readable storage medium, which comprises the steps of firstly obtaining a current existing audit rule set, wherein the audit rule set at least comprises one or more audit rules, each audit rule has rule description, dividing categories of the audit rules contained in each audit rule set according to rule expression, uniformly recording the audit rules belonging to the same category under a data directory corresponding to the category in a redundancy removing mode, and finally generating a code audit rule library for technicians to conduct code audit according to the code audit rule library. The computer readable storage medium classifies audit rules in a plurality of existing audit rule sets, and further uniformly records the audit rules of the same kind of purpose to a corresponding data directory to generate a code audit database, so that a technician can use the code audit rule base to conduct code audit, when the technician conducts code audit through the code audit rule base, the technician can learn all audit rules which are not redundant with each other under the category of the audit rules relatively efficiently, the technician with higher professional background does not need to spend a great deal of effort to conduct audit rule identification, and the code audit can be achieved.
The method, the device, the equipment and the medium for generating the code audit rule base are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A code audit rule base generation method, comprising:
acquiring a plurality of existing audit rule sets; wherein each audit rule set comprises one or more audit rules, and each audit rule has a corresponding rule description;
dividing categories to which the audit rules contained in each audit rule set belong according to the rule description;
uniformly recording the audit rules belonging to the same class under the corresponding data catalogs in a redundancy removing mode, and generating a code audit rule base for technicians to conduct code audit according to the code audit rule base;
the data catalogue can establish a mapping relation between the data catalogue and the auditing rules in the data catalogue, so that a user can inquire the corresponding auditing rules through the data catalogue.
2. The code audit rule base generating method according to claim 1, wherein the classifying the audit rules included in each audit rule set according to the rule description includes:
according to the semantic similarity between each rule description and preset standard semantics calculated by using a semantic analysis model of the deep learning network, acquiring a semantic result of each rule description;
and dividing the category of the corresponding audit rule according to the semantic result described by each rule.
3. The code audit rule base generating method according to claim 1 further comprising:
when the execution process of the code to be checked is abnormal, acquiring abnormal information through a TF-IDF algorithm and extracting a preset number of keywords from the abnormal information;
searching a target audit rule with the keyword in the code audit rule library;
when the target audit rule exists in the code audit rule library, feeding back the target audit rule to the technician so as to enable the technician to exclude the abnormality;
and when the target audit rule does not exist in the code audit rule base, adding the target audit rule in the code audit rule base.
4. The code audit rule base generating method according to claim 1 wherein the content of the categories specifically includes a code language category and a plug-in category.
5. The method for generating a code audit rule base according to any one of claims 1 to 4, wherein the step of uniformly recording the audit rules belonging to the same class under a corresponding data directory in a redundancy-removing manner to generate a code audit rule base for a technician to perform code audit according to the code audit rule base includes:
and uniformly recording the audit rules belonging to the same class under the data directory of the corresponding Excel type in a redundancy removing mode, and generating the code audit rule base so that technicians can audit the codes according to the code audit rule base.
6. A code audit rule base generating device, comprising:
the collection acquisition module is used for acquiring a plurality of existing audit rule collections; wherein each audit rule set comprises one or more audit rules, and each audit rule has a corresponding rule description;
the category dividing module is used for dividing the category of the audit rule contained in each audit rule set according to the rule description;
the rule base generation module is used for uniformly recording the audit rules belonging to the same purpose under the corresponding data directory in a redundancy-removing mode to generate a code audit rule base so as to enable technicians to conduct code audit according to the code audit rule base;
the data catalogue can establish a mapping relation between the data catalogue and the auditing rules in the data catalogue, so that a user can inquire the corresponding auditing rules through the data catalogue.
7. A code audit rule base generating device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the code audit rule base generating method according to any one of claims 1 to 5 when executing said computer program.
8. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the code audit rule base generating method according to any of the claims 1 to 5.
CN201910380194.5A 2019-05-08 2019-05-08 Code audit rule base generation method, device, equipment and medium Active CN110109678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910380194.5A CN110109678B (en) 2019-05-08 2019-05-08 Code audit rule base generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910380194.5A CN110109678B (en) 2019-05-08 2019-05-08 Code audit rule base generation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN110109678A CN110109678A (en) 2019-08-09
CN110109678B true CN110109678B (en) 2023-07-04

Family

ID=67488830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910380194.5A Active CN110109678B (en) 2019-05-08 2019-05-08 Code audit rule base generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110109678B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968868A (en) * 2019-11-20 2020-04-07 北京国舜科技股份有限公司 Application security audit method and device, electronic equipment and storage medium
CN111858378A (en) * 2020-07-30 2020-10-30 重庆都会信息科技有限公司 PHP code auditing system
CN112711772A (en) * 2020-12-30 2021-04-27 杭州未名信科科技有限公司 Auditing system, method and storage medium for function execution in service
CN114462373B (en) * 2022-02-09 2022-11-15 星环信息科技(上海)股份有限公司 Audit rule determination method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528447A (en) * 2015-12-22 2016-04-27 远光软件股份有限公司 Method for rejecting and summarizing specific data layer by layer simultaneously
CN106354632A (en) * 2016-08-24 2017-01-25 北京奇虎测腾科技有限公司 Source code detecting system and method based on static analysis technology
CN107766737A (en) * 2017-08-31 2018-03-06 西安交大捷普网络科技有限公司 A kind of database audit method
CN108205493A (en) * 2016-12-20 2018-06-26 腾讯科技(深圳)有限公司 A kind of code detection method, terminal, server and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1704492A1 (en) * 2003-11-27 2006-09-27 Quinetiq Limited Automated anomaly detection
CN103942137B (en) * 2013-01-23 2017-08-25 腾讯科技(深圳)有限公司 Browser compatibility method of testing and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528447A (en) * 2015-12-22 2016-04-27 远光软件股份有限公司 Method for rejecting and summarizing specific data layer by layer simultaneously
CN106354632A (en) * 2016-08-24 2017-01-25 北京奇虎测腾科技有限公司 Source code detecting system and method based on static analysis technology
CN108205493A (en) * 2016-12-20 2018-06-26 腾讯科技(深圳)有限公司 A kind of code detection method, terminal, server and system
CN107766737A (en) * 2017-08-31 2018-03-06 西安交大捷普网络科技有限公司 A kind of database audit method

Also Published As

Publication number Publication date
CN110109678A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
CN110109678B (en) Code audit rule base generation method, device, equipment and medium
US7562088B2 (en) Structure extraction from unstructured documents
US10095766B2 (en) Automated refinement and validation of data warehouse star schemas
US20120303661A1 (en) Systems and methods for information extraction using contextual pattern discovery
US7949901B2 (en) Program and apparatus for generating system test specifications
US20080162455A1 (en) Determination of document similarity
US10599678B2 (en) Input gathering system and method for defining, refining or validating star schema for a source database
TW201421395A (en) System and method for recursively traversing the internet and other sources to identify, gather, curate, adjudicate, and qualify business identity and related data
Murgia et al. A machine learning approach for text categorization of fixing-issue commits on CVS
CN106649557B (en) Semantic association mining method for defect report and mail list
Macho et al. Extracting build changes with builddiff
Helming et al. Automatic assignment of work items
Arnarsson et al. Supporting knowledge re-use with effective searches of related engineering documents-a comparison of search engine and natural language processing-based algorithms
CN112286799B (en) Software defect positioning method combining sentence embedding and particle swarm optimization algorithm
Kang Automated duplicate bug reports detection-an experiment at axis communication ab
Kamp et al. SeSaMe: A data set of semantically similar Java methods
US10360239B2 (en) Automated definition of data warehouse star schemas
CN117592450A (en) Panoramic archive generation method and system based on employee information integration
Babur et al. Model analytics for feature models: case studies for SPLOT repository
US11068376B2 (en) Analytics engine selection management
Eken et al. Predicting defects with latent and semantic features from commit logs in an industrial setting
US9785404B2 (en) Method and system for analyzing data in artifacts and creating a modifiable data network
Inokuchi et al. From academia to software development: publication citations in source code comments
CN113760864A (en) Data model generation method and device
Nguyen et al. Using topic model to suggest fine-grained source code changes

Legal Events

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