Edge cloud collaborative multi-data center sharing method and system based on transaction management
Through the edge cloud collaborative multi-data center sharing method based on transaction management, the optimal node is selected for file transmission, which solves the problems of low data transmission security and efficiency in the prior art, and realizes secure and efficient data transmission.
Patent Information
- Application Number
- CN202310854990.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-14
AI Technical Summary
The existing edge cloud collaborative multi-data center sharing technology has security and reliability problems during data transmission, especially the file transfer protocol (FTP) is vulnerable to hackers, data interfaces are vulnerable, and network disk tools and cloud services may cause data. Leaks or abuses, and data conflicts affect data consistency and atomicity, and network abnormalities lead to low transmission efficiency.
Using the edge cloud collaborative multi-data center sharing method based on transaction management, multiple superior nodes are obtained through the configuration file of the current node, and the optimal node is selected for file transmission. If the network is abnormally restored, offset transmission will be performed, breakpoint transmission will be continued and re-transmitted. If the number of transmissions exceeds the threshold, the optimal node will be determined based on the historical transmission record, and the transaction manager is used to ensure file verification code consistency and transmission integrity, ensuring data security and efficiency.
By selecting the optimal node for file transmission, the security and transmission efficiency of data are guaranteed, unauthorized users are avoided to obtain files, the reliability and consistency of data transmission is improved, and the transmission efficiency impact caused by network abnormalities is reduced.
Smart Images

