Software future operation guarantee method based on environment copying

Through environmental reproduction technology, the operating environment of historical software is preserved, and the problem of historical software disappearance is solved, the stable operation and value preservation of software are achieved, ensuring that future generations can experience these software.

CN119225796APending Publication Date: 2024-12-31CHONGQING LIANZHONG INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411190582.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Historical software disappears with the company's bankruptcy or the service stops, and cannot effectively guarantee its future operation and preservation value.

Method used

Adopting an environment-based replica method, the software running environment is saved through comprehensive snapshots and cloning, including operating system, hardware configuration, network settings, establishing timeline indexes, simulating hardware and network environments, and isolating and encapsulating them to ensure that the software is different. Seamless transition and stable operation between hardware and operating systems.

Benefits of technology

It has achieved stable operation and preservation of historical software, ensuring that the software can operate and migrate normally in the future, crossing the gap of technological change, and allowing future generations to experience and understand the once brilliant software products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225796A_ABST
    Figure CN119225796A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly discloses a software future operation guarantee method based on environment duplicating, which comprises the following steps: S1, carrying out comprehensive snapshot on the whole software operation environment at preset time intervals, and cloning and storing snapshots; the snapshot comprises the state of an operating system, hardware configuration information, installed software and versions thereof, and network settings; s2, establishing a time axis index for each stored environment snapshot, and marking a time point and a technical stage corresponding to each snapshot; s3, creating a hardware simulation layer, and interpreting and simulating the stored hardware configuration information; s4, migration and adaptation are carried out according to the operation system snapshots in different periods; s5, managing different versions of the software; s6, recording network environment information, and simulating a current network environment; the network environment information comprises a topological structure, IP distribution and a routing rule; and S7, isolating and packaging the cloned environment. By adopting the technical scheme, the smooth operation of the historical software can be effectively ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for ensuring future operation of software based on environment replication. Background Art

[0002] Since the birth of computers, especially the rise of the Internet, there have been countless popular software and Internet platforms in history. Take China as an example, there were once well-known playback software such as Baofeng Video Player and Qianqian Jingting; Internet products such as Kaixin, Renren, and Xiaonei; as well as game products such as Lianzhong World and Audition; and well-known forums such as Tianya Community. These products were not only extremely popular at the time, but also had a profound impact on society.

[0003] However, unlike physical products, these software or Internet platforms often disappear from the world and become the dust of history once the companies behind them go bankrupt or the services are stopped. Although some traces of them can still be found through some historical news or design documents and system screenshots, these products, as an important part of social life at the time, should not be forgotten. Today's young people should also have the opportunity to experience and understand these once glorious software products. Including the popular Douyin, Kuaishou, iQiyi, King of Glory and other software, they may disappear without a trace in a few years and eventually become part of the topic of history.

[0004] Therefore, there is a need for a method to ensure the future operation of software based on environment replication that can effectively ensure the smooth operation of historical software. Summary of the invention

[0005] The present invention provides a method for ensuring future operation of software based on environment replication, which can effectively ensure the smooth operation of historical software.

[0006] In order to solve the above technical problems, this application provides the following technical solutions:

[0007] A method for ensuring future operation of software based on environment replication, including the following contents:

[0008] S1. Take a comprehensive snapshot of the entire environment where the software runs at a preset time and clone and store the snapshot; the snapshot includes the status of the operating system, hardware configuration information, installed software and its version, and network settings;

[0009] S2. Create a timeline index for each saved environment snapshot, marking the time point and technical stage corresponding to each snapshot;

[0010] S3, create a hardware simulation layer to interpret and simulate the saved hardware configuration information;

[0011] S4. Migrate and adapt operating system snapshots from different periods.

[0012] S5. Different versions of management software;

[0013] S6. Record network environment information and simulate the network environment at that time; the network environment information includes topology structure, IP allocation, and routing rules;

[0014] S7. Isolate and encapsulate the cloned environment.

[0015] Further, the S1 specifically includes:

[0016] Environment snapshot:

[0017] S111, collecting core files, registry information, system service status and configuration of the operating system;

[0018] Get detailed information about the hardware, including CPU model, number of cores, frequency, memory size, type and speed, hard disk model, capacity and partition information, graphics card model and driver version;

[0019] Record network configuration, including IP address, subnet mask, gateway, DNS server, and type and settings of network connection;

[0020] Captures the list of installed software, version numbers, installation paths, and configuration files;

[0021] S112, record the current running process of the system, the startup status of the service and the resource usage; save the user's account information, permission settings and personalized configuration; capture the current system environment variables and system path settings;

[0022] S113. Add a timestamp to each snapshot to identify the time point when it was created, and assign a unique identifier to each snapshot;

[0023] Environment cloning:

[0024] S121, based on the collected snapshot data, complete bit-by-bit copying is performed, and for the hardware information, a virtual hardware description file is created to simulate the same hardware environment;

[0025] S122, storing the cloned environment data in an independent storage area, isolating it from the currently running system and other data;

[0026] S123. Establish a version control system to perform version tagging and management on each cloned environment, and record the changes and creation reasons of each version;

