New and old platform compatible method and device, medium and program product

By sinking the compatibility judgment logic into the compatibility layer of the workflow component, the problem of code redundancy and complexity when new and old platforms are compatible in the existing technology is solved, and higher maintainability and scalability are achieved.

CN120086034APending Publication Date: 2025-06-03BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510151900.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, when new and old platforms are compatible, compatibility judgment logic is required in each docking module, resulting in system code redundancy, increased complexity and poor scalability.

Method used

By sinking the compatibility judgment logic into the compatibility layer of the workflow component, the front-end does not need to add compatibility judgment logic, and the compatibility layer determines the target platform based on the request information.

Benefits of technology

It realizes compatibility between new and old platforms, reduces code duplication, reduces system complexity, and improves system maintainability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086034A_ABST
    Figure CN120086034A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud platforms, in particular to a new and old platform compatible method and device, a medium and a program product. The method comprises the steps that a front end generates an interface calling request according to user input and sends the interface calling request to a workflow component; the workflow component analyzes the received interface calling request to obtain request information, and sends the request information to the compatible layer; the compatible layer determines a target platform receiving the interface calling request according to the request information, and the target platform is a new platform or an old platform; according to the scheme, by sinking the compatibility judgment logic into the compatibility layer of the workflow component, compatibility of a new platform and an old platform is achieved, the compatibility judgment logic does not need to be added in the front-end docking module, code repetition is reduced, system complexity is lowered, and maintainability and expansibility of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud platforms, and particularly to a method, device, medium and program product for new and old platform compatibility. Background Art

[0002] In the evolution process of cloud computing platforms, in order to ensure the smooth transition between new and old platforms and to jointly support various business requirements, a certain compatibility mechanism is usually adopted to forward the received service requests to the corresponding platforms for processing, thereby achieving the compatibility between new and old platforms.

[0003] The compatibility mechanism adopted in the related art is to write compatibility judgment logic in each front-end docking module (such as the console, network, storage, etc.), so as to determine the platform that undertakes the service when receiving a service request according to the compatibility judgment logic of the docking module to which the service request belongs.

[0004] However, since compatibility judgment logic needs to be written in each module, it leads to redundant system code, increased complexity and poor scalability. Summary of the Invention

[0005] To solve the above technical problems, the present disclosure provides a method, device, medium and program product for new and old platform compatibility.

[0006] In a first aspect, the present disclosure provides a method for new and old platform compatibility. The method is applied to a new and old platform compatibility system, which includes a front end, a new platform and an old platform. The new platform includes a workflow component, and a compatibility layer is integrated in the workflow component. The method includes:

[0007] The front end generates an interface call request according to user input and sends the interface call request to the workflow component; the workflow component parses the received interface call request to obtain request information and sends the request information to the compatibility layer; the compatibility layer determines the target platform that undertakes the interface call request according to the request information, and the target platform is the new platform or the old platform.

[0008] In some optional embodiments, the compatibility layer determines the target platform that undertakes the interface call request according to the request information, including:

[0009] Judging whether there is identification information of a cloud host in the request information; determining the target platform by using a determination method corresponding to the judgment result.

[0010] In some optional embodiments, determining the target platform by using a determination method corresponding to the judgment result includes:

[0011] When the judgment result is that there is identification information in the request information, determining the target platform according to the identification information.

[0012] In some alternative embodiments, determining the target platform using a determination method corresponding to the judgment result further includes:

[0013] When the judgment result is that the identification information does not exist in the request information, the compatibility layer obtains the model information from the request information; and determines the target platform according to the model information.

[0014] In some alternative embodiments, when the judgment result is that the identification information exists in the request information, determining the target platform according to the identification information includes:

[0015] The compatibility layer determines the target model information corresponding to the identification information according to the first mapping relationship between the cloud host and the model; and determines the target platform corresponding to the target model information according to the second mapping relationship between the model and the platform type.

[0016] In some alternative embodiments, after the compatibility layer determines the target platform for receiving the interface call request according to the request information, the method further includes:

[0017] In the target platform, call the corresponding application programming interface based on the interface call request and execute the corresponding business processing operation.

[0018] In some alternative embodiments, when the model information exists in the request information, after calling the corresponding application programming interface based on the interface call request and executing the corresponding business processing operation, the method further includes:

[0019] The compatibility layer receives the business processing result fed back by the target platform based on the interface call request; obtains the identification information from the business processing result; and stores the model information and the obtained identification information into the first mapping relationship.

[0020] In a second aspect, the present disclosure provides a computer device, including:

[0021] A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the new and old platform compatibility method of the first aspect and any of its embodiments.

[0022] In a third aspect, the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the new and old platform compatibility method of the first aspect and any of its embodiments.

[0023] In a fourth aspect, the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the new and old platform compatibility method of the first aspect and any of its embodiments are implemented.

[0024] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:

[0025] For the new and old platform compatibility method provided in this embodiment, first, the front end generates an interface call request according to user input and sends the interface call request to the workflow component; then, the workflow component parses the received interface call request to obtain request information and sends the request information to the compatibility layer; finally, the compatibility layer determines the target platform for undertaking the interface call request according to the request information, and the target platform is a new platform or an old platform. Through the above solution, the compatibility judgment logic is sunk into the compatibility layer of the workflow component, which not only realizes the compatibility of new and old platforms, but also does not require adding compatibility judgment logic in the front-end docking modules (such as consoles, networks, storage, etc.), reduces code duplication, reduces system complexity, and improves the maintainability and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a schematic flowchart of the new and old platform compatibility method provided by the embodiments of the present disclosure;

[0029] Figure 2 It is a schematic flowchart of the determination process of the target platform provided by the embodiments of the present disclosure;

[0030] Figure 3 It is a structural connection diagram of a computer device provided by the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] In order to be able to more clearly understand the above-mentioned objects, features and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

[0032] In the following description, numerous specific details are set forth to provide a thorough understanding of the present disclosure. However, the present disclosure may be practiced in other ways different from those described herein. Obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the scope of protection of the present disclosure.

[0033] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0034] In the process of the evolution of the cloud computing platform, there is a stage where new and old platforms coexist, which is the smooth transition stage between new and old platforms. During the smooth transition process, some services have been transferred to the new platform for processing, but some services are still processed by the old platform. Therefore, after receiving a service request, it is usually necessary to first use a compatibility mechanism to determine the platform that undertakes the service request, and then the corresponding platform processes the service based on the service request.

[0035] The compatibility mechanism in the related art is to write compatibility judgment logic in each docking module (such as the console, network, storage, etc.) at the front end. When a docking module receives a service request, the compatibility judgment logic of the docking module is used to determine the platform type that undertakes the service request.

[0036] However, since similar compatibility judgment logic needs to be written in each docking module, it results in high repetition of front-end code, increases complexity and the possibility of errors, and has a high maintenance cost. Moreover, with the expansion of the functions of the new platform or the change of the old platform, it may be necessary to frequently modify the compatibility judgment logic, thus affecting the overall stability and scalability.

[0037] To this end, the embodiments of the present application provide a method for new and old platform compatibility. By sinking the compatibility judgment logic into the compatibility layer of the workflow component, it not only realizes the compatibility of new and old platforms, but also does not require adding compatibility judgment logic in the front-end docking modules (such as consoles, networks, storage, etc.), reducing code duplication, lowering system complexity, and improving the maintainability and extensibility of the system.

[0038] According to an embodiment of the present disclosure, an embodiment of a method for new and old platform compatibility is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0039] In this embodiment, a method for new and old platform compatibility is provided, which is applied to a new and old platform compatibility system. The system includes a front end, a new platform, and an old platform. Among them, the new platform includes a workflow component, and a compatibility layer is integrated in the workflow component. Figure 1 is a flowchart of a method for new and old platform compatibility according to an embodiment of the present disclosure, as Figure 1 shown, the process includes the following steps:

[0040] S101, the front end generates an interface call request according to the user input and sends the interface call request to the workflow component.

[0041] Specifically, based on their own business needs, users input the information required in the business processing process in the interaction interface. In response to the user's input operation, the front end generates an interface call request that meets the requirements of the interface to be called based on the information input by the user, and after generating the interface call request, sends it to the workflow component of the new platform. The interface call request in this embodiment can be an HTTP request.

[0042] Exemplarily, if the user's current business requirement is to create a cloud host, then the information input by the user is the basic information required to create a cloud host. Naturally, the interface call request generated by the front end based on the user input information is the one corresponding to the cloud host creation business. Similarly, if the user's current business requirement is to mount a disk on a certain created cloud host, then the information input by the user is the basic information required to mount the disk, and the interface call request generated by the front end based on the user input information is also naturally the one corresponding to the disk mounting business.

