Data migration method, system and equipment based on cloud native

Through a cloud-native data migration method, the data loss and duplicate delivery problems when Kafka messages are migrated to NATS are solved, and the stable migration and high reliability of data are achieved, ensuring data integrity and consistency.

CN119557062APending Publication Date: 2025-03-04BEIJING 21VIANET DATA CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411313267.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When the prior art migrates Kafka messages to the cloud-natively designed message queue middleware NATS, it may lead to data loss, duplicate delivery and other problems, affecting the stability of business consumption.

Method used

Provide a cloud-native data migration method, which realizes data migration and status update by obtaining and setting service running parameters, starting the service and obtaining subscribed data to be migrated. The method also includes an automatic retry mechanism to ensure the success and integrity of data migration.

Benefits of technology

It realizes the stable migration of data to a cloud-native environment, ensures data integrity and consistency, avoids the problems of data loss and duplicate acquisition during data migration, and improves the reliability of the data migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557062A_ABST
    Figure CN119557062A_ABST
Patent Text Reader

Abstract

The invention provides a data migration method, system and device based on cloud native, and belongs to the technical field of data processing.The method comprises the steps that service operation parameters are obtained and set; starting the service according to the service operation parameters; the service obtains subscribed to-be-migrated data, and after the subscribed to-be-migrated data is obtained, the service migrates the to-be-migrated data to a designated position; when the service fails to acquire the subscribed data to be migrated, acquiring the subscribed data to be migrated again until the service acquires the subscribed data to be migrated; and when the service fails to migrate the to-be-migrated data to the specified position, the service migrates the to-be-migrated data again until the to-be-migrated data is migrated to the specified position and updates the data state. According to the data migration method based on the cloud native, high-stability and consistent migration of the data is realized, the integrity of the data is ensured, and meanwhile, repeated acquisition of the data is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a cloud-native based data migration method, system and device. Background Art

[0002] Kafka (Apache Kafka) is a distributed stream processing platform developed and open-sourced by LinkedIn. It provides a unified, high-throughput, low-latency platform to process real-time data streams. Its core components include producers, consumers, topics, partitions, and replicas. It has the characteristics of high throughput, scalability, fault tolerance, and persistence.

[0003] Cloud Native is a method of building and running applications that takes advantage of cloud computing. Its features include microservice architecture, containerization, dynamic management, and continuous delivery. By splitting an application into multiple small, independent services, each of which can be independently deployed, expanded, and managed, the microarchitecture model improves the reliability, scalability, and maintainability of the application, allowing the application to better respond to business needs and traffic changes; containerization technology packages the application and its dependencies into independent containers for rapid deployment and management. The lightweight, portable containerization method enables applications to run seamlessly on different cloud environments and operating systems, greatly improving the flexibility and maintainability of the application. As more and more companies transform to cloud platforms, cloud native technology is widely used.

[0004] NATS is an open source, lightweight and high-performance cloud-native messaging system developed in the Go language. It is responsible for processing, discovering and exchanging messages in distributed systems, providing connection and communication capabilities for microservices, containers and IoT devices in modern cloud computing environments.

[0005] In the prior art, Kafka, a message queue middleware that is not designed as cloud native, usually needs to be deployed on a bare metal server or a virtual machine and consumed by the business side. To achieve the transition to a cloud native environment, a common method is to migrate messages in Kafka to NATS, a message queue middleware designed as cloud native, through components such as NATS-Kafka components. However, there are still some problems in the process of migrating Kafka messages to NATS using the NATS-Kafka component. For example, if you do not care whether the messages can be successfully migrated to NATS, data loss and duplicate delivery may occur during the migration process, thereby causing failures on the business consumption side. Summary of the invention

[0006] In response to the above problems, the present invention provides a cloud-native based data migration method, system and device to achieve the integrity and consistency of migrated data.

[0007] In one aspect, the present invention provides a cloud-native-based data migration method, the method comprising: Get and set service operation parameters; Start the service according to the service operation parameters; The service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to a specified location and updates the data status.

[0008] As a further improvement of the present invention, The method further includes: when the service fails to obtain the subscribed data to be migrated, displaying acquisition failure information, and the service starts a set acquisition automatic retry mechanism to obtain the subscribed data to be migrated again, until the service obtains the subscribed data to be migrated; When the service fails to migrate the data to be migrated to the designated location, migration failure information is displayed, and the service starts a set migration automatic retry mechanism to migrate the data to be migrated again until the data to be migrated is migrated to the designated location.

