Method, device and equipment for distributing text in a downlink, and readable storage medium

CN115309533BActive Publication Date: 2026-09-11BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211078543.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2026-09-11
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

[0005]基于上述问题,本申请提供了一种分布式下传文本的方法、装置、设备及可读存储介质,通过利用分布式锁实现多节点自动的,不重复的同时进行文本下传处理,从而解决了文本下传的及时性和准确性较差的问题

Benefits of technology

[0049] As can be seen from the above technical solutions, compared with the prior art, this application has the following advantages:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309533B_ABST
    Figure CN115309533B_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed method, device and equipment of text download and readable storage medium, it can be applied to financial field.The method comprises the following steps: control multiple nodes simultaneously scan whether there is text in compliance with naming rules in shared folder;When the first node in the multiple nodes scans and exists the text in compliance with naming rules, obtain distributed lock;When the distributed lock is successfully acquired, obtain the download information corresponding to the text;The download information includes: download server address, account, password and text path;According to the download information, the text is downloaded.So, using distributed lock realizes multiple nodes automatically, not repeated text download processing simultaneously, reduces manual intervention, improves the timeliness and accuracy of text download.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the financial field, and in particular to a method, apparatus, device, and readable storage medium for distributed text download. Background Technology

[0002] With the rapid development of banking operations, the number of transactions requiring processing is increasing. Different systems within a bank frequently need to exchange data via text.

[0003] Upstream systems downloading text is the fastest and most convenient way for downstream systems to obtain the required text. Generally, to maintain system operation and data updates, text transmission between systems is continuous. Important text needs to reach downstream systems promptly to avoid impacting their normal operation. Existing technical solutions mostly target text downloading between two fixed systems. In complex banking scenarios, text downloading often requires manual intervention, affecting its timeliness and accuracy.

[0004] Therefore, how to reduce human intervention and improve the timeliness and accuracy of text download is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a method, apparatus, device, and readable storage medium for distributed text download. By utilizing distributed locks, it enables multiple nodes to automatically and simultaneously perform text download processing without duplication, thereby solving the problems of poor timeliness and accuracy in text download.

[0006] In a first aspect, embodiments of this application provide a method for distributed text download, including:

[0007] Control multiple nodes to simultaneously scan a shared folder for text that matches the naming rules;

[0008] When the first node among the plurality of nodes detects text that conforms to the naming rules, it acquires the distributed lock;

[0009] When the distributed lock is successfully acquired, the download information corresponding to the text is obtained;

[0010] The information transmitted includes: the server address, account, password, and text path.

[0011] The text is downloaded according to the downloaded information.

[0012] Optionally, acquiring the distributed lock when the first node among the plurality of nodes detects the existence of text conforming to the naming rules includes:

[0013] When the first node among the plurality of nodes detects text that conforms to the naming rules, the first node acquires the data information of the text;

[0014] The data information includes: text name;

[0015] Based on the data information in the text, obtain the distributed lock.

[0016] Optionally, before obtaining the download information corresponding to the text when the distributed lock is successfully acquired, the method further includes:

[0017] Determine whether the data information of the text exists in the distributed lock;

[0018] When the judgment result is yes, the acquisition of the distributed lock fails, and the first node continues to scan the shared folder to see if there is any text that matches the naming rules;

[0019] If the judgment result is negative, the distributed lock is successfully acquired.

[0020] Optionally, after downloading the text according to the downloaded information, the method further includes:

[0021] Move the text to the backup folder;

[0022] Record the backup results and download results.

[0023] Optionally, the record backup results and download results include:

[0024] The backup and download results are recorded in the data record table in text form;

[0025] The text states include: zero text state, first text state, second text state, third text state, fourth text state, and fifth text state;

[0026] When the text is in a state of pending download, the text is recorded as the zeroth text state;

[0027] When the text is successfully downloaded and backed up, the text is recorded as the first text state;

[0028] When the text download fails, the backup succeeds, and the download time exceeds the set threshold, the text is recorded as the second text state;

[0029] When the text download fails, the backup succeeds, and the download time does not exceed the set threshold, the text is recorded as the third text state.

[0030] When the text is successfully downloaded but the backup fails, the text is recorded as the fourth text state;

[0031] When the text download fails and the backup fails, the text is recorded as the fifth text state.

[0032] Optionally, the method further includes:

[0033] Scan the text status in the data record table;

[0034] The text in the zeroth text state, the third text state, and the fifth text state are re-downloaded;

[0035] The backup result and the download result after the text is re-downloaded are recorded in the data record table, so that the data record table updates the text status of the text.

[0036] Optionally, the method further includes:

[0037] After the text is re-downloaded, scan the text status in the data record table;

[0038] The text in the fourth and fifth text states is backed up again;

[0039] The backup result and the download result of the text after being backed up again are recorded in the data record table, so that the data record table updates the text status of the text.

[0040] Secondly, embodiments of this application provide a distributed text downloading apparatus, comprising:

[0041] The control module is used to control multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules.

[0042] An insertion module is used to acquire a distributed lock when the first node among the plurality of nodes detects the existence of the text that conforms to the naming rules;

[0043] The acquisition module is used to acquire the download information corresponding to the text when the distributed lock is successfully acquired; the download information includes: download server address, account, password and text path;

[0044] The download module is used to download the text according to the download information.

[0045] From a third-party perspective, embodiments of this application provide a distributed text download device, including:

[0046] Memory, used to store computer programs;

[0047] A processor, configured to implement the steps of the distributed text download method as described in any of the preceding embodiments when executing the computer program.

[0048] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the distributed text download method described in any of the preceding claims.

[0049] As can be seen from the above technical solutions, compared with the prior art, this application has the following advantages:

[0050] This application first controls multiple nodes to simultaneously scan a shared folder for text that matches the naming rules. Then, when the first node among the multiple nodes detects text that matches the naming rules, it acquires a distributed lock. If the distributed lock is successfully acquired, the download information corresponding to that text is obtained, including the download server address, username, password, and text path. Finally, the text is downloaded according to the download information. In this way, distributed locks are used to achieve automatic and non-repeating simultaneous text download processing by multiple nodes, reducing manual intervention and improving the timeliness and accuracy of text download. Attached Figure Description

[0051] Figure 1 A flowchart illustrating a distributed text download method provided in this application embodiment;

[0052] Figure 2 This is a schematic diagram of the structure of a distributed text download device provided in an embodiment of this application. Detailed Implementation

[0053] As mentioned earlier, existing methods for downloading text often fail to guarantee timeliness and accuracy in complex banking scenarios. Specifically, taking the banking scenario as an example, with the rapid development of banking operations, the number of transactions requiring processing is increasing. Different systems within a bank frequently need to exchange data via text. Generally, to maintain system operation and data updates, text transmission between systems is continuous. Existing technical solutions are mostly designed for text downloading between two fixed systems. In complex banking scenarios, text downloading often requires manual intervention, making it difficult to guarantee timeliness and accuracy.

[0054] To address the aforementioned issues, this application provides a method for distributed text download. The method includes: first, controlling multiple nodes to simultaneously scan a shared folder for text that conforms to a naming rule; then, when the first node among the multiple nodes detects text conforming to the naming rule, it acquires a distributed lock. If the distributed lock is successfully acquired, the download information corresponding to the text is obtained, including: the download server address, username, password, and text path. Finally, the text is downloaded according to the download information.

[0055] In this way, by using distributed locks, multiple nodes can automatically and non-repeatingly perform text download processing, reducing manual intervention and improving the timeliness and accuracy of text download.

[0056] It should be noted that the distributed text download method, apparatus, device, and readable storage medium provided by this invention can be used in the fields of artificial intelligence, blockchain, distributed systems, cloud computing, big data, the Internet of Things, mobile internet, network security, chips, virtual reality, augmented reality, holography, quantum computing, quantum communication, quantum measurement, digital twins, or finance. The above are merely examples and do not limit the application areas of the distributed text download method, apparatus, device, and readable storage medium provided by this invention.

[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0058] Figure 1 A flowchart illustrating a distributed text download method provided in an embodiment of this application. (In conjunction with...) Figure 1 As shown in the embodiments of this application, a method for distributed text downloading may include:

[0059] S101: Controls multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules.

[0060] In practical applications, banking systems typically have multiple download nodes. Downstream systems can retrieve the required text from the upstream system's shared folder as needed. Specifically, multiple nodes can simultaneously scan the upstream system's shared folder for text that conforms to the naming rules required by the downstream system. Generally, when a downstream system needs to download text from the upstream system, it will provide a text name, and then multiple nodes will simultaneously scan the shared folder for text related to that name, i.e., text that conforms to the naming rules.

