Large version engineering software management method, device, medium and electronic equipment
By generating and managing tokens and limiting code base operation permissions, the congestion problem of developers before the code base is blocked in large-version engineering software development is solved, and development efficiency is improved.
Patent Information
- Application Number
- CN201910026189.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-11
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2039-01-11
AI Technical Summary
In the development of large-version engineering software, developers are prone to congestion when executing code operations from the code base before the code base is closed, especially when the code volume is huge and the release cycle is short, resulting in slow code extraction and pushing The version is submitted first during the code, which affects development efficiency.
By generating and managing tokens, limiting the code operation permissions to the code base within a certain period of time, and combining the token matching relationship and number to determine whether the client is allowed to perform code operations, avoiding congestion caused by excessive concurrent requests.
It effectively solves the congestion problem during code base operations, improves the efficiency of software development, and ensures that developers can smoothly pull and push code operations.
Smart Images

Figure CN111435307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a large-version engineering software management method, device, computer-readable medium and electronic equipment. Background Art
[0002] Currently, the scale of business or products supported by websites or apps (APPLICATION) as business windows of e-commerce is getting bigger and bigger, the code projects supporting the background of websites or apps are also getting bigger and bigger, and the number of developers is also increasing.
[0003] As the business progress is relatively fast, the code engineering requires more and more iterative versions, which puts higher requirements on the collaborative development of developers. For example, before the code base is closed, developers often pull and submit code in a centralized manner. The code base server resources are limited, which easily leads to the situation that developers pull code slowly. If the developer successfully pulls the code and completes the code modification work, when the current version is submitted to the code base by other developers, the developer has to pull the code again.
[0004] Componentized or modularized projects can better solve the problem of code submission congestion before version closure mentioned above, but componentization or modularization cannot be achieved overnight. For existing large projects, componentization or modularization must also face version iterative development, which may take about a year and is a relatively slow process. In addition, in the process of componentization or modularization, since the code is encapsulated into blocks, there will also be problems with large file version management, which will aggravate the congestion before version closure.
[0005] When the code size of the company's main site APP project is several G (Gigabyte), and the software development is in the middle and late stages of modularization, and the release cycle is required to be short, the congestion problem when developers pull code before the code base is closed is more obvious. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a large-version engineering software management method, device, computer-readable medium and electronic device, thereby overcoming the congestion problem of developers executing code operations from the code library before the code library is closed, at least to a certain extent.
[0007] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0008] According to a first aspect of an embodiment of the present invention, a method for managing large-version engineering software is provided, including: generating a first token based on received client configuration data, and determining the validity period of the first token; sending the first token to the client; receiving a code execution request sent by the client containing a second token, the second token being generated based on the first token; determining whether there is a valid first token matching the second token based on the validity period, and if so, sending a permission instruction to the client in response to the code execution request so that the client obtains permission to perform operations on the code from the code library; if not, determining whether the number of the second tokens received is within a first set number, and if so, sending a permission instruction to the client in response to the code execution request so that the client obtains permission to perform operations on the code from the code library.
[0009] In one embodiment, the method further includes: polling whether the first token is invalid at a set first time interval; after the first token is invalid, clearing the invalid first token to update the valid first token.
[0010] In one embodiment, the method further includes: when receiving the code execution requests concurrently from multiple clients, and the concurrent number of the code execution requests is greater than a second set number, selecting the code execution requests of the second set number of clients from the multiple clients for response.
[0011] In one embodiment, the code execution request includes: a code pull request or a code push request; in response to the code execution request, sending a permission instruction to the client so that the client obtains permission to perform operations on the code from the code repository includes: in response to the code pull request, sending a first permission instruction to the client so that the client pulls code from the code repository, or in response to the code push request, sending a second permission instruction to the client so that the client pushes code to the code repository.
[0012] According to a second aspect of an embodiment of the present invention, a method for managing large-version engineering software is provided, the method comprising: sending client configuration data to a server; receiving a first token sent by the server, the first token being generated by the server according to the client configuration data, and the validity period of the first token being determined by the server; sending a code execution request containing a second token to the server, the second token being generated according to the first token; after obtaining the permission to perform operations on the code from the code library according to the permission instruction sent by the server, performing operations on the code from the code library, wherein the permission instruction is sent by the server according to the following strategy: determining whether there is a valid first token matching the second token according to the validity period, if so, sending a permission instruction to the client in response to the code execution request so that the client obtains the permission to perform operations on the code from the code library; if not, determining whether the number of the second tokens received is within a first set number, if so, sending a permission instruction to the client in response to the code execution request so that the client obtains the permission to perform operations on the code from the code library.
[0013] In one embodiment, the code execution request includes: a code pull request or a code push request; after obtaining the permission to perform operations on the code from the code library according to the permission instruction sent by the server, performing operations on the code from the code library includes: after obtaining the permission to perform pull operations on the code from the code library according to the first permission instruction sent by the server, pulling the code from the code library; or after obtaining the permission to perform push operations on the code from the code library according to the second permission instruction sent by the server, pushing the code to the code library.
[0014] According to a third aspect of an embodiment of the present invention, a large-version engineering software management device is provided, the device comprising: a generating unit, for generating a first token according to received client configuration data, and determining the validity period of the first token; a first sending unit, for sending the first token to the client; a first receiving unit, for receiving a code execution request including a second token sent by the client, the second token being generated according to the first token; a determining unit, for determining whether there is a valid first token matching the second token according to the validity period, if so, in response to the code execution request, sending a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library; if not, determining whether the number of the received second tokens is within a first set number, if so, in response to the code execution request, sending a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
[0015] In one embodiment, the device further includes a polling unit, configured to: poll whether the first token is invalid at a set first time interval; after the first token is invalid, clear the invalid first token to update the valid first token.
[0016] In one embodiment, the determination unit is also used for: when receiving the code execution requests concurrently from multiple clients, and the concurrent number of the code execution requests is greater than a second set number, selecting the code execution requests of the second set number of clients from the multiple clients for response.
[0017] In one embodiment, the code execution request includes: a code pull request or a code push request; the determination unit is also used to: in response to the code pull request, send a first permission instruction to the client so that the client pulls code from the code repository, or in response to the code push request, send a second permission instruction to the client so that the client pushes code to the code repository.
[0018] According to a fourth aspect of an embodiment of the present invention, a large-version engineering software management device is provided, the device comprising: a second sending unit, used to send client configuration data to a server; a second receiving unit, used to receive a first token sent by the server, the first token is generated by the server according to the client configuration data, and the validity period of the first token is determined by the server; the second sending unit is also used to send a code execution request containing a second token to the server, the second token is generated according to the first token; the execution unit is also used to execute operations on the code from the code library after obtaining the permission to execute operations on the code from the code library according to the permission instruction sent by the server, wherein the permission instruction is sent by the server according to the following strategy: determining whether there is a valid first token matching the second token according to the validity period, if so, sending a permission instruction to the client in response to the code execution request to enable the client to obtain the permission to execute operations on the code from the code library; if not, determining whether the number of the received second tokens is within a first set number, if so, sending a permission instruction to the client in response to the code execution request to enable the client to obtain the permission to execute operations on the code from the code library.
[0019] In one embodiment, the code execution request includes: a code pull request or a code push request; the execution unit is also used to: pull code from the code repository after obtaining permission to perform a pull operation on the code from the code repository according to a first permission instruction sent by the server; or push code to the code repository after obtaining permission to perform a push operation on the code from the code repository according to a second permission instruction sent by the server.
[0020] According to a fifth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the large-version engineering software management method as described in the first aspect or the second aspect of the above embodiment is implemented.
[0021] According to the sixth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the large-version engineering software management method as described in the first aspect or the second aspect of the above-mentioned embodiment.
[0022] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0023] In the technical solutions provided by some embodiments of the present invention, after receiving a code execution request containing a second token, the server determines whether to send an enable instruction based on whether there is a first token matching the second token and the number of second tokens, thereby solving the congestion problem that occurs when executing code operations from the code library server and improving the efficiency of software development.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0026] Figure 1 A flowchart of a method for managing large-version engineering software according to an embodiment of the present invention is schematically shown;
[0027] Figure 2 A flowchart of a method for managing large-version engineering software according to another embodiment of the present invention is schematically shown;
[0028] Figure 3 A flowchart of a method for managing large-version engineering software according to another embodiment of the present invention is schematically shown;
[0029] Figure 4 A block diagram of a large version engineering software management device according to an embodiment of the present invention is schematically shown;
[0030] Figure 5 A block diagram schematically shows a large version engineering software management device according to another embodiment of the present invention;
[0031] Figure 6 The structure of a computer system suitable for implementing an electronic device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present invention will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0033] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0036] Figure 1 A large version engineering software management method according to an exemplary embodiment of the present disclosure is schematically shown. Figure 1 The large version engineering software management method may include the following steps:
[0037] Step S102: Generate a first token according to the received client configuration data, and determine the validity period of the first token.
[0038] Step S104: Send the first token to the client.
[0039] Step S106: receiving a code execution request including a second token sent by the client, and generating the second token according to the first token.
[0040] Step S108, determine whether there is a valid first token matching the second token based on the validity time. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain the permission to perform operations on the code from the code library; if not, determine whether the number of received second tokens is within the first set number. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain the permission to perform operations on the code from the code library.
[0041] In this solution, the server determines whether to send an allowance instruction based on the received code execution request containing the second token, the matching relationship between the second token and the first token, and the number of second tokens. This can limit the number of clients that can operate the code in the code library within a certain time period, thereby reducing the occurrence of congestion when the code is operated centrally.
[0042] In an embodiment of the present invention, the code base server is a gitlab server, so it is necessary to install the distributed version control system git tool on the client and build the code base server on the server. Gitlab is an open source application developed using the Ruby on Rails framework to implement a self-hosted git project repository that can access public or private projects through a web interface. In addition, the client also needs to establish a personal account and password.
[0043] In an exemplary embodiment of the present disclosure, a code execution request includes: a code pull request or a code push request; in response to the code execution request, sending a permission instruction to the client so that the client obtains permission to perform operations on the code from the code repository includes: in response to the code pull request, sending a first permission instruction to the client so that the client pulls the code from the code repository, or in response to the code push request, sending a second permission instruction to the client so that the client pushes the code to the code repository.
[0044] The client configuration data received by the server includes the effective time configured by the client and a first set number, wherein the number of clients allowed to pull code from the code library and the number of clients allowed to push code to the code library can be the same or different.
[0045] The effective time can be set dynamically according to the busy situation. For example, when the server is under great pressure and the demand is frequent, the effective time can be set to 10 minutes. If the server is under less pressure and the demand is less, the effective time can be set to 30 minutes.
[0046] The first set number can be determined by detecting the network bandwidth and the server configuration. For example, if the network bandwidth is 1Mb (MByte), the maximum value of the first set number can be set to 100, and if the CPU (Central Processing Unit) is 1 core and the memory is 1, the maximum value of the first set number can be set to 10. In this case, the smaller value of the two maximum values is taken, that is, the maximum value of the first set number is determined to be 10.
[0047] When pulling code, the client can use the default configuration, that is, use the default public account to pull code from the code repository server; when pushing code, the client can use personalized configuration, that is, use a personal account to push code to the code repository server.
[0048] In step S102, after receiving the client configuration data, the server stores the data in a database and hashes the information to generate a first token. The first token is unique and has a validity period that is the same as the validity period in the client configuration data.
[0049] After receiving the code execution request in step S106, in step S108, whether the client sending the code execution request has the authority to operate the code library is reviewed. If the review is passed, the client is allowed to execute code operations from the code library server, and if the review is not passed, the client is not allowed to execute code operations from the code library server.
[0050] Before the client calls the default configuration module to prepare for pulling code, the server needs to configure the password of the public account on the client and the code library server. Specifically, you can use the first method: store the account and password of the default public account to the code library server through the store mode; or, use the second method: configure the default public account key pair to the client and the code library server respectively.
[0051] Here, the first way is to configure the git client through a shell script. Specifically, the default public account with code pull permission uses the store mode of the git tool's credential storage to store the account password on the client. Credential storage refers to a function provided by the git tool to provide a username and password management strategy. The store mode stores the credentials in plain text on disk and never expires. This means that unless the password on the git server is changed, you will never need to enter the credential information again.
[0052] The second method uses ssh (Secure Shell). This method is more common. First, a key pair is generated through the ssh tool, and then the public key in the key pair is configured to the code library, and the private key in the key pair is stored on the client, thereby achieving secret-free access between the client and the code library server.
[0053] In step S108, when the code pull request is approved, a first permission instruction is sent to the client, so that the client uses the default public account to pull the code from the code library server.
[0054] After the developer modifies the pulled code, he needs to push the modified code to the code library server.
[0055] Before sending the second permission instruction to the client, which indicates that the client is allowed to push code from the preconfigured code base server, the code base server needs to be preconfigured so that the personal account has the permission to push code to the code base server.
[0056] The configuration process mainly involves calling the code library interface to configure the code library server, mainly to apply for development permissions for personal accounts. After the application is successful, the application record needs to be saved to the server.
[0057] The code push request carries a personal account. When the request is approved, the default configuration will be destroyed or cleared, the push script will be executed, and the client will send the personal account and password as required to complete the code push operation.
[0058] After the first token is generated according to the received client configuration data, it is necessary to poll whether the first token is invalid at a set first time interval; after the first token is invalid, the invalid first token is cleared to update a valid first token.
[0059] In an embodiment of the present invention, when concurrent code execution requests from multiple clients are received and the concurrent number of code execution requests is greater than a second set number, code execution requests from clients of the second set number are selected from the multiple clients for response.
[0060] Here, the second set number is less than or equal to the first set number.
[0061] When the number of code execution requests is large, the server will randomly select the number of clients that are allowed to execute code operations.
[0062] Figure 2 Another embodiment of the present invention is a large version engineering software management method. Figure 2 , the large version engineering software management method may include the following steps:
[0063] Step S202: Send client configuration data to the server.
[0064] Step S204, receiving a first token sent by the server, the first token is generated by the server according to the client configuration data, and the validity period of the first token is determined by the server.
[0065] Step S206: Send a code execution request including a second token to the server, where the second token is generated based on the first token.
[0066] Step S208, after obtaining the permission to perform operations on the code from the code library according to the permission instruction sent by the server, perform operations on the code from the code library, wherein the permission instruction is sent by the server according to the following policy:
[0067] It is determined based on the validity time whether there is a valid first token matching the second token. If so, in response to the code execution request, a permission instruction is sent to the client to enable the client to obtain the permission to perform operations on the code from the code library. If not, it is determined whether the number of received second tokens is within the first set number. If so, in response to the code execution request, a permission instruction is sent to the client to enable the client to obtain the permission to perform operations on the code from the code library.
[0068] The code execution request includes a code pull request or a code push request. After obtaining the permission to perform a pull operation on the code from the code repository according to the first permission instruction sent by the server, the client pulls the code from the code repository.
[0069] After modifying the code, the client pushes the code to the code library server. At this time, after obtaining the permission to execute the push operation on the code from the code library according to the second permission instruction sent by the server, the client pushes the code to the code library.
[0070] and Figure 2 The embodiment corresponding to the major version management method shown is a client-side method embodiment, which is similar to Figure 1 The embodiment corresponding to the large version management method shown corresponds to the server-side method embodiment, so for details not disclosed in the embodiment of the present invention, please refer to the embodiment of the large version engineering software management method of the present invention mentioned above.
[0071] like Figure 3 FIG. 2 is a flowchart of a method for managing large-version engineering software according to another embodiment of the present invention. Figure 3As shown, after receiving the initialization installation information, the server stores and generates a first token based on the initialization installation information and returns it to the client. After receiving and reviewing the code pull request sent by the client, the server returns the review opinion to the client and configures the public account of the gitlab server at the same time. When the review opinion is passed, the client pulls the code from the gitlab server according to the default configuration.
[0072] After receiving and reviewing the code push request sent by the client, the server returns the review opinion to the client and configures the personal account on the gitlab server. If the review opinion is passed, the client pushes the code to the code library server according to the personalized configuration.
[0073] In the large-version engineering software management method of an embodiment of the present invention, after receiving a code execution request containing a second token, the server determines whether to send an allow instruction based on whether there is a first token matching the second token and the number of second tokens, thereby solving the congestion problem that occurs when executing code operations from the code library server and improving the efficiency of software development.
[0074] The following describes an embodiment of the device of the present invention, which can be used to implement the above-mentioned large version engineering software management method of the present invention. Figure 4 As shown, a large version engineering software management device 400 provided according to an embodiment of the present invention includes:
[0075] The generating unit 402 is configured to generate a first token according to the received client configuration data, and determine a validity period of the first token.
[0076] The first sending unit 404 is configured to send the first token to the client.
[0077] The first receiving unit 406 is configured to receive a code execution request including a second token sent by a client, where the second token is generated according to the first token.
[0078] The determination unit 408 is used to determine whether there is a valid first token matching the second token based on the validity time. If so, in response to the code execution request, a permission instruction is sent to the client to enable the client to obtain the permission to perform operations on the code from the code library; if not, it is determined whether the number of received second tokens is within a first set number. If so, in response to the code execution request, a permission instruction is sent to the client to enable the client to obtain the permission to perform operations on the code from the code library.
[0079] In this solution, the determination unit 408 determines whether to send an allow instruction based on the received code execution request containing the second token, the matching relationship between the second token and the first token, and the number of second tokens. This can limit the number of clients that can operate the code in the code library within a certain time period, thereby reducing the occurrence of congestion when the code is operated centrally.
[0080] After receiving the client configuration data, the data is stored in the database, and the generation unit 402 hashes the information to generate a first token, which is unique and has a valid time, which is the same as the valid time in the client configuration data. After the first receiving unit 406 receives the code execution request sent by the client, the determination unit 408 reviews whether the client that sent the code execution request has the authority to operate the code library. If the review is passed, the client is allowed to perform code operations from the code library server, and if the review is not passed, the client is not allowed to perform code operations from the code library server.
[0081] In an exemplary embodiment of the present disclosure, the code execution request includes a code pull request and a code push request. The determination unit is further configured to, in response to the code pull request, send a first permission instruction to the client to enable the client to pull code from the code repository, or, in response to the code push request, send a second permission instruction to the client to enable the client to push code to the code repository.
[0082] Here, the large version engineering software management device 400 also includes a polling unit for polling whether the first token is invalid at a set first time interval; after the first token is invalid, clearing the invalid first token to update the valid first token.
[0083] The determining unit is further configured to select code execution requests from a second set number of clients from among the multiple clients for response when concurrent code execution requests from multiple clients are received and the concurrent number of code execution requests is greater than a second set number.
[0084] When the number of code execution requests is large, the determination unit will randomly select the number of clients that are allowed to execute the code operation.
[0085] Here, the large version engineering software management device 400 also includes a personal account configuration unit and a public account configuration unit. Among them, the personal account configuration unit is used to configure the code library server so that the personal account has the authority to push code to the code library server. The public account configuration unit is used to store the account and password of the default public account to the code library server through the store mode; or, configure the default public account key pair to the client and the code library server respectively.
[0086] The functions of the personal account configuration unit and the public account configuration unit can be implemented by the same configuration unit.
[0087] like Figure 5 As shown, a large version engineering software management device 500 provided according to an embodiment of the present invention includes:
[0088] The second sending unit 502 is used to send the client configuration data to the server.
[0089] The second receiving unit 504 is used to receive a first token sent by the server, where the first token is generated by the server according to the client configuration data, and the validity period of the first token is determined by the server.
[0090] The second sending unit 502 is further configured to send a code execution request including a second token to the server, where the second token is generated according to the first token.
[0091] The execution unit 508 is also used to execute operations on the code from the code library after obtaining the permission to execute operations on the code from the code library according to the permission instruction sent by the server, wherein the permission instruction is sent by the server according to the following strategy: determining whether there is a valid first token matching the second token based on the validity time; if so, in response to the code execution request, sending an permission instruction to the client to enable the client to obtain the permission to execute operations on the code from the code library; if not, determining whether the number of received second tokens is within the first set number; if so, sending an permission instruction to the client in response to the code execution request to enable the client to obtain the permission to execute operations on the code from the code library.
[0092] In an exemplary embodiment of the present disclosure, a code execution request includes: a code pull request or a code push request; the execution unit is further used to: pull code from the code repository after obtaining permission to perform a pull operation on the code from the code repository according to a first permission instruction sent by the server; or push code to the code repository after obtaining permission to perform a push operation on the code from the code repository according to a second permission instruction sent by the server.
[0093] Since the various functional modules of the large-version engineering software management device of the exemplary embodiment of the present invention correspond to the steps of the exemplary embodiment of the large-version engineering software management method described above, for details not disclosed in the embodiment of the device of the present invention, please refer to the embodiment of the large-version engineering software management method of the present invention described above.
[0094] The large-version engineering software management device of the embodiment of the present invention solves the congestion problem that occurs when performing operations on the code from the code library server by determining whether to send an allow instruction based on whether there is a first token matching the second token and the number of second tokens after receiving a code execution request containing a second token, thereby improving the efficiency of software development.
[0095] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of an electronic device suitable for implementing an embodiment of the present invention. Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0096] like Figure 6 As shown, computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. Various programs and data required for system operation are also stored in RAM 603. CPU 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0097] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0098] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.
[0099] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0100] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0102] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the large-version engineering software management method described in the above embodiment.
[0103] For example, the electronic device can implement Figure 1 As shown in: Step S102, generating a first token according to the received client configuration data, and determining the validity period of the first token; Step S104, sending the first token to the client; Step S106, receiving a code execution request including a second token sent by the client, the second token being generated according to the first token; Step S108, determining whether there is a valid first token matching the second token according to the validity period, if so, in response to the code execution request, sending a first permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library; if not, determining whether the number of the second tokens received is within a first set number, if so, in response to the code execution request, sending a second permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
[0104] For example, the electronic device can achieve Figure 2 and Figure 3 The steps shown.
[0105] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0106] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0107] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0108] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A large version engineering software management method, characterized in that: The method comprises: generating a first token according to the received client configuration data, and determining a validity period of the first token; Sending the first token to the client; receiving a code execution request including a second token sent by the client, where the second token is generated according to the first token; Determine whether there is a valid first token matching the second token according to the validity time, and if so, send a permission instruction to the client in response to the code execution request so that the client obtains permission to perform operations on the code from the code library; If not, determine whether the number of the second tokens received is within a first set number. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
2. A large version engineering software management method according to claim 1, characterized in that: The method further comprises: polling whether the first token is invalid at a set first time interval; After the first token is invalidated, the invalidated first token is cleared to update the valid first token.
3. The method according to claim 1, characterized in that: The method further comprises: When receiving the code execution requests concurrently from multiple clients, and the concurrent number of the code execution requests is greater than a second set number, code execution requests from clients of the second set number are selected from the multiple clients for response.
4. The method according to any one of claims 1 to 3, characterized in that: The code execution request includes: a code pull request or a code push request; In response to the code execution request, sending a permission instruction to the client so that the client obtains permission to perform operations on the code from the code library includes: In response to the code pull request, sending a first permission instruction to the client to enable the client to pull code from the code repository, or In response to the code push request, a second permission instruction is sent to the client to enable the client to push the code to the code library.
5. A large version engineering software management method, characterized in that: The method comprises: Send client configuration data to the server; receiving a first token sent by the server, where the first token is generated by the server according to the client configuration data, and the validity period of the first token is determined by the server; Sending a code execution request including a second token to the server, where the second token is generated based on the first token; After obtaining the permission to perform operations on the code from the code library according to the permission instruction sent by the server, the operation on the code is performed from the code library, wherein the permission instruction is sent by the server according to the following policy: Determine whether there is a valid first token matching the second token according to the validity time, and if so, send a permission instruction to the client in response to the code execution request so that the client obtains permission to perform operations on the code from the code library; If not, determine whether the number of the second tokens received is within a first set number. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
6. The method according to claim 5, characterized in that The code execution request includes: a code pull request or a code push request; After obtaining the permission to perform operations on the code from the code library according to the permission instruction sent by the server, performing operations on the code from the code library includes: After obtaining the permission to perform a code pulling operation from the code repository according to the first permission instruction sent by the server, pulling the code from the code repository; or, After obtaining permission to perform a push operation on the code from the code repository according to the second permission instruction sent by the server, the code is pushed to the code repository.
7. A large version engineering software management device, characterized in that: The device comprises: A generating unit, configured to generate a first token according to the received client configuration data, and determine a validity period of the first token; A first sending unit, configured to send the first token to the client; A first receiving unit, configured to receive a code execution request including a second token sent by the client, where the second token is generated according to the first token; a determining unit, configured to determine whether there is a valid first token matching the second token according to the validity period, and if so, in response to the code execution request, send an enabling instruction to the client to enable the client to obtain permission to perform operations on the code from the code library; If not, determine whether the number of the second tokens received is within a first set number. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
8. A large version engineering software management device according to claim 7, characterized in that: The device also includes a polling unit, configured to: polling whether the first token is invalid at a set first time interval; After the first token is invalidated, the invalidated first token is cleared to update the valid first token.
9. The device according to claim 8, characterized in that The determining unit is further configured to: When receiving the code execution requests concurrently from multiple clients, and the concurrent number of the code execution requests is greater than a second set number, code execution requests from clients of the second set number are selected from the multiple clients for response.
10. The device according to any one of claims 7 to 9, characterized in that The code execution request includes: a code pull request or a code push request; the determination unit is further used to: In response to the code pull request, sending a first permission instruction to the client to enable the client to pull code from the code repository, or In response to the code push request, a second permission instruction is sent to the client to enable the client to push the code to the code library.
11. A large version engineering software management device, characterized in that: The device comprises: A second sending unit, used to send client configuration data to the server; A second receiving unit, configured to receive a first token sent by the server, where the first token is generated by the server according to the client configuration data, and the validity period of the first token is determined by the server; The second sending unit is further used to send a code execution request including a second token to the server, where the second token is generated according to the first token; The execution unit is further configured to execute the operation on the code from the code library after obtaining the permission to execute the operation on the code from the code library according to the permission instruction sent by the server, wherein the permission instruction is sent by the server according to the following policy: Determine whether there is a valid first token matching the second token according to the validity time, and if so, send a permission instruction to the client in response to the code execution request so that the client obtains permission to perform operations on the code from the code library; If not, determine whether the number of the second tokens received is within a first set number. If so, in response to the code execution request, send a permission instruction to the client to enable the client to obtain permission to perform operations on the code from the code library.
12. The device according to claim 11, characterized in that The code execution request includes: a code pull request or a code push request; The execution unit is also used for: After obtaining permission to perform a code pulling operation from a code repository according to a first permission instruction sent by the server, pulling the code from the code repository; or After obtaining permission to perform a push operation on the code from the code repository according to the second permission instruction sent by the server, the code is pushed to the code repository.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the large-version engineering software management method according to any one of claims 1 to 6 is implemented.
14. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the large-version engineering software management method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Authority management method and apparatus
CN105045716A
Continuous code integration method and device
CN108241502A