Progressive reconstruction method, device and equipment based on API gateway and storage medium

The API gateway gradually replaces the old version of the module in the software system, which solves the problem of the software system reconstruction in the existing technology that the function of suspending the software system reconstruction in the existing technology is realized, and the system reconstruction and upgrade is achieved to ensure stability, reducing risks and costs.

CN119155179AInactive Publication Date: 2024-12-17LETV NEW GENERATION (BEIJING) CULTURE MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411168845.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing software system reconstruction methods require some or all functions to be suspended, resulting in high risks and costs, making it difficult to maintain system stability during maintenance and optimization.

Method used

Using a progressive reconstruction method based on API gateway, by obtaining the reconstruction priority of each preset module API, using the API gateway as a unified entrance, gradually replacing the old version of modules, controlling request traffic, and building a rollback mechanism to ensure system stability.

Benefits of technology

Reduces the risk of reconstruction, improves the maintainability and scalability of the software system, and ensures the stable operation and user experience of the system during the reconstruction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155179A_ABST
    Figure CN119155179A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a progressive reconstruction method and device based on an API gateway, equipment and a storage medium, and is applied to the technical field of software reconstruction. The method comprises the following steps: acquiring a reconstruction priority of each preset module API (Application Program Interface) of a to-be-reconstructed software system; the preset module is determined according to items and / or functions; reconstructing each preset module in the to-be-reconstructed software system step by step based on the reconstruction priority through a preset API gateway routing rule; wherein the API gateway is a unified entrance of all requests of the to-be-reconstructed software system, and is used for controlling the request traffic of the new version and the old version of each preset module, guiding the requests to the new version module corresponding to each preset module, and gradually increasing the request traffic of the new version module until the old version module is completely replaced. In this way, on the premise that stable operation of the to-be-reconstructed software system is guaranteed, the reconstruction risk is reduced, and the maintainability and expandability of the to-be-reconstructed software system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of software reconstruction technology, and specifically to a progressive reconstruction method, device, equipment and storage medium based on an API gateway. Background Art

[0002] As the scale and complexity of software systems increase, the maintenance and optimization of software systems become increasingly difficult. Currently, the reconstruction methods for software architecture often require suspending some or even all functions of the software system, resulting in higher risks and costs for the software system. Summary of the invention

[0003] The present invention provides a method, apparatus, device and storage medium for progressive reconstruction based on an API gateway.

[0004] According to a first aspect of the present disclosure, a gradual reconstruction method based on an API gateway is provided.

[0005] The method includes:

[0006] Obtaining the reconstruction priority of each preset module API of the software system to be reconstructed; the preset module is determined according to the project and / or function;

[0007] By presetting the API gateway routing rules, each preset module in the software system to be reconstructed is gradually reconstructed based on the reconstruction priority;

[0008] Among them, the API gateway is the unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the new and old versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

[0009] According to the above aspects and any possible implementation method, an implementation method is further provided, wherein the reconstruction priority is determined according to the traffic usage level of each preset module API.

[0010] According to the above aspects and any possible implementation method, an implementation method is further provided, wherein the reconstruction priority is determined according to the time consumption of each preset module API.

[0011] According to the above aspects and any possible implementation, an implementation is further provided, wherein the reconstruction priority is determined according to the importance of each preset module API.

[0012] According to the aspects described above and any possible implementation method, an implementation method is further provided, wherein each preset module corresponds to multiple reconstructed versions; and the API gateway is also used to control the request flow of different versions.

[0013] According to the aspects described above and any possible implementation method, an implementation method is further provided, wherein the API gateway is also used to track performance indicators and user feedback of the new version module.

[0014] According to the aspects described above and any possible implementation method, an implementation method is further provided, wherein the API gateway is also used to build a rollback mechanism so that each preset module can quickly switch the request back to the old version module when a problem occurs in the new version module.

[0015] According to a second aspect of the present disclosure, a progressive reconstruction device based on an API gateway is provided.

[0016] The device includes:

[0017] An acquisition module, used to acquire the reconstruction priority of each preset module API of the software system to be reconstructed; the preset module is determined according to the project and / or function;

[0018] A reconstruction module, used to gradually reconstruct each preset module in the software system to be reconstructed based on the reconstruction priority by using preset API gateway routing rules;

[0019] Among them, the API gateway is the unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the new and old versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

[0020] According to a third aspect of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.

[0021] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.

[0022] The embodiment of the present application provides a progressive reconstruction method, device, equipment and storage medium based on API gateway, which can obtain the reconstruction priority of each preset module API of the software system to be reconstructed; the preset module is determined according to the project and / or function; and then the preset API gateway routing rules are preset to gradually reconstruct each preset module in the software system to be reconstructed based on the reconstruction priority; wherein the API gateway is a unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the new and old versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced; based on this, by obtaining the reconstruction priority of each preset module API of the software system to be reconstructed determined according to the project and / or function, the reconstruction target and scope of the software system to be reconstructed are clarified, and the API gateway is used as a single entry point for all requests to provide a layer of abstraction for the software system to be reconstructed, which simplifies the interaction between the client and the backend service, and also facilitates flow control, security and monitoring management, and uses the API gateway to control flow distribution, modularly reconstructs the software system to be reconstructed, and gradually replaces the old version module, so that the reconstruction risk can be reduced and the maintainability and scalability of the software system to be reconstructed can be improved under the premise of ensuring the stable operation of the software system to be reconstructed.

[0023] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:

[0025] Figure 1 A schematic diagram showing an exemplary operating environment in which embodiments of the present disclosure can be implemented;

[0026] Figure 2 A flowchart of a progressive reconstruction method based on an API gateway according to an embodiment of the present disclosure is shown;

[0027] Figure 3 A block diagram of a progressive reconstruction device based on an API gateway according to an embodiment of the present disclosure is shown;

[0028] Figure 4 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0030] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0031] In the present disclosure, by obtaining the reconstruction priority of the API of each preset module of the software system to be reconstructed according to the project and / or function, the reconstruction goal and scope of the software system to be reconstructed are clarified, and the API gateway is used as the single entry point for all requests to provide a layer of abstraction for the software system to be reconstructed, which simplifies the interaction between the client and the back-end service, and also facilitates traffic control, security and monitoring management. The API gateway is used to control traffic distribution, and the software system to be reconstructed is modularly reconstructed, and the old version modules are gradually replaced. This can reduce the reconstruction risk and improve the maintainability and scalability of the software system to be reconstructed under the premise of ensuring the stable operation of the software system to be reconstructed.

[0032] Figure 1 A schematic diagram of an exemplary operating environment 100 in which the embodiments of the present disclosure can be implemented is shown. The operating environment 100 includes an API (Application Programming Interface) gateway 102 and a system module 104 .

[0033] In some embodiments, the API gateway 102 may include modules such as a traffic control module, a monitoring and logging module, a version management module, and an automated testing module.

[0034] Among them, the traffic control module can be used to configure the routing rules of the API gateway, that is, to set the preset API gateway routing rules, so as to flexibly control the distribution of traffic and ensure that the old and new version modules of each preset module can run in parallel. The monitoring and logging module can be used to monitor the running status of the software system to be reconstructed in real time, and record the performance data and error logs of each preset module to provide data support during the reconstruction process. The version management module can be used to manage different versions of each preset module in the software system to be reconstructed, support version switching and rollback operations, and ensure the high availability of the system after the reconstruction of the software system to be reconstructed is completed. The automated testing module can be used to perform automated testing in each reconstruction stage to ensure that the functions and performance of the new version modules of each preset module meet expectations.

[0035] In some embodiments, the API gateway device may be a hardware or software device having traffic distribution, request routing, monitoring, and rollback functions, including a processor, a memory, and a module for executing a progressive reconstruction method.

[0036] In some embodiments, the system module 104 may include old version modules of various preset modules and a corresponding plurality of new version modules, such as new version module 1 and new version module 2 .

