Client-based code management methods, devices, equipment, media, and products

By detecting code operation requests in non-web client versions and obtaining and adding account or user identifiers, the problem of untraceable code operations is solved, achieving traceability of code management and improving user experience.

CN115794212BActive Publication Date: 2026-03-13CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing code management methods, code operations are not traceable, making it impossible for enterprises to perform standardized scanning and traceability of code, resulting in a poor user experience.

Method used

By detecting code operation requests on non-web client platforms, obtaining the account identifier or user identifier of the logged-in account, and adding it to the code operation result, traceability of code operations can be achieved.

Benefits of technology

It improves the traceability of code management and user experience, ensures the accuracy and traceability of code operation results, and prevents illegal code submissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115794212B_ABST
    Figure CN115794212B_ABST
Patent Text Reader

Abstract

This invention discloses a client-based code management method, apparatus, device, medium, and product. The method includes, upon detecting a code operation request from a non-web client login account, executing the code operation corresponding to the request to obtain a code operation result; adding the account identifier of the logged-in account or the user identifier bound to the account to the code operation result to update the result; and outputting the updated result. By obtaining the account identifier of the logged-in account or the user identifier bound to the account through a non-web client and adding it to the code operation result, users can trace the code operation results based on the account identifier or user identifier in the result, thus improving code management and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer program technology, and in particular to a client-based code management method, apparatus, device, medium, and product. Background Technology

[0002] Code resources are a core asset of technology companies, and their importance is self-evident. Many enterprises install Git plugins that integrate code style scanning and other functions, depending on their actual needs. However, employees can bypass Git plugin controls by directly pushing code using the native Git client, submitting code directly to GitLab repositories. Enterprises cannot perform code style scanning on code submitted in this way, nor can they trace the code uploaded in this manner, resulting in a poor code management experience for enterprise users.

[0003] Therefore, existing code management methods at least have the problem of untraceable code operations. Summary of the Invention

[0004] This invention provides a client-based code management method, apparatus, device, medium, and product to solve the problem that existing code management methods at least have the problem of untraceable code operations.

[0005] According to one aspect of the present invention, a client-based code management method is provided, comprising:

[0006] If a code operation request is detected from a non-web client login account, the code operation corresponding to the code operation request is executed to obtain the code operation result;

[0007] The account identifier of the account or the user identifier bound to the account is added to the code operation result to update the code operation result, and the updated code operation result is output.

[0008] According to another aspect of the present invention, a client-based code management device is provided, comprising:

[0009] The code operation execution module is used to execute the code operation corresponding to the code operation request when a code operation request is detected from a non-web client login account, and obtain the code operation result.

[0010] The identifier addition module is used to add the account identifier of the account or the user identifier bound to the account to the code operation result, so as to update the code operation result and output the updated code operation result.

[0011] According to another aspect of the present invention, a server device is provided, the server device comprising:

[0012] At least one processor; and

[0013] A memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the client-based code management method according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the client-based code management method according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the client-based code management method according to any embodiment.

[0017] Compared to existing technologies, the technical solution of this invention only responds to code operation requests from logged-in users on the client side. On the one hand, this prevents users from executing code operation requests through the native Git client. On the other hand, it obtains the accurate account identifier of the logged-in account or the user identifier bound to the logged-in account. The code operation corresponding to the code operation request is executed, and the account identifier or the user identifier bound to the account is added to the code operation result. This makes it easier for users to trace the code operation result based on the account identifier or user identifier in the code operation result, thereby improving code management and user experience.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a client-based code management method provided according to an embodiment of the present invention;

[0021] Figure 2This is a flowchart of a client-based code management method according to another embodiment of the present invention;

[0022] Figure 3 This is a flowchart of a client-based code management method according to another embodiment of the present invention;

[0023] Figure 4 This is a flowchart of a client-based code management method according to another embodiment of the present invention;

[0024] Figure 5 This is a flowchart of a client-based code management method according to another embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of the structure of a client-based code management device provided according to an embodiment of the present invention;

[0026] Figure 7 This is a schematic diagram of the structure of a client-based code management device according to another embodiment of the present invention;

[0027] Figure 8 This is a schematic diagram of the structure of a server device that implements the client-based code management method of this invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0031] As disclosed herein, the term "LDAP" stands for Lightweight Directory Access Protocol, an open, neutral, industry-standard application protocol that provides access control and maintains distributed directory information via the IP protocol.