[0027] S124. After the cloning is completed, a verification test is performed to ensure that the cloned environment can be started and run normally, including checking whether the software functions are complete, whether the hardware simulation is accurate, and whether the network connection is normal.

[0028] Further, the S2 specifically includes:

[0029] S201, determine the time granularity and the accuracy of the time axis index;

[0030] S202, determining a data structure for storing time axis index information, where the data structure includes an ordered array, a linked list, a tree structure, or a hash table;

[0031] S203, when performing environment snapshot and clone operations, create corresponding timeline index nodes; each index node includes a timestamp and a pointer or identifier pointing to the corresponding environment snapshot or clone data;

[0032] S204, designing a query interface to retrieve relevant environmental data according to an input time range;

[0033] S205, adding relevant metadata to each timeline index node, where the metadata includes the technical background, important events, and software version change instructions at that time;

[0034] S206. Develop a visualization tool to display the timeline index in a graphical manner, wherein the graphical representation includes a line chart, a bar chart, or a timeline view;

[0035] S207: compress the time axis data to reduce storage space usage.

[0036] Further, the S3 specifically includes:

[0037] S301. Identify the interface and specifications of the hardware to be simulated, including the processor instruction set, memory access mode, and I / O port operation, and develop a document to describe the behavior and characteristics of the interface;

[0038] S302, for different processor architectures, design an instruction translation module to convert the instructions of the current processor into an instruction format that can be understood by the historical hardware;

[0039] S303, simulating the current memory layout and access rules, including the division of memory address space, read and write permission control, and processing memory paging and cache mechanisms;

[0040] S304, creating a simulation driver for various I / O devices to simulate the interrupt request, data transmission and response mechanism of the I / O devices;

[0041] S305, establishing a performance model to simulate the performance of the current hardware, including clock frequency, bus speed, and cache hit rate;

[0042] S306, identifying the hardware configuration to be simulated, and performing corresponding adaptation and adjustment;

[0043] S307. Simulate hardware errors and abnormal conditions, including memory read and write errors and device failures.

[0044] Further, the S4 specifically includes:

[0045] S401, analyzing the core features of the snapshotted operating system, including process management, memory management, file system, and device driver, and analyzing the kernel architecture and system call interface of the snapshotted operating system;

[0046] S402, evaluating the version, architecture, and features of the target operating system to determine differences and compatibility issues with the snapshot operating system;

[0047] S403, completing the migration of user data, including user documents, pictures, music, videos, as well as browser bookmarks, email data, and application settings;

[0048] Complete system configuration data migration, including network configuration, user account information, group policy settings, and system environment variables;

[0049] Complete application data migration, including database files and configuration files;

[0050] S404, identifying the hardware driver used in the snapshot operating system, and finding an alternative in the target operating system, and if there is no hardware device with a directly available driver, using a universal driver or adapting through a kernel module;

[0051] S405, optimizing and adjusting kernel parameters according to the characteristics of the target operating system and the hardware environment, including memory allocation strategy, process scheduling algorithm, and disk cache settings;

[0052] S406, migrating key system services in the snapshot operating system, including printing services, file sharing services, and remote access services, to the target operating system;

[0053] S407, testing the compatibility of the migrated application in the target operating system, and running incompatible applications using a virtual machine, container technology, or compatibility tools;

[0054] S408. Migrate the security policies in the snapshot operating system, including user permission settings, access control lists, and firewall rules, to the target operating system.

[0055] Further, the S5 specifically includes:

[0056] S501. Formulate version naming rules and perform version naming;

[0057] S502, select a version control system, establish a version library, and store the source code, documents, and related configuration files of the software;

[0058] S503. Define different types of branches, including main branches for storing stable release versions, development branches for daily development, and feature branches for the development of specific functions, and formulate strategies and processes for branch creation, merging, and deletion;

[0059] S504. Record the changes made each time the code is submitted, including the modified functional modules, solved problems, and new features;

[0060] S505. Define the standards and processes for software release, including code review, test passing, and document update; create release notes for each release, including new feature introductions, known issue fixes, and compatibility notes;

[0061] S506, save the complete code and related files of each released version, the related files include executable files and installation packages; establish a version archive library, and classify and store them according to the version number;

[0062] S507. Clarify the version requirements of other libraries, frameworks, and components that the software depends on. When upgrading the version, evaluate the compatibility of the dependencies and update or resolve dependency conflicts.

[0063] S508. Develop a process and method for rolling back to the previous stable version.

[0064] Further, the S6 specifically includes:

[0065] S601, draw a topology diagram of the current network, create a corresponding topology model, and define parameters between devices, including link bandwidth, delay, and packet loss rate;

[0066] S602, record the IP address range and subnet mask used in the current network, including statically allocated and dynamically allocated addresses, and set the IP address and subnet according to the same rules in the simulation environment;

[0067] S603, network protocol simulation: simulate common network protocols, including TCP / IP, UDP, and ICMP, including the construction of protocol headers, encapsulation and decapsulation of data packets, and simulate the handshake process, data transmission mechanism, and error handling method of the protocol;

