Methods for the transfer of software resources, methods and devices for the integration of software products
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]有鉴于此,本公开实施例提供了一种软件资源的流转方法、软件产品的集成方法及装置,以解决软件开发的效率较低的问题
[0025]In this disclosure, some software resources built by the resource provider are decoupled from business logic. Through a resource transfer scheme, the completed software resources can be actively transferred to the cache area corresponding to more than one software product, allowing different software products to reuse the software resources built once. Compared to the technical solution where each software product builds its required software resources separately, this reduces the number of builds, lowers system resource consumption, and improves build efficiency.
Smart Images

Figure CN116126518B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software development, and in particular to a method for transferring software resources, a method for integrating software products, and an apparatus. Background Technology
[0002] In software development, a continuous build and integration approach is typically adopted.
[0003] The overall process of continuous build and integration solutions is business-driven. Business-driven means that when developing any software product, the business side of the software product requests the corresponding software resources from the software resource provider; the software resource provider responds to the request and builds the software resources, and then provides feedback to the business side, i.e., resource flow; after receiving the software resources required by the software product, the business side integrates them to obtain the software product.
[0004] When developing multiple software products, a separate build-transfer-integration process is deployed for each product's business line. The software products operate independently, and the construction of software resources is driven by the business units. Each business unit is unaware of how many businesses rely on a particular resource, nor whether there are differences in the software resources used by different businesses. Therefore, based on business needs, they can only rebuild the software to obtain the latest software resource deliverables and execute their independent build-transfer-integration process, resulting in low software development efficiency. Summary of the Invention
[0005] In view of this, the present disclosure provides a method for transferring software resources, a method for integrating software products, and an apparatus to solve the problem of low efficiency in software development.
[0006] According to one aspect of this disclosure, a method for transferring software resources is provided, the method comprising:
[0007] Obtain the target software resources to be transferred and the currently stored resource transfer scheme, wherein the target software resources are the software resources required for the target software product;
[0008] Based on the resource transfer scheme, at least one cache region is determined to receive the target software resources, wherein each cache region corresponds to any software product;
[0009] The target software resources are transferred to the designated cache area.
[0010] According to another aspect of this disclosure, a method for integrating a software product is provided, the method comprising:
[0011] Access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area;
[0012] Based on the integration logic of the target software product and the multiple target software resources, an integration task is built and executed to construct the target software product.
[0013] According to another aspect of this disclosure, a software resource transfer apparatus is provided, the apparatus comprising:
[0014] The acquisition module is used to acquire the target software resources to be transferred and the currently stored resource transfer scheme, wherein the target software resources are the software resources required by the target software product.
[0015] The determining module is used to determine at least one cache region to receive the target software resources according to the resource flow scheme, wherein each cache region corresponds to any software product;
[0016] The transfer module is used to transfer the target software resources to a predetermined cache area.
[0017] According to another aspect of this disclosure, an integration apparatus for a software product is provided, the apparatus comprising:
[0018] The access module is used to access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area.
[0019] An integration module is used to build and execute integration tasks based on the integration logic of the target software product and the multiple target software resources to construct the target software product.
[0020] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0021] Processor; and
[0022] Stored program memory,
[0023] The aforementioned program includes instructions that, when executed by the aforementioned processor, cause the processor to perform the method for transferring the aforementioned software resources or the method for integrating the aforementioned software product.
[0024] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions, wherein the computer instructions are used to cause a computer to execute the software resource transfer method or the software product integration method.
[0025] In this disclosure, some software resources built by the resource provider are decoupled from business logic. Through a resource transfer scheme, the completed software resources can be actively transferred to the cache area corresponding to more than one software product, allowing different software products to reuse the software resources built once. Compared to the technical solution where each software product builds its required software resources separately, this reduces the number of builds, lowers system resource consumption, and improves build efficiency.
[0026] Business units can obtain the software resources required by the software product from the cache area without requesting and calling them from the resource provider, thus isolating the business unit from the resource provider. Furthermore, parameters applicable to the software product itself can be configured during the business unit's integration process, further promoting decoupling between the resource provider and the business. Attached Figure Description
[0027] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0028] Figure 1 A flowchart illustrating a method for transferring software resources according to exemplary embodiments of the present disclosure is shown.
[0029] Figure 2 A flowchart illustrating a method for constructing software resources according to exemplary embodiments of the present disclosure is shown;
[0030] Figure 3 A flowchart illustrating an integration method for a software product provided according to an exemplary embodiment of this disclosure is shown.
[0031] Figure 4 A flowchart illustrating a method for constructing and transferring software resources and integrating corresponding software products according to exemplary embodiments of the present disclosure is shown.
[0032] Figure 5 A schematic diagram illustrating the communication relationship between a resource provider and a service provider according to exemplary embodiments of this disclosure is shown.
[0033] Figure 6 A schematic diagram illustrating the construction of a general software resource according to an exemplary embodiment of this disclosure is shown;
[0034] Figure 7 A schematic diagram illustrating the construction of dedicated software resources according to exemplary embodiments of this disclosure is shown;
[0035] Figure 8 A schematic diagram of a software product development process provided according to an exemplary embodiment of this disclosure is shown;
[0036] Figure 9 A schematic block diagram of a software resource transfer apparatus provided according to an exemplary embodiment of the present disclosure is shown;
[0037] Figure 10 A schematic block diagram of an integration apparatus for a software product provided according to exemplary embodiments of the present disclosure is shown;
[0038] Figure 11 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0039] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0040] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0041] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0042] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0043] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0044] In order to clearly explain the technical solutions provided in this disclosure, the technical issues involved in this disclosure will first be introduced.
[0045] (1) Existing continuous software build and integration solutions have design flaws. The overall process is business-driven, and the build process of each software resource is business-driven. Each business line of a software product deploys a separate build-transfer-integration process, which often results in a certain software resource being repeatedly built and transferred by multiple business lines. This greatly increases the build time cost and leads to a serious waste of build and integration equipment resources.
[0046] (2) In the existing software continuous building and integration solutions, the execution logic of the business lines of different software products is roughly the same except for some business-related logic, but each maintains a complete set of code logic, resulting in serious redundancy of software building system code, and the overall execution logic is unclear, has poor readability, and is not conducive to later maintenance and functional expansion.
[0047] (3) In the existing software continuous build and integration solution, each software product business line needs to maintain its own complete build-transfer-integration process. When adding a new software product business line, the development cost is high. In particular, the build process of each software resource will be repeated, which exacerbates the defects of the above-mentioned problem 1.
[0048] To address the aforementioned technical problems, this disclosure provides a method for transferring software resources. This method can be performed by a terminal, a server, and / or other devices with processing capabilities. The method provided in the embodiments of this disclosure can be performed by any of the aforementioned devices, or by multiple devices working together; this disclosure does not limit this approach.
[0049] The following will refer to Figure 1 The flowchart illustrating the software resource transfer method is provided below. The method includes the following steps 101-103.
[0050] Step 101: Obtain the target software resources to be transferred and the currently stored resource transfer plan, wherein the target software resources are the software resources required by the target software product.
[0051] Step 102: Based on the resource transfer scheme, determine at least one cache area for the target software resources to be received, wherein each cache area corresponds to any software product;
[0052] Step 103: Transfer the target software resources to the designated cache area.
[0053] Among them, the resource transfer scheme can be used to indicate the correspondence between the software resources required by the software product and the cache area.
[0054] Optionally, the target software resources can be constructed in the following manner:
[0055] Based on the construction logic of the target software resource, a construction task is built and executed to construct the target software resource.
[0056] Optional, refer to Figure 2 The flowchart illustrating the software resource construction method includes: building and executing a construction task based on the software resource construction logic to construct the target software resource, comprising:
[0057] Step 201: Based on the construction logic of the target software resources, determine a number of first code modules to be used, wherein the first code modules are used to execute the minimum execution logic of the construction logic;
[0058] Step 202: Obtain the first configuration file corresponding to the target software resource. The first configuration file is used to configure the execution order and first calling parameters of the plurality of first code modules.
[0059] Step 203: Based on the first configuration file, the plurality of first code modules are sequentially combined, and the calling relationship of the plurality of first code modules is configured based on the first calling parameters to build a construction task;
[0060] Step 204: Execute the construction task, and obtain the target software resource after completion.
[0061] Optionally, the execution logic based on the target software resources determines multiple first code modules to be used, including:
[0062] The execution logic of the target software resource is divided into multiple first minimum execution logics, and in the multiple code modules that have been built, it is determined whether there is a corresponding code module for each first minimum execution logic;
[0063] If it exists, then the code module corresponding to the first minimum execution logic is taken as the first code module to be used;
[0064] If it does not exist, a new code module is constructed for the first minimal execution logic, and this new code module is used as the first code module to be used.
[0065] Optionally, the first code module includes a general code module, or the first code module includes a general code module and a dedicated code module for any software product.
[0066] Optionally, the method further includes:
[0067] Whenever a new software product is added, the target software resources required by the new software product are determined, and a new cache area corresponding to the new software product is determined.
[0068] Based on the target software resources required for the new software product and the new cache area, update the currently stored resource transfer scheme.
[0069] Optionally, determining the target software resources required for the new software product includes:
[0070] Determine whether the target software resources required for the new software product have been built;
[0071] If the target software resources required for the new software product have already been built, then the built target software resources are obtained.
[0072] If the target software resource required for the new software product has not been built, then based on the building logic of the target software resource, a building task is built and executed to build the target software resource.
[0073] In this embodiment, the software resources built by the resource provider are decoupled from the business logic. Through a resource transfer scheme, the completed software resources can be actively transferred to the cache area corresponding to more than one software product, allowing different software products to reuse the software resources built once. Compared to the technical solution where each software product builds its required software resources once, the number of builds is reduced, system resource consumption is decreased, and build efficiency is improved.
[0074] This disclosure provides a method for integrating a software product, which can be performed by a terminal, a server, and / or other devices with processing capabilities. The method provided in the embodiments of this disclosure can be performed by any of the aforementioned devices, or by multiple devices working together; this disclosure does not limit this approach.
[0075] The following will refer to Figure 3 The flowchart illustrating the software product integration method is provided below. The method includes the following steps 301-302.
[0076] Step 301: Access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area;
[0077] Step 302: Based on the integration logic of the target software product and multiple target software resources, build and execute the integration task to construct the target software product.
[0078] Optionally, the step of building and executing an integration task based on the integration logic of the target software product and the multiple target software resources to construct the target software product includes:
[0079] Based on the integration logic of the target software product, a plurality of second code modules to be used are determined, and the second code modules are used to execute the minimum execution logic of the integration logic;
[0080] Obtain the second configuration file corresponding to the target software product. The second configuration file is used to configure the execution order and second calling parameters of the plurality of second code modules and the plurality of target software resources. The second calling parameters include parameters applicable to the target software product itself.
[0081] Based on the second configuration file, the plurality of second code modules and the plurality of software resources are sequentially combined, and the calling relationship of the plurality of second code modules and the plurality of software resources is configured based on the second calling parameters to build an integrated task;
[0082] The integration task is executed, and the target software product is obtained after the task is completed.
[0083] Optionally, the step of determining multiple second code modules to be used based on the integration logic of the target software product includes:
[0084] The integration logic of the target software product is divided into multiple second minimum execution logics, and in the multiple code modules that have been constructed, it is determined whether there is a corresponding code module for each second minimum execution logic.
[0085] If it exists, then the code module corresponding to the second minimum execution logic will be used as the second code module to be used.
[0086] If it does not exist, a new code module is constructed for the second minimal execution logic, and this new code module is used as the second code module to be used.
[0087] Optionally, the second code module includes a general code module, or the second code module includes a general code module and a special code module for the target software product.
[0088] In this embodiment, the business party can obtain the software resources required by the software product from the cache area without requesting and calling them from the resource provider, thus isolating the business party from the resource provider. Furthermore, parameters applicable to the software product itself can be configured during the business party's integration process, further promoting decoupling between the resource provider and the business.
[0089] This disclosure provides a method for constructing and transferring software resources and integrating corresponding software products. This method is jointly implemented by the resource provider and the business party and can be applied to CI / CD (Continuous Integration and Continuous Deployment) systems. Continuous integration is a practice involving developers making minor changes to and inspecting their code, while continuous deployment is the automatic deployment of complete code to testing and development environments.
[0090] In this embodiment, the entity that executes the method of constructing and transferring software resources is called the resource provider, and the entity that executes the method of integrating software products is called the business party.
[0091] The following will refer to Figure 4 The flowcharts illustrating the construction and transfer of software resources and the integration methods of corresponding software products are shown. Figure 5 The diagram illustrating the communication relationship between the resource provider and the business party is used to introduce this method.
[0092] like Figure 4 As shown, the method includes the following steps 401-406.
[0093] Step 401: The resource provider builds and executes the build task based on the build logic of the target software resource to build the target software resource.
[0094] Software resources can include software sub-products, components, and other products used to constitute the software product. In this embodiment, the target software resource is the software resource required by the target software product.
[0095] In one possible implementation, the resource provider may include multiple resource providing devices, each of which can be used to construct one or more software resources. This embodiment will describe the construction process of one software resource as an example; the construction process of other software resources is similar.
[0096] Before building the target software resource, the building logic for the target software resource can be designed. This building logic can refer to the code execution logic for building the target software resource. In some possible implementations, the target software resource can be obtained by building it according to existing building methods. For example, the code file of the target software resource can be obtained, the code file can be set as the object of the building task, and the building task can be run to obtain the target software resource.
[0097] Optionally, to improve the efficiency of code development and maintenance, this embodiment provides a new method for constructing target software resources, as follows:
[0098] Based on the construction logic of the target software resources, multiple first code modules to be used are determined. The first code modules can be used to execute the minimum execution logic of the construction logic.
[0099] Obtain the first configuration file corresponding to the target software resource. The first configuration file can be used to configure the execution order and first call parameters of multiple first code modules.
[0100] Based on the first configuration file, multiple first code modules are sequentially combined, and the calling relationship of the multiple first code modules is configured based on the first calling parameters to build the build task;
[0101] The build task is executed, and the target software resources are obtained after completion.
[0102] In one possible implementation, code modules can be pre-built. A code module can be the smallest unit of execution logic, meaning it performs only one task at a time, such as copying, deleting, or signing. There can be code modules corresponding to copy operations, deletion operations, and signing operations, etc. As an example, in a CI / CD system, a code module can refer to an Action (the smallest unit of execution logic in a CI / CD system). An Action is a configurable, reusable basic unit of operation.
[0103] When it is necessary to build target software resources, the construction logic of the target software resources can be divided into the granularity of the smallest execution logic, and each smallest execution logic can be replaced with the corresponding code module. The specific processing can be as follows:
[0104] The execution logic of the target software resource is divided into multiple first minimum execution logics, and in the multiple code modules that have been built, it is determined whether there is a corresponding code module for each first minimum execution logic;
[0105] If it exists, then the code module corresponding to the first minimum execution logic is taken as the first code module to be used;
[0106] If it does not exist, a new code module is constructed for the first minimal execution logic, and this new code module is used as the first code module to be used.
[0107] Based on this, pre-built code modules can be reused without having to be rebuilt, improving code development efficiency. Furthermore, in continuous integration and continuous deployment application scenarios, the need for code maintenance is significant. Using the code module provided in this embodiment, when the code for a certain execution logic is updated, the code module for that execution logic can be updated simultaneously. This avoids the need to search for the execution logic within a series of logics that apply it before updating, thus improving code maintenance efficiency.
[0108] The first configuration file can be pre-written, allowing the resource providing device to obtain it and its configuration information, namely the execution order and first calling parameters of multiple first code modules. Then, based on the execution order indicated in the first configuration file, the multiple first code modules required by the target software resource are combined, and the calling relationships of each first code module are configured based on the first calling parameters, thus completing the object for the build task. Executing this build task, upon completion, yields the corresponding target software resource.
[0109] Optionally, the code module required by the target software resource (i.e., the first code module) can have two cases: the first case means that the first code module includes a general code module; the second case means that the first code module includes a general code module and a special code module for any software product.
[0110] In one possible implementation, when building code modules, the code can be decoupled from business-related parameters. For example, a corresponding code module can be built based on the basic copy operation logic. The internal code of the code module is independent of the business logic and provides configurable interfaces, such as an interface for copying objects. The specific parameters of this interface can be related to the specific business logic of the software product, and these specific parameters can be configured during subsequent integration. For example, the copy object in an online classroom client can be related to courseware parameters, while the copy object in an online shopping client can be related to product parameters.
[0111] In this embodiment, the code modules that are not related to business logic are referred to as general code modules. General code modules can be applied to different software products.
[0112] In some application scenarios, the specific code logic may inevitably be related to the business logic, and thus be specifically applied to a certain software product. In this embodiment, such code modules are referred to as dedicated code modules.
[0113] Correspondingly, software resources can also be divided into general-purpose software resources unrelated to business operations and dedicated software resources related to the business of any particular software product. For example, Figure 6 The diagram shown illustrates the construction of general-purpose software resources, which can be entirely built from general-purpose code modules; for example... Figure 7 The diagram shown illustrates the construction of dedicated software resources, which can be constructed from general-purpose code modules and dedicated code modules.
[0114] As an example, Figure 8This illustrates a specific software product development process. Software resource 1 can be built using the following sequence: General Code Module 1, General Code Module 2, General Code Module 1, Build Operation Code Module, General Code Module 3, General Code Module 2, and General Code Module 2. Software resource 2 can be built using the following sequence: General Code Module 1, General Code Module 2, General Code Module 3, Build Operation Code Module, General Code Module 3, General Code Module 2, and General Code Module 4. Software resource 3 can be built using the following sequence: General Code Module 1, General Code Module 2, Specialized Code Module 5, Build Operation Code Module, General Code Module 3, General Code Module 2, and Specialized Code Module 6. After the build tasks for each software resource are completed, executing the code modules in sequence yields software resources 1, 2, and 3, respectively. Software resources 1 and 2 are general software resources, and software resource 3 is a specialized software resource.
[0115] Step 402: The resource provider obtains the target software resources to be transferred and the currently stored resource transfer plan.
[0116] The resource transfer scheme is used to indicate the correspondence between the software resources required by the software product and the cache area.
[0117] In one possible implementation, the CI / CD system can be used to integrate and deploy multiple software products, each with an allocated cache area for storing the software resources required by the software product.
[0118] After allocating a cache area for a software product, the address of that cache area can be recorded. The addresses of the software resources required by the software product in the resource providing device are obtained, and this address is used as the sending address. The address of the cache area is used as the receiving address, thereby constructing a flow path from the sending address to the receiving address, and storing the flow path in the resource flow scheme.
[0119] Step 403: Based on the resource transfer scheme, the resource provider determines at least one cache area of the target software resources to be received.
[0120] Each cache region corresponds to a specific software product.
[0121] In one possible implementation, if the target software resource is a general software resource, and there may be one or more (usually multiple) software products that require the general software resource, then in the resource transfer scheme, the cache area to receive the general software resource can be determined to be the cache area of the one or more software products mentioned above.
[0122] If the target software resource is a dedicated software resource, and there are one or more software products that require the dedicated software resource (usually one), then in the resource transfer scheme, the cache area to receive the dedicated software resource can be determined to be the cache area of the one or more software products mentioned above.
[0123] Step 404: The resource provider transfers the target software resources to the designated cache area.
[0124] In one possible implementation, the resource transfer scheme can obtain the transfer path between the target software resource and the target cache area, and combine it with a preset transmission method, such as HTTP (Hypertext Transfer Protocol), to construct a corresponding transfer task. Executing this transfer task completes the operation of transferring the target software resource to the cache area. As an example, such as... Figure 8 As shown, after building and executing the workflow task, software resources 1, 2, and 3 can be transferred to the corresponding cache area of the software product for subsequent integration task invocation. Through the above process, the construction of software resources is decoupled from business logic. If a software resource is used by multiple software products, it can be built once and then transferred to the corresponding cache areas of all software products, thus providing it for use by multiple software products. However, existing resource construction methods, due to the coupling of software resource construction with business logic, require each software product to build the same resource once, resulting in redundant construction processes, long construction times, and significant consumption of CI / CD system resources. Therefore, adopting this disclosure can reduce the system resource costs and improve the efficiency of continuous integration and continuous deployment.
[0125] Optionally, new software products can be added to the CI / CD system, and the corresponding processing can be as follows:
[0126] Whenever a new software product is added, the target software resources required by the new software product are determined, and a new cache area corresponding to the new software product is determined.
[0127] Based on the target software resources required for the new software product and the new cache area, update the current storage resource transfer scheme.
[0128] In one possible implementation, whenever a new software product is added, the target software resources required by that software product can be identified and processed as follows:
[0129] Determine whether the target software resources required for the new software product have been built;
[0130] If the target software resources required by the new software product have already been built, then obtain the built target software resources.
[0131] If the target software resource required by the software product has not been built, then based on the building logic of the target software resource, a building task is built and executed to build the software resource.
[0132] If a software resource has already been built, it can be reused, and a transfer path between the software resource and the new cache area can be constructed and added to the resource transfer scheme to obtain an updated resource transfer scheme, which will transfer the built software resource to the new cache area.
[0133] If the software resource has not been built, i.e., it is a new software resource, the software resource building method described above can be used to build it, which will not be repeated here. Then, the flow path between the software resource and the new cache area is built and added to the resource flow scheme, thereby obtaining the updated resource flow scheme, and the newly built software resource is transferred to the new cache area.
[0134] Therefore, whenever a new software product is added, existing software resources can be reused instead of rebuilding, reducing resource waste caused by repeated resource building. This approach is applicable to multiple business scenarios and reduces resource redundancy.
[0135] Step 405: The business party accesses the cache area corresponding to the target software product and obtains multiple target software resources required by the target software product from the cache area.
[0136] In one possible implementation, the business entity may include multiple business devices, each of which can be used to integrate one or more software products. This embodiment will use the construction process of a software product as an example, and refer to it as the target software product; the construction process of other software products is similar.
[0137] When integrating a target software product, the multiple target software resources required by the target software product can have already been transferred, and thus the cache area corresponding to the target software product can store these multiple target software resources. Furthermore, business devices can access this cache area and retrieve the target software resources within for use in subsequent integration processes.
[0138] Step 406: Based on the integration logic of the target software product and multiple target software resources, the business side builds and executes the integration task to construct the target software product.
[0139] In one possible implementation, before integrating the target software product, the integration logic of the target software product can be designed. This integration logic can refer to the code execution logic of integrating the target software product. In some possible implementations, the designed integration logic can be edited into a code file according to existing integration methods, and this code file can be set as the object of the integration task. After running the integration task, multiple software resources are integrated into the target software product.
[0140] Optionally, to improve the ease of integration, this embodiment provides a new method for integrating target software products, as follows:
[0141] Based on the integration logic of the target software product, multiple second code modules to be used are identified. The second code modules can be used to execute the minimum execution logic of the integration logic.
[0142] Obtain the second configuration file corresponding to the target software product. The second configuration file can be used to configure the execution order of multiple second code modules and multiple software resources, as well as the second calling parameters. The second calling parameters include parameters applicable to the target software product itself.
[0143] Based on the second configuration file, multiple second code modules and multiple software resources are sequentially combined, and the calling relationship between the multiple second code modules and multiple software resources is configured based on the second calling parameters to build an integrated task;
[0144] The integration task is executed, and the software product is obtained upon completion.
[0145] For ease of explanation, this embodiment refers to the code module used in the above-described construction process as the first code module and the code module used in the integration process as the second code module. They are essentially the same and are both code modules. For example, if both the first and second code modules are used for copying, then both are code modules for copy operations and can be the same code module.
[0146] The integration logic of the target software product can be divided into the granularity of the smallest execution logic, and each smallest execution logic can be replaced with the corresponding code module. The specific processing can be as follows:
[0147] The integration logic of the target software product is divided into multiple second minimum execution logics, and in the multiple code modules that have been built, it is determined whether there is a corresponding code module for each second minimum execution logic;
[0148] If it exists, then the code module corresponding to the second minimum execution logic will be used as the second code module to be used.
[0149] If it does not exist, a new code module is constructed for the second minimal execution logic, and this new code module is used as the second code module to be used.
[0150] The specific processing procedure is the same as the process of replacing the above-mentioned construction logic with code modules.
[0151] A second configuration file can be pre-written, allowing business devices to access this file and obtain its configuration information, including the execution order of multiple second code modules and software resources, as well as the second call parameters. Specifically, parameters specific to the target software product can be configured here.
[0152] Then, according to the execution order indicated by the second configuration file, multiple second code modules corresponding to the integration logic are combined, and the calling relationships of each second code module and software resource are configured based on the second calling parameters, thus completing the integration task object. Executing this integration task, upon completion, yields the corresponding target software product.
[0153] Optionally, similar to the first code module, the second code module required to integrate the target software product can have two cases: the first case is that the second code module includes a general code module; the second case is that the second code module includes a general code module and a special code module for the target software product.
[0154] In one possible implementation, pre-built generic code modules can be reused to implement the corresponding integration logic. The interface parameters of the generic code modules can be configured based on the business-related parameters of the target software product, thus adapting to the target software product's business logic. In some application scenarios, when the generic code modules cannot cover the integration logic, they can be supplemented by building dedicated business-related code modules for the target software product; that is, the business side customizes the business-related modules. As an example, such as... Figure 8 As shown, an integration task can be built in the following order: general code module 1, general code module 2, special code module 7, integration operation code module, general code module 3, general code module 2, and special code module 8. After the integration task is built, each code module is executed in sequence to integrate software resources 1, 2, and 3 into a software product.
[0155] After that, the target software product can be debugged or tested, and after passing the test, the target software product can be released.
[0156] The embodiments disclosed herein can have at least the following beneficial effects:
[0157] (1) The software resources built by the resource provider are decoupled from the business. Through the resource transfer scheme, the built software resources can be actively transferred to the cache area corresponding to more than one software product, so that different software products can reuse the software resources built once. Compared with the technical solution of building the required software resources for each different software product, the number of builds is reduced, the system resource occupation is reduced, and the build efficiency is improved.
[0158] Business units can obtain the software resources required by the software product from the cache area without requesting and calling them from the resource provider, thus isolating the business unit from the resource provider. Furthermore, parameters applicable to the software product itself can be configured during the business unit's integration process, further promoting decoupling between the resource provider and the business.
[0159] (2) The build logic and integration logic are modularized, abstracting the originally complex series of execution logic into separate execution modules, and using configuration files to combine the various code modules to implement the build logic and integration logic. By reusing modular code, the execution logic of the continuous integration process can be simplified, making code development and maintenance easier and reducing development and debugging costs.
[0160] (3) When adding new software products, the building process and integration process can be quickly built using the existing software resources and code modules. This can be supplemented by building dedicated software resources or dedicated code modules, thereby improving the flexibility of business expansion and enabling the rapid implementation of continuous building and integration solutions in new businesses.
[0161] This disclosure provides a software resource transfer apparatus, which can be installed at the resource provider to implement the aforementioned software resource transfer method. For example... Figure 9 The schematic block diagram shown indicates that the software resource transfer device 900 includes: an acquisition module 901, a determination module 902, and a transfer module 903.
[0162] The acquisition module 901 is used to acquire the target software resources to be transferred and the currently stored resource transfer scheme, wherein the target software resources are the application software resources required by the target software product;
[0163] The determining module 902 is used to determine at least one cache area to receive the target software resources according to the resource transfer scheme, wherein each cache area corresponds to any software product;
[0164] The transfer module 903 is used to transfer the target software resources to the determined cache area.
[0165] Optionally, the device further includes a construction module, which is used to build and execute a construction task based on the construction logic of the target software resource to build the target software resource.
[0166] Optionally, the building module is used for:
[0167] Based on the construction logic of the target software resources, a number of first code modules to be used are determined. The first code modules are used to execute the minimum execution logic of the construction logic.
[0168] Obtain the first configuration file corresponding to the target software resource. The first configuration file is used to configure the execution order and first calling parameters of the plurality of first code modules.
[0169] Based on the first configuration file, the plurality of first code modules are sequentially combined, and the calling relationship of the plurality of first code modules is configured based on the first calling parameters to build a construction task;
[0170] The build task is executed, and the target software resource is obtained after completion.
[0171] Optionally, the building module is used for:
[0172] The execution logic of the target software resource is divided into multiple first minimum execution logics, and in the multiple code modules that have been built, it is determined whether there is a corresponding code module for each first minimum execution logic;
[0173] If it exists, then the code module corresponding to the first minimum execution logic is taken as the first code module to be used;
[0174] If it does not exist, a new code module is constructed for the first minimal execution logic, and this new code module is used as the first code module to be used.
[0175] Optionally, the first code module includes a general code module, or the first code module includes a general code module and a dedicated code module for any software product.
[0176] Optionally, the device further includes an expansion module, the expansion module being used for:
[0177] Whenever a new software product is added, the target software resources required by the new software product are determined, and a new cache area corresponding to the new software product is determined.
[0178] Based on the target software resources required for the new software product and the new cache area, update the currently stored resource transfer scheme.
[0179] Optionally, the extension module is used for:
[0180] Determine whether the target software resources required for the new software product have been built;
[0181] If the target software resources required for the new software product have already been built, then the built target software resources are obtained.
[0182] If the target software resource required for the new software product has not been built, then based on the building logic of the target software resource, a building task is built and executed to build the target software resource.
[0183] In this embodiment, the software resources built by the resource provider are decoupled from the business logic. Through a resource transfer scheme, the completed software resources can be actively transferred to the cache area corresponding to more than one software product, allowing different software products to reuse the software resources built once. Compared to the technical solution where each software product builds its required software resources once, the number of builds is reduced, system resource consumption is decreased, and build efficiency is improved.
[0184] This disclosure provides an integration apparatus for a software product, which can be installed at the business side to implement the aforementioned software product integration method. For example... Figure 10 The schematic block diagram shown indicates that the software product integration device 1000 includes: an access module 1001 and an integration module 1002.
[0185] Access module 1001 is used to access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area;
[0186] The integration module 1002 is used to build and execute an integration task based on the integration logic of the target software product and the multiple target software resources to construct the target software product.
[0187] Optionally, the integration module 1002 is used for:
[0188] Based on the integration logic of the target software product, a plurality of second code modules to be used are determined, and the second code modules are used to execute the minimum execution logic of the integration logic;
[0189] Obtain the second configuration file corresponding to the target software product. The second configuration file is used to configure the execution order and second calling parameters of the plurality of second code modules and the plurality of target software resources. The second calling parameters include parameters applicable to the target software product itself.
[0190] Based on the second configuration file, the plurality of second code modules and the plurality of software resources are sequentially combined, and the calling relationship of the plurality of second code modules and the plurality of software resources is configured based on the second calling parameters to build an integrated task;
[0191] The integration task is executed, and the target software product is obtained after the task is completed.
[0192] Optionally, the integration module 1002 is used for:
[0193] The integration logic of the target software product is divided into multiple second minimum execution logics, and in the multiple code modules that have been constructed, it is determined whether there is a corresponding code module for each second minimum execution logic.
[0194] If it exists, then the code module corresponding to the second minimum execution logic will be used as the second code module to be used.
[0195] If it does not exist, a new code module is constructed for the second minimal execution logic, and this new code module is used as the second code module to be used.
[0196] Optionally, the second code module includes a general code module, or the second code module includes a general code module and a special code module for the target software product.
[0197] In this embodiment, the business party can obtain the software resources required by the software product from the cache area without requesting and calling them from the resource provider, thus isolating the business party from the resource provider. Furthermore, parameters applicable to the software product itself can be configured during the business party's integration process, further promoting decoupling between the resource provider and the business.
[0198] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0199] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0200] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0201] refer to Figure 11 The present invention describes a structural block diagram of an electronic device 1100 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0202] like Figure 11 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. The RAM 1103 may also store various programs and data required for the operation of the device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0203] Multiple components in electronic device 1100 are connected to I / O interface 1105, including: input unit 1106, output unit 1107, storage unit 1108, and communication unit 1109. Input unit 1106 can be any type of device capable of inputting information to electronic device 1100. Input unit 1106 can receive input digital or text information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1107 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1108 may include, but is not limited to, disk and optical disk. Communication unit 1109 allows electronic device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0204] The computing unit 1101 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above. For example, in some embodiments, the methods for constructing and circulating the above-described software resources or the methods for integrating software products can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1100 via ROM 1102 and / or communication unit 1109. In some embodiments, the computing unit 1101 can be configured by any other suitable means (e.g., by means of firmware) to perform the methods for constructing and circulating the above-described software resources or the methods for integrating software products.
[0205] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0206] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0207] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0208] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0209] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0210] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
Claims
1. A method for transferring software resources, characterized in that, The method includes: Obtain the target software resources to be transferred and the currently stored resource transfer scheme, wherein the target software resources are the software resources required for the target software product; Based on the resource transfer scheme, at least one cache region is determined to receive the target software resources, wherein each cache region corresponds to any software product; The target software resources are transferred to the designated cache area; The target software resources are constructed in the following manner: Based on the construction logic of the target software resource, a construction task is built and executed to construct the target software resource, including: Based on the construction logic of the target software resources, a number of first code modules to be used are determined. The first code modules are used to execute the minimum execution logic of the construction logic. Obtain the first configuration file corresponding to the target software resource. The first configuration file is used to configure the execution order and first calling parameters of the plurality of first code modules. Based on the first configuration file, the plurality of first code modules are sequentially combined, and the calling relationship of the plurality of first code modules is configured based on the first calling parameters to build a construction task; The build task is executed, and the target software resource is obtained after completion.
2. The method according to claim 1, characterized in that, The execution logic based on the target software resources determines multiple first code modules to be used, including: The execution logic of the target software resource is divided into multiple first minimum execution logics, and in the multiple code modules that have been built, it is determined whether there is a corresponding code module for each first minimum execution logic; If it exists, then the code module corresponding to the first minimum execution logic is taken as the first code module to be used; If it does not exist, a new code module is constructed for the first minimal execution logic, and this new code module is used as the first code module to be used.
3. The method according to any one of claims 1-2, characterized in that, The first code module includes a general code module, or the first code module includes a special code module that is compatible with both the general code module and any software product.
4. The method according to claim 1, characterized in that, The method further includes: Whenever a new software product is added, the target software resources required by the new software product are determined, and a new cache area corresponding to the new software product is determined. Based on the target software resources required for the new software product and the new cache area, update the currently stored resource transfer scheme.
5. The method according to claim 4, characterized in that, The determination of the target software resources required for the new software product includes: Determine whether the target software resources required for the new software product have been built; If the target software resources required for the new software product have already been built, then the built target software resources are obtained. If the target software resource required for the new software product has not been built, then based on the building logic of the target software resource, a building task is built and executed to build the target software resource.
6. A method for integrating a software product, characterized in that, The method includes: Access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area; Based on the integration logic of the target software product and the multiple target software resources, an integration task is built and executed to construct the target software product, including: Based on the integration logic of the target software product, a plurality of second code modules to be used are determined, and the second code modules are used to execute the minimum execution logic of the integration logic; Obtain the second configuration file corresponding to the target software product. The second configuration file is used to configure the execution order and second calling parameters of the plurality of second code modules and the plurality of target software resources. The second calling parameters include parameters applicable to the target software product itself. Based on the second configuration file, the plurality of second code modules and the plurality of target software resources are sequentially combined, and the calling relationship between the plurality of second code modules and the plurality of target software resources is configured based on the second calling parameters to build an integrated task; The integration task is executed, and the target software product is obtained after the task is completed.
7. The method according to claim 6, characterized in that, The integration logic based on the target software product determines multiple second code modules to be used, including: The integration logic of the target software product is divided into multiple second minimum execution logics, and in the multiple constructed code modules, it is determined whether there is a corresponding code module for each second minimum execution logic; If it exists, then the code module corresponding to the second minimum execution logic will be used as the second code module to be used. If it does not exist, a new code module is constructed for the second minimal execution logic, and this new code module is used as the second code module to be used.
8. The method according to any one of claims 6-7, characterized in that, The second code module includes a general code module, or the second code module includes a general code module and a special code module for the target software product.
9. A software resource transfer device, characterized in that, The device includes: The acquisition module is used to acquire the target software resources to be transferred and the currently stored resource transfer scheme, wherein the target software resources are the software resources required by the target software product. The determining module is used to determine at least one cache region to receive the target software resources according to the resource flow scheme, wherein each cache region corresponds to any software product; A transfer module is used to transfer the target software resources to a predetermined cache area; A build module is used to construct and execute a build task based on the build logic of a target software resource to construct the target software resource. The module includes: determining multiple first code modules to be used based on the build logic of the target software resource, where each first code module is used to execute the minimum execution logic of the build logic; obtaining a first configuration file corresponding to the target software resource, where the first configuration file is used to configure the execution order and first calling parameters of the multiple first code modules; sequentially combining the multiple first code modules based on the first configuration file and configuring the calling relationship of the multiple first code modules based on the first calling parameters to construct a build task; and executing the build task to obtain the target software resource upon completion.
10. An integration device for a software product, characterized in that, The device includes: The access module is used to access the cache area corresponding to the target software product, and obtain multiple target software resources required by the target software product from the cache area. An integration module is used to build and execute an integration task based on the integration logic of the target software product and the multiple target software resources to construct the target software product. This includes: determining multiple second code modules to be used based on the integration logic of the target software product, where each second code module is used to execute the minimum execution logic of the integration logic; obtaining a second configuration file corresponding to the target software product, where the second configuration file is used to configure the execution order and second calling parameters of the multiple second code modules and the multiple target software resources, the second calling parameters including parameters applicable to the target software product itself; sequentially combining the multiple second code modules and the multiple target software resources based on the second configuration file, and configuring the calling relationship between the multiple second code modules and the multiple target software resources based on the second calling parameters to build the integration task; and executing the integration task to obtain the target software product upon completion.
11. An electronic device, comprising: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-8.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Software integration method and apparatus for developing Android platform application
CN105468351A
Micro-application integration method and device
CN112804315A