[0061] S102: When the first node among the plurality of nodes scans and finds that the text conforms to the naming rules, it acquires the distributed lock.

[0062] In practical applications, multiple nodes simultaneously scan a shared folder for text that conforms to the naming rules. When one of the nodes scans and finds text that conforms to the naming rules, that is, when the first node scans and finds the text that needs to be downloaded, it can acquire the distributed lock.

[0063] Furthermore, since there are different methods for acquiring distributed locks, this application can describe the possible acquisition methods.

[0064] In one scenario, regarding how to acquire the distributed lock, S102: When the first node among the plurality of nodes detects the existence of text conforming to the naming rules, it acquires the distributed lock, specifically including:

[0065] When the first node among the plurality of nodes detects text that conforms to the naming rules, the first node acquires the data information of the text;

[0066] The data information includes: text name;

[0067] Based on the data information in the text, obtain the distributed lock.

[0068] In practical applications, when the first node scans and finds text that conforms to the naming rules, it can obtain the text name corresponding to that text. Then, it can use the data information of the text that the first node scans and finds that conforms to the naming rules to obtain a distributed lock.

[0069] S103: When the distributed lock is successfully acquired, obtain the download information corresponding to the text; the download information includes: download server address, account, password and text path.

[0070] In practical applications, distributed locks are generally implemented using the primary key feature provided by relational databases. This means that in a data table, only one record with the same primary key is allowed; two records with the same primary key cannot exist. Inserting a record into the data table treats each record as a lock; successful insertion means successful lock acquisition, otherwise, lock acquisition fails. Due to the existence of distributed locks, the inserted information must uniquely represent the text. In banking systems, text names are unique; no two files have the same name. Therefore, when designing a text data table, the text name is generally used as the unique key. In this application, the text name can be inserted into the distributed lock. When the first node scans and finds text that matches the naming rules, the text name is inserted into the distributed lock. Generally, the text name is also recorded in the data record table. Successful insertion of the text data into the distributed lock means that the current download task has not been performed by other nodes, so the current node is allowed to execute the download task. Thus, the download information corresponding to the text begins to be retrieved. The download information generally includes: download server address, account, password, text path, etc.

[0071] S104: Download the text according to the downloaded information.

[0072] In practical applications, once the download information corresponding to the required text is obtained, the text can be downloaded through the current node to the downstream system that needs it, thus achieving data transfer and avoiding impact on the normal operation of the downstream system. In addition, after downloading the text, the text name can be modified, the text can be backed up, and information such as the modified text name, file status, number of downloads, total number of downloads, and backup path can be recorded in a data log table to achieve data summarization and facilitate future functional expansion.

[0073] Furthermore, since the success or failure of data insertion can lead to different download results, this application describes the possible download results.

[0074] In one scenario, the success or failure of acquiring a distributed lock can lead to different download results. Accordingly, when the distributed lock is successfully acquired, before obtaining the download information corresponding to the text, the process further includes:

[0075] Determine whether the data information of the text exists in the distributed lock;

[0076] When the judgment result is yes, the acquisition of the distributed lock fails, and the first node continues to scan the shared folder to see if there is any text that matches the naming rules;

[0077] If the judgment result is negative, the distributed lock is successfully acquired.

[0078] In practical applications, taking the first node as an example, after the first node scans the text in the shared folder and obtains the text to be downloaded, it can insert the data information of that text into the distributed lock to determine whether the corresponding data information exists in the distributed lock. Since a distributed lock is a mechanism for concurrency control in a distributed environment, it controls that a resource can only be used by one application at a time. Therefore, if the insertion of the text data fails, it means that the data information exists in the distributed lock. In other words, the download task has already been executed by another node, the distributed lock acquisition fails, the task ends, and other download tasks continue. In another scenario, if the insertion of the text data is successful, it means that the data information does not exist in the distributed lock. In other words, the distributed lock acquisition is successful, and the download task can be executed by the first node. Thus, steps S103-S104 are continued to obtain the download information corresponding to the text, and the text is downloaded based on that information.