[0032] As disclosed in this article, a "Hook" is like an external hook that extracts (eavesdrops on) information within the source code. After hooking a specific system event, once the hooked event is triggered, the program that hooked the event will receive a system notification, allowing the program to respond to the event immediately. The Git implementation in this application allows for the customization of hooks, which are executed under specific circumstances. These hooks are divided into client-side hooks (Githook) and server-side hooks. Client-side hooks can be triggered by commit operations, code merging operations, etc., while server-side hooks are triggered by network actions, such as code push operations.

[0033] Figure 1 This is a flowchart illustrating a client-based code management method provided in an embodiment of the present invention. This embodiment is applicable to situations where a logged-in account's account identifier or the user identifier corresponding to the account is obtained through a non-web-based client, identifying the code operation result corresponding to the user's code operation, so that the code operation result has traceability. This method can be executed by a client-based code management device, which can be implemented in hardware and / or software, and can be configured in the processor of a server device. Figure 1 As shown, the method includes:

[0034] S110. If a code operation request is detected from a non-web client login account, execute the code operation corresponding to the code operation request to obtain the code operation result.

[0035] The non-web version client is the APP client, not the web version (Web client).

[0036] The code operation requests can refer to operations related to code management needs, such as code upload, code retrieval, code merging, or code compliance verification. Specifically, code upload refers to uploading code to a Git repository; code retrieval refers to retrieving the required code from a Git repository; code merging refers to merging at least two code segments into one; and code compliance verification includes at least log compliance verification, which verifies whether logs meet the set log compliance requirements.

[0037] Upon detecting a code operation request from a non-web client login account, while executing the corresponding code operation to obtain the result, the system also retrieves the login account's account identifier or the user identifier bound to the login account. The account identifier can be a username, and the user identifier bound to the login account can be set by the user or automatically generated by the system based on the account identifier and / or account association information, such as the user's mobile phone number or email address.

[0038] In one embodiment, user login is completed in the following ways:

[0039] Step b1: Upon detecting a login request from the client, obtain the user's login information.

[0040] The user login information includes a password, user identification, and mobile phone number and / or email address.

[0041] In one embodiment, the login information also includes a device identifier, such as a computer device used to perform code operations. Binding the device identifier to a user account allows the corresponding user to perform code operations only on a specified computer, thereby improving the security of code operations. This approach is typically suitable for code management in confidential projects.

[0042] Step b2: Verify the user login information based on LDAP, and complete the user account login if the verification is successful.

[0043] Using LDAP to verify user login information and log in to accounts can improve the user experience of single sign-on Git.

[0044] S120. Add the account identifier or the user identifier bound to the account to the code operation result to update the code operation result and output the updated code operation result.

[0045] After obtaining the code operation result, the account identifier or the user identifier bound to the account is added to the code operation result, and the code operation result with the added account identifier or user identifier is output. In this way, the executing account can be traced for each code operation result in the system, realizing the traceability of code operation results, while ensuring the accuracy of the traceability results, and greatly improving the level of code management and user experience.

[0046] In one embodiment, the code operation result, along with the account identifier or user identifier included in the code operation result, is displayed in the code operation result display interface, so that the user can trace the executor of the code operation result based on the account identifier or user identifier.

[0047] In one embodiment, when the processor detects the generation of a code operation result, it adds an account identifier or user identifier to the code operation result, as well as the generation time of the code operation result. The user can trace the executor of the code operation corresponding to the code operation result based on the user identifier or user time in the code operation result, and determine the time when the system executed the code operation corresponding to the code operation result based on the generation time of the code operation result, thereby determining the time when the user initiated the code operation request corresponding to the code operation result.

[0048] Compared to existing technologies, the technical solution of this invention only responds to code operation requests from logged-in users on the client side. On the one hand, this prevents users from executing code operation requests through the native Git client. On the other hand, it obtains the accurate account identifier of the logged-in account or the user identifier bound to the logged-in account. The code operation corresponding to the code operation request is executed, and the account identifier or the user identifier bound to the account is added to the code operation result. This achieves the traceability of the code operation result and ensures the accuracy of the traceability result, greatly improving the level of code management and user experience.

