Computer-implemented method and apparatus for maintaining legacy systems
Through the feature routing module and state synchronization module, user behavior is captured and intent is identified, enabling flexible switching between legacy systems and extended systems. This solves the problem of unstable response in the modernization of legacy systems and supports gradual upgrades and maintenance.
Patent Information
- Application Number
- CN202410264081.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2025-09-09
AI Technical Summary
When modernizing legacy systems with existing technologies, there are problems such as code refactoring making it easy for external behavior responses to change, making system repairs difficult, and requiring a lot of time and resources for maintenance.
The feature routing module is used to capture user behavior, identify user intent, and route operations to the corresponding system based on routing information so that it responds to user behavior. At the same time, the state synchronization module is used to achieve state synchronization between the legacy system and the extended system.
It realizes the independent operation and free task switching of legacy systems and extended systems, supports gradual upgrades and maintenance, reduces the instability of responses to external behaviors, and simplifies the system maintenance process.
Smart Images

Figure CN120610732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more particularly, to a computer-implemented method and apparatus for maintaining a legacy system (or also referred to as a "original system") using a feature routing module, as well as corresponding computer equipment and computer-readable storage media. Background Art
[0002] Gartner ranks seven approaches to modernizing legacy systems by ease of implementation.
[0003] 1. Encapsulation. Leverage and extend application features by encapsulating application data and functionality and providing them as services through application programming interfaces (APIs).
[0004] 2. Rehosting. Redeploying application components to other infrastructure (physical, virtual, or cloud) without modifying their code, functionality, or characteristics.
[0005] 3. Replatforming. Migrate to a new runtime platform with minimal changes to the code, but no changes to code structure, functionality, or features.
[0006] 4. Refactoring. Reorganizing and optimizing existing code (though not its external behavior) to eliminate technical debt and improve non-functional properties.
[0007] 5. Re-architect. Make substantial changes to the code to move it to the new application architecture and take advantage of new and better features.
[0008] 6. Rebuild. Redesign or rewrite application components from scratch while preserving their scope and specifications.
[0009] 7. Replace. Completely eliminate the previous application component and replace it, taking into account the new requirements and needs.
[0010] However, these existing methods have many disadvantages. For example, once the code is refactored, the response to external behavior can easily be changed and the system will not work properly. When a function needs to be modified or a new function needs to be added, it takes a long time to avoid changes in the response to existing behavior. Maintaining legacy systems requires time and resources.
[0011] Therefore, there is a need for a solution to the above-mentioned problems. Summary of the Invention
[0012] The object of the present invention is to provide a computer-implemented solution for maintaining legacy systems to at least partially solve or alleviate the above-mentioned problems, such as at least solving the problem that code changes that are easily refactored in response to external behaviors and system problems cannot be repaired in a short time.
[0013] According to a first aspect of the present invention, there is provided a computer-implemented method for maintaining a legacy system, wherein the legacy system has an extension system associated therewith, the method comprising:
[0014] Use the Eigen Routing module to perform the following steps:
[0015] capturing user behavior of operating the legacy system or the extended system;
[0016] identifying user intent based at least on the user behavior;
[0017] determining, based on the user intent and corresponding routing information, a system in the legacy system or the extended system that is responsible for responding to the user behavior, wherein the routing information defines the user intent for which the legacy system or the extended system is respectively responsible, and the feature routing module is configured with or has access to the routing information; and
[0018] An operation associated with the user behavior is routed to the determined system, so that the determined system responds to the user behavior.
[0019] In one embodiment, the extended system is configured to implement one or more of the following functions: partially the same functions as the legacy system; all the same functions as the legacy system; and additional extended functions that the legacy system does not have.
[0020] In one embodiment, the method further comprises: using a state synchronization module to implement state synchronization between the legacy system and the extended system via a storage device.
[0021] In one embodiment, the legacy system and the extended system are implemented using the same or different scripting language frameworks and / or versions and run independently of each other; and the feature routing module is implemented through an additional scripting language library.
[0022] In one embodiment, the method further includes: if it is determined that the extended system is responsible for responding to the user behavior, using the feature routing module to switch the original default routing path of the operation associated with the user behavior to the legacy system to a routing path to the extended system, so that the extended system responds to the user behavior.
[0023] In one embodiment, the method further includes using a registered listener processing module of the feature routing module to capture the user behavior when it occurs and identify the user intent.
[0024] According to a second aspect of the present invention, there is provided a computer-implemented apparatus for maintaining a legacy system, wherein the legacy system has an extension system associated therewith, the apparatus comprising:
[0025] The feature routing module is configured to perform the following steps:
[0026] capturing user behavior of operating the legacy system or the extended system;
[0027] identifying user intent based at least on the user behavior;
[0028] determining, based on the user intent and corresponding routing information, a system in the legacy system or the extended system that is responsible for responding to the user behavior, wherein the routing information defines the user intent for which the legacy system or the extended system is respectively responsible, and the feature routing module is configured with or has access to the routing information; and
[0029] An operation associated with the user behavior is routed to the determined system, so that the determined system responds to the user behavior.
[0030] In one embodiment, the apparatus further comprises: a state synchronization module configured to: implement state synchronization between the legacy system and the extended system by means of a storage device.
[0031] In one embodiment, the feature routing module is further configured to: if it is determined that the extended system is responsible for responding to the user behavior, switch the original default routing path of the operation associated with the user behavior to the legacy system to the routing path to the extended system, so that the extended system responds to the user behavior.
[0032] In one embodiment, the feature routing module further includes a registration listener processing module, which is configured to capture the user behavior when the user behavior occurs and identify the user intent.
[0033] According to a third aspect of the present invention, there is provided a computer device comprising a memory and a processor, wherein the memory stores computer instructions which, when executed by the processor, cause the method according to the first aspect of the present invention to be performed.
[0034] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium having computer instructions stored thereon, which when executed by a processor cause the method according to the first aspect of the present invention to be performed.
[0035] By utilizing the solution of the present invention, when a legacy system is expanded, the legacy system and the expanded system can be independently operated and free task switching between the two systems can be achieved by adopting a feature routing module, thereby facilitating the gradual upgrade and maintenance of the legacy system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Non-limiting and non-exhaustive embodiments of the present invention are described, by way of example, with reference to the following drawings, in which:
[0037] Figure 1 is a flow chart schematically illustrating a computer-implemented method for maintaining a legacy system according to an embodiment of the present invention.
[0038] Figure 2 A computer-implemented apparatus for maintaining a legacy system according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0039] In order to make the above and other features and advantages of the present invention more clear, the present invention is further described below with reference to the accompanying drawings. The accompanying drawings constitute a part of this application and, together with the embodiments of the present invention, are used to illustrate the present invention. For the purpose of clarity and simplicity, detailed descriptions of known functions and structures of the devices, apparatuses and / or equipment described herein will be omitted when they may obscure the subject matter of the present invention. It should be understood that the specific embodiments given herein are for the purpose of explaining to those skilled in the art and are merely illustrative and non-restrictive.
[0040] The features described herein may be embodied in different forms and should not be construed as limited to the embodiments described herein. Rather, the embodiments described herein are provided merely to illustrate some of the many possible ways to implement the devices and / or systems described herein, which will become apparent after understanding the disclosure of this application.
[0041] As used herein, the term "and / or" includes any one of the associated listed items and any combination of any two or more of the associated listed items.
[0042] The terms used herein are only used to describe various embodiments and are not intended to limit the present disclosure. Unless the context clearly indicates otherwise, "a," "an," and "the" are intended to include plural forms as well. The terms "include," "comprise," and "have" specify the presence of stated features, operations, components, elements, and / or combinations thereof, but do not preclude the presence or addition of one or more other features, operations, components, elements, and / or combinations thereof.
[0043] In the following description, many specific details are set forth to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that it is not necessary to adopt the specific details to practice the present invention. In other cases, well-known steps or operations are not described in detail to avoid obscuring the present invention.
[0044] refer to Figure 1 , a computer-implemented method 100 for maintaining a legacy system according to an embodiment of the present invention is shown. The method 100 includes steps S101-S104, which can be performed by a feature routing module (e.g., a feature routing plug-in). The legacy system has an extension system associated with it. Here, "legacy system" and "extended system" are defined relative to each other, wherein the extended system can be configured to implement one or more of the following functions: some of the same functions of the legacy system; all of the same functions of the legacy system; and additional extended functions that the legacy system does not have. During the development of the extended system, the legacy system and the extended system can coexist for a long time, or coexist for a short time and eventually the legacy system is completely replaced by the extended system. In either case, the extended system improves or extends the functionality of the legacy system, for example, performing some of the same functions but with better performance (e.g., higher efficiency, more stable system, etc.); or performing all of the same functions, with better performance for some functions, the same performance for some functions, or better performance for all functions; or, in addition to some of the same functions, these same functions can have better performance, the same performance, or some of the same performance and some of the better performance, and also perform additional extended functions not available in the legacy system. The legacy system and the extended system can be implemented using the same or different scripting languages (e.g., JavaScript Vue, JavaScript React, etc.), frameworks, and / or versions (e.g., JavaScript React 15, JavaScript React 18, etc.), and can operate independently of each other; and the feature routing module can be implemented using an additional scripting language (e.g., JavaScript) library.
[0045] In step S101, a feature routing module may be used to capture user behavior of operating the legacy system or the extended system. For example, in one embodiment, the user behavior of operating the legacy system may be a user clicking a button on a web page of the legacy system. In another embodiment, the user behavior of operating the legacy system may be a user clicking a button on a user interface of a software application.
[0046] In step S102, a feature routing module may be used to identify user intent based at least on the user behavior. Here, "user intent" may be broadly understood as the purpose of the user behavior. In one embodiment, a registered listener processing module (program) of the feature routing module may also be used to capture the user behavior and identify user intent when the user behavior occurs, for example, by monitoring global events (including event bubbling) in a web legacy system operation, or by monitoring request paths or interface requests in API calls in other legacy systems.
[0047] In step S103, a feature routing module may be used to determine the system in the legacy system or the extended system that is responsible for responding to the user behavior based on the user intent and corresponding routing information. In one embodiment, the routing information defines the information of the user intent that is respectively responsible for the legacy system or the extended system. For example, in one embodiment, the legacy system and the extended system are web systems, and the routing information may define which system is responsible for specific functions and pages. In addition, the feature routing module may be configured with built-in routing information or be able to access routing information stored separately externally. The routing information may be pre-configured or dynamically configured based on the operating status of the legacy system or the extended system. In one embodiment, the feature routing module may be configured to obtain the routing information in real time. In one embodiment, the routing information may define the user intent that is respectively responsible for the legacy system or the extended system based on, for example, the object involved in the user intent (e.g., the object operated by the user behavior, the object called by the user behavior, or the object targeted by the user behavior) and / or the purpose of the user behavior.
[0048] In step S104, a feature routing module may be used to route the operation associated with the user behavior to the determined system, so that the system determined in step S103 responds to the user behavior. For example, in one embodiment, if it is determined that the extended system is responsible for responding to the user behavior, the feature routing module may be used to switch the original default routing path of the operation associated with the user behavior to the legacy system to a routing path to the extended system, so that the extended system responds to the user behavior.
[0049] Optionally, the method 100 may further include: using a state synchronization module to achieve state synchronization between the legacy system and the extended system with the aid of a storage device. For example, in one embodiment, when one of the legacy system and the extended system responds to a certain user behavior, a certain state or data of an object associated with the user behavior changes. When the other of the legacy system and the extended system needs to call the state or data in response to another user behavior, if the called state or data is not the latest, it will cause the system to malfunction. In this case, it is necessary to use a state synchronization module to achieve state synchronization between the legacy system and the extended system.
[0050] refer to Figure 2 , shows a computer-implemented apparatus 200 for maintaining a legacy system according to an embodiment of the present invention. The apparatus 200 includes a feature routing module 201, a legacy system 202, an extended system 203, and a state synchronization module 204. The apparatus 200 uses a storage device 205 and the state synchronization module 204 to synchronize states between the legacy system 202 and the extended system 203.
[0051] The feature routing module 201 and the state synchronization module 204 can perform corresponding steps or implement corresponding functions as described above, and perform similar extensions, which will not be repeated here.
[0052] In general, the methods and apparatus for maintaining legacy systems described herein may have various variations when combined with actual application scenarios, and may accordingly have one or more of the following features or advantages:
[0053] Compatible with multiple technology frameworks, legacy systems and extended systems can be implemented using different frameworks; for example, for web applications, the legacy system uses the JavaScript Vue framework, and the extended system uses the JavaScript React framework;
[0054] Compatible with multiple technology framework versions. Legacy systems and extension systems can be implemented using different technology framework versions. For example, for web applications, the legacy system uses JavaScript React 15, while the extension system uses JavaScript React 18.
[0055] The feature routing module supports switching across multiple systems;
[0056] The feature routing module can disable obsolete features;
[0057] State synchronization module, used to synchronize states across multiple systems;
[0058] No need to change the code of the legacy system, just integrate the feature routing module and / or state synchronization module;
[0059] Ability to extend new functionality without changing legacy system code;
[0060] Ability to modify existing functionality without changing legacy system code;
[0061] Problems in the legacy system are isolated and do not affect the extended system;
[0062] Problems in the extended system are isolated and do not affect the old legacy system;
[0063] Support for implementing the same user functionality in both legacy and extended systems. The development team can use the feature routing module to decide which system the end user should enable.
[0064] It enables the gradual upgrade and replacement of legacy systems.
[0065] According to the method of the present application, the functionality can be extended and modified through limited changes to the legacy system, and the changes in response to external behaviors will be restricted to a controlled range.
[0066] It should be understood by those skilled in the art that Figure 2 The schematic diagrams shown are merely illustrative block diagrams of portions of the structure related to the solutions of the present invention and do not limit the computer device, processor, or computer program that embodies the solutions of the present invention. Specific computer devices, processors, or computer programs may include more or fewer components or modules than shown in the diagrams, or may combine or disassemble certain components or modules, or may have different arrangements of components or modules.
[0067] In one embodiment, a computer device is provided, comprising a memory and a processor, wherein the memory stores computer instructions executable by the processor, and when executed by the processor, the computer instructions instruct the processor to perform the various steps of the method of the present invention. The computer device can be broadly defined as a server, or any other electronic device having the necessary computing and / or processing capabilities. In one embodiment, the computer device can include a processor, memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the computer device can be used to provide the necessary computing, processing, and / or control capabilities. The memory of the computer device can include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. can be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface and communication interface of the computer device can be used to connect to and communicate with external devices via a network. When the computer program is executed by the processor, the various steps of the method of the present invention are performed.
[0068] The present invention can be implemented as a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the steps of the method of the present invention to be performed. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed, and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, can be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations can be performed by one or more computer devices or processors, and one or more other method steps / operations can be performed by one or more other computer devices or processors. One or more computer devices or processors can perform a single method step / operation, or perform two or more method steps / operations.
[0069] Those skilled in the art will appreciate that all or part of the operations of the method of the present invention can be performed by instructing relevant hardware such as computer equipment or processors through a computer program, and the computer program can be stored in a non-transitory computer-readable storage medium, which causes the operations of the method of the present invention to be performed when the computer program is executed. Depending on the circumstances, any reference to memory, storage, database or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc. The various technical features described above can be combined arbitrarily.
[0070] The various technical features described above can be combined arbitrarily. Although not all possible combinations of these technical features are described, any combination of these technical features should be considered to be covered by this specification as long as such combination does not conflict.
[0071] Although the present invention has been described in conjunction with the embodiments, it should be understood by those skilled in the art that the above description and the accompanying drawings are only exemplary and non-restrictive, and the present invention is not limited to the disclosed embodiments. Various modifications and variations are possible without departing from the spirit of the present invention.
Claims
1. A computer-implemented method for maintaining a legacy system, wherein the legacy system has an extension system associated therewith, the method comprising: Use the Eigen Routing module to perform the following steps: capturing user behavior of operating the legacy system or the extended system; identifying user intent based at least on the user behavior; determining, based on the user intent and corresponding routing information, a system in the legacy system or the extended system that is responsible for responding to the user behavior, wherein the routing information defines the user intent for which the legacy system or the extended system is respectively responsible, and the feature routing module is configured with the routing information or has access to the routing information; as well as An operation associated with the user behavior is routed to the determined system, so that the determined system responds to the user behavior.
2. The method according to claim 1, wherein the extended system is configured to implement one or more of the following functions: partially the same functions of the legacy system; all the same functions of the legacy system; and additional extended functions that the legacy system does not have.
3. The method according to claim 1 or 2, wherein the method further comprises: A state synchronization module is used to implement state synchronization between the legacy system and the extended system via a storage device.
4. The method according to claim 1 or 2, wherein: The legacy system and the extended system are implemented using the same or different scripting language frameworks and / or versions, and run independently of each other; and The feature routing module is implemented through an additional scripting language library.
5. The method according to claim 1 or 2, wherein the method further comprises: If it is determined that the extended system is responsible for responding to the user behavior, the feature routing module is used to switch the original default routing path of the operation associated with the user behavior to the legacy system to the routing path to the extended system, so that the extended system responds to the user behavior.
6. The method according to claim 1 or 2, wherein the method further comprises: A registered listener processing module of the feature routing module is used to capture the user behavior when the user behavior occurs and identify the user intent.
7. A computer-implemented apparatus for maintaining a legacy system, wherein the legacy system has an extension system associated therewith, the apparatus comprising: The feature routing module is configured to perform the following steps: capturing user behavior of operating the legacy system or the extended system; identifying user intent based at least on the user behavior; determining, based on the user intent and corresponding routing information, a system in the legacy system or the extended system that is responsible for responding to the user behavior, wherein the routing information defines the user intent for which the legacy system or the extended system is respectively responsible, and the feature routing module is configured with the routing information or has access to the routing information; as well as An operation associated with the user behavior is routed to the determined system, so that the determined system responds to the user behavior.
8. The apparatus according to claim 7, wherein the extended system is configured to implement one or more of the following functions: partially the same functions as the legacy system; all the same functions as the legacy system; and additional extended functions that the legacy system does not have.
9. The device according to claim 7 or 8, wherein the device further comprises: The state synchronization module is configured to: realize state synchronization between the legacy system and the extended system by means of a storage device.
10. The device according to claim 7 or 8, wherein The legacy system and the extended system are implemented using the same or different scripting language frameworks and / or versions, and run independently of each other; and The feature routing module is implemented through an additional scripting language library.
11. The apparatus according to claim 7 or 8, wherein the feature routing module is further configured to: If it is determined that the extended system is responsible for responding to the user behavior, the original default routing path of the operation associated with the user behavior to the legacy system is switched to a routing path to the extended system, so that the extended system responds to the user behavior.
12. The apparatus according to claim 7 or 8, wherein the feature routing module further comprises a registration listener processing module, wherein the registration listener processing module is configured to: The user behavior is captured when it occurs and the user intent is identified.
13. A computer device comprising a memory and a processor, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the method according to any one of claims 1 to 6 is performed.
14. A non-transitory computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, cause the method according to any one of claims 1 to 6 to be performed.
Citation Information
Patent Citations
Dynamic micro-service calling method and device of multi-language cloud compiling
CN106227611A
Data processing method and device based on micro front end, electronic equipment and storage medium
CN115314482A
Shunting method and system for synchronous operation of new system and old system, electronic equipment and medium
CN115361452A
Extended function implementation method and device, computer equipment and storage medium
CN115756900A
Distributed service registration and consensus mechanism-based scheduling method and system
CN116418812A
