A method and system for cloud phone multi-machine cloning cross-regional data transmission

By adopting multi-threaded transmission and differential data technology in cross-region data transmission of cloud mobile phone multi-machine cloning, the efficiency and consistency problems of traditional data transmission methods in cross-region data cloning are solved, and efficient and reliable data migration and management are achieved.

CN119342060BActive Publication Date: 2025-03-14WENZHOU TIANQIN NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411844820.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-14
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

In a complex environment of multiple regions and multiple devices, traditional data transmission methods are difficult to achieve efficient cross-region data cloning, especially in terms of network latency, data consistency and security.

Method used

A cloud mobile phone multi-machine cloning cross-region data transmission method is adopted to improve data migration efficiency through multi-threaded transmission and differential data technology. The method includes a user submitting a cloning task request, generating a task list, performing link authentication of source instances and target instances, logically dividing data blocks, generating differential data blocks, and transmitting the differential data blocks to the target area through a multi-threaded transmission process.

Benefits of technology

It significantly improves the efficiency of data migration, optimizes the utilization of computing and network resources, ensures data consistency and integrity, enhances user experience and management convenience, and improves the stability and availability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342060B_ABST
    Figure CN119342060B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of multi-machine cloning cross-regional data transmission, specifically a method and system for multi-machine cloning cross-regional data transmission of a cloud phone; first, a user submits a cloning task request, the system generates a task list according to the request, calculates the required resources and allocates them to the target area, establishes a task framework diagram, then logically divides the instance data, marks the difference data blocks, and authenticates the link relationship between instances through a dual link protocol, then combines multi-threading technology to transmit the difference data blocks, and dynamically balances thread task allocation to optimize efficiency. During the transmission process, the system performs consistency verification on the data, detects and retransmits the erroneous data blocks, and uses a timeout and a maximum number of mechanisms to avoid infinite retransmissions. The final target instance completes data reconstruction by merging the difference data blocks, and verifies data consistency through a hash value. The present invention is based on task management, data sharding, link authentication, and verification and repair to ensure efficient and secure data cloning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-machine cloning cross-regional data transmission, and in particular to a method and system for cloud phone multi-machine cloning cross-regional data transmission. Background Art

[0002] In recent years, with the rapid development of digitalization and intelligence, the demand for device management and data synchronization has increased. Especially in complex environments with multiple regions and multiple devices, how to quickly and efficiently achieve data replication and transmission has become the focus of industry attention. Traditional data transmission methods are usually limited to the same physical area. Synchronization through the intranet is relatively simple, but in cross-regional scenarios, due to network latency, data consistency and security issues, achieving efficient data cloning is a big challenge. At the same time, although the existing point-to-point transmission technology has made certain progress in data migration between devices, such as completing mobile phone data cloning within a short distance through Bluetooth, etc., when the number of devices is large and distributed in different regions, the transmission efficiency and technical capabilities still cannot meet actual needs.

[0003] A Chinese invention patent with announcement number CN113645251B discloses a data transmission method suitable for cross-regional services, the method comprising: receiving a service call request, which includes a service identifier of a target service to be called; determining whether the target service belongs to a first service domain based on the service identifier and routing configuration information; if so, calling the target service based on the service call request and the service information of the target service in the routing configuration information; if not, forwarding the service call request to a second middleware corresponding to the superior organization in response to the first organization having a superior organization but no subordinate organization.

[0004] However, in business scenarios that require rapid synchronization of a large number of devices, if the problems of data transmission speed and consistency between regions cannot be effectively solved, the overall operation and maintenance efficiency will be greatly limited. For example, in a multi-computer room environment across the country, each computer room has several cloud phones. If data needs to be quickly cloned to multiple cloud phones in different regions through one cloud phone, it is a technical difficulty to achieve rapid consistency of content across the entire network. At present, some business needs also include global content synchronization between multiple devices. For example, one cloud phone can quickly copy content to multiple target cloud phones distributed in different computer rooms to ensure that these cloud phones can reach a state consistent with the source cloud phone in a short time. Such requirements involve data synchronization between large-scale devices and also place higher requirements on the speed, efficiency and stability of cross-regional cloning transmission. Summary of the invention

[0005] The purpose of the present invention is to address the problems existing in the background technology and to propose a method and system for cross-regional data transmission of multi-machine cloning of cloud phones.

[0006] The technical solution of the present invention is a method for transmitting data across regions by cloning multiple cloud phones, including the following specific implementation steps:

[0007] S1. The user submits a clone task request;

[0008] S2, generate a task list according to the cloned task request, allocate the computing and network resources required for the task, activate the task flow logic, and initialize the task;

[0009] S3. Based on the link protocol of mutual authentication between the two parties, complete the link authentication between the source instance and the target instance in the target area, logically divide the data of the source cloud phone instance and the target instance, generate independent and transmittable data blocks, compare the hash values ​​of the split data blocks of the source cloud phone instance and the target instance, mark the differentiated data blocks, and use the generated differential data as the transmission content;

[0010] S4. Start the multi-thread transmission process, assign the difference data blocks to the corresponding threads, use the thread pool to manage the transmission tasks, add each task to the task queue, and the thread pool takes the task out of the queue and hands it to the corresponding thread for processing. Any thread is responsible for transmitting the assigned difference data block from the source instance to the target instance in the target area through the network transmission protocol;

[0011] Wherein, the difference data block is a segment of the difference data;

[0012] S5. Perform consistency check on the transmitted data. If a data block error or loss is detected, the automatic retransmission mechanism is immediately triggered to retransmit the transmission process of the monitoring difference data block;

