Code migration method and device, equipment, medium and product

By obtaining the migration region identifier and interface identifier to determine the target calling interface, the problem of the caller being unable to provide high availability services during the interface migration process is solved, thus achieving high availability of the system and simplifying the development process.

CN121326401APending Publication Date: 2026-01-13INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511335652.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

During the interface migration process, the caller cannot provide high availability services, and when problems occur during the operation of the platform interface, it is not possible to immediately roll back to the host interface, resulting in long time cycles and the system lacking high availability.

Method used

By obtaining the migration region identifier and migration interface identifier from the input parameters of the public program, the target calling interface can be determined and flexibly configured to accurately call the host or platform interface during the migration process, thereby achieving high availability.

Benefits of technology

It achieves high availability for the caller during interface migration, simplifies the development process, shortens the time cycle, and allows for flexible configuration to ensure high system availability when interface problems occur.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121326401A_ABST
    Figure CN121326401A_ABST
Patent Text Reader

Abstract

The invention discloses a code migration method and device, equipment, a medium and a product. Relates to the field of cloud storage, can be applied to the technical field of finance, and comprises the following steps: acquiring public program input parameters including a migration region identifier and a migration interface identifier; and determining a target calling interface according to the migration region identifier and the migration interface identifier, so as to perform code migration based on the target calling interface. Through the technical scheme of the invention, the migration region identifier and the migration interface identifier in the public program input parameters can be flexibly configured so as to be accurate to the specific region and the specific interface which can call the platform branch, the problem that a calling party cannot provide high-availability service in the interface migration process can be solved, and the high availability of the system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of cloud storage, and particularly relate to a code migration method, device, equipment, medium and product. BACKGROUND

[0002] In the process of gradually migrating host services to an open platform system, the channel business side needs to modify the configuration of related service calling interfaces at the same time. The existing technical method is to directly modify the original configuration of calling host interfaces to the configuration of calling platform interfaces after the platform interface configuration is completed. However, the existing technology has the following problems: during the interface provider migration debugging process, there are problems such as high uncertainty of interface upload return fields and incomplete interface functions, at this time the risk of synchronous modification of the calling party is high, and only after the provider is completely debugged can the modification be made, which takes a long time. During the migration process, if a problem occurs in the running process of the platform interface, it cannot be immediately rolled back to the host interface, and it does not have high availability. SUMMARY

[0003] Embodiments of the present application provide a code migration method, device, equipment, medium and product to solve the problem that the calling party cannot provide high-availability services during interface migration, and to realize the high availability of the system.

[0004] According to an aspect of the present application, a code migration method is provided, comprising:

[0005] obtaining a common program input parameter, the common program input parameter comprising: a migration region identifier and a migration interface identifier;

[0006] determining a target calling interface according to the migration region identifier and the migration interface identifier, to perform code migration based on the target calling interface.

[0007] According to another aspect of the present application, a code migration device is provided, comprising:

[0008] an obtaining module configured to obtain a common program input parameter, the common program input parameter comprising: a migration region identifier and a migration interface identifier;

[0009] a determining module configured to determine a target calling interface according to the migration region identifier and the migration interface identifier, to perform code migration based on the target calling interface.

[0010] According to another aspect of the present application, an electronic device is provided, comprising:

[0011] at least one processor; and

[0012] a memory in communication with the at least one processor; wherein,

[0013] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the code migration method according to any one of the embodiments of the present application.

[0014] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the code migration method according to any one of the embodiments of the present application when executed by the processor.

[0015] According to another aspect of the present application, the embodiments of the present application further provide a computer program product, which comprises a computer program, and the computer program implements the code migration method according to any one of the embodiments of the present application when executed by a processor.

[0016] The embodiments of the present application obtain the public program input parameters, wherein the public program input parameters comprise a migration region identifier and a migration interface identifier, then determine a target calling interface according to the migration region identifier and the migration interface identifier, and perform code migration based on the target calling interface. Through the technical solution of the present application, the migration region identifier and the migration interface identifier in the public program input parameters can be flexibly configured, and then it is accurate to know which region and which interface can call the platform branch, so that the problem that the calling party cannot provide high-availability service in the interface migration process can be solved, and the high-availability of the system is realized.

