Branch management method and device, electronic equipment, storage medium and program product

By determining the target branch in the local device and downloading the branch on the server for packaging, the problem of insufficient local storage space is solved and efficient management of branch testing and merging is achieved.

CN118656118APending Publication Date: 2024-09-17NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410831080.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

During application development, the storage space of the local device is insufficient to download and package multiple branches, making branch testing and merging impossible.

Method used

By determining the target branch from the local branch list, downloading the branch on the server to the local, packaging the downloaded branch, and generating the application package body, thereby reusing local space and reducing the demand for local storage space.

Benefits of technology

It is realized that when the number of server branches exceeds the local storage capacity, the local device can still download and package branches, which improves the efficiency of branch management and space utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656118A
    Figure CN118656118A
Patent Text Reader

Abstract

The invention provides a branch management method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: responding to a packaging request for a first branch in a first branch list, and determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored in a server, and the second branch is stored locally; downloading the first branch to the local based on the target branch; and packaging the first branch downloaded to the local to obtain an application package body corresponding to the first branch. According to the method and the device, the to-be-downloaded branches are downloaded through the locally occupied space and are packaged, so that the local space can be repeatedly utilized, the requirement on the local space is reduced, and when the number of the branches of the server is greater than the number of the branches which can be stored locally, the branches can be downloaded and packaged locally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic computers and Internet technology, and in particular to a branch management method, device, electronic device, storage medium and program product. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] In the process of application development, in order to improve development efficiency, collaborative development is usually achieved through branches, that is, different branches are created, different branches are developed simultaneously, and finally the branches that pass the test are merged into the trunk.

[0004] The development of branches is usually carried out on the server. However, when testing the branches, the branches to be tested need to be downloaded to a local device (the local device is usually called a packager) and packaged, and then the packaged application package is tested.

[0005] However, the storage space of the local device is smaller than that of the server. When the number of branches stored in the server is greater than the number of branches that can be stored in the local device, the local device cannot download and package the branches. Summary of the invention

[0006] In view of this, the purpose of the present disclosure is to propose a branch management method, device, electronic device, storage medium and program product, which at least to a certain extent solve one of the technical problems in the related art.

[0007] Based on the above purpose, the first aspect of the exemplary embodiment of the present disclosure provides a branch management method, including:

[0008] In response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored in a server and the second branch is stored locally;

[0009] Based on the target branch, download the first branch to the local;

[0010] The first branch downloaded locally is packaged to obtain an application package corresponding to the first branch.

[0011] Based on the same inventive concept, a second aspect of the exemplary embodiment of the present disclosure provides a branch management device, including:

[0012] A branch determination module, configured to determine a target branch from at least one second branch in a second branch list in response to a packaging request for a first branch in a first branch list; wherein the first branch is stored in a server and the second branch is stored locally;

[0013] A branch downloading module, configured to download the first branch to a local device based on the target branch;

[0014] The branch packaging module is configured to package the first branch downloaded locally to obtain an application package corresponding to the first branch.

[0015] Based on the same inventive concept, a third aspect of the exemplary embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.

[0016] Based on the same inventive concept, a fourth aspect of the exemplary embodiments of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect.

[0017] Based on the same inventive concept, a fifth aspect of the exemplary embodiments of the present disclosure provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method described in the first aspect.

[0018] From the above, it can be seen that the branch management method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure include: in response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored on a server and the second branch is stored locally; based on the target branch, downloading the first branch locally; packaging the first branch downloaded locally to obtain an application package corresponding to the first branch. In the present disclosure, by downloading the branches to be downloaded and packaging them through the space already occupied locally, the local space can be reused, reducing the demand for local space. When the number of branches on the server is greater than the number of branches that can be stored locally, the branches can also be downloaded and packaged locally. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic diagram of a structure of a version control system provided for an exemplary embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of an application scenario of the branch management method provided by the exemplary embodiment of the present disclosure;

