CN111367530B - Code auditing method, terminal and server based on custom auditing rules - Google Patents

Code auditing method, terminal and server based on custom auditing rules Download PDF

Info

Publication number
CN111367530B
CN111367530B CN202010147051.2A CN202010147051A CN111367530B CN 111367530 B CN111367530 B CN 111367530B CN 202010147051 A CN202010147051 A CN 202010147051A CN 111367530 B CN111367530 B CN 111367530B
Authority
CN
China
Prior art keywords
code
audit
auditing
annotation information
information
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
CN202010147051.2A
Other languages
Chinese (zh)
Other versions
CN111367530A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010147051.2A priority Critical patent/CN111367530B/en
Publication of CN111367530A publication Critical patent/CN111367530A/en
Application granted granted Critical
Publication of CN111367530B publication Critical patent/CN111367530B/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

Landscapes

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

Abstract

The application provides a code auditing method, a terminal and a server based on a custom auditing rule, wherein the method comprises the following steps: obtaining submitted annotation information according to preset auditing rules and attribute information of codes to be audited; the method and the device for verifying the code can automatically identify different types of the code based on verification rules configured by a user, adapt to verification of the different types of the code and improve flexibility of code verification.

Description

Code auditing method, terminal and server based on custom auditing rules
Technical Field
The present application relates to the field of code auditing technologies, and in particular, to a code auditing method, terminal and server based on a custom auditing rule.
Background
With the growing interest and practice of IT internet enterprises in developing operational integration (DevOps), how to continuously improve software quality while rapidly achieving value delivery is also a problem that must be faced by people. The internal quality of the software determines the external quality of the software, and code auditing is a main measure for improving the internal quality of the software.
In order to improve the auditing efficiency, an auditing server is generally adopted at present to automatically audit the codes, and the codes can be put into storage only after being audited. Through code auditing, problems can be found early, the problem codes are prevented from being put in storage, the problem of the internal quality of the codes can be effectively solved, and the method is used in a plurality of Internet enterprises at present. However, due to the forced auditing mechanism of the auditing server, certain limitation is brought, the auditing server can store the files only by manual auditing treatment under the condition that exceptional personnel submit or exceptional files, so that more manpower and time cost are required to be input for identification and auditing, and if the auditing files are too many or are not audited timely, the development rhythm is often influenced. Meanwhile, the shortage of auditing time also easily causes the problems of auditing flow in a form and poor auditing effect.
Disclosure of Invention
The application aims to provide a code auditing method based on a custom auditing rule, which automatically identifies different types of codes based on the auditing rule configured by a user, adapts to auditing of different types of codes and improves the flexibility of code auditing. Another object of the present application is to provide a terminal. It is a further object of the present application to provide a server.
In order to achieve the above purpose, the present application discloses a code auditing method based on custom auditing rules, comprising:
obtaining submitted annotation information according to preset auditing rules and attribute information of codes to be audited;
and sending the code to be checked and the submitted annotation information to a server so that the server can check the code to be checked according to the submitted annotation information.
Preferably, before obtaining the submitted annotation information according to the preset auditing rule and the attribute information of the code to be audited, the method further comprises the steps of:
determining an audit category and an audit range according to audit instructions of a user, wherein the audit category comprises at least one of enabling audit, forced audit and priority audit, and the audit range comprises at least one of a personnel range, a program range and a stage range;
and obtaining the auditing rule according to the auditing type and the auditing range.
Preferably, the obtaining the submitted annotation information according to the preset auditing rule and the attribute information of the code to be audited specifically includes:
determining a corresponding code auditing model according to a preset auditing rule;
matching the attribute information of the code to be checked with the code checking model to obtain a matching result;
and obtaining submitted annotation information according to the matching result.
The application also discloses a code auditing method based on the custom auditing rule, which comprises the following steps:
receiving a code to be checked and submitted annotation information transmitted by a terminal, wherein the submitted annotation information is attribute information of the code to be checked according to a preset checking rule;
and auditing the code to be audited according to the submitted annotation information.
Preferably, the auditing processing of the code to be audited according to the submitted annotation information specifically includes:
determining whether to audit according to the submitted annotation information;
if yes, determining a designated auditor according to the submitted annotation information, determining auditor information of the designated auditor according to preset auditor information, and transmitting the code to be audited to the designated auditor according to the auditor information so that the designated auditor can audit the code to be audited;
and if not, storing the code to be checked into a version library.
The application also discloses a terminal, which comprises:
the rule analysis module is used for obtaining submitted annotation information according to preset auditing rules and attribute information of the codes to be audited;
and the information sending module is used for sending the code to be checked and the submitted annotation information to a server so that the server can check the code to be checked according to the submitted annotation information.
Preferably, the method further comprises an audit rule definition module, wherein the audit rule definition module is used for determining audit types and audit ranges according to audit instructions of users before submitting annotation information according to preset audit rules and attribute information of codes to be audited, the audit types comprise at least one of enabling audit, forced audit and priority audit, the audit ranges comprise at least one of personnel ranges, program ranges and stage ranges, and the audit rules are obtained according to the audit types and audit ranges.
Preferably, the rule parsing module specifically includes:
the auditing module determining module is used for determining a corresponding code auditing model according to preset auditing rules;
the auditing module matching module is used for matching the attribute information of the code to be audited with the code auditing model to obtain a matching result;
and the annotation information determining module is used for obtaining submitted annotation information according to the matching result.
The application also discloses a server, which comprises:
the information receiving module is used for receiving the to-be-checked code and submitted annotation information transmitted by the terminal, wherein the submitted annotation information is according to preset checking rules and attribute information of the to-be-checked code;
and the code auditing module is used for auditing the code to be audited according to the submitted annotation information.
Preferably, the code auditing module is specifically configured to determine whether to audit according to the submitted annotation information, if yes, determine a designated auditor according to the submitted annotation information, determine auditor information of the designated auditor according to preset auditor information, send the code to be audited to the designated auditor according to the auditor information so that the designated auditor can audit the code to be audited, and if not, store the code to be audited to a version library.
The application also discloses a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the method as described above when executing said program.
The application also discloses a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as described above.
The method obtains submitted annotation information according to the preset auditing rule and the attribute information of the code to be audited, and sends the submitted annotation information and the code to be audited to a server. The server can determine the auditing strategy of the code to be audited according to the submitted annotation information, so that different auditing modes are adopted for the code to be audited with different attribute information. The application can configure the auditing rules according to the requirements and obtain the corresponding submitted annotation information, thereby solving the problems of forced auditing by the code auditing server and solidifying the auditing mechanism, being capable of auditing the code more pertinently and ensuring the timeliness and accuracy of the code auditing.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of one embodiment of a method for code auditing based on custom auditing rules according to the present application;
FIG. 2 is a flow chart diagram illustrating a second embodiment of a code auditing method based on custom auditing rules in accordance with the present application;
FIG. 3 illustrates a third flowchart of one embodiment of a code auditing method based on custom auditing rules in accordance with the present application;
FIG. 4 is a flowchart showing a specific example of a code auditing method based on custom auditing rules according to the present application;
FIG. 5 illustrates a fourth flowchart of one embodiment of a code auditing method based on custom auditing rules, according to the present application;
FIG. 6 is a flow chart illustrating another specific example of a code auditing method based on custom auditing rules according to the present application;
FIG. 7 illustrates one of the flowcharts of another embodiment of a code audit method based on custom audit rules of the present application;
FIG. 8 is a second flowchart of another embodiment of a code auditing method based on custom auditing rules according to the present application;
FIG. 9 shows one of the block diagrams of one embodiment of a terminal of the present application;
FIG. 10 shows a second block diagram of one embodiment of a terminal of the present application;
FIG. 11 shows a third block diagram of one embodiment of a terminal of the present application;
FIG. 12 is a block diagram of one embodiment of a server of the present application;
fig. 13 shows a schematic diagram of a computer device suitable for use in implementing embodiments of the application.
Detailed Description
The following description of the embodiments of the present application 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 application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The existing code auditing server, such as a Gerrit auditing server, needs to send the code to be audited submitted each time to auditing personnel for forced auditing in the auditing process. The Gerrit is code examination software of free and open source codes, and can be arranged on a server to log in by using a webpage interface. Using a web browser, software programmers on the same team can review each other's modified program code to determine whether it can submit, return or continue modification. However, there may be an exception file or personnel submitting an exception in the existing submitted pending code. Under the condition of forced auditing, the server can also send the files submitted by exceptional personnel or exceptional to auditing personnel for manual auditing treatment before warehousing, so that more manpower and time cost are required to be input for identification and auditing, and the auditing strategy is not flexible enough. If the auditing files are too many or the auditing is not timely, the development rhythm is often influenced. Meanwhile, the shortage of auditing time also easily causes the problems of auditing flow in a form and poor auditing effect.
According to one aspect of the application, the embodiment discloses a code auditing method based on custom auditing rules. As shown in fig. 1, in this embodiment, the method includes:
s100: and obtaining submitted annotation information according to the preset auditing rules and the attribute information of the code to be audited. It should be noted that, the pending code is a pending code uploaded by a staff, and may include a simple code or other files submitted by exception.
S200: and sending the code to be checked and the submitted annotation information to a server so that the server can check the code to be checked according to the submitted annotation information.
The method obtains submitted annotation information according to the preset auditing rule and the attribute information of the code to be audited, and sends the submitted annotation information and the code to be audited to a server. The server can determine the auditing strategy of the code to be audited according to the submitted annotation information, so that different auditing modes are adopted for the code to be audited with different attribute information. The application can configure the auditing rules according to the requirements and obtain the corresponding submitted annotation information, thereby solving the problems of forced auditing by the code auditing server and solidifying the auditing mechanism, being capable of auditing the code more pertinently and ensuring the timeliness and accuracy of the code auditing.
In a preferred embodiment, as shown in fig. 2, before submitting the annotation information according to the preset auditing rules and the attribute information of the code to be audited, the method further comprises:
s010: an audit category and an audit scope are determined according to audit instructions of a user, wherein the audit category comprises at least one of enabling audit, mandatory audit and priority audit, and the audit scope comprises at least one of personnel scope, program scope and stage scope.
S020: and obtaining the auditing rule according to the auditing type and the auditing range.
In this embodiment, the audit rule may be manually configured and modified as required, and the user may set audit types and audit ranges in the audit rule by inputting audit instructions, and the audit rule formed according to the audit types and audit ranges is used as a division standard for determining whether different audit modes are adopted for the code to be audited. Finally, the audit rule formed by artificial setting can be used as a preset audit rule, and the file of the formed preset audit rule can be stored in the terminal for later use. In a specific example, the file content of the preset auditing rule may be expressed in XML format as follows:
<reviewgroup>true</reviewgroup>
<overlayreviewer>true</overlayreviewer>
<reviewdate>20190120</reviewdate>
<keycode>
<allowempty>false</allowempty>
< keycode reviewer > Zhang Sankeycode reviewer >
</keycode>。
As a preferred embodiment, the audit category includes at least one of enabling audit, mandatory audit, and priority audit. The enabling of the audit indicates whether a code audit function is enabled, each code submission enabling the audit of the version library triggers the present audit, and a default value true is generally adopted, namely, the enabling of the audit is indicated, and other values can be set and correspond to the stopping of the audit. For forced auditing, if the value of the forced auditing is true, all submissions must be audited to be formally combined into a version library; otherwise, if the value is not true, exception setting can be carried out on some personnel or files, and the values are automatically combined into the version library without auditing. For the priority audit, the audit sequence of different audit rules can be specified, for example, if the value of the priority audit is configured as true, different audit models are adopted for matching according to the sequence, otherwise, a plurality of audit models are matched in a combined mode.
As a preferred embodiment, the audit scope may include at least one of a personnel scope, a program scope, and a stage scope. The personnel scope means that the codes uploaded by personnel at different levels need to be subjected to different auditing modes, for example, the codes of new personnel just joining a team need to be audited, and the codes of responsible personnel of the team can not be audited. Program scope refers to the importance of the function and function of the code to be checked in the whole product, for example, the importance level of the non-core program is lower, and the checking is not needed. Stage scope refers to the audit necessity of the code to be audited for different stages, e.g., code prior to the test stage may be temporarily audited. In practical application, the auditing range and auditing types can be flexibly set according to practical requirements, and the application is not limited to the auditing range and auditing types.
In a preferred embodiment, as shown in fig. 3, the S100 may specifically include:
s110: and determining a corresponding code audit model according to a preset audit rule.
S120: and matching the attribute information of the code to be checked with the code checking model to obtain a matching result.
S130: and obtaining submitted annotation information according to the matching result. Preferably, the submitted annotation information can be used for marking whether the code to be checked needs forced checking, if so, a designated auditor can be determined according to a preset auditor list, and the designated auditor is added into the submitted annotation information and sent to the server together, so that the server transmits the code to be checked to the designated auditor for checking.
And obtaining a code audit model corresponding to each audit category and audit range in the audit rule according to the audit category and audit range in the preset audit rule. And matching the submitted code to be checked through a code checking model to obtain a matching result. The attribute information of the code to be checked may include information such as program name information set in the code to be checked and information of a submitter submitting the code to be checked, or may include information of other positions in the code to be checked, and in practical application, the attribute information is set according to needs, which is not limited in the present application.
The code auditing model can match attribute information, submitted annotation information is obtained according to the matching result, for example, when a rule of a personnel scope is set in an auditing rule set by people, after the submitted code to be audited is received, the code auditing model corresponding to the personnel scope is called, the attribute information of the code to be audited is matched according to the personnel scope in the auditing rule, and the matching result of whether personnel submitting the code need forced auditing or not can be obtained. The code audit model corresponding to the audit category and the audit range in the audit rule can be preset by a person skilled in the art according to the function of the code audit model, and the embodiment is not described herein again. After all the corresponding code audit models are called according to the artificially set audit rules to respectively match the attribute information of the submitted code to be audited to obtain a matching result, corresponding submitted annotation information is formed according to the matching result, and the server can determine that the submitted code to be audited does not need forced audit by analyzing the submitted annotation information, so that labor consumption is avoided, and code audit efficiency is improved.
In a specific example, once the local code to be audited is submitted, pre-stored audit rules are automatically analyzed, attribute information of the code to be audited can include presenter information and program name information by comparison, and submitted annotation information is obtained by automatically adapting a code audit model. As shown in fig. 4, the specific steps include:
step S21: and locally submitting the code to be audited by the user to trigger audit model matching of the code to be audited.
Step S22: and checking whether the code to be checked submitted at this time contains a core program, namely a matching program range.
Step S23: if step S22 is otherwise, it is checked whether the submitting user is a white list person, i.e. a matching person range.
Step S24: if steps S22 and S23 are no, it is checked whether the commit time is before the start of the test phase, i.e. matches the phase range.
Step S25: if steps S22, S23 and S24 are all otherwise check if a forced audit is required.
Step S26: if steps S22, S23, S24 and S25 are all NO, then "review: the none "key is added to the submit annotation information.
Step S27: if any one of the steps S22, S23, S24 and S25 checks as yes, then "reviewer" is generated: a specific reviewer "is added to the submitted annotation information.
In a preferred embodiment, as shown in fig. 5, the auditing processing of the code to be audited by the server in S200 according to the submitted annotation information specifically includes:
s210: and determining whether to audit according to the submitted annotation information.
S220: if yes, determining a designated auditor according to the submitted annotation information, determining auditor information of the designated auditor according to preset auditor information, and sending the code to be audited to the designated auditor according to the auditor information so that the designated auditor can audit the code to be audited.
S230: and if not, storing the code to be checked into a version library.
It should be noted that, in this embodiment, the server may be used as an audit server to form a policy analysis module based on the Gerrit technology, so as to provide an in-process code audit mechanism. Therefore, the method and the device can solve the problems that the existing Gerrit auditing server forcedly audits the code to be audited submitted each time and the auditing strategy is not flexible enough.
In a specific example, as shown in fig. 6, the specific steps of performing an audit process on the code to be audited according to the submitted annotation information include:
step S31: the user pushes the code to be audited and submits annotation information to a remote audit server to trigger the audit process to start.
Step S32: the submitted annotation information is read and parsed.
Step S33: check that "review" exists in the submitted annotation information: none "keyword.
Step S34: the code is automatically incorporated into the version store without forced auditing.
Step S35: the check submitted notes have "review: a particular auditor.
Step S36: the specific auditors submitting the comments are parsed and added to the Gerrit auditor list, and then a mail is sent to the auditor to handle the code audit.
The application supports the selective configuration of code auditing rules according to the requirements of application codes, supports the auditing types of mandatory auditing and non-mandatory auditing, and adopts an automatic identification mode when the codes are submitted to model and adapt to various auditing requirements. Meanwhile, by introducing the auditing priority policy, a certain type of auditing model can be matched according to the configured sequence, and a plurality of auditing models can be matched in a free combination mode, so that the flexibility of the code auditing policy is greatly improved.
Based on the same principle, the embodiment also discloses a code auditing method based on the custom auditing rule. As shown in fig. 7, the method includes:
s300: and receiving the code to be checked and the submitted annotation information transmitted by the terminal, wherein the submitted annotation information is according to preset checking rules and attribute information of the code to be checked.
S400: and auditing the code to be audited according to the submitted annotation information.
In a preferred embodiment, as shown in fig. 8, the S400 may specifically include:
s410: and determining whether to audit according to the submitted annotation information.
S420: if yes, determining a designated auditor according to the submitted annotation information, determining auditor information of the designated auditor according to preset auditor information, and sending the code to be audited to the designated auditor according to the auditor information so that the designated auditor can audit the code to be audited.
S430: and if not, storing the code to be checked into a version library.
Since the principle of solving the problem by the method is similar to that of the above method, the implementation of the method can be referred to the implementation of the method, and the description is omitted herein.
The application also discloses a terminal. As shown in fig. 9, the terminal includes a rule parsing module 11 and an information transmitting module 12.
The rule analysis module 11 is configured to obtain submitted annotation information according to a preset auditing rule and attribute information of a code to be audited.
The information sending module 12 is configured to send the pending code and the submitted annotation information to a server, so that the server performs an audit process on the pending code according to the submitted annotation information.
In a preferred embodiment, as shown in FIG. 10, an audit rule definition module 10 is further included. The audit rule definition module 10 is configured to determine, according to audit instructions of a user, an audit category and an audit scope before submitting annotation information according to preset audit rules and attribute information of a code to be audited, where the audit category includes at least one of enabling audit, mandatory audit and priority audit, and the audit scope includes at least one of a personnel scope, a program scope and a stage scope, and obtain audit rules according to the audit category and the audit scope.
In a preferred embodiment, as shown in fig. 11, the rule parsing module 11 specifically includes an auditing module determining module 111, an auditing module matching module 112, and an annotation information determining module 113.
The auditing module determining module 111 is configured to determine a corresponding code auditing model according to a preset auditing rule.
The auditing module matching module 112 is configured to obtain a matching result according to the attribute information of the code to be audited and the code auditing model.
The annotation information determining module 113 is configured to obtain submitted annotation information according to the matching result.
Since the principle of the terminal for solving the problem is similar to that of the above method, the implementation of the terminal can refer to the implementation of the method, and will not be described herein.
The application also discloses a server. As shown in fig. 12, the server includes an information receiving module 21 and a code auditing module 22.
The information receiving module 21 is configured to receive a code to be checked and submitted annotation information transmitted by a terminal, where the submitted annotation information is according to a preset checking rule and attribute information of the code to be checked.
The code auditing module 22 is used for auditing the code to be audited according to the submitted annotation information.
In a preferred embodiment, the code auditing module 22 is specifically configured to determine whether to audit according to the submitted annotation information, if yes, determine a designated auditor according to the submitted annotation information, determine auditor information of the designated auditor according to preset auditor information, send the code to be audited to the designated auditor according to the auditor information, so that the designated auditor audits the code to be audited, and if not, store the code to be audited to a version library.
Since the principle of solving the problem by the server is similar to that of the above method, the implementation of the server can be referred to the implementation of the method, and will not be described herein.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example, the computer apparatus includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement a method performed by a client as described above, or where the processor executes the program to implement a method performed by a server as described above.
Referring now to FIG. 13, there is illustrated a schematic diagram of a computer device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 13, the computer apparatus 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data required for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback device (LCD), and the like, and a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on drive 610 as needed, so that a computer program read therefrom is mounted as needed as storage section 608.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that 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.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (8)