[0049] Figure 2 The flowchart of a client-based code management method provided in another embodiment of the present invention belongs to the same aspect of the concept as the above embodiment. This embodiment further refines the "when a code operation request from a non-web client login account is detected, the code operation corresponding to the code operation request is executed to obtain the code operation result" in the previous embodiment. Figure 2 As shown, the method includes:

[0050] S2101. Upon detecting a code operation request for a non-web client login account, output a verification prompt message for receiving the verification password. The verification password is configured to be sent to a set location when the user logs in, when the user registers successfully, or when a code operation request is detected.

[0051] The password verification is configured to check whether there is a direct binding relationship between the operation object corresponding to the code operation request and the currently logged-in user. If there is a direct binding relationship between the operation object and the currently logged-in account, the operation object is considered to be authorized content of the currently logged-in account, rather than authorized content of other users, which helps improve the accuracy of code operations and code management. For example, when uploading code, users can only associate the code with project requirements in their own account, and not with project requirements in other accounts. See the following examples for details on associating code with project requirements.

[0052] The verification prompt can be a prompt box for receiving the verification password, or a prompt instruction for entering the verification password.

[0053] In one embodiment, the verification password can be configured to be sent to the user's mobile phone via the phone number associated with the user's account or to the user's email address via the email address associated with the account upon successful login or registration. This type of verification password can be configured as a permanent password, meaning the user can use it indefinitely without requesting a change. Alternatively, it can be configured as a short-term password that changes periodically, such as changing it each time you log in, daily, weekly, or annually, with the specific duration set by the user based on the importance of the code. The verification password can also be configured to be sent to the user's mobile phone via the phone number associated with the user's account or to the user's email address via the email address managed by the account upon detecting a code operation request. This type of verification password is a temporary verification password, used only to set the code operation corresponding to the code operation request; therefore, this verification password and its sending method can be used for important code operations.

[0054] In one embodiment, for regular code operations, the verification password is configured as a permanent password or a short-term password; for setting critical code operations, the verification password is configured as a temporary verification password. For the temporary verification password, when the processor detects that the code operation corresponding to the operation request of the user's input instruction is a setting critical code operation, it outputs a prompt message indicating that the temporary verification password has been sent, so that the user can promptly read and complete the input of the temporary verification password; when the processor detects that the user has entered a valid temporary verification password, it executes the corresponding setting critical code operation. The setting critical code operation can be configured to set a critical item.

[0055] Understandably, when the processor sends the verification password to the designated location linked to the user account, it will store the verification password in the database and bind it to the user account.

[0056] S2102. Obtain the verification password entered by the user. If the verification password is verified successfully, execute the code operation corresponding to the code operation request.

[0057] Receive the verification password entered by the user and verify it against the verification password bound to the current account. If the password verification is successful, execute the code operation request corresponding to the code operation; if the password verification fails, output a prompt message indicating that the user is not authorized to execute the code operation.

[0058] When a user logs into a non-web version of the Git client, the processor can accurately obtain the user's account identifier and the verification password bound to that account identifier. When a code operation request is received, the processor performs user authentication and only responds to the received code operation request if the password is verified. This ensures the accuracy of the correspondence between the user account and the code operation.

[0059] Password verification can be completed in the following ways:

[0060] Step a1: Obtain the verification password entered by the user, and encrypt the verification password using the set encryption method to obtain the first encryption result.

[0061] Step a2: Determine whether the first encryption result is the same as the corresponding reference encryption result. The reference encryption result is generated when the first encryption result is sent to the set location and is stored in the set backup location. If yes, proceed to step a3; otherwise, proceed to step a4.

[0062] Step a3: Determine that the verification password has been verified.

[0063] Step a4: Determine that the verification password verification failed.

[0064] Backing up verification passwords in encrypted form can effectively prevent them from being leaked, thus improving the security and accuracy of password verification.

[0065] S220. Add the account identifier or the user identifier bound to the account to the code operation result to update the code operation result, and output the updated code operation result.

[0066] Compared to existing technologies, the technical solution provided by this invention authenticates the current user before responding to a code operation request. This ensures that the current user is the owner of the currently logged-in account or has been authorized by the currently logged-in account, thereby guaranteeing the accuracy of the correspondence between the user account and the code operation. When the account identifier or user identifier is added to the code operation result, the code operation result becomes traceable, which helps to improve code management and user experience.