[0022] Figure 3 A flow chart of a branch management method provided by an exemplary embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a flow chart of a branch creation method provided for an exemplary embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of a flow chart of a target branch determination method provided for an exemplary embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of a flow chart of a branch and package body deletion method provided for an exemplary embodiment of the present disclosure;

[0026] Figure 7 A schematic diagram of the structure of a branch management device provided by an exemplary embodiment of the present disclosure;

[0027] Figure 8 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present application according to the prompt message.

[0030] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0031] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of the present application. Other methods that meet the relevant laws and regulations may also be applied to the implementation method of the present application.

[0032] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0033] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0034] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0035] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "one" or "a" before an element does not exclude the existence of multiple such elements.

[0036] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.

[0037] As described in the background art, in the process of application development, in order to improve development efficiency, collaborative development is usually achieved through branches, that is, different branches are created, different branches are developed simultaneously, and finally the branches that pass the test are merged into the trunk.

[0038] refer to Figure 1 As a specific example, the implementation of branches based on SVN (Subversion, version control system) is used as an example to illustrate. For the development of an application, the total code of the application is stored in the SVN service center. Users can connect to the SVN service center through the SVN client to pull or submit code.

[0039] The development of branches is usually carried out on the server. However, when testing the branches, the branches to be tested need to be downloaded to a local device (the local device is usually called a packager) and packaged, and then the packaged application package is tested.

[0040] Specifically, let's take the example of developing an electronic game as an application. When developing an electronic game, you need to package the electronic game into a compressed file for electronic game installation, hereinafter referred to as the package body. Sometimes the content of the electronic game needs to be updated, so you need to download an incremental package, hereinafter referred to as a patch, to update the code or art resource files. In order to achieve packaging or patching, you usually download the development SVN branch of the electronic game on a local device (i.e., a packager) and operate on the branch content. The memory space occupied by an SVN branch usually increases with the development time. As a specific example, the memory space occupied by an electronic game reaches more than 70GB, while the memory space of a packager is generally around 2TB. Therefore, if multiple branches are stored on it, the space of the packager will be tight in the end.

[0041] However, in the related art, when creating a development branch, a branch is usually created in the SVN cloud warehouse, and a corresponding branch is created on the packer at the same time to facilitate the corresponding packaging operation. Since the cloud SVN branch and the packer branch are created at the same time, when there are many branches that need to be developed at the same time or the available space of the packer is not large, the number of SVN branches in the cloud will be greater than the branches that the packer can store.

[0042] However, the inventors of the present disclosure have discovered that the storage space of the local device is smaller than that of the server. When the number of branches stored in the server is greater than the number of branches that can be stored in the local device, the local device cannot download and package the branches.

[0043] In order to solve the above problem, the present disclosure provides a branch management solution, which specifically includes: in response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored on a server and the second branch is stored locally; based on the target branch, downloading the first branch locally; packaging the first branch downloaded locally to obtain an application package corresponding to the first branch.

[0044] In the present disclosure, by downloading the branches to be downloaded and packaging them through the space already occupied locally, the local space can be reused, reducing the demand for local space. When the number of branches on the server is greater than the number of branches that can be stored locally, the branches can also be downloaded and packaged locally.

[0045] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.

[0046] refer to Figure 2 , which is a schematic diagram of an application scenario of the branch management method provided by the exemplary embodiment of the present disclosure.

[0047] This application scenario includes a local device 210, a server 220 and a terminal device 230. The local device 210, the server 220 and the terminal device 230 may be connected via a wired or wireless communication network to achieve data interaction.

[0048] Both the local device 210 and the terminal device 230 can be electronic devices with data transmission and multimedia input / output functions close to the user side, including but not limited to desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, personal digital assistants (PDAs) or other electronic devices capable of implementing the above functions. The electronic device may include a processor and a display screen with a touch input function, the display screen is used to present a graphical user interface, the graphical user interface can display an application interface, and the processor is used to process application data, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0049] Server 220 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0050] When implementing:

[0051] In response to the creation request for the first branch, the local device 210 calls the server interface to create the first branch on the server 220 .

[0052] The local device 210 records the first branch in the first branch list.