Figure CN119316404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data sharing, and in particular to an edge-cloud collaborative multi-data center sharing method and system based on transaction management. Background Art
[0002] With the development of the Internet and cloud computing, data is becoming increasingly important in economic and social activities, and data availability and fault tolerance have become one of the key factors in ensuring the operation of the economy and society. In enterprises, edge-cloud collaborative multi-data center sharing can be used to improve data availability and fault tolerance and reduce the operating costs of enterprises. After the corporate headquarters uploads data, the data is shared layer by layer to branches at all levels.
[0003] However, the current edge-cloud collaborative multi-data center sharing has some defects. First of all, in the data sharing method: the current mainstream data sharing methods include sharing data files through the File Transfer Protocol (FTP); sharing data by establishing a data interface; sharing data through network disk tools (such as Dropbox, Google Drive, etc.), third-party data platforms (such as Amazon S3, etc.) or cloud services (such as Amazon S3, Google BigQuery, Microsoft Azure Data Lak, etc.).
[0004] Among them, the File Transfer Protocol (FTP) uses plain text transmission during the transmission process, which is vulnerable to hacker attacks, so the security and reliability of files during the transmission process cannot be guaranteed; if there are no protective measures for the established data interface, it is vulnerable to attacks by attackers through interface vulnerabilities, so the security of files during the transmission process cannot be guaranteed; network disk tools, third-party data platforms and cloud services may cause data leakage or abuse, and cannot guarantee the privacy of corporate data files.
[0005] Secondly, when edge-cloud collaborative sharing of multiple data centers is carried out, data conflicts will affect the consistency and atomicity of the data, resulting in inaccurate transmitted data; and the upper-level data center selected by a certain data center during transmission may have network anomalies, resulting in multiple failed retransmissions, affecting data transmission efficiency. Summary of the invention
[0006] In order to overcome the above-mentioned deficiencies of the prior art, the present invention proposes an edge-cloud collaborative multi-data center sharing method based on transaction management, comprising:
[0007] Obtain multiple upper-level nodes that can perform file transfer with the current node through the configuration file of the current node, and select an upper-level node from them to transfer a specific file to the current node;
[0008] If a network anomaly occurs during the transmission process and then recovers, the specific file is transferred offset according to the transaction manager of the current node;
[0009] If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node for the transmission of the specific file is determined according to the historical transmission records of each upper-level node.
[0010] Preferably, selecting an upper-level node to transfer a specific file includes:
[0011] Select the first upper-level node with which file transfer can be performed in the upper level to transfer specific files;
[0012] The current node receives the upper-level notification file and its file verification code sent by the upper-level node;
[0013] Calculate the file checksum of the received superior notification file at the current node;
[0014] Compare the calculated file verification code with the received file verification code. If they are the same, use the current node to send a transmission request to the superior node according to the superior notification file to transmit the specific file;
[0015] Otherwise, the upper node is requested to resend the upper notification file until the file verification code is the same, and then the transmission request is sent to transmit the specific file.
[0016] Preferably, the step of selecting a superior node to transmit a specific file to the current node, after the transmission is completed, further includes:
[0017] Compare the file verification codes of each specific file in the current node before and after the transfer. If they are the same, the transfer is completed;
[0018] Otherwise, the transaction manager of the current node is used to delete the specific file and retransmit it until the file verification codes of the specific file before and after the transmission are the same, and the transmission is completed.
[0019] Preferably, after the transmission is completed, the method further includes:
[0020] The notification files generated during the current node transmission process are stored on disk;
[0021] If the file verification codes of the notification files before and after storage are the same, storage is complete. Otherwise, the notification file is deleted and re-stored using the transaction manager of the current node until the file verification codes of the notification files before and after storage are the same.
[0022] Preferably, after the plate placement is completed, the method further comprises:
[0023] Use the upper node to receive the disk placement confirmation information sent by the current node;
[0024] If the upper-level node does not receive the disk confirmation information, the upper-level node is used to retransmit the specific file to the current node until the disk confirmation information is received.
[0025] Preferably, the historical transmission record of the upper-level node includes: the upper-level node number, the cumulative number of file transmissions, the total number of breakpoint resume transmissions, the number of failed retransmissions and the cumulative number of transmitted file bytes.
[0026] Preferably, the method for acquiring the historical transmission record of each upper-level node is:
[0027] When the upper node transfers a file to the current node, the cumulative number of file transfers of the upper node increases by 1 each time a specific file is transferred;
[0028] Each time a network interruption is detected and the transmission is resumed, the total number of breakpoint resume transmissions of the upper node increases by 1;
[0029] Each time a failed retransmission is detected, the number of failed retransmissions of the upper node increases by 1;
[0030] Each time a specific file is correctly transmitted, the cumulative transmitted file byte volume of the upper node is added to the byte volume of the specific file;
[0031] The initial values of the cumulative number of file transfers, the total number of breakpoint resume transfers, the number of failed retransmissions, and the cumulative number of transferred file bytes of the upper node are all 0;
[0032] The parent node number is set according to the specific data center level and node order.
[0033] Preferably, determining the optimal node according to the historical transmission record of each upper-level node includes:
[0034] Calculate the network status score of each parent node by using the historical transmission records of each parent node and the node scoring function;
[0035] Get the parent node with the highest network status score as the optimal node.
[0036] Preferably, the calculation formula of the scoring function is:
[0037]
[0038] Among them, f(n0,n1,n2,n3) represents the network status score of the upper-level node, n0 represents the cumulative number of file transmissions, n1 represents the cumulative number of breakpoint resume transmissions, n2 represents the cumulative number of failed retransmissions, and n3 represents the cumulative file transmission volume.
[0039] Based on the same inventive concept, the present invention proposes an edge-cloud collaborative multi-data center sharing system based on transaction management, including: a multi-layer data center, the first layer of data center is the root node, and each layer of data center after the second layer includes multiple nodes; each node includes a transaction manager module, which is used to realize the offset transmission of the current node, the transmission of specific files, the generation of historical transmission records, and the selection of the optimal node;
[0040] Each node includes its configuration file, which is used to determine the upper-level node and the lower-level node that can perform file transfer with the node.
[0041] Preferably, multiple upper-level nodes that can perform file transfer with the current node are obtained through the configuration file of the current node, and an upper-level node is selected from the upper-level nodes to transfer a specific file to the current node;
[0042] If a network anomaly occurs during the transmission process and then recovers, the specific file is transferred offset according to the transaction manager of the current node;
[0043] If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node for the transmission of the specific file is determined according to the historical transmission records of each upper-level node.
[0044] Preferably, selecting an upper-level node to transfer a specific file includes:
[0045] Select the first upper-level node with which file transfer can be performed in the upper level to transfer specific files;
[0046] The current node receives the upper-level notification file and its file verification code sent by the upper-level node;
[0047] Calculate the file checksum of the received superior notification file at the current node;
[0048] Compare the calculated file verification code with the received file verification code. If they are the same, use the current node to send a transmission request to the superior node according to the superior notification file to transmit the specific file;
[0049] Otherwise, the upper node is requested to resend the upper notification file until the file verification code is the same, and then the transmission request is sent to transmit the specific file.
[0050] Preferably, the step of selecting a superior node to transmit a specific file to the current node, after the transmission is completed, further includes:
[0051] Compare the file verification codes of each specific file in the current node before and after the transfer. If they are the same, the transfer is completed;
[0052] Otherwise, the transaction manager of the current node is used to delete the specific file and retransmit it until the file verification codes of the specific file before and after the transmission are the same, and the transmission is completed.
[0053] Preferably, after the transmission is completed, the method further includes:
[0054] The notification files generated during the current node transmission process are stored on disk;
[0055] If the file verification codes of the notification files before and after storage are the same, storage is complete. Otherwise, the notification file is deleted and re-stored using the transaction manager of the current node until the file verification codes of the notification files before and after storage are the same.
[0056] Preferably, after the plate placement is completed, the method further comprises:
[0057] Use the upper node to receive the disk placement confirmation information sent by the current node;
[0058] If the upper-level node does not receive the disk confirmation information, the upper-level node is used to retransmit the specific file to the current node until the disk confirmation information is received.
[0059] The historical transmission record of the upper node includes: the upper node number, the cumulative number of file transmissions, the total number of breakpoint resume transmissions, the number of failed retransmissions and the cumulative number of transmitted file bytes.
[0060] Preferably, the method for acquiring the historical transmission record of each upper-level node is:
[0061] When the upper node transfers a file to the current node, the cumulative number of file transfers of the upper node increases by 1 each time a specific file is transferred;
[0062] Each time a network interruption is detected and the transmission is resumed, the total number of breakpoint resume transmissions of the upper node increases by 1;
[0063] Each time a failed retransmission is detected, the number of failed retransmissions of the upper node increases by 1;
[0064] Each time a specific file is correctly transmitted, the cumulative transmitted file byte volume of the upper node is added to the byte volume of the specific file;
[0065] The initial values of the cumulative number of file transfers, the total number of breakpoint resume transfers, the number of failed retransmissions, and the cumulative number of transferred file bytes of the upper node are all 0;
[0066] The parent node number is set according to the specific data center level and node order.
[0067] The determining of the optimal node according to the historical transmission record of each upper node includes:
[0068] Calculate the network status score of each parent node by using the historical transmission records of each parent node and the node scoring function;
[0069] Get the parent node with the highest network status score as the optimal node.
[0070] Preferably, the calculation formula of the scoring function is:
[0071]
[0072] Among them, f(n0,n1,n2,n3) represents the network status score of the upper-level node, n0 represents the cumulative number of file transmissions, n1 represents the cumulative number of breakpoint resume transmissions, n2 represents the cumulative number of failed retransmissions, and n3 represents the cumulative file transmission volume.
[0073] Compared with the closest prior art, the present invention has the following beneficial effects:
[0074] The present invention provides an edge-cloud collaborative multi-data center sharing method and system based on transaction management. Multiple upper-level nodes that can perform file transfer with the current node are obtained through the configuration file of the current node, and an upper-level node is selected from them to transfer a specific file to the current node; if the network is restored after an abnormality occurs during the transmission process, the specific file is offset transmitted according to the transaction manager of the current node; if the number of breakpoint resumption and retransmission during the transmission process is greater than a preset abnormality threshold, the optimal node is determined according to the historical transmission record of each upper-level node to transmit the specific file; the upper-level node is selected for file transfer according to the configuration file, that is, unauthorized users or unauthorized nodes cannot obtain the transmission file, thereby ensuring the security of the data; the specific file recovered after the network abnormality is offset transmitted, which has higher transmission efficiency than retransmission; the optimal node is determined for file transfer using the historical transmission record of each upper-level node, thereby ensuring the file transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 A flowchart of an edge-cloud collaborative multi-data center sharing method based on transaction management provided by the present invention;
[0076] Figure 2 A structural diagram of an edge-cloud collaborative multi-data center sharing system based on transaction management provided by the present invention;
[0077] Figure 3 It is a schematic diagram of communication between the upper node and the lower node;
[0078] Figure 4 It is the flow chart of breakpoint resume and failure retransmission;
[0079] Figure 5 Optimize the selection diagram for the parent node. DETAILED DESCRIPTION
[0080] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0081] Embodiment 1:
[0082] The present invention provides a transaction management-based edge-cloud collaborative multi-data center sharing method, such as Figure 1 As shown, including:
[0083] S1. Obtain multiple upper-level nodes that can perform file transfer with the current node through the configuration file of the current node, and select an upper-level node from them to transfer a specific file to the current node;
[0084] S2. If a network anomaly occurs during the transmission and then recovers, the specific file is transferred offset according to the transaction manager of the current node;
[0085] S3. If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node is determined according to the historical transmission records of each upper-level node to transmit the specific file.
[0086] In step S1, multiple upper-level nodes that can perform file transfer with the current node are obtained through the configuration file of the current node, and an upper-level node is selected from the upper-level nodes to transfer a specific file to the current node, which specifically includes:
[0087] S11. The user uploads multiple specific files to be transmitted from the user node to the root node of the multi-layer data center, and uses the transaction manager of the root node to pull multiple specific files to the storage medium of the root node using multi-threading, and calculates the file verification code of each specific file before and after the transmission. If the file verification code is the same, the transmission is completed. If it is different, the specific file transmitted to the root node is deleted and retransmitted until the file verification code is the same. Specific files are transmitted from the root node downward in sequence, specifically:
[0088] S12, obtaining multiple upper nodes that can perform file transfer with the current node through the configuration file of the current node, the configuration file of the current node includes the upper nodes and lower nodes that the current node can perform file transfer with, unauthorized users and unauthorized nodes cannot connect to the system, ensuring the security of data; Figure 2 As shown, starting from the third layer of the data center, the configuration file of each node specifies multiple upper nodes that can perform file transfer, but only one upper node can be selected for transfer at the same time.
[0089] S13, such as Figure 3 As shown, the first upper node in the upper level that can transfer files with the current node is selected by default to transfer specific files, and the current node receives the upper notification file and its file verification code sent by the upper node;
[0090] Calculate the file verification code of the received superior notification file at the current node; compare the calculated file verification code with the received file verification code, if they are the same, use the current node to send a transmission request to the superior node according to the superior notification file to transmit the specific file;
[0091] Otherwise, the upper node is requested to resend the upper notification file until the file verification code is the same, and then the transmission request is sent to transmit the specific file.
[0092] The direct connection between upper and lower nodes is a long connection, which can reduce the number of frequent connection establishment and closing, improve efficiency, and in order to ensure efficient transmission between nodes, multi-threaded transmission is supported between nodes.
[0093] When the upper-level node transfers a file to the current node, the historical transmission record of each upper-level node is stored in the memory area of the current node. The upper-level node here refers to the upper-level node that can be connected to the current node as defined in the configuration file of the current node. The historical transmission record includes the upper-level node number, the cumulative number of file transmissions, the total number of breakpoint resume transmissions, the number of failed retransmissions and the cumulative number of transferred file bytes.
[0094] S14, selecting a superior node from among them to transmit a specific file to the current node, and after the transmission is completed, Figure 4 As shown, it also includes:
[0095] Compare the file verification codes of each specific file in the current node before and after the transfer. If they are the same, the transfer is completed;
[0096] Otherwise, it means that the specific file is damaged during the transmission process. The transaction manager of the current node is used to delete the specific file whose file verification code is inconsistent before and after the transmission, and the specific file is retransmitted until the file verification code of the specific file before and after the transmission is the same, that is, the file verification code of the specific file in the upper node and the current node is consistent, then the transmission is completed, ensuring the consistency of the data; and the transaction manager is used to update the number of failed retransmissions of the upper node in the memory area of the current node.
[0097] After all the transmissions are completed correctly, that is, the file verification codes before and after the transmission of each specific file are consistent, a notification file is created on the current node, which includes the storage path of each specific file on the current node and other business data. The business data is the business data in the notification file transmitted from the upper node to the current node. The naming method of the notification file is: "upper node number-lower node number-notification file sequence number".
[0098] S15, after the transmission is completed, the process further includes: generating a checksum of the notification file of the current node before the notification file is stored on the disk, storing the notification file generated during the transmission of the current node on the disk, writing the notification file from the memory to the hard disk, and calculating the file checksum of the notification file in the hard disk;
[0099] If the file verification codes of the notification files before and after storage are the same, the storage is complete. Otherwise, the notification file is deleted and stored again using the transaction manager of the current node. The storage is complete until the file verification codes of the notification files before and after storage are the same, thus ensuring the atomicity of the data. Then the upper node is notified that the notification file has been stored.
[0100] If a power outage or other failure occurs during the disk transfer process, the notification file of the current node is completely lost. During the next restart, the parent node of the current node does not receive the disk transfer confirmation. The parent node will resend the notification file and the corresponding file verification code to the current node and re-start the file transfer from step S13.
[0101] The file verification code includes an MD5 value, a sha1 value or a sha256 value.
[0102] After the current node completes the disk placement, the notification file will be transmitted to all subordinate nodes connected to the node. The transaction manager of each subordinate node will start multiple threads to pull the specific files involved in the notification file from the superior node and generate a corresponding notification file. The process of the subordinate node pulling the specific files and generating the notification file is the same as the steps of the current node obtaining the specific files and generating the notification file. Similarly, the specific files are transmitted to the subordinate nodes of multiple data centers in turn.
[0103] In step S2, if a network anomaly occurs during the transmission and then recovers, the specific file is transferred offset according to the transaction manager of the current node, such as Figure 4 As shown, specifically including:
[0104] If a network anomaly occurs during the transmission of a specific file from the upper node to the current node and then recovers, the transaction manager of the current node will resume the transmission of the specific file, that is, transfer the file offset according to the saved file size displayed by the file descriptor of the specific file. During this process, the transaction manager will update the number of resume transmissions of the upper node in the memory area. Resuming transmission has higher transmission efficiency than retransmission.
[0105] In step S3, if the number of breakpoint resume and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node is determined to transmit the specific file according to the historical transmission record of each upper node, which specifically includes:
[0106] The method for obtaining the historical transmission record of each upper-level node is:
[0107] When the upper node transfers a file to the current node, the cumulative number of file transfers of the upper node increases by 1 each time a specific file is transferred;
[0108] Each time a network interruption is detected and the transmission is resumed, the total number of breakpoint resume transmissions of the upper node increases by 1;
[0109] Each time a failed retransmission is detected, the number of failed retransmissions of the upper node increases by 1;
[0110] Each time a specific file is correctly transmitted, the cumulative transmitted file byte volume of the upper node is added to the byte volume of the specific file;
[0111] The initial values of the cumulative number of file transfers, the total number of breakpoint resume transfers, the number of failed retransmissions, and the cumulative number of transferred file bytes of the upper node are all 0;
[0112] The parent node number is set according to the specific data center level and node order.
[0113] If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node is determined according to the historical transmission records of each upper node, such as Figure 5 As shown, specifically including:
[0114] Calculate the network status score of each parent node by using the historical transmission records of each parent node and the node scoring function;
[0115] The superior node with the highest network status score is obtained as the optimal node. The optimal node is determined for file transfer based on the network status of the superior node, ensuring the efficiency of file transfer.
[0116] The calculation formula of the scoring function is:
[0117]
[0118] Among them, f(n0,n1,n2,n3) represents the network status score of the upper node, n0 represents the cumulative number of file transmissions, n1 represents the cumulative number of breakpoint resume transmissions, n2 represents the cumulative number of failed retransmissions, and n3 represents the cumulative file transmission volume. Figure 5 As shown, the scores of the three upper-level nodes [21, 22, 23] are approximately 5.88, 3.11, and 9.91, respectively. Node 23 should be selected as the optimal node.
[0119] Embodiment 2:
[0120] Based on the same inventive concept, the present invention also provides an edge-cloud collaborative multi-data center sharing system based on transaction management, such as Figure 2As shown, it includes: multiple layers of data centers, the first layer of data centers is the root node, and each layer of data centers after the second layer includes multiple nodes; each node includes a transaction manager module, which is used to realize the offset transmission of the current node, the transmission of specific files, the generation of historical transmission records and the selection of the optimal node; each node includes its configuration file, which is used to determine the upper node and lower node that can perform file transfer with the node.
[0121] Specifically, multiple upper-level nodes that can perform file transfer with the current node are obtained through the configuration file of the current node, and an upper-level node is selected from the upper-level nodes to transfer a specific file to the current node;
[0122] If a network anomaly occurs during the transmission process and then recovers, the specific file is transferred offset according to the transaction manager of the current node;
[0123] If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node for the transmission of the specific file is determined according to the historical transmission records of each upper-level node.
[0124] The step of selecting an upper-level node to transfer a specific file includes:
[0125] Select the first upper-level node with which file transfer can be performed in the upper level to transfer specific files;
[0126] The current node receives the upper-level notification file and its file verification code sent by the upper-level node;
[0127] Calculate the file checksum of the received superior notification file at the current node;
[0128] Compare the calculated file verification code with the received file verification code. If they are the same, use the current node to send a transmission request to the superior node according to the superior notification file to transmit the specific file;
[0129] Otherwise, the upper node is requested to resend the upper notification file until the file verification code is the same, and then the transmission request is sent to transmit the specific file.
[0130] The step of selecting a superior node to transmit a specific file to the current node, and after the transmission is completed, further includes:
[0131] Compare the file verification codes of each specific file in the current node before and after the transfer. If they are the same, the transfer is completed;
[0132] Otherwise, the transaction manager of the current node is used to delete the specific file and retransmit it until the file verification codes of the specific file before and after the transmission are the same, and the transmission is completed.
[0133] The file verification code includes an MD5 value, a sha1 value or a sha256 value.
[0134] After the transmission is completed, the following further includes:
[0135] The notification files generated during the current node transmission process are stored on disk;
[0136] If the file verification codes of the notification files before and after storage are the same, storage is complete. Otherwise, the notification file is deleted and re-stored using the transaction manager of the current node until the file verification codes of the notification files before and after storage are the same.
[0137] The notification file includes the storage path of each specific file at the current node and other business data.
[0138] After the placement is completed, the following steps are also included:
[0139] Use the upper node to receive the disk placement confirmation information sent by the current node;
[0140] If the upper-level node does not receive the disk confirmation information, the upper-level node is used to retransmit the specific file to the current node until the disk confirmation information is received.
[0141] The historical transmission record of the upper node includes: the upper node number, the cumulative number of file transmissions, the total number of breakpoint resume transmissions, the number of failed retransmissions and the cumulative number of transmitted file bytes.
[0142] The method for obtaining the historical transmission record of each upper-level node is:
[0143] When the upper node transfers a file to the current node, the cumulative number of file transfers of the upper node increases by 1 each time a specific file is transferred;
[0144] Each time a network interruption is detected and the transmission is resumed, the total number of breakpoint resume transmissions of the upper node increases by 1;
[0145] Each time a failed retransmission is detected, the number of failed retransmissions of the upper node increases by 1;
[0146] Each time a specific file is correctly transmitted, the cumulative transmitted file byte volume of the upper node is added to the byte volume of the specific file;
[0147] The initial values of the cumulative number of file transfers, the total number of breakpoint resume transfers, the number of failed retransmissions, and the cumulative number of transferred file bytes of the upper node are all 0;
[0148] The parent node number is set according to the specific data center level and node order.
[0149] The determining of the optimal node according to the historical transmission record of each upper node includes:
[0150] Calculate the network status score of each parent node by using the historical transmission records of each parent node and the node scoring function;
[0151] Get the parent node with the highest network status score as the optimal node.
[0152] The calculation formula of the scoring function is:
[0153]
[0154] Among them, f(n0,n1,n2,n3) represents the network status score of the upper-level node, n0 represents the cumulative number of file transmissions, n1 represents the cumulative number of breakpoint resume transmissions, n2 represents the cumulative number of failed retransmissions, and n3 represents the cumulative file transmission volume.
[0155] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.
Claims
1. A transaction management-based edge-cloud collaborative multi-data center sharing method, characterized in that: include: Obtain multiple upper-level nodes that can perform file transfer with the current node through the configuration file of the current node, and select an upper-level node from them to transfer a specific file to the current node; If a network anomaly occurs during the transmission process and then recovers, the specific file is transferred offset according to the transaction manager of the current node; If the number of breakpoint resumption and retransmission during the transmission process is greater than the preset abnormal threshold, the optimal node for the transmission of the specific file is determined according to the historical transmission records of each upper-level node.
2. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 1, characterized in that: Select an upper node to transfer specific files, including: Select the first upper-level node with which file transfer can be performed in the upper level to transfer specific files; The current node receives the upper-level notification file and its file verification code sent by the upper-level node; Calculate the file checksum of the received superior notification file at the current node; Compare the calculated file verification code with the received file verification code. If they are the same, use the current node to send a transmission request to the superior node according to the superior notification file to transmit the specific file; Otherwise, the upper node is requested to resend the upper notification file until the file verification code is the same, and then the transmission request is sent to transmit the specific file.
3. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 1, characterized in that: The step of selecting a superior node to transmit a specific file to the current node, and after the transmission is completed, further includes: Compare the file verification codes of each specific file in the current node before and after the transfer. If they are the same, the transfer is completed; Otherwise, the transaction manager of the current node is used to delete the specific file and retransmit it until the file verification codes of the specific file before and after the transmission are the same, and the transmission is completed.
4. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 3, characterized in that: After the transmission is completed, the following further includes: The notification files generated during the current node transmission process are stored on disk; If the file verification codes of the notification files before and after storage are the same, storage is complete. Otherwise, the notification file is deleted and re-stored using the transaction manager of the current node until the file verification codes of the notification files before and after storage are the same.
5. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 4, characterized in that: After the placement is completed, the following steps are also included: Use the upper node to receive the disk placement confirmation information sent by the current node; If the upper-level node does not receive the disk confirmation information, the upper-level node is used to retransmit the specific file to the current node until the disk confirmation information is received.
6. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 1, characterized in that: The historical transmission record of the upper node includes: the upper node number, the cumulative number of file transmissions, the total number of breakpoint resume transmissions, the number of failed retransmissions and the cumulative number of transmitted file bytes.
7. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 6, characterized in that: The method for obtaining the historical transmission record of each upper-level node is: When the upper node transfers a file to the current node, the cumulative number of file transfers of the upper node increases by 1 each time a specific file is transferred; Each time a network interruption is detected and the transmission is resumed, the total number of breakpoint resume transmissions of the upper node increases by 1; Each time a failed retransmission is detected, the number of failed retransmissions of the upper node increases by 1; Each time a specific file is correctly transmitted, the cumulative transmitted file byte volume of the upper node is added to the byte volume of the specific file; The initial values of the cumulative number of file transfers, the total number of breakpoint resume transfers, the number of failed retransmissions, and the cumulative number of transferred file bytes of the upper node are all 0; The parent node number is set according to the specific data center level and node order.
8. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 6, characterized in that: The determining of the optimal node according to the historical transmission record of each upper node includes: Calculate the network status score of each parent node by using the historical transmission records of each parent node and the node scoring function; Get the parent node with the highest network status score as the optimal node.
9. The edge-cloud collaborative multi-data center sharing method based on transaction management as claimed in claim 8, characterized in that: The calculation formula of the scoring function is: Among them, f(n0,n1,n2,n3) represents the network status score of the upper-level node, n0 represents the cumulative number of file transmissions, n1 represents the cumulative number of breakpoint resume transmissions, n2 represents the cumulative number of failed retransmissions, and n3 represents the cumulative file transmission volume.
10. An edge-cloud collaborative multi-data center sharing system based on transaction management, characterized in that: include: Multi-layer data center, the first layer of data center is the root node, and each layer of data center after the second layer includes multiple nodes; each node includes a transaction manager module, which is used to realize the offset transmission of the current node, the transmission of specific files, the generation of historical transmission records, and the selection of the optimal node; Each node includes its configuration file, which is used to determine the upper-level node and the lower-level node that can perform file transfer with the node.