[0068] S604, simulating network services, including DNS services, DHCP services, Web services, and mail services, configuring corresponding service parameters and response mechanisms, and simulating service request and response processes, including domain name resolution, IP address allocation, web page content provision, and mail sending and receiving;

[0069] S605, analyzing the traffic characteristics in the current network, including the size, type and time distribution of the traffic, and using a traffic generation tool to generate simulated traffic that meets the traffic characteristics;

[0070] S606. Copy the firewall rules, access control lists, and configurations of intrusion detection / prevention systems in the current network, simulate network attacks and intrusion behaviors, and test the effectiveness of security mechanisms;

[0071] S607, simulate wireless network, including simulated signal strength, frequency band, encryption method and roaming mechanism;

[0072] S608, virtual LAN simulation, define VLAN division and membership, configure routing and communication rules between VLANs, and test data isolation and access control between different VLANs.

[0073] Further, the S7 specifically includes:

[0074] S701, Resource Isolation Memory Isolation: Allocate independent memory space for the cloned environment and use memory management technology to prevent out-of-bounds memory access;

[0075] CPU resource isolation: Through process scheduling and thread management, the use of CPU resources in the clone environment is limited;

[0076] Storage isolation: Allocate separate disk partitions or volumes for data storage of the clone environment to isolate its file system from the host system;

[0077] S702, creating an independent process or thread to run the cloned environment, making it independent from other processes and threads of the host system;

[0078] S703. Allocate an independent IP address segment and network port range for the clone environment, and use network virtualization technology to isolate its network traffic from the host network; configure firewall rules to limit the communication between the clone environment and the external network;

[0079] S704, monitoring and filtering the system calls of the clone environment to the operating system kernel;

[0080] S705, using container packaging, virtual machine packaging or software packaging;

[0081] Containerization: Use container technology to package the clone environment and its dependencies into an independent container;

[0082] Virtual machine encapsulation: Create a complete virtual computer system through virtual machine technology and run the cloned environment in the virtual machine;

[0083] Software packaging: Package the relevant components and configurations of the cloned environment into an installable software package, which is then installed and deployed when needed.

[0084] S706, access control; set an access password or key for the clone environment to allow authorized users or programs to access and start the environment; define the operation permissions of different users or roles on the clone environment, including read-only access, read-write access, and execution permissions.

[0085] This solution completely saves all the elements required for the current software to run through comprehensive environment snapshots and cloning. Establishing an accurate timeline index facilitates tracing and restoring the environment status of a specific period. The careful design of the hardware simulation layer can reproduce the current hardware characteristics on future hardware. Operating system migration and adaptation can ensure seamless transition of software between different operating system versions. Effective software version management ensures software iteration and compatibility. The network conditions at the time are restored through accurate network environment simulation. The use of isolation and encapsulation ensures the independence and security of the environment.

[0086] In summary, this solution fully considers the changing factors at multiple levels such as hardware, operating system, and network. Through precise simulation, effective migration adaptation, and rigorous isolation encapsulation, it can restore and retain the complete environment required for the current software to the greatest extent, and can achieve stable operation of the current software in the future. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 The present invention is a flowchart of an embodiment of a method for ensuring future operation of software based on environment replication. DETAILED DESCRIPTION

[0088] The following is further described in detail through specific implementation methods:

[0089] Example

[0090] like Figure 1 As shown, a method for ensuring future operation of software based on environment replication in this embodiment includes the following contents:

[0091] S1. Create an environment snapshot and clone it

[0092] Take a comprehensive snapshot of the entire environment where the software runs at preset intervals, including the status of the operating system, hardware configuration information, installed software and its version, network settings, etc. Store the snapshot in a format that can be saved and restored, such as creating a dedicated image file.

[0093] Specifically include:

[0094] Environment snapshot:

[0095] S111. Data collection: collecting operating system core files, registry information, system service status and configuration.

[0096] Get detailed information about the hardware, including CPU model, number of cores, frequency, memory size, type and speed, hard disk model, capacity and partition information, graphics card model and driver version, etc.

[0097] Record the network configuration, including IP address, subnet mask, gateway, DNS server, and the type of network connection (wired, wireless) and related settings.

[0098] Captures the list of installed software, version numbers, installation paths, and configuration files.

[0099] S112, status record, record the current running process of the system, the startup status of the service and the resource usage. Save the user's account information, permission settings and personalized configuration. Capture the current system environment variables and system path settings.

[0100] S113, timestamp and identification, add an accurate timestamp to each snapshot to clearly identify the time point when it was created. At the same time, give each snapshot a unique identifier to facilitate subsequent management and reference.

[0101] Environment cloning:

[0102] S121, complete copy, based on the collected snapshot data, complete bit-by-bit copy is performed to ensure that all data including hidden files, system files and temporary files are accurately copied. For hardware information, a virtual hardware description file is created to simulate the same hardware environment.

[0103] S122. Isolate storage: Store the cloned environment data in an independent and secure storage area, separate from the currently running system and other data, to prevent accidental modification or deletion. You can use a dedicated storage server or encrypted storage media.

[0104] S123. Version control: Establish a version control system to version-mark and manage each cloned environment. Record the changes and creation reasons of each version to facilitate backtracking and comparison of differences between different versions.