[0037] In some embodiments, by introducing the API gateway 102 to drive the modular reconstruction and optimization strategy of each preset module in the system module 104, the existing system, that is, the software system to be reconstructed, can be gradually upgraded and transformed without interrupting the service or significantly reducing the user experience.

[0038] Specifically, determine the refactoring goals and scope, that is, clarify the problems to be solved by the software system to be refactored, the refactoring goals, and the affected scope, so as to stay focused during the refactoring process, avoid scope creep, thereby improving the pertinence and efficiency of refactoring, and reducing unnecessary workload and risks; build and configure the API gateway, that is, design and deploy an API gateway that can handle current and future traffic requirements, and use the API gateway as the single entry point for all requests, responsible for tasks such as routing, authentication, rate limiting, and monitoring. The API gateway provides an abstraction layer for the software system to be refactored, simplifies the interaction between the client and the backend service, and is also convenient for traffic control, security, and monitoring management; modular refactoring of the system, that is, divide the system into multiple independent and replaceable modules, gradually replace the old version of the modules, while keeping the rest of the system running normally, and through the API gateway, flexibly control which traffic is routed to the new version of the module, thereby improving the maintainability and scalability of the existing system, and gradually replacing the modules can also test the new modules without affecting the overall service, reducing the risks during the refactoring process; use the API gateway to control traffic distribution, that is, through the routing rules of the API gateway, control which version of the module the request is sent to. For example, in the initial stage, only a small amount of traffic can be directed to the new version, and as the testing progresses, the traffic is gradually increased. This progressive traffic migration strategy allows users to gradually verify the stability and performance of the new module without affecting most users; automated testing and real-time monitoring, that is, conduct automated testing on the new version of the module to ensure that its functions and performance meet expectations. At the same time, track the running status of the system through real-time monitoring tools, discover and solve problems in a timely manner, thereby improving the testing efficiency and accuracy, reducing human errors, and ensuring that users can quickly respond to system problems, guaranteeing the stability of the system and the user experience; fast rollback mechanism, that is, establish a fast rollback mechanism so that when problems occur in the new version of the module, it can quickly revert to the old version, ensuring the continuity and stability of the system, thereby reducing the risks during the refactoring process and ensuring that the service can be quickly restored in case of problems.

[0039] Figure 2 FIG. shows a flowchart of a progressive refactoring method 200 based on an API gateway according to an embodiment of the present disclosure. The method 200 may be executed by Figure 1 the API gateway 102 in

[0040] In block 210, obtain the refactoring priorities of the APIs of each preset module of the software system to be refactored; the preset modules are determined according to the project and / or function.

[0041] In some embodiments, the division of each preset module of the software system to be refactored may be determined according to the refactoring plan, so as to determine the modules and functions that need to be refactored. The refactoring plan may be specified according to the usage of the interfaces by old users, such as the degree of traffic usage, the time-consuming, and the importance of the interfaces.

[0042] In some embodiments, the above-mentioned reconstruction priority is determined according to the traffic usage level of each preset module API.

[0043] In some embodiments, the higher the traffic usage of the API, the higher the reconstruction priority of the corresponding module, so as to ensure that the functional modules with high user usage are reconstructed first.

[0044] In some embodiments, the above-mentioned reconstruction priority is determined according to the time consumption of each preset module API.

[0045] In some embodiments, the higher the time consumption of the API, the higher the reconstruction priority of the corresponding module, thereby ensuring that functional modules with the same user usage but corresponding software and hardware do not support each other (such as the hardware device cannot support the current updated software) are reconstructed first.

[0046] In some embodiments, the above-mentioned reconstruction priority is determined according to the importance of each preset module API.

[0047] In some embodiments, the higher the importance of the API, the higher the reconstruction priority of the corresponding module, thereby ensuring that the functional module is reconstructed first so that the front-end user cannot use the function if the interface fails to work properly.

[0048] In box 220, each preset module in the software system to be reconstructed is gradually reconstructed based on the reconstruction priority through the preset API gateway routing rules; wherein the API gateway is a unified entrance for all requests of the software system to be reconstructed, and is used to control the request flow of the old and new versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