[0053] The local device 210 determines a target branch from at least one second branch in the second branch list in response to a packaging request for a first branch in the first branch list; wherein the first branch is stored in the server 220, and the second branch is stored locally in the local device 210;

[0054] The local device 210 downloads the first branch to the local device 210 based on the target branch;

[0055] The local device 210 packages the first branch downloaded to the local device 210 to obtain an application package corresponding to the first branch.

[0056] The terminal device 230 downloads the application package to the local terminal device 230 to install the application locally on the terminal device 230 , and tests the application locally to obtain the test result, and sends the test result to the local device 210 .

[0057] The local device 210 determines a test result for the application package;

[0058] In response to determining that the test result is a test pass, the local device 210 merges the target branch into the trunk;

[0059] The local device 210 removes the target branch from the first branch list;

[0060] The local device 210 deletes the application package locally from the local device 210 .

[0061] Combine the following Figure 2 The branch management method according to the exemplary embodiment of the present disclosure is described by using the application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present disclosure, and the implementation of the present disclosure is not limited in this respect. On the contrary, the implementation of the present disclosure can be applied to any applicable scenario.

[0062] refer to Figure 3 , which is a flow chart of a branch management method provided by an exemplary embodiment of the present disclosure.

[0063] The branch management method provided by the exemplary embodiment of the present disclosure includes the following steps:

[0064] Step S310: In response to a packaging request for a first branch in a first branch list, determine a target branch from at least one second branch in a second branch list; wherein the first branch is stored in a server, and the second branch is stored locally.

[0065] Next, we will first introduce the first branch list and the method of creating the first branch in the first branch list, specifically:

[0066] In an exemplary embodiment of the present disclosure, the first branch list is stored locally (ie, on a local device), and the first branch list records an identifier of at least one first branch (and may also include some basic information).

[0067] In specific implementation, considering the limited space of the local device, the first branch recorded in the first branch list is not the resource of the first branch itself, but the identifier of the first branch. The resource of the first branch itself is stored on the server.

[0068] In an exemplary embodiment of the present disclosure, in response to a packaging request for a first branch in a first branch list, before determining a target branch from at least one second branch in a second branch list, the method further includes creating the first branch, specifically:

[0069] refer to Figure 4 , the creation method of the first branch includes the following steps:

[0070] Step S410: In response to the creation request for the first branch, call a server interface to create the first branch on the server.

[0071] Step S420: Record the first branch in the first branch list.

[0072] In the specific implementation, a branch is created on the server and the created branch is developed on the server. In the present disclosure, in order to facilitate user operations, a pre-configured server interface can be called by a local device to implement operations on the local device, but the creation of the branch is implemented on the server. When the branch is created, its basic information (such as the sequence number, etc.) is recorded in the first branch list, and the first branch list is stored on the local device.

[0073] Among them, the subject of branch creation and the subject of creation screen presentation are separated. Branch creation is completed on the server. The role of the local device is to receive and send data and present the creation screen. For example, the local device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the server is responsible for information processing. When creating a branch, the player operates the local device to send an operation instruction to the server. The server runs the creation of the branch according to the operation instruction, encodes and compresses the data such as the branch creation screen, and returns it to the local device through the network. Finally, the local device decodes and outputs the branch creation screen.

[0074] The server is used to provide a branch creation service to a user of a local device. A client that communicates with the server is installed in the local device. The client provides a first graphical user interface, through which the user can input a command to create a branch. The client sends the command to create a branch to the server, and the server creates the branch.

[0075] In the above exemplary embodiment, the first branch list and the method for creating the first branch in the first branch list are introduced. Next, the method for generating the packaging request for the first branch in the first branch list will be introduced. Specifically:

[0076] In a specific implementation, the server is used to provide a branch download service to a user of a local device. A client that communicates with the server is installed in the local device. The client provides a second graphical user interface, which is used to display a first branch list to the user. There is at least one first branch identifier in the first branch list (the resources of the first branch themselves are stored on the server). In response to the user's selection operation on any first branch identifier, a packaging request for the selected first branch is generated. The client sends the packaging request for the selected first branch to the server, and the server sends the resources of the selected first branch themselves to the local device.