[0105] S124, verification and testing, after completing the cloning, conduct a comprehensive verification test to ensure that the cloned environment can start and run normally. Check whether the software functions are complete, whether the hardware simulation is accurate, whether the network connection is normal, etc. For example, suppose that at a certain point in time, the system is running an important business software and has performed a series of personalized configurations. Taking an environmental snapshot at this time will not only save the files and configurations of the software itself, but also include various temporary files and cached data of the system at that time, all of which may affect the normal operation of the software. For another example, for the cloning of hardware information, it may be necessary to simulate specific hardware interrupt mechanisms and DMA transfer modes to ensure that the hardware behavior at that time can be accurately reproduced in the future environment.

[0106] S2. Create a timeline index

[0107] Create a timeline index for each saved environment snapshot, clearly marking the time point and technical stage corresponding to each snapshot. Specifically including:

[0108] S201. Determine the time granularity and the accuracy of the time axis index. For example, the time interval may be divided into days, hours, minutes or even seconds.

[0109] S202, data structure design, select a suitable data structure to store timeline index information, such as using an ordered array, linked list, tree structure (such as binary search tree, B-tree) or hash table, etc. Each index node should contain a timestamp and a pointer or identifier pointing to the corresponding environment snapshot or clone data.

[0110] S203, index creation and update, when performing environment snapshot and clone operations, create the corresponding timeline index node at the same time and insert it into the correct position. If there are operations such as modification or deletion of existing snapshots or clones, update the timeline index in time to maintain consistency.

[0111] S204, time range query support, design a query interface to allow users to quickly retrieve relevant environmental data according to a specific time range. Binary search, traversal and other algorithms can be used to quickly locate nodes that meet the conditions in the timeline index.

[0112] S205, metadata association adds relevant metadata to each timeline index node, such as the technical background at that time, important events, software version change instructions, etc. This helps to better understand and explain the environmental status at a specific time point.

[0113] S206. Visualization: Develop visualization tools to display the timeline index in a graphical way, so that users can intuitively view and understand the change process of the environment. Line charts, bar charts, or timeline views can be used.

[0114] S207, data compression and optimization, for long-term timeline data, data compression technology is used to reduce storage space usage without affecting query performance. For example, compressed storage of repeated metadata, or differential encoding of timestamps. For example, if we use hours as the time granularity and take an environmental snapshot at 10 o'clock on August 7, 2024, a node will be created in the timeline index with a timestamp of 2024-08-0710:00:00, and it will be associated with the corresponding snapshot data storage location and related metadata. For another example, when a user wants to query the environmental status between 12:00 on August 6, 2024 and 18:00 on August 7, the system can quickly filter out all nodes within this period through the timeline index and return relevant environmental data.

[0115] S3, Hardware Simulation

[0116] Create a hardware simulation layer to interpret and simulate the saved hardware configuration information so that it can run in a similar way on future hardware. Specifically:

[0117] S301. Define the hardware interface and specifications, and clarify the interface and specifications of the hardware to be simulated, including processor instruction set, memory access mode, I / O port operation, etc. Develop detailed documents to describe the behavior and characteristics of these interfaces.

[0118] S302, instruction translation and conversion, for different processor architectures, an instruction translation module is designed to convert the instructions of the current processor into an instruction format that can be understood by the historical hardware.

[0119] S303, memory management simulation, to simulate the current memory layout and access rules, including the division of memory address space, read and write permission control, etc., and handle complex memory management features such as memory paging and cache mechanism.

[0120] S304, I / O device simulation, creating simulation drivers for various I / O devices, such as keyboard, mouse, display, printer, etc. Simulating the interrupt request, data transmission and response mechanism of the device.

[0121] S305, performance simulation, taking into account the performance characteristics of the hardware, such as the processor's clock frequency, bus speed, cache hit rate, etc., and approximately simulating the performance of the current hardware by establishing a performance model.

[0122] S306, hardware configuration detection and adaptation design detection mechanism, which can automatically identify the hardware configuration to be simulated and perform corresponding adaptation and adjustment.

[0123] S307, error handling and exception simulation, simulate the possible errors and exceptions of the hardware, such as memory read and write errors, device failures, etc., and provide corresponding processing mechanisms. For example, if you want to simulate a specific model of graphics card, you need to have a deep understanding of its working principle and technical specifications. Including the number of pixel rendering pipelines, the characteristics of the texture processing unit, etc., and then approximate these functions through software algorithms in the simulation layer. For another example, for memory simulation, the speed differences and timing requirements of different memory types (such as DDR3, DDR4, etc.) must be taken into account to accurately simulate the read and write behavior of the memory.

[0124] S4. Operating system migration and adaptation

[0125] Based on the snapshots of operating systems at different times, we study their differences and carry out necessary migration and adaptation work. Specifically, we include:

[0126] S401, operating system feature analysis, analyze the core features of the snapshot operating system, including the working principles and mechanisms of process management, memory management, file system, device driver, etc. Analyze the kernel architecture, system call interface, and functions of various services and daemons of the snapshot operating system.