[0017] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as limiting the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0019] Figure 1 is a flow chart of a code migration method in the embodiments of the present application;

[0020] Figure 2 is a flow chart of a public program and parameter judgment logic in the embodiments of the present application;

[0021] Figure 3 is a schematic diagram of a migration region parameter judgment logic in the embodiments of the present application;

[0022] Figure 4 This is a schematic diagram of a migration interface parameter judgment logic in an embodiment of the present invention;

[0023] Figure 5 This is a schematic diagram of the structure of a code migration device according to an embodiment of the present invention;

[0024] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the code migration method of this invention. Detailed Implementation

[0025] 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.

[0026] 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 their derivatives, 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.

[0027] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0028] Example 1

[0029] For banks' overseas systems, operations cover multiple regions, with different branches offering both similar services and unique business characteristics. Therefore, migrating mainframe operations to an open platform system involves a significant amount of engineering work in modifying channel business programs on overseas systems, with a wide-ranging impact. Simply modifying the portion of the channel code that calls the mainframe interface program to call programs on the open platform system, without considering regional differences or business logic, easily introduces numerous errors and fails to provide high availability during code migration. Therefore, this invention solves the problem of callers being unable to provide high availability during interface migration.

[0030] Figure 1 This is a flowchart of a code migration method according to an embodiment of the present invention. This embodiment is applicable to the case of flexible and adaptable channel-side host code migration. The method can be executed by the code migration device in this embodiment of the present invention, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:

[0031] S101. Obtain common program input parameters.

[0032] In this embodiment, the input parameters of the common program can be parameters that the user inputs into the common program.

[0033] The common program input parameters include: migration region identifier and migration interface identifier.

[0034] It should be noted that the migration region identifier can be the identification information of the region where the code needs to be migrated, such as the region name, which can be represented by "area" in this embodiment. Similarly, the migration interface identifier can be the identification information of the interface where the code needs to be migrated, such as the interface name, which can be represented by "tran" in this embodiment.

[0035] Specifically, the system obtains the input parameters that the user uses for the common program during code migration. For example, the input parameters of the common program need to include the area code (i.e., the migration area identifier) ​​and the host interface name (tran) corresponding to this call (i.e., the migration interface identifier).

[0036] S102. Determine the target calling interface based on the migration region identifier and migration interface identifier, and perform code migration based on the target calling interface.

[0037] It should be noted that, in this embodiment, the target calling interface can refer to the host interface or platform interface that should be called when the code is finally migrated.

[0038] In the specific implementation of this embodiment, this method provides an interface to call a public program. The public program configuration includes the configuration and parameters required for the host branch and the platform branch. The caller needs to configure both the host and platform branches completely. Specifically, this method provides two technical parameters: the migration region parameter areaPram and the migration interface parameter tranPram. By configuring these two parameters, it is possible to control which regions and interfaces have completed platform migration and can call the platform interfaces. Then, the migration region identifier and migration interface identifier included in the input parameters of the public program can be compared with the configured migration region parameter areaPram and migration interface parameter tranPram to implement the judgment logic, thereby determining which specific interface should be called for this code migration.

[0039] In practice, by configuring the migration region identifier and migration interface identifier included in the public program input parameters, and comparing them with the configuration parameters of the corresponding region and interface, it is possible to determine whether the code migration needs to call the host interface or the platform interface at the granularity of region and interface.

[0040] This invention, through its embodiments, acquires common program input parameters, including a migration region identifier and a migration interface identifier. Then, it determines the target calling interface based on these identifiers, enabling code migration based on the target interface. This technical solution allows for flexible configuration of the migration region identifier and migration interface identifier in the common program input parameters, pinpointing exactly which region and interface can call the platform branch. This solves the problem of callers being unable to provide high-availability services during interface migration, thus achieving high system availability.

[0041] Optionally, the target API call can be determined based on the migration region identifier and the migration interface identifier, including:

[0042] The region determination result is determined based on the migration region identifier.

[0043] It should be noted that the region determination result can be the result of determining whether the region corresponding to the migration region identifier can call the platform interface or whether it needs to call the host interface.

