Cross-platform machine changing method and device supporting credential credential, equipment and storage medium
By combining GUI and CLI operations, employing national cryptographic algorithms for encryption, and supporting multiple transmission modes, this cross-platform data migration method solves the compatibility and security issues of cross-regional and cross-platform data migration, achieving an efficient and secure data migration process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KYLIN CORP
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-05
AI Technical Summary
Existing cross-platform data migration solutions are inadequate in terms of compatibility, operational complexity, and security. They are particularly prone to errors during cross-regional and cross-platform data migration, are difficult to adapt to domestic IT innovation platforms, and lack unified graphical interface support and end-to-end encryption protection.
It adopts a combination of GUI graphical user interface and CLI command line, and generates a list file to be migrated and encrypts and encapsulates data packets through unified JSON configuration and DBus communication backend. It supports online, offline and cloud relay transmission modes, and uses national cryptographic algorithms such as SM4-CBC, SM3 and SM2 to ensure data security. The target device restores data and performs system configuration and application installation according to the list file.
It achieves seamless synchronization of cross-platform data migration, lowers the operational threshold, ensures the security and integrity of data transmission, is applicable to different network environments, and meets the security requirements of the information technology innovation industry.
Smart Images

Figure CN121979458A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer system migration technology, and in particular to a method, apparatus, device and storage medium for cross-platform system switching that supports domestic IT innovation. Background Technology
[0002] Driven by the digital wave and the in-depth development of the information technology application innovation industry, domestic operating systems based on the Linux kernel (such as Kylin OS and UnionTech OS) are gradually being deployed and widely used in government, finance, energy and other fields. However, due to its open-source nature, Linux systems have fragmented distributions and diverse desktop environments. When users need to replace devices or upgrade systems, especially when switching between platforms, they often face huge data migration challenges, such as cross-regional data transfer, heterogeneous distribution package conversion, inheritance of system configurations across different operating platforms, and data migration confidentiality. Especially in the context of frequent device upgrades, users' needs for cross-device and cross-platform data migration and system environment synchronization are becoming increasingly urgent.
[0003] Existing data migration solutions suffer from compatibility issues. For example, different Linux distributions employ different package management mechanisms and desktop environments, making it difficult to achieve seamless cross-platform migration of system configurations and application data, requiring manual reconfiguration by users. Users need to combine multiple command-line tools for file synchronization or rely on specific tools from different distributions, lacking a unified entry point and automated process, resulting in fragmentation and insufficient support for graphical interfaces. Furthermore, in scenarios involving long-distance, high-volume data transmission, single-threaded TCP-based transmission tools are highly susceptible to network latency and jitter, leading to network interruptions and task failures. Existing tools and methods also lack end-to-end strong encryption and integrity verification, posing risks of data leakage and tampering during data transmission. Especially when facing cross-regional, cross-platform data migration and machine replacement requirements, the process is cumbersome and error-prone, posing a high barrier to entry for non-professional users and demanding stability and security for data transmission, making it unsuitable for various domestic IT innovation platform environments and their data requirements. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for cross-platform device replacement that supports domestic IT innovation, in order to solve the technical problems of error-prone device replacement or data migration across regions and platforms and difficulty in adapting to domestic IT innovation platforms.
[0005] In a first aspect, embodiments of the present invention provide a cross-platform device replacement method supporting domestic IT innovation, including: S110: In the device to be migrated, the user's selection operation is obtained through the GUI graphical operation interface or CLI command line, and the corresponding user data information, system configuration information and application information are selected according to the user's selection operation, generating a list file to be migrated and packaging it into a data package to be migrated. S120, depending on the network environment or user selection, transmits the data packets to be migrated from the device to be migrated to the target device through online transmission, offline transmission or cloud relay data transmission modes; S130: On the target device, the received data packet to be migrated is verified for integrity and decompressed. The user data information is restored to the corresponding path location on the target device according to the migration manifest file. The system configuration of the target device is restored according to the distribution version, desktop environment and system configuration information of the target device. The application information is installed and restored according to the preset cross-distribution dependency mapping table.
[0006] Furthermore, the method also includes: When users operate through the GUI graphical interface or CLI command line, the system parses the user's operation and converts it into standard JSON configuration. Then, it calls the DUBS interface StartMigration and broadcasts the OperationRecorded signal while recording the operation log. By listening to the OperationRecorded signal, the system synchronizes the state of the GUI operation with the CLI command line and stores all operation states in the database.
[0007] Furthermore, S110 also includes: When packaging files according to the migration list file, the data is encrypted and encapsulated to form an encrypted migration data packet. The encryption algorithm is the SM4-CBC algorithm.
[0008] Furthermore, the encryption and encapsulation of the data includes: Based on the encrypted password entered by the user, a 128-bit national cryptographic SM4 key is derived from the encrypted password entered by the user using the PBKDF2 algorithm, with an iteration count of ≥10000 times and a salt value length of 16 bytes. The SM4-CBC algorithm is used to compress and encrypt user data, system configuration information and application information to generate an encrypted compressed file. The SM3 algorithm is then used to calculate the SM3 hash value of the encrypted compressed file and generate an integrity verification file.
[0009] Furthermore, S120 includes: When the data transmission mode is online transmission, an invitation link containing IP address, timestamp and verification code information is generated by the target device. After the device to be migrated establishes a secure connection with the target device based on the invitation link, the data packet to be migrated is transmitted. When the data transmission mode is offline transmission, the data packet to be migrated and its verification file are written into the removable physical storage medium and transported. After arriving at the destination, the data packet to be migrated in the removable physical storage medium is read and stored in the target device. When the data transmission mode is cloud relay, the data packet to be migrated and its verification file are uploaded to a cloud storage server that supports national cryptographic-level HTTPS channels. Then, the target device downloads the data packet to be migrated through the cloud storage API.
[0010] Furthermore, the process of establishing a secure connection between the device to be migrated and the target device based on the invitation link includes: The device to be migrated and the target device generate a session key through SM2 key exchange. The SM4 stream key derived from the session key is then transmitted in an encrypted channel in the data packet to be migrated and its verification file.
[0011] Furthermore, S130 includes: After receiving the data packet to be migrated, the target device performs integrity verification on the large migration data packet using the SM3 algorithm, and then decompresses the data packet to be migrated to obtain user data information, system configuration information, application information, and migration manifest file; Based on the list of items to be migrated, store the user data information in the corresponding directory of the target device; Identify the desktop environment types of the device to be migrated and the target device. Based on the migration list file, convert the system configuration information according to the desktop environment type of the target device and write it to the corresponding directory. Identify the distribution versions of the device to be migrated and the target device. Based on the migration manifest file and application information, and according to the preset cross-distribution package name dependency mapping table, map the package name corresponding to the distribution version of the device to be migrated to the package name corresponding to the distribution version of the target device, and install the package according to the mapped package name.
[0012] Secondly, embodiments of the present invention provide a cross-platform device for switching devices that supports domestic IT innovation, comprising: The data encapsulation module is used to generate a list file to be migrated and package it into a data package to be migrated based on the user data information, system configuration information and application information selected by the user in the device to be migrated. The data transmission module is used to transmit data packets to be migrated from the device to be migrated to the target device according to the network environment or user selection, and through the corresponding data transmission mode. The data import module is used to verify the integrity of the received data packets to be migrated on the target device and decompress them. According to the list file to be migrated, it writes, restores and installs user data information, system configuration information and application information in the corresponding locations.
[0013] Thirdly, embodiments of the present invention provide an electronic device, including: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described method for cross-platform machine replacement that supports domestic IT innovation.
[0014] Fourthly, embodiments of the present invention provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the aforementioned cross-platform switching method supporting domestic IT innovation.
[0015] This invention provides a method, apparatus, device, storage medium, and product for cross-platform device switching supporting domestic IT innovation. The method uses both a GUI (Graphical User Interface) and a CLI (Command Line Interface) as equal entry points, and based on a unified JSON configuration and DBus communication backend, allows users to select user data, system configuration, and applications to be migrated. A JSON migration list file provides a unified description, serving as the basis for subsequent file parsing. The data is encrypted and encapsulated into a migration data packet using a complete national cryptographic algorithm chain (PBKDF2, SM4-CBC, SM3) that complies with domestic IT innovation requirements. The data packet is transmitted to the target device via online, offline, or cloud relay methods, adaptable to different network environments. On the target device, based on the received migration data packet and migration list file, user data information is returned to a designated directory. System configuration information is converted and directly set according to the target device's desktop environment. Application dependencies are installed and package names are mapped based on a cross-distribution dependency mapping table, ensuring the migrated applications can run normally on the target device. Synchronizing the GUI and CLI eliminates the functional disconnect between the graphical interface and command-line tools, lowering the operational threshold for ordinary users. By employing national cryptographic algorithms, the entire process of security protection, from key derivation and data encryption to integrity verification, is achieved. This effectively prevents data leakage and tampering during transmission and storage, meets the stringent requirements of the information technology innovation industry for independent and controllable data security, and provides reliable security guarantees for data migration in sensitive scenarios such as government affairs and finance. Attached Figure Description
[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a cross-platform device replacement method supporting domestic IT innovation as described in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the GUI interface for selecting files as described in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram illustrating the process of synchronizing GUI operations to CLI as described in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram illustrating the process of synchronizing CLI operations to the GUI as described in Embodiment 1 of the present invention; Figure 5 This is a flowchart of a cross-platform device replacement method supporting domestic IT innovation as described in Embodiment 2 of the present invention; Figure 6 This is a schematic diagram illustrating the secure connection establishment process between the device to be migrated and the target device as described in Embodiment 2 of the present invention; Figure 7 This is a schematic diagram of the structure of a cross-platform switching device supporting domestic IT innovation as described in Embodiment 3 of the present invention; Figure 8 This is a structural diagram of the electronic device described in Embodiment 4 of the present invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0018] Linux, with its open-source nature, high customization capabilities, and excellent stability, has gained widespread recognition in personal computing, software development, and server maintenance. Unlike Windows and macOS, Linux heavily relies on command-line operations and manual configuration. Therefore, when users face device replacement or data migration, they need to back up configuration files and software lists one by one to avoid compatibility issues with new devices and environments. This process is tedious, time-consuming, and prone to errors. When dealing with domestic platforms, there are also heterogeneous environment and cross-platform compatibility issues. For example, when migrating between x86_64 and ARM servers, or when multiple distributions coexist, some data may reside on CentOS while others need to be migrated to Ubuntu LTS or RHEL. Especially when the two devices are located far apart across regions, issues such as network isolation, physical carrier transportation time, transmission rate stability, and data security become particularly prominent when dealing with massive amounts of data. A suitable data migration method is needed that is compatible with different platforms, supports domestically developed platforms, supports multiple migration modes, has strong security guarantees, and is easy to operate. The following example illustrates this: Example 1 Figure 1 The cross-platform device replacement method supporting domestic IT innovation described in Embodiment 1 of this invention enables users to operate in both GUI and CLI modes. Users select data to be migrated on the device to be migrated and encrypt and encapsulate it. Depending on the network environment or the user's choice, the encapsulated data packet is transmitted to the target device via online, offline, or cloud relay. After decryption on the target device, the migrated data is restored based on the migration manifest file, distribution version, desktop environment, and dependency mapping table. Specifically, the method includes the following steps: S110 obtains the user's selection operation through the GUI graphical operation interface or CLI command line in the device to be migrated, and selects the corresponding user data information, system configuration information and application information according to the user's selection operation, generates a list file to be migrated and packages it into a data package to be migrated.
[0019] On the device to be migrated, users can select the files to be migrated through either a GUI graphical user interface or a CLI command line. The GUI interface for selecting files is as follows: Figure 2As shown, the GUI and CLI provide identical functionality. Operators and server scenarios without a graphical interface can use the CLI, while ordinary users can select files through the GUI. This flexible and efficient interaction method can meet customized data transmission needs. The GUI is implemented using the Qt framework through a front-end / back-end separation approach. To ensure functional consistency, the GUI and CLI call the same set of APIs and communicate via the DBUS bus. Furthermore, a singleton pattern is used to maintain the status of migration tasks, with each migration task's status including three steps: ready, migrating, and completed, which can be queried in real time by both the GUI and CLI.
[0020] For example, when a user migrates via the GUI, they first need to select either "Import Device" or "Export Device" in the GUI interface. The device to be migrated can then verify the target device and establish a secure connection using a QR code containing connection verification information. After establishing the connection, in the GUI interface of the device to be migrated, users can select the "User Data," "System Configuration," and "Applications" to be migrated through different windows and selectable cells. Users can also drag and drop files to select them. Clicking the "Confirm" button completes the data selection. The selected data is then compressed and packaged, generating a JSON-formatted migration manifest file (e.g., manifest.json) that records all selected files and items. During the migration process, the GUI interface also displays migration progress, error messages, and migration results. Depending on security requirements, critical system directories (such as / etc and / boot) are automatically ignored when selecting files, and only data accessible to the current user is migrated.
[0021] For example, when a user migrates via CLI, the command line format can be: kylin-migrate [mode] [operation] [parameters]; this can be done via kylin-migrate online export. --files<path1,path2> --config<config_json> --app<app1,app2> --start The above commands select user files, system configuration, and application data, and then begin the migration. Users can also use CLI commands to query what migration operations are currently available in the GUI interface, the status of each migration operation, and the specific migration content. When users perform operations using the CLI, if the current system also supports GUI interface operations, the specific migration content of the CLI operation can also be displayed on the GUI interface.
[0022] In one optional implementation of this embodiment, step S110 further includes: when packaging files according to the migration list file, encrypting and encapsulating the data to form an encrypted migration data packet, wherein the encryption algorithm is the SM4-CBC algorithm.
[0023] To ensure secure data transmission and storage, support domestic IT innovation platforms, and comply with relevant national cryptographic standards, the data files to be migrated can be encrypted and packaged during compression. The encrypted compressed package uses the tar+gzip format to ensure maximum compatibility in offline scenarios. For example, the selected data is compressed using a packaging command (e.g., tar -czfdata.tar.gz selected_files / ), and then encrypted using the SM4 encryption algorithm in CBC mode to form an encrypted data package to be migrated.
[0024] Specifically, the data encryption encapsulation includes: based on the encrypted password entered by the user, deriving a 128-bit national cryptographic SM4 key from the encrypted password entered by the user using the PBKDF2 algorithm, with an iteration count of ≥10,000 times and a salt value length of 16 bytes.
[0025] When encrypting the compressed data packet, the user is first prompted to enter an encryption password. The password rules can be set to at least 8 characters and include uppercase and lowercase letters, numbers, and symbols. Then, based on the user-entered encryption password, a key is derived using the PBKDF2 algorithm. Through ≥10,000 iterations, a salt length of 16 bytes is achieved, resulting in a 128-bit national standard SM4 key.
[0026] The SM4-CBC algorithm is used to compress and encrypt user data, system configuration information and application information to generate an encrypted compressed file. The SM3 algorithm is then used to calculate the SM3 hash value of the encrypted compressed file and generate an integrity verification file.
[0027] When encrypting data packets using SM4's CBC mode, the user-selected user data, system configuration information, and application information are first compressed into a temporary compressed package. This temporary package is then encrypted using SM4-CBC to generate an encrypted data packet to be migrated. Next, the SM3 hash value of the encrypted data packet to be migrated needs to be calculated to generate an integrity verification file. For example, the final generated data packet to be migrated is encrypted_data.pkg and its verification file migration.checksum. On the target device, after verifying data integrity, the data packet is automatically decompressed. The user's encrypted password is then input into a derived key, and decryption is performed using the corresponding national cryptographic algorithm. Finally, the data is stored and configured according to the data type being migrated.
[0028] S120, depending on the network environment or user selection, transmits the data packets to be migrated from the device to be migrated to the target device through online transmission, offline transmission, or cloud relay data transmission modes.
[0029] When transmitting data packets to be migrated, users can choose one of the following data transmission modes—online transmission, offline transmission, or cloud relay—based on their actual needs and the network environment between the device to be migrated and the target device. When the network environment between the two devices meets the requirements, the online transmission mode can be selected. First, a backend service is run on the target device to obtain the target device's IP address, timestamp, and verification code encrypted with SM3 hash. A QR code containing this information is generated. The QR code is loaded on the device to be migrated to trigger a connection request with the target device. Then, the sender and receiver generate an SM2 temporary key pair through the SM2 key exchange protocol, exchange public keys, and use the other party's public key and their own private key to calculate a session key to establish a secure transmission channel. After that, during data transmission, the session key is used to derive an SM4 stream key for encryption, ensuring that the data transmission process complies with the national cryptographic standards for domestically developed cryptographic systems.
[0030] When the network environment between the two devices does not meet the requirements, such as in network-restricted scenarios or when network isolation exists, an offline transfer mode can be selected. Based on the actual situation and needs, choose a suitable removable physical storage medium (such as a USB flash drive, external hard drive, etc.), write the generated data packet to be migrated onto this storage medium, transfer it to the target device via mail or other transportation methods, and then physically copy it to the target device. Alternatively, the data packet to be migrated can be temporarily stored in a designated directory on the local machine, and the aforementioned copying and transportation process can be performed later as needed.
[0031] When conditions permit, a cloud relay method can also be chosen. The data package to be migrated is uploaded from the device to be migrated to a cloud server for relay, and then downloaded by the target device. Cloud platforms and services supported by the vendor, such as China Electronics Cloud, Inspur Cloud, and Huawei Cloud, can be selected as cloud relay platforms to transmit the data package to be migrated through the cloud server. During cloud relay, it is necessary to ensure that the current user has a valid China Electronics Cloud account on the corresponding platform, has activated storage functionality, and has read and write permissions to the storage bucket. First, the user's account and relevant permissions need to be authenticated on the cloud platform. Then, the data storage area and bucket must be confirmed to ensure compliance with data sovereignty requirements. After the user selects the data to be migrated and packages it, an encryption password (at least 8 characters) is required. The data package to be migrated and its verification file are then uploaded to the cloud platform. On the target device, the user's account and relevant permissions also need to be authenticated on the cloud platform. The corresponding area and bucket for uploading are selected, and then the data package to be migrated is downloaded. When storing it on the target device, the user must be prompted to enter the decryption password for the corresponding encryption password. It should be noted that, to ensure data security, the cloud platform's SDK must use the HTTPS protocol at its underlying level to ensure that the transmission process complies with national cryptographic standards, and that the data transmission (network) environment is consistent with the online transmission network environment. During the migration process described above, the migration task status includes five levels: waiting, executing, successful, failed, and rolled back, with a progress percentage of 0-100%. The migration progress and results can be displayed in real-time via a GUI progress bar or CLI percentage. If the migration is successful, the system will display the number of user files migrated and a list of files, which system configurations were migrated, which applications were migrated, and their status. If the migration fails, the failed items will be displayed, and the user will be prompted whether to re-migrate.
[0032] S130: On the target device, the received data packet to be migrated is verified for integrity and decompressed. The user data information is restored to the corresponding path location on the target device according to the migration manifest file. The system configuration of the target device is restored according to the distribution version, desktop environment and system configuration information of the target device. The application information is installed and restored according to the preset cross-distribution dependency mapping table.
[0033] To ensure a smooth data import process, the target device first verifies the integrity of the data packet upon receiving it. This is done using a verification file sent simultaneously with the data packet, employing the SM3 algorithm to validate the packet's integrity. Once the integrity verification is successful, the data packet is decompressed, releasing user data, system configuration information, and application information. Next, the user data is copied to the target device's corresponding user information storage path (e.g., / home / newuser / Documents) by parsing the manifest.json file. To avoid filename conflicts, if the file already exists, the copied file is renamed (e.g., Document_copy1.txt). File permissions for the user data are automatically inherited from the current user on the target device, without retaining user attributes from the source device, thus preventing permission conflicts. The system configuration identifies the target device's distribution and desktop environment (e.g., obtained via `echo $XDG_CURRENT_DESKTOP`), and then converts and applies the system configuration information to the target device based on the configuration items in the file migration list. For example, if the source device is GNOME and the target device is KDE, the command to convert the GNOME background image path to a KDE wallpaper is: `kde-config --set Wallpaper / usr / share / wallpapers / source_background.jpg`. Keyboard shortcut mapping is implemented using a conversion table, for example, converting GNOME's... <super>L is mapped to KDE's Meta+L. Application information requires first identifying the target device's release version (e.g., by using `lsb_release -i`), then querying the cross-release dependency mapping table (either preset or dynamically updated). Based on the package names between different releases in the cross-release dependency mapping table and the release versions between the device to be migrated and the target device, the application software's package name is mapped. Finally, based on the mapping results, the software source for the target device is configured, and the corresponding application is installed.
[0034] This embodiment uses both the GUI (Graphical User Interface) and CLI (Command Line Interface) as equal entry points, and based on a unified JSON configuration and DBus communication backend, allows users to select the user data, system configuration, and applications to be migrated. A unified description is then provided using a JSON migration manifest file, providing a basis for subsequent file parsing. The data is encrypted and encapsulated into a migration data packet using a complete national cryptographic algorithm chain (PBKDF2, SM4-CBC, SM3) that complies with national cryptographic standards. The data packet is transmitted to the target device via online, offline, or cloud relay methods, adaptable to different network environments. On the target device, based on the received migration data packet and migration manifest file, user data information is returned to the designated directory. System configuration information is converted and directly set according to the target device's desktop environment. Application dependencies are installed and package names are mapped based on a cross-distribution dependency mapping table, ensuring the migrated applications can run normally on the target device. Synchronizing the GUI and CLI eliminates the functional disconnect between the graphical interface and command-line tools, lowering the operational threshold for ordinary users. By employing national cryptographic algorithms, the entire process of security protection, from key derivation and data encryption to integrity verification, is achieved. This effectively prevents data leakage and tampering during transmission and storage, meets the stringent requirements of the information technology innovation industry for independent and controllable data security, and provides reliable security guarantees for data migration in sensitive scenarios such as government affairs and finance.
[0035] Optionally, the method further includes: When users operate through the GUI graphical interface or CLI command line, the system parses the user's operation and converts it into standard JSON configuration. Then, it calls the DUBS interface StartMigration and broadcasts the OperationRecorded signal while recording the operation log. By listening to the OperationRecorded signal, the system synchronizes the state of the GUI operation with the CLI command line and stores all operation states in the database.
[0036] To ensure data and state synchronization and consistency between GUI and CLI operation modes, migration operations performed in either the GUI or CLI can be converted into standardized configuration information and executed via a unified backend service through a message bus. Changes in execution status can be broadcast through the message bus, allowing the other operation mode to update its display in real time. For example, the GUI and CLI can call the backend service through the same DBus API, such as the StartMigration scheme. When a migration request is received from the GUI or CLI, the operating system converts the frontend migration request into standardized JSON-formatted migration configuration parameters and transmits them to the DBus interface StartMigration. The backend service executes the operation and broadcasts an OperationRecorded signal carrying parameters such as task ID, status, and progress. The GUI or CLI listens for this signal and updates the interface display accordingly, ensuring that data migration operations triggered by the user on either end (GUI or CLI) are synchronized to the other end in real time. Migration task status is centered around an SQLite time-series table. The status, configuration parameters, and progress information of all migration operations are persistently stored in the SQLite database. Key fields include: task_id (unique task identifier), command (standardized operation instructions, including source / target paths, filtering conditions, etc.), status (task status: 0 for waiting, 1 for executing, 2 for success, 3 for failure, 4 for rollback), progress (progress percentage 0-100%), start_time (task start time), and end_time (task end time; records the last update time in case of failure). Status changes are broadcast bidirectionally in real-time via DBus signals. Components can actively query status using the QueryStatus scheme, meeting operation auditing requirements. It also supports querying GUI-initiated operation records via CLI and generating equivalent script commands, and supports visually displaying CLI-initiated operation status via GUI. When the GUI is unavailable, critical migrations or issues encountered during migration can be completed by directly running scripts, such as... Figure 3 , 4 As shown, Figure 3 This diagram illustrates the process of synchronizing GUI operations to the CLI. Figure 4 This diagram illustrates the process of synchronizing CLI operations to the GUI. The StartMigration interface and OperationRecorded signal mechanism achieve dual-end synchronization between the GUI and CLI, eliminating the functional disconnect between the graphical interface and command-line tools. This enables deep interoperability between the GUI and CLI, significantly lowering the operational threshold for ordinary users and providing a technical foundation for operation auditing and problem tracing, while ensuring the consistency of operational logic.
[0037] Example 2 Figure 5 This is a flowchart of a cross-platform device replacement method supporting domestic IT innovation as described in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and optimized. In this embodiment, S120 is specifically optimized as follows: When the data transmission mode is online transmission, an invitation link containing IP address, timestamp and verification code information is generated by the target device. After the device to be migrated establishes a secure connection with the target device based on the invitation link, the data packet to be migrated is transmitted. When the data transmission mode is offline transmission, the data packet to be migrated and its verification file are written into the removable physical storage medium and transported. After arriving at the destination, the data packet to be migrated in the removable physical storage medium is read and stored in the target device. When the data transmission mode is cloud relay, the data packet to be migrated and its verification file are uploaded to a cloud storage server that supports national cryptographic-level HTTPS channels. Then, the target device downloads the data packet to be migrated through the cloud storage API.
[0038] Accordingly, the cross-platform device replacement method supporting domestic IT innovation provided in this embodiment specifically includes: S210 obtains the user's selection operation through the GUI graphical operation interface or CLI command line in the device to be migrated, and selects the corresponding user data information, system configuration information and application information according to the user's selection operation, generates a list file to be migrated and packages it into a data package to be migrated.
[0039] S220: When the data transmission mode is online transmission, an invitation link containing IP address, timestamp and verification code information is generated by the target device. After the device to be migrated establishes a secure connection with the target device based on the invitation link, the data packet to be migrated is transmitted.
[0040] When selecting online transfer mode, in the GUI interface, if the current device is being imported (target device), a QR code is generated by combining the device's IP address and verification code and sent to the user. The QR code's validity period is set to 5 minutes, waiting for the export device (device to be migrated) to connect. If the current device is being exported (device to be migrated), the user is prompted to scan the QR code generated by the import device (target device). After scanning, the user will obtain the other party's IP address and verification code to establish a secure connection and transmit the data packets to be migrated. Afterwards, clicking the "OK" button starts the migration. The system will display the migration progress, the migration result, or error messages. In the CLI command line, to import the device, generate a QR code based on the IP address and verification code: `kylin-migrate online generate-qrcode --timeout 300`; to export the device, manually enter the import device's IP address and verification code: `kylin-migrateonline export --connect`.<import_ip> --code<verification_code> Then select user files, system configuration, and applications, and begin the migration: kylin-migrate online export --files<path1,path2> --config<config_json> --app<app1,app2> --start.
[0041] Specifically, the device to be migrated and the target device generate a session key through SM2 key exchange, and the SM4 stream key derived from the session key is used in the encrypted channel for the data packets to be migrated and their verification files. (migration.checksum) Transmit the data.
[0042] like Figure 6 The diagram illustrates the secure connection establishment process between the device to be migrated and the target device. When establishing a secure connection in online mode, the target device generates a one-time SM2 temporary public key and a 6-digit digital verification code. The QR code is valid for ≤5 minutes. After scanning the code, the source device generates a forward-secured session key through SM2 key exchange. For example, the target device first starts a background service listening on a fixed port 9980, uses SM2 to generate a temporary key pair and stores the private key. The public key is subsequently sent to the device to be migrated for subsequent encrypted communication. Then, a random 6-digit digital verification code is generated, hashed using the national standard SM3 cryptography, and stored. The machine's IP address and time are also recorded. The resulting JSON file is as follows: { "code": "207cf41053.....", IP address: 192.168.1.200 "timestamp": 1716350000, # Timestamp accurate to the second "expire_time": 1716350300 # Expires in 5 minutes } The above JSON is used to generate a QR code, which is then sent to the user via Kylin Mail or China Electronics Cloud SMS API. The user scans the code, enters the obtained IP address and encrypted verification code into the device to be migrated, and sends it to the target device. The target device verifies the verification code and timeout period; successful verification establishes an encrypted connection. After the connection is established, a session key is generated through SM2 key exchange: both the target device and the device to be migrated generate their own SM2 public-private key pairs, exchange public keys, and then use each other's public keys and their own private keys. The device to be migrated sends the data packet to be migrated and the integrity verification file migration.checksum. Data transmission is encrypted using an SM4 key derived from the session key, ensuring that the communication process complies with relevant national cryptographic standards for domestic IT innovation, balancing security and performance.
[0043] When the data transmission mode is offline, the data packet to be migrated and its verification file are written into the removable physical storage medium and transported. After arriving at the destination, the data packet to be migrated in the removable physical storage medium is read and stored in the target device.
[0044] When selecting offline transfer mode, in the GUI interface, if the current device is being exported, the operating system will display a data selection interface, allowing the user to customize the user files, system configurations, and applications to be migrated, followed by the selection of a storage location. Simultaneously, the operating system monitors the insertion and removal of removable physical storage devices in real time, allowing users to migrate data to this device or store data in any authorized location on the local machine for later import to another machine. Clicking the "OK" button starts the migration; the system will display the migration progress, results, or error messages. If the current device is being imported, the user needs to import the data package to be migrated. The operating system will verify the validity of the data package and then automatically perform the migration configuration. After the migration is complete, the system will display which user files were imported offline, which system configurations were modified, and which applications were installed. In the CLI command line, select user files, system configurations, and applications, and specify the storage location (local or mobile device): `kylin-migrate offline export --files`<path1,path2> --config<config_json> --app<app1,app2> --output<storage_path> --start; Simultaneously monitors mobile device insertion and removal (automatically detects mount points): kylin-migrate offline detect-removable-devices; Imports data when importing devices: kylin-migrate offline import --path<data_path> .
[0045] For example, when users face network-restricted scenarios, offline transfer can meet data migration needs. First, data selection and encryption are performed (the process is the same as in online transfer mode). Then, users choose a removable physical storage medium (e.g., USB flash drive, external hard drive) based on their needs. They can either store the encrypted data package to be migrated on the removable storage medium or temporarily store the data package in a designated directory on their local machine and then transfer it to the target device via physical copy. The data import process on the target device is the same as in cloud transfer mode. During the migration, a progress bar is displayed in real-time on the GUI interface or as a percentage of the migration progress in the CLI command line. After the migration is complete, the results are displayed. If the migration is successful, the number and list of migrated user files, which system configurations were migrated, which applications were migrated, and their status are displayed. If the migration fails, the failed items are displayed, and the user is asked whether to re-migrate.
[0046] When the data transmission mode is cloud relay, the data packet to be migrated and its verification file are uploaded to a cloud storage server that supports national cryptographic-level HTTPS channels. Then, the target device downloads the data packet to be migrated through the cloud storage API.
[0047] When selecting the cloud relay mode, in the GUI operation interface, for example, the cloud relay platform can be the China Electronics Cloud Platform. Users need to first enter an access key and other authentication permissions. Then, the operating system prompts the user to choose whether to import or export the device. If exporting, the user needs to select the region and bucket. Following this, similar to online and offline migration, the user needs to select the data, configuration, and applications to be migrated. If importing, similar to offline migration, the user needs to import the data package, verify its validity, and finally import and display the data. This system can also connect to other cloud platforms as needed. Clicking the "Confirm" button starts the migration, and the migration progress, results, and error messages will also be displayed. In the CLI command line, set the cloud platform authentication information: `kylin-migrate cloud setup --provider cecloud --access-key` <key>--secret-key <secret>--region <region>--bucket<bucket_name> Select data and upload it to the cloud platform: kylin-migrate cloud upload --files<path1,path2> --config<config_json> --app<app1, app2> --start; Import cloud data to the target device (same as offline migration): kylin-migrate offline import --path<data_path> It should be noted that the cloud relay mode uses an HTTPS channel that supports Chinese national cryptographic SSL. The cloud storage bucket region and access key are selected by the user to meet data sovereignty and compliance requirements of GB / T 39786-2021 national cryptographic standards.
[0048] For example, the process begins by retrieving the user's AccessKey / SecretKey from the China Electronics Cloud Platform on the device to be migrated and verifying permissions. Next, the region and bucket for storing the data to be migrated are confirmed to ensure compliance with data sovereignty requirements. The Electronics Cloud SDK uses HTTPS by default, and the transmission process conforms to national cryptographic standards. After selecting the user data, system configuration, and applications to be migrated on the device, the user needs to enter an encrypted password of at least 8 characters. The operating system then automatically uploads the data package to be migrated and its integrity verification file, migration.checksum, to the cloud platform. The target device also needs to verify permissions on the Electronics Cloud Platform, select the corresponding region and bucket, and then download the data package and import it into the system. During import, the user is first prompted to enter a decryption password, which is the same as the encrypted password entered when uploading the data to the cloud platform. Afterward, the data package to be migrated stored on the cloud platform is downloaded. Access to other cloud platforms is also supported; the specific process is the same as that of the Electronics Cloud Platform and will not be elaborated further.
[0049] S230: On the target device, the received data packet to be migrated is verified for integrity and decompressed. The user data information is restored to the corresponding path location on the target device according to the migration manifest file. The system configuration of the target device is restored according to the distribution version, desktop environment and system configuration information of the target device. The application information is installed and restored according to the preset cross-distribution dependency mapping table.
[0050] Specifically, after receiving the data packet to be migrated, the target device performs integrity verification on the large migration data packet using the SM3 algorithm, and then decompresses the data packet to be migrated to obtain user data information, system configuration information, application information, and migration manifest file.
[0051] The target device first verifies the received data packets to be migrated using the SM3 algorithm and its integrity verification file migration.checksum to ensure that the data has not been tampered with or corrupted during transmission. If the hash values are inconsistent, subsequent operations should be terminated and a "Data integrity verification failed" message should be displayed. Upon successful verification, the user is prompted to enter a decryption password, which must match the encryption password used during data encryption and encapsulation. An encryption key is derived using the PBKDF2 algorithm in conjunction with the user-input password, where the salt value, iteration count, and key length are consistent with the parameters used during encryption. After decryption, the data packets are automatically decompressed, and the internal files can be decrypted using the key to obtain user data information, system configuration information, application information, and the manifest.json file to be migrated. The user data, system configuration, and applications can be restored based on the records in the manifest.json file.
[0052] Based on the list of items to be migrated, store the user data information in the corresponding directory of the target device.
[0053] When processing user data, system configuration information, and application information separately, the `du` command (e.g., `du -h --max-depth=1 / | sort -h`) can be used to find directories with ample free space in the target device's operating system for temporary storage of the decompressed data. During the user data selection phase on the device to be migrated, users can choose all user data they have permission to access. However, user selections of special directories related to system configuration, such as ` / etc`, ` / var / lib`, ` / var / run`, ` / usr`, ` / opt`, ` / boot`, ` / dev`, `proc`, ` / sys`, and ` / run`, will be ignored; directories like ` / lost+found`, ` / var / cache`, ` / mnt`, and ` / media` will also not be displayed. The user-selected data is stored using rsync in the ` / usr / ` directory under the temporary storage directory, and the selected files are recorded in the `user` section of the `manifest.json` file. Therefore, only user data is migrated; that is, only file entities are migrated, without migrating user account information, UID / GID, or other attributes. No new users need to be created on the target device, and the user and group attributes of the source files are not retained. Furthermore, the ACL permission attributes of the user performing the operation are automatically inherited from the target device during data import. Based on the user records in the manifest.json file, user data information is automatically copied to the appropriate location. If a file with the same name exists in the destination location, the source file to be migrated is renamed to a_copy1.txt to avoid overwriting and stored in the appropriate location.
[0054] Identify the desktop environment types of the device to be migrated and the target device. Based on the migration list file, convert the system configuration information according to the desktop environment type of the target device and write it to the corresponding directory.
[0055] For example, system configuration migration first identifies the desktop environment type by reading the XDG_CURRENT_DESKTOP environment variable, abstracts heterogeneous configuration items such as GNOME gsettings, KDE config, and UKUI dconf into a unified JSON schema, and automatically writes them back to the target device according to the corresponding storage backend. Supported cross-distribution desktop environment configuration migration items include visual configurations: desktop background, system theme, screensaver, etc.; interactive configurations: shortcut key settings, font configurations (font name, font size, etc.); and hardware configurations: screen resolution, sound device settings, etc. Different distributions may use different desktop environments, therefore, the device to be migrated first identifies the desktop environment of the device to be migrated through the XDG_CURRENT_DESKTOP environment variable and process characteristics, and obtains the corresponding system configuration based on the desktop environment. For example, GNOME can use gsettings to obtain the location of the system desktop background, then copy the desktop background image to the / system / directory under the temporary storage directory, and record the user-selected configuration "desktop background" and its corresponding value in the sys section of the manifest.json file. Before importing the system configuration information of the target device, the same method is used to first confirm the desktop environment of the target device, then read the manifest.json file to reset the system configuration selected by the user to the target device, and copy the resources of the device to be migrated to the corresponding directory.
[0056] Identify the distribution versions of the device to be migrated and the target device. Based on the migration manifest file and application information, and according to the preset cross-distribution package name dependency mapping table, map the package name corresponding to the distribution version of the device to be migrated to the package name corresponding to the distribution version of the target device, and install the package according to the mapped package name.
[0057] Existing cross-distribution application migration tools only support the same system or compatible branches. However, cross-package management systems and cross-software source ecosystems can be migrated through application replacement. For example, first, the operating system distribution information of the device to be migrated is confirmed, as different distributions use different package management tools. After confirming the package management tool (e.g., dpkg), the applications installed on the current operating system are obtained and displayed in a list for the user to choose from. The user's selection is recorded in the `app` section of the `manifest.json` file, including the application name, version number, and dependencies. Next, a cross-distribution dependency mapping table is maintained. This table is built by periodically crawling the official repository metadata of various distributions such as Debian, Red Hat, Arch, UnionTech UOS, and Kylin OS, and stored as a local knowledge base. During migration, it can be queried in real time to resolve differences in package names and dependencies. On the target device, the operating system distribution also needs to be confirmed first, and then the corresponding official software source and domestic source need to be configured. For example, mirrors from Tsinghua University, Alibaba Cloud, and USTC should cover mainstream distributions and have high availability and synchronization frequency. During the application import step, the migrated application can be installed automatically. If an older version of the application already exists on the target device's operating system, the user should be prompted to choose to overwrite or skip. The operating system will then read the dependencies from the manifest.json file and install them directly based on the retrieved dependency mapping table. If dependency conflicts occur, such as due to outdated versions, the user will be prompted to force an upgrade. If circular dependencies occur, the user will be prompted to force installation. It should be noted that in the domestic IT innovation ecosystem, the software source configuration for the operating system must adhere to the principles of independent control and security compliance; therefore, it is usually provided by official or authorized organizations. If using an enterprise version requiring a subscription, the software source needs to be manually modified beforehand.
[0058] This embodiment transmits the data packets to be migrated between the target device and the device using three data transmission modes: online, offline, and cloud relay. It is applicable to most network environments, including LANs, isolated network-less environments, and cross-regional WANs, meeting diverse needs for seamless migration between personal devices and enterprise-level data centers. During data transmission, a QR code invitation link is generated in conjunction with SM2 key exchange, simplifying the establishment of a secure connection between devices. Forward security of the session key is ensured through a national cryptographic asymmetric encryption algorithm. After receiving the data packets to be migrated, the target device first verifies their integrity and decompresses them. Then, based on the migration manifest file, it identifies the target system's distribution and desktop environment. Using a pre-defined cross-distribution dependency mapping table, it adaptively converts and applies the system configuration and application settings from the device to be migrated to the target device, resolving the migration compatibility issues caused by differences in package management and desktop environments across different Linux distributions. Simultaneously, integrity checks based on the SM3 algorithm are performed at both the start and end points of the transmission, forming a closed-loop verification mechanism. This ensures that the data content is accurate throughout the entire process, from packaging on the device to be migrated, through network / storage media transmission, and finally decompression on the target device. This effectively prevents data loss or damage due to transmission errors or storage media damage, greatly improving the reliability of the migration task.
[0059] Example 3 Figure 7 This is a schematic diagram of a cross-platform switching device supporting domestic IT innovation according to Embodiment 3 of the present invention. In this embodiment, the cross-platform switching device supporting domestic IT innovation includes: The data encapsulation module 810 is used to generate a list file to be migrated and package it into a data package to be migrated based on the user data information, system configuration information and application information selected by the user to be migrated in the device to be migrated. The data transmission module 820 is used to transmit the data packets to be migrated from the device to be migrated to the target device according to the network environment or user selection, and through the corresponding data transmission mode. The data import module 830 is used to verify the integrity of the received data packet to be migrated on the target device and decompress it. According to the list file to be migrated, it writes, restores and installs user data information, system configuration information and application information in the corresponding locations.
[0060] This embodiment utilizes a data encapsulation module on the device to be migrated to allow users to select and package the files to be migrated via a GUI or CLI. Simultaneously, a list of files to be migrated is generated, recording the files selected by the user. The data transmission module, based on network conditions or user selection, transmits the data package from the device to the target device via online, offline, or cloud relay. The data import module verifies the integrity of the received data package on the target device and decompresses it. Based on the migration list file, user data, system configuration information, and application information are written, restored, and installed in the appropriate locations. The synchronization of the GUI and CLI eliminates the functional disconnect between the graphical interface and command-line tools, lowering the operational threshold for ordinary users. By employing national cryptographic algorithms, end-to-end security protection is achieved from key derivation and data encryption to integrity verification, effectively preventing data leakage and tampering during transmission and storage. This meets the stringent requirements of the information technology innovation industry for independent and controllable data security, providing reliable security for data migration in sensitive scenarios such as government and finance.
[0061] The cross-platform switching device supporting domestic IT innovation provided in the embodiments of the present invention can execute the cross-platform switching method supporting domestic IT innovation provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0062] Example 4 Figure 8 This is a structural diagram of an electronic device according to Embodiment 4 of the present invention. Figure 8 A block diagram is shown of an exemplary electronic device 12 suitable for implementing embodiments of the present invention. Figure 8 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0063] like Figure 8 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0064] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0065] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0066] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0067] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0068] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the electronic device 12 / server / computer, and / or with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. Figure 8 As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although... Figure 8 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0069] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the cross-platform replacement method for supporting domestic IT innovation provided in the embodiments of the present invention.
[0070] Example 5 Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the cross-platform switching method for supporting domestic IT innovation provided in the above embodiments.
[0071] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0072] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0073] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0074] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0075] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.< / region> < / secret> < / key> < / super>
Claims
1. A method for cross-platform device replacement supporting domestic IT innovation, characterized in that, include: S110, in the device to be migrated, responds to the user's selection operation of the file to be migrated initiated through the GUI graphical operation interface or CLI command line, and generates a migration mapping list file containing user data information, system configuration information and application information according to the selection operation, and packages the data package to be migrated at the same time. S120, depending on the network environment or user selection, transmits the data packets to be migrated from the device to be migrated to the target device through online transmission, offline transmission or cloud relay data transmission modes; S130: After the target device receives the data packet to be migrated, it first performs integrity verification and decompression. Then, it identifies the distribution version and desktop environment of the device to be migrated and the target device, and parses the migration mapping list file. It adaptively restores the user data information and system configuration information to the corresponding path location of the target device, and automatically restores the system configuration. Then, combined with the preset cross-distribution dependency mapping table, it adapts and restores the application information.
2. The method according to claim 1, characterized in that, The method further includes: When users operate through the GUI graphical interface or CLI command line, the system parses the user's operation and converts it into standard JSON configuration. Then, it calls the DUBS interface StartMigration and broadcasts the OperationRecorded signal while recording the operation log. By listening to the OperationRecorded signal, the system synchronizes the state of the GUI operation with the CLI command line and stores all operation states in the database.
3. The method according to claim 1, characterized in that, The S110 further includes: When packaging files according to the migration list file, the data is encrypted and encapsulated to form an encrypted migration data packet. The encryption algorithm is the SM4-CBC algorithm.
4. The method according to claim 3, characterized in that, The encryption and encapsulation of the data includes: Based on the encrypted password entered by the user, a 128-bit national cryptographic SM4 key is derived from the encrypted password entered by the user using the PBKDF2 algorithm, with an iteration count of ≥10000 times and a salt value length of 16 bytes. The SM4-CBC algorithm is used to compress and encrypt user data, system configuration information and application information to generate an encrypted compressed file. The SM3 algorithm is then used to calculate the SM3 hash value of the encrypted compressed file and generate an integrity verification file.
5. The method according to claim 1, characterized in that, S120 includes: When the data transmission mode is online transmission, an invitation link containing IP address, timestamp and verification code information is generated by the target device. After the device to be migrated establishes a secure connection with the target device based on the invitation link, the data packet to be migrated is transmitted. When the data transmission mode is offline transmission, the data packet to be migrated and its verification file are written into the removable physical storage medium and transported. After arriving at the destination, the data packet to be migrated in the removable physical storage medium is read and stored in the target device. When the data transmission mode is cloud relay, the data packet to be migrated and its verification file are uploaded to a cloud storage server that supports national cryptographic-level HTTPS channels. Then, the target device downloads the data packet to be migrated through the cloud storage API.
6. The method according to claim 5, characterized in that, The process of establishing a secure connection between the device to be migrated and the target device based on the invitation link includes: The device to be migrated and the target device generate a session key through SM2 key exchange. The SM4 stream key derived from the session key is then transmitted in an encrypted channel in the data packet to be migrated and its verification file.
7. The method according to claim 1, characterized in that, S130 includes: After receiving the data packet to be migrated, the target device performs integrity verification on the data packet using the SM3 algorithm, and then decompresses the data packet to obtain user data information, system configuration information, application information, and migration mapping list file; According to the migration mapping manifest file, the user data information is stored in the corresponding directory of the target device; Identify the desktop environment types of the device to be migrated and the target device. Based on the migration mapping list file, convert the system configuration information according to the desktop environment type of the target device by calling the configuration management tool or interface of the target device and write it to the corresponding directory. At the same time, perform adaptive system configuration recovery. Identify the distribution versions of the device to be migrated and the target device. Based on the migration mapping manifest file and application information, and according to the preset cross-distribution package name dependency mapping table, map the package name corresponding to the distribution version of the device to be migrated to the package name corresponding to the distribution version of the target device, and perform adaptation and installation based on the mapped package name.
8. A cross-platform device for switching equipment supporting domestic IT innovation, characterized in that, include: The data encapsulation module is used to generate a list file to be migrated and package it into a data package to be migrated based on the user data information, system configuration information and application information selected by the user in the device to be migrated. The data transmission module is used to transmit data packets to be migrated from the device to be migrated to the target device according to the network environment or user selection, and through the corresponding data transmission mode. The data import module is used to verify the integrity of the received data packets to be migrated on the target device and decompress them. According to the list file to be migrated, it writes, restores and installs user data information, system configuration information and application information in the corresponding locations.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the cross-platform machine replacement method supporting domestic IT innovation as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the cross-platform switching method supporting domestic IT innovation as described in any one of claims 1-7.