[0077] In some exemplary embodiments, a user can select several first branches at the same time. In response to the user's selection operation on the identifiers of any of the first branches, packaging requests for the selected first branches are generated in sequence. The client sends the packaging requests for the selected first branches to the server in sequence, and the server sends the resources of the selected first branches themselves to the local device in sequence using the solution provided by the present disclosure.

[0078] It should be noted that in the above exemplary embodiments, packaging is taken as an example for explanation. However, in some application scenarios, patching also exists. Specifically, packaging is aimed at the entire application, and patching is aimed at the incremental package of the application. It can be understood that the entire application and the incremental package of the application only differ in the amount of resources, and they are the same or similar in data form (even patching can be directly regarded as packaging). Therefore, in application scenarios that require patching, the implementation method is the same as that of packaging application scenarios, so it will not be repeated here.

[0079] In the above exemplary embodiment, the first branch list, the method for creating the first branch in the first branch list, and the method for generating the packaging request for the first branch in the first branch list are introduced. Next, the second branch list and the method for determining the target branch from at least one second branch in the second branch list are introduced. Specifically:

[0080] In a specific implementation, the second branch list is stored on the local device, at least one second branch is recorded in the first branch list, and the resources of the second branch are also stored on the local device.

[0081] It should be noted that, unlike the first branch in the first branch list, the first list on the local device only records the identifier of the first branch. However, the resources of the first branch themselves are not stored on the local device (the resources of the first branch themselves are stored on the server). For the second branch, not only is the identifier of the second branch recorded in the second branch list, but the resources of the second branch themselves are also stored on the local device.

[0082] In specific implementation, the purpose of determining the target branch from at least one second branch in the second branch list is to download the first branch based on the target branch to reduce the occupation of local space. Therefore, it is necessary to determine a branch configured to be replaced, that is, the target branch, from at least one second branch in the second branch list. The method of determining the target branch will be described in detail below:

[0083] refer to Figure 5 In an exemplary embodiment of the present disclosure, in response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list comprises the following steps:

[0084] Step S510: In response to a packaging request for the first branch in the first branch list, determine whether there is a historical version of the first branch in the second branch list.

[0085] In response to determining that the historical version of the first branch exists in the second branch list, step S520 is executed: determining the historical version of the first branch as the target branch.

[0086] In response to determining that there is no historical version of the first branch in the second branch list, step S530 is performed: determining the target branch from at least one of the second branches in the second branch list.

[0087] In the specific implementation, first determine whether there is a historical version of the first branch locally. If so, download the new version of the first branch directly based on the historical version; if not, determine a target branch in the locally existing branches for downloading the first branch.

[0088] The following describes in detail how to determine a target branch in a locally existing branch when the historical version of the first branch does not exist locally:

[0089] In an exemplary embodiment of the present disclosure, in response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list includes:

[0090] In response to a packaging request for the first branch in the first branch list, determining a historical use end time of the second branch;

[0091] The second branch whose historical use end time is closest to the current time is determined as the target branch.

[0092] In an exemplary embodiment of the present disclosure, in response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list includes:

[0093] In response to a packing request for the first branch in the first branch list, determining a historical usage frequency of the second branch;

[0094] The second branch with the highest historical usage frequency among the second branches is determined as the target branch.

[0095] In the above exemplary embodiments, determining the target branch from at least one second branch in the second branch list based on the historical use end time and the historical use frequency is taken as an example, but the present disclosure is not limited to this. In some possible implementations, the user can arbitrarily configure the rules for determining the target branch from at least one second branch in the second branch list to implement the function of determining the target branch from at least one second branch in the second branch list.

[0096] In the above exemplary embodiment, a method of determining a target branch from at least one second branch in the second branch list is introduced. However, in the second branch list, there is a third branch that cannot be determined as a target branch. The third branch is configured not to be removed from the second branch list. Specifically:

[0097] In an exemplary embodiment of the present disclosure, the second branch list further includes at least one third branch;

[0098] The third branch is configured to not be removed from the second branch list.