[0044] Specifically, by configuring the migration region identifier included in the public program input parameters, it can be determined at the region level whether the code migration needs to call the host interface or the platform interface.

[0045] The interface judgment result is determined based on the migration interface identifier.

[0046] It should be noted that the interface judgment result can be the result of determining whether the interface corresponding to the migration interface identifier can call the platform interface or whether it is necessary to call the host interface.

[0047] Specifically, by configuring the migration interface identifier included in the public program input parameters, it can be determined at the interface granularity whether the code migration needs to call the host interface or the platform interface.

[0048] The target API is determined based on the region and API assessment results.

[0049] Specifically, the decision to migrate the code depends on a combination of the region and interface determination results. For example, the target interface can be determined as follows: if both results indicate that the platform interface can be called, then the target interface is the platform interface; if either result indicates that the platform interface cannot be called and the host interface needs to be called, then the target interface is the host interface.

[0050] This invention determines the target calling interface by separately judging the migration region identifier and the migration interface identifier, and then comprehensively determining the two judgment results. The technical solution of this invention, by comprehensively determining the target calling interface through two judgment factors—region and interface—ensures the multi-dimensional comprehensiveness of the target calling interface determination, thereby improving the accuracy and rationality of the target calling interface determination.

[0051] Optionally, the region determination result can be determined based on the migration region identifier, including:

[0052] Obtain the migration region parameters corresponding to the target region based on the migration region identifier.

[0053] The target region can be the region where the code is to be migrated, corresponding to the migration region identifier.

[0054] It should be explained that the migration region parameter can be a parameter used to indicate which regions have completed the platform migration and can call the platform interface. In this embodiment, it can be represented by areaPram.

[0055] In practice, the migration area parameter areaPram for each region can be configured in advance, and then the migration area parameter areaPram for the corresponding target region can be found based on the migration area identifier area in the input parameters of the public program.

[0056] If the migration region parameter is of type 1 and the migration region identifier is included in the migration region parameter, then the region determination result is to call the platform interface.

[0057] It should be noted that the first type can be, for example, a type that indicates that the target object (including the target region and the target interface) has completed the platform migration. For example, it can be represented by testrunin-X / Y (where X can represent the target region and Y can represent the target interface).

[0058] For example, the migration region parameter of the target region is of the first type, which can be represented as: the migration region parameter is testrunin-X, where X can be the identifier of the target region, such as the region name.

[0059] In actual operation, when the migration region parameter areaPram of the target region is configured as "testrunin-X", it means that the target region X has completed the platform migration, and the platform interface can be called at this time.

[0060] If the migration region parameter is of type 2, the result of determining the region is to call the platform interface.

[0061] It should be noted that the second type can be, for example, a type that indicates that all objects (including all regions and all interfaces) have completed platform migration, such as allrun.

[0062] For example, the migration region parameter of the target region is of the second type, which can be represented as: the migration region parameter is allrun.

[0063] In actual operation, when the migration region parameter areaPram of the target region is configured as "allrun", it means that the target region has completed the platform migration, and the platform interface can be called at this time.

[0064] If the migration region parameter is of type 3 and the migration region identifier is included in the migration region parameter, then the region determination result is to call the host interface.

[0065] It should be noted that the third type can be, for example, a type that indicates that the target object (including the target region and the target interface) has not completed the platform migration, while other objects (i.e., all objects other than the target object) have completed the platform migration. For example, it can be represented by testrunout-X / Y (where X can represent the target region and Y can represent the target interface).

[0066] For example, the migration region parameter of the target region is of the third type, which can be represented as: the migration region parameter is testrunout-X, where X can be the identifier of the target region, such as the region name.

[0067] In actual operation, when the migration region parameter areaPram of the target region is configured as "testrunout-X", it means that the target region X has not completed the platform migration. At this time, the platform interface cannot be called, but the host interface can be called to perform code migration.

[0068] This invention employs three different types of parameters for each region to represent the status of whether the platform migration has been completed. Furthermore, the parameters for the corresponding target region can be found using the migration region identifier to determine which specific interface should be called for code migration in the target region. This technical solution, by using different parameters to mark the status of different regions, makes the region determination process faster and more accurate, reducing the occurrence of interface call errors.