[0127] S402, Target environment assessment, conduct a comprehensive assessment of the version, architecture and features of the target operating system, determine the differences and compatibility issues with the snapshot operating system, and analyze the hardware support, kernel optimization, security mechanism and new functional features of the target operating system.

[0128] S403, data migration, completing user data migration, including user documents, pictures, music, videos and other personal files, as well as browser bookmarks, email data, application settings, etc.

[0129] Complete system configuration data migration, including network configuration, user account information, group policy settings, system environment variables, etc.

[0130] Complete application data migration. For some key application data, such as database files and configuration files, ensure that they are fully migrated and can be used normally in the new environment.

[0131] S404, driver adaptation, identifying the hardware driver used in the snapshot operating system, and finding alternatives in the target operating system or redeveloping the driver. For hardware devices that do not have a directly available driver, it is necessary to use a universal driver or adapt through a kernel module.

[0132] S405, kernel parameter adjustment, optimize and adjust kernel parameters according to the characteristics of the target operating system and the hardware environment, such as memory allocation strategy, process scheduling algorithm, disk cache setting, etc. Ensure that the adjustment of kernel parameters will not affect the stability and performance of the system.

[0133] S406: Migrate system services, migrate key system services in the snapshot operating system, such as printing services, file sharing services, remote access services, etc., to the target operating system, and modify and adapt the service configuration accordingly to meet the requirements of the new environment.

[0134] S407, application compatibility processing, testing the compatibility of migrated applications in the target operating system, and finding alternatives or making modifications to incompatible applications. It is necessary to use virtual machines, container technology or compatibility tools to run some old applications.

[0135] S408: Migrate security policies, such as user permission settings, access control lists, and firewall rules in the snapshot operating system to the target operating system. Ensure that the security mechanism of the target operating system can meet the original security requirements, and make necessary enhancements based on the characteristics of the target operating system.

[0136] For example, when migrating from the snapshot operating system Windows 7 to the target operating system Windows 11, you need to pay attention to the higher hardware requirements of Windows 11, and you may need to update the graphics driver to support new graphics features. For another example, when migrating a Linux server from an older distribution (such as CentOS 6) to a newer version (such as CentOS 8), you may need to recompile some kernel modules to adapt to the new kernel architecture.

[0137] S5. Software version management

[0138] Strictly manage different versions of the software to ensure that the corresponding software version can be accurately loaded when the environment of a specific period needs to be restored.

[0139] S501. Version identification and naming. Establish clear and meaningful version naming rules, such as using the format of major version number.minor version number.revision number (such as 1.2.3). Give each version a unique identifier, such as a digital code, date plus serial number, etc.

[0140] S502. Version control tool: Select a suitable version control system, such as Git, SVN, etc. Establish a version library to store the software source code, documents and related configuration files.

[0141] S503. Branch management: define different types of branches, such as master / main for stable releases, development for daily development, and feature branches for specific features. Develop strategies and processes for creating, merging, and deleting branches.

[0142] S504, Change log, requires developers to describe the changes made in detail each time they submit code, including modified functional modules, solved problems, new features, etc. Ensure that the change log is accurate and clear to facilitate subsequent tracking and understanding.

[0143] S505, version release process, defines the standards and processes for software release, including code review, test passing, document update, etc. Create release notes for each release version, including new feature introduction, known issue fixes, compatibility description, etc.

[0144] S506. Version archive, save the complete code and related files of each released version, including executable files, installation packages, etc. Establish a version archive library, classify and store by version number, and facilitate backtracking and extraction at any time.

[0145] S507. Dependency management specifies the version requirements of other libraries, frameworks, and components that the software depends on. When upgrading versions, evaluate the compatibility of dependencies and update or resolve dependency conflicts in a timely manner.

[0146] S508, rollback mechanism, formulate processes and methods to quickly roll back to the last stable version when problems occur in the new version. Ensure the integrity and consistency of data during the rollback process. For example, if a mobile application is being developed, after version 1.0 is released, a feature branch "payment_feature" is created to add a new payment function. After the development is completed and the test passes, the branch is merged into the development branch for integration testing, and then merged into the main branch to release version 1.1, and the usage and precautions of the new payment function are described in detail in the release notes. For example, when serious performance problems are found in version 2.0, it can be quickly rolled back to version 1.1 to continue providing services based on archives and records, and personnel can be organized to solve the problems of version 2.0.

[0147] S6. Network environment simulation

[0148] Record the network environment information in detail, including topology, IP allocation, routing rules, etc., so that the network environment at that time can be accurately simulated in the future.

[0149] S601. Network topology simulation: Draw the topology diagram of the current network, including the connection methods and locations of network devices such as routers, switches, and firewalls. Use simulation software or tools to create a corresponding topology model and define parameters such as link bandwidth, latency, and packet loss rate between devices.

[0150] S602, IP address allocation and subnet division, record the IP address range and subnet mask used in the current network, including statically allocated and dynamically allocated addresses. Set IP addresses and subnets according to the same rules in the simulation environment to ensure the accuracy of network communication.

[0151] S603, network protocol simulation, accurately simulates commonly used network protocols such as TCP / IP, UDP, ICMP, etc., including the construction of protocol headers, encapsulation and decapsulation of data packets, and simulates the handshake process, data transmission mechanism and error handling method of the protocol.

