Management method, device, equipment, storage medium and program product of integrated product
Patent Information
- Application Number
- CN202610763106.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]现有技术中,在获取制品时,通常以文件名作为缓存索引,易因同名但是不同版本制品造成缓存污染、出现制品的版本错用等问题
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the integrated article management method according to any embodiment of the present invention.
Smart Images

Figure CN122653679A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to methods, apparatus, equipment, storage media, and program products for managing integrated products. Background Technology
[0002] In the continuous integration (CI) build and testing process of large C / C++ software repositories, a large number of external artifacts are required, including shared libraries, SDK packages, test data, driver packages, and Python wheels. These artifacts are typically downloaded from artifact repositories via HTTP (Hypertext Transfer Protocol).
[0003] In existing technologies, when retrieving artifacts, filenames are typically used as cache indexes. This can easily lead to cache pollution and misuse of artifact versions due to artifacts with the same name but different versions. Furthermore, the artifact dependency download logic is deeply coupled with the build script, preventing test nodes from independently pulling dependencies outside the build environment. Test dependencies and build dependencies are not clearly separated, and non-compiled dependencies still participate in the build process, generating unnecessary download and decompression overhead. This results in low efficiency and stability in the management of integrated artifacts. Summary of the Invention
[0004] This invention provides a method, apparatus, device, storage medium, and program product for managing integrated artifacts. By relying on a declarative artifact manifest, dependencies are downloaded and cached independently and on demand during the runtime or testing phase, without needing to execute a complete compilation and build process, thus separating dependency acquisition from build logic. Furthermore, caching is performed using SHA256 hash values to achieve content-addressed caching, improving the stability and efficiency of artifact management.
[0005] According to a first aspect of the present invention, a method for managing integrated articles of art is provided, the method comprising: Based on the pre-configured dependency data, an initial list containing the dependency data is generated. The dependency data includes a Uniform Resource Locator (URL), ETag, SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version tag generated by the server for each file, which is used to identify whether the file version has changed. Based on the SHA256 hash value in the initial list, obtain at least one target file corresponding to the SHA256 hash value; The post-processing configuration parameters in the initial list are input into a preset command function, and the post-processing operation corresponding to the command function is performed on the at least one target file to obtain the target product; Based on the SHA256 hash values corresponding to the at least one target file, a restoration list is generated, and the at least one target file is deleted; Based on the restore list and the preset restore script, generate a simplified file package; The simplified file package is sent to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
[0006] According to another aspect of the present invention, an integrated article management device is provided, the device comprising: The initial manifest generation module is used to generate an initial manifest containing the pre-configured dependency data. The dependency data includes a Uniform Resource Locator (URL), ETag, SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version tag generated by the server for each file, which is used to identify whether the file version has changed. The first acquisition module is used to acquire at least one target file corresponding to the SHA256 hash value in the initial list; The target product generation module is used to input the post-processing configuration parameters in the initial list into a preset command function, and perform post-processing operations corresponding to the command function on the at least one target file to obtain the target product; The restore list generation module is used to generate a restore list based on the SHA256 hash values corresponding to the at least one target file, and delete the at least one target file; The simplification module is used to generate a simplified file package based on the restoration list and the preset restoration script; The sending module is used to send the simplified file package to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device including at least one processor; and a memory communicatively connected to the at least one processor; wherein 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 enable the at least one processor to perform the integrated article management method described in the first aspect.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the integrated article management method according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the integrated article management method as described in any embodiment of the present invention.
[0010] The technical solution of this invention uses SHA256 hash values for caching, achieving content-addressable caching, avoiding cache pollution and version conflicts. Furthermore, the restore manifest allows for independent retrieval and restoration of dependencies outside the CMake build system, enabling test and deployment nodes to obtain artifacts on demand. This achieves complete decoupling between the build and runtime phases and supports independent restoration across nodes. Moreover, by generating a streamlined file package based on the restore manifest and pre-configured restore scripts, it significantly reduces dependency download time and release package size. Ultimately, this forms a complete artifact management closed loop that is traceable, rollbackable, and lightweightly distributeable, improving the efficiency and stability of continuous integration for large projects.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention; Figure 2 This is a flowchart of a method for managing integrated artifacts according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the process for generating an initial inventory according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the process for obtaining a target file according to an embodiment of the present invention; Figure 5 This is a schematic diagram of an integrated article management device provided according to an embodiment of the present invention; Figure 6 This is a schematic diagram of an electronic device provided according to an embodiment of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Therefore, in view of the technical problems in the prior art, such as cache pollution caused by using filename indexing, coupling of dependency acquisition and build script, and lack of layering between test dependencies and build dependencies, this application discloses a method for managing integrated artifacts. The embodiments of this application will be further described below with reference to the accompanying drawings.
[0017] Before introducing the management method of integrated artifacts in this application, we will first introduce the application scenarios of the management method of integrated artifacts in this application. Figure 1 This is a diagram illustrating the application scenario, from Figure 1 As can be seen from the data, this application scenario includes a first electronic device 110 and a second electronic device 120.
[0018] In one possible embodiment, the first electronic device 110 generates an initial list containing pre-configured dependency data, wherein the dependency data includes a Uniform Resource Locator (URL), an ETag, a SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version marker generated by the server for each file, used to identify whether the file version has changed. Then, the first electronic device 110 obtains at least one target file corresponding to the SHA256 hash value in the initial list and inputs the post-processing configuration parameters in the initial list into a preset command function to perform post-processing operations corresponding to the command function on the at least one target file to obtain a target artifact. Then, the first terminal device 110 generates a restoration list based on the SHA256 hash values corresponding to the at least one target file and deletes the at least one target file. Based on the restoration list and a preset restoration script, a simplified file package is generated. Finally, the first electronic device 110 sends the simplified file package to a second electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
[0019] in, Figure 1 The first electronic device 110 and the second electronic device 120 can exchange information via a communication network, and the first electronic device 110 and the second electronic device 120 can also exchange information via a communication network. The communication network can employ either wireless or wired communication methods.
[0020] For example, the second electronic device 120 can access the network via cellular mobile communication technology and communicate with the first electronic device 110, wherein the cellular mobile communication technology includes, for example, 5th generation mobile network (5G) technology.
[0021] Optionally, the second electronic device 120 can access the network and communicate with the first electronic device 110 via short-range wireless communication, wherein the short-range wireless communication method includes, for example, Wireless Fidelity (Wi-Fi) technology.
[0022] Furthermore, the description in this application details only a single first electronic device 110 and a single second electronic device 120. However, those skilled in the art should understand that the illustrated first electronic device 110 and second electronic device 120 are intended to illustrate the operation of the first electronic device 110 and second electronic device 120 involved in the technical solution of this application, and not to imply any limitation on the number, type, or location of the first electronic device 110 and second electronic device 120. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application.
[0023] The following describes an exemplary embodiment of the management method of integrated artifacts of this application, in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the methods and principles of this application, and the embodiments of this application are not limited in any way in this respect.
[0024] The management method of the integrated artifacts in the embodiments of this application will be described in detail below. Figure 2 A flowchart illustrating a method for managing integrated artifacts provided in an embodiment of the present invention, from... Figure 2 As can be seen from this, it may specifically include the following steps: S210: Generate an initial list containing the pre-configured dependency data, wherein the dependency data includes URL, ETag, SHA256 hash value and post-processing configuration parameters, and the ETag is a unique version marker corresponding to the file, which is used to identify whether the version of the file has changed. In this embodiment, the CMake standard interface is enhanced and encapsulated during the configuration phase, and the following are used uniformly: -i_ExternalProject_Add (corresponding to the native ExternalProject_Add) and -i_FetchContent_Declare (corresponding to the native FetchContent_Declare).
[0025] Therefore, in this embodiment of the application, the CMake ecosystem native adaptation enhancement interface maintains the same style as the CMake standard ExternalProject_Add / FetchContent_Declare, and existing build scripts only need to replace the function names to integrate, resulting in low migration costs.
[0026] Add a FOR purpose attribute to the dependency data retrieval interface fetchFromArtifactory() to explicitly declare the use case of the dependency, distinguish between build phase dependencies and test phase dependencies, realize the on-demand retrieval of dependency data, and avoid unnecessary dependencies from entering the build process.
[0027] It also provides PKG_ONLY / FETCH_PKG_ONLY modes for dependency packages that are only used for testing and do not participate in compilation and linking. When this mode is enabled, the system enters CHECK_ONLY lightweight verification mode, which only performs dependency package download, hash verification and cache storage, and does not perform decompression, post-processing, path configuration and compilation and linking operations, significantly reducing the invalid overhead of the build stage and improving build efficiency.
[0028] The method for generating the initial inventory in the embodiments of this application will be described below. Figure 3 A flowchart illustrating the process of generating the initial inventory list may include the following steps: S310: Use the SHA256 hash value in the dependency data to find the target file corresponding to the SHA256 hash value in the host persistent cache; In this embodiment, the SHA256 hash value is used to store the corresponding file in the host persistent cache, and each file has one and only one corresponding SHA256 hash value. Therefore, this embodiment implements content-addressable caching, avoiding cache pollution and version conflicts.
[0029] S320: If found, replace the URL in the dependency data with the local URL corresponding to the target file, and obtain the metadata of the target file.
[0030] The metadata includes the target file's filename, file size, file type, and cache path.
[0031] S330: Serialize the metadata of the target file, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters into an intermediate list; In this embodiment, the download_config() function is called to serialize the target file's metadata, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters into an intermediate list.
[0032] S340: Package the intermediate list to obtain a packaged list, and install the specified tools simultaneously; In this embodiment, the intermediate manifest is packaged using the `install_module_package()` function to obtain the packaged manifest. The specified tool in this embodiment is `fetchPKG.py`. However, this embodiment does not limit the specified tool; the specified tool can be set according to specific circumstances.
[0033] S350: Obtain the initial list based on the package list and the specified tool.
[0034] The initial manifest in this embodiment is a declarative manifest. The initial manifest in this embodiment includes the target file's metadata, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters, etc. This embodiment does not limit the data included in the initial manifest; it can be set according to specific circumstances.
[0035] To further improve efficiency, in one possible implementation, after executing 210, the initial list is filtered using a regular expression matching algorithm.
[0036] S220: Obtain at least one target file corresponding to the SHA256 hash value based on the SHA256 hash value in the initial list; The method of obtaining the target file in the embodiments of this application will be described below. Figure 4 A flowchart for obtaining the target file may include the following steps: S410: Use the SHA256 hash value to search for the target file in the host persistent cache. Determine whether the target file is found in the host persistent cache. If yes, execute S350; otherwise, execute S420. Based on the foregoing, in this embodiment of the application, the SHA256 hash value is used to store the file in the host persistent cache.
[0037] S420: Use the ETag to search for the target file in the HTTP ETag cache, and determine whether the target file is found in the HTTP ETag cache. If yes, execute S450; otherwise, execute S430. In one possible implementation, S420 may specifically be implemented as: sending an HTTP conditional query carrying an IfNoneMatch request header to the target file address, wherein the request header contains the locally cached ETag; If the server returns the first specified identifier, it is determined that the match was found; if it returns the second specified identifier, it is determined that the match was not found.
[0038] It should be noted that the first designated identifier and the second designated identifier in the embodiments of this application can be set according to the specific actual situation, and the embodiments of this application do not limit the first designated identifier and the second designated identifier.
[0039] S430: Use the SHA256 hash value to search for the target file in the temporary cache, and determine whether the target file is found in the temporary cache. If yes, execute S450; otherwise, execute S440. In this embodiment of the application, the SHA256 hash value and the file are also used for corresponding storage in the temporary cache.
[0040] S440: Download the target file using the URL; To ensure that only one download process downloads the target file at a time, a .lock is created next to the target file before executing S440, and mutual exclusion is achieved through flock to prevent duplicate downloads of the target file. Furthermore, this embodiment of the application also verifies the cached file before downloading. After downloading, size, digest, and sidecar verification files are checked; if verification fails, corrupted files are cleaned up and the process is retried, and diagnostic information is output if necessary. Therefore, this embodiment of the application improves data security for concurrent access to the shared cache directory by combining file locks and integrity checks.
[0041] S450: Input the post-processing configuration parameters in the initial manifest into the preset command function.
[0042] It should be noted that the post-processing parameters in this application embodiment are the processing parameters corresponding to the command function. This application embodiment does not limit them and can be set according to the specific actual situation.
[0043] Therefore, this embodiment of the application adopts a three-level fallback of host caching, ETag caching, and temporary caching to improve stability in weak network and restricted permission environments.
[0044] In one possible implementation, after executing S440, a preset algorithm is used to determine the target SHA256 hash value of the downloaded target file; the target SHA256 hash value is compared with the SHA256 hash value in the initial list; if they are the same, the target file is stored; if they are different, the target file is deleted.
[0045] Therefore, the accuracy of the target file can be determined by comparing the two hash values, thus ensuring the accuracy of the downloaded target file.
[0046] S230: Input the post-processing configuration parameters in the initial list into a preset command function, perform the post-processing operation corresponding to the command function on the at least one target file, and obtain the target product; S240: Generate a restoration list based on the SHA256 hash values corresponding to the at least one target file, and delete the at least one target file; The restoration list in this application embodiment includes at least one SHA256 hash value, Uniform Resource Locator URL, and metadata of the target file, respectively.
[0047] S250: Generate a simplified file package based on the restore list and the preset restore script; The simplified file package in this application embodiment includes a restore list and a restore script.
[0048] S260: The simplified file package is sent to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
[0049] In this embodiment, the target electronic device reads the restoration list from the simplified file package. Based on the target file name, SHA256 hash value, and target path (i.e., the cache path in the target file's metadata) recorded in the list, it prioritizes querying the local host cache and the build directory temporary cache using content addressing. If a file matching the SHA256 hash value exists in the local cache, the cached file is directly copied or symbolically linked to the target path. If the local cache does not match, the corresponding file is downloaded from the artifact repository based on the download address, and the file integrity is verified using the SHA256 hash. After successful verification, the device sequentially performs operations such as decompression, permission setting, path movement, and patch application according to the post-processing operations recorded in the restoration list. The processed target file is then deployed to the target path at the location specified in the list, completing the runnable restoration of the dependent environment.
[0050] In this application embodiment, a unified processing path is provided for the wheel package corresponding to the dependency data: (1) The default installation directory (such as python_packages) is identified according to the suffix. (2) In the test dependency scenario, the installation action can be configured through FOR and PKG_COMMAND. (3) The digest verification, cache reuse and manifest recording mechanism are shared with the general compressed package process.
[0051] This embodiment also supports reverse cleanup, returning to the state before the third-party dependency library was pulled. That is, the restore list is read, and according to the operation traces recorded in the list, the deletion and restore operations are performed in reverse, deleting downloaded files, cleaning the installation path, and undoing post-processing operations, restoring the system to its initial state before the third-party dependency library was pulled. Therefore, this embodiment supports reverse cleanup, facilitating testing of minimum subset pulls and environment rollback.
[0052] Based on the same inventive concept, embodiments of this application also provide an integrated article management device. Figure 5 This is a schematic diagram of the integrated article management device in the embodiments of this application. Figure 5 As can be seen from this, the device 500 includes: The initial manifest generation module 510 is used to generate an initial manifest containing the dependency data according to the pre-configured dependency data. The dependency data includes a Uniform Resource Locator (URL), an Entity Tag (ETag), a 256-bit SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version marker corresponding to the file, which is used to identify whether the version of the file has changed. The first acquisition module 520 is used to acquire at least one target file corresponding to the SHA256 hash value based on the SHA256 hash value in the initial list; The target product generation module 530 is used to input the post-processing configuration parameters in the initial list into a preset command function, and perform post-processing operations corresponding to the command function on the at least one target file to obtain the target product; The restore list generation module 540 is used to generate a restore list based on the SHA256 hash values corresponding to the at least one target file, and delete the at least one target file; The simplification module 550 is used to generate a simplified file package based on the restoration list and the preset restoration script; The sending module 560 is used to send the simplified file package to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
[0053] In one possible implementation, the initial inventory generation module 510 is specifically used for: Use the SHA256 hash value in the dependency data to find the target file corresponding to the SHA256 hash value in the host persistent cache; If found, the URL in the dependency data is replaced with the local URL corresponding to the target file, and the metadata of the target file is obtained, wherein the metadata includes the file name, file size and file type of the target file; The target file's metadata, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters are serialized into an intermediate manifest; The intermediate manifest is packaged to obtain a packaged manifest, and the specified tools are installed simultaneously. The initial list is obtained based on the package list and the specified tool.
[0054] In one possible implementation, the device further includes: The filtering module 570 is used to filter the initial list containing the pre-configured dependency data using a regular expression matching algorithm after generating the initial list.
[0055] In one possible implementation, the first acquisition module 520 is specifically used for: The target file is searched in the host persistent cache using the SHA256 hash value; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is searched for in the HTTP ETag cache using the ETag; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is searched for in the temporary cache using the SHA256 hash value; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is downloaded using the URL.
[0056] In one possible implementation, the device further includes: The hash value determination module 580 is used to determine the target SHA256 hash value of the downloaded target file using a preset algorithm after the target file is downloaded using the URL. The comparison module 590 is used to compare the target SHA256 hash value with the SHA256 hash value in the initial list; Storage module 591 is used to store the target file if they are the same; The deletion module 592 is used to delete the target file if they are not the same.
[0057] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0058] Figure 6A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0059] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0060] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0061] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for managing integrated artifacts.
[0062] In some embodiments, the method for managing the integrated article of manufacture may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the method for managing the integrated article of manufacture may be performed. Alternatively, in other embodiments, the processor may be configured to perform the method for managing the integrated article of manufacture by any other suitable means (e.g., by means of firmware).
[0063] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0064] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0065] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0066] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0067] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0068] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0069] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0070] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for managing integrated products, characterized in that, The method includes: Based on the pre-configured dependency data, an initial list containing the dependency data is generated. The dependency data includes a Uniform Resource Locator (URL), an Entity Tag (ETag), a 256-bit SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version marker for the file, used to identify whether the file version has changed. Based on the SHA256 hash value in the initial list, obtain at least one target file corresponding to the SHA256 hash value; The post-processing configuration parameters in the initial list are input into a preset command function, and the post-processing operation corresponding to the command function is performed on the at least one target file to obtain the target product; Based on the SHA256 hash values corresponding to the at least one target file, a restoration list is generated, and the at least one target file is deleted; Based on the restore list and the preset restore script, generate a simplified file package; The simplified file package is sent to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
2. The method according to claim 1, characterized in that, The step of generating an initial list containing the pre-configured dependency data includes: Use the SHA256 hash value in the dependency data to find the target file corresponding to the SHA256 hash value in the host persistent cache; If found, the URL in the dependency data is replaced with the local URL corresponding to the target file, and the metadata of the target file is obtained, wherein the metadata includes the file name, file size and file type of the target file; The target file's metadata, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters are serialized into an intermediate manifest; The intermediate manifest is packaged to obtain a packaged manifest, and the specified tools are installed simultaneously. The initial list is obtained based on the package list and the specified tool.
3. The method according to claim 1, characterized in that, After generating an initial manifest containing the pre-configured dependency data, the method further includes: The initial list is filtered using a regular expression matching algorithm.
4. The method according to claim 1, characterized in that, The step of obtaining at least one target file corresponding to the SHA256 hash value based on the SHA256 hash value in the initial list includes: The target file is searched in the host persistent cache using the SHA256 hash value; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is searched for in the HTTP ETag cache using the ETag; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is searched for in the temporary cache using the SHA256 hash value; if the target file is found, the step of inputting the post-processing configuration parameters in the initial manifest into the preset command function is executed. If not found, the target file is downloaded using the URL.
5. The method according to claim 4, characterized in that, After downloading the target file using the URL, the method further includes: The target SHA256 hash value of the downloaded target file is determined using a preset algorithm; The target SHA256 hash value is compared with the SHA256 hash value in the initial list; If they are the same, then store the target file; If they are different, then delete the target file.
6. A management device for integrated products, characterized in that, The device includes: The initial manifest generation module is used to generate an initial manifest containing the pre-configured dependency data. The dependency data includes a Uniform Resource Locator (URL), an Entity Tag (ETag), a 256-bit SHA256 hash value, and post-processing configuration parameters. The ETag is a unique version marker for the file, which is used to identify whether the file version has changed. The first acquisition module is used to acquire at least one target file corresponding to the SHA256 hash value in the initial list; The target product generation module is used to input the post-processing configuration parameters in the initial list into a preset command function, and perform post-processing operations corresponding to the command function on the at least one target file to obtain the target product; The restore list generation module is used to generate a restore list based on the SHA256 hash values corresponding to the at least one target file, and delete the at least one target file; The simplification module is used to generate a simplified file package based on the restoration list and the preset restoration script; The sending module is used to send the simplified file package to the target electronic device so that the target electronic device can use the simplified file package to restore the target file to the target path.
7. The apparatus according to claim 6, characterized in that, The initial inventory generation module is specifically used for: Use the SHA256 hash value in the dependency data to find the target file corresponding to the SHA256 hash value in the host persistent cache; If found, the URL in the dependency data is replaced with the local URL corresponding to the target file, and the metadata of the target file is obtained, wherein the metadata includes the file name, file size and file type of the target file; The target file's metadata, the URL in the dependency data, the ETag, the SHA256 hash value, and the post-processing configuration parameters are serialized into an intermediate manifest; The intermediate manifest is packaged to obtain a packaged manifest, and the specified tools are installed simultaneously. The initial list is obtained based on the package list and the specified tool.
8. An electronic device, characterized in that, The electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein... The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the management method of the integrated article of manufacture according to any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the management method of the integrated article of any one of claims 1-5.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the management method of the integrated article according to any one of claims 1-5.