CN110109678A - A kind of code audit rule library generating method, device, equipment and medium - Google Patents

A kind of code audit rule library generating method, device, equipment and medium Download PDF

Info

Publication number
CN110109678A
CN110109678A CN201910380194.5A CN201910380194A CN110109678A CN 110109678 A CN110109678 A CN 110109678A CN 201910380194 A CN201910380194 A CN 201910380194A CN 110109678 A CN110109678 A CN 110109678A
Authority
CN
China
Prior art keywords
audit
code
regulation
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.)
Granted
Application number
CN201910380194.5A
Other languages
Chinese (zh)
Other versions
CN110109678B (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

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 kind of code audit rule library generating method, device, equipment and media.The step of this method includes: to obtain multiple existing audit regulation set;It wherein, include one or more audit regulation in each audit regulation set, and each audit regulation all has corresponding rule description;It is described according to rule, the division of affiliated classification is carried out to the audit regulation for including in each audit regulation set;The audit regulation for belonging to identical classification under unified record to corresponding data directory, is generated into code audit rule base in a manner of de-redundancy, so that technical staff carries out code audit according to code audit rule base.The code audit rule base that this method generates has the good library ability of maintenance, can relative reduction code audit when required whole manpower costs, and ensure the comprehensive and accuracy of code audit.In addition, the present invention also provides a kind of code audit rule base generating means, equipment and medium, beneficial effect are same as above.

Description

A kind of code audit rule library generating method, device, equipment and medium
Technical field
The present invention relates to field of software development, more particularly to a kind of code audit rule library generating method, device, equipment And medium.
Background technique
Being picked up according to normalization of the code audit rule to software source code is the important of development security audit work Component part, due to the affiliated industry background of exploiting entity, program researches and develops maturity, the limitation of the elements such as ability of maintenance, Yi Taofu The rule base for closing enterprises development code audit is particularly important.
The high rule base of availability tends to meet the demand of enterprises exploitation, while being also convenient for developer and have Pointedly rectify and improve.But audit regulation now on the market is numerous, therefore currently needs during code audit Counting personnel combine each enterprise relatively scattered audit regulation audit, due to the existing audit regulation of each enterprise it Between there may be certain othernesses again while redundancy with higher, therefore need to have during code audit The identification for having the technical staff of higher specialty background that a large amount of energy is spent to carry out rule, could integrate relatively to code into Row audit, therefore whole manpower costs required when current realization code audit are relatively large, and are difficult to ensure for code The entirety of audit is comprehensive and accuracy.
It can be seen that provide a kind of code audit rule library generating method, with generate can relative reduction code audit when Required whole manpower costs, and ensure comprehensive and accuracy the code audit rule base of code audit, it is this field Technical staff's problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of code audit rule library generating method, device, equipment and media, to generate energy Required whole manpower costs when enough relative reduction code audits, and ensure comprehensive and accuracy the code of code audit Audit regulation library.
In order to solve the above technical problems, the present invention provides a kind of code audit rule library generating method, comprising:
Obtain multiple existing audit regulation set;It wherein, include one or more in each audit regulation set Audit regulation, and each audit regulation all have it is corresponding rule description;
It is described according to rule, the division of affiliated classification is carried out to the audit regulation for including in each audit regulation set;
The audit regulation for belonging to identical classification under unified record to corresponding data directory, is generated in a manner of de-redundancy Code audit rule base, so that technical staff carries out code audit according to code audit rule base.
Preferably, it is described according to rule, drawing for affiliated classification is carried out to the audit regulation for including in each audit regulation set Point, comprising:
Each rule description and preset standard being calculated according to the semantic analysis model using deep learning network are semantic Between semantic similarity, obtain it is each rule description semantic results;
The division of affiliated classification is carried out to corresponding audit regulation according to the semantic results of each rule description.
Preferably, method further include:
When the implementation procedure to auditing code is deposited when abnormal, by TF-IDF algorithm acquisition exception information and in abnormal letter The keyword of preset quantity is extracted in breath;
The target audit regulation with keyword is searched in code audit rule base;
When in code audit regulation library there are when target audit regulation, by target audit regulation feed back to technical staff for Technical staff excludes abnormal;
When there is no target audit regulation in code audit regulation library, target audit is increased newly in code audit rule base Rule.
Preferably, the content of classification specifically includes code language classification and plug-in unit classification.
Preferably, by the audit regulation for belonging to identical classification, unification is recorded to corresponding data directory in a manner of de-redundancy Under, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base, comprising:
By the audit regulation for belonging to identical classification, unification is recorded to the data mesh of corresponding Excel type in a manner of de-redundancy Under record, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
In addition, the present invention also provides a kind of code audit rule base generating means, comprising:
Set obtains module, for obtaining multiple existing audit regulation set;Wherein, include in each audit regulation set There is one or more audit regulation, and each audit regulation all has corresponding rule description;
Classification division module carries out institute to the audit regulation for including in each audit regulation set for describing according to rule Belong to the division of classification;
Rule base generation module, the audit regulation for that will belong to identical classification unify record to phase in a manner of de-redundancy Under the data directory answered, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
In addition, the present invention also provides a kind of code audit rule base generating devices, comprising:
Memory, for storing computer program;
Processor is realized when for executing computer program such as the step of above-mentioned code audit rule library generating method.
In addition, being stored with meter on computer readable storage medium the present invention also provides a kind of computer readable storage medium Calculation machine program is realized when computer program is executed by processor such as the step of above-mentioned code audit rule library generating method.
Code audit rule library generating method provided by the present invention obtains current existing audit regulation set first, Including at least in audit regulation set has one or more audit regulation, and each audit regulation all has rule and retouches It states, and then carries out the division of affiliated classification to the audit regulation for including in each audit regulation set according to rule statement, and will belong to It under unified record to data directory corresponding with the classification, is ultimately generated in a manner of de-redundancy in the audit regulation of identical classification Code audit rule base, so that technical staff carries out code audit according to code audit rule base.This method pass through by it is multiple Audit regulation in some audit regulation set is sorted out, and then the unification of the audit regulation of identical classification is recorded to corresponding Data directory is to generate code audit database, so that technical staff carries out code audit using code audit rule base, with this When technical staff carries out code audit by code audit rule base, it is capable of obtaining according to the classification of audit regulation for relative efficiency Knowing such, mutually the complete audit rule of redundancy, the technical staff of the higher specialty background of need not have do not spend a large amount of essence now Power carries out the identification of audit regulation, the audit to code can be realized, therefore the code audit rule base that this method generates has The good library ability of maintenance, can relative reduction code audit when required whole manpower costs, and ensure the complete of code audit Face property and accuracy.In addition, the present invention also provides a kind of code audit rule base generating means, equipment and medium, beneficial to effect Fruit is same as above.
Detailed description of the invention
In order to illustrate the embodiments of the present invention more clearly, attached drawing needed in the embodiment will be done simply below It introduces, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ordinary skill people For member, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of code audit rule library generating method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another code audit rule library generating method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another code audit rule library generating method provided in an embodiment of the present invention;
Fig. 4 is a kind of structure chart of code audit rule base generating means provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole embodiments.Based on this Embodiment in invention, those of ordinary skill in the art are without making creative work, obtained every other Embodiment belongs to the scope of the present invention.
The high rule base of availability tends to meet the demand of enterprises exploitation, while being also convenient for exploitation side and had Pointedly rectify and improve.But audit regulation now on the market is numerous, therefore currently needs during code audit Counting personnel combine each enterprise relatively scattered audit regulation audit, due to the existing audit regulation of each enterprise it Between there may be certain othernesses again while redundancy with higher, therefore need to have during code audit The identification for having the technical staff of higher specialty background that a large amount of energy is spent to carry out rule, could integrate relatively to code into Row audit, therefore whole manpower costs required when current realization code audit are relatively large, and are difficult to ensure for code The entirety of audit is comprehensive and accuracy.
Core of the invention is to provide a kind of code audit rule library generating method, device, equipment and medium, to generate energy Required whole manpower costs when enough relative reduction code audits, and ensure comprehensive and accuracy the code of code audit Audit regulation library.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description The present invention is described in further detail.
Fig. 1 is a kind of flow chart of code audit rule library generating method provided in an embodiment of the present invention.Referring to FIG. 1, The specific steps of code audit rule library generating method include:
Step S10: multiple existing audit regulation set are obtained.
It wherein, include one or more audit regulation in each audit regulation set, and each audit regulation has There is corresponding rule description.
It should be noted that the existing audit regulation set in this step, refers to current different enterprises in order in generation Determine when code audit code format whether the set of standard and prespecified audit regulation, i.e., wrap in each audit regulation set Containing current existing audit regulation, existing audit regulation set can be according to the specific of the enterprise for generating code audit rule base Depending on demand, the audit regulation set that may include, as SONAR platform is regular, Firebug is regular, Ali P3C rule Then, Nan Rui is from regular etc..Due to this method it is ensured that technical staff can be with combination using the final purpose in code audit library The final purpose that the relatively scattered audit regulation of each enterprise is audited is identical, therefore the purpose of this step is to establish to cover The wide code audit rule base of range, and then the quantity of the existing audit regulation set obtained should be multiple, and have Body choose audit regulation set should according to actual needs depending on.
In addition, corresponding rule description should be all had in audit regulation included in audit regulation set to describe phase Answer function and the meaning etc. of audit regulation.
Step S11: describing according to rule, carries out drawing for affiliated classification to the audit regulation for including in each audit regulation set Point.
Since rule description can characterize the regular relevant information such as function and meaning of audit regulation, this step basis Audit regulation in each audit regulation set has been carried out the division of affiliated type by rule description, is realized with this for each audit Complete audit rule in regular collection carries out whole classification and divides.It is signified to being wrapped in each audit regulation set in this step The division that the audit regulation contained carries out affiliated classification is actually to carry out institute to the audit regulation for including in audit regulation full dose library Belong to the division of classification.
It should be noted that the content of classification specifically includes code language classification and plug-in unit classification, that is, it is directed to different Code language classification and plug-in unit classification have a corresponding audit regulation, user can according to the language form to auditing code with And used package types progress targetedly searches audit regulation, code language classification can be specifically divided into Java, js, css, html, android, php, python etc., plug-in unit classification are also possible on the basis of class of languages purpose level Further classification divides, i.e., has hierarchical relationship between plug-in unit classification and code language classification.
Step S12: by the audit regulation for belonging to identical classification, unification is recorded to corresponding data mesh in a manner of de-redundancy Under record, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
The code audit rule base generated in this step is essentially " benchmark " rule base, and being somebody's turn to do " benchmark " rule base should be with enterprise The needs of the current research and development ability maturity of industry match, and constantly enrich and modify with enterprise development, different enterprises, which gather around, to be had plenty of Different code audit benchmark, i.e., different " benchmark " rule bases.
Due to that may include the identical redundancy audit regulation of content in different existing audit regulation set, in order to The audit regulation redundancy in code audit rule base generated is avoided, and then ensures that technical staff checks the entirety of audit regulation Efficiency will belong to identical classification after it will carry out whole classification to whole audit regulations and divide in a manner of de-redundancy Under the unified record to corresponding data directory of audit regulation, and then it is made of the corresponding data directory of each audit regulation classification whole The code audit rule base of body.It should be noted that the data directory in this step has index function, data directory itself can Enough mapping relations established between its subordinate audit regulation, that is to say, that user can find correspondence by data directory Audit regulation.
Code audit rule library generating method provided by the present invention obtains current existing audit regulation set first, Including at least in audit regulation set has one or more audit regulation, and each audit regulation all has rule and retouches It states, and then carries out the division of affiliated classification to the audit regulation for including in each audit regulation set according to rule statement, and will belong to It under unified record to data directory corresponding with the classification, is ultimately generated in a manner of de-redundancy in the audit regulation of identical classification Code audit rule base, so that technical staff carries out code audit according to code audit rule base.This method pass through by it is multiple Audit regulation in some audit regulation set is sorted out, and then the unification of the audit regulation of identical classification is recorded to corresponding Data directory is to generate code audit database, so that technical staff carries out code audit using code audit rule base, with this When technical staff carries out code audit by code audit rule base, it is capable of obtaining according to the classification of audit regulation for relative efficiency Knowing such, mutually the complete audit rule of redundancy, the technical staff of the higher specialty background of need not have do not spend a large amount of essence now Power carries out the identification of audit regulation, the audit to code can be realized, therefore the code audit rule base that this method generates has The good library ability of maintenance, can relative reduction code audit when required whole manpower costs, and ensure the complete of code audit Face property and accuracy.
On the basis of the above embodiments, the present invention also provides a series of preferred embodiments.
Fig. 2 is the flow chart of another code audit rule library generating method provided in an embodiment of the present invention.Please refer to figure 2, the specific steps of code audit rule library generating method include:
Step S20: multiple existing audit regulation set are obtained.
It wherein, include one or more audit regulation in each audit regulation set, and each audit regulation has There is corresponding rule description.
Step S21: it is described according to each rule that the semantic analysis model using deep learning network is calculated and default Semantic similarity between standard semantic obtains the semantic results of each rule description.
Step S22: the division of affiliated classification is carried out to corresponding audit regulation according to the semantic results of each rule description.
Wherein, classification characteristic model has been trained study in advance, generally comprises: coding criterion class, RAM leakage class, line Cheng Jincheng class etc..
The present embodiment focuses on describing the rule of audit regulation using the semantic analysis model of deep learning network It is analyzed, with the specific semanteme of each audit regulation of this discrimination, concrete implementation mode is the language by deep learning network The semantic values of adopted analysis model computation rule description, and then the semantic values are compared with the semantic values of preset standard semanteme, When difference is less than preset threshold range between the semantic values of rule description and the semantic values of standard semantic, then it is assumed that rule is retouched It states and is equal to standard semantic, the specific semanteme of rule description is obtained with this, that is, obtain the semantic results of each rule description.
After the semantic results for obtaining rule description, corresponding audit regulation is carried out according to the semantic results of rule description The division of affiliated classification, and then realize the purpose for carrying out classification division to audit regulation according to the rule description of audit regulation.
Due to the training process of the semantic analysis model based on deep learning network, belong to well known in deep learning field Technology contents, therefore do not do excessive repeat herein.
Step S23: by the audit regulation for belonging to identical classification, unification is recorded to corresponding data mesh in a manner of de-redundancy Under record, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
The present embodiment carries out operation to the rule description of audit regulation by the semantic analysis model of deep learning network, into And learn the semanteme of rule description, and the division that corresponding audit regulation carries out classification is described to rule with this, it opposite can keep away Exempt from manpower costs caused by the semanteme described as manual identified rule, further decreases during generating code audit rule base Whole manpower costs.
Fig. 3 is the flow chart of another code audit rule library generating method provided in an embodiment of the present invention.Please refer to figure 3, the specific steps of code audit rule library generating method include:
Step S30: multiple existing audit regulation set are obtained.
Step S31: describing according to rule, carries out drawing for affiliated classification to the audit regulation for including in each audit regulation set Point.
Step S32: by the audit regulation for belonging to identical classification, unification is recorded to corresponding data mesh in a manner of de-redundancy Under record, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
Step S33: when the implementation procedure to auditing code deposit when abnormal, by TF-IDF algorithm obtain exception information simultaneously The keyword of preset quantity is extracted in exception information.
It should be noted that this step is when there are different in the operational process of its own for the code of pending code audit Chang Shi when there is the run-time error of code, obtains abnormal generated exception information, since often record has in exception information The reason of being abnormal, therefore this step is deposited when abnormal in the implementation procedure to auditing code, and one is extracted in exception information The keyword of fixed number amount, with the important content of keyword characterization exception information.
TF-IDF algorithm (term frequency-inverse document frequency) is a kind of for information inspection The common weighting technique algorithm of rope and data mining.The advantages of TF-IDF algorithm be it is simple and quick to assess a words for The significance level of one file set or a copy of it file in a corpus.The importance of words goes out hereof with it The directly proportional increase of existing number, but the frequency that can occur in corpus with it simultaneously is inversely proportional decline.Algorithm implementation procedure Essence on be the TF-IDF value for calculating each word in article after, be ranked up, it is highest several to choose its intermediate value As keyword.The present embodiment can be realized easily relatively and be searched the keyword in exception information, be improved for different The extraction efficiency of keyword in normal information.
Step S34: the target audit regulation with keyword is searched in code audit rule base.
Step S35: when, there are when target audit regulation, target audit regulation being fed back to technology in code audit regulation library Personnel exclude exception for technical staff.
Step S36: it when there is no target audit regulation in code audit regulation library, is increased newly in code audit rule base Target audit regulation.
It after extracting keyword in exception information, is matched in code audit rule base, same tool is matched with this There is a target audit regulation of same keyword, and then when, there are when target audit regulation, target being examined in code audit regulation library Meter rule feeds back to technical staff so that technical staff excludes exception;It is opposite, when not there is no target in code audit regulation library When audit regulation, then illustrate the currently prespecified audit regulation there is no abnormal for above-mentioned code, it can be considered to It increases target audit regulation newly in code audit rule base in a manner of independent research, or extracts corresponding code in full dose library Audit regulation is simultaneously added in audit regulation library as newly-increased target audit regulation.It should be noted that being examined when there is newly-increased target When counting the situation of rule, new target audit regulation should be set according to the format after code Abnormality remove, that is, first pass through tune Examination code ensures that code operates normally, and then increases target audit regulation newly according to the code content of debugging part.The present embodiment phase To the use improved for code audit rule base and the flexibility updated.
On the basis of a series of above-mentioned embodiments, as a preferred embodiment, identical classification will be belonged to Audit regulation under unified record to corresponding data directory, generates code audit rule base, in a manner of de-redundancy for technology Personnel carry out code audit according to code audit rule base, comprising:
By the audit regulation for belonging to identical classification, unification is recorded to the data mesh of corresponding Excel type in a manner of de-redundancy Under record, code audit rule base is generated, so that technical staff carries out code audit according to code audit rule base.
The audit regulation for focusing on to belong to identical classification of the present embodiment is unified in a manner of de-redundancy to be recorded to phase Under the data directory for answering Excel type, since the data directory of Excel type has the characteristics that operation is intuitive, quick, in addition, Based on the data directory of Excel type, can neatly data be arranged, be calculated, being summarized, being inquired, being analyzed etc. with processing, especially It can carry out specific aim inquiry to particular content by sql like language when facing the data directory of big data quantity, can be opposite Personnel develop skill for the service efficiency of the data directory of Excel type, and then guarantees the whole of code audit rule base High availability and flexibility.
Fig. 4 is a kind of structure chart of code audit rule base generating means provided in an embodiment of the present invention.The present invention is implemented The code audit rule base generating means that example provides, comprising:
Set obtains module 10, for obtaining multiple existing audit regulation set;Wherein, it is wrapped in each audit regulation set Containing one or more audit regulation, and each audit regulation all has corresponding rule description;
Classification division module 11 carries out the audit regulation for including in each audit regulation set for being described according to rule The division of affiliated classification;
Rule base generation module 12, the audit regulation for that will belong to identical classification unify record extremely in a manner of de-redundancy Under corresponding data directory, code audit rule base is generated, is examined so that technical staff carries out code according to code audit rule base Meter.
Code audit rule base generating means provided by the present invention obtain current existing audit regulation set first, Including at least in audit regulation set has one or more audit regulation, and each audit regulation all has rule and retouches It states, and then carries out the division of affiliated classification to the audit regulation for including in each audit regulation set according to rule statement, and will belong to It under unified record to data directory corresponding with the classification, is ultimately generated in a manner of de-redundancy in the audit regulation of identical classification Code audit rule base, so that technical staff carries out code audit according to code audit rule base.The present apparatus pass through by it is multiple Audit regulation in some audit regulation set is sorted out, and then the unification of the audit regulation of identical classification is recorded to corresponding Data directory is to generate code audit database, so that technical staff carries out code audit using code audit rule base, with this When technical staff carries out code audit by code audit rule base, it is capable of obtaining according to the classification of audit regulation for relative efficiency Knowing such, mutually the complete audit rule of redundancy, the technical staff of the higher specialty background of need not have do not spend a large amount of essence now Power carries out the identification of audit regulation, the audit to code can be realized, therefore the code audit rule base that the present apparatus generates has The good library ability of maintenance, can relative reduction code audit when required whole manpower costs, and ensure the complete of code audit Face property and accuracy.
The present invention also provides a kind of code audit rule base generating devices, comprising:
Memory, for storing computer program;
Processor realizes the step such as above-mentioned code audit rule library generating method when for executing the computer program Suddenly.
Code audit rule base generating device provided by the present invention obtains current existing audit regulation set first, Including at least in audit regulation set has one or more audit regulation, and each audit regulation all has rule and retouches It states, and then carries out the division of affiliated classification to the audit regulation for including in each audit regulation set according to rule statement, and will belong to It under unified record to data directory corresponding with the classification, is ultimately generated in a manner of de-redundancy in the audit regulation of identical classification Code audit rule base, so that technical staff carries out code audit according to code audit rule base.This equipment pass through by it is multiple Audit regulation in some audit regulation set is sorted out, and then the unification of the audit regulation of identical classification is recorded to corresponding Data directory is to generate code audit database, so that technical staff carries out code audit using code audit rule base, with this When technical staff carries out code audit by code audit rule base, it is capable of obtaining according to the classification of audit regulation for relative efficiency Knowing such, mutually the complete audit rule of redundancy, the technical staff of the higher specialty background of need not have do not spend a large amount of essence now Power carries out the identification of audit regulation, the audit to code can be realized, therefore the code audit rule base that this equipment generates has The good library ability of maintenance, can relative reduction code audit when required whole manpower costs, and ensure the complete of code audit Face property and accuracy.
The present invention also provides a kind of computer readable storage medium, computer journey is stored on computer readable storage medium Sequence is realized when computer program is executed by processor such as the step of above-mentioned code audit rule library generating method.
Computer readable storage medium provided by the present invention obtains current existing audit regulation set, audit first Including at least in regular collection has one or more audit regulation, and each audit regulation all has regular description, into And the division of affiliated classification is carried out to the audit regulation for including in each audit regulation set according to rule statement, and will belong to identical The audit regulation of classification under unified record to data directory corresponding with the classification, is ultimately generated code and examined in a manner of de-redundancy Rule base is counted, so that technical staff carries out code audit according to code audit rule base.This computer readable storage medium passes through Audit regulation in multiple existing audit regulation set is sorted out, and then the unification of the audit regulation of identical classification is recorded To corresponding data directory to generate code audit database, examined so that technical staff carries out code using code audit rule base Meter, with this technical staff by code audit rule base carry out code audit when, be capable of relative efficiency according to audit regulation Classification learn that mutually the complete audit rule of redundancy, the technical staff of the higher specialty background of need not have do not spend now for such A large amount of energy carries out the identification of audit regulation, the audit to code can be realized, therefore this computer readable storage medium is raw At code audit rule base there is the good library ability of maintenance, can relative reduction code audit when required whole manpower open Pin, and ensure the comprehensive and accuracy of code audit.
A kind of code audit rule library generating method provided by the present invention, device, equipment and medium are carried out above It is discussed in detail.Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part It is bright.It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, Can be with several improvements and modifications are made to the present invention, these improvement and modification also fall into the protection scope of the claims in the present invention It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (8)

1. a kind of code audit rule library generating method characterized by comprising
Obtain multiple existing audit regulation set;It wherein, include one or more in each audit regulation set Audit regulation, and each audit regulation all have it is corresponding rule description;
According to the rule description, drawing for affiliated classification is carried out to the audit regulation for including in each audit regulation set Point;
The audit regulation for belonging to identical classification under unified record to corresponding data directory, is generated in a manner of de-redundancy Code audit rule base, so that technical staff carries out code audit according to the code audit rule base.
2. code audit rule library generating method according to claim 1, which is characterized in that described to be retouched according to the rule It states, the division of affiliated classification is carried out to the audit regulation for including in each audit regulation set, comprising:
Each rule description and preset standard being calculated according to the semantic analysis model using deep learning network are semantic Between semantic similarity, obtain it is each it is described rule description semantic results;
The division of affiliated classification is carried out to corresponding audit regulation according to the semantic results of each rule description.
3. code audit rule library generating method according to claim 1, which is characterized in that the method also includes:
When the implementation procedure to auditing code is deposited when abnormal, by TF-IDF algorithm acquisition exception information and in the abnormal letter The keyword of preset quantity is extracted in breath;
The target audit regulation with the keyword is searched in the code audit rule base;
When there are when the target audit regulation, the target audit regulation being fed back to described in the code audit rule base Technical staff excludes the exception for the technical staff;
When there is no the target audit regulation in the code audit rule base, increased newly in the code audit rule base The target audit regulation.
4. code audit rule library generating method according to claim 1, which is characterized in that the content of the classification is specific Including code language classification and plug-in unit classification.
5. code audit rule library generating method according to any one of claims 1 to 4, which is characterized in that described to incite somebody to action The audit regulation for belonging to identical classification under unified record to corresponding data directory, is generated code and examined in a manner of de-redundancy Rule base is counted, so that technical staff carries out code audit according to the code audit rule base, comprising:
By the audit regulation for belonging to identical classification, unification is recorded to the number of corresponding Excel type in a manner of de-redundancy According to the code audit rule base under catalogue, is generated, so that technical staff carries out the generation according to the code audit rule base Code audit.
6. a kind of code audit rule base generating means characterized by comprising
Set obtains module, for obtaining multiple existing audit regulation set;Wherein, include in each audit regulation set There is one or more audit regulation, and each audit regulation all has corresponding rule description;
Classification division module advises the audit for including in each audit regulation set for being described according to the rule The division of classification belonging to then carrying out;
Rule base generation module, the audit regulation for that will belong to identical classification unify record to phase in a manner of de-redundancy Under the data directory answered, code audit rule base is generated, so that technical staff carries out code according to the code audit rule base Audit.
7. a kind of code audit rule base generating device characterized by comprising
Memory, for storing computer program;
Processor is realized when for executing the computer program such as code audit rule described in any one of claim 1 to 5 The step of library generating method.
8. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes such as code audit rule base described in any one of claim 1 to 5 when the computer program is executed by processor The step of generation method.
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 true CN110109678A (en) 2019-08-09
CN110109678B 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)