[0152] S604: Simulate network services, such as DNS services, DHCP services, Web services, and mail services, and configure corresponding service parameters and response mechanisms. Simulate the request and response process of services, including domain name resolution, IP address allocation, web page content provision, and mail sending and receiving.

[0153] S605, network traffic simulation, analyzing the traffic characteristics in the current network, including the size, type (such as video streaming, file downloading, web browsing, etc.) and time distribution of the traffic. Use traffic generation tools to generate simulated traffic that meets these characteristics to test the performance and stability of the network.

[0154] S606, network security settings simulation, copy the firewall rules, access control list (ACL), intrusion detection / prevention system (IDS / IPS) configuration in the current network. Simulate network attacks and intrusion behaviors to test the effectiveness of security mechanisms.

[0155] S607. Wireless network simulation (if applicable): For wireless networks, simulate signal strength, frequency band, encryption method and roaming mechanism. Consider the impact of wireless client mobility and handover process on network performance.

[0156] S608, Virtual Local Area Network (VLAN) simulation (if applicable)

[0157] Define the division and membership of VLANs, and configure the routing and communication rules between VLANs. Test data isolation and access control between different VLANs. For example, suppose there is a web server in the current network with an IP address of 192.168.1.10 and port 80. In the simulation environment, the same parameters should be set accurately, and the process of users accessing the server from different clients (with different IP addresses and network delays) should be simulated. For another example, for an enterprise network with multiple branches connected via VPN, it is necessary to simulate the establishment, encryption and decryption process of VPN tunnels, as well as the routing and data transmission between different branches.

[0158] S7, Isolation and Encapsulation

[0159] Isolate and encapsulate the cloned environment to prevent it from being interfered with and affected by the target environment (i.e., future environment). For example, if at a certain period, the software depends on a specific version of the graphics driver to achieve optimal performance, we need to ensure that the driver version is fully preserved when cloning the environment, and can be correctly loaded and used when it is needed in the future. For another example, for the network environment at a specific period, if there are certain specific firewall rules or port restrictions, we must also accurately record and be able to reproduce these settings in the future.

[0160] S701. Resource Isolation Memory Isolation: Allocate independent memory space for the cloned environment to ensure that its memory operations do not affect the normal operation of other environments or systems. Use memory management technologies, such as virtual memory and memory protection mechanisms, to prevent out-of-bounds memory access.

[0161] CPU resource isolation: Through process scheduling and thread management, the clone environment's use of CPU resources is limited to prevent excessive CPU usage that may cause performance degradation of other tasks. You can use CPU affinity settings to bind specific processes or threads to specified CPU cores.

[0162] Storage isolation: Allocate separate disk partitions or volumes for the data storage of the clone environment, or use container technology to isolate its file system from the host system. This prevents data confusion and misoperation.

[0163] S702, process and thread isolation, create independent processes or threads to run the cloned environment, and make it independent of other processes and threads of the host system. Through the process and thread management mechanism of the operating system, ensure that they do not interfere with each other. For multi-threaded applications, use thread synchronization mechanisms (such as mutexes, semaphores, etc.) to ensure coordination between threads within the cloned environment and avoid conflicts with external threads.

[0164] S703, Network isolation: Assign independent IP address segments and network port ranges to the clone environment, and use network virtualization technologies (such as VLAN, VPN, etc.) to isolate its network traffic from the host network. Configure firewall rules to limit the communication between the clone environment and the external network, allowing only necessary network connections to prevent potential network attacks and data leaks.

[0165] S704, system call isolation, monitoring and filtering the system calls of the clone environment to the operating system kernel, allowing only legal and necessary system operations. Prevent malicious or erroneous system calls in the clone environment from affecting the stability of the entire system. For some sensitive system calls, such as file system operations, device access, etc., additional permission checks and restrictions can be performed.

[0166] S705. Packaging technology, containerized packaging: Use container technology (such as Docker) to package the clone environment and its dependencies into an independent container. The container contains all necessary components such as applications, runtime environments, system libraries, etc., realizing the encapsulation and isolation of the environment.

[0167] Virtual machine encapsulation: Create a complete virtual computer system through virtual machine technology (such as VMware, VirtualBox, etc.), run the cloned environment in the virtual machine, and achieve isolation at the hardware and operating system levels.

[0168] Software packaging: Package the relevant components and configurations of the cloned environment into an installable software package, which is installed and deployed when needed to ensure its independence and integrity.

[0169] S706, access control, set an access password or key for the clone environment, and only authorized users or programs can access and start the environment. Define the operation permissions of different users or roles for the clone environment, such as read-only access, read-write access, execution permissions, etc. For example, if a Docker container is used to encapsulate the clone environment, different memory and CPU resource limits can be assigned to each container, and the container's network can be isolated from the host and other containers through Docker's network configuration. For another example, in a virtual machine environment, an independent hard disk image and network adapter can be set for the virtual machine, and the virtual machine management software can be used to control the virtual machine's access to host resources.