[0069] In practice, the user and business volume vary greatly in different regions and businesses in overseas operations. By precisely targeting which region to call the platform branch, we can prioritize the production of regions and businesses with smaller business volumes to achieve trial operation. Based on the migration and debugging progress of the caller and the callee, we can gradually realize the interface migration of all regions and all businesses.

[0070] Optionally, the interface judgment result is determined based on the migration interface, including:

[0071] Obtain the migration interface parameters corresponding to the target interface based on the migration interface identifier.

[0072] The target interface can be the interface whose code is to be migrated, corresponding to the migration region identifier.

[0073] It should be explained that the migration interface parameters can be parameters used to indicate which interfaces have completed platform migration and can call platformized interfaces. In this embodiment, they can be represented by tranPram.

[0074] In actual operation, the migration interface parameter tranPram of each interface can be configured in advance, and then the migration interface identifier tran of the corresponding target interface can be found according to the input parameters of the common program.

[0075] If the migration interface parameter is of type 1 and the migration interface identifier is included in the migration interface parameter, then the interface judgment result is determined to be a call to the platform interface.

[0076] For example, the migration interface parameter of the target interface is of the first type, which can be represented as: the migration interface parameter is testrunin-Y, where Y can be the identifier of the target interface, such as the interface name.

[0077] In actual operation, when the migration interface parameter tranPram of the target interface is configured as "testrunin-Y", it means that the target interface Y has completed the platform migration, and the platform interface can be called at this time.

[0078] If the migration interface parameter is of type 2, then the interface judgment result is determined to be a call to the platform interface.

[0079] For example, the migration interface parameter of the target interface is of the second type, which can be represented as: the migration interface parameter is allrun.

[0080] In actual operation, when the migration interface parameter tranPram of the target interface is configured as "allrun", it means that the target interface has completed the platform migration, and the platform interface can be called at this time.

[0081] If the migration interface parameter is of type 3 and the migration interface identifier is included in the migration interface parameter, then the result of determining the region is to call the host interface.

[0082] For example, the migration interface parameter of the target interface is of the third type, which can be represented as: the migration interface parameter is testrunout-Y, where Y can be the identifier of the target interface, such as the interface name.

[0083] In actual operation, when the migration interface parameter tranPram of the target interface is configured as "testrunout-Y", it means that the target interface Y has not completed the platform migration. At this time, the platform interface cannot be called, but the host interface can be called to perform code migration.

[0084] This invention employs three different types of parameters for each interface to represent its platform migration status. By using the migration interface identifier to find the parameters of the corresponding target interface, it can determine which interface the target interface should call for code migration. This technical solution, by using different parameters to mark the status of different interfaces, makes the interface judgment process faster and more accurate, reducing the occurrence of interface call errors.

[0085] Optionally, the target API can be determined based on the region and API determination results, including:

[0086] If the region determination result is to call the platform interface, and the interface determination result is to call the platform interface, then the target call interface is determined to be the platform interface.

[0087] Specifically, if the region determination result is to call the platform interface, and the interface determination result is also to call the platform interface, then the target call interface can be determined to be the platform interface.

[0088] Otherwise, determine the target call interface as the host interface.

[0089] Specifically, if the region determination result is to call the platform interface, and the interface determination result is to call the host interface, then the target call interface can be determined to be the host interface; if the region determination result is to call the host interface, then the target call interface can be determined to be the host interface.

[0090] This invention determines the target calling interface by comprehensively considering both the region determination result and the interface determination result, ensuring comprehensive coverage of multiple scenarios for target calling interface determination and improving the accuracy and rationality of target calling interface determination.

[0091] Optionally, common program input parameters also include: platform interface sent messages and host interface sent messages.

[0092] As we know, API calls are a common communication mechanism in software systems, allowing different software components or services to interact. During an API call, one component (usually called the caller or client) sends a request (upload message) to another component (usually called the callee or server), and then receives and processes the response (return message) from the latter.

[0093] In this embodiment, the message sent by the platform interface can be a message sent by the caller to the callee when the platform interface is called; the message sent by the host interface can be a message sent by the caller to the callee when the host interface is called.

[0094] After determining the target API based on the migration region identifier and migration API identifier, the process also includes:

[0095] If the target call interface is a platform interface, then the platform interface upload message will be sent to the platform interface.

[0096] Specifically, after determining that the target call interface is the platform interface, the platform interface is called, the platform interface upload message is sent to the platform interface, and the corresponding return message is returned.

[0097] If the target call interface is a host interface, then the host interface upload message will be sent to the host interface.

[0098] Specifically, after determining that the target call interface is the host interface, the host interface is called, the host interface upload message is sent to the host interface, and the corresponding return message is returned.

[0099] In this embodiment of the invention, after determining the target calling interface, the caller sends a message to the callee and receives a return message, thereby establishing a communication connection between the caller and the callee.

[0100] For developers, the technical solution of this invention only requires adding platform interface configuration to the original configuration, and completing the development and integration of channel-side migration code while ensuring the functionality of the host interface, thus simplifying the process and shortening the time cycle. For operations and maintenance personnel, if a certain interface suddenly has a problem, parameters can be flexibly configured to achieve high availability of the system.

[0101] Example 2

[0102] As an exemplary description of the above embodiments, Figure 2 This is a flowchart of a common procedure and parameter judgment logic in an embodiment of the present invention. For example... Figure 2 As shown, the method specifically includes the following steps:

[0103] Step a: Obtain the input parameters of the common program.

[0104] Specifically, common program input parameters may include, for example, the region and the interface tran.

[0105] Step b: Implement the logic for determining migration region parameters.

[0106] Specifically, the corresponding region can be found based on the region area included in the input parameters of the public program, and the migration region parameter judgment logic of the region can be implemented.

[0107] Step c: Is the output of the migration region parameter judgment logic 1 or 0? If it is 1, then proceed to step d; if it is 0, then proceed to step g.

[0108] Specifically, if the migration region parameter judgment logic outputs 1, then step d is executed to implement the migration interface parameter judgment logic; if the migration region parameter judgment logic outputs 0, then step g is executed directly to call the host interface.

[0109] Step d: Implement the migration interface parameter judgment logic.

[0110] Specifically, the corresponding interface can be found based on the interface tran included in the input parameters of the public program, and the migration interface parameter judgment logic of that interface can be implemented.

[0111] Step e: Determine whether the output of the migration interface parameter judgment logic is 1 or 0. If it is 1, proceed to step f; if it is 0, proceed to step g.

[0112] Specifically, if the migration interface parameter judgment logic outputs 1, then step f is executed to call the platform interface; if the migration interface parameter judgment logic outputs 0, then step g is executed to call the host interface.

[0113] Step f: Call the platform interface.

[0114] Step g: Call the host interface.

[0115] Figure 3 This is a schematic diagram of a migration region parameter judgment logic in an embodiment of the present invention, as described above. Figure 2 Step b provides a detailed description of the logic for determining migration region parameters. For example... Figure 3 As shown, the logic for determining migration region parameters can be described as follows:

[0116] Obtain the migration region parameter areaPram corresponding to the region area.

[0117] If the areaPram parameter contains the string "testrunin" and the value of the current area is also in the areaPram parameter, then it returns 1. For example, if areaPram = testrunin - X and area = X, then it returns 1. If the value of the current area is not in the areaPram parameter, then it returns 0.

[0118] If the areaPram parameter is equal to the string "allrun", it returns 1. For example, if areaPram = allrun, it will return 1 regardless of what area is equal to.

[0119] If the areaPram parameter contains the string "testrunout" and the value of the current area is also in the areaPram parameter, then 0 is returned. For example, if areaPram = testrunout - X and area = X, then 0 is returned. If the value of the current area is not in the areaPram parameter, then 1 is returned.

[0120] Figure 4 This is a schematic diagram of a migration interface parameter judgment logic in an embodiment of the present invention, as described above. Figure 2 The detailed description of step d, which implements the parameter judgment logic for the migration interface, is as follows. Figure 4 As shown, the migration interface parameter judgment logic can be described as follows:

[0121] Obtain the migration interface parameter tranPram corresponding to the interface tran based on the interface tran.