1. A code auditing method based on a custom auditing rule is characterized by comprising the following steps:
obtaining submitted annotation information according to preset auditing rules and attribute information of codes to be audited;
transmitting the code to be checked and the submitted annotation information to a server so that the server carries out checking processing on the code to be checked according to the submitted annotation information;
the method further comprises the step of obtaining submitted annotation information according to preset auditing rules and attribute information of the code to be audited, and then:
determining an audit category and an audit range according to audit instructions of a user, wherein the audit category comprises at least one of enabling audit, forced audit and priority audit, and the audit range comprises at least one of a personnel range, a program range and a stage range;
obtaining an audit rule according to the audit type and the audit range;
the obtaining the submitted annotation information according to the preset auditing rule and the attribute information of the code to be audited specifically comprises the following steps:
determining a corresponding code auditing model according to a preset auditing rule;
matching the attribute information of the code to be checked with the code checking model to obtain a matching result;
and obtaining submitted annotation information according to the matching result.
2. A code auditing method based on a custom auditing rule is characterized by comprising the following steps:
receiving a code to be checked and submitted annotation information transmitted by a terminal, wherein the submitted annotation information is obtained according to a preset checking rule and attribute information of the code to be checked, and the submitted annotation information is obtained through the following steps: determining a corresponding code auditing model according to a preset auditing rule; matching the attribute information of the code to be checked with the code checking model to obtain a matching result; obtaining submitted annotation information according to the matching result; the audit rule includes audit categories including at least one of enabling audit, mandatory audit, and priority audit, and audit ranges including at least one of personnel range, program range, and phase range;
and auditing the code to be audited according to the submitted annotation information.
3. The method for auditing codes based on custom auditing rules according to claim 2, characterized in that the auditing processing of the code to be audited according to the submitted annotation information specifically includes:
determining whether to audit according to the submitted annotation information;
if yes, determining a designated auditor according to the submitted annotation information, determining auditor information of the designated auditor according to preset auditor information, and transmitting the code to be audited to the designated auditor according to the auditor information so that the designated auditor can audit the code to be audited;
and if not, storing the code to be checked into a version library.
4. A terminal, comprising:
the rule analysis module is used for obtaining submitted annotation information according to preset auditing rules and attribute information of the codes to be audited;
the information sending module is used for sending the code to be checked and the submitted annotation information to a server so that the server can check the code to be checked according to the submitted annotation information;
the system further comprises an audit rule definition module, a verification module and a verification module, wherein the audit rule definition module is used for determining audit types and audit ranges according to audit instructions of users before submitting annotation information according to preset audit rules and attribute information of codes to be audited, the audit types comprise at least one of enabling audit, forced audit and priority audit, the audit ranges comprise at least one of personnel ranges, program ranges and stage ranges, and audit rules are obtained according to the audit types and audit ranges;
the rule analysis module specifically comprises:
the auditing module determining module is used for determining a corresponding code auditing model according to preset auditing rules;
the auditing module matching module is used for matching the attribute information of the code to be audited with the code auditing model to obtain a matching result;
and the annotation information determining module is used for obtaining submitted annotation information according to the matching result.
5. A server, comprising:
the information receiving module is used for receiving the to-be-checked code and submitted annotation information transmitted by the terminal, wherein the submitted annotation information is obtained according to a preset checking rule and attribute information of the to-be-checked code, and the submitted annotation information is obtained through the following steps: determining a corresponding code auditing model according to a preset auditing rule; matching the attribute information of the code to be checked with the code checking model to obtain a matching result; obtaining submitted annotation information according to the matching result; the audit rule includes audit categories including at least one of enabling audit, mandatory audit, and priority audit, and audit ranges including at least one of personnel range, program range, and phase range;
and the code auditing module is used for auditing the code to be audited according to the submitted annotation information.
6. The server of claim 5, wherein the code auditing module is specifically configured to determine whether to audit according to the submitted annotation information, if yes, determine a designated auditor according to the submitted annotation information, determine auditor information of the designated auditor according to preset auditor information, send the code to be audited to the designated auditor according to the auditor information so that the designated auditor audits the code to be audited, and if not, store the code to be audited to a version library.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
the processor implementing the method according to any of claims 1-3 when executing the program.
8. A computer readable medium having a computer program stored thereon, characterized in that,
the program, when executed by a processor, implements a method as claimed in any one of claims 1-3.
CN202010147051.2A 2020-03-05 2020-03-05 Code auditing method, terminal and server based on custom auditing rules Active CN111367530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010147051.2A CN111367530B (en) 2020-03-05 2020-03-05 Code auditing method, terminal and server based on custom auditing rules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010147051.2A CN111367530B (en) 2020-03-05 2020-03-05 Code auditing method, terminal and server based on custom auditing rules