[0170] The solution of this embodiment includes key steps such as migration and adaptation, implementation of software version management, simulation of network environment, and realization of isolation and encapsulation. First, through comprehensive environment snapshots and cloning, all elements required for the current software operation are completely saved. Then, an accurate timeline index is established to facilitate tracing and restoring the environmental status of a specific period. The careful design of the hardware simulation layer can reproduce the current hardware characteristics on future hardware. Operating system migration and adaptation ensure seamless transition of software between different operating system versions. Effective software version management ensures software iteration and compatibility. Accurate network environment simulation restores the network conditions at the time. Isolation and encapsulation ensure the independence and security of the environment.

[0171] In summary, this solution fully considers the changing factors at multiple levels such as hardware, operating system, and network. Through precise simulation, effective migration adaptation, and rigorous isolation and encapsulation, the complete environment required for the current software to run is restored and retained to the greatest extent. Using this solution, the stable operation of current software can be achieved in the future, allowing people to revisit and use current software and cross the gap of technological change. For example, a "software system museum" can be established. This museum will preserve all existing software products. Even if the companies that carry these software no longer exist in the future, future generations can still see, operate, and feel these software on this platform. This is crucial for future generations to fully feel the historical significance of the software products used by people at that time.

[0172] The above are only embodiments of the present invention. The invention is not limited to the fields involved in this implementation case. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or the priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to explain the content of the claims.

Claims

1. A method for ensuring future operation of software based on environment replication, characterized in that: It includes the following: S1. Take a comprehensive snapshot of the entire environment where the software runs at a preset time and clone and store the snapshot; the snapshot includes the status of the operating system, hardware configuration information, installed software and its version, and network settings; S2. Create a timeline index for each saved environment snapshot, marking the time point and technical stage corresponding to each snapshot; S3, create a hardware simulation layer to interpret and simulate the saved hardware configuration information; S4. Migrate and adapt operating system snapshots from different periods. S5. Different versions of management software; S6. Record network environment information and simulate the network environment at that time; the network environment information includes topology structure, IP allocation, and routing rules; S7. Isolate and encapsulate the cloned environment.

2. The method for ensuring future operation of software based on environment replication according to claim 1, characterized in that: The S1 specifically includes: Environment snapshot: S111, collecting core files, registry information, system service status and configuration of the operating system; Get detailed information about the hardware, including CPU model, number of cores, frequency, memory size, type and speed, hard disk model, capacity and partition information, graphics card model and driver version; Record network configuration, including IP address, subnet mask, gateway, DNS server, and type and settings of network connection; Captures the list of installed software, version numbers, installation paths, and configuration files; S112, record the current running process of the system, the startup status of the service and the resource usage; save the user's account information, permission settings and personalized configuration; capture the current system environment variables and system path settings; S113. Add a timestamp to each snapshot to identify the time point when it was created, and assign a unique identifier to each snapshot; Environment cloning: S121, based on the collected snapshot data, complete bit-by-bit copying is performed, and for the hardware information, a virtual hardware description file is created to simulate the same hardware environment; S122, storing the cloned environment data in an independent storage area, isolating it from the currently running system and other data; S123. Establish a version control system to perform version tagging and management on each cloned environment, and record the changes and creation reasons of each version; S124. After the cloning is completed, a verification test is performed to ensure that the cloned environment can be started and run normally, including checking whether the software functions are complete, whether the hardware simulation is accurate, and whether the network connection is normal.

3. The method for ensuring future operation of software based on environment replication according to claim 2, characterized in that: The S2 specifically includes: S201, determine the time granularity and the accuracy of the time axis index; S202, determining a data structure for storing time axis index information, where the data structure includes an ordered array, a linked list, a tree structure, or a hash table; S203, when performing environment snapshot and clone operations, create corresponding timeline index nodes; each index node includes a timestamp and a pointer or identifier pointing to the corresponding environment snapshot or clone data; S204, designing a query interface to retrieve relevant environmental data according to an input time range; S205, adding relevant metadata to each timeline index node, where the metadata includes the technical background, important events, and software version change instructions at that time; S206. Develop a visualization tool to display the timeline index in a graphical manner, wherein the graphical representation includes a line chart, a bar chart, or a timeline view; S207: compress the time axis data to reduce storage space usage.

4. The method for ensuring future operation of software based on environment replication according to claim 3 is characterized in that: The S3 specifically includes: S301. Identify the interface and specifications of the hardware to be simulated, including the processor instruction set, memory access mode, and I / O port operation, and develop a document to describe the behavior and characteristics of the interface; S302, for different processor architectures, design an instruction translation module to convert the instructions of the current processor into an instruction format that can be understood by the historical hardware; S303, simulating the current memory layout and access rules, including the division of memory address space, read and write permission control, and processing memory paging and cache mechanisms; S304, creating a simulation driver for various I / O devices, simulating the interrupt request, data transmission and response mechanism of the I / O devices; S305, establishing a performance model to simulate the performance of the current hardware, including clock frequency, bus speed, and cache hit rate; S306, identifying the hardware configuration to be simulated, and performing corresponding adaptation and adjustment; S307. Simulate hardware errors and abnormal conditions, including memory read and write errors and device failures.