[0043] S102, the workflow component parses the received interface call request to obtain request information and sends the request information to the compatibility layer.

[0044] Among them, the request information can be understood as the information required by the interface to be called for the request, that is, the information input by the user.

[0045] Specifically, after the workflow component receives the interface call request sent by the front end, it parses the interface call request to obtain request information. When the interface call request is an HTTP request, the request information is the information included in the request body.

[0046] For example, if the request calls the application program interface corresponding to the cloud host creation service, then the request information must include the model information of the cloud host to be created, such as the cloud host name, configuration parameters (CPU, memory, disk size, etc.), network settings and other information.

[0047] For example, if the request calls an application program interface corresponding to a disk mounting service, the request information includes at least a cloud host ID, a disk ID, and configuration information required for mounting the disk.

[0048] S103: The compatibility layer determines the target platform that receives the interface call request according to the request information.

[0049] Among them, the target platform is a new platform or an old platform.

[0050] Specifically, the compatibility layer determines the platform where the pending cloud host is located based on the request information, and determines the platform as the target platform for receiving the interface call request. The pending cloud host refers to the object of this business processing, such as the pending cloud host can be a cloud host to be created, or a cloud host to which a disk is to be mounted.

[0051] The new and old platform compatibility method provided in this embodiment is that the front end first generates an interface call request according to user input, and sends the interface call request to the workflow component; then the workflow component parses the received interface call request to obtain request information, and sends the request information to the compatibility layer; finally, the compatibility layer determines the target platform for receiving the interface call request according to the request information, and the target platform is the new platform or the old platform; the above scheme not only achieves compatibility with the new and old platforms by sinking the compatibility judgment logic into the compatibility layer of the workflow component, but also does not need to add the compatibility judgment logic in the front-end docking module (such as console, network, storage, etc.), reduces code duplication, reduces system complexity, and improves the maintainability and scalability of the system.

[0052] In an optional embodiment, the platform type is determined in an optimized manner, such as Figure 2 As shown, the method for determining the platform type includes the following steps:

[0053] S201, determining whether there is identification information of a cloud host in the request information.

[0054] The identification information refers to information that identifies the cloud host, and the identification information may be a cloud host ID, or a cloud host name, etc.

[0055] Specifically, after obtaining the request information, the compatibility layer first determines whether the identification information of the cloud host exists in the request information.

[0056] S202. Determine the target platform using a determination method corresponding to the determination result.

[0057] S202 specifically includes:

[0058] S2021. When the determination result is that the identification information exists in the request information, determine the target platform according to the identification information.

[0059] Specifically, when the determination result is that the identification information of the cloud host exists in the request information, it means that the service corresponding to the current interface call request is carried out with the created cloud host as the object, such as mounting a disk on a certain created cloud host. In this case, the target platform can be determined according to the identification information of the cloud host.

[0060] The method for determining the target platform according to the identification information of the cloud host is as follows: The compatibility layer determines the target model information corresponding to the identification information according to the first mapping relationship between the cloud host and the model; the compatibility layer determines the target platform corresponding to the target model information according to the second mapping relationship between the model and the platform type. Among them, the first mapping relationship and the second mapping relationship are stored in the database. The two can be stored in the same database or in different databases. For example, in some embodiments, the first mapping relationship is stored in the MySQL database, and the second mapping relationship is stored in the distributed key-value storage database. It should also be noted that the first mapping relationship and the second mapping relationship are in a dynamic change process. The first mapping relationship is created after the cloud host is successfully launched, and the first mapping relationship is continuously updated with the creation and destruction operations of each cloud host on the new platform / old platform. After receiving the interface call request corresponding to the cloud host creation service, the second mapping relationship first determines the platform to which the interface called in this request belongs, and then constructs the second mapping relationship between the model and the platform type according to the request information in the interface call request and the platform to which the interface called belongs. The second mapping relationship is continuously updated with the creation request of the new machine.

[0061] S2022. When the determination result is that the identification information does not exist in the request information, the compatibility layer obtains the model information from the request information and determines the target platform according to the model information.

[0062] Specifically, when the judgment result is that the identification information of the cloud host does not exist in the request information, it means that the current interface call request corresponds to the cloud host creation service. At this time, the model information of the cloud host to be created can be obtained from the request information, and the target platform corresponding to the obtained model information can be determined by traversing the second mapping relationship between the model and the platform type stored in the database. This embodiment provides different methods for determining the target platform for different situations, thereby improving the applicability of the solution.