Publications (2)

Publication Number Publication Date
CN111367530A CN111367530A (en) 2020-07-03
CN111367530B true CN111367530B (en) 2023-09-15

Family

ID=71208572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010147051.2A Active CN111367530B (en) 2020-03-05 2020-03-05 Code auditing method, terminal and server based on custom auditing rules

Country Status (1)

Country Link
CN (1) CN111367530B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988811B (en) * 2021-03-09 2023-06-06 重庆可兰达科技有限公司 Method, system, terminal and medium for detecting APP advertisement content compliance
CN113256257A (en) * 2021-05-28 2021-08-13 北京瑞卓喜投科技发展有限公司 Transaction signing method and device based on block chain and electronic equipment
CN113553060B (en) * 2021-07-30 2023-10-20 康键信息技术(深圳)有限公司 Code processing method, device, equipment and storage medium
CN115330337B (en) * 2022-08-04 2024-01-02 北京百度网讯科技有限公司 Data content processing method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122391A (en) * 2017-03-06 2017-09-01 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of code person approving based on historical record recommends method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9201646B2 (en) * 2013-01-05 2015-12-01 Vmware, Inc. Automatic code review and code reviewer recommendation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122391A (en) * 2017-03-06 2017-09-01 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of code person approving based on historical record recommends method