[0009] As a further improvement of the method of the present invention, before the service obtains the subscribed data to be migrated, it also includes: checking the running status of the service, and when it is detected that the running status of the service is disconnected, restarting the service, and continuing to obtain the subscribed data to be migrated from the location where the running service status is disconnected.

[0010] As a further improvement of the method of the present invention, the obtaining and setting of service operation parameters includes obtaining and setting Kafka parameters and NATS parameters; The Kafka parameters include Brokers address, Topic, Partition, GrounID, MinBytes, MaxBytes, and StartOffset; the NATS parameters include the URL and Subject of the NATS server; The service is started according to the Kafka parameters and NATS parameters.

[0011] As a further improvement of the method of the present invention, the obtaining and setting of the service operation parameters is specifically: creating a yaml file, and setting the service operation parameters and corresponding values ​​through the yaml file.

[0012] As a further improvement of the method of the present invention, starting the service according to the service running parameters includes specifying the yaml file containing the service running parameters through the `-f` command, parsing the yaml file to obtain the service running parameters and corresponding values ​​therefrom, and starting the service based on the service running parameters and the corresponding values.

[0013] As a further improvement of the present invention, the service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to a specified location and updates the data status. Specifically, according to the set data acquisition monitoring mechanism, the service obtains the data to be migrated contained in the successfully subscribed Kafka Topic, migrates the data to be migrated to NATS, and changes the data status in SQLite.

[0014] As a further improvement of the present invention, when the service fails to migrate the data to be migrated to the specified location, a migration failure message is displayed, and the service starts the set migration automatic retry mechanism to migrate the data to be migrated again until the data to be migrated is migrated to the specified location, including: obtaining the data to be migrated contained in the successfully subscribed Kafka Topic, and migrating the data to be migrated to NATS, when the data to be migrated contained in the successfully subscribed Kafka Topic obtained by the service fails to migrate to NATS, a migration failure message is prompted, the service stops obtaining the data to be migrated in the next successfully subscribed Kafka Topic, and the service starts the set migration automatic retry mechanism to migrate again until the data to be migrated in the successfully subscribed Kafka Topic obtained by the service is successfully migrated to NATS, and the service obtains the data to be migrated in the next successfully subscribed Kafka Topic.

[0015] As a further improvement of the method of the present invention, the data to be migrated in the successfully subscribed Kafka Topic is displayed. When the data to be migrated in the successfully subscribed Kafka Topic is not displayed, the Kafka parameters are checked to determine whether there is data in the successfully subscribed Kafka Topic data.

[0016] As a further improvement of the method of the present invention, starting the service according to the service operation parameters includes displaying the service operation status. When the service operation status of "Kafka connection successful" and "NATS connection successful" are displayed, it means that the service is running normally, Kafka and NATS are successfully connected to the service respectively, otherwise the connection fails.

[0017] As a further improvement of the method of the present invention, before migrating the data to be migrated in the successfully subscribed Kafka Topic obtained by the service to NATS, the data to be migrated in the successfully subscribed Kafka Topic is persisted in SQLite to store the data to be migrated in the successfully subscribed Kafka Topic in the SQLite of the service.

[0018] On the other hand, the present invention provides a cloud-native-based data migration system, including a service operation parameter acquisition module, a service module, a data module to be migrated, and a data receiving module, for completing the cloud-native-based data migration method described in the embodiment, wherein: The service operation parameter acquisition module is used to obtain and set the service operation parameters; The service module is used to start the service according to the service operation parameters, and obtain the subscribed data to be migrated in the data to be migrated module. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to the data receiving module; when the service fails to obtain the subscribed data to be migrated, the subscribed data to be migrated is obtained again until the service obtains the subscribed data to be migrated; When the service fails to migrate the data to be migrated to the data receiving module, the service migrates the data to be migrated again until the data to be migrated is migrated to the data receiving module; The data receiving module is used to receive the data to be migrated of the service migration.

[0019] In another aspect, the present invention provides a cloud-native-based data migration device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor is configured to execute the computer program to implement the following steps of a cloud-native-based data migration method: Get and set service operation parameters; Start the service according to the service operation parameters; The service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to a specified location and updates the data status.