[0099] In specific implementation, for some branches whose resources are relatively fixed, that is, branches that change little during the development process, they are fixedly stored locally, and the branches will not be used to switch to the first branch. The present disclosure does not use this type of branch as the second branch because if it is switched to other branches, it will be frequently switched back, and by fixing it locally, the loss of resources caused by frequent switching can be reduced.

[0100] Step S320: Based on the target branch, download the first branch to the local computer.

[0101] In an exemplary embodiment of the present disclosure, downloading the first branch to a local device based on the target branch includes:

[0102] Determining different resources between the target branch and the first branch;

[0103] The target branch is replaced based on the distinguishing resource to obtain the first branch.

[0104] In specific implementation, Switch is performed on the target branch that has been stored locally, and the first branch is switched to achieve the purpose of downloading the first branch to the local. Compared with downloading the entire first branch to the local, Switch requires less local space and has a faster transmission speed.

[0105] Step S330: Package the first branch downloaded locally to obtain an application package corresponding to the first branch.

[0106] In this exemplary embodiment, for the files generated by packaging or patching (i.e., the application package body), folders are created according to the branch name for storage. When the branch is switched, the folder is not affected, that is, the packaged application package body is not affected.

[0107] refer to Figure 6In an exemplary embodiment of the present disclosure, after packaging the downloaded first branch to obtain the application package corresponding to the first branch, the method further includes:

[0108] Step S610: Determine the test result for the application package;

[0109] Step S620: In response to determining that the test result is a test pass, merging the target branch into the trunk;

[0110] Step S630: remove the target branch from the first branch list;

[0111] Step S640: Delete the application package from the local computer.

[0112] In specific implementation, when developing an application, requirements are generally proposed first. After receiving the requirements, the programmer creates an SVN branch and develops on the branch. After the development is completed, the application can be packaged using a packager. After the tester gets the application package, he installs it and starts testing the application. When the application content is modified, the packager can be used to perform a patch operation. After the application is updated to the patch, continue testing. Repeat this process until the application has no bugs or new application content. At this time, the content can be merged into the trunk, which is the external main branch of the application, and the original development branch content can be abandoned.

[0113] In specific implementation, after the application package corresponding to the first branch obtained by packaging the first branch is tested, the target branch is removed from the first branch list, and the application package is deleted locally, thereby reducing the occupation of local space.

[0114] In the present disclosure, by downloading the branches to be downloaded and packaging them through the space already occupied locally, the local space can be reused, reducing the demand for local space. When the number of branches on the server is greater than the number of branches that can be stored locally, the branches can also be downloaded and packaged locally.

[0115] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0116] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0117] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a branch management device.

[0118] refer to Figure 7 , which is a structural diagram of a branch management device provided by an exemplary embodiment of the present disclosure.

[0119] The branch management device provided by the exemplary embodiment of the present disclosure includes the following modules:

[0120] The branch determination module 710 is configured to determine a target branch from at least one second branch in the second branch list in response to a packaging request for a first branch in the first branch list; wherein the first branch is stored in a server and the second branch is stored locally;

[0121] A branch downloading module 720 is configured to download the first branch to a local device based on the target branch;

[0122] The branch packaging module 730 is configured to package the first branch downloaded locally to obtain an application package corresponding to the first branch.

[0123] In some exemplary embodiments, the branch management device further includes: a branch creation module (not shown in the figure), configured to:

[0124] In response to a creation request for the first branch, calling a server interface to create the first branch on the server;

[0125] The first branch is recorded in the first branch list.

[0126] In some exemplary embodiments, the branch management device further includes: a branch deletion module (not shown in the figure), which is configured to:

[0127] Determining test results for the application package body;

[0128] In response to determining that the test result is a test pass, merging the target branch into the trunk;

[0129] Remove the target branch from the first branch list;

[0130] The application package is deleted locally.

[0131] In some exemplary embodiments, the branch determination module 710 is specifically configured to:

[0132] In response to a packaging request for the first branch in the first branch list, determining whether there is a historical version of the first branch in the second branch list;

