A resource migration method, device, apparatus and storage medium
By generating host command macros to add resources in batches and displaying a resource difference table, the problem of low efficiency and error-proneness in resource migration is solved, and fast and accurate resource migration is achieved.
Patent Information
- Application Number
- CN202111568912.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2041-12-21
AI Technical Summary
When migrating resources in a host environment, existing technologies are inefficient and prone to errors, especially when there are many resources or resources with similar names, the operation is slow and error-prone.
By generating host command macros to add resources to be migrated in batches, and generating a resource difference list for classification and summary, the resource difference table is displayed so that operators can remove non-migrateable resources, thereby improving the accuracy and speed of resource migration.
It achieves efficient addition and accuracy in the resource migration process, reduces the error rate of manual operation, and ensures the speed and accuracy of resource migration.
Smart Images

Figure CN114327875B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a resource migration method, apparatus, device and storage medium. Background Technology
[0002] When developing applications using the RULE language in a host environment, multiple repositories are typically established using host resource libraries to manage versions of resources at different stages, such as development, testing, and production. In practice, resources need to be migrated between different repositories.
[0003] In existing technologies, when migrating resources from a source repository to a destination repository, operators need to add each resource to be migrated to a resource package one by one. This process is slow and error-prone, especially when there are many resources or their names are similar. Furthermore, during resource difference analysis, the target repository's resource difference list contains numerous but uncategorized records, and each page displays only a small number of records. Therefore, operators must compare each record page by page to eliminate unnecessary resources, which is inefficient and prone to errors. Summary of the Invention
[0004] This invention provides a resource migration method, apparatus, device, and storage medium to improve the speed of adding resources to be migrated and to improve the speed and accuracy of resource migration during the migration process.
[0005] In a first aspect, embodiments of the present invention provide a resource migration method, comprising:
[0006] In response to a resource migration request, the resources to be migrated from the source repository are added in batches to the resource package;
[0007] Retrieve and display the resource difference table corresponding to the resource package so that operators can remove resources from the resource package according to the non-migrated resource names recorded in the resource difference table.
[0008] Import the resource package that has undergone resource removal into the target repository.
[0009] Optionally, add the resources to be migrated from the source repository to the resource package in batches, including:
[0010] Fill the names of the resources to be migrated in the source repository into the resource list and generate the host command macros corresponding to the resource list;
[0011] Execute the host command macro to add the resources to be migrated in batches to the resource package of the source repository.
[0012] Optionally, after adding the resources to be migrated from the source repository to the resource package in batches in response to the resource migration request, the method further includes:
[0013] Execute the export command in the source repository to export the resource package;
[0014] The analysis command is executed in the target repository to receive the resource package. The resource package is then compared and analyzed with the resources related to the resource to be migrated in the target repository to generate a resource difference list.
[0015] Optionally, after generating the resource diff manifest, the following may also be included:
[0016] The difference analysis data in the resource difference list are categorized and summarized according to resource type, and the categorization and summarization results are stored in the corresponding columns of the resource difference table;
[0017] The resource discrepancy table is compared with the resource package to filter out non-migrated resources in the resource package, and the names of the non-migrated resources are written into a specific column of the resource discrepancy table according to the resource category order.
[0018] Secondly, embodiments of the present invention also provide a resource migration apparatus, comprising:
[0019] The resource addition module is used to respond to resource migration requests by adding resources to be migrated in batches from the source repository to the resource package;
[0020] The resource removal module is used to obtain and display the resource difference table corresponding to the resource package, so that operators can remove resources from the resource package according to the non-migrated resource names recorded in the resource difference table.
[0021] The resource migration module is used to import resource packages that have undergone resource removal into the target repository.
[0022] Optional, a resource adding module, used for:
[0023] Fill the names of the resources to be migrated in the source repository into the resource list and generate the host command macros corresponding to the resource list;
[0024] Execute the host command macro to add the resources to be migrated in batches to the resource package of the source repository.
[0025] Optional, also includes:
[0026] The difference analysis module is used to execute an export command in the source repository to export the resource package after adding the resources to be migrated in batches from the source repository to the resource package in response to the resource migration request.
[0027] The analysis command is executed in the target repository to receive the resource package. The resource package is then compared and analyzed with the resources related to the resource to be migrated in the target repository to generate a resource difference list.
[0028] Optionally, the difference analysis module is also used for:
[0029] After generating the resource discrepancy list, the discrepancy analysis data in the resource discrepancy list is categorized and summarized according to resource type, and the categorization and summarization results are stored in the corresponding columns of the resource discrepancy table;
[0030] The resource discrepancy table is compared with the resource package to filter out non-migrated resources in the resource package, and the names of the non-migrated resources are written into a specific column of the resource discrepancy table according to the resource category order.
[0031] Thirdly, embodiments of the present invention also provide a computer device, the device comprising:
[0032] One or more processors;
[0033] Storage device for storing one or more programs.
[0034] When one or more programs are executed by one or more processors, the one or more processors implement a resource migration method provided in any embodiment of the present invention.
[0035] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a resource migration method provided in any embodiment of the present invention.
[0036] In this embodiment of the invention, in response to a resource migration request, resources to be migrated in the source repository are added in batches to a resource package; a resource difference table corresponding to the resource package is obtained and displayed, so that operators can perform resource removal processing on the resource package according to the non-migrated resource names recorded in the resource difference table; and the resource package after resource removal processing is imported into the destination repository. This solves the problems of low resource migration efficiency and easy errors in the prior art, and improves the speed of adding resources to be migrated, as well as the speed and accuracy of resource migration. Attached Figure Description
[0037] Figure 1a This is a flowchart of a resource migration method according to Embodiment 1 of the present invention;
[0038] Figure 1b This is a schematic diagram of a resource migration process according to Embodiment 1 of the present invention;
[0039] Figure 2 This is a schematic diagram of the structure of a resource migration device according to Embodiment 2 of the present invention;
[0040] Figure 3 This is a schematic diagram of the structure of a computer device according to Embodiment 3 of the present invention. Detailed Implementation
[0041] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0042] Example 1
[0043] Figure 1a This is a flowchart of a resource migration method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where resources to be migrated from a source repository are quickly and accurately migrated to a destination repository. This method can be executed by a resource migration device, which can be implemented in hardware and / or software, and is generally integrated into a computer device that provides resource migration services, such as an IBM mainframe. Figure 1a As shown, the method includes:
[0044] Step 110: In response to the resource migration request, add the resources to be migrated from the source repository to the resource package in batches.
[0045] In this embodiment, resources may include analytical models and charts, variable definitions, window designs, application code, and deployment options involved in application development using the RULE language in a host environment. The RULE language is a general-purpose programming language that can run in a host environment and is widely used in business information system development, effectively enabling high reuse of business models. Resource migration refers to the process of transferring resources from one repository to another, where the repository from which the resources to be migrated are exported is the source repository, and the repository from which the resources to be migrated are imported is the destination repository. A resource package can be a collection of resources to be migrated stored during resource migration in a host resource repository.
[0046] Optionally, adding resources to be migrated from the source repository to the resource package in batches can include: filling the names of the resources to be migrated from the source repository into the resource list and generating host command macros corresponding to the resource list; executing the host command macros to add the resources to be migrated from the resource list to the resource package in the source repository in batches.
[0047] In this embodiment, as Figure 1bAs shown, to enable rapid and batch addition of resources during resource migration, host command macros are generated to add resources. A host command macro is a set of commands that organizes several operation commands on the host, used as a single command to complete a specific task, such as adding multiple resources to be migrated to a specified resource package.
[0048] In this embodiment, when adding resources, if the operator drags and drops the resource to be migrated from the source repository to the designated resource addition area, or clicks the resource addition option for the resource to be migrated, the names of the resources selected by the operator are batch-filled into the resource list. Then, the command macro generation program is executed to automatically generate host command macros for adding resources based on the resource list. Executing the host command macros adds the resources to be migrated recorded in the resource list to the resource packages in the source repository in batches, without operator intervention.
[0049] Optionally, after responding to a resource migration request and adding the resources to be migrated in batches from the source repository to the resource package, the process may further include: executing an export command in the source repository to export the resource package; executing an analysis command in the destination repository to receive the resource package, and comparing and analyzing the resource package with the resources related to the resources to be migrated in the destination repository to generate a resource difference list.
[0050] In this embodiment, as Figure 1b As shown, after adding resources to the resource package in batches, an export command is executed before the resource package in the source repository to export the resource package and send it to the destination repository. An analysis command is executed before the resource package in the destination repository to receive the resource package and compare it with the resources related to the resources to be migrated in the destination repository. The differences in modification times between the resources in the source and destination repositories are used to identify resources with discrepancies. Related resources and the relationships between them are listed in a resource difference list. These differences may be updates or additions to resources; each difference is called an analysis result.
[0051] It's important to note that because the host repository stores multiple projects simultaneously, resource relationships arise between these projects due to mutual resource calls. Therefore, the resource difference list analysis will reveal a large number of resources that do not need to be migrated. These non-migration resources need to be manually removed one by one from the resource packages. If there are no clear markers between the resources that need migration and those that don't, the removal process is prone to errors. For application systems, incorrect resource migration will cause functional errors, and in severe cases, even affect the normal operation of the entire system.
[0052] Optionally, after generating the resource discrepancy list, the process may further include: classifying and summarizing the discrepancy analysis data in the resource discrepancy list according to resource type, and storing the classification and summarization results in the corresponding columns of the resource discrepancy table; comparing the resource discrepancy table with the resource package, filtering out non-migrated resources in the resource package, and writing the names of the non-migrated resources into specific columns of the resource discrepancy table according to the resource classification order.
[0053] In this embodiment, to accurately retain the resources that need to be migrated and remove the resources that do not need to be migrated during the migration process, after the resource package is analyzed in the target repository, a full list of resource differences is downloaded. The contents of the resource difference list are then categorized and summarized according to resource type, and the summary results are recorded in a resource difference table for global display of resources. For example, if the second column of the resource difference table corresponds to program-type resources, then the difference analysis data categorized as program-type in the resource difference list is stored in the second column of the resource difference table. Simultaneously, the resource difference table is compared with the resources in the resource package to identify non-migrated resources that need to be removed, and the names of the non-migrated resources are recorded in the last column of the resource difference table according to the resource classification order.
[0054] Step 120: Obtain and display the resource difference table corresponding to the resource package, so that the operator can perform resource removal processing on the resource package according to the non-migrated resource names recorded in the resource difference table.
[0055] In this embodiment, a resource difference table corresponding to the resource package is obtained and displayed to the operator so that the operator can directly remove the resources that are not needed for this migration from the resource package based on the non-migration resource names recorded in the last column of the resource difference table, and accurately retain the target resources that need to be migrated.
[0056] In this embodiment, by displaying all non-migrated resources in the resource difference table, the resource analysis results are presented intuitively and comprehensively, helping operators to increase the speed of adding resources, quickly remove non-migrated resources, and reduce errors. Furthermore, this method has no impact on the existing host resource database content and management methods, requiring no modifications to the existing host resource database.
[0057] Step 130: Import the resource package after resource removal into the target repository.
[0058] In this embodiment, as Figure 1b As shown, after removing non-migrating resources from the resource package, an import command is executed before the resource package in the destination repository to import the resources required for this migration into the destination repository, thus completing this resource migration.
[0059] In this embodiment of the invention, in response to a resource migration request, resources to be migrated in the source repository are added in batches to a resource package; a resource difference table corresponding to the resource package is obtained and displayed, so that operators can perform resource removal processing on the resource package according to the non-migrated resource names recorded in the resource difference table; and the resource package after resource removal processing is imported into the destination repository. This solves the problems of low resource migration efficiency and easy errors in the prior art, and improves the speed of adding resources to be migrated, as well as the speed and accuracy of resource migration.
[0060] Example 2
[0061] Figure 2 This is a schematic diagram of a resource migration device according to Embodiment 2 of the present invention. This embodiment is applicable to situations where resources to be migrated from a source repository are quickly and accurately migrated to a destination repository. The device can be implemented in hardware and / or software and is generally integrated into a computer device that provides resource migration services. Figure 2 As shown, the device includes:
[0062] The resource addition module 210 is used to add the resources to be migrated from the source repository to the resource package in batches in response to the resource migration request.
[0063] The resource removal module 220 is used to obtain and display the resource difference table corresponding to the resource package, so that the operator can remove the resource package according to the non-migrated resource name recorded in the resource difference table.
[0064] Resource migration module 230 is used to import resource packages that have undergone resource removal processing into the destination repository.
[0065] In this embodiment of the invention, in response to a resource migration request, resources to be migrated in the source repository are added in batches to a resource package; a resource difference table corresponding to the resource package is obtained and displayed, so that operators can perform resource removal processing on the resource package according to the non-migrated resource names recorded in the resource difference table; and the resource package after resource removal processing is imported into the destination repository. This solves the problems of low resource migration efficiency and easy errors in the prior art, and improves the speed of adding resources to be migrated, as well as the speed and accuracy of resource migration.
[0066] Optional, resource adding module 210, used for:
[0067] Fill the names of the resources to be migrated in the source repository into the resource list and generate the host command macros corresponding to the resource list;
[0068] Execute the host command macro to add the resources to be migrated in batches to the resource package of the source repository.
[0069] Optional, also includes:
[0070] The difference analysis module is used to execute an export command in the source repository to export the resource package after adding the resources to be migrated in batches from the source repository to the resource package in response to the resource migration request.
[0071] The analysis command is executed in the target repository to receive the resource package. The resource package is then compared and analyzed with the resources related to the resource to be migrated in the target repository to generate a resource difference list.
[0072] Optionally, the difference analysis module is also used for:
[0073] After generating the resource discrepancy list, the discrepancy analysis data in the resource discrepancy list is categorized and summarized according to resource type, and the categorization and summarization results are stored in the corresponding columns of the resource discrepancy table;
[0074] The resource discrepancy table is compared with the resource package to filter out non-migrated resources in the resource package, and the names of the non-migrated resources are written into a specific column of the resource discrepancy table according to the resource category order.
[0075] The resource migration apparatus provided in this embodiment of the invention can execute the resource migration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0076] Example 3
[0077] Figure 3 This is a schematic diagram of the structure of a computer device according to Embodiment 3 of the present invention. Figure 3 A block diagram of an exemplary device 12 suitable for implementing embodiments of the present invention is shown. Figure 3 The device 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0078] like Figure 3 As shown, device 12 is represented as a general-purpose computing device. Components of device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0079] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0080] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0081] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 3 Not shown; usually referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0082] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0083] Device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with device 12, and / or with any device that enables device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0084] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing a resource migration method provided in an embodiment of the present invention, including:
[0085] In response to a resource migration request, the resources to be migrated from the source repository are added in batches to the resource package;
[0086] Retrieve and display the resource difference table corresponding to the resource package so that operators can remove resources from the resource package according to the non-migrated resource names recorded in the resource difference table.
[0087] Import the resource package that has undergone resource removal into the target repository.
[0088] Example 4
[0089] Embodiment 4 of the present invention also discloses a computer storage medium storing a computer program, which, when executed by a processor, implements a resource migration method, including:
[0090] In response to a resource migration request, the resources to be migrated from the source repository are added in batches to the resource package;
[0091] Retrieve and display the resource difference table corresponding to the resource package so that operators can remove resources from the resource package according to the non-migrated resource names recorded in the resource difference table.
[0092] Import the resource package that has undergone resource removal into the target repository.
[0093] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0094] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0095] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0096] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A resource migration method, characterized in that, include: In response to a resource migration request, the resources to be migrated from the source repository are added in batches to the resource package; Obtain and display the resource difference table corresponding to the resource package, so that the operator can perform resource removal processing on the resource package according to the non-migrated resource names recorded in a specific column of the resource difference table; Import the resource package that has undergone resource removal into the target repository; In response to a resource migration request, after adding the resources to be migrated from the source repository to the resource package in batches, the process also includes: Execute the export command in the source repository to export the resource package; Execute analysis commands in the target repository, receive resource packages in the target repository, compare and analyze the resource packages with the resources in the target resource repository that are related to the resources to be migrated, and generate a resource difference list.
2. The method according to claim 1, characterized in that, Add the resources to be migrated from the source repository to the resource package in batches, including: Fill the names of the resources to be migrated in the source repository into the resource list, and generate the host command macro corresponding to the resource list; The host command macro is executed to add the resources to be migrated corresponding to the resource list to the resource package of the source repository in batches.
3. The method according to claim 1, characterized in that, After generating the resource diff list, the following is also included: The difference analysis data in the resource difference list are categorized and summarized according to resource type, and the categorization and summarization results are stored in the corresponding columns of the resource difference table; The resource difference table is compared with the resource package to filter out non-migrated resources in the resource package, and the names of the non-migrated resources are written into a specific column of the resource difference table according to the resource classification order.
4. A resource migration device, characterized in that, include: The resource addition module is used to respond to resource migration requests by adding resources to be migrated in batches from the source repository to the resource package; The resource removal module is used to obtain and display the resource difference table corresponding to the resource package, so that the operator can perform resource removal processing on the resource package according to the non-migrated resource names recorded in a specific column of the resource difference table. The resource migration module is used to import resource packages that have undergone resource removal processing into the target repository; The difference analysis module is used to, in response to a resource migration request, add the resources to be migrated in the source repository in batches to the resource package, and then execute an export command in the source repository to export the resource package. Execute analysis commands in the target repository, receive resource packages in the target repository, compare and analyze the resource packages with the resources in the target resource repository that are related to the resources to be migrated, and generate a resource difference list.
5. The apparatus according to claim 4, characterized in that, The resource adding module is used for: Fill the names of the resources to be migrated in the source repository into the resource list, and generate the host command macro corresponding to the resource list; The host command macro is executed to add the resources to be migrated corresponding to the resource list to the resource package of the source repository in batches.
6. The apparatus according to claim 4, characterized in that, The difference analysis module is also used for: After generating the resource discrepancy list, the discrepancy analysis data in the resource discrepancy list are classified and summarized according to resource type, and the classification and summarization results are stored in the corresponding columns of the resource discrepancy table; The resource difference table is compared with the resource package to filter out non-migrated resources in the resource package, and the names of the non-migrated resources are written into a specific column of the resource difference table according to the resource classification order.
7. A computer device, characterized in that, The device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a resource migration method as described in any one of claims 1-3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a resource migration method as described in any one of claims 1-3.
Citation Information
Patent Citations
Data migration method and device
CN106446114A
Database data migration method and device
CN113190534A