[0067] Figure 3 The flowchart of a client-based code management method provided in another embodiment of the present invention belongs to the same aspect of the concept as the above embodiment. This embodiment further refines the "when a code operation request from a non-web client login account is detected, the code operation corresponding to the code operation request is executed to obtain the code operation result" in the previous embodiment. For example... Figure 3 As shown, the method includes:

[0068] S3101. If the password verification is successful, output the code path prompt and the project requirement prompt.

[0069] In one embodiment, the code path suggestion is a prompt to enter the code storage path, and the project requirement suggestion is a prompt to enter the project requirement identifier. This type of suggestion is suitable for situations where code import operations are performed in the form of commands.

[0070] In one embodiment, the code path suggestion information is displayed as a path control for path selection, through which the user selects a code segment identifier under the code storage path; the project requirement suggestion information is displayed as a drop-down menu for selecting a project requirement identifier, through which the user selects the project requirement identifier. This form of suggestion information is suitable for situations where a visual interface is used to assist users in completing the code import operation.

[0071] S3102. Obtain the code storage path and code segment identifier entered by the user based on the code path prompt information, and the project requirement identifier entered based on the project requirement prompt information.

[0072] S3103. Associate the code corresponding to the code segment identifier under the code storage path with the project requirement corresponding to the project requirement identifier.

[0073] By associating the code segment identifier under the code storage path with the project requirement identifier, users can accurately determine the project requirement corresponding to each code segment at any time.

[0074] S3104. Once the association is complete, upload the code corresponding to the code segment identifier to the code management repository.

[0075] In this embodiment, the code segment identifier will only be uploaded to the code management repository if the code corresponding to the code segment identifier is successfully associated with the corresponding project requirement, in order to prevent code import confusion. If the code corresponding to the code segment identifier and the project corresponding to the project requirement identifier do not meet the set association conditions, it will be determined that the code corresponding to the code segment identifier cannot be associated with the project corresponding to the project requirement identifier, and a prompt message will be output to indicate that the project requirement association failed and the code import failed due to the failure of the project requirement association.

[0076] S320. Add the account identifier or the user identifier bound to the account to the code operation result to update the code operation result, and output the updated code operation result.

[0077] When the processor uploads the code corresponding to the code segment identifier to the code management repository, it adds the account identifier of the current account or the user identifier bound to the current account to the code import result and outputs the code import result with the added account identifier or user identifier.

[0078] In this embodiment of the invention, the corresponding code is uploaded to the code management repository only after the association between the code segment identifier and the project requirement identifier is completed. This clarifies the purpose of the submitted code, facilitates code management on a project-by-project basis, and helps improve the level of code management.

[0079] Figure 4 The flowchart of a client-based code management method provided in another embodiment of the present invention belongs to the same aspect of the concept as the above embodiment. This embodiment further refines the "when a code operation request from a non-web client login account is detected, the code operation corresponding to the code operation request is executed to obtain the code operation result" in the previous embodiment. Figure 4 As shown, the method includes:

[0080] S4101. If the password verification is successful, output the code path prompt and the project requirement prompt.

[0081] S4102. Obtain the code storage path and code segment identifier entered by the user based on the code path prompt information, and the project requirement identifier entered based on the project requirement prompt information.

[0082] S4103. Associate the code corresponding to the code segment identifier under the code storage path with the project requirement corresponding to the project requirement identifier.

[0083] S4104. Once the association is complete, output a log message.

[0084] The log prompt information is used to prompt the user to enter the log storage path and log identifier.

[0085] In one embodiment, the log message is output in the form of a command, which is suitable for situations where logs are uploaded in the form of a command.

[0086] In one embodiment, the log information is the display information of a path control used for log path selection.

[0087] S4105. Obtain the log storage path and log identifier input by the user based on the log prompt information.

[0088] If the log message is output in command form, the user needs to enter the log storage path and log identifier of the log to be uploaded in the command input interface. If the log message is a path control for selecting the log path, the user can use the control to select the storage path of the log to be uploaded, and then select the log document to be uploaded under that storage path. The processor will then display the log identifier of the log to be uploaded based on the identifier of the log document selected by the user.

[0089] S4106. Based on Githook, perform standardization verification on the logs corresponding to the log identifiers under the log storage path.

[0090] Performing standardization checks on logs can improve the management level of daily log standards, and improving the management level of log standards helps to improve the management level of code by improving code readability.

