CN113791818A - Code improvement method, device, medium and equipment based on measurement platform - Google Patents

Code improvement method, device, medium and equipment based on measurement platform Download PDF

Info

Publication number
CN113791818A
CN113791818A CN202111082546.2A CN202111082546A CN113791818A CN 113791818 A CN113791818 A CN 113791818A CN 202111082546 A CN202111082546 A CN 202111082546A CN 113791818 A CN113791818 A CN 113791818A
Authority
CN
China
Prior art keywords
code
improvement
item
scanning
pipeline
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
CN202111082546.2A
Other languages
Chinese (zh)
Other versions
CN113791818B (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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111082546.2A priority Critical patent/CN113791818B/en
Publication of CN113791818A publication Critical patent/CN113791818A/en
Application granted granted Critical
Publication of CN113791818B publication Critical patent/CN113791818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The embodiment of the application discloses a code improvement method, a device, a medium and equipment based on a measurement platform. Wherein, the method comprises the following steps: after the code pipeline runs, scanning the code to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning; pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule; the pipeline is re-run to scan the pre-refined code. According to the technical scheme, the code improvement item can be automatically corrected, the correction error rate of the code improvement item is reduced, targeted help is provided for a code administrator, and agile development and rapid delivery are further realized.

Description

Code improvement method, device, medium and equipment based on measurement platform
Technical Field
The embodiment of the application relates to the technical field of software, in particular to a code improvement method, a code improvement device, a code improvement medium and code improvement equipment based on a measurement platform.
Background
With the continuous popularization and successful application of DevOps in the internet industry, the concept of rapid delivery has gradually become an industry hotspot. DevOps integrates cultural ideas, practices and tools, can improve the ability of organizations to deliver applications and services at high speed, and can help organizations develop and improve products faster than using traditional software development and infrastructure management processes. This speed enables organizations to better serve their users and to more efficiently compete in the marketplace.
In the prior art, a feedback correction mechanism of the DevOps platform is to feed back code management personnel when a pipeline runs and the expected indexes are not met, and the code management personnel manually modifies the code and starts re-detection.
The prior art scheme easily causes frequent modification, submission and operation of codes, and further influences the progress of software development. Meanwhile, the pipeline is often blocked due to code modification, and the concept of fast delivery and agile development of DevOps cannot be really embodied.
Disclosure of Invention
The embodiment of the application provides a code improvement method, a device, a medium and equipment based on a measurement platform, which can reduce the correction error rate of a code improvement item by automatically correcting the code improvement item and provide targeted help for a code administrator, thereby realizing real agile development and rapid delivery.
In a first aspect, an embodiment of the present application provides a method for improving code based on a measurement platform, where the method includes:
after the code pipeline runs, scanning the code to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
the pipeline is re-run to scan the pre-refined code.
In a second aspect, an embodiment of the present application provides a code improvement apparatus based on a measurement platform, where the apparatus includes:
the code improvement item generation module is used for scanning the code after the code pipeline runs to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
the code improvement item pre-improvement module is used for pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
and the code scanning module is used for rerunning the pipeline so as to scan the pre-improved code.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for improving code based on a metrology platform according to embodiments of the present application.
In a fourth aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for improving code based on a metrology platform according to the present application.
According to the technical scheme provided by the embodiment of the application, after the code pipeline runs, the code is scanned to obtain the code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning; pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule; the pipeline is re-run to scan the pre-refined code. The technical scheme can automatically correct the code improvement item, reduces the error rate of correcting the code improvement item, and provides targeted help for a code administrator, thereby realizing real agile development and rapid delivery.
Drawings
FIG. 1 is a flowchart of a method for improving code based on a measurement platform according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for improving code based on a metrology platform according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a code improvement apparatus based on a measurement platform according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for improving code based on a metrology platform according to an embodiment of the present application, where the present embodiment is applicable to any scenario for improving code based on a metrology platform, and the method may be performed by an apparatus for improving code based on a metrology platform, which may be implemented by software and/or hardware, and may be integrated in an electronic device.
As shown in fig. 1, the method for improving code based on a measurement platform includes:
s110, after the code pipeline runs, scanning the code to obtain a code improvement item with an error; the scanning mode comprises a test scanning mode or a running scanning mode.
The scheme can be executed by a measurement platform, the measurement platform can provide tools or environment support for complete enterprise application from development to running, management and monitoring, and the measurement platform can comprise modules such as a development framework, a permission system, governance and monitoring, a workflow, an intelligent window, a self-defined report, portal customization, an integration platform and the like. The code pipeline may run on a metrology platform, and may be a CI (Continuous Integration) pipeline or a CD (Continuous Delivery) pipeline. The software life cycle can be roughly divided into four stages of design, development, test and deployment, and more specifically, can be divided into stages of planning, code, construction, test, release, deployment, maintenance and the like. The continuous integration may be a process of building software and completing initial software testing, and the continuous delivery may be a process of deploying software to an infrastructure.
After the code pipeline runs, the measurement platform can scan the code, wherein the scanning mode comprises a test scanning mode or a running scanning mode. It should be noted that the scanning is not limited to the scanning of the code pipeline, i.e. to the scanning of the stage before software release, but may also involve the scanning of the deployment and maintenance stages. After scanning, the metrology platform may get the wrong code improvement item. The code improvement item can be a code line needing improvement, can also be a code segment needing improvement, and can also adaptively divide a code range needing improvement. The error may be a syntax error, a logic error, or a run result error. The code improvement item can be one item or a plurality of items.
In this embodiment, optionally, the test scanning includes error scanning of the code in a pipeline test process and in a non-running state of the code;
the run scan includes an error scan of the code during the running of the online environment.
The test scan may include a static source code scan, i.e., a scan of the code in a non-running state, and the static source code scan may be a scan of the source code directly without being compiled by a compiler. Static source code scanning can find semantic defects, security holes and the like in the code. The static source code scanning mode can save a large amount of manpower and time cost, improve development efficiency, can discover many security holes which cannot be discovered by manpower, greatly reduce security risks in codes and improve software quality.
The test scan may also include an error scan, i.e., a dynamic scan, during pipeline testing. The dynamic scanning can check the difference between the code operation result and an expected result, and analyze the performance of operation efficiency, correctness, robustness and the like.
After the software is released, the metrology platform can also scan the code during the running of the online environment. The problem feedback of the software in the actual use process can be obtained through the operation scanning, and a new idea is provided for updating and upgrading the software.
In the scheme, the scanning of the code is not only stopped at the testing stage, but also integrated with a plurality of stages in the software life cycle, and the code is scanned in an all-round full life cycle. Therefore, the scheme can continuously improve the correctness, the robustness and the operating efficiency of the code, avoid safety risks and improve the software quality.
And S120, pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule.
The improvement rules can be preset in the measurement platform, and the preset improvement rules can comprise improvement rules of regular code errors, for example, the regular code errors can comprise naming errors, format errors, data type errors and the like. The preset improvement rules can also comprise special improvement rules set by a code administrator according to a code scene. After obtaining the code improvement item, the measurement platform may match the code improvement item with a preset improvement rule, and pre-improve the code improvement item according to a matching result. It should be noted that one code improvement item may be matched to one preset improvement rule, or may be matched to multiple preset improvement rules. When a code improvement item is matched with a plurality of preset improvement rules, the measurement platform can prioritize the plurality of preset improvement rules, and finally determine an improvement mode according to a rerun result or selection of a code administrator. The priority order can be randomly set by a computer, can be set according to the coding experience of a code administrator, and can be set according to the frequency matched in the code by a preset improvement rule.
In this scheme, optionally, after performing pre-refinement on the code improvement item, the method further includes:
sending the pre-improvement information to a code administrator; wherein the pre-improvement information comprises an improved result and a code comparison before and after improvement.
After the code improvement item is pre-improved, the measurement platform may send pre-improvement information to a code administrator in order to further ensure the reliability of the code operation. The code administrator may include any person involved in code improvement, and may include, for example, software developers, software testers, software operation and maintenance personnel, and the like. The pre-improvement information may include a code improvement item, a brief description of the code improvement item, and a preset improvement rule matched thereto. Most importantly, the pre-improvement information may also include improved results and improved pre-and post-code comparisons.
According to the scheme, the code administrator can be informed of the pre-improvement information in a clear form, so that the code administrator can make professional judgment on the pre-improvement of the code in time, and the accuracy of the code improvement and the reliability of operation are further ensured. Meanwhile, the pre-improvement information comprises the improved result and the code comparison before and after the improvement, so that the accurate logic judgment is made for the repeated code improvement by the measurement platform and the code administrator, and the code improvement is fast.
On the basis of the above embodiment, optionally, after sending the pre-improvement information to the code administrator, the method further includes:
collecting feedback opinions of the code administrator on the pre-improvement information;
and if the statistic result of the improvement cancellation in the feedback opinions of the type of the current code improvement item reaches a set threshold, removing the preset improvement rule of the type of the current code improvement item.
After receiving the pre-improvement information, the code administrator can judge the pre-improvement of the code and make feedback. The feedback may include accepting pre-improvement, rejecting pre-improvement, and proposing other improvements, etc. The measurement platform can collect feedback of code managers on the pre-improvement information and take the improvement mode determined by the code managers as a final code improvement scheme.
It should be noted that, if the code administrator does not timely make a feedback on the pre-improvement information, the measurement platform may re-run the pipeline after the code is pre-improved according to the pre-set re-running rule. The preset re-running rule can be that the pipeline is directly re-run after the code is pre-improved, and the re-running state is reported to the code administrator in real time, so that when the code administrator is in a working state, the pipeline running state is known in time and corresponding operation is performed. The preset re-running rule can also be that timing is started after the code is pre-improved, and if the code administrator does not make feedback in a preset time limit, the pipeline is re-run; if the code administrator makes a feedback comment within a predetermined time limit, a determination is made as to whether to re-run the pipeline as instructed by the code administrator.
In the scheme, a code administrator can know the code improvement condition and the pipeline running condition in time, meanwhile, the code can be corrected automatically, the pipeline can be restarted automatically, the workload of the code administrator can be reduced, the delivery cycle of the software is shortened, and agile development and rapid delivery of the software are realized.
In a possible embodiment, optionally, the method further includes:
the method includes responding to a code administrator to create a request of a preset improvement rule of a code improvement item to generate the preset improvement rule for improving the code improvement item.
If the code administrator finds a new preset improvement rule in the working process, the code administrator can newly build the preset improvement rule for the code improvement item through the measurement platform. The metrics platform may respond to a code administrator's create request and generate preset improvement rules that improve code improvement items.
In the scheme, a code administrator can continuously enrich the preset improvement rules of the measurement platform, so that the code is more and more improved by the measurement platform, the self-correction function of the measurement platform on the code is perfected, and the code improvement accuracy is ensured.
And S130, the pipeline is re-run to scan the pre-improved code.
After the code is pre-improved, the measurement platform can timely rerun the pipeline so as to scan the pre-improved code again. If the scanning is in error, jumping to S110 to continue correcting the code until the pipeline scanning is error-free.
According to the technical scheme provided by the embodiment of the application, after the code pipeline runs, the code is scanned to obtain the code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning; pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule; the pipeline is re-run to scan the pre-refined code. The technical scheme can automatically correct the code improvement item, reduces the error rate of correcting the code improvement item, and provides targeted help for a code administrator, thereby realizing real agile development and rapid delivery.
Example two
Fig. 2 is a flowchart of a code improvement method based on a metrology platform according to a second embodiment of the present invention, which is optimized based on the above-described embodiment.
As shown in fig. 2, the method of this embodiment specifically includes the following steps:
s210, after the code pipeline runs, scanning the code to obtain a code improvement item with an error; the scanning mode comprises a test scanning mode or a running scanning mode.
S220, according to the matching result of the code improvement item and a preset improvement rule, the code improvement item is pre-improved.
And S230, the pipeline is re-run.
S240, acquiring the processing time length of the code improvement item with the error.
After the pipeline is replayed, the measurement platform can acquire the processing time of the code improvement item with the error. The processing duration may be determined by the code improvement item to begin and the code improvement item to end. The processing time length can also be determined by the code improvement item to start and end the pipeline rerun. The processing time may be obtained by triggering timing from a recording start point to a recording end point, and ending the timing at the recording end point. The processing time may also be obtained by reading an operation log of a code pipeline in the measurement platform and calculating the processing time.
And S250, if the processing time length reaches the set error processing time length threshold, generating alarm information for processing overtime.
In order to monitor the improvement condition of the code improvement item in real time, the measurement platform can set an error processing time length threshold value. When the processing time length is detected to reach the set error processing time length threshold value, the code improvement item may not be matched with the preset improvement rule, and automatic correction cannot be carried out. At this time, the measurement platform may generate an alarm message to process timeout, and notify the code administrator to process the error code in time.
According to the scheme, when the code improvement item is not effectively processed for a long time, the alarm can be given in time to inform a code manager of the coming processing. The scheme can still be processed in time under the condition that the code improvement item is extremely special, and the reliability of code correction is ensured.
In this embodiment, optionally, the method further includes:
obtaining at least one of a correct rate, an improved efficiency and an improved success rate of each code branch in the code pipeline;
and generating an operation and maintenance statistical result of each code branch, and sending the operation and maintenance statistical result to a code administrator.
The measurement platform can obtain performance evaluation indexes such as the accuracy, the improvement efficiency and the improvement success rate of each code branch in the code production line, and is used for evaluating the operation and maintenance condition of each code branch. The correctness can be used for evaluating the correctness of writing of each code branch, and the correctness can be calculated by the ratio of the number of error code lines to the number of all code lines. The improved efficiency and the improved success rate can be used for evaluating the improved performance of the measurement platform and the improved capability of each code branch responsible team. The measurement platform can distinguish the improvement of the code administrator and the improvement of the measurement platform, and respectively count, and simultaneously record the final improvement success mode of the code improvement item, wherein the final improvement success mode record can comprise an improvement mode source, an improvement time, an improvement mode, whether a matched preset improvement rule exists or not, and the like, and the improvement mode source can comprise a code administrator job number or a measurement platform number. The improvement efficiency can be further determined by indexes such as the improvement times and the improvement time.
And the measurement platform takes at least one of the performance evaluation indexes as an operation and maintenance statistical result of each code branch and sends the operation and maintenance statistical result to a code manager. The code administrator can perfect the measurement platform according to the operation and maintenance statistical result and can effectively manage each code branch responsible team.
The scheme is favorable for further perfecting the code correction function of the measurement platform, and is beneficial to the effective management of enterprises on code managers.
In a specific embodiment, in order to reduce pipeline blocking and realize agile development and rapid delivery, a code improvement method based on a measurement platform is provided. The scheme comprises the following steps:
(1) the measurement platform can pre-improve the scanned code improvement items according to the static code scanning rules, directly and automatically rerun the pipeline after pre-improvement, and continuously detect whether other code improvement items exist.
(2) After the software developer submits the code pipeline to automatically run, the measurement platform pre-improves the scanned code improvement items according to the preset improvement rules, directly and automatically runs the pipeline again after improvement, and continuously detects whether other code improvement items exist.
(3) After the improvement item is automatically corrected, the measurement platform continues to find a corresponding software developer based on the information in the code submission, and sends an automatic correction result and comparison before and after correction.
(4) Based on the generated scanning results of the metrology platform, the software developer receives an improvement suggestion based on composite data fed back by the metrology platform after the pipeline is automatically run, wherein the composite data may include, for example, BUG number, coverage, red light modification timeout alarm, and branch survival time.
(5) After the software project runs for a period of time, the software project management personnel can receive agile statistical data to carry out optimization and adjustment on project work. The agility-based statistical data may include development condition reports, test condition reports, operation and maintenance condition reports, and the like.
(6) And (4) the software developer confirms the automatic correction result and continues to develop if the automatic correction result is confirmed to be correct. When the automatic correction is wrong, a software developer needs to submit error information after using an automatic error code cancellation and manually correct again.
(7) And after receiving the error correction idea fed back manually, the measuring platform takes the error content into error statistics. After the statistics reaches a certain proportion, the improvements are removed or the preset improvement rules are automatically corrected, so that the code improvement accuracy is increased.
According to the technical scheme provided by the embodiment of the application, after the code pipeline runs, the code is scanned to obtain the code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning; pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule; the pipeline is operated again; acquiring the processing time of the code improvement item with the error; and if the processing time reaches a set error processing time threshold, generating alarm information for processing overtime. The technical scheme can automatically correct the code improvement item, reduces the error rate of correcting the code improvement item, and provides targeted help for a code administrator, thereby realizing real agile development and rapid delivery.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a code improvement apparatus based on a metrology platform according to a third embodiment of the present invention, where the apparatus is capable of executing a code improvement method based on a metrology platform according to any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 3, the apparatus may include:
the code improvement item generation module 310 is configured to scan a code after a code pipeline runs to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
a code improvement item pre-improvement module 320, configured to pre-improve the code improvement item according to a matching result of the code improvement item and a preset improvement rule;
and the code scanning module 330 is used for re-running the pipeline to scan the pre-improved code.
In this embodiment, optionally, the code improvement item pre-improvement module 320 is further configured to:
sending the pre-improvement information to a code administrator; wherein the pre-improvement information comprises an improved result and a code comparison before and after improvement.
On the basis of the foregoing embodiment, optionally, the code improvement item pre-improvement module 320 is further configured to:
collecting feedback opinions of the code administrator on the pre-improvement information;
and if the statistic result of the improvement cancellation in the feedback opinions of the type of the current code improvement item reaches a set threshold, removing the preset improvement rule of the type of the current code improvement item.
In a possible embodiment, optionally, the code scanning module 330 is further configured to:
acquiring the processing time of the code improvement item with the error;
and if the processing time reaches a set error processing time threshold, generating alarm information for processing overtime.
In this embodiment, optionally, the apparatus further includes:
the code branch performance acquisition module is used for acquiring at least one of the accuracy, the improvement efficiency and the improvement success rate of each code branch in the code pipeline;
and the operation and maintenance statistical result generation module is used for generating operation and maintenance statistical results of all the code branches and sending the operation and maintenance statistical results to a code administrator.
In this embodiment, optionally, the test scan includes error scan of the code during the pipeline test process and in the non-running state of the code;
the run scan includes an error scan of the code during the running of the online environment.
In another possible embodiment, optionally, the apparatus further comprises:
and the preset improvement rule generation module is used for responding to a code administrator creating request of the preset improvement rule of the code improvement item to generate the preset improvement rule for improving the code improvement item.
The product can execute the code improvement method based on the measurement platform provided by the embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Example four
A fourth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a code improvement method based on a metrology platform, as provided in all inventive embodiments of this application:
after the code pipeline runs, scanning the code to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
the pipeline is re-run to scan the pre-refined code.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
EXAMPLE five
The fifth embodiment of the application provides electronic equipment. Fig. 4 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application. As shown in fig. 4, the present embodiment provides an electronic device 400, which includes: one or more processors 420; the storage device 410 is used for storing one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the method for improving code based on a metrology platform provided by the embodiment of the application, the method includes:
after the code pipeline runs, scanning the code to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
the pipeline is re-run to scan the pre-refined code.
Of course, those skilled in the art will understand that the processor 420 also implements the technical solution of the metrology platform based code improvement method provided in any embodiment of the present application.
The electronic device 400 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of the processors 420 in the electronic device may be one or more, and one processor 420 is taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430, and the output device 440 in the electronic apparatus may be connected by a bus or other means, and are exemplified by a bus 450 in fig. 4.
The storage device 410 is a computer-readable storage medium for storing software programs, computer-executable programs, and module units, such as program instructions corresponding to the code improvement method based on a metrology platform in the embodiments of the present application.
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 410 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 410 may further include memory located remotely from processor 420, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numbers, character information, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. The output device 440 may include a display screen, speakers, or other electronic equipment.
The electronic equipment provided by the embodiment of the application can reduce the correction error rate of the code improvement item by automatically correcting the code improvement item, and provides targeted help for a code administrator, thereby realizing real agile development and rapid delivery.
The code improvement device, medium and electronic device based on the metrology platform provided in the above embodiments may execute the code improvement method based on the metrology platform provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments may be referred to a metrology platform based code improvement method provided in any of the embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for metrology platform based code improvement, the method comprising:
after the code pipeline runs, scanning the code to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
the pipeline is re-run to scan the pre-refined code.
2. The method of claim 1, wherein after pre-refining the code improvement item, the method further comprises:
sending the pre-improvement information to a code administrator; wherein the pre-improvement information comprises an improved result and a code comparison before and after improvement.
3. The method of claim 2, wherein after sending the pre-improvement information to the code administrator, the method further comprises:
collecting feedback opinions of the code administrator on the pre-improvement information;
and if the statistic result of the improvement cancellation in the feedback opinions of the type of the current code improvement item reaches a set threshold, removing the preset improvement rule of the type of the current code improvement item.
4. The method of claim 1, wherein after re-running the pipeline, the method further comprises:
acquiring the processing time of the code improvement item with the error;
and if the processing time reaches a set error processing time threshold, generating alarm information for processing overtime.
5. The method of claim 1, further comprising:
obtaining at least one of a correct rate, an improved efficiency and an improved success rate of each code branch in the code pipeline;
and generating an operation and maintenance statistical result of each code branch, and sending the operation and maintenance statistical result to a code administrator.
6. The method of claim 1, wherein the test scan comprises an error scan of the code during pipeline testing and while the code is in a non-operational state;
the run scan includes an error scan of the code during the running of the online environment.
7. The method of claim 1, further comprising:
the method includes responding to a code administrator to create a request of a preset improvement rule of a code improvement item to generate the preset improvement rule for improving the code improvement item.
8. An apparatus for metrology platform based code refinement, the apparatus comprising:
the code improvement item generation module is used for scanning the code after the code pipeline runs to obtain a code improvement item with an error; wherein, the scanning mode comprises test scanning or operation scanning;
the code improvement item pre-improvement module is used for pre-improving the code improvement item according to the matching result of the code improvement item and a preset improvement rule;
and the code scanning module is used for rerunning the pipeline so as to scan the pre-improved code.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for improving code based on a metrology platform as claimed in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for metrology platform based code modification of any one of claims 1-7 when executing the computer program.
CN202111082546.2A 2021-09-15 2021-09-15 Code improvement method, device, medium and equipment based on measurement platform Active CN113791818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111082546.2A CN113791818B (en) 2021-09-15 2021-09-15 Code improvement method, device, medium and equipment based on measurement platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111082546.2A CN113791818B (en) 2021-09-15 2021-09-15 Code improvement method, device, medium and equipment based on measurement platform

Publications (2)

Publication Number Publication Date
CN113791818A true CN113791818A (en) 2021-12-14
CN113791818B CN113791818B (en) 2024-04-30

Family

ID=78878522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111082546.2A Active CN113791818B (en) 2021-09-15 2021-09-15 Code improvement method, device, medium and equipment based on measurement platform

Country Status (1)

Country Link
CN (1) CN113791818B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011493A1 (en) * 2010-07-08 2012-01-12 Microsoft Corporation Binary code change vulnerability prioritization
CN106294164A (en) * 2016-08-15 2017-01-04 中国银行股份有限公司 A kind of code check method and device
CN110837429A (en) * 2019-10-12 2020-02-25 平安科技(深圳)有限公司 Intelligent repairing method and device for online codes of web terminal
WO2020155734A1 (en) * 2019-01-28 2020-08-06 百富计算机技术(深圳)有限公司 Method and apparatus for increasing read/write speed of contactless card, and terminal device
CN111858113A (en) * 2019-04-30 2020-10-30 北京达佳互联信息技术有限公司 Application program repairing method, device, service system and storage medium
CN112256575A (en) * 2020-10-22 2021-01-22 深圳我家云网络科技有限公司 Code quality management method, system and related equipment
CN113282514A (en) * 2021-06-28 2021-08-20 中国平安人寿保险股份有限公司 Problem data processing method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011493A1 (en) * 2010-07-08 2012-01-12 Microsoft Corporation Binary code change vulnerability prioritization
CN106294164A (en) * 2016-08-15 2017-01-04 中国银行股份有限公司 A kind of code check method and device
WO2020155734A1 (en) * 2019-01-28 2020-08-06 百富计算机技术(深圳)有限公司 Method and apparatus for increasing read/write speed of contactless card, and terminal device
CN111858113A (en) * 2019-04-30 2020-10-30 北京达佳互联信息技术有限公司 Application program repairing method, device, service system and storage medium
CN110837429A (en) * 2019-10-12 2020-02-25 平安科技(深圳)有限公司 Intelligent repairing method and device for online codes of web terminal
CN112256575A (en) * 2020-10-22 2021-01-22 深圳我家云网络科技有限公司 Code quality management method, system and related equipment
CN113282514A (en) * 2021-06-28 2021-08-20 中国平安人寿保险股份有限公司 Problem data processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113791818B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US10901727B2 (en) Monitoring code sensitivity to cause software build breaks during software project development
CN107341098B (en) Software performance testing method, platform, equipment and storage medium
US10310968B2 (en) Developing software project plans based on developer sensitivity ratings detected from monitoring developer error patterns
US11645191B2 (en) Review process for evaluating changes to target code for a software-based product
US10990516B1 (en) Method, apparatus, and computer program product for predictive API test suite selection
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
CN109656820B (en) Intelligent automatic test system based on CBTC
CN1755646A (en) Automated test case verification that is loosely coupled with respect to automated test case execution
CN103678124B (en) Video surveillance platform auto-test method and device based on continuous integrated environment
CN112506799A (en) Business abnormity positioning method and device, electronic equipment, medium and product
CN112380255A (en) Service processing method, device, equipment and storage medium
CN110851324B (en) Log-based routing inspection processing method and device, electronic equipment and storage medium
CN111597104A (en) Multi-protocol adaptive interface regression testing method, system, equipment and medium
CN111913824A (en) Method for determining data link fault reason and related equipment
CN110727575B (en) Information processing method, system, device and storage medium
CN113791818B (en) Code improvement method, device, medium and equipment based on measurement platform
CN113495750B (en) Upgrade detection method and device for equipment and server
CN115934559A (en) Testing method of intelligent form testing system
CN113127036A (en) Software development system, method, apparatus and medium for continuous integration of code
CN111915275A (en) Application operation process management method, device and system
CN110908918A (en) Unit testing method and device for multiple interdependent node
CN114356643B (en) Automatic task discovery failure and recovery method in remote sensing satellite processing system
WO2024040934A1 (en) Test case set evolution method and apparatus, computing device cluster, and storage medium
CN113157740B (en) Service material throwing method and device and electronic equipment
CN115729606A (en) Research and development hidden danger analysis method, device, equipment and 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