WO2019200701A1 - Configuration management method and apparatus, terminal device and storage medium - Google Patents

Configuration management method and apparatus, terminal device and storage medium Download PDF

Info

Publication number
WO2019200701A1
WO2019200701A1 PCT/CN2018/092560 CN2018092560W WO2019200701A1 WO 2019200701 A1 WO2019200701 A1 WO 2019200701A1 CN 2018092560 W CN2018092560 W CN 2018092560W WO 2019200701 A1 WO2019200701 A1 WO 2019200701A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
information
identification information
indicator
configuration management
Prior art date
Application number
PCT/CN2018/092560
Other languages
French (fr)
Chinese (zh)
Inventor
杨冬振
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019200701A1 publication Critical patent/WO2019200701A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a configuration management method, apparatus, terminal device, and storage medium.
  • SVN short for Subversion, is an open source, centralized version control management tool for submitting and managing software source code.
  • the common SVN code management uses the "submit code----detection code” method to control the code quality.
  • the code is submitted to the SVN code base, and then the code in the code base is statically checked, and the code is found to exist.
  • the problem if there is a problem, feedback to the developer to modify, and then resubmit, overwrite the problem code.
  • This kind of code management method is difficult to effectively control the quality of the code. It is to modify the problem code after the code is submitted to the SVN official library. The implementation process is cumbersome, and it will also cause the risk of modification and the labor cost of the development test.
  • the embodiment of the present application provides a configuration management method, device, terminal device, and storage medium, so as to solve the problem that the risk of code modification is high and the labor cost of the development test is wasted, and the code development efficiency is low.
  • the embodiment of the present application provides a configuration management method, including the following steps performed by a client:
  • code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
  • the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
  • the embodiment of the present application provides a configuration management method, including the following steps performed by the configuration management platform:
  • the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client.
  • Submitted prompt information If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
  • the client sends a prompt message rejecting the submission.
  • the embodiment of the present application provides a configuration management method, including the following steps performed by a server:
  • the operation instruction is sent to the configuration management platform.
  • the embodiment of the present application provides a configuration management apparatus, including a client, where the client includes:
  • the application receiving module is configured to receive code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
  • a code obtaining module configured to acquire the to-be-committed code according to the address identification information
  • a code checking module configured to perform static code check on the to-be-committed code to obtain a static code check report
  • An indicator extraction module configured to parse the static code inspection report, and extract indicator result data in the static code inspection report according to a preset indicator
  • An indicator sending module configured to send the indicator result data and the identity identification information to a server
  • a request sending module configured to send a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
  • the information feedback module is configured to: when receiving the prompt information that is sent by the configuration management platform and includes the submission result, feed the prompt information to the user.
  • the embodiment of the present application provides a configuration management apparatus, including a configuration management platform, where the configuration management platform includes:
  • a request receiving module configured to receive a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
  • An indicator detection module configured to send a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identifier information;
  • An instruction receiving module configured to receive an operation instruction returned by the server according to the result of the indicator detection
  • a code submission module configured to: obtain the to-be-committed code according to the address identification information, and merge the to-be-committed code into a branch version corresponding to the branch version information, and The client sends the prompt information successfully submitted;
  • an information sending module configured to send, to the client, prompt information that refuses to submit if the operation instruction is to reject the submission.
  • the embodiment of the present application provides a configuration management apparatus, including a server, where the server includes:
  • the indicator receiving module is configured to receive the indicator result data of the static code check report sent by the client and the identity identification information of the user, and store the indicator result data and the identity identification information in the indicator database;
  • the information obtaining module is configured to: obtain the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
  • a data obtaining module configured to acquire, according to the branch version information, preset indicator standard data corresponding to the branch version information
  • An indicator obtaining module configured to acquire the indicator result data corresponding to the identity identification information from the indicator database
  • An instruction generating module configured to generate an operation instruction that is allowed to be submitted if it is detected that the indicator result data satisfies the requirement of the indicator standard data, and otherwise generate an operation instruction that refuses to submit;
  • an instruction sending module configured to send the operation instruction to the configuration management platform.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer
  • the steps of the configuration management method are implemented when the instruction is read.
  • the embodiment of the present application provides one or more non-volatile readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, such that the one or The steps of implementing the configuration management method when executed by a plurality of processors.
  • FIG. 1 is a schematic diagram of a network structure of a configuration management system in a configuration management method provided in Embodiment 1 of the present application;
  • FIG. 3 is a diagram showing an example of a specific static code check result of the configuration management method provided in Embodiment 1 of the present application;
  • FIG. 4 is a flowchart of implementing an application for a special grant permission of a client in a configuration management method provided in Embodiment 1 of the present application;
  • FIG. 5 is a flowchart of an implementation of step S117 in the configuration management method provided in Embodiment 1 of the present application;
  • FIG. 6 is a schematic diagram of a configuration management apparatus provided in Embodiment 2 of the present application.
  • FIG. 7 is a schematic diagram of a terminal device provided in Embodiment 4 of the present application.
  • FIG. 1 is a schematic diagram of a network structure of a configuration management system, where the configuration management system includes a client, a configuration management platform, and a server.
  • the client may be a personal computer (PC) or other intelligent terminal device.
  • the server may be a server, a server cluster composed of several servers, or a cloud computing service center.
  • the client and the configuration management platform, the client and the server, and the configuration management platform and the server are connected through a network communication medium, and the specific network propagation medium may be wired or wireless.
  • code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
  • the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
  • the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client.
  • Submitted prompt information If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
  • the client sends a prompt message rejecting the submission.
  • the operation instruction is sent to the configuration management platform.
  • FIG. 2 shows an implementation flow of the configuration management method provided by this embodiment. Details are as follows:
  • the client receives the code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information.
  • the address identification information is used to extract the code to be submitted
  • the identity identification information is used to uniquely mark the user of the client
  • the branch version information is used to mark the version information of the code to be submitted.
  • address identifier information may be a storage path of the code to be submitted, such as “D: ⁇ workspace ⁇ demo_svn”, or other forms, and is not limited herein.
  • the identity information may specifically be a registered user name or other forms, and is not limited herein.
  • S102 The client obtains the code to be submitted according to the address identification information.
  • the code to be submitted is the code that the user applies to submit to the configuration management platform.
  • the client finds the location of the to-be-committed code corresponding to the address identification information according to the address identification information in step S101, and acquires the code to be submitted.
  • S103 The client performs static code check on the submitted code to obtain a static code check report.
  • the static code check refers to checking the submitted code according to a preset check indicator according to actual application requirements.
  • the static code inspection report is a check result report obtained by static code checking of the submitted code.
  • the preset inspection indicator is an inspection indicator configured when the static code is checked according to actual business requirements, including unit testing, code specification checking, coverage rate, and circle complexity.
  • static code check can be checked by Eclipse plug-in platform check or other plug-in set check. There is no restriction here.
  • the Eclipse plugin is used to treat the submitted code for static code checking.
  • the Eclipse plugin is an open source, Java-based extensible development platform. For its part, it is just a framework and a set of services for building development environments through plug-in components.
  • the Eclipse plug-in comes with a standard
  • the set of plug-ins can check the code for multiple check indicators.
  • the check indicators include unit test (JUnitTest), code bug check (FindBugs), code specification check (CheckSytle), coverage (coverage) and circle complexity ( Complexity) and so on.
  • the client uses the Eclipse plug-in to perform the static code check on the to-be-submitted code obtained in step S102 according to the preset check indicator, and obtain a static code check report under each check indicator, and check the static code by submitting the code.
  • the measurement of the quality of the code, the hidden dangers and errors of the detection code are realized, so that the user can timely modify the error code and the code that does not meet the specification according to the inspection result, and obtain the valid qualified code.
  • FIG. 3 shows an inspection report for the static code check according to the check indicators "coverage rate” and "code bug check” for the code to be submitted in the "D: ⁇ workspace ⁇ demo_svn" directory, the user. You can view the full static code scan report by clicking on “Details”.
  • S104 The client parses the static code check report, and extracts the indicator result data in the static code check report according to the preset indicator.
  • the client parses the static code check report by using the Eclipse plug-in to capture the static code check report, parsing the content of the static code check report, or parsing other plug-in sets, and not doing this. limit.
  • the preset indicator is the indicator result data in the content for extracting the static code check report, which is set according to the actual application requirement, and includes the number of unit test junit failures, the error code of the file stream not closed in the code, and the non-conformity.
  • the code quality of the administrator configured is the bad taste code of the sonar specification and whether it conforms to the preset code writing style requirements, etc., wherein the preset code writing style requirement may be whether the braces are wrapped or other format requirements, and no limitation is imposed here.
  • the indicator result data is data extracted from the contents of the static code inspection report according to preset indicators.
  • the client checks the report of the static code obtained in step S103, uses the Eclipse plug-in to parse the report content, and extracts the indicator result data in the static code check report according to the preset index.
  • S105 The client sends the indicator result data and the identity identification information to the server.
  • the client sends the indicator result data of the user to be submitted in step S104 and the identity information of the user corresponding to the code to be submitted to the server, and can transmit the message through a real time message transmission protocol (RTMP).
  • RTMP real time message transmission protocol
  • S106 The server receives the indicator result data of the static code check report sent by the client and the identity identification information of the user, and stores the indicator result data and the identity identification information in the indicator database.
  • the indicator database is used to store the indicator result data of the static code check report sent by the client received by the server and the identity identification information of the user.
  • the indicator result data of the code to be submitted in the indicator database and the identity information of the user corresponding to the code to be submitted are uniquely stored.
  • the server receives the indicator result data of the static code check report sent by the client and the identity identification information of the user through the RTMP protocol.
  • S107 The client sends a code submission request to the configuration management platform, where the code submission request includes address identification information, identity identification information, and branch version information.
  • the client sends a code submission request to the configuration management platform through the RTMP protocol.
  • the configuration management platform receives a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information.
  • the configuration management platform receives the code submission request sent by the client through the RTMP protocol.
  • the configuration management platform sends a code indicator detection request to the server, so that the server performs the indicator detection on the submitted code, where the code indicator detection request includes the branch version information and the identity identification information.
  • the configuration management platform may send a code indicator detection request to the server by means of a hook function HOOK.
  • the hook function HOOK of the configuration management platform is a piece of logic triggered when receiving a code submission request sent by the client.
  • the default is that there is no execution content, and the user can write a shell script or a batch bat script according to the application requirement.
  • the script issues a code indicator detection request to the server's interface.
  • the configuration management platform may also send a code indicator detection request to the server by means of an interactive message, which may be set according to actual application requirements, and is not limited herein.
  • the server receives the code indicator detection request sent by the configuration management platform by using the RTMP protocol.
  • S111 The server obtains preset indicator standard data corresponding to the branch version information according to the branch version information.
  • the preset indicator standard data is a detection standard set according to an actual service requirement, and is used to perform index detection on the indicator result data, where the preset indicator standard data includes a code detection indicator and a corresponding code detection indicator.
  • the target value is a code detection indicator and a corresponding code detection indicator.
  • S112 The server obtains the indicator result data corresponding to the identity identification information from the indicator database.
  • the server obtains, according to the code indicator detection request received in step S110, the indicator result data that is uniquely corresponding to the identity identification information, where the indicator result data includes the preset indicator in step S104 and the indicator. Corresponding values.
  • S113 If the server detects that the indicator result data meets the requirement of the indicator standard data, generates an operation instruction that is allowed to be submitted, and otherwise generates an operation instruction that refuses to submit.
  • the index detection is performed on the indicator result data obtained in step S112 according to the indicator standard data obtained in step S111, wherein the indicator detection refers to the preset indicator in the detection index result data and the code detection according to the indicator standard data.
  • the indicator has the same indicator, and the value corresponding to the preset indicator under the same indicator is compared with the value corresponding to the code detection index. If the comparison result satisfies the requirement of the indicator, an operation instruction allowing the submission is generated, otherwise the operation of rejecting the submission is generated. instruction.
  • the pre-configured code detection indicators include coverage rate and unit test.
  • the target value is specifically 80% coverage rate, and the number of unit test failures is less than 3.
  • the server confirms that the actual coverage rate does not meet the target coverage requirement.
  • the result of the indicator detection is that the indicator result data does not meet the requirements of the indicator standard data, and correspondingly generates an operation instruction that refuses to submit, if the indicator data
  • the actual coverage rate is 86%, and the actual number of unit test failures is 2.
  • the result of the server-side verification indicator detection is that the indicator result data meets the requirements of the indicator standard data, and correspondingly generates an operation instruction that is allowed to be submitted.
  • S114 The server sends an operation instruction to the configuration management platform.
  • the server can send an operation instruction to the configuration management platform through a socket process communication.
  • the server invalidates the indicator result data and the user identity information stored in the indicator database to ensure that the indicator is submitted every time the code is submitted.
  • the indicator result data and the user's identity information stored in the database are the information corresponding to the code to be submitted.
  • S115 The configuration management platform receives an operation instruction returned by the server according to the result of the indicator detection.
  • the configuration management platform may receive, by using the socket process communication, an operation instruction returned by the server according to the result of the indicator detection, where the operation instruction includes allowing submission and rejecting the submission.
  • the configuration management platform acquires the to-be-submitted code according to the address identification information, merges the to-be-committed code into the branch version corresponding to the branch version information, and sends the successful submission to the client. Tip message.
  • the configuration management platform acquires the to-be-committed code according to the address identification information in step S108, and then merges the to-be-submitted code into the branch version corresponding to the branch version information according to the branch version information of the to-be-committed code. And send a prompt message to the client for successful submission.
  • the prompt information successfully submitted includes the identity identification information corresponding to the successfully submitted code and the time of successfully submitting the code.
  • the prompt information for rejecting the submission includes the identity identification information corresponding to the code rejected by the submission, the time of rejecting the submission of the code, and the reason for rejecting the submission of the code, for example, the reason for rejecting the submission of the code may be “FAIL-CPH006”. -EMMA", indicating that the coverage of the unit test does not meet the requirements.
  • the client receives the prompt information sent by the configuration management platform as the successful submission, the corresponding user is found according to the identity identification information corresponding to the successfully submitted code in the prompt information, and the prompt information is fed back to the user.
  • the client receives the prompt information sent by the configuration management platform to reject the submission, the corresponding user is found according to the identity identification information corresponding to the code that is rejected in the prompt information, and the prompt information is fed back to the user.
  • the client when the client receives the code submission application sent by the user, before the code submission request is sent to the configuration management platform, the client uses the code detection tool to statically check the code, which is formal. Before submitting the source code, the system can automatically perform static code check to quickly obtain the inspection report and check result. After receiving the code submission request sent by the client, the configuration management platform requires the server to perform the indicator detection on the inspection result, only when the indicator is detected.
  • the code quality is measured, and the hidden dangers and errors of the code can be detected, so that the user can timely modify the error code and the code that does not meet the specification according to the inspection result, and obtain the valid qualified code, thereby Reduce the code risk in the SVN code base of the configuration management platform, reduce the modification cost after the code is uploaded to the formal management platform of the configuration management platform, save the time for manual review of the code, improve the efficiency of code development, and complete the static code check on the client side. And finished at the server
  • the detection of the code indicator realizes that the cost of the configuration management platform is distributed to each client and server to complete, thereby reducing the load of the configuration management platform, especially when there are many users, and large concurrent code is submitted to the configuration management platform.
  • the performance bottleneck of the configuration management platform can be effectively avoided, the performance level of the configuration management platform can be improved, the performance during the system running process and the scalability of the system can be improved, and the code development efficiency can be further improved.
  • the client after receiving the application information sent by the user mentioned in step S101, the client further includes a process of processing the special approval request for the user.
  • the code submission application information further includes a special batch application identifier of the user, and the special batch application identifier is identifier information used for applying the special approval authority to the code to be submitted.
  • the special batch permission means that before the code is submitted to the SVN code base of the configuration management platform, when the code to be submitted is rejected, the test result may be disregarded, the code is allowed to be submitted, and the branch version number is directly incorporated to satisfy the actual application. Need to improve the usability of the code.
  • FIG. 4 shows a specific implementation process of the client-to-user special grant permission application provided by the embodiment of the present application, which is described in detail as follows:
  • S401 The client sends a special permission application to the preset approver according to the special approval application identifier.
  • the preset approver is a preset staff member who sets the special approval authority, and the approver receives the special approval authority application, and according to the approval condition, the special pending application code corresponding to the special approval identifier is specially made. Approval of batch permissions, where the approval conditions are set according to actual application and business needs.
  • the client receives the special batch application identifier, if it is confirmed that the to-be-submitted code needs to be specially applied, the user's identity identification information and the branch version information are sent to the preset approver for special permission application.
  • the sending method may be a mail, an instant message, etc., and is not limited herein.
  • the client If the client receives the approval result returned by the approver as a special batch application, the client sends the user's special permission identification information and the user identity information to the configuration management platform, so that the configuration management platform will be specially approved.
  • the permission identification information is stored in the permission database corresponding to the identity identification information.
  • the permission database is used to store the special authorization identification information of the user sent by the configuration management platform and the identity identification information of the user.
  • the special batch identification information includes branch version information that allows the code to be submitted to be directly joined.
  • the examiner approves the special approval application and meets the approval conditions, the approval result is that the special application is successful, and the approval result is returned to the customer. end.
  • the client generates the special batch identification information corresponding to the special batch application identifier according to the approval result, and the special batch authorization identifier information is used to identify whether the user has the right to directly join the branch version corresponding to the submitted code, and the special batch permission
  • the identifier information may specifically be the branch version information of the branch version corresponding to the code to be submitted.
  • the client sends the special permission identification information and the user identification information to the configuration management platform, so that the configuration management platform saves the special authorization identification information and the identity identification information in the permission database.
  • the client sends a special permission application to the preset approver according to the special application identifier, and sends the special authorization identification information and the user identification information of the successful application to the configuration management platform.
  • the configuration management platform may save the special batch identification information and the identity identification information in the permission database, so that when the pending code to be submitted is rejected, if the special permission identification information exists, the detection result may be disregarded. Code submission, directly into the branch version, to meet the needs of the actual application, improve the usability of the code.
  • the configuration management platform sends a rejection submission to the client, if the operation instruction received by the configuration management platform mentioned in step S117 is rejected, by a specific embodiment.
  • the specific implementation method of the prompt information is described in detail.
  • FIG. 5 shows a specific implementation process of step S117 provided by the embodiment of the present application, which is described in detail as follows:
  • the configuration management platform first confirms whether there is identity identification information corresponding to the to-be-committed code from the permission database, and if yes, continues to query the identity database and the identity identification information. Whether the corresponding special batch identification information is not empty.
  • the configuration management platform If the configuration management platform queries the privilege database to query the privilege identifier information corresponding to the identity information, the configuration management platform obtains the to-be-submitted code according to the address identification information, and the code to be submitted is merged into the branch version information. In the branch version, and send the prompt message to the client for the successful submission of the special batch permission.
  • the configuration management platform queries the permission database for the special batch identification information corresponding to the identity identification information, and if the special permission identification information is not empty, obtaining the permission to directly join the special permission identification information.
  • the branch version information if the branch version information that is directly allowed to be merged is the same as the branch version information to be merged, the code to be submitted is obtained according to the address identification information in step S108, and the branch version information corresponding to the code to be submitted is used.
  • the code to be submitted is merged into the branch version corresponding to the branch version information, and the prompt information successfully submitted by the special batch permission is sent to the client through the RTMP protocol.
  • the prompt information successfully submitted by the special batch permission includes the identity identification information corresponding to the special batch permission identification information, the special batch permission information, and the time of successfully submitting the code.
  • the configuration management platform After the configuration management platform sends the prompt information successfully submitted by the special batch permission to the client, the configuration management platform invalidates the special batch identification information corresponding to the identity identification information saved in the permission database to ensure The special batch identification information saved in the permission database each time the code is submitted is the permission information corresponding to the code to be submitted.
  • the identity identification information corresponding to the to-be-committed code is not queried, or the special batch identification information corresponding to the identity identification information does not exist in the permission database, and the submission of the to-be-submitted code is rejected, and the configuration management platform passes the RTMP protocol. Send a message to the client rejecting the submission.
  • the special batch identification information is not empty by querying the special authorization identification information corresponding to the user identification information from the permission database. If the branch version information that is allowed to be directly joined is the same as the branch version information to be merged, the code to be submitted is merged into the branch version information. In the corresponding branch version, the code submission is completed, and at the same time, the pending code that does not have the identity information or the special permission identification information is empty, the submission is rejected, and the code ⁇ acceptable range is realized under the condition that the actual application needs. Within the scope of the test, the code can be submitted and used without any consideration, which improves the usability and usability of the code, thereby promoting the efficiency of code development.
  • FIG. 6 shows a configuration management apparatus corresponding to the configuration management method provided in Embodiment 1, which includes a client, a configuration management platform, and a server. For the convenience of description, only the parts related to the embodiments of the present application are shown.
  • the client of the configuration management apparatus includes: an application receiving module 601, a code obtaining module 602, a code checking module 603, an index extracting module 604, an index sending module 605, a request sending module 606, and an information feedback module 607.
  • an application receiving module 601 a code obtaining module 602, a code checking module 603, an index extracting module 604, an index sending module 605, a request sending module 606, and an information feedback module 607.
  • Each function module is described in detail as follows:
  • the application receiving module 601 is configured to receive code submission application information sent by the user, where the code submission application information includes address identification information of the code to be submitted, identity identification information of the user, and branch version information;
  • the code obtaining module 602 is configured to obtain a code to be submitted according to the address identification information.
  • the code checking module 603 is configured to perform static code check on the submitted code to obtain a static code check report
  • the indicator extraction module 604 is configured to parse the static code inspection report, and extract the indicator result data in the static code inspection report according to the preset indicator;
  • the indicator sending module 605 is configured to send the indicator result data and the identity identification information to the server;
  • the request sending module 606 is configured to send a code submission request to the configuration management platform, where the code submission request includes address identification information, identity identification information, and branch version information;
  • the information feedback module 607 is configured to: when receiving the prompt information that is sent by the configuration management platform and including the submission result, feed the prompt information to the user.
  • code submission application information further includes a special application identifier of the user
  • client of the configuration management device further includes:
  • the permission application module 619 is configured to send a special permission application to the preset approver according to the special approval application identifier
  • the permission sending module 620 is configured to: if the approval result returned by the approver is that the special batch application is successful, send the special authorization identification information of the user and the identity identification information of the user to the configuration management platform, so that the configuration management platform will
  • the batch permission identification information is stored in the authority database corresponding to the identity identification information.
  • the configuration management platform of the configuration management apparatus includes: a request receiving module 608 , an indicator detecting module 609 , an instruction receiving module 610 , a code submitting module 611 , and an information sending module 612 .
  • Each function module is described in detail as follows:
  • the request receiving module 608 is configured to receive a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
  • the indicator detection module 609 is configured to send a code indicator detection request to the server, so that the server performs the indicator detection on the submitted code, where the code indicator detection request includes the branch version information and the identity identification information;
  • the instruction receiving module 610 is configured to receive an operation instruction returned by the server according to the result of the indicator detection
  • the code submission module 611 is configured to: if the operation instruction is to allow the submission, obtain the code to be submitted according to the address identification information, merge the code to be submitted into the branch version corresponding to the branch version information, and send the prompt information successfully submitted to the client;
  • the information sending module 612 is configured to send the prompt information for rejecting the submission to the client if the operation instruction is to reject the submission.
  • the information sending module 612 includes:
  • the permission query unit 6121 is configured to query the special batch authorization information corresponding to the identity information of the user from the permission database when the operation instruction is to reject the submission;
  • the code submitting unit 6122 is configured to: if the special batch identification information corresponding to the identity identification information is not empty in the permission database, obtain the to-be-submitted code according to the address identification information, and merge the to-be-committed code into the branch corresponding to the branch version information. In the version, and send a prompt message to the client that the special batch permission is successfully submitted;
  • the information sending unit 6123 is configured to send the prompt information that refuses to submit to the client if the identity identification information is not queried in the authority database, or the special batch identification information corresponding to the identity identification information is vacant.
  • the server of the configuration management apparatus includes: an indicator receiving module 613 , an information acquiring module 614 , a data acquiring module 615 , an index obtaining module 616 , an instruction generating module 617 , and an instruction sending module 618 .
  • Each function module is described in detail as follows:
  • the indicator receiving module 613 is configured to receive the indicator result data of the static code check report sent by the client and the identity identification information of the user, and store the indicator result data and the identity identification information in the indicator database;
  • the information obtaining module 614 is configured to: obtain the branch version information and the identity identification information in the code indicator detection request, if receiving the code indicator detection request sent by the configuration management platform;
  • the data obtaining module 615 is configured to obtain preset index standard data corresponding to the branch version information according to the branch version information.
  • the indicator obtaining module 616 is configured to obtain indicator result data corresponding to the identity identification information from the indicator database;
  • the instruction generating module 617 is configured to: if it is detected that the indicator result data meets the requirement of the indicator standard data, generate an operation instruction that is allowed to be submitted; otherwise, generate an operation instruction that rejects the submission;
  • the instruction sending module 618 is configured to send the operation instruction to the configuration management platform.
  • the present embodiment provides one or more non-volatile readable storage media having computer readable instructions stored thereon, the one or more non-readable readable storage media storing computer readable instructions, the computer readable instructions being
  • the configuration management method in Embodiment 1 is implemented when one or more processors are executed, when one or more processors are executed. To avoid repetition, we will not repeat them here.
  • the functions of the modules/units in the configuration management apparatus in Embodiment 2 are implemented when the computer readable instructions are executed by the processor. To avoid repetition, we will not repeat them here.
  • non-volatile readable storage media storing computer readable instructions comprise: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic Disc, optical disc, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signals, and telecommunications signals.
  • FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 70 of this embodiment includes a processor 71, a memory 72, and a program readable by computer readable instructions 73, such as a configuration management method, stored in the memory 72 and executable on the processor 71.
  • the processor 71 executes the computer readable instructions 73
  • the steps in the above embodiments of the respective configuration management methods are implemented, such as steps S101 to S118 shown in FIG.
  • the processor 71 executes the computer readable instructions 73
  • the functions of the modules/units in the foregoing device embodiments are implemented, for example, the functions of the modules 601 to 607 of the client shown in FIG. 7, and the modules 608 to 612 of the configuration management platform are configured.
  • computer readable instructions 73 may be partitioned into one or more modules/units, one or more modules/units being stored in memory 72 and executed by processor 71 to complete the application.
  • the one or more modules/units may be an instruction segment of a series of computer readable instructions capable of performing a particular function, which is used to describe the execution of computer readable instructions 73 in the terminal device 70.
  • the computer readable instructions 73 may be divided into an application receiving module, a code acquisition module, a code checking module, an index extraction module, an indicator sending module, a request sending module, and an information feedback module.
  • the specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
  • the computer readable instructions 73 may also be partitioned into a request receiving module, an indicator detecting module, an instruction receiving module, a code submitting module, and an information transmitting module.
  • the specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
  • the computer readable instructions 73 may also be divided into an indicator receiving module, an information acquiring module, a data acquiring module, an index obtaining module, an instruction generating module, and an instruction sending module.
  • the specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
  • the terminal device 70 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • Terminal device 70 may include, but is not limited to, processor 71, memory 72. It will be understood by those skilled in the art that FIG. 7 is merely an example of the terminal device 70, and does not constitute a limitation of the terminal device 70, and may include more or less components than those illustrated, or may combine certain components or different components.
  • the terminal device 70 may further include an input/output device, a network access device, a bus, and the like.
  • the processor 71 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 72 may be an internal storage unit of the terminal device 70, such as a hard disk or a memory of the terminal device 70.
  • the memory 72 may also be an external storage device of the terminal device 70, such as a plug-in hard disk provided on the terminal device 70, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on.
  • the memory 72 may also include both an internal storage unit of the terminal device 70 and an external storage device.
  • Memory 72 is used to store computer readable instructions as well as other programs and data required by terminal device 70.
  • the memory 72 can also be used to temporarily store data that has been or will be output.