[0091] S4107. If the verification fails, format the log corresponding to the log identifier to update the log, associate the updated log with the code corresponding to the code segment identifier, and upload the code corresponding to the code segment identifier and the updated log corresponding to the log to the code management repository.

[0092] If log validation fails, it indicates that the log format does not meet the set log formatting requirements. Therefore, the log will be formatted to conform to the set log formatting requirements. The formatted log will then be associated with the code to be uploaded, and the code segment corresponding to the code segment identifier and the updated log segment corresponding to the updated log segment identifier will be uploaded to the code management repository.

[0093] S4108. If the verification passes, manage the log corresponding to the log identifier and the code corresponding to the code segment identifier, and upload the code corresponding to the code segment identifier and the log corresponding to the log identifier to the code management repository.

[0094] If the verification passes, it means that the log meets the set log specification conditions, so it is directly associated with the log to be uploaded and uploaded to the code management repository together.

[0095] S420. Add the account identifier or the user identifier bound to the account to the code operation result to update the code operation result and output the updated code operation result.

[0096] This invention improves code management by performing code log standardization checks, thereby enhancing log standardization management and code readability.

[0097] Figure 4The flowchart of a client-based code management method provided in another embodiment of the present invention belongs to the same aspect of the concept as the above embodiment. This embodiment further refines the "when a code operation request from a non-web client login account is detected, the code operation corresponding to the code operation request is executed to obtain the code operation result" in the previous embodiment. Figure 2 As shown, the method includes:

[0098] S5101. If a code operation request is detected, determine whether there are valid Post parameters in the code operation request. If not, execute S5102; if yes, execute S5103.

[0099] S5102: Determine that the code operation request originates from the web client and do not respond to the code operation request.

[0100] S5103. Execute the code operation corresponding to the code operation request and obtain the code operation result.

[0101] This embodiment pre-configures request interface information, which includes POST port information. This POST port information enables the code operation request sent by the web client to include a first parameter, and the code operation request sent by the non-web client to include a second parameter.

[0102] The second parameter is used as a valid parameter. When a code operation request is detected, it is determined whether the valid POST parameter exists in the code operation request. If it does not exist, the code operation request is considered to be from the web client, and the code operation request is ignored or a prompt message indicating that the web client is prohibited from accessing is output. If it exists, the code operation request is considered to be from a non-web client, and the code operation corresponding to the code operation request is executed to obtain the code operation result.

[0103] S520. Add the account identifier or the user identifier bound to the account to the code operation result to update the code operation result and output the updated code operation result.

[0104] In this embodiment of the invention, the Post parameter included in the code operation request is used to determine whether the code operation request comes from a non-web client. If it comes from a web client, the code operation request is responded to; otherwise, no response is made, thereby achieving the goal of only responding to code operation requests from non-web clients.

[0105] Figure 6 This is a schematic diagram of the structure of a client-based code management device provided in an embodiment of the present invention. Figure 6 As shown, the device includes:

[0106] The code operation execution module 610 is used to execute the code operation corresponding to the code operation request and obtain the code operation result when a code operation request is detected from a non-web client login account.

[0107] The identifier addition module 620 is used to add the account identifier of the account or the user identifier bound to the account to the code operation result, so as to update the code operation result and output the updated code operation result.

[0108] In one embodiment, the code operation execution module 610 includes:

[0109] The password verification receiving unit is used to output a verification prompt message for receiving the verification password when a code operation request for a non-web client login account is detected. The verification password is configured to be sent to a set location when the user logs in successfully or registers successfully, or when a code operation request is detected.

[0110] The password verification and operation execution unit is used to obtain the verification password entered by the user, and if the verification password is verified successfully, to execute the code operation corresponding to the code operation request to obtain the code operation result.

[0111] In one embodiment, the password verification and operation execution unit is further configured to:

[0112] If the password verification fails, a message indicating that the user is not authorized to perform the operation will be output.

[0113] In one embodiment, the password verification and operation execution unit is used for:

[0114] Obtain the verification password entered by the user, and encrypt the verification password using the set encryption method to obtain the first encryption result;

[0115] Determine whether the first encryption result is the same as the corresponding reference encryption result. The reference encryption result is generated when the first encryption result is sent to the set location and is stored in the set backup location.