[0020] The present invention provides a cloud-native-based data migration method, system and device, thereby achieving stable migration of data to a cloud-native environment, ensuring the integrity and consistency of the data, avoiding the problems of data loss and repeated acquisition during the data migration process, and improving the reliability of the data migration process. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flowchart of a data migration method according to an embodiment of the present invention.

[0022] Figure 2 It is a schematic diagram of the SQLite database of Kafka Topic data in the data migration method of an embodiment of the present invention.

[0023] Figure 3 It is a schematic diagram of data status in the SQLite database of NATS of the data migration method of an embodiment of the present invention.

[0024] Figure 4 Schematic diagram of a data migration system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following is combined with specific embodiments and appendix Figure 1-4 The invention is described in detail so that those skilled in the art can more fully understand the purpose, features and effects of the invention.

[0026] Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as commonly understood by those skilled in the art to which the present invention belongs. When the definition of a term in the present invention conflicts with the meaning commonly understood by those skilled in the art to which the present invention belongs, the definition described in the present invention shall prevail.

[0027] The present invention provides a cloud-native-based data migration method, comprising: Get and set service operation parameters; Start the service according to the service operation parameters; The service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to a specified location and updates the data status.

[0028] The present invention improves the data migration method to a cloud native environment by providing a cloud native-based data migration method, thereby effectively ensuring the data integrity and consistency during the migration process.

[0029] The following uses the migration of data from the traditional message queue Kafka to NATS as an example to illustrate the cloud-native data migration method.

[0030] Embodiment 1 As a specific embodiment of the present invention, this embodiment provides a data migration method based on cloud native. Figure 1 , the specific steps are as follows: S01. Get and set service operation parameters Service operation parameters are crucial to ensure the normal operation of the service, reliable message transmission, and security. By setting accurate service operation parameters, you can reduce operation errors.

[0031] S02. Start the service and check the service running status Start the data migration service from Kafka to NATS. When the service starts successfully and the displayed service running status is normal, proceed to the next step. If the running status is abnormal, an error message is displayed and the service stops running.

[0032] S03. Get the Kafka Topic data that is successfully subscribed Kafka messages are classified by topic, and each message is written to a topic. If the subscribed Kafka Topic data cannot be obtained, proceed to the next step S04. If the subscribed Kafka Topic data is obtained, proceed to S05.

[0033] S04. Retry and display error information until acquisition is successful When the subscribed Kafka Topic data cannot be obtained, the service automatically retries and displays an error message until the Kafka Topic data is successfully obtained. After the Kafka Topic data is successfully obtained, it returns to S03.

[0034] S05. Migrate data to NATS and change data status after success After S03 obtains the Kafka Topic data that has been subscribed successfully, the service executes the operation of migrating the data to NATS and updates the data status after the migration is successful.

[0035] If data migration to NATS fails, proceed to the next step.

[0036] S06. Retry and display error information until data migration is successful When data migration to NATS fails, the service automatically retries and displays an error message until the data migration succeeds. After the data is successfully migrated to NATS, it returns to S05 and updates the data status.

[0037] If data migration to NATS fails, the next successfully subscribed Kafka Topic data will be stopped from being obtained until the data migration to NATS succeeds, and the next successfully subscribed Kafka Topic data will be obtained again.

[0038] A cloud-native-based data migration method of the present invention realizes the stable migration of Kafka data to NATS. When a failure occurs on Kafka or NATS, or even when both Kafka and NATS fail, the method continuously retries to connect the service to Kafka or the service to NATS. After Kafka is successfully connected, the service continues to obtain the subscribed KafkaTopic data. After NATS is successfully connected, the service continues to migrate data to NATS, thereby ensuring the integrity and consistency of the data. At the same time, the automatic synchronization of the data is realized, thereby avoiding the problems of data loss and repeated acquisition during the data migration process.

[0039] Embodiment 2 As a specific embodiment of the present invention, this embodiment provides a data migration method based on cloud native. Figure 1 , the specific steps are as follows: S01. Get and set service operation parameters The service operation parameters include Kafka parameters and NATS parameters. Among them, the Kafka parameters include Brokers (agent) address, Topic (topic), Partition (partition), GrounID (consumer group ID), MinBytes (minimum number of bytes), MaxBytes (maximum number of bytes), StartOffset (starting offset). Preferably, when SASL (Simple Authentication and Security Layer) authentication exists, the Kafka parameters also include user name and password to prevent unauthorized access and data leakage and ensure secure communication.