[0063] In some optional embodiments, after the compatibility layer determines the target platform to receive the interface call request based on the request information, the method further includes: in the target platform, calling the corresponding application program interface based on the interface call request to perform corresponding business processing operations.

[0064] Specifically, after determining the target platform to receive the interface call request according to S101 to S103, the requested application program interface is called based on the interface call request, and corresponding business processing is performed on the target platform according to the parsed request information. The corresponding business processing refers to the operation performed by calling the application program interface, such as creating a cloud host, or mounting a disk on a created cloud host, etc.

[0065] In some optional embodiments, when model information exists in the request information, after calling the corresponding application interface based on the interface call request and performing the corresponding business processing operation, the method also includes: receiving, by the compatibility layer, the business processing result fed back by the target platform based on the interface call request; obtaining identification information from the business processing result; and storing the model information and the obtained identification information in the first mapping relationship.

[0066] Specifically, when the model information exists in the request information, that is, in the process of creating a cloud host, after calling the corresponding application interface based on the interface call request and performing the corresponding business processing operation, the compatibility layer first receives the business processing result fed back by the target platform based on the interface call request, and the business processing result includes at least the model information and identification information. Then, the model information and identification information are obtained from the business processing result, and the model information and identification information are added to the first mapping relationship as a set of mapping relationships. Finally, the compatibility layer sends the business processing result to the working component, and the working component displays the business processing result through the front-end display and interactive interface. The real-time update of the first mapping relationship is completed in the above manner to ensure the accuracy of the target platform.

[0067] See also Figure 3 , Figure 3 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 3As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates and connects with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 3 Take one processor 10 as an example in

[0068] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0069] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0070] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0071] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.

[0072] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0073] Embodiments of the present disclosure also provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored as such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0074] In addition to the above computer devices and computer-readable storage media, embodiments of the present application can also be computer program products, which include computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the steps of the sound source localization method provided in any embodiment of the present application.

[0075] The computer program product can be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0076] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for compatibility between new and old platforms, characterized in that: The method is applied to a new and old platform compatible system, the system comprising a front end, a new platform and an old platform, the new platform comprising a workflow component, the workflow component being integrated with a compatibility layer, the method comprising: The front end generates an interface call request according to user input, and sends the interface call request to the workflow component; The workflow component parses the received interface call request to obtain request information, and sends the request information to the compatibility layer; The compatibility layer determines a target platform for receiving the interface call request according to the request information, and the target platform is the new platform or the old platform.

2. The method according to claim 1, characterized in that The compatibility layer determines the target platform that accepts the interface call request according to the request information, including: Determine whether there is identification information of the cloud host in the request information; The target platform is determined using a determination method corresponding to the judgment result.

3. The method according to claim 2, characterized in that The determining the target platform in a determination method corresponding to the judgment result includes: When the judgment result is that the identification information exists in the request information, the target platform is determined according to the identification information.

4. The method according to claim 2, characterized in that: The determining the target platform by adopting a determination method corresponding to the judgment result also includes: When the judgment result is that the identification information does not exist in the request information, the compatibility layer obtains the model information from the request information; The target platform is determined according to the model information.

5. The method according to claim 3 or 4, characterized in that: When the judgment result is that the identification information exists in the request information, determining the target platform according to the identification information includes: The compatibility layer determines the target model information corresponding to the identification information according to a first mapping relationship between the cloud host and the model; The compatibility layer determines the target platform corresponding to the target model information according to a second mapping relationship between the model and the platform type.

6. The method according to claim 5, characterized in that After the compatibility layer determines the target platform to receive the interface call request according to the request information, the method further includes: In the target platform, the corresponding application program interface is called based on the interface call request to perform corresponding business processing operations.

7. The method according to claim 6, characterized in that When the model information exists in the request information, after calling the corresponding application program interface based on the interface call request and performing the corresponding business processing operation, the method further includes: The compatibility layer receives the business processing result fed back by the target platform based on the interface call request; Obtaining identification information from the business processing result; The model information and the acquired identification information are stored in the first mapping relationship.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the new and old platform compatibility method according to any one of claims 1 to 7 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the new-old platform compatibility method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the new-old platform compatibility method described in any one of claims 1 to 7 are implemented.