[0049] In some embodiments, the preset API gateway routing rules can be set according to the actual usage of the user. For example, the specific API service is located according to the three parameters of mod, ctl, and act in the http request.

[0050] In some embodiments, each preset module in the software system to be reconstructed is a plurality of independent modules obtained by decomposing the system based on the reconstruction plan, so that each module can be reconstructed step by step in the future. The reconstruction process will adopt a gradual replacement method, and will guide some user requests to the new version module first based on the reconstruction priority, monitor its operation, and gradually increase the traffic of the new version until the old version is completely replaced.

[0051] For example, the software system to be reconstructed has many interfaces, which correspond to different projects. The projects include old and new versions. For the old interfaces, if you want to reconstruct them using a new language, such as GO, you can divide the system into multiple modules according to the project and reconstruct them step by step, that is, reconstruct one and put it online one by one.

[0052] In some embodiments, an API gateway is introduced as a unified entrance for all requests. By pre-setting API gateway routing rules, it is ensured that the distribution and routing of requests can be flexibly controlled. Based on the reconstruction priority, each preset module in the reconstructed software system is gradually reconstructed. Without affecting the existing user experience, the system is gradually reconstructed to ensure the consistency and continuity of the user experience, and the reconstruction will not cause interference to the user. At the same time, by gradually introducing new version modules, the high risk brought by one-time large-scale changes is avoided, and the risk of system reconstruction is reduced.

[0053] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0054] The reconstruction priority of the API of each preset module of the software system to be reconstructed can be obtained; the preset module is determined according to the project and / or function; and then the preset modules in the software system to be reconstructed are gradually reconstructed based on the reconstruction priority through the preset API gateway routing rules; wherein, the API gateway is a unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the old and new versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced; based on this, by obtaining the reconstruction priority of the API of each preset module of the software system to be reconstructed determined according to the project and / or function, the reconstruction goal and scope of the software system to be reconstructed are clarified, and the API gateway is used as a single entry point for all requests to provide a layer of abstraction for the software system to be reconstructed, which simplifies the interaction between the client and the back-end service, and also facilitates flow control, security and monitoring management, and uses the API gateway to control flow distribution, modularly reconstructs the software system to be reconstructed, and gradually replaces the old version modules, thereby reducing the reconstruction risk and improving the maintainability and scalability of the software system to be reconstructed on the premise of ensuring the stable operation of the software system to be reconstructed.

[0055] In some embodiments, each of the above-mentioned preset modules corresponds to multiple reconstructed versions; the API gateway is also used to control the request flow of different versions.

[0056] In some embodiments, multiple versions can be maintained for each module, and the request traffic of different versions can be controlled through the API gateway.

[0057] In some embodiments, the routing rules of the API gateway can be flexibly configured to support the parallel operation and gradual replacement of modules of different versions. It can flexibly adjust the reconstruction strategy according to actual needs, and through modular reconstruction and version control, the system structure can be clearer, thereby improving the maintainability and scalability of the system and facilitating subsequent maintenance and upgrades.

[0058] In some embodiments, the API gateway is also used to track performance indicators and user feedback of new version modules.

[0059] In some embodiments, comprehensive automated testing can be performed at each refactoring stage to ensure that the functionality and performance of the new version meet expectations.

[0060] In some embodiments, the performance indicators and user feedback of the new version module can be tracked in real time through the monitoring function of the API gateway.

[0061] In some embodiments, real-time monitoring and automated testing functions can detect and solve problems in a timely manner, ensure the performance and stability of new version modules, and provide data support to optimize the reconstruction process.

[0062] In some embodiments, the API gateway is also used to build a rollback mechanism so that each preset module can quickly switch the request back to the old version module when a problem occurs in the new version module.

[0063] For example, the existing environment is called the "blue" environment and the new environment is called the "green" environment, which constitutes a blue-green deployment. After the new environment is ready, all traffic is switched from the blue environment to the green environment for fast switching and simple rollback.