Also Published As

Publication number Publication date
CN111367530A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111367530B (en) Code auditing method, terminal and server based on custom auditing rules
CN110018955B (en) Generating automated test scripts by transforming manual test cases
US10318412B1 (en) Systems, methods, and apparatus for dynamic software generation and testing
US10984483B2 (en) Cognitive regulatory compliance automation of blockchain transactions
CN104391934B (en) Data verification method and device
WO2019100576A1 (en) Automated test management method and apparatus, terminal device, and storage medium
US11263108B2 (en) Device for testing blockchain network
CN110837356B (en) Data processing method and device
CN113268336B (en) Service acquisition method, device, equipment and readable medium
WO2020143313A1 (en) Code modification method and apparatus, computer-readable medium and electronic device
CN109299913B (en) Employee salary scheme generation method and device
TW202418102A (en) System and method for a thing machine to perform models
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN112990281A (en) Abnormal bid identification model training method, abnormal bid identification method and abnormal bid identification device
CN115577691A (en) Bidding generation method, storage medium and electronic device
CN114118047A (en) Report generation method, device, equipment and computer storage medium
CN117540803A (en) Decision engine configuration method and device based on large model, electronic equipment and medium
CN114219596B (en) Data processing method and related equipment based on decision tree model
CN112988576B (en) Method and device for determining development process of software project
CN115511644A (en) Processing method for target policy, electronic device and readable storage medium
CN114968821A (en) Test data generation method and device based on reinforcement learning
CN111159988B (en) Model processing method, device, computer equipment and storage medium
CN109447806B (en) Front-end control method and device, storage medium and electronic equipment
CN113419877B (en) Implementation method and device of decision service interface, electronic equipment and storage medium
CN113742243B (en) Application evaluation method, device, electronic equipment and computer readable medium

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