Landscapes

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

Abstract

Disclosed in the present application are a configuration management method and apparatus, a terminal device and a storage medium, the configuration management method comprises the following steps executed by a client: receiving code submitting application information sent by a user; Acquiring, according to address identification information, a code to be submitted; performing static code inspection on the code to be submitted, and obtaining a static code inspection report; analyzing the static code inspection report, and extracting index result data in the static code inspection report according to a preset index; sending the index result data and identity identification information to a server; and sending a code submitting request to a configuration management platform, the code submitting request comprising the address identification information, the identity identification information and branch version information. The technical solution in the present application guarantees the code quality, reducing the code management risk and modification cost, increasing the code development efficiency.

Description

一种配置管理方法、装置、终端设备及存储介质Configuration management method, device, terminal device and storage medium
本申请以2018年04月17日提交的申请号为201810342227.2,名称为“一种配置管理方法、装置、终端设备及存储介质”的中国发明专利申请为基础,并要求其优先权。The present application is based on the Chinese Patent Application No. 201810342227.2 filed on Apr. 17, 2018, entitled "A Configuration Management Method, Apparatus, Terminal Device, and Storage Medium", and claims priority.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种配置管理方法、装置、终端设备及存储介质。The present application relates to the field of computer technologies, and in particular, to a configuration management method, apparatus, terminal device, and storage medium.
背景技术Background technique
SVN是Subversion的简称,是一个开放源代码的集中式版本控制管理工具,用于对软件源代码的提交和管理工具。SVN, short for Subversion, is an open source, centralized version control management tool for submitting and managing software source code.
目前,常见的SVN代码管理均采用“提交代码----检测代码”的方式来控制代码质量,先将代码提交到SVN代码库,再对代码库中的代码进行静态检查,发现代码中存在的问题,若存在问题则反馈给开发人员进行修改,再重新提交,覆盖问题代码。这种代码管理方式很难有效控制代码质量,是在代码提交到SVN正式库之后再对问题代码进行修改,其实施过程繁琐,也会造成修改风险和开发测试的人力成本浪费,同时,在SVN代码库中进行代码检测、修改和提交,尤其是大并发提交代码时,容易出现SVN代码库超负荷的情况,造成SVN代码库性能瓶颈,导致代码检测效率和开发效率降低。At present, the common SVN code management uses the "submit code----detection code" method to control the code quality. First, the code is submitted to the SVN code base, and then the code in the code base is statically checked, and the code is found to exist. The problem, if there is a problem, feedback to the developer to modify, and then resubmit, overwrite the problem code. This kind of code management method is difficult to effectively control the quality of the code. It is to modify the problem code after the code is submitted to the SVN official library. The implementation process is cumbersome, and it will also cause the risk of modification and the labor cost of the development test. At the same time, in SVN Code detection, modification and submission in the code base, especially when submitting code concurrently, is prone to overload of the SVN code base, resulting in performance bottleneck of the SVN code base, resulting in reduced code detection efficiency and development efficiency.
发明内容Summary of the invention
本申请实施例提供一种配置管理方法、装置、终端设备及存储介质,以解决代码修改风险高和开发测试的人力成本浪费,代码开发效率低的问题。The embodiment of the present application provides a configuration management method, device, terminal device, and storage medium, so as to solve the problem that the risk of code modification is high and the labor cost of the development test is wasted, and the code development efficiency is low.
第一方面,本申请实施例提供一种配置管理方法,包括客户端执行的如下步骤:In a first aspect, the embodiment of the present application provides a configuration management method, including the following steps performed by a client:
接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;Receiving code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
根据所述地址标识信息,获取所述待提交代码;Obtaining the to-be-committed code according to the address identification information;
对所述待提交代码进行静态代码检查,得到静态代码检查报告;Performing static code check on the to-be-committed code to obtain a static code check report;
对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;Parsing the static code check report, and extracting indicator result data in the static code check report according to a preset indicator;
将所述指标结果数据和所述身份标识信息发送给服务端;Sending the indicator result data and the identity identification information to the server;
向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;Sending a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。If the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
第二方面,本申请实施例提供一种配置管理方法,包括配置管理平台执行的如下步骤:In a second aspect, the embodiment of the present application provides a configuration management method, including the following steps performed by the configuration management platform:
接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;Receiving a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;Sending a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identification information;
接收所述服务端根据所述指标检测的结果返回的操作指令;Receiving an operation instruction returned by the server according to the result of the indicator detection;
若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。If the operation instruction is to reject the submission, the client sends a prompt message rejecting the submission.
第三方面,本申请实施例提供一种配置管理方法,包括服务端执行的如下步骤:In a third aspect, the embodiment of the present application provides a configuration management method, including the following steps performed by a server:
接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;Receiving the indicator result data of the static code check report sent by the client and the identity identification information of the user, and storing the indicator result data and the identity identification information in the indicator database;
若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;And acquiring the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;Obtaining preset indicator standard data corresponding to the branch version information according to the branch version information;
从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;Obtaining, by the indicator database, the indicator result data corresponding to the identity identification information;
若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;If it is detected that the indicator result data satisfies the requirement of the indicator standard data, generating an operation instruction that is allowed to be submitted, otherwise generating an operation instruction that refuses to submit;
将所述操作指令发送给所述配置管理平台。The operation instruction is sent to the configuration management platform.
第四方面,本申请实施例提供一种配置管理装置,包括客户端,客户端包括:In a fourth aspect, the embodiment of the present application provides a configuration management apparatus, including a client, where the client includes:
申请接收模块,用于接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;The application receiving module is configured to receive code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
代码获取模块,用于根据所述地址标识信息,获取所述待提交代码;a code obtaining module, configured to acquire the to-be-committed code according to the address identification information;
代码检查模块,用于对所述待提交代码进行静态代码检查,得到静态代码检查报告;a code checking module, configured to perform static code check on the to-be-committed code to obtain a static code check report;
指标提取模块,用于对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;An indicator extraction module, configured to parse the static code inspection report, and extract indicator result data in the static code inspection report according to a preset indicator;
指标发送模块,用于将所述指标结果数据和所述身份标识信息发送给服务端;An indicator sending module, configured to send the indicator result data and the identity identification information to a server;
请求发送模块,用于向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;a request sending module, configured to send a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
信息反馈模块,用于若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。The information feedback module is configured to: when receiving the prompt information that is sent by the configuration management platform and includes the submission result, feed the prompt information to the user.
第五方面,本申请实施例提供一种配置管理装置,包括配置管理平台,配置管理平台包括:In a fifth aspect, the embodiment of the present application provides a configuration management apparatus, including a configuration management platform, where the configuration management platform includes:
请求接收模块,用于接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;a request receiving module, configured to receive a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
指标检测模块,用于向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;An indicator detection module, configured to send a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identifier information;
指令接收模块,用于接收所述服务端根据所述指标检测的结果返回的操作指令;An instruction receiving module, configured to receive an operation instruction returned by the server according to the result of the indicator detection;
代码提交模块,用于若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;a code submission module, configured to: obtain the to-be-committed code according to the address identification information, and merge the to-be-committed code into a branch version corresponding to the branch version information, and The client sends the prompt information successfully submitted;
信息发送模块,用于若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。And an information sending module, configured to send, to the client, prompt information that refuses to submit if the operation instruction is to reject the submission.
第六方面,本申请实施例提供一种配置管理装置,包括服务端,服务端包括:In a sixth aspect, the embodiment of the present application provides a configuration management apparatus, including a server, where the server includes:
指标接收模块,用于接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;The indicator receiving module is configured to receive the indicator result data of the static code check report sent by the client and the identity identification information of the user, and store the indicator result data and the identity identification information in the indicator database;
信息获取模块,用于若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;The information obtaining module is configured to: obtain the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
数据获取模块,用于根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;a data obtaining module, configured to acquire, according to the branch version information, preset indicator standard data corresponding to the branch version information;
指标获取模块,用于从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;An indicator obtaining module, configured to acquire the indicator result data corresponding to the identity identification information from the indicator database;
指令生成模块,用于若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;An instruction generating module, configured to generate an operation instruction that is allowed to be submitted if it is detected that the indicator result data satisfies the requirement of the indicator standard data, and otherwise generate an operation instruction that refuses to submit;
指令发送模块,用于将所述操作指令发送给所述配置管理平台。And an instruction sending module, configured to send the operation instruction to the configuration management platform.
第七方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现所述配置管理方法的步骤。In a seventh aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer The steps of the configuration management method are implemented when the instruction is read.
第八方面,本申请实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现所述配置管理方法的步骤。In an eighth aspect, the embodiment of the present application provides one or more non-volatile readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, such that the one or The steps of implementing the configuration management method when executed by a plurality of processors.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。The details of one or more embodiments of the present invention are set forth in the accompanying drawings and the description of the claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art based on these drawings without the inventive labor.
图1是本申请实施例1中提供的配置管理方法中配置管理系统的网络结构示意图;1 is a schematic diagram of a network structure of a configuration management system in a configuration management method provided in Embodiment 1 of the present application;
图2是本申请实施例1中提供的配置管理方法的实现流程图;2 is a flowchart of an implementation of a configuration management method provided in Embodiment 1 of the present application;
图3是本申请实施例1中提供的配置管理方法的一个具体的静态代码检查结果的示例图;3 is a diagram showing an example of a specific static code check result of the configuration management method provided in Embodiment 1 of the present application;
图4是本申请实施例1中提供的配置管理方法中客户端的特批权限的申请的实现流程图;4 is a flowchart of implementing an application for a special grant permission of a client in a configuration management method provided in Embodiment 1 of the present application;
图5是本申请实施例1中提供的配置管理方法中步骤S117的实现流程图;FIG. 5 is a flowchart of an implementation of step S117 in the configuration management method provided in Embodiment 1 of the present application;
图6是本申请实施例2中提供的配置管理装置的示意图;6 is a schematic diagram of a configuration management apparatus provided in Embodiment 2 of the present application;
图7是本申请实施例4中提供的终端设备的示意图。FIG. 7 is a schematic diagram of a terminal device provided in Embodiment 4 of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
实施例1Example 1
本申请实施例的配置管理方法应用于配置管理系统中。如图1所示,图1为配置管理系统的网络结构示意图,该配置管理系统包括客户端、配置管理平台和服务端。The configuration management method of the embodiment of the present application is applied to a configuration management system. As shown in FIG. 1 , FIG. 1 is a schematic diagram of a network structure of a configuration management system, where the configuration management system includes a client, a configuration management platform, and a server.
客户端具体可以是个人计算机(Personal Computer,PC)或其他智能终端设备,服务端具体可以是一台服务器,或者由若干服务器组成的服务器集群,还可以是一个云计算服务中心。The client may be a personal computer (PC) or other intelligent terminal device. The server may be a server, a server cluster composed of several servers, or a cloud computing service center.
客户端与配置管理平台之间,客户端与服务端之间,以及配置管理平台与服务端之间均通过网络传播介质进行连接,具体网络传播介质可以是有线或无线等。The client and the configuration management platform, the client and the server, and the configuration management platform and the server are connected through a network communication medium, and the specific network propagation medium may be wired or wireless.
本申请实施例中的配置管理方法具体包括客户端执行的如下步骤:The configuration management method in the embodiment of the present application specifically includes the following steps performed by the client:
接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;Receiving code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
根据所述地址标识信息,获取所述待提交代码;Obtaining the to-be-committed code according to the address identification information;
对所述待提交代码进行静态代码检查,得到静态代码检查报告;Performing static code check on the to-be-committed code to obtain a static code check report;
对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中 的指标结果数据;Parsing the static code check report, and extracting indicator result data in the static code check report according to a preset indicator;
将所述指标结果数据和所述身份标识信息发送给服务端;Sending the indicator result data and the identity identification information to the server;
向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;Sending a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。If the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
本申请实施例中的配置管理方法具体包括配置管理平台执行的如下步骤:The configuration management method in the embodiment of the present application specifically includes the following steps performed by the configuration management platform:
接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;Receiving a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;Sending a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identification information;
接收所述服务端根据所述指标检测的结果返回的操作指令;Receiving an operation instruction returned by the server according to the result of the indicator detection;
若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。If the operation instruction is to reject the submission, the client sends a prompt message rejecting the submission.
本申请实施例中的配置管理方法具体还包括服务端执行的如下步骤:The configuration management method in the embodiment of the present application further includes the following steps performed by the server:
接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;Receiving the indicator result data of the static code check report sent by the client and the identity identification information of the user, and storing the indicator result data and the identity identification information in the indicator database;
若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;And acquiring the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;Obtaining preset indicator standard data corresponding to the branch version information according to the branch version information;
从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;Obtaining, by the indicator database, the indicator result data corresponding to the identity identification information;
若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;If it is detected that the indicator result data satisfies the requirement of the indicator standard data, generating an operation instruction that is allowed to be submitted, otherwise generating an operation instruction that refuses to submit;
将所述操作指令发送给所述配置管理平台。The operation instruction is sent to the configuration management platform.
请参阅图2,图2示出了本实施例提供的配置管理方法的实现流程。详述如下:Referring to FIG. 2, FIG. 2 shows an implementation flow of the configuration management method provided by this embodiment. Details are as follows:
S101:客户端接收用户发送的代码提交申请信息,其中,该代码提交申请信息包含待提交代码的地址标识信息、用户的身份标识信息和分支版本信息。S101: The client receives the code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information.
在本申请实施例中,地址标识信息用于提取待提交的代码,身份标识信息用于唯一标记客户端的用户,分支版本信息用于标记待提交代码的版本信息。In the embodiment of the present application, the address identification information is used to extract the code to be submitted, the identity identification information is used to uniquely mark the user of the client, and the branch version information is used to mark the version information of the code to be submitted.
需要说明的是,地址标识信息可以是待提交代码的存储路径,比如“D:\workspace\demo_svn”,也可以是其他形式,在此不做限制。It should be noted that the address identifier information may be a storage path of the code to be submitted, such as “D:\workspace\demo_svn”, or other forms, and is not limited herein.
身份标识信息具体可以是注册的用户名或其他形式,在此不做限制。The identity information may specifically be a registered user name or other forms, and is not limited herein.
S102:客户端根据地址标识信息,获取待提交代码。S102: The client obtains the code to be submitted according to the address identification information.
在本申请实施例中,待提交代码是用户申请提交到配置管理平台的代码。In the embodiment of the present application, the code to be submitted is the code that the user applies to submit to the configuration management platform.
具体地,客户端根据步骤S101中的地址标识信息,找到与该地址标识信息对应的待提交代码的位置,对待提交代码进行获取。Specifically, the client finds the location of the to-be-committed code corresponding to the address identification information according to the address identification information in step S101, and acquires the code to be submitted.
S103:客户端对待提交代码进行静态代码检查,得到静态代码检查报告。S103: The client performs static code check on the submitted code to obtain a static code check report.
在本申请实施例中,静态代码检查是指根据实际应用需求,对待提交代码按照预设的检查指标进行检查。静态代码检查报告是对待提交代码进行静态代码检查得出的检查结果报告。In the embodiment of the present application, the static code check refers to checking the submitted code according to a preset check indicator according to actual application requirements. The static code inspection report is a check result report obtained by static code checking of the submitted code.
其中,预设的检查指标是根据实际业务需求,对待提交代码进行静态代码检查时配置的检查指标,包括单元测试、代码规范性检查、覆盖率和圈复杂度等检查指标。The preset inspection indicator is an inspection indicator configured when the static code is checked according to actual business requirements, including unit testing, code specification checking, coverage rate, and circle complexity.
需要说明的是,静态代码检查采用的检查方式可以是采用Eclipse插件平台检查或其他 插件集检查,此处不做限制。It should be noted that the static code check can be checked by Eclipse plug-in platform check or other plug-in set check. There is no restriction here.
优选地,采用Eclipse插件对待提交代码进行静态代码检查。Preferably, the Eclipse plugin is used to treat the submitted code for static code checking.
其中,Eclipse插件是一个开放源代码的、基于Java的可扩展开发平台,就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境,Eclipse插件附带了一个标准的插件集,可以实现对代码进行多个检查指标的检查,其检查指标包括单元测试(JunitTest)、代码Bug检查(FindBugs)、代码规范性检查(CheckSytle)、覆盖率(Coverage)和圈复杂度(Complexity)等。The Eclipse plugin is an open source, Java-based extensible development platform. For its part, it is just a framework and a set of services for building development environments through plug-in components. The Eclipse plug-in comes with a standard The set of plug-ins can check the code for multiple check indicators. The check indicators include unit test (JUnitTest), code bug check (FindBugs), code specification check (CheckSytle), coverage (coverage) and circle complexity ( Complexity) and so on.
具体地,客户端采用Eclipse插件对步骤S102中得到的待提交代码,按照预设的检查指标进行静态代码检查,得到每个检查指标下的静态代码检查报告,通过对待提交代码的静态代码检查,实现了对代码质量的衡量、检测代码存在的隐患和错误,使得用户能够根据检查结果及时修改错误代码和不符合规范要求的代码,得到有效合格的代码。Specifically, the client uses the Eclipse plug-in to perform the static code check on the to-be-submitted code obtained in step S102 according to the preset check indicator, and obtain a static code check report under each check indicator, and check the static code by submitting the code. The measurement of the quality of the code, the hidden dangers and errors of the detection code are realized, so that the user can timely modify the error code and the code that does not meet the specification according to the inspection result, and obtain the valid qualified code.
例如,如图3所示,图3显示了对“D:\workspace\demo_svn”目录下的待提交代码,按照检查指标“覆盖率”和“代码Bug检查”进行静态代码检查的检查报告,用户可以通过点击“详情展示”查看完整的静态代码扫描报告。For example, as shown in FIG. 3, FIG. 3 shows an inspection report for the static code check according to the check indicators "coverage rate" and "code bug check" for the code to be submitted in the "D:\workspace\demo_svn" directory, the user. You can view the full static code scan report by clicking on "Details".
S104:客户端对静态代码检查报告进行解析,按照预设的指标,提取该静态代码检查报告中的指标结果数据。S104: The client parses the static code check report, and extracts the indicator result data in the static code check report according to the preset indicator.
在本申请实施例中,客户端对静态代码检查报告进行解析可以是采用Eclipse插件会抓取静态代码检查报告,解析静态代码检查报告的内容,也可以采用其他插件集进行解析,在此不做限制。In the embodiment of the present application, the client parses the static code check report by using the Eclipse plug-in to capture the static code check report, parsing the content of the static code check report, or parsing other plug-in sets, and not doing this. limit.
预设的指标是根据实际应用需要进行设定的用于提取静态代码检查报告的内容中的指标结果数据,该指标包括单元测试junit失败个数、代码中文件流未关闭的错误代码、不符合管理员配置的代码质量sonar规范的坏味道代码和是否符合预设的代码书写风格要求等,其中,预设的代码书写风格要求可以是大括号是否换行或其他格式要求,在此不做限制。The preset indicator is the indicator result data in the content for extracting the static code check report, which is set according to the actual application requirement, and includes the number of unit test junit failures, the error code of the file stream not closed in the code, and the non-conformity. The code quality of the administrator configured is the bad taste code of the sonar specification and whether it conforms to the preset code writing style requirements, etc., wherein the preset code writing style requirement may be whether the braces are wrapped or other format requirements, and no limitation is imposed here.
指标结果数据是对静态代码检查报告的内容按照预设的指标,提取到的数据。The indicator result data is data extracted from the contents of the static code inspection report according to preset indicators.
具体地,客户端对步骤S103中得到的静态代码检查报告,采用Eclipse插件进行报告内容的解析,按照预设的指标,提取静态代码检查报告中的指标结果数据。Specifically, the client checks the report of the static code obtained in step S103, uses the Eclipse plug-in to parse the report content, and extracts the indicator result data in the static code check report according to the preset index.
S105:客户端将指标结果数据和身份标识信息发送给服务端。S105: The client sends the indicator result data and the identity identification information to the server.
具体地,客户端将步骤S104中得到待提交代码的指标结果数据和待提交代码对应的用户的身份标识信息发送给服务端,可以通过实时消息传输协议(Real Time Messaging Protocol,RTMP)进行传输。Specifically, the client sends the indicator result data of the user to be submitted in step S104 and the identity information of the user corresponding to the code to be submitted to the server, and can transmit the message through a real time message transmission protocol (RTMP).
S106:服务端接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将指标结果数据和身份标识信息对应存储于指标数据库中。S106: The server receives the indicator result data of the static code check report sent by the client and the identity identification information of the user, and stores the indicator result data and the identity identification information in the indicator database.
在本申请实施例中,指标数据库是用于存放服务端接收到的客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息。In the embodiment of the present application, the indicator database is used to store the indicator result data of the static code check report sent by the client received by the server and the identity identification information of the user.
需要说明的是,指标数据库中待提交代码的指标结果数据和待提交代码对应的用户的身份标识信息是唯一对应存储在的。It should be noted that the indicator result data of the code to be submitted in the indicator database and the identity information of the user corresponding to the code to be submitted are uniquely stored.
具体地,服务端通过RTMP协议接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息。Specifically, the server receives the indicator result data of the static code check report sent by the client and the identity identification information of the user through the RTMP protocol.
S107:客户端向配置管理平台发送代码提交请求,其中,该代码提交请求包含地址标识信息、身份标识信息和分支版本信息。S107: The client sends a code submission request to the configuration management platform, where the code submission request includes address identification information, identity identification information, and branch version information.
具体地,客户端通过RTMP协议向配置管理平台发送代码提交请求。Specifically, the client sends a code submission request to the configuration management platform through the RTMP protocol.
S108:配置管理平台接收客户端发送的代码提交请求,其中,该代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息。S108: The configuration management platform receives a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information.
具体地,配置管理平台通过RTMP协议接收客户端发送的代码提交请求。Specifically, the configuration management platform receives the code submission request sent by the client through the RTMP protocol.
S109:配置管理平台向服务端发送代码指标检测请求,以使服务端对待提交代码进行指标检测,其中,代码指标检测请求包含分支版本信息和身份标识信息。S109: The configuration management platform sends a code indicator detection request to the server, so that the server performs the indicator detection on the submitted code, where the code indicator detection request includes the branch version information and the identity identification information.
具体地,配置管理平台可以通过钩子函数HOOK的方式向服务端发送代码指标检测请求。Specifically, the configuration management platform may send a code indicator detection request to the server by means of a hook function HOOK.
其中,配置管理平台的钩子函数HOOK是在接收到客户端发送的代码提交请求时触发的一段逻辑,默认是无任何执行内容,用户可以根据应用需求写入shell脚本或者批处理bat脚本,通过该脚本向服务端的接口发出代码指标检测请求。The hook function HOOK of the configuration management platform is a piece of logic triggered when receiving a code submission request sent by the client. The default is that there is no execution content, and the user can write a shell script or a batch bat script according to the application requirement. The script issues a code indicator detection request to the server's interface.
需要说明的是,配置管理平台还可以通过交互消息的方式向服务端发送代码指标检测请求,具体可以根据实际应用的需要进行设置,在此不做限制。It should be noted that the configuration management platform may also send a code indicator detection request to the server by means of an interactive message, which may be set according to actual application requirements, and is not limited herein.
S110:若服务端接收到配置管理平台发送的代码指标检测请求,则服务端获取该代码指标检测请求中的分支版本信息和身份标识信息。S110: If the server receives the code indicator detection request sent by the configuration management platform, the server obtains the branch version information and the identity identification information in the code indicator detection request.
具体地,服务端通过RTMP协议接收到配置管理平台发送的代码指标检测请求。Specifically, the server receives the code indicator detection request sent by the configuration management platform by using the RTMP protocol.
S111:服务端根据分支版本信息,获取该分支版本信息对应的预设的指标标准数据。S111: The server obtains preset indicator standard data corresponding to the branch version information according to the branch version information.
在本申请实施例中,预设的指标标准数据是根据实际业务需求设置的检测标准,用于对指标结果数据进行指标检测,该预设的指标标准数据包括代码检测指标和该代码检测指标对应的目标值。In the embodiment of the present application, the preset indicator standard data is a detection standard set according to an actual service requirement, and is used to perform index detection on the indicator result data, where the preset indicator standard data includes a code detection indicator and a corresponding code detection indicator. The target value.
S112:服务端从指标数据库中获取身份标识信息对应的指标结果数据。S112: The server obtains the indicator result data corresponding to the identity identification information from the indicator database.
具体地,服务端根据步骤S110中接收到的代码指标检测请求,从指标数据库中,获取身份标识信息唯一对应的指标结果数据,其中,指标结果数据包括步骤S104中的预设的指标和该指标对应的数值。Specifically, the server obtains, according to the code indicator detection request received in step S110, the indicator result data that is uniquely corresponding to the identity identification information, where the indicator result data includes the preset indicator in step S104 and the indicator. Corresponding values.
S113:若服务端检测到指标结果数据满足指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令。S113: If the server detects that the indicator result data meets the requirement of the indicator standard data, generates an operation instruction that is allowed to be submitted, and otherwise generates an operation instruction that refuses to submit.
具体地,根据步骤S111中得到指标标准数据,对步骤S112中得到的指标结果数据进行指标检测,其中,指标检测是指检测指标结果数据中的预设的指标与按照指标标准数据中的代码检测指标有相同指标,将相同指标下的预设指标对应的数值和代码检测指标对应的数值进行比对,若比对结果为满足指标要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令。Specifically, the index detection is performed on the indicator result data obtained in step S112 according to the indicator standard data obtained in step S111, wherein the indicator detection refers to the preset indicator in the detection index result data and the code detection according to the indicator standard data. The indicator has the same indicator, and the value corresponding to the preset indicator under the same indicator is compared with the value corresponding to the code detection index. If the comparison result satisfies the requirement of the indicator, an operation instruction allowing the submission is generated, otherwise the operation of rejecting the submission is generated. instruction.
例如,假设预先配置的代码检测指标包括覆盖率和单元测试,目标值具体为覆盖率达到80%,单元测试失败个数小于3个,若指标结果数据中实际覆盖率为70%,并且单元测试实际失败个数为2个,则服务端确认实际覆盖率未达到目标覆盖率的要求,指标检测的结果为指标结果数据不满足指标标准数据的要求,对应生成拒绝提交的操作指令,若指标数据中实际覆盖率为86%,并且单元测试实际失败个数为2个,则服务端确认指标检测的结果为指标结果数据满足指标标准数据的要求,对应生成允许提交的操作指令。For example, suppose the pre-configured code detection indicators include coverage rate and unit test. The target value is specifically 80% coverage rate, and the number of unit test failures is less than 3. If the actual coverage rate of the indicator result data is 70%, and the unit test If the number of actual failures is two, the server confirms that the actual coverage rate does not meet the target coverage requirement. The result of the indicator detection is that the indicator result data does not meet the requirements of the indicator standard data, and correspondingly generates an operation instruction that refuses to submit, if the indicator data The actual coverage rate is 86%, and the actual number of unit test failures is 2. The result of the server-side verification indicator detection is that the indicator result data meets the requirements of the indicator standard data, and correspondingly generates an operation instruction that is allowed to be submitted.
S114:服务端将操作指令发送给配置管理平台。S114: The server sends an operation instruction to the configuration management platform.
具体地,服务端可以通过套接字(socket)进程通信将操作指令发送给配置管理平台。Specifically, the server can send an operation instruction to the configuration management platform through a socket process communication.
需要说明的是,当服务端向配置管理平台发送允许提交的操作指令后,服务端将保存在指标数据库中的指标结果数据和用户的身份标识信息置为无效,以确保每次代码提交时指标数据库中保存的指标结果数据和用户的身份标识信息为当次待提交代码对应的信息。It should be noted that, after the server sends an operation instruction that is allowed to be submitted to the configuration management platform, the server invalidates the indicator result data and the user identity information stored in the indicator database to ensure that the indicator is submitted every time the code is submitted. The indicator result data and the user's identity information stored in the database are the information corresponding to the code to be submitted.
S115:配置管理平台接收服务端根据指标检测的结果返回的操作指令。S115: The configuration management platform receives an operation instruction returned by the server according to the result of the indicator detection.
具体地,配置管理平台可以通过socket进程通信接收服务端根据指标检测的结果返回的操作指令,其中,该操作指令包括允许提交和拒绝提交。Specifically, the configuration management platform may receive, by using the socket process communication, an operation instruction returned by the server according to the result of the indicator detection, where the operation instruction includes allowing submission and rejecting the submission.
S116:若配置管理平台接收的操作指令为允许提交,则配置管理平台根据地址标识信息获取待提交代码,将该待提交代码合入分支版本信息对应的分支版本中,并向客户端发送成功提交的提示信息。S116: If the operation instruction received by the configuration management platform is allowed to be submitted, the configuration management platform acquires the to-be-submitted code according to the address identification information, merges the to-be-committed code into the branch version corresponding to the branch version information, and sends the successful submission to the client. Tip message.
具体地,操作指令为允许提交时,配置管理平台根据步骤S108中的地址标识信息获 取待提交代码,从而根据待提交代码的分支版本信息,将该待提交代码合入分支版本信息对应的分支版本中,并向客户端发送成功提交的提示信息。Specifically, when the operation instruction is to allow the submission, the configuration management platform acquires the to-be-committed code according to the address identification information in step S108, and then merges the to-be-submitted code into the branch version corresponding to the branch version information according to the branch version information of the to-be-committed code. And send a prompt message to the client for successful submission.
其中,成功提交的提示信息包括成功提交的代码对应的身份标识信息和成功提交代码的时间等。The prompt information successfully submitted includes the identity identification information corresponding to the successfully submitted code and the time of successfully submitting the code.
S117:若配置管理平台接收的操作指令为拒绝提交,则配置管理平台向客户端发送拒绝提交的提示信息。S117: If the operation instruction received by the configuration management platform is to reject the submission, the configuration management platform sends the prompt information for rejecting the submission to the client.
在本申请实施例中,拒绝提交的提示信息包括被拒绝提交的代码对应的身份标识信息、拒绝提交代码的时间和拒绝提交代码的原因等,比如,拒绝提交代码的原因可以是“FAIL-CPH006-EMMA”,代表单元测试的覆盖率不符合要求。In the embodiment of the present application, the prompt information for rejecting the submission includes the identity identification information corresponding to the code rejected by the submission, the time of rejecting the submission of the code, and the reason for rejecting the submission of the code, for example, the reason for rejecting the submission of the code may be “FAIL-CPH006”. -EMMA", indicating that the coverage of the unit test does not meet the requirements.
S118:若客户端接收到配置管理平台发送的包含提交结果的提示信息,则客户端将该提示信息反馈给用户。S118: If the client receives the prompt information sent by the configuration management platform and includes the submission result, the client feeds back the prompt information to the user.
具体地,若客户端接收到配置管理平台发送的提示信息为成功提交,则根据提示信息中成功提交的代码对应的身份标识信息,找到对应的用户,将该提示信息反馈给该用户。Specifically, if the client receives the prompt information sent by the configuration management platform as the successful submission, the corresponding user is found according to the identity identification information corresponding to the successfully submitted code in the prompt information, and the prompt information is fed back to the user.
若客户端接收到配置管理平台发送的提示信息为拒绝提交,则根据提示信息中被拒绝提交的代码对应的身份标识信息,找到对应的用户,将该提示信息反馈给该用户。If the client receives the prompt information sent by the configuration management platform to reject the submission, the corresponding user is found according to the identity identification information corresponding to the code that is rejected in the prompt information, and the prompt information is fed back to the user.
在图2对应的实施例中,当客户端接收到用户发送的代码提交申请时,在向配置管理平台发送代码提交请求之前,先在客户端使用代码检测工具对代码进行静态检查,是在正式提交源代码之前,系统可以自动进行静态代码检查,快速获取检查报告和检查结果,配置管理平台在接收到客户端发送的代码提交请求后,要求服务端对检查结果进行指标检测,只有当指标检测通过时才允许提交代码,实现了对代码质量的衡量,可以检测出代码存在的隐患和错误,使得用户能够根据检查结果及时修改错误代码和不符合规范要求的代码,得到有效合格的代码,从而降低配置管理平台SVN代码库中的代码风险,降低代码上传到配置管理平台正式库之后的修改成本,节省了人工对代码审核的时间,提高代码开发效率,同时,在客户端完成静态代码检查,并且在服务端完成代码指标检测,实现了将配置管理平台的开销分摊到了各个客户端和服务端来完成,从而降低配置管理平台的负荷,尤其是当用户较多,出现大并发代码提交到配置管理平台的情况时,能够有效避免配置管理平台的性能瓶颈,提高配置管理平台的性能水平,提高系统运行过程中的性能及系统的可扩展性,进一步提高代码开发效率。In the embodiment corresponding to FIG. 2, when the client receives the code submission application sent by the user, before the code submission request is sent to the configuration management platform, the client uses the code detection tool to statically check the code, which is formal. Before submitting the source code, the system can automatically perform static code check to quickly obtain the inspection report and check result. After receiving the code submission request sent by the client, the configuration management platform requires the server to perform the indicator detection on the inspection result, only when the indicator is detected. When the code is allowed to pass, the code quality is measured, and the hidden dangers and errors of the code can be detected, so that the user can timely modify the error code and the code that does not meet the specification according to the inspection result, and obtain the valid qualified code, thereby Reduce the code risk in the SVN code base of the configuration management platform, reduce the modification cost after the code is uploaded to the formal management platform of the configuration management platform, save the time for manual review of the code, improve the efficiency of code development, and complete the static code check on the client side. And finished at the server The detection of the code indicator realizes that the cost of the configuration management platform is distributed to each client and server to complete, thereby reducing the load of the configuration management platform, especially when there are many users, and large concurrent code is submitted to the configuration management platform. The performance bottleneck of the configuration management platform can be effectively avoided, the performance level of the configuration management platform can be improved, the performance during the system running process and the scalability of the system can be improved, and the code development efficiency can be further improved.
接下来,在图2对应的实施例的基础之上,在步骤S101提及的接收用户发送的代码提交申请信息之后,客户端还包括对用户的特批权限申请的处理过程。Next, on the basis of the embodiment corresponding to FIG. 2, after receiving the application information sent by the user mentioned in step S101, the client further includes a process of processing the special approval request for the user.
在本申请实施例中,代码提交申请信息还包括用户的特批申请标识,特批申请标识是用于给待提交代码申请特批权限的标识信息。In the embodiment of the present application, the code submission application information further includes a special batch application identifier of the user, and the special batch application identifier is identifier information used for applying the special approval authority to the code to be submitted.
其中,特批权限是指是在代码提交配置管理平台SVN代码库之前,用于待提交代码被拒绝提交时,可以不考虑检测结果,允许代码提交,直接合入分支版本号,满足实际应用所需,提高代码的可用性。Among them, the special batch permission means that before the code is submitted to the SVN code base of the configuration management platform, when the code to be submitted is rejected, the test result may be disregarded, the code is allowed to be submitted, and the branch version number is directly incorporated to satisfy the actual application. Need to improve the usability of the code.
请参阅图4,图4示出了本申请实施例提供的客户端对用户的特批权限申请的处理具体实现流程,详述如下:Referring to FIG. 4, FIG. 4 shows a specific implementation process of the client-to-user special grant permission application provided by the embodiment of the present application, which is described in detail as follows:
S401:客户端根据特批申请标识,向预设的审批员发送特批权限申请。S401: The client sends a special permission application to the preset approver according to the special approval application identifier.
在本申请实施例中,预设的审批员是预先设置的设置特批权限的工作人员,审批员接收到特批权限申请,会根据审批条件,对特批申请标识对应的待提交代码进行特批权限的审批,其中,审批条件为根据实际应用和业务需要进行设定的。In the embodiment of the present application, the preset approver is a preset staff member who sets the special approval authority, and the approver receives the special approval authority application, and according to the approval condition, the special pending application code corresponding to the special approval identifier is specially made. Approval of batch permissions, where the approval conditions are set according to actual application and business needs.
具体地,当客户端接收到特批申请标识时,则确认待提交代码需要进行特批申请,则将用户的身份标识信息和分支版本信息发送预设的审批员进行特批权限申请。Specifically, when the client receives the special batch application identifier, if it is confirmed that the to-be-submitted code needs to be specially applied, the user's identity identification information and the branch version information are sent to the preset approver for special permission application.
其中,发送方式可以是邮件,即时消息等,在此不做限制。The sending method may be a mail, an instant message, etc., and is not limited herein.
S402:若客户端接收到审批员返回的审批结果为特批申请成功,则客户端将用户的特 批权限标识信息和用户的身份标识信息发送给配置管理平台,以使配置管理平台将特批权限标识信息与身份标识信息对应保存在权限数据库中。S402: If the client receives the approval result returned by the approver as a special batch application, the client sends the user's special permission identification information and the user identity information to the configuration management platform, so that the configuration management platform will be specially approved. The permission identification information is stored in the permission database corresponding to the identity identification information.
在本申请实施例中,权限数据库是用于存放配置管理平台接收到客户端发送的用户的特批权限标识信息与用户的身份标识信息。In the embodiment of the present application, the permission database is used to store the special authorization identification information of the user sent by the configuration management platform and the identity identification information of the user.
其中,特批权限标识信息包括允许待提交代码直接合入的分支版本信息。The special batch identification information includes branch version information that allows the code to be submitted to be directly joined.
具体地,根据步骤S401中的向审批员发送特批权限申请,审批员对特批申请标识进行审批,满足审批条件需要的,则审批结果为特批申请成功,并将该审批结果返回给客户端。Specifically, according to the special permission application sent to the approver in step S401, the examiner approves the special approval application and meets the approval conditions, the approval result is that the special application is successful, and the approval result is returned to the customer. end.
客户端根据该审批结果,生成与特批申请标识对应的特批权限标识信息,该特批权限标识信息用于标识用户对待提交代码对应的分支版本是否有直接合入的权限,该特批权限标识信息具体可以为待提交代码对应的分支版本的分支版本信息。The client generates the special batch identification information corresponding to the special batch application identifier according to the approval result, and the special batch authorization identifier information is used to identify whether the user has the right to directly join the branch version corresponding to the submitted code, and the special batch permission The identifier information may specifically be the branch version information of the branch version corresponding to the code to be submitted.
客户端将该特批权限标识信息和用户的身份标识信息发送给配置管理平台,以使配置管理平台将特批权限标识信息与身份标识信息对应保存在权限数据库中。The client sends the special permission identification information and the user identification information to the configuration management platform, so that the configuration management platform saves the special authorization identification information and the identity identification information in the permission database.
在图4对应的实施例中,客户端根据特批申请标识,向预设的审批员发送特批权限申请,并将申请成功的特批权限标识信息和用户的身份标识信息发送给配置管理平台,可以使得配置管理平台将特批权限标识信息与身份标识信息对应保存在权限数据库中,便于后续待提交代码被拒绝提交时,存在特批权限标识信息的条件下,可以不考虑检测结果,允许代码提交,直接合入分支版本中,满足实际应用所需,提高代码的可用性。In the embodiment corresponding to FIG. 4, the client sends a special permission application to the preset approver according to the special application identifier, and sends the special authorization identification information and the user identification information of the successful application to the configuration management platform. The configuration management platform may save the special batch identification information and the identity identification information in the permission database, so that when the pending code to be submitted is rejected, if the special permission identification information exists, the detection result may be disregarded. Code submission, directly into the branch version, to meet the needs of the actual application, improve the usability of the code.
在图2对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S117中所提及的若配置管理平台接收的操作指令为拒绝提交,则配置管理平台向客户端发送拒绝提交的提示信息的具体实现方法进行详细说明。On the basis of the corresponding embodiment of FIG. 2, the configuration management platform sends a rejection submission to the client, if the operation instruction received by the configuration management platform mentioned in step S117 is rejected, by a specific embodiment. The specific implementation method of the prompt information is described in detail.
请参阅图5,图5示出了本申请实施例提供的步骤S117的具体实现流程,详述如下:Referring to FIG. 5, FIG. 5 shows a specific implementation process of step S117 provided by the embodiment of the present application, which is described in detail as follows:
S501:当配置管理平台接收的操作指令为拒绝提交时,配置管理平台从权限数据库中查询用户的身份标识信息对应的特批权限标识信息。S501: When the operation instruction received by the configuration management platform is to reject the submission, the configuration management platform queries the permission database for the special batch identification information corresponding to the identity information of the user.
具体地,当配置管理平台接收的操作指令为拒绝提交时,配置管理平台先从权限数据库中确认是否存在待提交代码对应的身份标识信息,若存在,则继续查询权限数据库中与该身份标识信息对应的特批权限标识信息是否不为空。Specifically, when the operation instruction received by the configuration management platform is to reject the submission, the configuration management platform first confirms whether there is identity identification information corresponding to the to-be-committed code from the permission database, and if yes, continues to query the identity database and the identity identification information. Whether the corresponding special batch identification information is not empty.
S502:若配置管理平台在权限数据库中查询到身份标识信息对应的特批权限标识信息不为空,则配置管理平台根据地址标识信息获取待提交代码,将该待提交代码合入分支版本信息对应的分支版本中,并向客户端发送特批权限成功提交的提示信息。S502: If the configuration management platform queries the privilege database to query the privilege identifier information corresponding to the identity information, the configuration management platform obtains the to-be-submitted code according to the address identification information, and the code to be submitted is merged into the branch version information. In the branch version, and send the prompt message to the client for the successful submission of the special batch permission.
具体地,配置管理平台在权限数据库中查询身份标识信息对应的特批权限标识信息,若查询到该特批权限标识信息不为空,则获取该特批权限标识信息保存的允许直接合入的分支版本信息,若该允许直接合入的分支版本信息与当前待合入的分支版本信息相同,则根据步骤S108中的地址标识信息获取待提交代码,根据待提交代码对应的分支版本信息,将该待提交代码合入分支版本信息对应的分支版本中,并通过RTMP协议向客户端发送特批权限成功提交的提示信息。Specifically, the configuration management platform queries the permission database for the special batch identification information corresponding to the identity identification information, and if the special permission identification information is not empty, obtaining the permission to directly join the special permission identification information. The branch version information, if the branch version information that is directly allowed to be merged is the same as the branch version information to be merged, the code to be submitted is obtained according to the address identification information in step S108, and the branch version information corresponding to the code to be submitted is used. The code to be submitted is merged into the branch version corresponding to the branch version information, and the prompt information successfully submitted by the special batch permission is sent to the client through the RTMP protocol.
其中,特批权限成功提交的提示信息包括特批权限标识信息对应的身份标识信息、特批权限信息和成功提交代码的时间等。The prompt information successfully submitted by the special batch permission includes the identity identification information corresponding to the special batch permission identification information, the special batch permission information, and the time of successfully submitting the code.
需要说明的是,当配置管理平台向客户端发送特批权限成功提交的提示信息后,配置管理平台将保存在权限数据库中的该身份标识信息对应的特批权限标识信息置为无效,以确保每次代码提交时权限数据库中保存的特批权限标识信息为当次待提交代码对应的权限信息。It should be noted that, after the configuration management platform sends the prompt information successfully submitted by the special batch permission to the client, the configuration management platform invalidates the special batch identification information corresponding to the identity identification information saved in the permission database to ensure The special batch identification information saved in the permission database each time the code is submitted is the permission information corresponding to the code to be submitted.
S503:若配置管理平台在权限数据库中未查询到身份标识信息,或者查询到身份标识信息对应的特批权限标识信息为空,则配置管理平台向客户端发送拒绝提交的提示信息。S503: If the configuration management platform does not query the identity information in the permission database, or if the special permission identification information corresponding to the identity identification information is empty, the configuration management platform sends the prompt information that the rejection submission is sent to the client.
具体地,未查询到待提交代码对应的身份标识信息,或者在权限数据库中不存在与该 身份标识信息对应的特批权限标识信息,则拒绝该待提交代码的提交,配置管理平台通过RTMP协议向客户端发送拒绝提交的提示信息。Specifically, the identity identification information corresponding to the to-be-committed code is not queried, or the special batch identification information corresponding to the identity identification information does not exist in the permission database, and the submission of the to-be-submitted code is rejected, and the configuration management platform passes the RTMP protocol. Send a message to the client rejecting the submission.
在图5对应的实施例中,当配置管理平台接收的操作指令为拒绝提交时,通过从权限数据库中查询用户的身份标识信息对应的特批权限标识信息,对特批权限标识信息不为空的,获取该特批权限标识信息保存的允许直接合入的分支版本信息,若该允许直接合入的分支版本信息与当前待合入的分支版本信息相同,则该待提交代码合入分支版本信息对应的分支版本中,完成代码提交,同时,对不存在身份标识信息或特批权限标识信息为空的待提交代码则拒绝提交,实现了在实际应用需要的条件下,代码瑕疵可接受的范围内,可以不考虑检测结果,允许代码的提交和使用,提升了代码的可用性和实用性,从而促进代码的开发效率的提高。In the embodiment corresponding to FIG. 5, when the operation instruction received by the configuration management platform is a rejection submission, the special batch identification information is not empty by querying the special authorization identification information corresponding to the user identification information from the permission database. If the branch version information that is allowed to be directly joined is the same as the branch version information to be merged, the code to be submitted is merged into the branch version information. In the corresponding branch version, the code submission is completed, and at the same time, the pending code that does not have the identity information or the special permission identification information is empty, the submission is rejected, and the code 瑕疵 acceptable range is realized under the condition that the actual application needs. Within the scope of the test, the code can be submitted and used without any consideration, which improves the usability and usability of the code, thereby promoting the efficiency of code development.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence of the steps in the above embodiments does not mean that the order of execution is performed. The order of execution of each process should be determined by its function and internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
实施例2Example 2
对应于实施例1中的配置管理方法,图6示出了与实施例1提供的配置管理方法一一对应的配置管理装置,该配置管理装置包括客户端、配置管理平台和服务端。为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the configuration management method in Embodiment 1, FIG. 6 shows a configuration management apparatus corresponding to the configuration management method provided in Embodiment 1, which includes a client, a configuration management platform, and a server. For the convenience of description, only the parts related to the embodiments of the present application are shown.
如图6所示,该配置管理装置的客户端包括:申请接收模块601、代码获取模块602、代码检查模块603、指标提取模块604、指标发送模块605、请求发送模块606和信息反馈模块607。各功能模块详细说明如下:As shown in FIG. 6, the client of the configuration management apparatus includes: an application receiving module 601, a code obtaining module 602, a code checking module 603, an index extracting module 604, an index sending module 605, a request sending module 606, and an information feedback module 607. Each function module is described in detail as follows:
申请接收模块601,用于接收用户发送的代码提交申请信息,其中,代码提交申请信息包含待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;The application receiving module 601 is configured to receive code submission application information sent by the user, where the code submission application information includes address identification information of the code to be submitted, identity identification information of the user, and branch version information;
代码获取模块602,用于根据地址标识信息,获取待提交代码;The code obtaining module 602 is configured to obtain a code to be submitted according to the address identification information.
代码检查模块603,用于对待提交代码进行静态代码检查,得到静态代码检查报告;The code checking module 603 is configured to perform static code check on the submitted code to obtain a static code check report;
指标提取模块604,用于对静态代码检查报告进行解析,按照预设的指标,提取静态代码检查报告中的指标结果数据;The indicator extraction module 604 is configured to parse the static code inspection report, and extract the indicator result data in the static code inspection report according to the preset indicator;
指标发送模块605,用于将指标结果数据和身份标识信息发送给服务端;The indicator sending module 605 is configured to send the indicator result data and the identity identification information to the server;
请求发送模块606,用于向配置管理平台发送代码提交请求,其中,代码提交请求包含地址标识信息、身份标识信息和分支版本信息;The request sending module 606 is configured to send a code submission request to the configuration management platform, where the code submission request includes address identification information, identity identification information, and branch version information;
信息反馈模块607,用于若接收到配置管理平台发送的包含提交结果的提示信息,则将提示信息反馈给用户。The information feedback module 607 is configured to: when receiving the prompt information that is sent by the configuration management platform and including the submission result, feed the prompt information to the user.
进一步地,代码提交申请信息还包括用户的特批申请标识,该配置管理装置的客户端还包括:Further, the code submission application information further includes a special application identifier of the user, and the client of the configuration management device further includes:
权限申请模块619,用于根据特批申请标识,向预设的审批员发送特批权限申请;The permission application module 619 is configured to send a special permission application to the preset approver according to the special approval application identifier;
权限发送模块620,用于若接收到审批员返回的审批结果为特批申请成功,则将用户的特批权限标识信息和用户的身份标识信息发送给配置管理平台,以使配置管理平台将特批权限标识信息与身份标识信息对应保存在权限数据库中。The permission sending module 620 is configured to: if the approval result returned by the approver is that the special batch application is successful, send the special authorization identification information of the user and the identity identification information of the user to the configuration management platform, so that the configuration management platform will The batch permission identification information is stored in the authority database corresponding to the identity identification information.
请继续参阅图6,如图6所示,该配置管理装置的配置管理平台包括:请求接收模块608、指标检测模块609、指令接收模块610、代码提交模块611和信息发送模块612。各功能模块详细说明如下:Referring to FIG. 6 , as shown in FIG. 6 , the configuration management platform of the configuration management apparatus includes: a request receiving module 608 , an indicator detecting module 609 , an instruction receiving module 610 , a code submitting module 611 , and an information sending module 612 . Each function module is described in detail as follows:
请求接收模块608,用于接收客户端发送的代码提交请求,其中,代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;The request receiving module 608 is configured to receive a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
指标检测模块609,用于向服务端发送代码指标检测请求,以使服务端对待提交代码进行指标检测,其中,代码指标检测请求包含分支版本信息和身份标识信息;The indicator detection module 609 is configured to send a code indicator detection request to the server, so that the server performs the indicator detection on the submitted code, where the code indicator detection request includes the branch version information and the identity identification information;
指令接收模块610,用于接收服务端根据指标检测的结果返回的操作指令;The instruction receiving module 610 is configured to receive an operation instruction returned by the server according to the result of the indicator detection;
代码提交模块611,用于若操作指令为允许提交,则根据地址标识信息获取待提交代 码,将待提交代码合入分支版本信息对应的分支版本中,并向客户端发送成功提交的提示信息;The code submission module 611 is configured to: if the operation instruction is to allow the submission, obtain the code to be submitted according to the address identification information, merge the code to be submitted into the branch version corresponding to the branch version information, and send the prompt information successfully submitted to the client;
信息发送模块612,用于若操作指令为拒绝提交,则向客户端发送拒绝提交的提示信息。The information sending module 612 is configured to send the prompt information for rejecting the submission to the client if the operation instruction is to reject the submission.
进一步地,信息发送模块612包括:Further, the information sending module 612 includes:
权限查询单元6121,用于当操作指令为拒绝提交时,从权限数据库中查询用户的身份标识信息对应的特批权限标识信息;The permission query unit 6121 is configured to query the special batch authorization information corresponding to the identity information of the user from the permission database when the operation instruction is to reject the submission;
代码提交单元6122,用于若在权限数据库中查询到身份标识信息对应的特批权限标识信息不为空,则根据地址标识信息获取待提交代码,将待提交代码合入分支版本信息对应的分支版本中,并向客户端发送特批权限成功提交的提示信息;The code submitting unit 6122 is configured to: if the special batch identification information corresponding to the identity identification information is not empty in the permission database, obtain the to-be-submitted code according to the address identification information, and merge the to-be-committed code into the branch corresponding to the branch version information. In the version, and send a prompt message to the client that the special batch permission is successfully submitted;
信息发送单元6123,用于若在权限数据库中未查询到身份标识信息,或者查询到身份标识信息对应的特批权限标识信息为空,则向客户端发送拒绝提交的提示信息。The information sending unit 6123 is configured to send the prompt information that refuses to submit to the client if the identity identification information is not queried in the authority database, or the special batch identification information corresponding to the identity identification information is vacant.
请继续参阅图6,如图6所示,该配置管理装置的服务端包括:指标接收模块613、信息获取模块614、数据获取模块615、指标获取模块616、指令生成模块617和指令发送模块618。各功能模块详细说明如下:Referring to FIG. 6 , as shown in FIG. 6 , the server of the configuration management apparatus includes: an indicator receiving module 613 , an information acquiring module 614 , a data acquiring module 615 , an index obtaining module 616 , an instruction generating module 617 , and an instruction sending module 618 . . Each function module is described in detail as follows:
指标接收模块613,用于接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将指标结果数据和身份标识信息对应存储于指标数据库中;The indicator receiving module 613 is configured to receive the indicator result data of the static code check report sent by the client and the identity identification information of the user, and store the indicator result data and the identity identification information in the indicator database;
信息获取模块614,用于若接收到配置管理平台发送的代码指标检测请求,则获取代码指标检测请求中的分支版本信息和身份标识信息;The information obtaining module 614 is configured to: obtain the branch version information and the identity identification information in the code indicator detection request, if receiving the code indicator detection request sent by the configuration management platform;
数据获取模块615,用于根据分支版本信息,获取分支版本信息对应的预设的指标标准数据;The data obtaining module 615 is configured to obtain preset index standard data corresponding to the branch version information according to the branch version information.
指标获取模块616,用于从指标数据库中获取身份标识信息对应的指标结果数据;The indicator obtaining module 616 is configured to obtain indicator result data corresponding to the identity identification information from the indicator database;
指令生成模块617,用于若检测到指标结果数据满足指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;The instruction generating module 617 is configured to: if it is detected that the indicator result data meets the requirement of the indicator standard data, generate an operation instruction that is allowed to be submitted; otherwise, generate an operation instruction that rejects the submission;
指令发送模块618,用于将操作指令发送给配置管理平台。The instruction sending module 618 is configured to send the operation instruction to the configuration management platform.
本实施例提供的一种配置管理装置中各模块实现各自功能的过程,具体可参考前述实施例1的描述,此处不再赘述。For the process of implementing the respective functions of the modules in the configuration management apparatus provided in this embodiment, refer to the description of the foregoing Embodiment 1, and details are not described herein again.
实施例3Example 3
本实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行时实现实施例1中的配置管理方法。为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现实施例2中配置管理装置中各模块/单元的功能。为避免重复,这里不再赘述。The present embodiment provides one or more non-volatile readable storage media having computer readable instructions stored thereon, the one or more non-readable readable storage media storing computer readable instructions, the computer readable instructions being The configuration management method in Embodiment 1 is implemented when one or more processors are executed, when one or more processors are executed. To avoid repetition, we will not repeat them here. Alternatively, the functions of the modules/units in the configuration management apparatus in Embodiment 2 are implemented when the computer readable instructions are executed by the processor. To avoid repetition, we will not repeat them here.
可以理解地,一个或多个存储有计算机可读指令的非易失性可读存储介质包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电载波信号和电信信号等。It will be understood that one or more non-volatile readable storage media storing computer readable instructions comprise: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic Disc, optical disc, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signals, and telecommunications signals.
实施例4Example 4
图7是本申请一实施例提供的终端设备的示意图。如图7所示,该实施例的终端设备70包括:处理器71、存储器72以及存储在存储器72中并可在处理器71上运行的计算机可读指令73,例如配置管理方法的程序。处理器71执行计算机可读指令73时实现上述各个配置管理方法实施例中的步骤,例如图1所示的步骤S101至步骤S118。或者,处理器71执行计算机可读指令73时实现上述各装置实施例中各模块/单元的功能,例如图7所示客户端的模块601至模块607的功能,配置管理平台的模块608至模块612的功能,以及服务端的模块613至模块618的功能。FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in FIG. 7, the terminal device 70 of this embodiment includes a processor 71, a memory 72, and a program readable by computer readable instructions 73, such as a configuration management method, stored in the memory 72 and executable on the processor 71. When the processor 71 executes the computer readable instructions 73, the steps in the above embodiments of the respective configuration management methods are implemented, such as steps S101 to S118 shown in FIG. Alternatively, when the processor 71 executes the computer readable instructions 73, the functions of the modules/units in the foregoing device embodiments are implemented, for example, the functions of the modules 601 to 607 of the client shown in FIG. 7, and the modules 608 to 612 of the configuration management platform are configured. The function, as well as the functionality of the module 613 to the module 618 on the server side.
示例性的,计算机可读指令73可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器72中,并由处理器71执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令的指令段,该指令段用于描述计算机可读指令73在终端设备70中的执行过程。例如,计算机可读指令73可以被分割成申请接收模块、代码获取模块、代码检查模块、指标提取模块、指标发送模块、请求发送模块和信息反馈模块。各模块的具体功能如实施例2所示,为避免重复,此处不一一赘述。Illustratively, computer readable instructions 73 may be partitioned into one or more modules/units, one or more modules/units being stored in memory 72 and executed by processor 71 to complete the application. The one or more modules/units may be an instruction segment of a series of computer readable instructions capable of performing a particular function, which is used to describe the execution of computer readable instructions 73 in the terminal device 70. For example, the computer readable instructions 73 may be divided into an application receiving module, a code acquisition module, a code checking module, an index extraction module, an indicator sending module, a request sending module, and an information feedback module. The specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
计算机可读指令73还可以被分割成请求接收模块、指标检测模块、指令接收模块、代码提交模块和信息发送模块。各模块的具体功能如实施例2所示,为避免重复,此处不一一赘述。The computer readable instructions 73 may also be partitioned into a request receiving module, an indicator detecting module, an instruction receiving module, a code submitting module, and an information transmitting module. The specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
计算机可读指令73还可以被分割成指标接收模块、信息获取模块、数据获取模块、指标获取模块、指令生成模块和指令发送模块。各模块的具体功能如实施例2所示,为避免重复,此处不一一赘述。The computer readable instructions 73 may also be divided into an indicator receiving module, an information acquiring module, a data acquiring module, an index obtaining module, an instruction generating module, and an instruction sending module. The specific functions of the modules are as shown in Embodiment 2. To avoid repetition, details are not described herein.
终端设备70可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。终端设备70可包括,但不仅限于,处理器71、存储器72。本领域技术人员可以理解,图7仅仅是终端设备70的示例,并不构成对终端设备70的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如终端设备70还可以包括输入输出设备、网络接入设备、总线等。The terminal device 70 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. Terminal device 70 may include, but is not limited to, processor 71, memory 72. It will be understood by those skilled in the art that FIG. 7 is merely an example of the terminal device 70, and does not constitute a limitation of the terminal device 70, and may include more or less components than those illustrated, or may combine certain components or different components. For example, the terminal device 70 may further include an input/output device, a network access device, a bus, and the like.
所称处理器71可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 71 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
存储器72可以是终端设备70的内部存储单元,例如终端设备70的硬盘或内存。存储器72也可以是终端设备70的外部存储设备,例如终端设备70上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器72还可以既包括终端设备70的内部存储单元也包括外部存储设备。存储器72用于存储计算机可读指令以及终端设备70所需的其他程序和数据。存储器72还可以用于暂时地存储已经输出或者将要输出的数据。The memory 72 may be an internal storage unit of the terminal device 70, such as a hard disk or a memory of the terminal device 70. The memory 72 may also be an external storage device of the terminal device 70, such as a plug-in hard disk provided on the terminal device 70, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on. Further, the memory 72 may also include both an internal storage unit of the terminal device 70 and an external storage device. Memory 72 is used to store computer readable instructions as well as other programs and data required by terminal device 70. The memory 72 can also be used to temporarily store data that has been or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。It will be apparent to those skilled in the art that, for convenience and brevity of description, only the division of each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned to different functional units as needed. The module is completed by dividing the internal structure of the device into different functional units or modules to perform all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still implement the foregoing embodiments. The technical solutions described in the examples are modified or equivalently replaced with some of the technical features; and the modifications or substitutions do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种配置管理方法,其特征在于,所述配置管理方法包括客户端执行的如下步骤:A configuration management method, characterized in that the configuration management method comprises the following steps performed by a client:
    接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;Receiving code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    根据所述地址标识信息,获取所述待提交代码;Obtaining the to-be-committed code according to the address identification information;
    对所述待提交代码进行静态代码检查,得到静态代码检查报告;Performing static code check on the to-be-committed code to obtain a static code check report;
    对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;Parsing the static code check report, and extracting indicator result data in the static code check report according to a preset indicator;
    将所述指标结果数据和所述身份标识信息发送给服务端;Sending the indicator result data and the identity identification information to the server;
    向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;Sending a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
    若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。If the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
  2. 如权利要求1所述的配置管理方法,其特征在于,所述代码提交申请信息还包括所述用户的特批申请标识,在所述接收用户发送的代码提交申请信息之后,所述配置管理方法还包括客户端执行的如下步骤:The configuration management method according to claim 1, wherein the code submission application information further includes a special batch application identifier of the user, and the configuration management method is performed after the code sent by the receiving user submits the application information. It also includes the following steps performed by the client:
    根据所述特批申请标识,向预设的审批员发送特批权限申请;Sending a special approval authority application to the preset approver according to the special approval application identifier;
    若接收到所述审批员返回的审批结果为特批申请成功,则将所述用户的特批权限标识信息和所述用户的身份标识信息发送给所述配置管理平台,以使所述配置管理平台将所述特批权限标识信息与所述身份标识信息对应保存在权限数据库中。And if the approval result returned by the approver is that the special batch application is successful, sending the special batch permission identification information of the user and the identity identification information of the user to the configuration management platform, so that the configuration management is performed. The platform saves the special batch identification information and the identity information in a permission database.
  3. 一种配置管理方法,其特征在于,所述配置管理方法包括配置管理平台执行的如下步骤:A configuration management method, characterized in that the configuration management method comprises the following steps performed by the configuration management platform:
    接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;Receiving a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;Sending a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identification information;
    接收所述服务端根据所述指标检测的结果返回的操作指令;Receiving an operation instruction returned by the server according to the result of the indicator detection;
    若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
    若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。If the operation instruction is to reject the submission, the client sends a prompt message rejecting the submission.
  4. 如权利要求3所述的配置管理方法,其特征在于,所述若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息包括:The configuration management method according to claim 3, wherein if the operation instruction is to reject the submission, sending the prompt information to the client to reject the submission includes:
    当所述操作指令为拒绝提交时,从权限数据库中查询所述用户的身份标识信息对应的特批权限标识信息;When the operation instruction is to reject the submission, the special permission identification information corresponding to the identity identification information of the user is queried from the permission database;
    若在所述权限数据库中查询到所述身份标识信息对应的特批权限标识信息不为空,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送特批权限成功提交的提示信息;And if the privilege identifier information corresponding to the identifier information is not empty, the code to be submitted is obtained according to the address identifier information, and the code to be submitted is merged into the branch. In the branch version corresponding to the version information, and sending the prompt information successfully submitted by the special batch permission to the client;
    若在所述权限数据库中未查询到所述身份标识信息,或者查询到所述身份标 识信息对应的特批权限标识信息为空,则向所述客户端发送拒绝提交的提示信息。If the identity information is not queried in the privilege database, or if the privilege identity information corresponding to the identity identifier information is vacant, the client sends a prompt message rejecting the submission.
  5. 一种配置管理方法,其特征在于,所述配置管理方法包括服务端执行的如下步骤:A configuration management method, wherein the configuration management method includes the following steps performed by a server:
    接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;Receiving the indicator result data of the static code check report sent by the client and the identity identification information of the user, and storing the indicator result data and the identity identification information in the indicator database;
    若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;And acquiring the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
    根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;Obtaining preset indicator standard data corresponding to the branch version information according to the branch version information;
    从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;Obtaining, by the indicator database, the indicator result data corresponding to the identity identification information;
    若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;If it is detected that the indicator result data satisfies the requirement of the indicator standard data, generating an operation instruction that is allowed to be submitted, otherwise generating an operation instruction that refuses to submit;
    将所述操作指令发送给所述配置管理平台。The operation instruction is sent to the configuration management platform.
  6. 一种配置管理装置,其特征在于,所述配置管理装置包括客户端,所述客户端包括:A configuration management apparatus, wherein the configuration management apparatus includes a client, and the client includes:
    申请接收模块,用于接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;The application receiving module is configured to receive code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    代码获取模块,用于根据所述地址标识信息,获取所述待提交代码;a code obtaining module, configured to acquire the to-be-committed code according to the address identification information;
    代码检查模块,用于对所述待提交代码进行静态代码检查,得到静态代码检查报告;a code checking module, configured to perform static code check on the to-be-committed code to obtain a static code check report;
    指标提取模块,用于对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;An indicator extraction module, configured to parse the static code inspection report, and extract indicator result data in the static code inspection report according to a preset indicator;
    指标发送模块,用于将所述指标结果数据和所述身份标识信息发送给服务端;An indicator sending module, configured to send the indicator result data and the identity identification information to a server;
    请求发送模块,用于向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;a request sending module, configured to send a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
    信息反馈模块,用于若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。The information feedback module is configured to: when receiving the prompt information that is sent by the configuration management platform and includes the submission result, feed the prompt information to the user.
  7. 如权利要求6所述的配置管理装置,其特征在于,所述配置管理装置的客户端还包括:The configuration management apparatus according to claim 6, wherein the client of the configuration management apparatus further comprises:
    权限申请模块,用于根据所述特批申请标识,向预设的审批员发送特批权限申请;The permission application module is configured to send a special permission application to the preset approver according to the special application identifier;
    权限发送模块,用于若接收到所述审批员返回的审批结果为特批申请成功,则将所述用户的特批权限标识信息和所述用户的身份标识信息发送给所述配置管理平台,以使所述配置管理平台将所述特批权限标识信息与所述身份标识信息对应保存在权限数据库中。a permission sending module, configured to send the special batch permission identification information of the user and the identity identification information of the user to the configuration management platform, if the approval result returned by the approver is that the special batch application is successful, The configuration management platform saves the special batch identification information and the identity identification information in a permission database.
  8. 一种配置管理装置,其特征在于,所述配置管理装置包括配置管理平台,所述配置管理平台包括:A configuration management device, wherein the configuration management device includes a configuration management platform, and the configuration management platform includes:
    请求接收模块,用于接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;a request receiving module, configured to receive a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    指标检测模块,用于向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信 息和所述身份标识信息;An indicator detection module, configured to send a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identifier information;
    指令接收模块,用于接收所述服务端根据所述指标检测的结果返回的操作指令;An instruction receiving module, configured to receive an operation instruction returned by the server according to the result of the indicator detection;
    代码提交模块,用于若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;a code submission module, configured to: obtain the to-be-committed code according to the address identification information, and merge the to-be-committed code into a branch version corresponding to the branch version information, and The client sends the prompt information successfully submitted;
    信息发送模块,用于若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。And an information sending module, configured to send, to the client, prompt information that refuses to submit if the operation instruction is to reject the submission.
  9. 如权利要求8所述的配置管理装置,其特征在于,所述信息发送模块包括:The configuration management apparatus according to claim 8, wherein the information sending module comprises:
    权限查询单元,用于当所述操作指令为拒绝提交时,从权限数据库中查询所述用户的身份标识信息对应的特批权限标识信息;a permission query unit, configured to query the special batch permission information corresponding to the identity information of the user from the permission database when the operation instruction is to reject the submission;
    代码提交单元,用于若在所述权限数据库中查询到所述身份标识信息对应的特批权限标识信息不为空,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送特批权限成功提交的提示信息;a code submitting unit, configured to acquire the to-be-submitted code according to the address identification information, if the special batch identification information corresponding to the identity identification information is not empty in the permission database, and the to-be-submitted code is to be submitted The code is merged into the branch version corresponding to the branch version information, and the prompt information that the special batch permission is successfully submitted is sent to the client;
    信息发送单元,用于若在所述权限数据库中未查询到所述身份标识信息,或者查询到所述身份标识信息对应的特批权限标识信息为空,则向所述客户端发送拒绝提交的提示信息。The information sending unit is configured to: if the identity identification information is not queried in the authority database, or if the special batch authorization information corresponding to the identity identification information is vacant, send the reject submission to the client Prompt message.
  10. 一种配置管理装置,其特征在于,所述配置管理装置包括服务端,所述服务端包括:A configuration management device, wherein the configuration management device includes a server, and the server includes:
    指标接收模块,用于接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;The indicator receiving module is configured to receive the indicator result data of the static code check report sent by the client and the identity identification information of the user, and store the indicator result data and the identity identification information in the indicator database;
    信息获取模块,用于若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;The information obtaining module is configured to: obtain the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
    数据获取模块,用于根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;a data obtaining module, configured to acquire, according to the branch version information, preset indicator standard data corresponding to the branch version information;
    指标获取模块,用于从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;An indicator obtaining module, configured to acquire the indicator result data corresponding to the identity identification information from the indicator database;
    指令生成模块,用于若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;An instruction generating module, configured to generate an operation instruction that is allowed to be submitted if it is detected that the indicator result data satisfies the requirement of the indicator standard data, and otherwise generate an operation instruction that refuses to submit;
    指令发送模块,用于将所述操作指令发送给所述配置管理平台。And an instruction sending module, configured to send the operation instruction to the configuration management platform.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现客户端执行的如下步骤:A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and operative on the processor, wherein the processor implements the client when the computer readable instructions are executed The following steps are performed:
    接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;Receiving code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    根据所述地址标识信息,获取所述待提交代码;Obtaining the to-be-committed code according to the address identification information;
    对所述待提交代码进行静态代码检查,得到静态代码检查报告;Performing static code check on the to-be-committed code to obtain a static code check report;
    对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;Parsing the static code check report, and extracting indicator result data in the static code check report according to a preset indicator;
    将所述指标结果数据和所述身份标识信息发送给服务端;Sending the indicator result data and the identity identification information to the server;
    向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址 标识信息、所述身份标识信息和所述分支版本信息;Sending a code submission request to the configuration management platform, wherein the code submission request includes the address identification information, the identity identification information, and the branch version information;
    若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。If the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
  12. 如权利要求11所述的终端设备,其特征在于,所述代码提交申请信息还包括所述用户的特批申请标识,在所述接收用户发送的代码提交申请信息之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The terminal device according to claim 11, wherein the code submission application information further includes a special batch application identifier of the user, and after the code sent by the receiving user submits the application information, the processor executes the The following steps are also implemented when the computer readable instructions are described:
    根据所述特批申请标识,向预设的审批员发送特批权限申请;Sending a special approval authority application to the preset approver according to the special approval application identifier;
    若接收到所述审批员返回的审批结果为特批申请成功,则将所述用户的特批权限标识信息和所述用户的身份标识信息发送给所述配置管理平台,以使所述配置管理平台将所述特批权限标识信息与所述身份标识信息对应保存在权限数据库中。And if the approval result returned by the approver is that the special batch application is successful, sending the special batch permission identification information of the user and the identity identification information of the user to the configuration management platform, so that the configuration management is performed. The platform saves the special batch identification information and the identity information in a permission database.
  13. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现配置管理平台执行的如下步骤:A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor implements the configuration when the computer readable instructions are executed The following steps are performed by the management platform:
    接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;Receiving a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;Sending a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identification information;
    接收所述服务端根据所述指标检测的结果返回的操作指令;Receiving an operation instruction returned by the server according to the result of the indicator detection;
    若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
    若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。If the operation instruction is to reject the submission, the client sends a prompt message rejecting the submission.
  14. 如权利要求13所述的终端设备,其特征在于,所述若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息包括:The terminal device according to claim 13, wherein if the operation instruction is to reject the submission, sending the prompt information to the client to reject the submission includes:
    当所述操作指令为拒绝提交时,从权限数据库中查询所述用户的身份标识信息对应的特批权限标识信息;When the operation instruction is to reject the submission, the special permission identification information corresponding to the identity identification information of the user is queried from the permission database;
    若在所述权限数据库中查询到所述身份标识信息对应的特批权限标识信息不为空,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送特批权限成功提交的提示信息;And if the privilege identifier information corresponding to the identifier information is not empty, the code to be submitted is obtained according to the address identifier information, and the code to be submitted is merged into the branch. In the branch version corresponding to the version information, and sending the prompt information successfully submitted by the special batch permission to the client;
    若在所述权限数据库中未查询到所述身份标识信息,或者查询到所述身份标识信息对应的特批权限标识信息为空,则向所述客户端发送拒绝提交的提示信息。If the identity identification information is not queried in the privilege database, or the privilege identification information corresponding to the identity identification information is vacant, the prompt information that is rejected is sent to the client.
  15. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现服务端执行的如下步骤:A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and operative on the processor, wherein the processor implements the service when the computer readable instructions are executed The following steps are performed:
    接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;Receiving the indicator result data of the static code check report sent by the client and the identity identification information of the user, and storing the indicator result data and the identity identification information in the indicator database;
    若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;And acquiring the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
    根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;Obtaining preset indicator standard data corresponding to the branch version information according to the branch version information;
    从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;Obtaining, by the indicator database, the indicator result data corresponding to the identity identification information;
    若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;If it is detected that the indicator result data satisfies the requirement of the indicator standard data, generating an operation instruction that is allowed to be submitted, otherwise generating an operation instruction that refuses to submit;
    将所述操作指令发送给所述配置管理平台。The operation instruction is sent to the configuration management platform.
  16. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现客户端执行的如下步骤:One or more non-transitory readable storage mediums storing computer readable instructions, wherein when the computer readable instructions are executed by one or more processors, cause the one or more processors to execute The following steps are implemented when the client performs:
    接收用户发送的代码提交申请信息,其中,所述代码提交申请信息包含待提交代码的地址标识信息、所述用户的身份标识信息和分支版本信息;Receiving code submission application information sent by the user, where the code submission application information includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    根据所述地址标识信息,获取所述待提交代码;Obtaining the to-be-committed code according to the address identification information;
    对所述待提交代码进行静态代码检查,得到静态代码检查报告;Performing static code check on the to-be-committed code to obtain a static code check report;
    对所述静态代码检查报告进行解析,按照预设的指标,提取所述静态代码检查报告中的指标结果数据;Parsing the static code check report, and extracting indicator result data in the static code check report according to a preset indicator;
    将所述指标结果数据和所述身份标识信息发送给服务端;Sending the indicator result data and the identity identification information to the server;
    向配置管理平台发送代码提交请求,其中,所述代码提交请求包含所述地址标识信息、所述身份标识信息和所述分支版本信息;Sending a code submission request to the configuration management platform, where the code submission request includes the address identification information, the identity identification information, and the branch version information;
    若接收到所述配置管理平台发送的包含提交结果的提示信息,则将所述提示信息反馈给所述用户。If the prompt information including the submission result sent by the configuration management platform is received, the prompt information is fed back to the user.
  17. 如权利要求16所述的配置管理方法,其特征在于,所述代码提交申请信息还包括所述用户的特批申请标识,在所述接收用户发送的代码提交申请信息之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:The configuration management method according to claim 16, wherein the code submission application information further includes a special batch application identifier of the user, and the computer is readable after the code sent by the receiving user submits the application information. When the instructions are executed by one or more processors, the one or more processors further perform the following steps:
    根据所述特批申请标识,向预设的审批员发送特批权限申请;Sending a special approval authority application to the preset approver according to the special approval application identifier;
    若接收到所述审批员返回的审批结果为特批申请成功,则将所述用户的特批权限标识信息和所述用户的身份标识信息发送给所述配置管理平台,以使所述配置管理平台将所述特批权限标识信息与所述身份标识信息对应保存在权限数据库中。And if the approval result returned by the approver is that the special batch application is successful, sending the special batch permission identification information of the user and the identity identification information of the user to the configuration management platform, so that the configuration management is performed. The platform saves the special batch identification information and the identity information in a permission database.
  18. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现配置管理平台执行的如下步骤:One or more non-transitory readable storage mediums storing computer readable instructions, wherein when the computer readable instructions are executed by one or more processors, cause the one or more processors to execute The following steps are implemented to implement the configuration management platform:
    接收客户端发送的代码提交请求,其中,所述代码提交请求包括待提交代码的地址标识信息、用户的身份标识信息和分支版本信息;Receiving a code submission request sent by the client, where the code submission request includes address identification information of the to-be-committed code, identity identification information of the user, and branch version information;
    向服务端发送代码指标检测请求,以使所述服务端对所述待提交代码进行指标检测,其中,所述代码指标检测请求包含所述分支版本信息和所述身份标识信息;Sending a code indicator detection request to the server, so that the server performs index detection on the to-be-committed code, where the code indicator detection request includes the branch version information and the identity identification information;
    接收所述服务端根据所述指标检测的结果返回的操作指令;Receiving an operation instruction returned by the server according to the result of the indicator detection;
    若所述操作指令为允许提交,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送成功提交的提示信息;If the operation instruction is to allow the submission, the code to be submitted is obtained according to the address identification information, and the code to be submitted is merged into the branch version corresponding to the branch version information, and is successfully sent to the client. Submitted prompt information;
    若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息。If the operation instruction is to reject the submission, the client sends a prompt message rejecting the submission.
  19. 如权利要求18所述的非易失性可读存储介质,其特征在于,所述若所述操作指令为拒绝提交,则向所述客户端发送拒绝提交的提示信息包括:The non-volatile readable storage medium according to claim 18, wherein if the operation instruction is to reject the submission, sending the prompt information to the client to reject the submission comprises:
    当所述操作指令为拒绝提交时,从权限数据库中查询所述用户的身份标识信息对应的特批权限标识信息;When the operation instruction is to reject the submission, the special permission identification information corresponding to the identity identification information of the user is queried from the permission database;
    若在所述权限数据库中查询到所述身份标识信息对应的特批权限标识信息不为空,则根据所述地址标识信息获取所述待提交代码,将所述待提交代码合入所述分支版本信息对应的分支版本中,并向所述客户端发送特批权限成功提交的提示信息;And if the privilege identifier information corresponding to the identifier information is not empty, the code to be submitted is obtained according to the address identifier information, and the code to be submitted is merged into the branch. In the branch version corresponding to the version information, and sending the prompt information successfully submitted by the special batch permission to the client;
    若在所述权限数据库中未查询到所述身份标识信息,或者查询到所述身份标识信息对应的特批权限标识信息为空,则向所述客户端发送拒绝提交的提示信息。If the identity identification information is not queried in the privilege database, or the privilege identification information corresponding to the identity identification information is vacant, the prompt information that is rejected is sent to the client.
  20. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现服务端执行的如下步骤:One or more non-transitory readable storage mediums storing computer readable instructions, wherein when the computer readable instructions are executed by one or more processors, cause the one or more processors to execute The following steps are implemented to implement the server:
    接收客户端发送的静态代码检查报告的指标结果数据和用户的身份标识信息,并将所述指标结果数据和所述身份标识信息对应存储于指标数据库中;Receiving the indicator result data of the static code check report sent by the client and the identity identification information of the user, and storing the indicator result data and the identity identification information in the indicator database;
    若接收到配置管理平台发送的代码指标检测请求,则获取所述代码指标检测请求中的分支版本信息和所述身份标识信息;And acquiring the branch version information and the identity identification information in the code indicator detection request, if the code indicator detection request sent by the configuration management platform is received;
    根据所述分支版本信息,获取所述分支版本信息对应的预设的指标标准数据;Obtaining preset indicator standard data corresponding to the branch version information according to the branch version information;
    从所述指标数据库中获取所述身份标识信息对应的所述指标结果数据;Obtaining, by the indicator database, the indicator result data corresponding to the identity identification information;
    若检测到所述指标结果数据满足所述指标标准数据的要求,则生成允许提交的操作指令,否则生成拒绝提交的操作指令;If it is detected that the indicator result data satisfies the requirement of the indicator standard data, generating an operation instruction that is allowed to be submitted, otherwise generating an operation instruction that refuses to submit;
    将所述操作指令发送给所述配置管理平台。The operation instruction is sent to the configuration management platform.