[0064] In some embodiments, when a problem occurs in a new version module, the request can be quickly switched back to the old version to ensure system stability and user experience.

[0065] In some embodiments, if the software system to be reconstructed is completely reconstructed and the system is stable, the rollback mechanism can be released to reduce system redundancy and thus improve system operation efficiency.

[0066] In some embodiments, when performing progressive reconstruction based on the API gateway, canary release can also be implemented, that is, releasing the new version to a small number of users, gradually expanding the user range, thereby reducing risks and gradually verifying the stability of the new version.

[0067] In some embodiments, when performing progressive reconstruction based on the API gateway, a phased rollout can also be implemented, that is, new versions are released in different time periods, and only released to a part of users each time, so as to release gradually and better control risks.

[0068] In some embodiments, when performing progressive reconstruction based on the API gateway, a service mesh can also be implemented, that is, a service mesh (such as Istio) is used to manage the communication and traffic of microservices so as to provide rich traffic management and monitoring functions suitable for the microservice architecture.

[0069] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0070] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.

[0071] Figure 3 FIG. 3 is a block diagram of an API gateway-based progressive reconstruction apparatus 300 according to an embodiment of the present disclosure. The apparatus 300 may be included in Figure 1 The API gateway 102 of the embodiment of the present invention may be implemented as the API gateway 102. Figure 3 As shown, the device 300 includes:

[0072] The acquisition module 310 is used to obtain the reconstruction priority of each preset module API of the software system to be reconstructed; the preset module is determined according to the project and / or function;

[0073] The reconstruction module 320 is used to gradually reconstruct each preset module in the software system to be reconstructed based on the reconstruction priority through the preset API gateway routing rules; wherein the API gateway is the unified entrance for all requests of the software system to be reconstructed, and is used to control the request flow of the old and new versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

[0074] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0075] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0076] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0077] Figure 4 A block diagram of an exemplary electronic device 400 capable of implementing an embodiment of the present disclosure 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 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0078] The electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in the ROM 402 or a computer program loaded from the storage unit 408 into the RAM 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O interface 405 is also connected to the bus 404.

[0079] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0080] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408.

[0081] In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the method 200 in any other appropriate manner (e.g., by means of firmware).

[0082] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0083] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0084] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).

[0086] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0087] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0088] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0089] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A progressive reconstruction method based on API gateway, characterized in that: include: Obtain the reconstruction priority of each preset module API of the software system to be reconstructed; The preset module is determined according to the project and / or function; By presetting the API gateway routing rules, each preset module in the software system to be reconstructed is gradually reconstructed based on the reconstruction priority; Among them, the API gateway is the unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the old and new versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

2. The method according to claim 1, characterized in that The reconstruction priority is determined according to the traffic usage level of each preset module API.

3. The method according to claim 1, characterized in that: The reconstruction priority is determined according to the time consumption of each preset module API.

4. The method according to claim 1, characterized in that The reconstruction priority is determined according to the importance of each preset module API.

5. The method according to any one of claims 1 to 4, characterized in that: Each preset module corresponds to multiple reconstructed versions; the API gateway is also used to control the request flow of different versions.

6. The method according to any one of claims 1 to 4, characterized in that: The API gateway is also used to track performance metrics and user feedback for new version modules.

7. The method according to any one of claims 1 to 4, characterized in that: The API gateway is also used to build a rollback mechanism so that each preset module can quickly switch the request back to the old version module when a problem occurs in the new version module.

8. A progressive reconstruction device based on API gateway, characterized in that: include: An acquisition module is used to obtain the reconstruction priority of each preset module API of the software system to be reconstructed; The preset module is determined according to the project and / or function; A reconstruction module, used to gradually reconstruct each preset module in the software system to be reconstructed based on the reconstruction priority by using preset API gateway routing rules; Among them, the API gateway is the unified entrance for all requests of the software system to be reconstructed, which is used to control the request flow of the old and new versions of each preset module, and guide the request to the new version module corresponding to each preset module, and gradually increase the request flow of the new version module until the old version module is completely replaced.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.