[0013] S6. After verification and retransmission are completed, the target instance in the target area reconstructs the received differential data and merges the differential data blocks into the target instance to form a complete data set, performs data consistency verification, and synchronizes the differential data to complete the data cloning task;

[0014] S7. Release the computing and network resources used to clone the data to the target instance, update the instance resource pool information of the target area, record the status and configuration of the cloned instance, visualize the completion status of the data cloning task of the target instance, and generate a detailed report.

[0015] Preferably, the generation process of difference data is as follows:

[0016] S21, split the source instance information S in the clone task request T into multiple smaller logical data blocks, and obtain the data blocks of the source instance { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in the source instance through the hash algorithm: ;

[0017] in, Represents the i-th data block of the source instance The hash value of

[0018] S22, data sharding is performed on any target instance I in the successfully linked clone target area, and the storage space of the target instance I is divided into multiple data blocks { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in the target instance I through the hash algorithm: ;

[0019] in, Respectively represent the i-th data block of target instance I The hash value of

[0020] S23, identify the difference between the source instance and the target instance I, once the hash value of the data block is detected to be inconsistent, that is, ≠ , the i-th data block of the source instance has changed with the i-th data block of the target instance, and the difference data is recorded .

[0021] Preferably, the difference data block checking and transmission process in the transmission flow of retransmitting the monitoring difference data block is as follows:

[0022] S31, any thread M j After the data transmission is completed, any target instance I in the target area calculates the received difference data block The hash value and the difference data block of the source instance Compare the hash values ​​of

[0023] If H( )=H( ), then the difference data block is considered If the transmission is successful, otherwise the data block is marked as a transmission error and needs to be retransmitted;

[0024] S32: For any transmission error difference data block The check and repair module returns a retransmission request to the transmission management module, and the transmission management module sends the difference data blocks Rejoin the task queue and start the retransmission mechanism;

[0025] S33, when the number of retransmissions reaches the upper limit of the number of retransmissions After that, if the difference data block If the transmission still fails, the difference data blocks that cannot be successfully transmitted are recorded. , generate error logs, record the specific circumstances of the errors in detail, and notify administrators through the alarm mechanism for manual intervention.

[0026] Preferably, the implementation process of the retransmission mechanism is as follows:

[0027] S41, record any difference data block of transmission error The current number of retransmissions and the difference data block Regenerate a transmission task and reallocate it to a thread in the thread pool;

[0028] S42, set the upper limit of retransmission times , each time a retransmission is triggered, check the difference data block The number of retransmissions that have been performed. If the number of retransmissions reaches the upper limit, retransmissions will be stopped and recorded.

[0029] S43. During the retransmission process, a timeout period T is set for each retransmission. timeout That is, if the data transmission is not completed within this time, the transmission is considered to have failed and retransmission is triggered. After each timeout, the retransmission mechanism will restart. The calculation formula for the retransmission time is:

[0030] ;

[0031] In the formula, Indicates the maximum waiting time for retransmission, that is, the time consumed from initiating a retransmission request to completing the entire process of data block retransmission; Indicates setting the upper limit of retransmission times; R indicates the current number of retransmissions.

[0032] Preferably, the reconstruction process of any target instance in the target area to reconstruct the received difference data is as follows:

[0033] S51: Any target instance I in the target area receives a difference data block transmitted by any thread. After that, the difference data block Temporarily store the difference data blocks in the temporary storage area of ​​the target instance I. Merge into the target instance to form a complete dataset :

[0034] ;

[0035] In the formula, represents the complete dataset reconstructed by any target instance I; Represents the original basic data set in the target instance I; represents the difference data block transmitted from the source instance; N' represents the number of difference data blocks; M represents the number of threads corresponding to each data block;

[0036] S52: After completing the data merging, the target instance I performs a data consistency check and performs a hash operation on the complete data set reconstructed by the target instance I to obtain a hash value H( )=Hash( ), and compare it with the hash value H( ) for comparison;

[0037] If H( )=H( ), it means that the data of target instance I is correctly reconstructed and there is no problem in the data transmission process; if the hash values ​​are inconsistent, it means that an error occurs in the data reconstruction;

[0038] S53: When the data is merged and verified, the target instance I performs data synchronization and reconstructs the complete data set. Store it to the final storage location of the target instance I, completing the instance reconstruction process.

[0039] Preferably, the link authentication process for completing the link authentication of the source instance and the target instance in the target area is as follows:

[0040] S61. The source instance randomly selects an integer α and calculates the data cloning permission parameter P c =α×P, the data cloning permission parameter P c Publicizing to target instances in the target area;

[0041] Among them, P is the generator of the additive cyclic group;

[0042] S62: clone any target instance I in the target area, obtain its own ID, and save its own parameters {id, c , P};

[0043] S63, the source instance randomly selects an integer x, calculates a first-order link confirmation parameter PL1=x×P, and transmits it to the target instance I;

[0044] S64. After receiving the first-order link confirmation parameter PL1, the target instance I randomly selects an integer β and calculates the second-order link confirmation parameter PL2=β×P and the first-order information confirmation parameter PI1=β×P. c , second-order information confirmation parameter PI2=H0(PI1)×PL1, third-order information confirmation parameter PI3=PI1+PI2;

[0045] Based on this, the third-order link confirmation parameter PL3=id+H0(PL1, PL2, PI3) and the fourth-order link confirmation parameter PL4=H0(PL2, PI3, id) are calculated, and then the parameter group {PL2, PL3, PL4} is transmitted to the source instance;

[0046] Where H0 represents the hash function, H0: {0, 1} * →{0, 1} n , n is the output length of the hash function, {0, 1} * Represents a binary string of arbitrary length;

[0047] S65. After receiving the parameter group {PL2, PL3, PL4} sent by the target instance I, the source instance calculates the first-order cloning parameter ClP1=α×PL2, the second-order cloning parameter ClP2=H0(ClP1)×PL1, and the third-order cloning parameter ClP3=ClP1+ClP2;

[0048] Based on this, the clone number id'=PL3-H0(PL1, PL2, ClP3) of the target instance I is calculated, and the fifth-order link confirmation parameter PL5=H0(PL2, ClP3, id') is calculated;

[0049] If PL5=PL4, the source instance is initially linked successfully with any target instance I in the target region, and then the source instance continues to calculate the clone confirmation parameter CPC=H0(PL1, PL2, ClP3, id'), and transmits the clone confirmation parameter CPC to the target instance I;

[0050] S66. After receiving the clone confirmation parameter CPC, the target instance I compares whether the equation CPC=H0(PL1, PL2, PI3, id) holds. If the equation holds, the target instance I confirms that it has successfully linked to the source instance and completes the link authentication process between the source instance and any target instance in the target area.

[0051] Preferably, the computing and network resources required for the allocation of tasks are implemented based on a resource scheduling algorithm, whose objective function is:

[0052] ;

[0053] In the formula, It represents the time consumption of allocating resources to task i, which is affected by the resource status of the target area; represents the time overhead of task i in the scheduling stage; n represents the total number of task nodes in the task framework, that is, the number of task units that need to be executed.

[0054] Preferably, the instance resource pool information of the target area refers to the global management data of the cloud phone instances in the target area, which is used to support dynamic allocation of tasks and efficient management of instances. The resource pool records each instance's own number, current operating status, virtual hardware parameters, operating system version and pre-installed application list, and also includes the binding relationship with network bandwidth and storage nodes. In addition, the resource pool also stores the creation time, source information and operation log of the cloned instance.

[0055] The technical solution of the present invention is a cloud phone multi-machine cloning cross-regional data transmission system, which is used to execute the above-mentioned cloud phone multi-machine cloning cross-regional data transmission method, including:

[0056] The task management module is responsible for the creation, configuration and scheduling of tasks, receiving parameters input by the user, including but not limited to the source instance, target region and number of clones, generating a task list, and coordinating the execution of other modules through the task scheduling mechanism;

[0057] The data sharding and compression module is used to logically divide the source instance data according to the data type. For large files, a variable block size sharding algorithm is used to generate independent data blocks. At the same time, the differential technology is used to compare the data differences between the source instance and the target instance in the target area, and only the missing or changed parts are transmitted to obtain the differential data;

[0058] The transmission management module plays a core role in the cross-region data transmission process, establishes multi-threaded transmission channels and selects the best transmission protocol based on real-time network conditions, while supporting parallel transmission of multiple cloud phone instances;

[0059] The check and repair module is used to implement dynamic consistency check during data transmission, using hash values ​​to quickly detect data block errors or lost parts, and trigger an automatic retransmission mechanism;

[0060] The instance construction module is used to rebuild the cloud phone instance after the transfer is completed, ensuring the consistency of the target instance data with the source instance, while optimizing the cold start time and quickly completing instance recovery;

[0061] The user interaction module is used to provide an interface for task input, monitoring and operation, provide real-time feedback on task progress, and generate a detailed report after the task is completed.

[0062] Compared with the prior art, the above technical solution of the present invention has the following beneficial technical effects:

[0063] The present invention designs a method and system for cloud phone multi-machine cloning cross-regional data transmission, which improves data migration efficiency through multi-threaded transmission and differential data technology, optimizes the utilization of computing and network resources through dynamic resource allocation mechanism, reduces manual intervention through automated processing, enhances user experience and management convenience, and improves system stability and availability:

[0064] (1) Efficient data migration: Multi-threaded transmission and differential data technology significantly improve the efficiency of data migration. Multi-threaded transmission allows multiple data blocks to be transmitted simultaneously, while differential data technology only transmits changed data blocks, reducing the amount of data that needs to be transmitted, thereby speeding up the overall migration speed.

[0065] (2) Optimal resource utilization: The task management module rationally allocates computing and network resources based on user needs and resource conditions in the target area, avoiding waste and overuse of resources and ensuring high resource utilization under different load conditions.

[0066] (3) Data consistency and integrity assurance: The hash value of the data block is generated by the hash algorithm, and a comparison check is performed before and after data transmission to ensure data consistency and integrity. In addition, the automatic retransmission mechanism can immediately repair data when data errors or losses are detected, further enhancing data reliability;

[0067] (4) Unique instance linking protocol: When establishing the link relationship between the source instance and any target instance in the target area, a unique linking protocol is designed, which uses a mutual authentication method to ensure the security of data cloning permission parameters, adding an extra security layer to prevent unauthorized data access;

[0068] (5) Automated and intelligent management: The task management, resource allocation, data transmission, verification and repair steps involved in the entire solution are all automated, reducing the need for manual intervention. At the same time, the task status is visualized through the user interaction module, improving user experience and management convenience.

[0069] (6) Flexible network adaptability: The transmission management module can select the appropriate transmission protocol based on the real-time network status and establish multiple efficient transmission channels, which helps to adapt to different network environments and conditions and ensure the stability and efficiency of data transmission;

[0070] (7) Scalability and flexibility: The solution supports cross-regional data cloning and can easily migrate data from one data center to another, enabling enterprises or individuals to better cope with data processing needs in different geographical locations while also facilitating future expansion.

[0071] (8) Easy to monitor and maintain: Through the user interaction module, administrators can easily view the status and progress of data cloning tasks, discover and solve problems in a timely manner, simplify maintenance work, and improve system stability and availability. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1This is a system architecture diagram of a cloud phone multi-machine cloning cross-regional data transmission system proposed by the present invention;

[0073] Figure 2 This is a flow chart of a cloud phone multi-machine cloning cross-regional data transmission method proposed by the present invention;

[0074] Figure 3 A schematic diagram of the link relationship between the source instance and the target instance. DETAILED DESCRIPTION

[0075] Embodiment 1, as Figure 1 As shown, a cloud phone multi-machine cloning cross-regional data transmission system proposed by the present invention includes: a task management module, a data segmentation and compression module, a transmission management module, a verification and repair module, an instance construction module, and a user interaction module.

[0076] The task management module is responsible for the creation, configuration and scheduling of tasks, receiving parameters input by users, including but not limited to the source cloud phone instance (hereinafter referred to as the source instance), the target region and the number of clones, generating a task list, and coordinating the execution of other modules through the task scheduling mechanism;

[0077] The data sharding and compression module is used to logically divide the source instance data according to the data type. For large files, a variable block size sharding algorithm is used to generate independent data blocks. At the same time, differential technology is used to compare the data differences between the source instance and the target cloud phone (hereinafter referred to as the target instance) in the target area where the source instance data needs to be cloned. Only the missing or changed parts are transmitted to obtain differential data;

[0078] The transmission management module plays a core role in the cross-regional data transmission process, establishes a multi-threaded transmission channel and selects the best transmission protocol (including but not limited to HTTP / 2, QUIC) according to the real-time network conditions, and supports parallel transmission of multiple cloud phone instances, effectively shortening the transmission time and improving the transmission efficiency;

[0079] The check and repair module is used to implement dynamic consistency check during data transmission, using hash values ​​to quickly detect data block errors or lost parts, triggering the automatic retransmission mechanism for incremental repair, and providing reliable data support for subsequent instance construction;

[0080] The instance construction module is used to rebuild the cloud phone instance after the transfer is completed, ensuring the consistency of the target instance data with the source instance, while optimizing the cold start time and quickly completing instance recovery;

[0081] The user interaction module is used to provide an interface for task input, monitoring and operation, provide real-time feedback on task progress, and generate a detailed report after the task is completed, including but not limited to data transmission volume, cloning success rate and exception handling log, simplifying operations while improving user experience, and generating a detailed report after the task is completed.

[0082] Embodiment 2, as Figure 2-3 As shown, a cloud phone multi-machine cloning cross-regional data transmission method proposed in the present invention is applied to a cloud phone multi-machine cloning cross-regional data transmission system proposed in Example 1, such as Figure 2 As shown, it includes the following specific implementation steps:

[0083] S1. The user submits a cloning task request through the user interaction module, including but not limited to the source instance, target region, number of clones and other parameters, i.e., the cloning task request T={S, R, N, C, O};

[0084] Among them, S represents the source instance information, including the unique identifier S i and instance environment description (including but not limited to hardware configuration, operating system version and user data volume); R represents the target region information, that is, the physical location and resource status of the target data center; N represents the number of cloned instances, that is, the number of target instances I to be created; C represents the computing resource requirement, which defines the amount of CPU, memory and storage resources required to complete the task; O represents the task options used to specify, including but not limited to transmission priority, compression level and network policy.

[0085] S2. The task management module generates a task list based on the cloned task request and allocates the computing and network resources required for the task. The specific implementation process is as follows:

[0086] S21. According to the clone task request, the instance resource pool information of the target area is obtained, and the required resource amount is calculated to ensure that the target area can meet the task requirements. The resource demand model is expressed as:

[0087] ;

[0088] In the formula, C represents the total resource demand required for cloning task request T; Indicates the number of CPU cores required for each instance, which depends on the hardware configuration of the original instance; Indicates the memory size required by each instance, which is equal to the memory occupied by the source instance; Indicates the storage space required for each instance, which is determined by the amount of user data of the active instance;

[0089] It should be noted that the instance resource pool information of the target area refers to the global management data of the cloud phone instances in the target area, including but not limited to the number, status, configuration and associated resource information of the instances, which is used to support dynamic allocation of tasks and efficient management of instances. The resource pool records the number of each instance, the current running status (including but not limited to idle, busy or offline), virtual hardware parameters (including but not limited to CPU, memory and storage), operating system version and pre-installed application list, and also includes the binding relationship with network bandwidth and storage nodes. In addition, the resource pool also stores the creation time, source information and operation logs of the cloned instances, which is convenient for subsequent operation and maintenance management and problem tracking, and provides comprehensive data support for the life cycle management of cloud phone instances.

[0090] S22, generating a task framework according to the number of clones and target region resource information input by the user, the task framework describes the execution rules and dependencies of the task, and is represented by a graph structure as: G=(V, E);

[0091] Where V represents the set of task nodes, each of which corresponds to a logical data unit (including but not limited to the data type of the source instance) to be transmitted in the subsequent steps; E represents the set of task dependency edges, describing the order of task execution; G represents the task framework graph;

[0092] The definition of task nodes is as follows:

[0093] ;

[0094] In the formula, Represents a single task node; Representation Node The specific categories of data that need to be processed (including but not limited to system data, application data or user data); Indicates priority, which is assigned according to user settings or the importance of data blocks; Indicates the target device identifier, that is, the corresponding target instance I;

[0095] S23. Call the resource allocation algorithm to allocate the required computing and network resources to the task. The allocation algorithm is based on the following objective function:

[0096] ;

[0097] In the formula, It represents the time consumption of allocating resources to task i, which is affected by the resource status of the target area; represents the time cost of task i in the scheduling phase; n represents the total number of task nodes in the task framework, that is, the number of task units that need to be executed;

[0098] S24. After the resource allocation is completed, the task management module activates the task flow logic, prepares to coordinate the sharding, transmission and construction steps, instructs the data sharding and compression module to load the source instance's meta information (including but not limited to data types and file structures), and instructs the transmission management module to establish a transmission channel with the target area, and initializes the transmission protocol and network parameters;

[0099] S25. After completing the task initialization, record the initial task status, including but not limited to:

[0100] Task parameters: complete task description T;

[0101] Resource allocation results: record the amount of allocated CPU, memory, and storage resources;

[0102] Initial task graph: a structured description of logical task nodes and dependencies.

[0103] S3, data sharding and compression module logically divides the data of the source cloud phone instance and the target instance, extracts system data, user data and application data respectively, and uses a variable block size sharding algorithm for larger files to generate independent transferable data blocks. Then, the differential technology is used to compare the existing data in the target area, and only the differentiated data blocks are marked as the transfer content. The specific implementation process is as follows:

[0104] S31, split the source instance information S in the clone task request T into multiple smaller logical data blocks, and obtain the data blocks of the source instance { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in the source instance through a hash algorithm (including but not limited to SHA-256 or MD5): ;

[0105] in, Represents the i-th data block of the source instance The hash value of

[0106] S32. Before starting cross-region data transmission, Figure 3 As shown, a link relationship is established between the source instance and any target instance I in the clone destination area. The link process is as follows:

[0107] S3201. The source instance randomly selects an integer α and calculates the data cloning permission parameter P c =α×P, the data cloning permission parameter P c Publicizing to target instances in the target area;

[0108] Among them, P is the generator of the additive cyclic group;

[0109] S3202: clone any target instance I in the target area to obtain its own ID, save its own parameters {id, c , P};

[0110] S3203, the source instance randomly selects an integer x, calculates a first-order link confirmation parameter PL1=x×P, and transmits it to the target instance I;

[0111] S3204, after receiving the first-order link confirmation parameter PL1, the target instance I randomly selects an integer β, calculates the second-order link confirmation parameter PL2=β×P, and the first-order information confirmation parameter PI1=β×P c , second-order information confirmation parameter PI2=H0(PI1)×PL1, third-order information confirmation parameter PI3=PI1+PI2;

[0112] Based on this, the third-order link confirmation parameter PL3=id+H0(PL1, PL2, PI3) and the fourth-order link confirmation parameter PL4=H0(PL2, PI3, id) are calculated, and then the parameter group {PL2, PL3, PL4} is transmitted to the source instance;

[0113] Where H0 represents the hash function, H0: {0, 1} * →{0, 1} n , n is the output length of the hash function, {0, 1} * Represents a binary string of arbitrary length;

[0114] S3205. After receiving the parameter group {PL2, PL3, PL4} sent by the target instance I, the source instance calculates the first-order cloning parameter ClP1=α×PL2, the second-order cloning parameter ClP2=H0(ClP1)×PL1, and the third-order cloning parameter ClP3=ClP1+ClP2;

[0115] Based on this, the clone number id'=PL3-H0(PL1, PL2, ClP3) of the target instance I is calculated, and the fifth-order link confirmation parameter PL5=H0(PL2, ClP3, id') is calculated;

[0116] If PL5=PL4, the source instance is initially linked successfully with any target instance I in the target region, and then the source instance continues to calculate the clone confirmation parameter CPC=H0(PL1, PL2, ClP3, id'), and transmits the clone confirmation parameter CPC to the target instance I;

[0117] S3206. After receiving the clone confirmation parameter CPC, the target instance I compares whether the equation CPC=H0(PL1, PL2, PI3, id) holds. If the equation holds, the target instance I confirms that it has successfully linked to the source instance.

[0118] S33, data sharding is performed on any target instance I in the successfully linked clone target area, and the storage space of the target instance I is divided into multiple data blocks { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in target instance I through a hash algorithm (including but not limited to SHA-256 or MD5): ;

[0119] in, Respectively represent the i-th data block of target instance I The hash value of

[0120] It should be noted that when sharding data, the source instance and the target instance I use the same sharding logic and hash algorithm to ensure that the boundaries and sizes of each data block are completely consistent. Assume that the total amount of data in the source instance and the target instance I is |D src | and |D dst |, the number of data shards of the source instance and the target instance I is m, each data block of the source instance and the target instance I and Partitioning is done according to the same rules, i.e. the same shard size and structure;

[0121] S34, identify the difference between the source instance and the target instance I, once the hash value of the data block is detected to be inconsistent, that is, ≠ , the i-th data block of the source instance has changed with the i-th data block of the target instance, and the difference data is recorded .

[0122] S4. The transmission management module starts the multi-threaded transmission process under the instruction of the task management module, selects the appropriate transmission protocol (including but not limited to HTTP / 2 or QUIC) based on the real-time network conditions, establishes multiple efficient transmission channels, and transmits the difference data blocks. , and supports parallel threads to ensure maximum transmission efficiency and task progress. The specific implementation steps are as follows:

[0123] S41, assuming that there are N' difference data blocks, and M threads are used for parallel transmission, based on the definition dependency defined in the task framework graph G, the N' difference data blocks are allocated to the M threads, and the difference data processed by each thread is recorded as , the allocation formula is:

[0124] ;

[0125] In the formula, represents the fragment of the i-th difference data processed by the j-th thread;

[0126] It should be noted that in multi-threaded data transmission, reasonable thread scheduling and task allocation are the key to improving efficiency. It is necessary to ensure that the amount of tasks assigned to each thread is roughly equal, and try to avoid some threads being idle or overloaded during the transmission process. Load balancing is performed in a static or dynamic manner: Static load balancing: Evenly allocate difference data blocks to each thread so that the transmission task amount of each thread is roughly equal; Dynamic load balancing: During the transmission process, dynamically adjust the allocation of tasks according to the processing capacity and progress of each thread;

[0127] S42, use the thread pool to manage the transmission tasks, each task will be added to the task queue, the thread pool will take the task out of the queue and hand it over to the corresponding thread for processing;

[0128] S43, any thread M j Responsible for allocating the difference data blocks From the source instance to the target instance I, to avoid conflicts between threads, the task queue ensures that each task is processed by only one thread. During the transmission process, each thread will establish a connection with the target instance I and transmit data through the network transmission protocol;

[0129] S44: Issue a data transmission monitoring instruction to the verification and repair module, and continuously monitor the feedback instructions of the verification and repair module.

[0130] S5. During the data transmission process, the check and repair module performs dynamic consistency check on the transmitted data. If a data block error or loss is detected, the automatic retransmission mechanism is immediately triggered, and only the error difference data block is resent. The specific implementation process is as follows:

[0131] S51, any thread M j After the data transmission is completed, the target instance I will immediately calculate the received difference data block The hash value and the difference data block of the source instance , if H( )=H( ), then the difference data block is considered If the transmission is successful, otherwise the data block is marked as a transmission error and needs to be retransmitted;

[0132] S52: For any transmission error difference data block The check and repair module returns a retransmission request to the transmission management module, and the transmission management module sends the difference data block Rejoin the task queue and retransmit. The retransmission implementation process is as follows:

[0133] S5201, record any difference data block of transmission error The current number of retransmissions and the difference data block Regenerate a transmission task and reallocate it to a thread in the thread pool;

[0134] S5202: To prevent infinite retransmissions caused by network problems, set an upper limit on the number of retransmissions (the maximum number of retransmissions set in this embodiment is 3 retransmissions). Each time a retransmission is triggered, the transmission management module checks the difference data block. The number of retransmissions that have been performed. If the number of retransmissions reaches the upper limit, the transmission management module stops retransmissions and records them;

[0135] S5203. During the retransmission process, a timeout period T is set for each retransmission. timeout That is, if the data transmission is not completed within this time, the transmission is considered to have failed and retransmission is triggered. After each timeout, the retransmission mechanism will restart. The calculation formula for the retransmission time is:

[0136] ;

[0137] In the formula, Indicates the maximum waiting time for retransmission, that is, the time consumed from initiating a retransmission request to completing the entire process of data block retransmission; Indicates setting the upper limit of retransmission times; R indicates the current number of retransmissions;

[0138] S53, when the number of retransmissions reaches the upper limit of the number of retransmissions After that, if the difference data block If the transmission still fails, the transmission management module takes further measures:

[0139] (1) Error records and logs: Record the difference data blocks that cannot be successfully transmitted , and generate an error log to record the specific circumstances of the error in detail, including but not limited to the number of retransmissions, timeout time, and error cause;

[0140] (2) Alarm notification and manual intervention: If data cannot be transmitted within the specified number of retransmissions, the administrator will be notified through the alarm mechanism for manual intervention. The administrator will view the specific circumstances of the error through the user interaction module and take measures as needed (including but not limited to manually switching network channels, adjusting transmission parameters, or completing data recovery by manual means).

[0141] S6. After verification and retransmission are completed, the instance construction module starts to rebuild the target instance I in the target area and ensures that the running status of the target instance I is consistent with that of the source instance. The specific implementation steps are as follows:

[0142] S61: The target instance I receives a difference data block transmitted by any thread. After that, the difference data block Temporarily stored in the temporary storage area of ​​the target instance I, due to the difference in data blocks The difference between the source instance and the target instance I is calculated, and the difference data block Merge into the target instance to form a complete dataset :

[0143] ;

[0144] In the formula, represents the complete dataset reconstructed by any target instance I; Represents the original basic data set in the target instance I; represents the difference data block transmitted from the source instance; N' represents the number of difference data blocks; M represents the number of threads corresponding to each data block;

[0145] S62: After completing the data merge, the target instance I performs a data consistency check to ensure that the merged data set Dataset with source instance Keeping the same, perform hash operation on the complete data set reconstructed by target instance I to obtain hash value H( )=Hash( ), and compare it with the hash value H( ) for comparison;

[0146] If H( )=H( ), it means that the data of target instance I is correctly reconstructed and there is no problem in the data transmission process; if the hash values ​​are inconsistent, it means that an error occurs in the data reconstruction;

[0147] S63: When the data is merged and verified, the target instance I performs data synchronization and reconstructs the complete data set. The data is stored in the final storage location of the target instance I, including but not limited to a database, a file system or other storage media. After the synchronization is completed, the status of the target instance I will be updated to "completed", indicating the successful completion of the data cloning task.

[0148] S7. After the task is successfully completed, the task management module releases the computing and network resources occupied for cloning the data to the target instance I, and updates the instance resource pool information of the target area, records the status and configuration of the cloned instance, and sends the data cloning task completion instruction of the target instance I to the user interaction module. The user interaction module visualizes the completion status of the data cloning task of the target instance I and generates a detailed report.

[0149] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto, and various changes can be made within the knowledge scope of technicians in the relevant technical field without departing from the purpose of the present invention.

Claims

1. A cloud phone multi-machine cloning cross-regional data transmission method, characterized in that: The specific implementation steps include the following: S1. The user submits a clone task request; S2, generate a task list according to the cloned task request, allocate the computing and network resources required for the task, activate the task flow logic, and initialize the task; S3. Based on the link protocol of mutual authentication between the two parties, complete the link authentication between the source instance and the target instance in the target area, logically divide the data of the source cloud phone instance and the target instance, generate independent and transmittable data blocks, compare the hash values ​​of the split data blocks of the source cloud phone instance and the target instance, mark the differentiated data blocks, and use the generated differential data as the transmission content; The link authentication process to complete the link authentication of the source instance and the target instance in the target region is as follows: S61. The source instance randomly selects an integer α and calculates the data cloning permission parameter P c =α×P, the data cloning permission parameter P c Publicizing to target instances in the target area; Among them, P is the generator of the additive cyclic group; S62: clone any target instance I in the target area, obtain its own ID, and save its own parameters {id, c , P}; S63, the source instance randomly selects an integer x, calculates a first-order link confirmation parameter PL1=x×P, and transmits it to the target instance I; S64. After receiving the first-order link confirmation parameter PL1, the target instance I randomly selects an integer β and calculates the second-order link confirmation parameter PL2=β×P and the first-order information confirmation parameter PI1=β×P. c , second-order information confirmation parameter PI2=H0(PI1)×PL1, third-order information confirmation parameter PI3=PI1+PI2; Based on this, the third-order link confirmation parameter PL3=id+H0(PL1, PL2, PI3) and the fourth-order link confirmation parameter PL4=H0(PL2, PI3, id) are calculated, and then the parameter group {PL2, PL3, PL4} is transmitted to the source instance; Where H0 represents the hash function, H0: {0, 1} * →{0, 1} n , n is the output length of the hash function, {0, 1} * Represents a binary string of arbitrary length; S65. After receiving the parameter group {PL2, PL3, PL4} sent by the target instance I, the source instance calculates the first-order cloning parameter ClP1=α×PL2, the second-order cloning parameter ClP2=H0(ClP1)×PL1, and the third-order cloning parameter ClP3=ClP1+ClP2; Based on this, the clone number id'=PL3-H0(PL1, PL2, ClP3) of the target instance I is calculated, and the fifth-order link confirmation parameter PL5=H0(PL2, ClP3, id') is calculated; If PL5=PL4, the source instance is initially linked successfully with any target instance I in the target region, and then the source instance continues to calculate the clone confirmation parameter CPC=H0(PL1, PL2, ClP3, id'), and transmits the clone confirmation parameter CPC to the target instance I; S66. After receiving the clone confirmation parameter CPC, the target instance I compares whether the equation CPC=H0(PL1, PL2, PI3, id) holds. If the equation holds, the target instance I confirms that it has successfully linked to the source instance, completing the link authentication process between the source instance and any target instance in the target area. S4. Start the multi-thread transmission process, assign the difference data blocks to the corresponding threads, use the thread pool to manage the transmission tasks, add each task to the task queue, and the thread pool takes the task out of the queue and hands it to the corresponding thread for processing. Any thread is responsible for transmitting the assigned difference data block from the source instance to the target instance in the target area through the network transmission protocol; Wherein, the difference data block is a segment of the difference data; S5. Perform consistency check on the transmitted data. If a data block error or loss is detected, the automatic retransmission mechanism is immediately triggered to retransmit the transmission process of the monitoring difference data block; S6. After verification and retransmission are completed, the target instance in the target area reconstructs the received differential data and merges the differential data blocks into the target instance to form a complete data set, performs data consistency verification, and synchronizes the differential data to complete the data cloning task; S7. Release the computing and network resources used to clone the data to the target instance, update the instance resource pool information of the target area, record the status and configuration of the cloned instance, visualize the completion status of the data cloning task of the target instance, and generate a detailed report.

2. According to claim 1, a cloud phone multi-machine cloning cross-regional data transmission method is characterized in that: The process of generating difference data is as follows: S21, split the source instance information S in the clone task request T into multiple smaller logical data blocks, and obtain the data blocks of the source instance { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in the source instance through the hash algorithm: ; in, Represents the i-th data block of the source instance The hash value of S22, data sharding is performed on any target instance I in the successfully linked clone target area, and the storage space of the target instance I is divided into multiple data blocks { , , ..., }, for each data block Generate a unique identifier i, i.e. <i, >, and generate the hash value of each data block in the target instance I through the hash algorithm: ; in, Respectively represent the i-th data block of target instance I The hash value of S23, identify the difference between the source instance and the target instance I, once the hash value of the data block is detected to be inconsistent, that is, ≠ , the i-th data block of the source instance has changed with the i-th data block of the target instance, and the difference data is recorded .

3. According to claim 1, a cloud phone multi-machine cloning cross-regional data transmission method is characterized in that: The difference data block inspection and transmission process in the transmission flow of the retransmission monitoring difference data block is as follows: S31, any thread M j After the data transmission is completed, any target instance I in the target area calculates the received difference data block The hash value and the difference data block of the source instance Compare the hash values ​​of If H( )=H( ), then the difference data block is considered If the transmission is successful, otherwise the data block is marked as a transmission error and needs to be retransmitted; S32: For any transmission error difference data block The check and repair module returns a retransmission request to the transmission management module, and the transmission management module sends the difference data block Rejoin the task queue and start the retransmission mechanism; S33, when the number of retransmissions reaches the upper limit of the number of retransmissions After that, if the difference data block If the transmission still fails, the difference data blocks that cannot be successfully transmitted are recorded. , generate error logs, record the specific circumstances of the errors in detail, and notify administrators through the alarm mechanism for manual intervention.

4. According to claim 3, a cloud phone multi-machine cloning cross-regional data transmission method is characterized in that: The implementation process of the retransmission mechanism is as follows: S41, record any difference data block of transmission error The current number of retransmissions and the difference data block Regenerate a transmission task and reallocate it to a thread in the thread pool; S42, set the upper limit of retransmission times , each time a retransmission is triggered, check the difference data block The number of retransmissions that have been performed. If the number of retransmissions reaches the upper limit, retransmissions will be stopped and recorded. S43. During the retransmission process, a timeout period T is set for each retransmission. timeout That is, if the data transmission is not completed within this time, the transmission is considered to have failed and retransmission is triggered. After each timeout, the retransmission mechanism will restart. The calculation formula for the retransmission time is: ; In the formula, Indicates the maximum waiting time for retransmission, that is, the time consumed from initiating a retransmission request to completing the entire process of data block retransmission; Indicates setting the upper limit of retransmission times; R indicates the current number of retransmissions.

5. According to claim 1, a cloud phone multi-machine cloning cross-regional data transmission method is characterized in that: The reconstruction process of any target instance in the target area to reconstruct the received difference data is as follows: S51: Any target instance I in the target area receives a difference data block transmitted by any thread. After that, the difference data block Temporarily store the difference data blocks in the temporary storage area of ​​the target instance I. Merge into the target instance to form a complete dataset : ; In the formula, represents the complete dataset reconstructed by any target instance I; Represents the original basic data set in the target instance I; represents the difference data block transmitted from the source instance; N' represents the number of difference data blocks; M represents the number of threads corresponding to each data block; S52: After completing the data merging, the target instance I performs a data consistency check and performs a hash operation on the complete data set reconstructed by the target instance I to obtain a hash value H( )=Hash( ), and compare it with the hash value H( ) for comparison; If H( )=H( ), it means that the data of target instance I is correctly reconstructed and there is no problem in the data transmission process; if the hash values ​​are inconsistent, it means that an error occurs in the data reconstruction; S53: When the data is merged and verified, the target instance I performs data synchronization and reconstructs the complete data set. Store it to the final storage location of the target instance I, completing the instance reconstruction process.

6. A cloud phone multi-machine cloning cross-regional data transmission method according to claim 1, characterized in that: The computing and network resources required for allocating tasks are implemented based on a resource scheduling algorithm, whose objective function is: ; In the formula, It represents the time consumption of allocating resources to task i, which is affected by the resource status of the target area; represents the time overhead of task i in the scheduling stage; n represents the total number of task nodes in the task framework, that is, the number of task units that need to be executed.

7. According to claim 1, a cloud phone multi-machine cloning cross-regional data transmission method is characterized in that: The instance resource pool information of the target area refers to the global management data of the cloud phone instances in the target area, which is used to support dynamic allocation of tasks and efficient management of instances. The resource pool records each instance's own number, current operating status, virtual hardware parameters, operating system version and pre-installed application list, as well as the binding relationship with network bandwidth and storage nodes. In addition, the resource pool also stores the creation time, source information and operation log of the cloned instance.

8. A cloud phone multi-machine cloning cross-regional data transmission system, which is used to execute a cloud phone multi-machine cloning cross-regional data transmission method according to claims 1 to 7, characterized in that: include: The task management module is responsible for the creation, configuration and scheduling of tasks, receiving parameters input by the user, including but not limited to the source instance, target region and number of clones, generating a task list, and coordinating the execution of other modules through the task scheduling mechanism; The data sharding and compression module is used to logically divide the source instance data according to the data type. For large files, a variable block size sharding algorithm is used to generate independent data blocks. At the same time, the differential technology is used to compare the data differences between the source instance and the target instance in the target area, and only the missing or changed parts are transmitted to obtain the differential data; The transmission management module plays a core role in the cross-region data transmission process, establishes multi-threaded transmission channels and selects the best transmission protocol based on real-time network conditions, while supporting parallel transmission of multiple cloud phone instances; The check and repair module is used to implement dynamic consistency check during data transmission, using hash values ​​to quickly detect data block errors or lost parts, and trigger an automatic retransmission mechanism; The instance construction module is used to rebuild the cloud phone instance after the transfer is completed, ensuring the consistency of the target instance data with the source instance, while optimizing the cold start time and quickly completing instance recovery; The user interaction module is used to provide an interface for task input, monitoring and operation, provide real-time feedback on task progress, and generate a detailed report after the task is completed.

Citation Information

Patent Citations

  • Data transmission method and apparatus suitable for cross-regional services

    CN113645251B

  • Cloud mobile phone data cloning method and cloud mobile phone data restoring method

    CN110780889A

  • File block synchronization method based on distributed cloud platform

    CN113572812A