5. The method for ensuring future operation of software based on environment replication according to claim 4 is characterized in that: The S4 specifically includes: S401, analyzing the core features of the snapshotted operating system, including process management, memory management, file system, and device driver, and analyzing the kernel architecture and system call interface of the snapshotted operating system; S402, evaluating the version, architecture, and features of the target operating system to determine differences and compatibility issues with the snapshot operating system; S403, completing the migration of user data, including user documents, pictures, music, videos, as well as browser bookmarks, email data, and application settings; Complete system configuration data migration, including network configuration, user account information, group policy settings, and system environment variables; Complete application data migration, including database files and configuration files; S404, identifying the hardware driver used in the snapshot operating system, and finding an alternative in the target operating system, and if there is no hardware device with a directly available driver, using a universal driver or adapting through a kernel module; S405, optimizing and adjusting kernel parameters according to the characteristics of the target operating system and the hardware environment, including memory allocation strategy, process scheduling algorithm, and disk cache settings; S406, migrating key system services in the snapshot operating system, including printing services, file sharing services, and remote access services, to the target operating system; S407, testing the compatibility of the migrated application in the target operating system, and running incompatible applications using a virtual machine, container technology, or compatibility tools; S408. Migrate the security policies in the snapshot operating system, including user permission settings, access control lists, and firewall rules, to the target operating system.

6. The method for ensuring future operation of software based on environment replication according to claim 5 is characterized in that: The S5 specifically includes: S501. Formulate version naming rules and perform version naming; S502, select a version control system, establish a version library, and store the source code, documents, and related configuration files of the software; S503. Define different types of branches, including main branches for storing stable release versions, development branches for daily development, and feature branches for the development of specific functions, and formulate strategies and processes for branch creation, merging, and deletion; S504. Record the changes made each time the code is submitted, including the modified functional modules, solved problems, and new features; S505. Define the standards and processes for software release, including code review, test passing, and document update; create release notes for each release, including new feature introductions, known issue fixes, and compatibility notes; S506, save the complete code and related files of each released version, the related files include executable files and installation packages; establish a version archive library, and classify and store them according to the version number; S507. Clarify the version requirements of other libraries, frameworks, and components that the software depends on. When upgrading the version, evaluate the compatibility of the dependencies and update or resolve dependency conflicts. S508. Develop a process and method for rolling back to the previous stable version.

7. The method for ensuring future operation of software based on environment replication according to claim 6 is characterized in that: The S6 specifically includes: S601, draw a topology diagram of the current network, create a corresponding topology model, and define parameters between devices, including link bandwidth, delay, and packet loss rate; S602, record the IP address range and subnet mask used in the current network, including statically allocated and dynamically allocated addresses, and set the IP address and subnet according to the same rules in the simulation environment; S603, network protocol simulation: simulate common network protocols, including TCP / IP, UDP, and ICMP, including the construction of protocol headers, encapsulation and decapsulation of data packets, and simulate the handshake process, data transmission mechanism, and error handling method of the protocol; S604, simulating network services, including DNS services, DHCP services, Web services, and mail services, configuring corresponding service parameters and response mechanisms, and simulating service request and response processes, including domain name resolution, IP address allocation, web page content provision, and mail sending and receiving; S605, analyzing the traffic characteristics in the current network, including the size, type and time distribution of the traffic, and using a traffic generation tool to generate simulated traffic that meets the traffic characteristics; S606. Copy the firewall rules, access control lists, and configurations of intrusion detection / prevention systems in the current network, simulate network attacks and intrusion behaviors, and test the effectiveness of security mechanisms; S607, simulate wireless network, including simulated signal strength, frequency band, encryption method and roaming mechanism; S608, virtual LAN simulation, define VLAN division and membership, configure routing and communication rules between VLANs, and test data isolation and access control between different VLANs.

8. The method for ensuring future operation of software based on environment replication according to claim 7 is characterized in that: The S7 specifically includes: S701, Resource Isolation Memory Isolation: Allocate independent memory space for the cloned environment and use memory management technology to prevent out-of-bounds memory access; CPU resource isolation: Through process scheduling and thread management, the use of CPU resources in the clone environment is limited; Storage isolation: Allocate separate disk partitions or volumes for data storage of the clone environment to isolate its file system from the host system; S702, creating an independent process or thread to run the cloned environment, making it independent from other processes and threads of the host system; S703. Allocate an independent IP address segment and network port range for the clone environment, and use network virtualization technology to isolate its network traffic from the host network; configure firewall rules to limit the communication between the clone environment and the external network; S704, monitoring and filtering the system calls of the clone environment to the operating system kernel; S705, using container packaging, virtual machine packaging or software packaging; Containerization: Use container technology to package the clone environment and its dependencies into an independent container; Virtual machine encapsulation: Create a complete virtual computer system through virtual machine technology and run the cloned environment in the virtual machine; Software packaging: Package the relevant components and configurations of the cloned environment into an installable software package, which is then installed and deployed when needed. S706, access control; set an access password or key for the clone environment to allow authorized users or programs to access and start the environment; define the operation permissions of different users or roles on the clone environment, including read-only access, read-write access, and execution permissions.