Data migration method and device, equipment and storage medium
By using transmission links between local storage devices and proprietary networks on the cloud for cloud data migration, network problems and insufficient data security in traditional methods are solved, and efficient, stable and secure data migration is achieved.
Patent Information
- Application Number
- CN202411216482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-24
AI Technical Summary
When cloud data is migrated to the local area, traditional methods are limited by network speed and network costs, resulting in high time and economic costs, and unstable network quality, which poses a risk of data theft.
Through the transmission link between local storage devices and a proprietary network on the cloud, cloud data can be migrated efficiently and securely to local storage devices, using dedicated transmission links to reduce network problems, and realizing distributed storage through data identification and directory division .
It improves the efficiency, stability and security of data migration, reduces the problems of instability in network quality and limited network speed, and avoids theft of data during transmission.
Smart Images

Figure CN119182793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data migration method, device, equipment and storage medium. Background Art
[0002] With the development of cloud storage technology, storing data in the cloud has gradually become one of the mainstream data storage methods. For example, enterprises, schools and other institutions can store institutional data in the cloud. However, when migrating institutional data from the cloud to a local computer room, it is usually necessary to download the institutional data from the cloud to the local computer room via the Internet. In the case of a large amount of institutional data stored in the cloud, the above migration method is not only limited by the network speed, but also incurs a large amount of network fees, resulting in high time and economic costs for data migration. Therefore, how to migrate data to improve the efficiency of data migration and reduce the economic cost of data migration is a technical problem that needs to be solved. Summary of the invention
[0003] The embodiments of the present application provide a data migration method, apparatus, device and storage medium, which can efficiently and securely migrate cloud data from the cloud to the local storage device through a transmission link between the local storage device and the private network on the cloud. The technical solution is as follows:
[0004] In one aspect, a data migration method is provided, the method comprising:
[0005] Determine the cloud data to be migrated, where the cloud data is stored in a private cloud network VPC based on an object storage service OSS;
[0006] Dividing the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices, where the data identifiers are used to identify the cloud data;
[0007] Based on the data identifiers corresponding to the multiple storage devices, the cloud data to be migrated is downloaded to the multiple storage devices through a transmission link, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices. The transmission link includes the multiple storage devices, a switch connected to at least one of the storage devices, a border router and the VPC, and the switch and the border router are both used to forward data.
[0008] In another aspect, a data migration device is provided, the device comprising:
[0009] A determination module, used to determine cloud data to be migrated, wherein the cloud data is stored in a private cloud network VPC based on an object storage service OSS;
[0010] A partitioning module, used to partition the cloud data to be migrated, and obtain data identifiers corresponding to multiple storage devices, wherein the data identifiers are used to identify the cloud data;
[0011] A migration module is used to download the cloud data to be migrated to the multiple storage devices through a transmission link based on the data identifiers corresponding to the multiple storage devices, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices. The transmission link includes the multiple storage devices, a switch connected to at least one of the storage devices, a border router and the VPC, and the switch and the border router are both used to forward data.
[0012] In some embodiments, the cloud data includes object data stored in a plurality of directories, and the data identifier is a directory storing the object data;
[0013] The partitioning module is used to obtain the directory structure of the cloud data to be migrated, where the directory structure is used to represent multiple directories storing the object data to be migrated; based on the number of the multiple storage devices, the multiple directories are partitioned to obtain multiple directories corresponding to the multiple storage devices.
[0014] In some embodiments, the cloud data includes object data stored in a plurality of directories, and the data identifier is a directory storing the object data;
[0015] The partitioning module is used to obtain a directory structure of the cloud data to be migrated, wherein the directory structure is used to represent multiple directories storing object data to be migrated; based on directory attributes of the multiple directories, the multiple directories are partitioned to obtain multiple directories corresponding to the multiple storage devices, wherein the directory attributes include at least one of a data type and a real-time level, wherein the data type is used to represent a data type of the object data stored in the directory, and the real-time level is used to represent the real-time performance of the object data stored in the directory.
[0016] In some embodiments, the migration module is used to divide the multiple directories corresponding to any storage device into multiple directory queues based on the number of multiple processes running in the storage device, the multiple directory queues corresponding to the multiple processes one-to-one, and the directory queues including multiple directories; and download the multiple directories in the multiple directory queues and the object data in the multiple directories in parallel through the multiple processes running in the storage device.
[0017] In some embodiments, the migration module is also used to determine a target directory from a directory queue corresponding to any process when an abnormal interruption occurs to the process, the target directory being the directory where the object data being downloaded when the process is abnormally interrupted is located; and re-download the object data stored in the target directory through the process.
[0018] In some embodiments, the migration module is further used to overwrite the first object data with the first object data if the second object data exists in the storage device when the first object data is successfully downloaded through the process, and the second object data has the same name as the first object data.
[0019] In some embodiments, the apparatus further comprises:
[0020] a sending module, configured to send a data migration request to the OSS through the transmission link in response to a data migration instruction, wherein the data migration instruction is used to instruct downloading of the cloud data to be migrated, and the data migration request is used to request downloading of the cloud data to be migrated;
[0021] The migration module is further configured to execute the step of downloading the cloud data through the transmission link when receiving a data migration response returned by the OSS.
[0022] In some embodiments, the apparatus further comprises:
[0023] A configuration module is used to respectively configure routing rules of a local gateway device, the border router and a cloud gateway device, wherein the local gateway device is a gateway device for the multiple storage devices, the cloud gateway device is a gateway device for the VPC, and the cloud gateway device is connected to the border router.
[0024] In some embodiments, the routing rule includes a target network segment and a jump target;
[0025] The configuration module is used to configure the jump target in the routing rule to be the IP address of the local gateway device when the target network segment in the routing rule of the local gateway device is the intranet network segment of the VPC; configure the jump target in the routing rule to be the first port of the border router when the target network segment in the routing rule of the border router is the intranet network segment of the OSS, and the border router is connected to the VPC through the first port; when the target network segment in the routing rule of the border router is the intranet network segment of the VPC, configure the jump target in the routing rule to be the second port of the border router, and the border router is connected to the access device through the second port, and the access device is used to support external network devices to access the VPC; when the target network segment in the routing rule of the cloud gateway device is the intranet network segment of the multiple storage devices, configure the jump target in the routing rule to be the first port of the cloud router, and the cloud router is connected to the border router through the first port.
[0026] In some embodiments, the routing rule further includes a data type;
[0027] The configuration module is used to configure the jump target in the routing rule to be the IP address of the first storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of the multiple storage devices and the data type in the routing rule is a preset type. The first storage device is used to store cloud data of the preset type.
[0028] In some embodiments, the routing rules further include a real-time level;
[0029] The configuration module is used to configure the jump target in the routing rule to be the IP address of a second storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of the multiple storage devices and the real-time level in the routing rule is a preset level. The second storage device is used to store cloud data of the preset level.
[0030] In some embodiments, the routing rule further includes a device tag, and the device tag is used to identify a storage device;
[0031] The configuration module is used to configure the jump target in the routing rule to be the IP address of the target storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of the multiple storage devices and the device label in the routing rule is the device identifier of the target storage device.
[0032] In some embodiments, for any storage device, the storage device is connected to a core switch, which is a switch located at the core layer; a port of the core switch is connected to a port of an access device via a dedicated optical fiber, and the access device is used to support external network devices to access the VPC; the access device is connected to the VPC via the border router.
[0033] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data migration method in the embodiment of the present application.
[0034] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the data migration method in the embodiment of the present application.
[0035] On the other hand, a computer program product is provided, including a computer program, wherein the computer program is executed by a processor to implement the data migration method in the embodiment of the present application.
[0036] The embodiment of the present application provides a data migration solution, which can efficiently and securely migrate cloud data from the cloud to the local storage device through the transmission link between the local storage device and the private network on the cloud. Since the transmission link can support dedicated line transmission, compared with data migration through the public network, data migration through the transmission link can not only reduce network problems such as unstable network quality and limited network speed, but also prevent data from being stolen during transmission, thereby improving the efficiency, stability and security of data migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 It is a schematic diagram of an implementation environment of a data migration method provided according to an embodiment of the present application;
[0039] Figure 2 is a flow chart of a data migration method provided according to an embodiment of the present application;
[0040] Figure 3 is a flow chart of another data migration method provided according to an embodiment of the present application;
[0041] Figure 4 is a schematic diagram of a transmission link provided according to an embodiment of the present application;
[0042] Figure 5 is a block diagram of a data migration device provided according to an embodiment of the present application;
[0043] Figure 6 is a block diagram of another data migration device provided according to an embodiment of the present application;
[0044] Figure 7 It is a schematic diagram of the structure of a terminal provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0046] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor are there any limitations on quantity and execution order.
[0047] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0048] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the object data involved in this application is obtained with full authorization.
[0049] The following is an explanation of the terms involved in this application.
[0050] Virtual Private Cloud (VPC): VPC refers to a custom private network created by an organization in the cloud platform provided by a cloud service provider. In a custom VPC, an organization can use and manage cloud instances and cloud resources, such as cloud servers (ECS, Elastic Compute Service), cloud databases (RDS, Relational Database Service), etc. Different VPCs are logically isolated.
[0051] Virtual Border Router (VBR): A router between the Customer-Premises Equipment (CPE) and the VPC, serving as a bridge for forwarding data from the VPC to the local data center (IDC). If the local data center is a local computer room, the CPE can be a core switch in the local computer room.
[0052] Cloud router: A communication hub in a VPC network. A cloud router can connect multiple switches in a VPC. Optionally, a cloud router can be a gateway device that connects a VPC to other networks.
[0053] Local router: The communication hub of the local data center. The local router can connect multiple switches in the local data center. Optionally, the local router can be a gateway device that connects the local data center with other networks.
[0054] Object Storage Service (OSS): A cloud service for storing large amounts of unstructured data. In OSS, data is stored in the form of objects in the OSS storage space (Bucket).
[0055] Figure 1 Schematic diagram of an implementation environment of a data migration method provided according to an embodiment of the present application. Figure 1 The implementation environment includes a storage device 101, a border router 102, and a private network on the cloud 103. The storage device 101 and the private network on the cloud 103 can communicate data through the border router 102.
[0056] In some embodiments, the storage device 101 may be a storage device in a local computer room, such as a disk array, a storage server, or a solid-state hard disk. The storage device 101 can communicate data with the edge router 102 through network devices such as switches and routers in the local computer room. The edge router 102 is a communication bridge between the storage device 101 and the private network 103 on the cloud.
[0057] In some embodiments, the storage device 101 can access the private network 103 on the cloud through the edge router 102 to download cloud data through the private network 103 on the cloud. The cloud data is usually stored in the storage space of the OSS in the form of objects. In other words, the storage device 101 can access the cloud data stored in the storage space of the OSS through the private network 103 on the cloud.
[0058] In some embodiments, the storage device 101 can also download the cloud data to the local through the transmission link, that is, download it to the storage device 101. The transmission link includes but is not limited to the storage device 101, the edge router 102, the cloud private network 103, routers, switches and other devices.
[0059] Since the transmission link can directly connect the storage device 101 in the local computer room and the private network 103 on the cloud, data migration is performed through the transmission link without transmitting data through the public network, thereby reducing network problems such as unstable network quality and limited network speed. It can also prevent data from being stolen during transmission, thereby improving the efficiency, stability and security of data migration.
[0060] Figure 2 is a flow chart of a data migration method provided according to an embodiment of the present application, the method is executed by a storage device, see Figure 2 , the method comprises the following steps:
[0061] 201. Determine the cloud data to be migrated.
[0062] In the embodiment of the present application, cloud data is stored in a storage space (Bucket) on the cloud platform based on the object storage service (OSS). By accessing the private network on the cloud, cloud data can be uploaded or downloaded in the Bucket. For example, by inputting a data migration instruction to the storage device in the local computer room, the storage device can be instructed to download cloud data from the Bucket, thereby realizing the migration of the data stored in the Bucket to the local.
[0063] Optionally, the data migration instruction includes a data identifier of the cloud data to be migrated. The data identifier can mark one or more cloud data. The storage device can determine the cloud data to be migrated by analyzing the data identifier in the data migration instruction.
[0064] 202. Divide the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices.
[0065] In an embodiment of the present application, when there are multiple storage devices in the local computer room, after any storage device determines the cloud data to be migrated, the storage device can divide the cloud data to be migrated and obtain the data identifier corresponding to each storage device, that is, obtain at least one cloud data corresponding to each storage device. Among them, the cloud data corresponding to the storage device is also the cloud data to be migrated to the storage device. By dividing the cloud data to be migrated into multiple storage devices, the storage space of multiple storage devices can be fully utilized, thereby facilitating the subsequent implementation of distributed storage.
[0066] 203. Based on the data identifiers corresponding to the multiple storage devices, the cloud data to be migrated is downloaded to the multiple storage devices through the transmission link, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices.
[0067] In an embodiment of the present application, after any storage device obtains data identifiers corresponding to multiple storage devices, the storage device can send a data migration request to the OSS through a transmission link to request that the cloud data to be migrated be downloaded to multiple local storage devices. Upon receiving the data migration request, the OSS can return the corresponding cloud data to the multiple storage devices through a transmission link according to the data identifier carried in the data migration request. Through the above-mentioned data migration method, the cloud data to be migrated can be distributedly stored in multiple local storage devices, that is, the cloud data identified by the corresponding data identifier can be stored in multiple storage devices.
[0068] In some embodiments, the transmission link includes multiple storage devices, a switch connected to at least one storage device, a border router, and a VPC, wherein the switch and the border router are both used to forward data.
[0069] The embodiment of the present application provides a data migration method, which can efficiently and securely migrate cloud data from the cloud to a local storage device through a transmission link between a local storage device and a private network on the cloud. Since the transmission link can support dedicated line transmission, compared with data migration through the public network, data migration through the transmission link can not only reduce network problems such as unstable network quality and limited network speed, but also prevent data from being stolen during transmission, thereby improving the efficiency, stability and security of data migration.
[0070] Figure 3 is a flowchart of another data migration method provided according to an embodiment of the present application, the method is executed by a storage device, see Figure 3 , the method comprises the following steps:
[0071] 301. Determine the cloud data to be migrated.
[0072] In an embodiment of the present application, cloud data can be institutional data stored on a cloud platform by an enterprise, school or other institution, such as employee information, code files, student information and other data. Among them, the cloud platform can be a platform provided by a cloud service provider. In order to facilitate the management of cloud data, an organization can create a private network in the cloud platform, that is, a cloud private network (VPC). By accessing the VPC, the data stored in the cloud can be managed and maintained. Due to the logical isolation between different VPCs, the isolation and security of cloud data can be guaranteed by creating a VPC.
[0073] In some embodiments, cloud data is stored in a storage space (Bucket) on the cloud platform based on an object storage service (OSS). Among them, cloud data is usually stored in the Bucket in the form of objects. Therefore, cloud data can also be called object data. Bucket usually includes multiple directories. Corresponding object data can be stored in each directory. By accessing VPC, cloud data can be uploaded or downloaded in the Bucket. For example, by inputting data migration instructions to the storage device in the local computer room, the storage device can be instructed to download cloud data from the Bucket, thereby realizing the migration of data stored in the Bucket to the local.
[0074] In some embodiments, the data migration instruction includes a data identifier of the cloud data to be migrated. The data identifier can mark one or more cloud data. Optionally, the data identifier can be a directory storing object data. The storage device can determine the cloud data to be migrated by analyzing the data identifier in the data migration instruction. For example, when the data identifier is directory 1-directory 12, the cloud data to be migrated is the object data stored in directory 1-directory 12.
[0075] 302. Divide the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices.
[0076] In an embodiment of the present application, there are usually multiple storage devices in the local computer room. After any storage device determines the cloud data to be migrated, the storage device can divide the cloud data to be migrated according to the data identifier, and obtain the data identifiers corresponding to the multiple storage devices, that is, obtain at least one cloud data corresponding to each storage device. Among them, the cloud data corresponding to the storage device is also the cloud data to be migrated to the storage device. By dividing the cloud data to be migrated into multiple storage devices, the storage space of multiple storage devices can be fully utilized, thereby facilitating the subsequent implementation of distributed storage.
[0077] In some embodiments, the storage device can divide the cloud data to be migrated according to the number of storage devices in the local computer room. The storage device obtains the directory structure of the cloud data to be migrated. The directory structure is used to represent multiple directories storing the object data to be migrated. For example, the directory structure can be: directory 1, directory 2, ..., directory 12. Then, the storage device divides the multiple directories according to the number of multiple storage devices to obtain multiple directories corresponding to the multiple storage devices. The number of directories corresponding to the multiple storage devices may be the same or may not be exactly the same, and the embodiments of the present application do not limit this. By dividing the cloud data according to the number of storage devices, the cloud data to be migrated can be simply and quickly divided into different storage devices, thereby facilitating subsequent data migration and distributed storage of data.
[0078] For example, there are three storage devices in the local computer room, and the cloud data to be migrated is the object data stored in directory 1 to directory 12. The multiple directories corresponding to storage device 1 may be directory 1 to directory 4; the multiple directories corresponding to storage device 2 may be directory 5 to directory 8; and the multiple directories corresponding to storage device 3 may be directory 9 to directory 12.
[0079] In some embodiments, the storage device can also divide the cloud data to be migrated according to the data type or real-time level of the cloud data. The storage device obtains the directory structure of the cloud data to be migrated, that is, determines multiple directories storing the object data to be migrated. Then, the storage device divides the multiple directories according to the directory attributes of the multiple directories to obtain multiple directories corresponding to the multiple storage devices.
[0080] The directory attribute includes at least one of a data type and a real-time level. The data type is used to indicate the data type of the object data stored in the directory.
[0081] Optionally, the data type may include a multimedia type, a code type, a log type, and the like. When the data type is a multimedia type, it indicates that the object data stored in the directory is multimedia data such as pictures, videos, audios, or documents. When the data type is a code type, it indicates that the object data stored in the directory is a code file written in at least one programming language. When the data type is a log type, it indicates that the object data stored in the directory is a running log generated when the system or application is running. It should be noted that object data of any data type can be a small file, that is, a file of a smaller size. For example, the object data can be a small picture, video, code file, log file, and the like.
[0082] For example, when the data type indicated by the directory attribute of directory 1 is a multimedia type, directory 1 can be classified into storage device 1. Storage device 1 is used to store multimedia type object data. When the data type indicated by the directory attribute of directory 2 is a code type, directory 2 can be classified into storage device 2. Storage device 2 is used to store code type object data.
[0083] The real-time level is used to indicate the real-time performance of the object data stored in the directory. Optionally, the real-time level includes the first level and the second level. The first level object data has a higher real-time performance requirement, such as transaction data and chat data, which are the first level object data. The second level object data has a lower real-time performance requirement, such as backup data and archive data, which are the second level object data.
[0084] For example, when the real-time level indicated by the directory attribute of directory 3 is the first level, directory 1 can be divided into storage device 3. Storage device 3 is used to store object data with high real-time performance. Optionally, storage device 3 can be a high-speed solid-state hard disk with high read and write speeds to ensure fast data read and write and meet high real-time requirements. When the real-time level indicated by the directory attribute of directory 4 is the second level, directory 4 can be divided into storage device 1 or storage device 2. Optionally, storage device 1 and storage device 2 can be disk arrays.
[0085] By dividing cloud data according to data type or real-time level, different types of cloud data or cloud data with different real-time characteristics can be quickly divided into different storage devices, which facilitates the subsequent distributed storage of data according to data type or real-time level.
[0086] It should be noted that after any storage device obtains the data identifiers corresponding to multiple storage devices, the storage device can send the data identifiers corresponding to the multiple storage devices to the corresponding storage devices through the switch in the local computer room, so that each storage device can determine its own corresponding data identifier, and then download the cloud data according to the data identifier.
[0087] Taking any storage device as an example, the process of downloading cloud data from the storage device is described below through the following steps 303-304.
[0088] 303. For any storage device, based on the number of processes created in the storage device, divide multiple directories corresponding to the storage device into multiple directory queues.
[0089] In an embodiment of the present application, after the storage device obtains the multiple directories corresponding to itself, it can divide the multiple directories into multiple directory queues according to the number of processes that have been created. Among them, the multiple directory queues correspond to the multiple processes one by one. The directory queue includes multiple directories. The number of directories in the multiple directory queues can be the same or not completely the same, and the embodiment of the present application does not limit this. The process is used to download the multiple directories in the corresponding directory queue and the object data in the multiple directories.
[0090] For example, two processes are created in storage device 1, and multiple directories corresponding to storage device 1 are directory 1 to directory 4. Storage device 1 can divide directory 1 and directory 2 into directory queue 1; and divide directory 3 and directory 4 into directory queue 2. Directory queue 1 corresponds to process 1. Directory queue 2 corresponds to process 2.
[0091] 304. Download multiple directories in multiple directory queues and object data in the multiple directories in parallel through multiple processes running in the storage device.
[0092] In the embodiment of the present application, multiple created processes are running in the storage device. The processes are used to download cloud data from the cloud via a transmission link. The storage device can download multiple directories and object data in multiple directories in multiple directory queues from the cloud in parallel through the above multiple processes. For example, the storage device downloads directory 1-2 and object data in directory 1-2 according to process 1; and downloads directory 3-4 and object data in directory 3-4 in parallel according to process 2.
[0093] In some embodiments, the transmission link includes multiple storage devices in a local computer room, a switch connected to at least one storage device, a border router, and a VPC. Among them, the switch and the border router are both used to forward data. The transmission link can realize dedicated line communication between the storage device in the local computer room and the private network VPC on the cloud. Since the data transmitted through dedicated line communication does not pass through the public network, migrating cloud data through dedicated line communication can reduce the more common network congestion, network disconnection, slow network speed and other problems in public network transmission, and ensure the stability of the network. Therefore, data migration through the transmission link can avoid data migration interruption or data migration failure due to network problems, thereby improving the efficiency of data migration and the stability of data migration in the network.
[0094] Figure 4 FIG. 1 is a schematic diagram of a transmission link provided according to an embodiment of the present application. Figure 4 As shown, the local computer room includes 3 storage devices and 2 switches. Among them, storage device 1 and storage device 3 are connected to the core switch. Storage device 2 is connected to the core switch through a layer of switches. The core switch is also a switch located at the core layer. The core layer is the highest level in the three-layer architecture of network networking. The core layer is used to connect multiple aggregation layers and data centers, and provide high-bandwidth and high-reliability connections. The core layer can support communication and data exchange between various departments within the organization, as well as connection with external networks. The ports of the core switch are connected to the ports of the access device through dedicated optical fibers. Among them, the access device is located between the border router and the core switch. The access device is connected to the core switch through dedicated optical fibers, and is connected to the VPC through the border router. The access device is used to support external network devices to access the VPC. It should be noted that in order to simplify the transmission link between the core switch and the border router, Figure 4 The access device is not shown.
[0095] As mentioned above Figure 4As shown in the figure, during the migration of cloud data, the private network on the cloud can send the cloud data to be migrated to the edge router. The edge router forwards the cloud data to the gateway device in the local computer room (referred to as the local gateway device) according to the routing rules. The local gateway device forwards the cloud data to the corresponding storage device through at least one layer of switches according to the routing rules.
[0096] In some embodiments, when any process is abnormally interrupted, the storage device can determine the target directory from the directory queue corresponding to the process. The target directory is the directory where the object data being downloaded when the process is abnormally interrupted is located. Then, the storage device re-downloads the object data stored in the target directory through the process. By re-downloading the object data in the directory when the process is abnormally interrupted, data transmission errors such as missed transmission and wrong transmission can be avoided, thereby improving the accuracy of data migration.
[0097] In some embodiments, when the storage device successfully downloads the first object data through a process, if the storage device has second object data with the same name, the storage device uses the first object data to overwrite the second object data. When the object data with the same name exists, the newly downloaded data is used to overwrite the data with the same name, thereby avoiding the storage device from storing multiple identical object data, and reducing the storage pressure of the storage device.
[0098] In some embodiments, in response to the data migration instruction, the storage device sends a data migration request to the OSS through a transmission link. The data migration instruction is used to instruct the download of the cloud data to be migrated. The data migration request is used to request the download of the cloud data to be migrated. When the OSS receives the data migration request, the OSS can return a data migration response to the storage device through the transmission link. When receiving the data migration response returned by the OSS, the storage device executes the step of downloading the cloud data through the transmission link.
[0099] In some embodiments, the data migration instruction includes a data identifier of the cloud data to be migrated. In response to the data migration instruction, the storage device can also obtain the data identifier of the cloud data to be migrated, and determine the cloud data to be migrated according to the data identifier, that is, the storage device executes the above step 301 in response to the data migration instruction.
[0100] Optionally, the storage device can divide the cloud data to be migrated and obtain data identifiers corresponding to multiple storage devices, that is, after the storage device executes the above step 301, it executes the above step 302. Optionally, the storage device can also download the cloud data to be migrated directly through multiple processes in parallel without dividing the cloud data to be migrated, that is, the storage device does not need to execute the above step 302. The embodiment of the present application is not limited to this.
[0101] In some embodiments, the storage device can migrate cloud data through the ossutils tool. Among them, the ossutils tool is an OSS management tool based on the command line. After installing the ossutils tool in the storage device, by configuring the accessKeyID, accessKeySecret and the intranet address of the OSS in the configuration file of the ossutils tool, the cloud data can be migrated from the OSS through the ossutils tool. Among them, the accessKeyID is used to identify the identity of the user account, and the accessKeySecret is used to verify the key of the user account, and both are used for identity authentication. Only user accounts that pass the authentication can access the cloud data stored in the OSS.
[0102] Optionally, when the ossutils tool is installed in the storage device, by inputting the following data migration instruction in the storage device, the storage device can be instructed to download the motion data to be migrated to the local device.
[0103] nohup ossutil64 cp -r oss: / / <bucket_name> / Directory1 / / data / oss / Directory1 / -j2000--loglevel=debug&
[0104] nohup ossutil64 cp -r oss: / / <bucket_name> / Directory2 / / data / oss / Directory2 / -j2000--loglevel=debug&
[0105] …
[0106] nohup ossutil64 cp -r oss: / / <bucket_name> / DirectoryN / / data / oss / DirectoryN / -j2000--loglevel=debug
[0107] Among them, nohup (no hang up) is used to instruct to run the data migration command in the background without hanging up. When the data migration command is run in the nohup mode, exiting the terminal interface will not affect the running of the data migration command.
[0108] "cp-r" is used to copy a directory and the object data under it. "cp-r oss: / / <bucket_name> / Directory1 / / data / oss / Directory1" is used to indicate that the name<bucket_name> Copy directory 1 and its contents in the bucket to the storage path data / oss / on the local storage device.
[0109] "-j 2000" is used to set the number of concurrent processes to 2000, that is, a single process can download up to 2000 object data in parallel.
[0110] "-loglevel=debug" is used to indicate that the log level is debug level. The log information recorded at debug level is more detailed. By setting the log level to debug level, it is easier for technicians to troubleshoot abnormal situations caused by the data migration process based on the log information.
[0111] Through the above data migration instructions, directory 1-directory N in the Bucket and their contents can be copied to the local storage device, thereby realizing the migration of object data in directory 1-directory N from the cloud to the local.
[0112] The above embodiments mainly introduce the process of data migration through the transmission link. In some embodiments, before data migration, it is also necessary to configure the routing rules of the network devices in the transmission link to ensure that the network devices in the transmission link can forward the cloud data to the correct destination.
[0113] According to the above introduction, network devices that need to configure routing rules include but are not limited to local routers, border routers, and cloud gateway devices. Among them, the local router is the communication hub of the local computer room. The local router can connect to multiple switches in the local computer room. The local router can also be a gateway device that connects the local data center with other networks, that is, a local gateway device. The cloud router is the communication hub of the VPC network. The cloud router can connect to multiple switches in the VPC. The cloud router can also be a gateway device that connects the VPC with other networks, that is, a cloud gateway device.
[0114] The following steps (1) to (3) illustrate the process of configuring routing rules for a local gateway device, a border router, and a cloud gateway device.
[0115] (1) Configure routing rules for a local gateway device. The local gateway device is a gateway device for multiple storage devices in a local computer room. Optionally, the local gateway device can be connected to a core switch in the local computer room so that the core switch communicates with external access devices through the local gateway device.
[0116] Among them, the routing rules include a target network segment and a jump target. The target network segment refers to the IP address range of the network device that can receive the data packet when the data packet is routed and forwarded in the network. The jump target refers to the next network node that the data packet leaves the current network node to when it is routed and forwarded in the network. The jump target can be a network node directly connected to the current network device, or it can be a farther network node, which is not limited in the embodiments of the present application. Among them, the jump target is also commonly referred to as the next hop.
[0117] When the target network segment in the routing rule of the local gateway device is the intranet segment of the VPC, indicating that the data is expected to be forwarded to the VPC, the next hop in the routing rule is configured as the IP address of the local gateway device, so that the cloud data can be sent to the local gateway device first, and then forwarded to the VPC by the local gateway device.
[0118] For example, when the intranet segment of the VPC is 172.16.0.0 / 12, the routing rules of the local gateway device are shown in Table 1 below.
[0119] Table 1 Routing table of local gateway device
[0120] Target network segment Next hop 172.16.0.0 / 12 The IP address of the local gateway device
[0121] In some embodiments, the routing rules also include data types. When the target network segment in the routing rules of the local gateway device is the intranet network segment of multiple storage devices, and the data type in the routing rules is a preset type, it indicates that cloud data of the preset type is expected to be forwarded to the storage device. Therefore, the next hop in the routing rule can be configured to be the IP address of the first storage device. The first storage device is also a storage device for storing cloud data of a preset type. By configuring the routing rules according to the target network segment and the data type, the local gateway device can forward cloud data of different data types to the corresponding storage device, thereby realizing distributed storage of data locally according to the data type.
[0122] For example, when the target network segment in the routing rule is the intranet network segment of multiple storage devices and the data type is multimedia type, the next hop in the routing rule is configured to be the IP address of storage device 1.
[0123] In some embodiments, the routing rules also include a real-time level. When the target network segment in the routing rules of the local gateway device is an intranet segment of multiple storage devices, and the real-time level in the routing rules is a preset level, it indicates that cloud data of the preset level is expected to be forwarded to the storage device. Therefore, the next hop in the routing rule can be configured to be the IP address of the second storage device. Among them, the second storage device is also a storage device for storing cloud data of a preset level. By configuring the routing rules according to the target network segment and the real-time level, the local gateway device can forward cloud data of different real-time levels to the corresponding storage device, thereby realizing distributed storage of data locally according to real-time performance.
[0124] For example, when the target network segment in the routing rule is the intranet network segment of multiple storage devices and the real-time level is the first level, the next hop in the routing rule is configured to be the IP address of storage device 3.
[0125] In some embodiments, the routing rule also includes a device tag. The device tag is used to identify the storage device. For example, the device tag can be an identifier such as a device number or device ID of the storage device. When the target network segment in the routing rule of the local gateway device is an intranet network segment of multiple storage devices, and the device tag in the routing rule is a device identifier of the target storage device, it indicates that the cloud data is expected to be forwarded to the target storage device. Therefore, the next hop in the routing rule can be configured to be the IP address of the target storage device.
[0126] (2) Configure routing rules for border routers.
[0127] When the target network segment in the routing rule of the border router is the intranet network segment of OSS, indicating that the data is expected to be forwarded to OSS, the next hop in the routing rule is configured to be the first port of the border router. The border router is connected to the VPC through the first port. By configuring the next hop as the first port, after the border router receives data whose target network segment is the intranet network segment of OSS, the data can be sent to the router in the VPC through the first port, and then the router in the VPC forwards the data to OSS, thereby sending the data to OSS. Optionally, the above data can be data sent by a storage device to OSS, such as a data migration request.
[0128] When the target network segment in the routing rule of the border router is the intranet network segment of the VPC, indicating that the data is expected to be forwarded to the VPC, the next hop in the routing rule is configured as the second port of the border router. The border router is connected to the access device through the second port. By configuring the next hop as the second port, after the border router receives data whose target network segment is the intranet network segment of the VPC, the data can be sent to the router in the VPC through the second port, and then the router in the VPC forwards the data to the access device, and then the access device, local gateway device, core switch and other network devices forward the data to the storage device. Optionally, the above data can be data sent by OSS to the storage device, such as data migration response, cloud data, etc.
[0129] In addition, when the target network segment in the routing rule of the border router is the intranet network segment of the storage device, it indicates that the data is expected to be forwarded to the storage device. Therefore, the next hop in the routing rule can be configured as the second port of the border router.
[0130] For example, when the intranet segment of the VPC is 172.16.0.0 / 12, the intranet segment of the OSS is 172.30.0.0 / 12, and the intranet segment of the storage device is 192.168.0.0 / 16, the routing rules of the border router are shown in Table 2 below.
[0131] Table 2 Routing table of border router
[0132] Target network segment Next hop 172.30.0.0 / 12 R11 (the first port of the border router) 172.16.0.0 / 12 R12 (the second port of the border router) 192.168.0.0 / 16 R12 (the second port of the border router)
[0133] (3) Configure routing rules for the cloud gateway device. The cloud gateway device is the gateway device of the VPC, and the cloud gateway device is connected to the border router.
[0134] When the target network segment in the routing rules of the cloud gateway device is the intranet network segment of multiple storage devices, the data is expected to be forwarded to the storage device. Therefore, the next hop in the routing rule is configured to be the first port of the cloud router. Among them, the cloud router is connected to the border router through the first port. By configuring the next hop as the first port, after the cloud router receives data whose target network segment is the intranet network segment of the storage device, the data can be forwarded to the border router through the first port, and then the border router, access device, local gateway device, core switch and other network devices forward the data to the storage device. Optionally, the above data can also be data sent by OSS to the storage device, such as data migration response, cloud data, etc.
[0135] For example, when the intranet segment of the storage device is 192.168.0.0 / 16, the routing rules of the cloud gateway device are shown in Table 3 below.
[0136] Table 3 Routing table of cloud gateway devices
[0137] Target network segment Next hop 192.168.0.0 / 16 R21 (the first port of the cloud gateway device)
[0138] The above steps (1)-(3) mainly introduce the process of configuring routing rules of network devices.
[0139] It should be noted that, in some embodiments, the above configuration process can be implemented through any storage device in the local computer room, that is, the technician can configure the routing rules of multiple network devices on the transmission link through the storage device in the local computer room, so as to enable data migration between the storage device and the OSS through the transmission link.
[0140] In addition, to ensure that data communication can be carried out normally through the transmission link, the IP address of the physical port (local gateway device) on the local computer room side and the IP address of the physical port on the cloud (the first port of the border router) need to be in the same network segment, and the vlan_id of the two must also be consistent. For example, the IP address of the local gateway device is 10.0.0.2 / 30, and the IP address of the physical port on the cloud is 10.0.0.1 / 30, and the subnet masks of both are 255.255.255.252.
[0141] The embodiment of the present application provides a data migration method, which can efficiently and securely migrate cloud data from the cloud to a local storage device through a transmission link between a local storage device and a private network on the cloud. Since the transmission link can support dedicated line transmission, compared with data migration through the public network, data migration through the transmission link can not only reduce network problems such as unstable network quality and limited network speed, but also prevent data from being stolen during transmission, thereby improving the efficiency, stability and security of data migration.
[0142] Figure 5 is a block diagram of a data migration device provided according to an embodiment of the present application. The device is used to execute the steps of the above-mentioned data migration method. Figure 5 The data migration device includes: a determination module 501, a division module 502 and a migration module 503.
[0143] The determination module 501 is used to determine the cloud data to be migrated, where the cloud data is stored in the cloud private network VPC based on the object storage service OSS;
[0144] A division module 502 is used to divide the cloud data to be migrated and obtain data identifiers corresponding to multiple storage devices, where the data identifiers are used to identify the cloud data;
[0145] The migration module 503 is used to download the cloud data to be migrated to multiple storage devices through a transmission link based on the data identifiers corresponding to the multiple storage devices, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices. The transmission link includes multiple storage devices, a switch connected to at least one storage device, a border router and a VPC, and the switch and the border router are both used to forward data.
[0146] In some embodiments, the cloud data includes object data stored in a plurality of directories, and the data identifier is a directory in which the object data is stored;
[0147] The partitioning module 502 is used to obtain the directory structure of the cloud data to be migrated, where the directory structure is used to represent multiple directories storing the object data to be migrated; based on the number of multiple storage devices, the multiple directories are partitioned to obtain multiple directories corresponding to the multiple storage devices.
[0148] In some embodiments, the cloud data includes object data stored in a plurality of directories, and the data identifier is a directory in which the object data is stored;
[0149] The partitioning module 502 is used to obtain the directory structure of the cloud data to be migrated, where the directory structure is used to represent multiple directories storing the object data to be migrated; based on the directory attributes of the multiple directories, the multiple directories are partitioned to obtain multiple directories corresponding to multiple storage devices, where the directory attributes include at least one of a data type and a real-time level, where the data type is used to represent the data type of the object data stored in the directory, and the real-time level is used to represent the real-time nature of the object data stored in the directory.
[0150] In some embodiments, the migration module 503 is used to divide the multiple directories corresponding to any storage device into multiple directory queues based on the number of multiple processes running in the storage device, the multiple directory queues correspond one-to-one to the multiple processes, and the directory queue includes multiple directories; through the multiple processes running in the storage device, the multiple directories in the multiple directory queues and the object data in the multiple directories are downloaded in parallel.
[0151] In some embodiments, the migration module 503 is also used to determine the target directory from the directory queue corresponding to the process when any process is abnormally interrupted, the target directory being the directory where the object data being downloaded when the process is abnormally interrupted is located; and re-download the object data stored in the target directory through the process.
[0152] In some embodiments, the migration module 503 is further configured to overwrite the second object data with the first object data if the second object data exists in the storage device when the first object data is successfully downloaded through the process, and the second object data has the same name as the first object data.
[0153] In some embodiments, Figure 6 is a block diagram of another data migration device provided according to an embodiment of the present application, such as Figure 6 As shown, the device also includes:
[0154] A sending module 504 is used to send a data migration request to the OSS through a transmission link in response to a data migration instruction, wherein the data migration instruction is used to instruct to download the cloud data to be migrated, and the data migration request is used to request to download the cloud data to be migrated;
[0155] The migration module 503 is further configured to execute the step of downloading the cloud data through the transmission link when receiving a data migration response returned by the OSS.
[0156] In some embodiments, the apparatus further comprises:
[0157] Configuration module 505 is used to configure routing rules of a local gateway device, a border router and a cloud gateway device respectively. The local gateway device is a gateway device for multiple storage devices, and the cloud gateway device is a gateway device for a VPC. The cloud gateway device is connected to the border router.
[0158] In some embodiments, the routing rule includes a target network segment and a jump target;
[0159] Configuration module 505 is used to configure the jump target in the routing rule to be the IP address of the local gateway device when the target network segment in the routing rule of the local gateway device is the intranet network segment of the VPC; when the target network segment in the routing rule of the border router is the intranet network segment of the OSS, configure the jump target in the routing rule to be the first port of the border router, and the border router is connected to the VPC through the first port; when the target network segment in the routing rule of the border router is the intranet network segment of the VPC, configure the jump target in the routing rule to be the second port of the border router, and the border router is connected to the access device through the second port, and the access device is used to support external network devices to access the VPC; when the target network segment in the routing rule of the cloud gateway device is the intranet network segment of multiple storage devices, configure the jump target in the routing rule to be the first port of the cloud router, and the cloud router is connected to the border router through the first port.
[0160] In some embodiments, the routing rule further includes a data type;
[0161] Configuration module 505 is used to configure the jump target in the routing rule to be the IP address of the first storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of multiple storage devices and the data type in the routing rule is a preset type. The first storage device is used to store cloud data of the preset type.
[0162] In some embodiments, the routing rules further include a real-time level;
[0163] Configuration module 505 is used to configure the jump target in the routing rule to be the IP address of the second storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of multiple storage devices and the real-time level in the routing rule is a preset level. The second storage device is used to store cloud data of the preset level.
[0164] In some embodiments, the routing rule further includes a device tag, the device tag being used to identify the storage device;
[0165] Configuration module 505 is used to configure the jump target in the routing rule to be the IP address of the target storage device when the target network segment in the routing rule of the local gateway device is the intranet network segment of multiple storage devices and the device label in the routing rule is the device identifier of the target storage device.
[0166] In some embodiments, for any storage device, the storage device is connected to a core switch, which is a switch located at the core layer; the port of the core switch is connected to the port of the access device through a dedicated optical fiber, and the access device is used to support external network devices to access the VPC; the access device is connected to the VPC through a border router.
[0167] The embodiment of the present application provides a data migration device, which can efficiently and securely migrate cloud data from the cloud to a local storage device through a transmission link between a local storage device and a private network on the cloud. Since the transmission link can support dedicated line transmission, compared with data migration through the public network, data migration through the transmission link can not only reduce network problems such as unstable network quality and limited network speed, but also prevent data from being stolen during transmission, thereby improving the efficiency, stability and security of data migration.
[0168] It should be noted that the data migration device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data migration device provided in the above embodiment and the data migration method embodiment belong to the same concept. The specific implementation process is shown in the method embodiment and will not be repeated here.
[0169] Figure 7700 is a schematic diagram of a terminal structure provided according to an embodiment of the present application. The terminal 700 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 700 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0170] Typically, the terminal 700 includes a processor 701 and a memory 702 .
[0171] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0172] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one computer program, which is used to be executed by the processor 701 to implement the data migration method provided in the method embodiment of the present application.
[0173] In some embodiments, the terminal 700 may further optionally include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707 and a power supply 708.
[0174] The peripheral device interface 703 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 701 and the memory 702. In some embodiments, the processor 701, the memory 702, and the peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral device interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0175] The radio frequency circuit 704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 704 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 704 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0176] The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to collect touch signals on the surface or above the surface of the display screen 705. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 705 can be one, set on the front panel of the terminal 700; in other embodiments, the display screen 705 can be at least two, respectively set on different surfaces of the terminal 700 or in a folding design; in other embodiments, the display screen 705 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 700. Even, the display screen 705 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 705 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.
[0177] The camera assembly 706 is used to capture images or videos. In some embodiments, the camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 706 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0178] The audio circuit 707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 701 for processing, or input them into the radio frequency circuit 704 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 700. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 707 may also include a headphone jack.
[0179] The power supply 708 is used to power various components in the terminal 700. The power supply 708 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 708 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0180] In some embodiments, the terminal 700 further includes one or more sensors 709 , including but not limited to: an acceleration sensor 710 , a gyroscope sensor 711 , a pressure sensor 712 , an optical sensor 713 , and a proximity sensor 714 .
[0181] The acceleration sensor 710 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 700. For example, the acceleration sensor 710 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 701 can control the display screen 705 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 710. The acceleration sensor 710 can also be used to collect motion data of games or users.
[0182] The gyro sensor 711 can detect the body direction and rotation angle of the terminal 700, and the gyro sensor 711 can cooperate with the acceleration sensor 710 to collect the user's 3D actions on the terminal 700. The processor 701 can implement the following functions based on the data collected by the gyro sensor 711: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0183] The pressure sensor 712 can be set on the side frame of the terminal 700 and / or the lower layer of the display screen 705. When the pressure sensor 712 is set on the side frame of the terminal 700, it can detect the user's holding signal of the terminal 700, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 712. When the pressure sensor 712 is set on the lower layer of the display screen 705, the processor 701 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0184] The optical sensor 713 is used to collect the ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the display screen 705 according to the ambient light intensity collected by the optical sensor 713. Optionally, when the ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is reduced. In another embodiment, the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 713.
[0185] The proximity sensor 714, also called a distance sensor, is disposed on the front panel of the terminal 700. The proximity sensor 714 is used to collect the distance between the user and the front of the terminal 700. In one embodiment, when the proximity sensor 714 detects that the distance between the user and the front of the terminal 700 is gradually decreasing, the processor 701 controls the display screen 705 to switch from the screen-on state to the screen-off state; when the proximity sensor 714 detects that the distance between the user and the front of the terminal 700 is gradually increasing, the processor 701 controls the display screen 705 to switch from the screen-off state to the screen-on state.
[0186] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal 700, and the terminal 700 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0187] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the data migration method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0188] The embodiment of the present application also provides a computer program product, including a computer program, which is executed by a processor to implement the data migration method in the embodiment of the present application.
[0189] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0190] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data migration method, characterized in that: The method comprises: Determine the cloud data to be migrated, where the cloud data is stored in a private cloud network VPC based on an object storage service OSS; Dividing the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices, where the data identifiers are used to identify the cloud data; Based on the data identifiers corresponding to the multiple storage devices, the cloud data to be migrated is downloaded to the multiple storage devices through a transmission link, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices. The transmission link includes the multiple storage devices, a switch connected to at least one of the storage devices, a border router and the VPC, and the switch and the border router are both used to forward data.
2. The method according to claim 1, characterized in that The cloud data includes object data stored in a plurality of directories, and the data identifier is a directory storing the object data; The dividing the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices includes: Acquire a directory structure of the cloud data to be migrated, where the directory structure is used to represent a plurality of directories storing object data to be migrated; The multiple directories are divided based on the number of the multiple storage devices to obtain multiple directories corresponding to the multiple storage devices.
3. The method according to claim 1, characterized in that The cloud data includes object data stored in a plurality of directories, and the data identifier is a directory storing the object data; The dividing the cloud data to be migrated to obtain data identifiers corresponding to multiple storage devices includes: Acquire a directory structure of the cloud data to be migrated, where the directory structure is used to represent a plurality of directories storing object data to be migrated; Based on directory attributes of the multiple directories, the multiple directories are divided to obtain multiple directories corresponding to the multiple storage devices, the directory attributes include at least one of a data type and a real-time level, the data type is used to represent the data type of the object data stored in the directory, and the real-time level is used to represent the real-time nature of the object data stored in the directory.
4. The method according to claim 2 or 3, characterized in that: The downloading the cloud data to be migrated to the multiple storage devices through a transmission link based on the data identifiers corresponding to the multiple storage devices includes: For any storage device, based on the number of multiple processes running in the storage device, multiple directories corresponding to the storage device are divided into multiple directory queues, the multiple directory queues correspond to the multiple processes one by one, and the directory queues include multiple directories; The plurality of directories in the plurality of directory queues and the object data in the plurality of directories are downloaded in parallel through the plurality of processes running in the storage device.
5. The method according to claim 4, characterized in that The method further comprises: In the case of abnormal interruption of any process, determining a target directory from a directory queue corresponding to the process, the target directory being the directory where the object data being downloaded when the process is abnormally interrupted is located; The object data stored in the target directory is re-downloaded by the process.
6. The method according to claim 5, characterized in that The method further comprises: In the case where the first object data is successfully downloaded through the process, if the second object data exists in the storage device, the second object data is overwritten by the first object data, and the second object data has the same name as the first object data.
7. The method according to claim 1, characterized in that The method further comprises: In response to a data migration instruction, sending a data migration request to the OSS through the transmission link, wherein the data migration instruction is used to instruct downloading the cloud data to be migrated, and the data migration request is used to request downloading the cloud data to be migrated; When a data migration response returned by the OSS is received, a step of downloading the cloud data through the transmission link is executed.
8. The method according to claim 1, characterized in that The method further comprises: The routing rules of the local gateway device, the border router and the cloud gateway device are configured respectively, the local gateway device is the gateway device of the multiple storage devices, the cloud gateway device is the gateway device of the VPC, and the cloud gateway device is connected to the border router.
9. The method according to claim 8, characterized in that The routing rule includes a target network segment and a jump target; The respectively configuring the routing rules of the local gateway device, the border router and the cloud gateway device includes: When the target network segment in the routing rule of the local gateway device is the intranet network segment of the VPC, configure the jump target in the routing rule to be the IP address of the local gateway device; When the target network segment in the routing rule of the border router is the intranet network segment of the OSS, the jump target in the routing rule is configured to be the first port of the border router, and the border router is connected to the VPC through the first port; When the target network segment in the routing rule of the border router is the intranet network segment of the VPC, the jump target in the routing rule is configured to be the second port of the border router, the border router is connected to the access device through the second port, and the access device is used to support external network devices to access the VPC; When the target network segment in the routing rule of the cloud gateway device is the intranet network segment of the multiple storage devices, the jump target in the routing rule is configured to be the first port of the cloud router, and the cloud router is connected to the border router through the first port.
10. The method according to claim 8, characterized in that The routing rules also include data types; The step of configuring the routing rules of the local gateway device includes: When the target network segment in the routing rule of the local gateway device is the intranet segment of the multiple storage devices, and the data type in the routing rule is a preset type, the jump target in the routing rule is configured to be the IP address of the first storage device, and the first storage device is used to store cloud data of the preset type.
11. The method according to claim 8, characterized in that The routing rules also include a real-time level; The step of configuring the routing rules of the local gateway device includes: When the target network segment in the routing rule of the local gateway device is the intranet segment of the multiple storage devices, and the real-time level in the routing rule is a preset level, the jump target in the routing rule is configured to be the IP address of the second storage device, and the second storage device is used to store the cloud data of the preset level.
12. The method according to claim 8, characterized in that The routing rule also includes a device tag, and the device tag is used to identify the storage device; The step of configuring the routing rules of the local gateway device includes: When the target network segment in the routing rule of the local gateway device is the intranet segment of the multiple storage devices and the device label in the routing rule is the device identifier of the target storage device, the jump target in the routing rule is configured to be the IP address of the target storage device.
13. The method according to claim 1, characterized in that For any storage device, the storage device is connected to a core switch, and the core switch is a switch located at the core layer; The port of the core switch is connected to the port of the access device through a dedicated optical fiber, and the access device is used to support external network devices to access the VPC; The access device is connected to the VPC through the border router.
14. A data migration device, characterized in that: The device comprises: A determination module, used to determine cloud data to be migrated, wherein the cloud data is stored in a private cloud network VPC based on an object storage service OSS; A partitioning module, used to partition the cloud data to be migrated, and obtain data identifiers corresponding to multiple storage devices, wherein the data identifiers are used to identify the cloud data; A migration module is used to download the cloud data to be migrated to the multiple storage devices through a transmission link based on the data identifiers corresponding to the multiple storage devices, so that the cloud data identified by the corresponding data identifiers are stored in the multiple storage devices. The transmission link includes the multiple storage devices, a switch connected to at least one of the storage devices, a border router and the VPC, and the switch and the border router are both used to forward data.
15. A computer device, characterized in that: The computer device includes a processor and a memory, the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor to execute the data migration method described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the data migration method described in any one of claims 1 to 13.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data migration method according to any one of claims 1 to 13 is implemented.