[0079] In summary, this application first controls multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules. Then, when the first node among the multiple nodes detects text that conforms to the naming rules, it acquires a distributed lock. If the distributed lock is successfully acquired, the download information corresponding to the text is obtained, including the download server address, username, password, and text path. Finally, the text is downloaded according to the download information. In this way, distributed locks are used to achieve automatic, non-repetitive simultaneous text download processing by multiple nodes, reducing manual intervention and improving the timeliness and accuracy of text download.

[0080] In addition, this application also provides a method for recording the results after text download.

[0081] In one scenario, for text download records, specifically, after downloading the text based on the download information, the process further includes:

[0082] Move the text to the backup folder;

[0083] Record the backup results and download results.

[0084] In practical applications, after the text is downloaded, the text name can be modified, the text can be backed up, and information such as the modified text name, file status, number of downloads, total number of downloads, and backup path can be recorded in the data record table to achieve data summarization and facilitate subsequent function expansion.

[0085] In summary, this application provides a method for recording the results after text download, which realizes data summarization. By recording the backup results and download results, the text that has failed to download or be backed up can be re-downloaded and re-backed up, thus improving the flexibility of distributed text download.

[0086] Furthermore, since the methods of recording backup results and downloading results are not entirely the same, this application can describe the possible recording methods.

[0087] In one scenario, the backup and download results are recorded. Accordingly, recording the backup and download results includes:

[0088] The backup and download results are recorded in the data record table in text form;

[0089] The text states include: zero text state, first text state, second text state, third text state, fourth text state, and fifth text state;

[0090] When the text is in a state of pending download, the text is recorded as the zeroth text state;

[0091] When the text is successfully downloaded and backed up, the text is recorded as the first text state;

[0092] When the text download fails, the backup succeeds, and the download time exceeds the set threshold, the text is recorded as the second text state;

[0093] When the text download fails, the backup succeeds, and the download time does not exceed the set threshold, the text is recorded as the third text state.

[0094] When the text is successfully downloaded but the backup fails, the text is recorded as the fourth text state;

[0095] When the text download fails and the backup fails, the text is recorded as the fifth text state.

[0096] In practical applications, download results and backup results are combined to form a new recording method to represent text status, which is recorded in the data record table. Generally, the default text status is text status zero, meaning the text has not yet been downloaded, i.e., text awaiting download. Text download and text backup are performed simultaneously. For text that is successfully downloaded and successfully backed up, the text status can be named as text status one. For text that fails to download but is successfully backed up, its text status can be named as text status two; note that the time since the first download of this text should exceed a set threshold. For text that fails to download but is successfully backed up, its text status can be named as text status three; note that the time since the first download of this text should not exceed a set threshold. For text that succeeds in downloading but fails to back up, its text status can be named as text status four. For text that fails to download and fails to back up, its text status can be named as text status five. The threshold can be set according to requirements, for example, with a limit of 3 days. If the time of the first download is less than 3 days ago, and the text status is a text that failed to download but was successfully backed up, it can be retransmitted in order to ensure the timeliness and accuracy of the text download. Therefore, the third text status can also be called the text status that is pending retransmission.

[0097] In addition, this application also provides a method for text retransmission.

[0098] In one scenario, regarding how to re-download the text, specifically, the method further includes:

[0099] Scan the text status in the data record table;

[0100] The text in the zeroth text state, the third text state, and the fifth text state are re-downloaded;

[0101] The backup result and the download result after the text is re-downloaded are recorded in the data record table, so that the data record table updates the text status of the text.

[0102] In practical applications, the data record table contains information such as text name, text status, number of downloads, total number of downloads, and backup path. To ensure the timeliness and accuracy of text downloads, a text retransmission mechanism needs to be implemented. By scanning the text status in the data record table, texts that are in status zero, third, or fifth within a set threshold time and are being downloaded for the first time are retransmitted. The retransmission results, backup results, and other information are then updated and recorded in the data record table. For example, if there is a text record that meets the requirements and is in status fifth, after retransmitting the text using the retransmission mechanism, the data record table needs to be updated by incrementing the total number of text downloads by 1 and simultaneously modifying the total number of text downloads in the initial download record to that value.

[0103] In summary, this application provides a method for retransmitting text after download, which enables the retransmission of text that failed to download, improving the flexibility of distributed text download and the timeliness and accuracy of text download.

[0104] In addition, this application also provides a method for re-backing up text.

[0105] In one scenario, regarding how to perform a re-backup of this document, specifically, the method further includes:

[0106] After the text is re-downloaded, scan the text status in the data record table;

[0107] The text in the fourth and fifth text states is backed up again;

[0108] The backup result and the download result of the text after being backed up again are recorded in the data record table, so that the data record table updates the text status of the text.

[0109] In practical applications, after the text is re-downloaded, the backup results of the text need to be scanned. When the scan results indicate that there are texts that failed to be backed up, the texts are backed up again, that is, the texts in the fourth and fifth text states in the data record table are backed up again.

[0110] In summary, this application first controls multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules. Then, when the first node among the multiple nodes detects text that conforms to the naming rules, it acquires a distributed lock. If the distributed lock is successfully acquired, the download information corresponding to the text is obtained, including the download server address, username, password, and text path. Finally, the text is downloaded according to the download information. In this way, distributed locks are used to achieve automatic, non-repetitive simultaneous text download processing by multiple nodes, reducing manual intervention and improving the timeliness and accuracy of text download.

[0111] Based on the distributed text download method provided in the above embodiments, this application also provides a distributed text download apparatus. The apparatus for distributed text download will be described below with reference to embodiments and accompanying drawings.

[0112] Figure 2 A schematic diagram of the structure of a distributed text download device provided in this application embodiment.

[0113] Combination Figure 2 The distributed text downloading device 200 provided in this application embodiment includes:

[0114] Control module 201 is used to control multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules;

[0115] The first acquisition module 202 is used to acquire a distributed lock when the first node among the plurality of nodes scans and finds that the text conforms to the naming rules.

[0116] The second acquisition module 203 is used to acquire the download information corresponding to the text when the distributed lock is successfully acquired; the download information includes: download server address, account, password and text path;

[0117] The download module 204 is used to download the text according to the download information.

[0118] As one implementation method, regarding how to acquire a distributed lock when the first node among the plurality of nodes scans and finds text that conforms to the naming rules, the aforementioned first acquisition module 202 is specifically used for:

[0119] When the first node among the plurality of nodes detects text that conforms to the naming rules, the first node acquires the data information of the text;

[0120] The data information includes: text name;

[0121] Based on the data information in the text, obtain the distributed lock.

[0122] As one implementation method, to address the different download results caused by the success or failure of acquiring the distributed lock, the above-mentioned distributed text downloading device 200 further includes:

[0123] The judgment module is used to determine whether the data information of the text exists in the distributed lock;

[0124] When the judgment result is yes, the acquisition of the distributed lock fails, and the first node continues to scan the shared folder to see if there is any text that matches the naming rules;

[0125] If the judgment result is negative, the distributed lock is successfully acquired.

[0126] As one implementation, the distributed text downloading device 200 further includes, for recording the results after text download, the following:

[0127] The transfer module is used to move the text to the backup folder;

[0128] The recording module is used to record backup results and download results.

[0129] As one implementation method, depending on the different methods of recording backup results and download results, the above-mentioned recording module is specifically used for:

[0130] The backup and download results are recorded in the data record table in text form;

[0131] The text states include: zero text state, first text state, second text state, third text state, fourth text state, and fifth text state;

[0132] When the text is in a state of pending download, the text is recorded as the zeroth text state;

[0133] When the text is successfully downloaded and backed up, the text is recorded as the first text state;

[0134] When the text download fails, the backup succeeds, and the download time exceeds the set threshold, the text is recorded as the second text state;

[0135] When the text download fails, the backup succeeds, and the download time does not exceed the set threshold, the text is recorded as the third text state.

[0136] When the text is successfully downloaded but the backup fails, the text is recorded as the fourth text state;

[0137] When the text download fails and the backup fails, the text is recorded as the fifth text state.

[0138] As one implementation, for the re-downloading of text, the above-mentioned distributed text downloading device 200 further includes:

[0139] The text retransmission module is used to scan the text status in the data record table;

[0140] The text in the zeroth text state, the third text state, and the fifth text state are re-downloaded;

[0141] The backup result and the download result after the text is re-downloaded are recorded in the data record table, so that the data record table updates the text status of the text.

[0142] As one implementation method, for the re-backup of text, the above-mentioned distributed text download device 200 further includes:

[0143] The re-backup module is used to scan the status of the text in the data record table after the text is re-downloaded;

[0144] The text in the fourth and fifth text states is backed up again;