[0122] If the tranPram parameter contains the string "testrunin" and the value of the current interface tran is also in the tranPram parameter, then 1 is returned. For example, if tranPram = testrunin - Y and tran = Y, then 1 is returned. If the value of the current interface tran is not in the tranPram parameter, then 0 is returned.

[0123] If the tranPram parameter is equal to the string "allrun", it returns 1. For example, if tranPram = allrun, it will return 1 regardless of what tran equals.

[0124] If the tranPram parameter contains the string "testrunout" and the value of the current interface tran is also in the tranPram parameter, then 0 is returned. For example, if tranPram = testrunout - Y and tran = Y, then 0 is returned. If the value of the current interface tran is not in the tranPram parameter, then 1 is returned.

[0125] The technical solution of this invention offers the following advantages: In overseas operations, the user and business volume vary significantly across different regions and services. By pinpointing which region and interface uses the platform branch, regions and services with lower business volume can be prioritized for trial operation. Based on the migration and debugging progress of both the caller and the callee, interface migration across all regions and services can be gradually achieved. For developers, this common method only requires adding platform interface configurations to the existing configuration. While ensuring the functionality of the host interface, it completes the development and integration of channel-side migration code, simplifying the process and shortening the time cycle. For operations and maintenance personnel, if an interface suddenly experiences a problem, parameters can be flexibly configured to achieve high system availability.

[0126] Example 3

[0127] Figure 5 This is a schematic diagram of a code migration device according to an embodiment of the present invention. This embodiment is applicable to flexible channel-side host code migration scenarios. The device can be implemented using software and / or hardware, and can be integrated into any device that provides code migration functionality, such as… Figure 5 As shown, the code migration device specifically includes: an acquisition module 201 and a determination module 202.

[0128] The acquisition module 201 is used to acquire common program input parameters, which include: migration region identifier and migration interface identifier;

[0129] The determination module 202 is used to determine the target calling interface based on the migration region identifier and the migration interface identifier, so as to perform code migration based on the target calling interface.

[0130] Optionally, the determining module 202 includes:

[0131] The first determining unit is used to determine the region determination result based on the migration region identifier;

[0132] The second determining unit is used to determine the interface judgment result based on the migration interface identifier;

[0133] The third determining unit is used to determine the target calling interface based on the region determination result and the interface determination result.

[0134] Optionally, the first determining unit is specifically used for:

[0135] Obtain the migration region parameters corresponding to the target region based on the migration region identifier;

[0136] If the migration region parameter is of the first type and the migration region identifier is included in the migration region parameter, then the region determination result is to call the platform interface;

[0137] If the migration region parameter is of the second type, then the region determination result is to call the platform interface;

[0138] If the migration region parameter is of type 3, and the migration region identifier is included in the migration region parameter, then the region determination result is to call the host interface.

[0139] Optionally, the second determining unit is specifically used for:

[0140] If the migration interface parameter is of the first type and the migration interface identifier is included in the migration interface parameter, then the interface judgment result is determined to be a call to the platform interface.

[0141] If the migration interface parameter is of the second type, then the interface judgment result is determined to be a call to the platform interface;

[0142] If the migration interface parameter is of type 3 and the migration interface identifier is included in the migration interface parameter, then the region determination result is to call the host interface.

[0143] Optionally, the third determining unit is specifically used for:

[0144] If the region determination result is to call the platform interface, and the interface determination result is to call the platform interface, then the target calling interface is determined to be the platform interface;

[0145] Otherwise, the target call interface is determined to be the host interface.

[0146] Optionally, the common program input parameters may further include: platform interface sent messages and host interface sent messages;

[0147] The device further includes:

[0148] The first uploading unit is used to upload the platform interface uploading message to the platform interface if the target calling interface is a platform interface.

[0149] The second uploading unit is used to upload the host interface uploading message to the host interface if the target calling interface is a host interface.

[0150] The above-mentioned products can execute the code migration method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects of the execution method.

[0151] Example 4

[0152] Figure 6 A schematic diagram of an electronic device 30 that 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.