[0116] If so, the verification password is deemed to have been successfully verified.

[0117] In one embodiment, such as Figure 7 As shown, the device also includes a login module 600, which is used for:

[0118] Upon detecting a login request from a client, obtain the user's login information;

[0119] The user login information is verified based on LDAP, and the user account login is completed if the verification is successful.

[0120] In one embodiment, the code operation is code upload, code retrieval, code merging, or code compliance verification.

[0121] In one embodiment, the code operation execution module 610 specifically includes:

[0122] The prompting unit is used to output code path prompts and project requirement prompts when the verification password is successfully verified.

[0123] The acquisition unit is used to acquire the code storage path and code segment identifier input by the user based on the code path prompt information, and the project requirement identifier input based on the project requirement prompt information;

[0124] The association unit is used to associate the code corresponding to the code segment identifier under the code storage path with the project requirement corresponding to the project requirement identifier;

[0125] The upload unit is used to upload the code corresponding to the code segment identifier to the code management repository when the association is completed.

[0126] In one embodiment, the code path suggestion information is the display information of a path control for path selection; the project requirement suggestion information is the display information of a drop-down menu for selecting a project requirement identifier.

[0127] In one embodiment, the upload unit is specifically used for:

[0128] Once the association is complete, output a log message.

[0129] Obtain the log storage path and log identifier input by the user based on the log prompt information.

[0130] Based on Githook, the logs corresponding to the log identifier under the log storage path are validated for compliance.

[0131] If the verification fails, the log corresponding to the log identifier is formatted to update the log, the updated log is associated with the code corresponding to the code segment identifier, and the code corresponding to the code segment identifier and the updated log corresponding to the log identifier are uploaded to the code management repository;

[0132] If the verification passes, the log corresponding to the log identifier is associated with the code corresponding to the code segment identifier, and the code corresponding to the code segment identifier and the log corresponding to the log identifier are uploaded to the code management repository.

[0133] In one embodiment, the identifier adding module 620 is used to display the code operation result and the account identifier or user identifier included in the code operation result in the code operation result display interface.

[0134] In one embodiment, the logged-in user's account is linked to the user's mobile phone number or email address;

[0135] The specified location is either the password management database associated with the account, or the mobile phone or email address associated with the account.

[0136] In one embodiment, the code operation execution module 610 is used to determine whether there are valid Post parameters in the code operation request when a code operation request is detected;

[0137] If so, the code operation corresponding to the code operation request is executed to obtain the code operation result.

[0138] Compared to existing technologies, the technical solution of this invention only responds to code operation requests from logged-in users on the client side. On the one hand, this prevents users from executing code operation requests through the native Git client. On the other hand, it obtains the accurate account identifier of the logged-in account or the user identifier bound to the logged-in account. The code operation corresponding to the code operation request is executed, and the account identifier or the user identifier bound to the account is added to the code operation result. This makes it easier for users to trace the code operation result based on the account identifier or user identifier in the code operation result, thereby improving code management and user experience.

[0139] The client-based code management device provided in this embodiment of the invention can execute the client-based code management method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0140] Figure 8 A schematic diagram of a server device 10, which can be used to implement embodiments of the present invention, is shown. The server device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0141] like Figure 8As shown, server device 10 includes at least one processor 11 and memory, such as read-only memory (ROM) 12, random access memory (RAM) 13, etc., communicatively connected to at least one processor 11. The memory stores computer programs executable by at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of server device 10. The processor 11, ROM 12, and RAM 13 are interconnected via bus 14. Input / output (I / O) interface 15 is also connected to bus 14.

[0142] Multiple components in server device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows server device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0143] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as client-based code management methods.

[0144] In some embodiments, the client-based code management method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on server device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the client-based code management method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the client-based code management method by any other suitable means (e.g., by means of firmware).

[0145] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0146] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0147] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0148] To provide interaction with the user, the systems and techniques described herein can be implemented on a server device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the server device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0149] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0150] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0151] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the task scheduling method in the above embodiments.