[0145] The backup result and the download result of the text after being backed up again are recorded in the data record table, so that the data record table updates the text status of the text.

[0146] In summary, this application first controls multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules. Then, when the first node among the multiple nodes detects text that conforms to the naming rules, it acquires a distributed lock. If the distributed lock is successfully acquired, the download information corresponding to the text is obtained, including the download server address, username, password, and text path. Finally, the text is downloaded according to the download information. In this way, distributed locks are used to achieve automatic, non-repetitive simultaneous text download processing by multiple nodes, reducing manual intervention and improving the timeliness and accuracy of text download.

[0147] In addition, this application also provides a distributed text download device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the distributed text download method as described in any of the preceding claims.

[0148] In addition, this application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the distributed text download method as described in any of the preceding claims.

[0149] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A control method for distributed text download, characterized in that, The method includes: Control multiple nodes to simultaneously scan a shared folder for text that matches the naming rules; When the first node among the plurality of nodes detects text that conforms to the naming rules, it acquires the distributed lock; When the distributed lock is successfully acquired, the download information corresponding to the text is obtained; The information transmitted includes: the server address, account, password, and text path. The text is downloaded according to the downloaded information; When the first node among the plurality of nodes detects text that conforms to the naming rules, it acquires a distributed lock, including: When the first node among the plurality of nodes detects text that conforms to the naming rules, the first node acquires the data information of the text; The data information includes: text name; Based on the data information in the text, obtain the distributed lock; Before obtaining the download information corresponding to the text when the distributed lock is successfully acquired, the process further includes: Determine whether the data information of the text exists in the distributed lock; When the judgment result is yes, the acquisition of the distributed lock fails, and the first node continues to scan the shared folder to see if there is any text that matches the naming rules; If the judgment result is negative, the distributed lock is successfully acquired.

2. The method according to claim 1, characterized in that, After downloading the text according to the downloaded information, the process further includes: Move the text to the backup folder; Record the backup results and download results.

3. The method according to claim 2, characterized in that, The recorded backup results and download results include: The backup and download results are recorded in the data record table in text form; The text states include: zero text state, first text state, second text state, third text state, fourth text state, and fifth text state; When the text is in a state of pending download, the text is recorded as the zeroth text state; When the text is successfully downloaded and backed up, the text is recorded as the first text state; When the text download fails, the backup succeeds, and the download time exceeds the set threshold, the text is recorded as the second text state; When the text download fails, the backup succeeds, and the download time does not exceed the set threshold, the text is recorded as the third text state. When the text is successfully downloaded but the backup fails, the text is recorded as the fourth text state; When the text download fails and the backup fails, the text is recorded as the fifth text state.

4. The method according to claim 3, characterized in that, The method further includes: Scan the text status in the data record table; The text in the zeroth text state, the third text state, and the fifth text state are re-downloaded; The backup result and the download result after the text is re-downloaded are recorded in the data record table, so that the data record table updates the text status of the text.

5. The method according to claim 4, characterized in that, The method further includes: After the text is re-downloaded, scan the text status in the data record table; The text in the fourth and fifth text states is backed up again; The backup result and the download result of the text after being backed up again are recorded in the data record table, so that the data record table updates the text status of the text.

6. A control device for distributed text download, characterized in that, include: The control module is used to control multiple nodes to simultaneously scan a shared folder for text that conforms to the naming rules. The first acquisition module is used to acquire a distributed lock when the first node among the plurality of nodes scans and finds that the text conforms to the naming rules. The second acquisition module is used to acquire the download information corresponding to the text when the distributed lock is successfully acquired. The information transmitted includes: the server address, account, password, and text path. The download module is used to download the text according to the download information; The first acquisition module is specifically used for: When the first node among the plurality of nodes detects text that conforms to the naming rules, the first node acquires the data information of the text; The data information includes: text name; Based on the data information in the text, obtain the distributed lock; The judgment module is used to determine whether the data information of the text exists in the distributed lock; When the judgment result is yes, the acquisition of the distributed lock fails, and the first node continues to scan the shared folder to see if there is any text that matches the naming rules; If the judgment result is negative, the distributed lock is successfully acquired.

7. A distributed text download device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the control method for distributed text download as described in any one of claims 1 to 5 when executing the computer program.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the distributed text download control method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for achieving application program singleton processing based on file lock

    CN111563066A