Management method and device for shared construction space, equipment and storage medium
By setting up multiple shared build spaces in the shared storage space, the management server provides matching and free build space for terminal devices, solving the problem of low efficiency in multi-test link construction in application development, realizing multi-task parallel execution, and improving Overall development efficiency.
Patent Information
- Application Number
- CN202410960698.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
AI Technical Summary
In financial enterprises, the development of applications requires multiple testing links, resulting in sequential construction in preset storage space, resulting in low testing efficiency and development efficiency.
By setting up multiple shared construction spaces in the shared storage space, the management server receives the space construction tasks of the terminal device, querys and obtains matching and free shared construction spaces, and returns the path information of the target shared construction space to realize the parallelization of multiple test tasks. implement.
It improves the application development efficiency, reduces the waiting time of multiple test tasks, and significantly improves the testing efficiency.
Smart Images

Figure CN118916278A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource management technology, and in particular to a management method, device, equipment and storage medium for a shared construction space. Background Art
[0002] In financial enterprises, the development of applications (APPs) usually requires local testing, unit testing, system integration testing, application assembly testing, user acceptance testing, version verification testing, non-functional testing, system security verification, virus scanning, etc. In any link, the application needs to be built according to the source code to test the application's functions.
[0003] In the related art, an application can be constructed in a preset storage space according to source code to perform various test tasks. However, when there are multiple test tasks, the application needs to be constructed in sequence in the preset storage space according to each test task to perform multiple test tasks, resulting in low test efficiency, thereby resulting in low application development efficiency. Summary of the invention
[0004] The present application provides a management method, apparatus, device and storage medium for a shared build space, which are used to improve the development efficiency of an application.
[0005] In a first aspect, the present application provides a method for managing a shared construction space, which is applied to a management server of a shared storage space, and the method comprises:
[0006] Receiving a space construction task sent by a terminal device, wherein the space construction task includes an identification of an application program;
[0007] Querying whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state;
[0008] Obtain the target shared construction space from the shared construction space in the shared storage space that matches the space construction task and is in an idle state, and return the path information of the target shared construction space to the terminal device, wherein the path information includes the storage device identifier and directory path of the target shared construction space.
[0009] In a possible implementation manner, before receiving the space construction task sent by the terminal device, the method further includes:
[0010] Receiving an application registration request sent by a terminal device, wherein the application registration request includes an identifier of an application to be registered and space resource application information, wherein the space resource application information includes a required computing resource size, a memory resource size, and a number of shared construction spaces;
[0011] The number of shared construction spaces corresponding to the application program is constructed in the shared storage space according to the application registration request.
[0012] In a possible implementation, the method further includes:
[0013] Acquiring an initial source code file of the application from the terminal device;
[0014] The initial source code files are stored in the number of shared construction spaces respectively.
[0015] In a possible implementation manner, the space construction task further includes a code branch and a code version. Before returning the path information of the target shared construction space to the terminal device, the method further includes:
[0016] Based on the initial source code file, the code branch and the code version stored in the target shared build space, determining whether the code branch is included in the initial source code file and whether the version of the initial source code file is consistent with the code version;
[0017] Accordingly, returning the path information of the target shared construction space to the terminal device includes:
[0018] If the initial source code file includes the code branch, and the version of the initial source code file is consistent with the code version, the path information of the target shared construction space is returned to the terminal device.
[0019] In a possible implementation, the method further includes:
[0020] If the initial source code file does not include the code branch, or the version of the initial source code file is inconsistent with the code version, obtaining a new source code file that includes the code branch and is consistent with the code version;
[0021] The new source code file is stored in the target shared construction space, and path information of the target shared construction space is returned to the terminal device.
[0022] In a possible implementation, the space construction task further includes a code branch and a code version;
[0023] Correspondingly, acquiring the target shared construction space from the shared construction space existing in the shared storage space and matching the space construction task and in an idle state includes:
[0024] If there is at least one shared construction space that matches the identification of the application, the code branch, and the code version and is in an idle state, the target shared construction space is determined from the at least one shared storage space.
[0025] In a possible implementation, the method further includes:
[0026] If there is no shared construction space that matches both the code branch and the code version and is in an idle state, obtaining at least one shared construction space that matches any one of the elements of the code branch and the code version and is in an idle state from the shared storage space, and determining the target shared construction space from the at least one shared construction space;
[0027] A new source code file that is consistent with the identification of the application, the code branch, and the code version is obtained, and the new source code file is stored in the target shared construction space.
[0028] In a possible implementation, the method further includes:
[0029] After detecting that the terminal device completes the execution of the corresponding task based on the target shared construction space, the connection between the terminal device and the target shared construction space is released.
[0030] In a second aspect, the present application provides a management device for a shared construction space, the device comprising:
[0031] A receiving module, configured to receive a space construction task sent by a terminal device, wherein the space construction task includes an identification of an application program;
[0032] A query module, used for querying whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state;
[0033] The first processing module is used to obtain the target shared construction space from the shared construction space that matches the space construction task and is in an idle state in the shared storage space, and return the path information of the target shared construction space to the terminal device, wherein the path information includes the storage device identifier and directory path of the target shared construction space.
[0034] In a third aspect, the present application provides a shared storage space management server, including: a processor, a memory, and a communication interface;
[0035] The memory stores computer-executable instructions;
[0036] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for managing a shared construction space as described in any one of the first aspects.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions, which, when executed by a processing unit, are used to implement the shared construction space management method described in any one of the first aspects.
[0038] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for managing a shared construction space as described in any one of the first aspects.
[0039] The present application provides a management method, device, equipment and storage medium for a shared construction space, including a management server for a shared storage space that can receive a space construction task sent by a terminal device, query whether there is a shared construction space in the shared storage space that matches the task and is in an idle state, and if there is a shared construction space that matches and is idle, the server will obtain the target shared construction space from the shared construction space and return its path information to the terminal device. Since multiple shared construction spaces corresponding to applications can be set in the shared storage space, shared construction spaces that match the space construction task and are idle can be queried to complete the construction of the application. When there are multiple test tasks, there is no need to wait, which can improve the test efficiency and thus improve the development efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings here are incorporated into the specification and constitute a part of this specification, and are used together with the specification to explain the principles of the present application.
[0041] Figure 1 A schematic diagram of an application scenario of a shared construction space provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of a first embodiment of a method for managing a shared construction space provided in the present application;
[0043] Figure 3A flowchart of a second embodiment of a method for managing a shared construction space provided in this application;
[0044] Figure 4 A flowchart of a third embodiment of a method for managing a shared construction space provided in the present application;
[0045] Figure 5 A flowchart of a fourth embodiment of a method for managing a shared construction space provided in the present application;
[0046] Figure 6 A schematic diagram of the architecture of a management system for a shared construction space provided in an embodiment of the present application;
[0047] Figure 7 A flowchart of an example of a shared construction space allocation method provided in this application;
[0048] Figure 8 A flowchart of an example of a method for using a shared construction space provided in this application;
[0049] Fig. 9 A schematic diagram of the structure of a first embodiment of a management device for a shared construction space provided by the present application;
[0050] Fig.10 A schematic diagram of the structure of a second embodiment of a management device for a shared construction space provided by the present application;
[0051] Fig.11 A schematic diagram of the structure of a management server for a shared storage space provided in an embodiment of the present application.
[0052] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0054] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0055] Figure 1 This is a schematic diagram of an application scenario of a shared construction space provided in an embodiment of the present application. Figure 1 , a shared build space with N copies can be set in the shared storage space. When a space build task is received, a shared build space that matches the space build task and is in an idle state can be obtained from the shared storage space to implement the execution of subsequent test tasks.
[0056] For example, a shared construction space with 3 copies can be set in the shared storage space, namely shared construction space 1, shared construction space 2, and shared construction space 3. After receiving space construction task 1 and space construction task 2, shared construction space 1 that matches space construction task 1 and is in an idle state can be obtained from the shared storage space to realize the execution of subsequent test task 1; shared construction space 2 that matches space construction task 2 and is in an idle state can be obtained from the shared storage space to realize the execution of subsequent test task 2.
[0057] In the related art, it is necessary to build an application program according to source code in a single preset storage space to perform various test tasks. However, when there are multiple test tasks, it is necessary to build the application program in sequence in a single preset storage space according to each test task to perform multiple test tasks, resulting in low test efficiency and further low application development efficiency.
[0058] In the process of executing the test task, the inventor found that the application development process involves multiple test links. When executing the test task of one of the test links and building the application, the preset storage space will be occupied. At the same time, if there are other test tasks that also need to build the application, they need to wait in line, which leads to low test efficiency and low application development efficiency. Based on this, the inventor considers whether multiple shared construction spaces can be used to complete the needs of multiple test tasks. Specifically, after many experiments, the inventor found that multiple shared construction spaces can be set in the shared storage space. When the management server of the shared storage space receives the space construction task sent by the terminal device, the target shared construction space can be obtained from the shared construction space that matches the space construction task and is in an idle state in the shared storage space, and the path information of the target shared construction space is returned to the terminal device, so that the terminal device and the target shared construction space can establish a connection and execute the corresponding test task. Based on this, the present application proposes a management method for a shared construction space, which reduces the waiting time when multiple test tasks are executed by setting multiple shared construction spaces corresponding to the application in the shared storage space, thereby improving the development efficiency of the application.
[0059] The technical solutions shown in the present application are described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0060] Figure 2 This is a flowchart of Example 1 of the shared construction space management method provided in this application.
[0061] See also Figure 2 , the method may include:
[0062] S201. Receive a space construction task sent by a terminal device.
[0063] The execution subject of the embodiment of the present application can be a management server of a shared storage space, or a management device of a shared construction space set in the management server of the shared storage space. The management device of the shared construction space can be implemented by software, or by a combination of software and hardware. For ease of understanding, the following description is taken as an example in which the execution subject is a management server of a shared storage space (i.e., a management server).
[0064] In this step, the management server may receive a space construction task sent by the terminal device, where the space construction task includes an identification of the application program.
[0065] Optionally, the terminal device may refer to various smart phones, computers, or other devices with computing capabilities and network connection functions that can perform specific test tasks. For example, the terminal device is a computer device 1.
[0066] The ID of an application is a symbol, name or code that can uniquely identify and distinguish a specific application, thereby helping users and developers to distinguish and identify different applications. For example, the ID of application 1 can be X, and the ID of application 2 can be Y.
[0067] For example, the management server may receive a space construction task 1 sent by the computer device 1 , where the space construction task 1 includes an identifier X of the application 1 .
[0068] S202: Query whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state.
[0069] In this step, after receiving the space construction task, the management server may query whether there is a shared construction space that matches the space construction task and is in an idle state in the shared storage space managed by it.
[0070] Shared build space refers to a series of independent shared storage spaces defined on one or a group of shared space storage devices or servers, and an exclusive shared build space with N copies is allocated to each standard application in the shared storage space.
[0071] For example, an independent shared storage space 1 may be demarcated on a storage device, and three shared build spaces with the number of copies allocated to application 1 in the shared storage space 1 are shared build space 1, shared build space 2, and shared build space 3.
[0072] Optionally, when a corresponding shared build space is allocated to an application in an independent shared storage space, a shared build space with different numbers of copies may be allocated to different applications. For example, a shared build space with 3 copies may be allocated to application 1 in shared storage space 1, and a shared build space with 2 copies may be allocated to application 2 in shared storage space 1.
[0073] For another example, two shared storage spaces may be defined on a group of shared space storage devices composed of three storage devices, namely shared storage space 1 and shared storage space 2. In shared storage space 1, three shared build spaces with the number of copies may be allocated to application 1, namely shared build space 1, shared build space 2, and shared build space 3. In shared storage space 2, two shared build spaces with the number of copies may be allocated to application 2, namely shared build space 4 and shared build space 5.
[0074] Optionally, when allocating the corresponding shared build space to the application, it can also be allocated in different shared storage spaces. For example, application 1 corresponds to 3 shared build spaces with 3 copies, namely shared build space 1, shared build space 2, and shared build space 3. Shared build space 1 and shared build space 2 can be allocated from shared storage space 1, and shared build space 3 can be allocated from shared storage space 2.
[0075] It should be noted that when the corresponding shared construction space is allocated to the application in the shared storage space, the number of shared storage spaces and the number of copies of the shared construction space corresponding to each application can be preset according to demand.
[0076] Optionally, standard-compliant applications can refer to applications that have gone through code development, functional development, and entered the testing phase. These applications already have basic functions and design requirements, but need to pass various testing tasks to verify their performance, stability, and security to ensure that they can be successfully delivered to end users.
[0077] In an optional implementation, the shared construction space divided in the shared storage space may have an identification of an application, and the matching of the space construction task and the shared construction space means that the identification of the shared construction space is consistent with the identification of the application included in the space construction task.
[0078] The shared build space is idle when no test task is using the shared build space to build the application.
[0079] For example, if there are three shared construction spaces of application 1 in shared storage space 1, namely shared construction space 1, shared construction space 2, and shared construction space 3. After receiving space construction task 1, the management server can query in the shared storage space whether there is a shared construction space that matches space construction task 1 and is in an idle state.
[0080] S203: Acquire the target shared construction space from the shared construction spaces that match the space construction task and are in an idle state in the shared storage space, and return the path information of the target shared construction space to the terminal device.
[0081] In this step, the management server can obtain a shared construction space that matches the space construction task and is in an idle state from the shared storage space, and then select a target shared construction space from the shared construction space, and return the path information of the target shared construction space to the terminal device, where the path information includes the storage device identifier and directory path where the target shared construction space is located. The number of shared construction spaces that match the space construction task and are in an idle state can be 1, 2, or more.
[0082] The path information can be used to establish a connection between the terminal device and the target shared build space. When executing the test task, the terminal device can mount and use the target shared build space. The mounting method can be Linux standard network storage disk mounting, or other standard or custom shared storage mounting.
[0083] Optionally, when setting a shared construction space with N copies in the shared storage space, the priority of the shared construction space can be set, and when selecting a target shared construction space from at least one shared construction space, the shared construction space can be selected according to the priority order of the shared construction space.
[0084] Optionally, for any shared build space, there may be a storage device identifier where the shared build space is located and a directory path of the shared build space in the storage device. For example, the storage device identifier where shared build space 1 is located may be A, and the directory path of shared build space 1 on storage device A may be C:\\Directory1; the storage device identifier where shared build space 2 is located may be B, and the directory path of shared build space 2 on storage device B may be D:\\Directory2.
[0085] For example, the management server can obtain shared construction space 1 and shared construction space 2 that match space construction task 1 and are in an idle state from the shared storage space, select the target shared construction space from shared construction space 1 and shared construction space 2 according to the priority of shared construction space 1 being higher than that of shared construction space 2, and return path information 1 of the target shared construction space to computer device 1. The target shared construction space is shared construction space 1, and path information 1 includes storage device identifier A where the target shared construction space is located and directory path C:\\directory 1.
[0086] In an embodiment of the present application, the management server can receive a space construction task including an application identifier sent by a terminal device, obtain a target shared construction space from a shared construction space that matches the space construction task and is in an idle state in the shared storage space according to the space construction task, and return the path information of the target shared construction space to the terminal device. In this process, multiple shared construction spaces related to the application can be configured in the shared storage space, and a shared construction space that meets the construction task requirements and is idle can be found through query. In this way, multiple test tasks can be executed simultaneously without waiting, thereby significantly improving the test efficiency and further improving the development efficiency of the application.
[0087] Figure 3 This is a flow chart of the second embodiment of the shared construction space management method provided by this application. Figure 3 Based on the above embodiment, before step S201, the management method of the shared construction space further includes:
[0088] S301: Receive an application registration request sent by a terminal device.
[0089] In this step, the management server can receive an application registration request sent by the terminal device, which includes the identifier of the application to be registered and space resource application information. The space resource application information includes the required computing resource size, memory resource size and the number of shared construction spaces.
[0090] For computing resources, it refers to the number of cores of the processor (Central Processing Unit, CPU), such as a 4-core, 8-core, 16-core, or 32-core processor. For example, the computing resource required for shared build space 1 is an 8-core processor.
[0091] Memory resources refer to the size of random access memory (RAM) and solid state drive (SSD). For example, the memory resources required for shared build space 1 are 8GB RAM and 20GB SSD.
[0092] The terminal device that sends the application registration request can be a smart phone, tablet computer, or other device with computing power and network connection function that has the permission to log in to the management server. The user can log in to the management server through the device and fill in the application information on the management server to send the application registration request. For example, the terminal device that sends the application registration request is computer device 2.
[0093] Optionally, the terminal device that sends the application registration request may also be the terminal device that sends the space construction task 1.
[0094] For example, the management server can receive an application registration request sent by the computer device 2, where the application registration request includes the identifier X of the application 1 to be registered and space resource application information, where the space resource application information includes: 3 shared construction spaces are required, and the computing resources required for each shared construction space are an 8-core processor, and the memory resources are 8GB RAM and 20GB SSD.
[0095] S302: Construct a number of shared construction spaces corresponding to the application program in the shared storage space according to the application registration request.
[0096] In this step, the management server may construct a number of shared construction spaces corresponding to the application program in the shared storage space according to the registration request.
[0097] For example, if there is a shared storage space, three shared construction spaces with the number of copies, namely shared construction space 1, shared construction space 2, and shared construction space 3, can be allocated to application 1 in the shared storage space according to the application registration request. The three shared construction spaces all have the identifier X of application 1.
[0098] S303: Obtain an initial source code file of the application from the terminal device.
[0099] In this step, the management server can obtain the initial source code file of the application from the terminal device. In a specific implementation, the management server can configure a source code management tool, which can send an initial source code pull instruction to the terminal device with a predefined initial source code download address to obtain the initial source code file of the application, which includes the code branch of the application and the version of the initial source code file.
[0100] A source code management tool is a software used to manage and record source code changes during application development. For example, a source code management tool is a distributed version control system Git.
[0101] The code branch for an application can be used as a tag for the application version. Users can develop, fix bugs, or add new features on different code branches without affecting the main branch. When the development work of a branch is completed and ready to be released, it can be marked as a new application version. For example, the branches of application 1 can include the main branch, development branch, release branch, repair branch, etc.
[0102] The version of the initial source code file refers to a specific release or build of the application at a specific point in time. Each version of the application can be identified by a unique version number. For example, the version number of the version of the initial source code file is 1.0.
[0103] Optionally, the terminal device that pre-defines the initial source code download address may be the same as the terminal device that sends the application registration request.
[0104] For example, the management server can configure the Git source code management tool to send an initial source code pull instruction to the computer device 2 with a predefined initial source code download address to obtain the initial source code file of the application 1, which includes the development branch of the application 1 and the version number 1.0.
[0105] S304. Store the initial source code files in a number of shared construction spaces respectively.
[0106] In this step, the management server may store the initial source code file corresponding to each application in the number of shared construction spaces that have been created corresponding to the application.
[0107] In an embodiment of the present application, the management server can receive an application registration request sent by a terminal device, and create a corresponding number of shared build spaces for the application in a shared storage space according to the request. Then, the management server obtains the initial source code files of the application from the terminal device and stores these files in each shared build space. In the above process, multiple shared build spaces can support the simultaneous execution of different test tasks, improve test efficiency, and further improve the development efficiency of the application.
[0108] Furthermore, the shared build space management method provided in the embodiment of the present application can create a corresponding number of shared build spaces in the shared storage space, more effectively utilize storage resources, and avoid resource waste. In addition, by centrally processing application registration requests and source code storage through the management server, the management process can be simplified and efficiency can be improved.
[0109] Figure 4 This is a flow chart of the third embodiment of the shared construction space management method provided by this application. Figure 4 , the space construction task also includes a code branch and a code version. After obtaining the target shared construction space from the shared construction space that matches the space construction task and is in an idle state in the shared storage space, the management method of the shared construction space may include:
[0110] S401. Based on the initial source code file, code branch and code version stored in the target shared build space, determine whether the initial source code file includes a code branch and whether the version of the initial source code file is consistent with the code version.
[0111] In this step, after determining that the identifier of the application is the same as the identifier of the shared construction space and obtaining the target shared construction space from the shared construction space, it can be determined whether the initial source code file includes a code branch and whether the version of the initial source code file is consistent with the code version based on the initial source code file stored in the target shared construction space and the code branches and code versions included in the space construction task.
[0112] For example, after determining that the identifier X of application 1 is the same as the identifier X of shared build space 1, shared build space 2, and shared build space 3, and obtaining the target shared build space from the three shared build spaces, it can be determined whether the initial source code file includes a development branch and whether the version number 1.0 of the initial source code file is consistent with the code version 1.0 based on the initial source code file stored in the target shared build space and the development branch and code version 1.0 included in space build task 1.
[0113] S402: If the initial source code file includes a code branch, and the version of the initial source code file is consistent with the code version, then the path information of the target shared construction space is returned to the terminal device.
[0114] In this step, the path information of the target shared build space can be returned to the terminal device based on the fact that the initial source code file includes a code branch and the version number of the initial source code file is consistent with the code version.
[0115] For example, if the initial source code file includes a development branch and a version number 1.0, it can be determined that the initial source code file includes the development branch included in space construction task 1, and the version number 1.0 of the initial source code file is consistent with the code version 1.0 included in space construction task 1. Then, the path information 1 of the target shared construction space can be returned to the computer device 1, wherein the path information 1 includes the storage device identifier A where the target shared construction space is located and the directory path C:\\directory 1.
[0116] S403: If the initial source code file does not include a code branch, or the version of the initial source code file is inconsistent with the code version, obtain a new source code file that includes a code branch and is consistent with the code version.
[0117] In this step, based on the determination that the initial source code file does not include a code branch, or the version number of the initial source code file is inconsistent with the code version, a new source code file that includes a code branch and is consistent with the code version can be obtained. In a specific implementation, when it is determined that the initial source code file does not include a code branch, or the version number of the initial source code file is inconsistent with the code version, the target shared build space can be cleaned up, the initial source code file can be deleted, and a new source code file that includes a code branch and is consistent with the code version can be obtained from the terminal device.
[0118] For example, when the version number 1.0 of the determined initial source code file is inconsistent with the code version 2.0 included in the space construction task 1, the target shared construction space is cleaned up, the initial source code file is deleted, and a new source code file including a code branch as a development branch and consistent with the code version 2.0 is obtained from computer device 2.
[0119] S404: Store the new source code file in the target shared construction space, and return the path information of the target shared construction space to the terminal device.
[0120] For example, a new source code file including a code branch as a development branch and consistent with code version 2.0 obtained from computer device 1 can be stored in the target shared construction space, and path information 1 of the target shared construction space is returned to computer device 1. Path information 1 includes a storage device identifier A where the target shared construction space is located and a directory path C:\\directory 1.
[0121] In an embodiment of the present application, it is possible to determine whether the initial source code file includes a code branch and whether the version of the initial source code file is consistent with the code version based on the initial source code file stored in the target shared construction space, the code branches and code versions included in the space construction task. If the initial source code file includes a code branch and the version is consistent with the code version, the path information of the target shared construction space is returned to the terminal device; if the initial source code file does not include a code branch or does not match the code version, a new source code file including a code branch and consistent with the code version is obtained and stored in the target shared construction space, and then its path information is returned to the terminal device. In the above process, the source code files in the target shared construction space can be managed and updated according to the requirements of the space construction task to ensure that they are consistent with the code branches and code versions included in the space construction task, thereby improving the test efficiency of executing the test task and thereby improving the development efficiency of the application.
[0122] Figure 5 This is a flowchart of Example 4 of the shared construction space management method provided in this application.
[0123] See also Figure 5 , the space construction task also includes code branches and code versions, and the method may include:
[0124] S501. Receive a space construction task sent by a terminal device, where the space construction task includes an identification of an application program, a code branch, and a code version.
[0125] For example, the management server may receive a space construction task 1 sent by the computer device 1 , where the space construction task 1 includes an identifier X of the application 1 , a repair branch, and a code version 2.0.
[0126] S502: Query whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state.
[0127] The specific implementation of this step is the same as that of step S202, and will not be repeated here.
[0128] S503: If there is at least one shared construction space that matches the identification, code branch, and code version of the application and is in an idle state, determine a target shared construction space from the at least one shared storage space.
[0129] In this step, the management server can obtain from the shared storage space at least one shared construction space that matches the identification, code branch, and code version of the application included in the space construction task and is in an idle state, and determine the target shared construction space from the at least one shared construction space.
[0130] For example, the management server can obtain from the shared storage space the identifier X of the application included in the space construction task 1, the repair branch and the code version 2.0 that both match and are in the idle state shared construction space 1 and shared construction space 2, and determine that the target shared construction space is shared construction space 1 based on the fact that the priority of shared construction space 1 is higher than that of shared construction space 2.
[0131] S504. If there is no shared construction space that matches both the code branch and the code version and is in an idle state, obtain at least one shared construction space that matches any one of the elements of the code branch and the code version and is in an idle state from the shared storage space, and determine the target shared construction space from the at least one shared construction space.
[0132] In this step, if the identifier of the shared construction space is the same as the identifier of the application included in the space construction task, and there is no shared construction space in the stored initial source code file that matches the code branch and the code version included in the space construction task and is in an idle state, the management server can obtain from the shared storage space at least one shared construction space that matches any element of the code branch and the code version and is in an idle state, and determine the target shared construction space from the at least one shared storage space.
[0133] For example, if space construction task 1 includes the application's identifier X, a repair branch, and code version 2.0; if the identifier X of shared construction space 1, shared construction space 2, and shared construction space 3 is the same as the identifier X of the application included in space construction task 1, and the three shared construction spaces are all in idle state.
[0134] The initial source code files stored in shared construction space 1 include development branches, and the version number of the initial source code files is 1.0; the initial source code files stored in shared construction space 2 include repair branches, and the version number of the initial source code files is 1.0; the initial source code files stored in shared construction space 3 include release branches, and the version number of the initial source code files is 2.0. The initial source code files stored in the three shared construction spaces do not match the repair branches and code version 2.0 included in space construction task 1. Then, at least one shared construction space that matches any element in the repair branch and code version 2.0 and is in an idle state is obtained from shared storage space 1, and the target shared construction space is determined from at least one shared storage space. Among them, the shared construction space matched according to the repair branch and code version 2.0 can include shared construction space 2 and shared construction space 3. Since the priority of shared construction space 2 is higher than that of shared construction space 3, it can be determined that the target shared construction space is shared construction space 2.
[0135] S505 , obtaining a new source code file that is consistent with the identification, code branch, and code version of the application, and storing the new source code file in the target shared build space.
[0136] In this step, after determining the target shared construction space, the target shared construction space can be cleaned up, the initial source code files can be deleted, and new source code files that are consistent with the identification, code branch, and code version of the application included in the space construction task can be obtained from the terminal device, and the new source code files can be stored in the target shared construction space.
[0137] For example, after determining that the target shared construction space is shared construction space 2, the target shared construction space can be cleaned up, the initial source code file can be deleted, the identifier X of the application included in space construction task 1 can be obtained from computer device 2, the new source code file that is consistent with the repair branch and code version 2.0 can be stored in the target shared construction space.
[0138] S506: Return the path information of the target shared construction space to the terminal device.
[0139] For example, the path information 2 of the target shared construction space may be returned to the computer device 1. The path information 2 includes the storage device identifier B where the target shared construction space is located and the directory path D:\\directory2.
[0140] S507: After detecting that the terminal device completes execution of the corresponding task based on the target shared construction space, release the connection between the terminal device and the target shared construction space.
[0141] In this step, if the terminal device completes the connection with the target shared construction space based on the returned path information, and the management server detects that the terminal device has completed the corresponding test task based on the target shared construction space, it can release the connection between the terminal device and the target shared construction space and release the resources of the target shared construction space so that other terminal devices can use these resources to perform test tasks in other test links.
[0142] For example, computer device 1 completes the connection with the target shared construction space based on the returned path information 2. After the management server detects that computer device 1 completes the corresponding test task based on the target shared construction space, it can release the connection between computer device 1 and the target shared construction space and release the resources of the target shared construction space so that other computer devices can use these resources to perform test tasks in other test links.
[0143] In an embodiment of the present application, the management server receives a space construction task from a terminal device, and by querying the shared storage space, confirms that the identification, code branch, and code version of the application included in the task are matched, and determines the target shared construction space in an idle state. Alternatively, the shared storage space can be queried to confirm that the identification of the application matches, and matches any element in the code branch or code version, and determines the target shared construction space in an idle state. Once the target shared construction space is confirmed, the management server can update its source code file and return path information to the terminal device. After the terminal device completes the execution of the corresponding task based on the target shared construction space, the management server can release the connection between the terminal device and the target shared construction space. In the above process, the management server can match the target shared construction space that is idle and meets the task requirements according to the requirements of the space construction task, ensure that it matches the identification, code branch, and code version of the application included in the space construction task, improve the test efficiency of executing the test task, and then improve the development efficiency of the application.
[0144] Furthermore, the shared construction space management method provided in the embodiment of the present application can create a certain number of shared construction space copies in the shared storage space, thereby supporting the parallel execution of multiple testing links in the application development process, reducing the multi-task queuing waiting time in the application testing link, and improving the efficiency of multi-task parallel execution.
[0145] Figure 6 This is a schematic diagram of the architecture of the management system for the shared construction space provided in the embodiment of the present application. Figure 6 The management system 10 of the shared construction space includes a construction task server 11 , a management server 12 , and a storage device 13 .
[0146] A build client 111 may be provided on the build task server 11 , and the build task service 121 may publish a space build task through the build client 111 to complete the mounting of the remote shared build space.
[0147] The build task service 121 refers to the automation process in application development, and its main function is to compile, test, package and deploy applications according to pre-set rules and processes.
[0148] The build client may obtain the status of the shared build space in the shared storage space from the management server 12 , and read the build information of the application from the shared build space.
[0149] Optionally, the build client can be deployed at any location where a build is required, and its function is to synchronize the application build operation and the application build result status to the management server 12 during the execution of the standard application build.
[0150] The management server 12 can perform space management services, manage and allocate shared construction spaces according to application registration requests, and match appropriate shared construction spaces according to space construction tasks for executing subsequent test tasks of the application.
[0151] In the shared storage space of the storage device 13 , a shared construction space with different numbers of copies may be divided for each application program to serve as an application program construction service storage space.
[0152] Figure 7 This is a flowchart of an example of a shared construction space allocation method provided in this application. Figure 7 , including the following steps:
[0153] S701. Fill in application information to the information management module, including application program identification, name, and space resource application information. The space resource application information includes the required computing resource size, memory resource size, and the number N of shared construction spaces.
[0154] S702, the space information management module allocates shared construction space resources (N) according to the resource application information, and records the coordinates of each shared construction space in the shared storage space in the space information management module. Optionally, the storage device flag and directory path are used as the coordinates of the shared construction space in the shared storage space.
[0155] S703: Issue an initial source code pull instruction.
[0156] In this step, the spatial information management module can send instructions to the construction client to perform specific operations.
[0157] S704: Execute the initial source code pull instruction.
[0158] S705. Save the initial version source code in the directory path.
[0159] S706. Return the creation result.
[0160] Optionally, the creation result may include whether N shared construction spaces are created successfully or unsuccessfully.
[0161] S707: Save the initial operation result.
[0162] Figure 8 This is a flowchart of an example of a method for using a shared build space provided for this application. Figure 8 , including the following steps:
[0163] S801, execute the aforementioned construction task.
[0164] Optionally, a build task may be initiated through a terminal device based on historical test tasks in the application test phase. The build task may include a space build task and a test task.
[0165] S802: Initiate application construction preparation.
[0166] Optionally, application build preparation, that is, application program build preparation, may include a new build task.
[0167] S803: Receive a build instruction and apply for a shared build space.
[0168] Optionally, the build task can be issued through a terminal device in the form of a build instruction. The build client can receive the build instruction.
[0169] S804. The build client may check whether there is a shared build space that meets the requirements, and if not, wait.
[0170] S805. Match the shared construction space according to the construction instruction.
[0171] S806: Initiate a mount command.
[0172] S807. Respond to the mount instruction initiated by the build client, complete the mount, and return the shared build space mount result to the build client.
[0173] S808: The build client receives and returns the shared build space mounting result.
[0174] S809. Record the usage of the shared construction space.
[0175] Optionally, the usage status of the shared build space may include that the shared build space is in use and that the shared build space is not in use.
[0176] S810. Retrieve and generate subsequent tasks according to the build instruction and the space mounting status.
[0177] Optionally, generated follow-up tasks may include cleaning up the shared build space, obtaining a new source code version, etc.
[0178] S811. Generate a build operation record.
[0179] Optionally, generating build operation records may refer to automatically generating detailed logs or records during the application build process.
[0180] S812. Save the construction operation record.
[0181] S813. Verify the source code version and initiate necessary source code changes and cleanup operations.
[0182] Optionally, if the code branch is inconsistent with the code version and the source code version, clean up the shared build space and obtain a new source code version.
[0183] In an optional implementation, in order to maximize the use of a shared build space with N copies corresponding to an application and give full play to the copy advantages of the shared build space, a greedy strategy can be adopted. When the build client cannot match a shared build space that is completely consistent with the code branch and code version in the space build task, priority is given to selecting an idle shared build space that is not initialized and has not executed application builds, and then matching the idle shared build space with the code branch or code version.
[0184] Under the greedy strategy, the matching shared build space can be further optimized by calculating the frequency of occurrence of each build element, including code branches and code versions, and limiting the space build tasks of the same code branch to the same shared build space as much as possible, reducing program version changes across code branches, and further optimizing the efficiency of the shared build space.
[0185] S814. Change the shared build space content according to the build instruction.
[0186] S815. Check the build status.
[0187] Optionally, the build status may include built and not built.
[0188] S816. Execute a build operation according to the build status.
[0189] If the build status is Not Built, you can execute the build operation to complete the build.
[0190] S817. Save the construction result.
[0191] Optionally, the build result may include build success and build failure.
[0192] S818. Return the build result to the specified location according to the instruction requirements.
[0193] S819: Perform subsequent processing on the construction result.
[0194] S820: Issue a shared build space uninstallation instruction.
[0195] S821. Execute the shared build space uninstallation.
[0196] S822: Process the shared build space uninstallation result.
[0197] S823. Record the uninstallation status of the shared build space.
[0198] S824. Execute subsequent construction operations.
[0199] The shared build space usage method proposed in this example can reduce the need to continuously pull source code and execute builds in multiple test links in the enterprise application testing process by sharing source code storage and mounting dynamic network storage disks. Compared with the need to process several gigabytes (GB) of source code resources and spend a lot of time executing builds when executing multiple test tasks, the use of this shared build space can greatly improve the overall efficiency of enterprise application construction.
[0200] Fig. 9 This is a structural diagram of Example 1 of the management device for shared construction space provided in this application.
[0201] See also Fig. 9 , the management device 20 of the shared construction space includes:
[0202] A receiving module 21, configured to receive a space construction task sent by a terminal device, wherein the space construction task includes an identification of an application program;
[0203] A query module 22 is used to query whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state;
[0204] The first processing module 23 is used to obtain the target shared construction space from the shared construction space that matches the space construction task and is in an idle state in the shared storage space, and return the path information of the target shared construction space to the terminal device, wherein the path information includes the storage device identifier and directory path of the target shared construction space.
[0205] The shared storage space management device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0206] Fig.10 This is a schematic diagram of the structure of the second embodiment of the management device for shared construction space provided by this application. Fig.10 The management device 20 for sharing the construction space further includes a second processing module 24, wherein the second processing module 24 is used to:
[0207] Receiving an application registration request sent by a terminal device, wherein the application registration request includes an identifier of an application to be registered and space resource application information, wherein the space resource application information includes a required computing resource size, a memory resource size, and a number of shared construction spaces;
[0208] The number of shared construction spaces corresponding to the application program is constructed in the shared storage space according to the application registration request.
[0209] In a possible implementation manner, the second processing module 24 is further configured to:
[0210] Acquiring an initial source code file of the application from the terminal device;
[0211] The initial source code files are stored in the number of shared construction spaces respectively.
[0212] In a possible implementation manner, the first processing module 23 is further configured to:
[0213] Based on the initial source code file, the code branch and the code version stored in the target shared build space, determining whether the code branch is included in the initial source code file and whether the version of the initial source code file is consistent with the code version;
[0214] If the initial source code file includes the code branch, and the version of the initial source code file is consistent with the code version, the path information of the target shared construction space is returned to the terminal device.
[0215] In a possible implementation manner, the first processing module 23 is further configured to:
[0216] If the initial source code file does not include the code branch, or the version of the initial source code file is inconsistent with the code version, obtaining a new source code file that includes the code branch and is consistent with the code version;
[0217] The new source code file is stored in the target shared construction space, and path information of the target shared construction space is returned to the terminal device.
[0218] In a possible implementation, the space construction task further includes a code branch and a code version;
[0219] Accordingly, the first processing module 23 is specifically used for:
[0220] If there is at least one shared construction space that matches the identification of the application, the code branch, and the code version and is in an idle state, the target shared construction space is determined from the at least one shared storage space.
[0221] In a possible implementation manner, the first processing module 23 is specifically configured to:
[0222] If there is no shared construction space that matches both the code branch and the code version and is in an idle state, obtaining at least one shared construction space that matches any one of the elements of the code branch and the code version and is in an idle state from the shared storage space, and determining the target shared construction space from the at least one shared construction space;
[0223] A new source code file that is consistent with the identification of the application, the code branch, and the code version is obtained, and the new source code file is stored in the target shared construction space.
[0224] In a possible implementation manner, the first processing module 23 is specifically configured to:
[0225] After detecting that the terminal device completes the execution of the corresponding task based on the target shared construction space, the connection between the terminal device and the target shared construction space is released.
[0226] The shared storage space management device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0227] Fig.11 A schematic diagram of the structure of a shared storage space management server provided in an embodiment of the present application. Fig.11 The shared storage space management server 30 may include: a processor 31, a memory 32, a bus 33 and a communication interface 34. Exemplarily, the processor 31, the memory 32 and the communication interface 34 are interconnected via the bus 33.
[0228] The memory 32 stores computer-executable instructions;
[0229] The processor 31 executes the computer-executable instructions stored in the memory 32 , so that the processor 31 executes the management method of the shared construction space provided in the method embodiment.
[0230] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the shared construction space management method described in the above method embodiment.
[0231] Accordingly, an embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for managing a shared construction space described in the above method embodiment can be implemented.
[0232] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0233] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0236] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0237] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0238] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0239] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0240] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for managing a shared construction space, characterized in that: Applied to a management server of a shared storage space, the method comprises: Receiving a space construction task sent by a terminal device, wherein the space construction task includes an identification of an application program; Querying whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state; Obtain the target shared construction space from the shared construction space in the shared storage space that matches the space construction task and is in an idle state, and return the path information of the target shared construction space to the terminal device, wherein the path information includes the storage device identifier and directory path of the target shared construction space.
2. The method according to claim 1, characterized in that: Before receiving the space construction task sent by the terminal device, the method further includes: Receiving an application registration request sent by a terminal device, wherein the application registration request includes an identifier of an application to be registered and space resource application information, wherein the space resource application information includes a required computing resource size, a memory resource size, and a number of shared construction spaces; The number of shared construction spaces corresponding to the application program is constructed in the shared storage space according to the application registration request.
3. The method according to claim 2, characterized in that The method further comprises: Acquiring an initial source code file of the application from the terminal device; The initial source code files are stored in the number of shared construction spaces respectively.
4. The method according to any one of claims 1 to 3, characterized in that: The space construction task also includes a code branch and a code version. Before returning the path information of the target shared construction space to the terminal device, the method also includes: Based on the initial source code file, the code branch and the code version stored in the target shared build space, determining whether the code branch is included in the initial source code file and whether the version of the initial source code file is consistent with the code version; Accordingly, returning the path information of the target shared construction space to the terminal device includes: If the initial source code file includes the code branch, and the version of the initial source code file is consistent with the code version, the path information of the target shared construction space is returned to the terminal device.
5. The method according to claim 4, characterized in that The method further comprises: If the initial source code file does not include the code branch, or the version of the initial source code file is inconsistent with the code version, obtaining a new source code file that includes the code branch and is consistent with the code version; The new source code file is stored in the target shared construction space, and path information of the target shared construction space is returned to the terminal device.
6. The method according to any one of claims 1 to 3, characterized in that: The space construction task also includes code branches and code versions; Correspondingly, acquiring the target shared construction space from the shared construction space existing in the shared storage space and matching the space construction task and in an idle state includes: If there is at least one shared construction space that matches the identification of the application, the code branch, and the code version and is in an idle state, the target shared construction space is determined from the at least one shared storage space.
7. The method according to claim 6, characterized in that The method further comprises: If there is no shared construction space that matches both the code branch and the code version and is in an idle state, obtaining at least one shared construction space that matches any one of the elements of the code branch and the code version and is in an idle state from the shared storage space, and determining the target shared construction space from the at least one shared construction space; A new source code file that is consistent with the identification of the application, the code branch, and the code version is obtained, and the new source code file is stored in the target shared construction space.
8. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: After detecting that the terminal device completes the execution of the corresponding task based on the target shared construction space, the connection between the terminal device and the target shared construction space is released.
9. A management device for a shared construction space, characterized in that: The device comprises: A receiving module, configured to receive a space construction task sent by a terminal device, wherein the space construction task includes an identification of an application program; A query module, used for querying whether there is a shared construction space in the shared storage space that matches the space construction task and is in an idle state; The first processing module is used to obtain the target shared construction space from the shared construction space that matches the space construction task and is in an idle state in the shared storage space, and return the path information of the target shared construction space to the terminal device, wherein the path information includes the storage device identifier and directory path of the target shared construction space.
10. A shared storage space management server, characterized in that: include: processor, memory and communication interface; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for managing a shared construction space as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for managing a shared construction space as described in any one of claims 1 to 8.
12. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the method for managing a shared construction space as described in any one of claims 1 to 8.
Citation Information
Cited By
Automatic construction system
CN119248427A
An automated build system
CN119248427B