[0040] The NATS parameters include the URL (Uniform Resource Locator) of the NATS server and the Subject. When SASL authentication is present, the NATS parameters also include the user name and password. The Subject in NATS is similar to the Topic in Kafka, which defines the category or subject of the message.

[0041] S02. Start the service and check the service running status Start the data migration service from Kafka to NATS. When the service starts successfully and the displayed service running status is normal, proceed to the next step. If the running status is abnormal, an error message is displayed and the service stops running.

[0042] After the service is started, all relevant logs will be output to the console and displayed. There will be corresponding information on the success or failure of connecting to Kafka and NATS. You can judge whether the connection is successful based on the logs.

[0043] When the service is started successfully and the displayed service running status is normal, including the service running without errors, and displaying the service running status of "Kafka connection successful" and "NATS connection successful", it means that the service is running normally, including: the service has been successfully connected to Kafka, and the success of Kafka connection is the key to ensuring that the service can obtain Kafka messages; the service has been successfully connected to NATS, and the success of NATS connection can ensure that data migration to NATS can be realized.

[0044] By checking the service running status, you can easily understand the actual operation of the service, whether there are any exceptions, and whether the connection is successful.

[0045] S03. Get the Kafka Topic data that is successfully subscribed If the subscribed Kafka Topic data cannot be obtained, proceed to the next step S04. If the subscribed Kafka Topic data is obtained, proceed to S05.

[0046] When a successfully subscribed Kafka Topic data is obtained, the successfully subscribed Kafka Topic data is persisted in the SQLite corresponding to the service, and the data in the successfully subscribed Kafka Topic is displayed, including: the service establishes a connection with the SQLite database, and then the service inserts the successfully subscribed Kafka Topic data obtained into the SQLite database.

[0047] Specifically, whether the Kafka Topic data that has been successfully subscribed is obtained can be determined through logs in the console.

[0048] Using SQLite to persist the successfully subscribed Kafka Topic data can save resource usage and facilitate data migration. SQLite can run on various operating systems and can ensure data integrity and consistency.

[0049] S04. Retry and display error information until acquisition is successful When the subscribed Kafka Topic data cannot be obtained, the service automatically retries and displays an error message until the Kafka Topic data is successfully obtained. After the Kafka Topic data is successfully obtained, it returns to S03.

[0050] S05. Migrate data to NATS and change data status after success S03 After obtaining the successfully subscribed Kafka Topic data, the service executes the operation of migrating the data to NATS, thereby migrating the data from a Topic in Kafka to a Subject in NATS. After the migration is successful, the data status is updated, wherein the updating of the data status includes updating the data status in the SQLite corresponding to NATS.

[0051] In this embodiment, after the Kafka Topic data is successfully migrated to NATS, it is stored in a new SQLite database, and the data in the SQLite database that persists the successfully subscribed Kafka Topic data is still retained to ensure data integrity.

[0052] If data migration to NATS fails, proceed to the next step.

[0053] Specifically, the success or failure of data migration to NATS is determined by the corresponding output logs.

[0054] S06. Retry and display error information until data migration is successful When data migration to NATS fails, the service automatically retries and displays an error message until the data migration succeeds. After the data is successfully migrated to NATS, it returns to S05 and updates the data status.

[0055] If data migration to NATS fails, the acquisition of successfully subscribed Kafka Topic data will be stopped at the same time until the data is successfully migrated to NATS and the successfully subscribed Kafka Topic data is acquired again.

[0056] A cloud-native data migration method of the present invention can quickly detect the failure and suspend the migration process and record the migration status when a Kafka failure causes the service to fail to connect to Kafka, so as to prevent data loss or inconsistency; when a NATS failure causes the service to fail to connect to NATS, the data migration and writing can be effectively suspended, and migration can be performed again after NATS restores the connection, so as to ensure that the data is completely migrated.