PCT/CN2018/092560 2018-04-17 2018-06-25 Configuration management method and apparatus, terminal device and storage medium WO2019200701A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810342227.2 2018-04-17
CN201810342227.2A CN108762803B (en) 2018-04-17 2018-04-17 Configuration management method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019200701A1 true WO2019200701A1 (en) 2019-10-24

Family

ID=64010680

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/092560 WO2019200701A1 (en) 2018-04-17 2018-06-25 Configuration management method and apparatus, terminal device and storage medium

Country Status (2)

Country Link
CN (1) CN108762803B (en)
WO (1) WO2019200701A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111030848A (en) * 2019-11-20 2020-04-17 深圳创维-Rgb电子有限公司 Automatic configuration method and device of electronic product and storage medium
CN111538892A (en) * 2020-04-26 2020-08-14 北京学之途网络科技有限公司 Information query method and device
CN111782719A (en) * 2020-08-20 2020-10-16 支付宝(杭州)信息技术有限公司 Data processing method and device
CN112631652A (en) * 2020-12-29 2021-04-09 微医云(杭州)控股有限公司 Operation instruction response method, device, equipment and storage medium
CN112817849A (en) * 2021-01-28 2021-05-18 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN112905163A (en) * 2021-03-15 2021-06-04 上海悦易网络信息技术有限公司 Form submitting method and equipment
CN113407225A (en) * 2021-06-23 2021-09-17 未鲲(上海)科技服务有限公司 Code list generation method and device, computer equipment and storage medium
CN113553060A (en) * 2021-07-30 2021-10-26 康键信息技术(深圳)有限公司 Code processing method, device, equipment and storage medium
CN114708116A (en) * 2022-03-11 2022-07-05 哈尔滨圣昌科技开发有限公司 Pipe network monitoring intelligent processing system
CN114880227A (en) * 2022-05-11 2022-08-09 杭州云合智网技术有限公司 Code warehouse management method and system applied to chip field
CN115629750A (en) * 2022-12-24 2023-01-20 西安葡萄城软件有限公司 Server visual programming method and system supporting Excel formula
CN116132422A (en) * 2023-04-19 2023-05-16 天津卓朗昆仑云软件技术有限公司 Authority control method and device of input device, server and readable storage medium
CN111522785B (en) * 2020-04-17 2024-04-09 上海中通吉网络技术有限公司 Data extraction auditing method, device and equipment
CN112817849B (en) * 2021-01-28 2024-06-04 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542496B (en) * 2018-11-26 2021-07-02 中国银行股份有限公司 Method, device and system for determining incremental code
CN110096303B (en) * 2019-04-22 2023-06-02 无线生活(杭州)信息科技有限公司 Code detection method and device
CN110633953B (en) * 2019-08-06 2023-05-30 平安科技(深圳)有限公司 Task approval process management method, device and system based on data security
CN113360368B (en) * 2020-03-06 2023-09-01 北京京东振世信息技术有限公司 Method and device for testing software performance
CN111459613B (en) * 2020-03-30 2023-08-15 浪潮通用软件有限公司 Method and device for dynamically expanding development environment
CN113553253A (en) * 2020-04-24 2021-10-26 烽火通信科技股份有限公司 Method and system for circle complexity check by combining with SVN
CN111831554B (en) * 2020-06-09 2023-07-04 时时同云科技(成都)有限责任公司 Code checking method and device
CN112287644B (en) * 2020-09-30 2024-01-30 成都新潮传媒集团有限公司 Data submitting method, device, computer equipment and readable storage medium
CN113495755B (en) * 2021-06-29 2023-06-09 青岛海尔科技有限公司 Information multidimensional analysis method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159831A (en) * 2015-08-31 2015-12-16 浪潮集团有限公司 Method for automatically monitoring quality of software code
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106681783A (en) * 2016-12-13 2017-05-17 深圳市恒扬数据股份有限公司 Detection method and system for SVN code

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005025543A (en) * 2003-07-03 2005-01-27 Mitsubishi Denki Information Technology Corp Consistency check system, consistency check method, consistency check program and management information creation system
CN107656873A (en) * 2017-10-23 2018-02-02 扬州航盛科技有限公司 Automatization test system and method for testing based on the vehicle-mounted softwares of Linux

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159831A (en) * 2015-08-31 2015-12-16 浪潮集团有限公司 Method for automatically monitoring quality of software code
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106681783A (en) * 2016-12-13 2017-05-17 深圳市恒扬数据股份有限公司 Detection method and system for SVN code

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111030848A (en) * 2019-11-20 2020-04-17 深圳创维-Rgb电子有限公司 Automatic configuration method and device of electronic product and storage medium
CN111030848B (en) * 2019-11-20 2023-04-07 深圳创维-Rgb电子有限公司 Automatic configuration method and device of electronic product and storage medium
CN111522785B (en) * 2020-04-17 2024-04-09 上海中通吉网络技术有限公司 Data extraction auditing method, device and equipment
CN111538892A (en) * 2020-04-26 2020-08-14 北京学之途网络科技有限公司 Information query method and device
CN111538892B (en) * 2020-04-26 2024-03-12 北京明略昭辉科技有限公司 Information query method and device
CN111782719B (en) * 2020-08-20 2024-04-12 支付宝(杭州)信息技术有限公司 Data processing method and device
CN111782719A (en) * 2020-08-20 2020-10-16 支付宝(杭州)信息技术有限公司 Data processing method and device
CN112631652A (en) * 2020-12-29 2021-04-09 微医云(杭州)控股有限公司 Operation instruction response method, device, equipment and storage medium
CN112817849B (en) * 2021-01-28 2024-06-04 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN112817849A (en) * 2021-01-28 2021-05-18 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN112905163B (en) * 2021-03-15 2024-04-16 上海万物新生环保科技集团有限公司 Form submitting method and device
CN112905163A (en) * 2021-03-15 2021-06-04 上海悦易网络信息技术有限公司 Form submitting method and equipment
CN113407225A (en) * 2021-06-23 2021-09-17 未鲲(上海)科技服务有限公司 Code list generation method and device, computer equipment and storage medium
CN113553060B (en) * 2021-07-30 2023-10-20 康键信息技术(深圳)有限公司 Code processing method, device, equipment and storage medium
CN113553060A (en) * 2021-07-30 2021-10-26 康键信息技术(深圳)有限公司 Code processing method, device, equipment and storage medium
CN114708116A (en) * 2022-03-11 2022-07-05 哈尔滨圣昌科技开发有限公司 Pipe network monitoring intelligent processing system
CN114880227B (en) * 2022-05-11 2024-04-05 云合智网(上海)技术有限公司 Code warehouse management method and system applied to chip field
CN114880227A (en) * 2022-05-11 2022-08-09 杭州云合智网技术有限公司 Code warehouse management method and system applied to chip field
CN115629750B (en) * 2022-12-24 2023-03-17 西安葡萄城软件有限公司 Server visual programming method and system supporting Excel formula
CN115629750A (en) * 2022-12-24 2023-01-20 西安葡萄城软件有限公司 Server visual programming method and system supporting Excel formula
CN116132422B (en) * 2023-04-19 2023-06-27 天津卓朗昆仑云软件技术有限公司 Authority control method and device of input device, server and readable storage medium
CN116132422A (en) * 2023-04-19 2023-05-16 天津卓朗昆仑云软件技术有限公司 Authority control method and device of input device, server and readable storage medium