[0133] In response to determining that the historical version of the first branch exists in the second branch list, determining the historical version of the first branch as the target branch;

[0134] Or, in response to determining that there is no historical version of the first branch in the second branch list, the target branch is determined from at least one of the second branches in the second branch list.

[0135] In some exemplary embodiments, the branch determination module 710 is specifically configured to:

[0136] In response to a packaging request for the first branch in the first branch list, determining a historical use end time of the second branch;

[0137] The second branch whose historical use end time is closest to the current time is determined as the target branch.

[0138] In some exemplary embodiments, the branch determination module 710 is specifically configured to:

[0139] In response to a packing request for the first branch in the first branch list, determining a historical usage frequency of the second branch;

[0140] The second branch with the highest historical usage frequency among the second branches is determined as the target branch.

[0141] In some exemplary embodiments, the branch download module 720 is specifically configured to:

[0142] Determining different resources between the target branch and the first branch;

[0143] The target branch is replaced based on the distinguishing resource to obtain the first branch.

[0144] In some exemplary embodiments, the second branch list further includes at least one third branch;

[0145] The third branch is configured to not be removed from the second branch list.

[0146] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0147] The device of the above embodiment is used to implement the corresponding branch management method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0148] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the branch management method described in any of the above embodiments is implemented.

[0149] Figure 8 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0150] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0151] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0152] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0153] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0154] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0155] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0156] The electronic device of the above embodiment is used to implement the corresponding branch management method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0157] The memory 1020 stores machine-readable instructions executable by the processor 1010. When the electronic device is running, the processor 1010 communicates with the memory 1020 via the bus 1030, so that the processor 1010 executes the following instructions when running:

[0158] In response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored in a server and the second branch is stored locally;

[0159] Based on the target branch, download the first branch to the local;

[0160] The first branch downloaded locally is packaged to obtain an application package corresponding to the first branch.

[0161] In a possible implementation, in the instructions executed by the processor 1010, before determining the target branch from at least one second branch in the second branch list in response to the packing request for the first branch in the first branch list, the method further includes:

[0162] In response to a creation request for the first branch, calling a server interface to create the first branch on the server;

[0163] The first branch is recorded in the first branch list.

[0164] In a possible implementation manner, in the instructions executed by the processor 1010, after packaging the downloaded first branch to obtain the application package body corresponding to the first branch, the method further includes:

[0165] Determining test results for the application package body;

[0166] In response to determining that the test result is a test pass, merging the target branch into the trunk;

[0167] Remove the target branch from the first branch list;

[0168] The application package is deleted locally.

[0169] In a possible implementation, in the instructions executed by the processor 1010, in response to the packing request for the first branch in the first branch list, determining the target branch from at least one second branch in the second branch list includes:

[0170] In response to a packaging request for the first branch in the first branch list, determining whether there is a historical version of the first branch in the second branch list;

[0171] In response to determining that the historical version of the first branch exists in the second branch list, determining the historical version of the first branch as the target branch;

[0172] Or, in response to determining that there is no historical version of the first branch in the second branch list, the target branch is determined from at least one of the second branches in the second branch list.

[0173] In a possible implementation, in the instructions executed by the processor 1010, in response to the packing request for the first branch in the first branch list, determining the target branch from at least one second branch in the second branch list includes:

[0174] In response to a packaging request for the first branch in the first branch list, determining a historical use end time of the second branch;

[0175] The second branch whose historical use end time is closest to the current time is determined as the target branch.

[0176] In a possible implementation, in the instructions executed by the processor 1010, in response to the packing request for the first branch in the first branch list, determining the target branch from at least one second branch in the second branch list includes:

[0177] In response to a packing request for the first branch in the first branch list, determining a historical usage frequency of the second branch;

[0178] The second branch with the highest historical usage frequency among the second branches is determined as the target branch.

[0179] In a possible implementation manner, in the instructions executed by the processor 1010, downloading the first branch to the local based on the target branch includes:

[0180] Determining different resources between the target branch and the first branch;

[0181] The target branch is replaced based on the distinguishing resource to obtain the first branch.