[0152] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0153] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A client-based code management method, characterized by, The method comprises the following steps: In the case of detecting a code operation request of a non-web client logged in an account, performing code operation corresponding to the code operation request to obtain a code operation result; Adding an account identifier of the account or a user identifier bound to the account to the code operation result to update the code operation result, and outputting the updated code operation result; In the case of detecting a code operation request of a non-web client logged in an account, outputting verification prompt information for receiving a verification password, obtaining a verification password input by a user, and in the case of passing the verification of the verification password, performing code operation corresponding to the code operation request to obtain a code operation result, wherein the verification password is configured to be sent to a set position in the case of successful user login or successful user registration, or to be sent to a set position in the case of detecting a code operation request; In the case of detecting a code operation request, determining whether there is a valid Post parameter in the code operation request; if yes, performing code operation corresponding to the code operation request to obtain a code operation result. Further comprising:

2. The method of claim 1, wherein, In the case of failing the verification of the verification password, outputting prompt information for prompting no right to operate. The verification of the verification password is completed by the following method, comprising:

3. The method of claim 1, wherein, Obtaining a verification password input by a user, and encrypting the verification password by a set encryption method to obtain a first encryption result; Determining whether the first encryption result is same as a corresponding reference encryption result, wherein the reference encryption result is generated when the first encryption result is sent to the set position and is stored to a set backup position; If yes, it is determined that the verification password passes the verification. The client login of the user is completed by the following method, comprising:

4. The method of claim 1, wherein, In the case of detecting a login request from a client, obtaining user login information; Verifying the user login information based on LDAP, and completing user account login in the case of passing the verification. The code operation is code uploading, code pulling, code merging or code specification verification.

5. The method of claim 1, wherein, The code operation request is a code uploading request, and the code operation corresponding to the code operation request is performed in the case of passing the verification of the verification password, comprising:

6. The method of claim 2, wherein, In the case of passing the verification of the verification password, outputting code path prompt information and project requirement prompt information; Obtaining a code storage path and a code segment identifier input by a user based on the code path prompt information, and a project requirement identifier input based on the project requirement prompt information; Associating code corresponding to the code segment identifier under the code storage path with a project requirement corresponding to the project requirement identifier; In the case of completing the association, uploading the code corresponding to the code segment identifier to a code management warehouse. The code path prompt information is display information of a path control for path selection; and the project requirement prompt information is display information of a drop-down menu for selecting a project requirement identifier.

7. The method of claim 6, wherein, ​ 8. The method of claim 6, wherein, The code segment identification corresponding code is uploaded to the code management warehouse in the case of association completion, comprising: In the case of association completion, output log prompt information; Obtain the log storage path and log identification input by the user based on the log prompt information Based on Githook, the log corresponding to the log identification under the log storage path is checked for standardization; In the case of failed verification, the log corresponding to the log identification is formatted to update the log, the updated log is associated with the code corresponding to the code segment identification, and the code corresponding to the code segment identification and the log corresponding to the updated log identification are uploaded to the code management warehouse; In the case of passing the verification, the log corresponding to the log identification is associated with the code corresponding to the code segment identification, and the code corresponding to the code segment identification and the log corresponding to the log identification are uploaded to the code management warehouse.

9. The method of claim 5, wherein, The output updated code operation result, comprising: Display the code operation result and the account identification or the user identification included in the code operation result in the display interface of the code operation result.

10. A client-based code management apparatus, characterized by comprising: Comprising: The code operation execution module is configured to execute the code operation corresponding to the code operation request to obtain the code operation result in the case of detecting the code operation request of the non-web version client logged in the account; The identification adding module is configured to add the account identification of the account or the user identification bound to the account to the code operation result to update the code operation result, and output the updated code operation result; The code operation execution module is specifically configured to: In the case of detecting the code operation request of the non-web version client logged in the account, output the verification prompt information for receiving the verification password, obtain the verification password input by the user, and execute the code operation corresponding to the code operation request to obtain the code operation result in the case of passing the verification password verification, wherein the verification password is configured to be sent to a set position in the case of successful user login or successful user registration, or to be sent to a set position in the case of detecting the code operation request; In the case of detecting the code operation request, determine whether there is a valid Post parameter in the code operation request; if yes, execute the code operation corresponding to the code operation request to obtain the code operation result.

11. A server device, characterized by The server device comprises: At least one processor; and The memory is in communication connection with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the client-based code management method in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the client-based code management method in any one of claims 1-9 when executed.

13. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the client-based code management method according to any one of claims 1-9.

Citation Information

Patent Citations

  • User account login method and apparatus, electronic device and storage medium

    CN109039987A

  • Code operation authority control method and device

    CN112883344A