Also Published As

Publication number Publication date
CN108762803A (en) 2018-11-06
CN108762803B (en) 2021-09-10

Similar Documents

Publication Publication Date Title
WO2019200701A1 (en) Configuration management method and apparatus, terminal device and storage medium
WO2020000706A1 (en) Database comparison-based interface testing method and system, device and storage medium
US9280686B1 (en) Managing API authorization
WO2020119506A1 (en) Identity authentication method based on alliance chain, and terminal device
WO2021114406A1 (en) Blockchain-based vaccine information monitoring method and apparatus, and computer device
US20170006083A1 (en) Methods, systems, and computer readable media for on-boarding virtualized network function (vnf) packages in a network functions virtualization (nfv) system
WO2020024419A1 (en) Testing method for service scenario, electronic device and readable storage medium
WO2019019640A1 (en) Simulated processing method and apparatus for order information, and storage medium and computer device
CN105893097A (en) Method and device for processing option information of BIOS (basic input output system)
CN110737689B (en) Data standard compliance detection method, device, system and storage medium
WO2019136802A1 (en) Password changing method and apparatus, terminal device, and storage medium
CN111447102A (en) SDN network device access method and device, computer device and storage medium
WO2022068316A1 (en) Data reconciliation method and apparatus, device, and storage medium
WO2019104891A1 (en) Method and device for importing and exporting report, storage medium, and terminal
US20220327242A1 (en) Data management method and apparatus
WO2023279770A1 (en) Data storage method, apparatus and system, storage medium, and program product
CN114157662B (en) Cloud platform parameter adaptation method, device, terminal equipment and storage medium
CN112583890B (en) Message pushing method and device based on enterprise office system and computer equipment
WO2019062007A1 (en) Data transmission method and apparatus, terminal device, and medium
CN113285915A (en) Registration management method and device and private cloud control server
CN110968632B (en) Method and system for unified data exchange
CN114327981A (en) Safety verification system, method and device of function safety mechanism
CN109472124B (en) Method, device, equipment and medium for matching interface use permission
US12001315B2 (en) Provisioning and debugging system in a cloud environment
US20230140208A1 (en) Provisioning and debugging system in a cloud environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18915246

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.01.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18915246

Country of ref document: EP

Kind code of ref document: A1