[0182] In a possible implementation manner, in the instruction executed by the processor 1010, the second branch list further includes at least one third branch;

[0183] The third branch is configured to not be removed from the second branch list.

[0184] In the present disclosure, by downloading the branches to be downloaded and packaging them through the space already occupied locally, the local space can be reused, reducing the demand for local space. When the number of branches on the server is greater than the number of branches that can be stored locally, the branches can also be downloaded and packaged locally.

[0185] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the branch management method described in any of the above embodiments.

[0186] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic 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.

[0187] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.

[0188] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the branch management method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0189] Based on the same inventive concept, corresponding to the branch management method described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor executes the branch management method. Corresponding to the execution subject corresponding to each step in each embodiment of the branch management method, the processor that executes the corresponding step can belong to the corresponding execution subject.

[0190] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the branch management method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0191] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.

[0192] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive examples) of computer-readable storage media may include, for example: 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 this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.

[0193] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals 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 a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0194] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0195] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0196] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes 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 or other programmable data processing device to produce a machine, and these computer program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified in the boxes in the flowchart and / or block diagram.

[0197] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0198] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable device to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0199] In addition, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0200] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the 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 flowchart, and the combination of boxes in the block diagram or flowchart 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.

[0201] 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 the embodiments of the present application, 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.

[0202] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0203] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0204] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0205] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

[0206] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.

Claims

1. A branch management method, characterized in that: include: In response to a packaging request for a first branch in a first branch list, determining a target branch from at least one second branch in a second branch list; wherein the first branch is stored in a server and the second branch is stored locally; Based on the target branch, download the first branch to the local; The first branch downloaded locally is packaged to obtain an application package corresponding to the first branch.

2. The method according to claim 1, characterized in that Before determining the target branch from at least one second branch in the second branch list in response to the packing request for the first branch in the first branch list, the method further includes: In response to a creation request for the first branch, calling a server interface to create the first branch on the server; The first branch is recorded in the first branch list.

3. The method according to claim 1, characterized in that: After packaging the downloaded first branch to obtain an application package corresponding to the first branch, the method further includes: Determining test results for the application package body; In response to determining that the test result is a test pass, merging the target branch into the trunk; Remove the target branch from the first branch list; The application package is deleted locally.

4. The method according to claim 1, characterized in that: The step of determining a target branch from at least one second branch in a second branch list in response to a packing request for a first branch in a first branch list comprises: In response to a packaging request for the first branch in the first branch list, determining whether there is a historical version of the first branch in the second branch list; In response to determining that the historical version of the first branch exists in the second branch list, determining the historical version of the first branch as the target branch; Or, in response to determining that there is no historical version of the first branch in the second branch list, the target branch is determined from at least one of the second branches in the second branch list.

5. The method according to claim 1, characterized in that The step of determining a target branch from at least one second branch in a second branch list in response to a packing request for a first branch in a first branch list comprises: In response to a packaging request for the first branch in the first branch list, determining a historical use end time of the second branch; The second branch whose historical use end time is closest to the current time is determined as the target branch.

6. The method according to claim 1, characterized in that The step of determining a target branch from at least one second branch in a second branch list in response to a packing request for a first branch in a first branch list comprises: In response to a packing request for the first branch in the first branch list, determining a historical usage frequency of the second branch; The second branch with the highest historical usage frequency among the second branches is determined as the target branch.

7. The method according to claim 1, characterized in that The downloading the first branch to the local based on the target branch includes: Determining different resources between the target branch and the first branch; The target branch is replaced based on the distinguishing resource to obtain the first branch.

8. The method according to claim 1, characterized in that The second branch list also includes at least one third branch; The third branch is configured to not be removed from the second branch list.

9. A branch management device, characterized in that: include: A branch determination module, configured to determine a target branch from at least one second branch in a second branch list in response to a packaging request for a first branch in a first branch list; wherein the first branch is stored in a server and the second branch is stored locally; A branch downloading module, configured to download the first branch to a local device based on the target branch; The branch packaging module is configured to package the first branch downloaded locally to obtain an application package corresponding to the first branch.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

11. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 8.