[0153] like Figure 6 As shown, the electronic device 30 includes at least one processor 31 and a memory, such as a read-only memory (ROM) 32 or a random access memory (RAM) 33, communicatively connected to the at least one processor 31. The memory stores computer programs executable by the at least one processor. The processor 31 can perform various appropriate actions and processes based on the computer program stored in the ROM 32 or loaded from storage unit 38 into the RAM 33. The RAM 33 can also store various programs and data required for the operation of the electronic device 30. The processor 31, ROM 32, and RAM 33 are interconnected via a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.

[0154] Multiple components in electronic device 30 are connected to I / O interface 35, including: input unit 36, such as keyboard, mouse, etc.; output unit 37, such as various types of monitors, speakers, etc.; storage unit 38, such as disk, optical disk, etc.; and communication unit 39, such as network card, modem, wireless transceiver, etc. Communication unit 39 allows electronic device 30 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0155] Processor 31 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 31 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, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 31 performs the various methods and processes described above, such as code migration methods:

[0156] Obtain common program input parameters, which include: migration region identifier and migration interface identifier;

[0157] The target calling interface is determined based on the migration region identifier and the migration interface identifier, so that code migration can be performed based on the target calling interface.

[0158] In some embodiments, the code migration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 38. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 30 via ROM 32 and / or communication unit 39. When the computer program is loaded into RAM 33 and executed by processor 31, one or more steps of the code migration method described above may be performed. Alternatively, in other embodiments, processor 31 may be configured to execute the code migration method by any other suitable means (e.g., by means of firmware).

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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).

[0163] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include 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.

[0164] 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.

[0165] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the code migration method of any embodiment of the present invention.

[0166] In implementing the computer program product, 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 user's computer, partially on the user's computer, as a standalone software package, partially on the user'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 user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0167] 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.

[0168] 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 code migration method, characterized in that, include: Obtain common program input parameters, which include: migration region identifier and migration interface identifier; The target calling interface is determined based on the migration region identifier and the migration interface identifier, so that code migration can be performed based on the target calling interface.

2. The method according to claim 1, characterized in that, Determining the target calling interface based on the migration region identifier and the migration interface identifier includes: The region determination result is determined based on the migration region identifier; The interface judgment result is determined based on the migration interface identifier; The target calling interface is determined based on the region judgment result and the interface judgment result.

3. The method according to claim 2, characterized in that, The region determination result is determined based on the migration region identifier, including: Obtain the migration region parameters corresponding to the target region based on the migration region identifier; If the migration region parameter is of the first type and the migration region identifier is included in the migration region parameter, then the region determination result is to call the platform interface; If the migration region parameter is of the second type, then the region determination result is to call the platform interface; If the migration region parameter is of type 3, and the migration region identifier is included in the migration region parameter, then the region determination result is to call the host interface.

4. The method according to claim 2, characterized in that, The interface judgment result is determined based on the migration interface identifier, including: Obtain the migration interface parameters corresponding to the target interface based on the migration interface identifier; If the migration interface parameter is of the first type and the migration interface identifier is included in the migration interface parameter, then the interface judgment result is determined to be a call to the platform interface. If the migration interface parameter is of the second type, then the interface judgment result is determined to be a call to the platform interface; If the migration interface parameter is of type 3 and the migration interface identifier is included in the migration interface parameter, then the region determination result is to call the host interface.

5. The method according to claim 2, characterized in that, The target calling interface is determined based on the region determination result and the interface determination result, including: If the region determination result is to call the platform interface, and the interface determination result is to call the platform interface, then the target calling interface is determined to be the platform interface; Otherwise, the target call interface is determined to be the host interface.

6. The method according to claim 1, characterized in that, The common program input parameters also include: platform interface sent messages and host interface sent messages; After determining the target calling interface based on the migration region identifier and the migration interface identifier, the process further includes: If the target call interface is a platform interface, then the platform interface upload message is sent to the platform interface; If the target call interface is a host interface, then the host interface upload message will be sent to the host interface.

7. A code migration device, characterized in that, include: The acquisition module is used to acquire common program input parameters, which include: migration region identifier and migration interface identifier; The determination module is used to determine the target calling interface based on the migration region identifier and the migration interface identifier, so as to perform code migration based on the target calling interface.

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 code migration method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the code migration method of any one of claims 1-6.

10. A computer program product comprising a computer program that, when executed by a processor, implements the code migration method according to any one of claims 1-6.