[0057] Embodiment 3 As a specific embodiment of the present invention, this embodiment provides a data migration method based on cloud native. Figure 1 , the specific steps are as follows: S01. Get and set service operation parameters Create a YAML (YAML Ain't Markup Language) file and set the service running parameters and parameter values ​​through the YAML file.

[0058] As a type of configuration file, yaml files are highly readable, have rich expressiveness and scalability, and are easy to operate.

[0059] The service operation parameters include Kafka parameters and NATS parameters, specifically including: kafka.brokers, kafka.topic, kafka.partition, kafka.grounID, kafka.minBytes, kafka.maxBytes, kafka.startOffset, kafka.auth.user, kafka.auth.password; nats.url, nats.subject, nats.auth.user, nats.auth.password.

[0060] S02. Start the service and check the service running status When the service is started successfully and the displayed service running status is normal, proceed to the next step.

[0061] Preferably, when starting the service, the yaml file containing the service running parameters is specified through the `-f ` command. If not specified, the default value is default.conf.yaml.

[0062] When the running status information "Kafka connection successful" and "NATS connection successful" are displayed, it means that the service has been started successfully. Otherwise, the error message of service startup failure is displayed, as shown below.

[0063]

[0064] S03. Get the Kafka Topic data that is successfully subscribed If the subscribed Kafka Topic data cannot be obtained, proceed to the next step S04. If the subscribed Kafka Topic data is obtained, proceed to S05.

[0065] Specifically, when a successfully subscribed Kafka Topic data is obtained, the data in the successfully subscribed Kafka Topic can be seen in the console. If no data is displayed, it is necessary to check the Topic, Partition, GrounID and / or StartOffset parameters, and further determine whether there is data in the Topic.

[0066] When you see the data in the successfully subscribed Kafka Topic in the console, it means that the service and Kafka are connected. Persist the successfully subscribed Kafka Topic data in SQLite, such as Figure 2 shown.

[0067] S04. Retry and display error information until acquisition is successful When the subscribed Kafka Topic data cannot be obtained, the service automatically retries and displays an error message until the Kafka Topic data is successfully obtained. After the Kafka Topic data is successfully obtained, S03 is returned. The details are as follows.

[0068]

[0069] When Kafka goes offline, the service keeps running and keeps trying to re-acquire the subscribed KafkaTopic data until Kafka comes back online and obtains the subscribed KafkaTopic data. After Kafka comes back online, the service will continue to obtain data from the location where Kafka went offline, ensuring the continuity of data acquisition, preventing data loss, and avoiding repeated data acquisition.

[0070] S05. Migrate data to NATS and change data status after success After S03 obtains the Kafka Topic data that has been subscribed successfully, the service executes the operation of migrating the data to NATS. After the migration is successful, the data status is updated, such as Figure 3 As shown, update the data status in SQLite.

[0071] If data migration to NATS fails, proceed to the next step.

[0072] S06. Retry and display error information until data migration is successful When data migration to NATS fails, the service automatically retries and displays an error message until the data migration succeeds. After the data is successfully migrated to NATS, it returns to S05 and updates the data status.

[0073] If data migration to NATS fails, the data of the successfully subscribed Kafka topic will be stopped at the same time until the data migration to NATS succeeds, and the data of the successfully subscribed Kafka topic will be obtained again. The details are as follows.

[0074]

[0075] The cloud-native-based data migration method of the present invention starts data migration after Kafka and NATS are successfully connected to the service, and migrates data one by one. After Kafka and / or NATS fails, it continuously retries to connect, and only after completing the migration of a successfully subscribed Kafka topic data is the migration of the next successfully subscribed Kafka topic data, thereby avoiding the integrity and consistency of data migration.

[0076] The cloud-native-based data migration method of the present invention realizes the migration of Kafka messages to a cloud-native environment, which can help users achieve a smooth and efficient conversion during the migration process from Kafka to NATS, and enable users to quickly and flexibly use and process data from Kafka in a cloud-native environment.

[0077] Embodiment 4 As a specific embodiment of the present invention, this embodiment provides a cloud-native-based data migration system. Figure 4 , including a service operation parameter acquisition module, a service module, a data module to be migrated and a data receiving module, which are used to complete the cloud-native-based data migration method described in the embodiment, wherein: The service operation parameter acquisition module is used to obtain and set the service operation parameters; The service module is used to start the service according to the service operation parameters, and obtain the subscribed data to be migrated in the data to be migrated module. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to the data receiving module; when the service fails to obtain the subscribed data to be migrated, the subscribed data to be migrated is obtained again until the service obtains the subscribed data to be migrated; When the service fails to migrate the data to be migrated to the data receiving module, the service migrates the data to be migrated again until the data to be migrated is migrated to the data receiving module; The data receiving module is used to receive the data to be migrated of the service migration.

[0078] Embodiment 5 As a specific embodiment of the present invention, this embodiment provides a cloud-native based data migration device, including a memory, a processor and a computer program stored in the memory, and the processor is used to execute the computer program to implement the steps of the cloud-native based data migration method described in the embodiment.

[0079] The above description is only a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent change made based on the technical essence of the present invention still falls within the scope of protection required by the present invention.

Claims

1. A cloud-native-based data migration method, characterized in that: The method comprises: Get and set service operation parameters; Start the service according to the service operation parameters; The service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to a specified location and updates the data status.

2. The cloud-native-based data migration method according to claim 1, characterized in that: The method further includes: when the service fails to obtain the subscribed data to be migrated, displaying acquisition failure information, and the service starts a set acquisition automatic retry mechanism to obtain the subscribed data to be migrated again, until the service obtains the subscribed data to be migrated; When the service fails to migrate the data to be migrated to the designated location, migration failure information is displayed, and the service starts a set migration automatic retry mechanism to migrate the data to be migrated again until the data to be migrated is migrated to the designated location.

3. The cloud-native-based data migration method according to claim 1, characterized in that: Before the service obtains the subscribed data to be migrated, it also includes: checking the service running status, and when detecting that the service running status is disconnected, restarting the service, and continuing to obtain the subscribed data to be migrated from the location where the running service status is disconnected.

4. The cloud-native-based data migration method according to claim 2, characterized in that: The obtaining and setting of service operation parameters includes obtaining and setting Kafka parameters and NATS parameters; The Kafka parameters include Brokers address, Topic, Partition, GrounID, MinBytes, MaxBytes, and StartOffset; the NATS parameters include the URL and Subject of the NATS server; The service is started according to the Kafka parameters and NATS parameters.

5. The cloud-native-based data migration method according to claim 4, characterized in that: The obtaining and setting of the service operation parameters specifically includes: creating a yaml file, and setting the service operation parameters and corresponding values ​​through the yaml file.

6. The cloud-native-based data migration method according to claim 4, characterized in that: The service obtains the subscribed data to be migrated. After obtaining the subscribed data to be migrated, the service migrates the data to be migrated to the specified location and updates the data status. Specifically, according to the set data acquisition monitoring mechanism, the service obtains the data to be migrated contained in the successfully subscribed KafkaTopic, migrates the data to be migrated to NATS, and changes the data status in SQLite.

7. The cloud-native-based data migration method according to claim 4, characterized in that: When the service fails to migrate the data to be migrated to the specified location, a migration failure message is displayed, and the service starts the set migration automatic retry mechanism to migrate the data to be migrated again until the data to be migrated is migrated to the specified location, including: obtaining the data to be migrated contained in the successfully subscribed Kafka Topic, and migrating the data to be migrated to NATS, when the data to be migrated contained in the successfully subscribed Kafka Topic obtained by the service fails to be migrated to NATS, a migration failure message is prompted, the service stops obtaining the data to be migrated in the next successfully subscribed Kafka Topic, and the service starts the set migration automatic retry mechanism to migrate again until the data to be migrated in the successfully subscribed Kafka Topic obtained by the service is successfully migrated to NATS, and the service obtains the data to be migrated in the next successfully subscribed Kafka Topic.

8. The cloud-native-based data migration method according to claim 6, characterized in that: The data to be migrated in the successfully subscribed Kafka Topic is displayed. When the data to be migrated in the successfully subscribed Kafka Topic is not displayed, the Kafka parameters are checked to determine whether there is data in the successfully subscribed Kafka Topic data.

9. The cloud-native-based data migration method according to claim 6, characterized in that: Before migrating the data to be migrated in the successfully subscribed Kafka Topic obtained by the service to NATS, persist the data to be migrated in the successfully subscribed Kafka Topic in SQLite to store the data to be migrated in the successfully subscribed Kafka Topic in the SQLite of the service.

10. A cloud-native data migration system, characterized in that: It includes a service operation parameter acquisition module, a service module, a data to be migrated module and a data receiving module. The service operation parameter acquisition module is used to acquire and set service operation parameters. The service module is used to start the service according to the service operation parameters and acquire the data to be migrated subscribed in the data to be migrated module. After acquiring the subscribed data to be migrated, the service migrates the data to be migrated to the data receiving module.

11. A cloud-native data migration device, characterized in that: It includes a memory, a processor and a computer program stored in the memory, and the processor is used to execute the computer program to implement the steps of the cloud-native based data migration method as described in any one of claims 1 to 9.