Cited By (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
CN114462373A (en) * 2022-02-09 2022-05-10 星环信息科技(上海)股份有限公司 Audit rule determination method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070112824A1 (en) * 2003-11-27 2007-05-17 Qinetiq Limited Automated anomaly detection
US20150301811A1 (en) * 2013-01-23 2015-10-22 Tencent Technology (Shenzhen) Company Limited Method and apparatus for testing browser compatibility
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070112824A1 (en) * 2003-11-27 2007-05-17 Qinetiq Limited Automated anomaly detection
US20150301811A1 (en) * 2013-01-23 2015-10-22 Tencent Technology (Shenzhen) Company Limited Method and apparatus for testing browser compatibility
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

Cited By (5)

* 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
CN114462373A (en) * 2022-02-09 2022-05-10 星环信息科技(上海)股份有限公司 Audit rule determination method and device, electronic equipment and storage medium
CN114462373B (en) * 2022-02-09 2022-11-15 星环信息科技(上海)股份有限公司 Audit rule determination method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110109678B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN110109678A (en) A kind of code audit rule library generating method, device, equipment and medium
Da Costa et al. A framework for evaluating the results of the szz approach for identifying bug-introducing changes
US10095778B2 (en) Method and system for probabilistically quantifying and visualizing relevance between two or more citationally or contextually related data objects
Genero et al. Early measures for UML class diagrams
Becker et al. Decision criteria in digital preservation: What to measure and how
Rodriguez et al. On software engineering repositories and their open problems
US20230410019A1 (en) Assisted analytics
US20100179951A1 (en) Systems and methods for mapping enterprise data
Macho et al. Extracting build changes with builddiff
Murgia et al. A machine learning approach for text categorization of fixing-issue commits on CVS
Bellini et al. Metadata quality assessment tool for open access cultural heritage institutional repositories
Helming et al. Automatic assignment of work items
Sandhu et al. A survey on Software Reusability
Li Data quality and data cleaning in database applications
M Alsmadi et al. Evaluation of cost estimation metrics: Towards a unified terminology
Hinrichs et al. An ISO 9001: 2000 Compliant Quality Management System for Data Integration in Data Warehouse Systems.
Ye et al. An open data cleaning framework based on semantic rules for Continuous Auditing
Nicoletti et al. Towards software architecture documents matching stakeholders’ interests
Sethi et al. Information system and system development life cycle
Helming et al. Semi-automatic Assignment of Work Items.
CN116308158B (en) National asset supervision and management system
Kanchymalay et al. The Extent of ERP Customization towards User Satisfaction in Daily Operation for Manufacturing Companies.
Munawar Extract Transform Loading (ETL) Based Data Quality for Data Warehouse Development
Vianna Ferreira et al. Traceability between function point and source code
CN117370110A (en) Health evaluation method and device for large host system environment and electronic equipment

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