TWI818188B - A method and a system for a data transmission method based on asynchronous response - Google Patents

A method and a system for a data transmission method based on asynchronous response Download PDF

Info

Publication number
TWI818188B
TWI818188B TW109127142A TW109127142A TWI818188B TW I818188 B TWI818188 B TW I818188B TW 109127142 A TW109127142 A TW 109127142A TW 109127142 A TW109127142 A TW 109127142A TW I818188 B TWI818188 B TW I818188B
Authority
TW
Taiwan
Prior art keywords
flow rate
data
loading
module
rate
Prior art date
Application number
TW109127142A
Other languages
Chinese (zh)
Other versions
TW202129516A (en
Inventor
姜峰
金學文
唐海鵬
田豐
張帥
Original Assignee
大陸商中國銀聯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商中國銀聯股份有限公司 filed Critical 大陸商中國銀聯股份有限公司
Publication of TW202129516A publication Critical patent/TW202129516A/en
Application granted granted Critical
Publication of TWI818188B publication Critical patent/TWI818188B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

The present invention discloses a data transmission method based on asynchronous response, and the method includes: an extraction step that extracts data from a first data end in a cycle and stores the data; a flow speed adjustment step that confirms a second flow speed of the data transmitted in the cycle based on a load result feedback from a second data end in the previous cycle and a first flow speed of the data transmitted in the previous cycle; and a loading step that loads the data to the second data end in the cycle according to the second flow speed.

Description

基於非同步應答的傳輸資料的方法及系統Method and system for transmitting data based on asynchronous response

本發明涉及數據傳輸領域,尤其涉及一種基於非同步應答的傳輸數據的方法及系統 。The present invention relates to the field of data transmission, and in particular to a method and system for transmitting data based on asynchronous response.

在將數據從數據源傳輸至的數據目的端的過程中,通常使用能夠抽取數據、轉換數據的格式並將數據裝載到數據目的端的ETL(Extract-Transform-Load)系統。由於ETL 系統需要按照固定週期運行的經常發生的任務(例如,處理批量數據)並且ETL 系統對數據實時性要求不高,因此在對數據實時性要求很高的場景下難以使用傳統的ETL 系統。在傳輸數據的過程中,存在調節數據傳輸的流速的需求。一種常用的調節流速的方法是使用數據傳輸系統的系統負載作為硬指標進行調節,例如當系統負載高於某個閾值時,即禁止或降低流速,當系統負載開始降低時,則恢復流速。另一種常用的調節流速的方法是自適應限流保護方法,該方法使用數據傳輸系統的系統負載作為所控制的流速的啟動值,通過數 據傳輸系統的當前請求響應時間以及處理的請求速率來決定當前允許的流速,從而在數據傳輸系統不被拖垮的情況下提高流速,而不是一定要低於某個閾值。In the process of transmitting data from the data source to the data destination, an ETL (Extract-Transform-Load) system that can extract data, convert the format of the data, and load the data to the data destination is usually used. Since the ETL system requires recurring tasks that run on a fixed cycle (for example, processing batch data) and the ETL system does not have high requirements for real-time data, it is difficult to use traditional ETL systems in scenarios that require high real-time data. In the process of transmitting data, there is a need to adjust the flow rate of data transmission. A common method to adjust the flow rate is to use the system load of the data transmission system as a hard indicator for adjustment. For example, when the system load is higher than a certain threshold, the flow rate is disabled or reduced, and when the system load begins to decrease, the flow rate is restored. Another commonly used method to adjust the flow rate is the adaptive current limiting protection method. This method uses the system load of the data transmission system as the starting value of the controlled flow rate, which is determined by the current request response time of the data transmission system and the processed request rate. The currently allowed flow rate, allowing the data transfer system to be increased without being overwhelmed, rather than necessarily falling below a certain threshold.

為了盡可能地提高流速,還可以使用非同步應答的模式,即數據傳輸系統中的負責數據裝載的模組僅將數據發送至下游的數據目的端,無需等待具體的裝載結果,數據傳輸系統可以通過另外的模組對數據裝載的執行結果進行處理。換言之,在一個週期內裝載的數據不一定在當前週期內就能獲知該數據是否裝載成功。In order to increase the flow rate as much as possible, asynchronous response mode can also be used, that is, the module responsible for data loading in the data transmission system only sends the data to the downstream data destination without waiting for the specific loading result. The data transmission system can The execution results of data loading are processed through another module. In other words, data loaded in one cycle may not necessarily be known in the current cycle whether the data is loaded successfully.

然而,在使用非同步應答的模式的情況下,上述第一種方法由於將數據傳輸系統的系統負載作為硬指標,超過系統負載則不允許傳輸數據,因此限制了數據傳輸系統和數據目的端的處理能力,降低了數據傳輸系統的的數據傳輸量;此外,當下游的數據目的端發生故障或擴容等影響處理能力的事件時,該方法無法及時地感知並調整流速,可能導致數據傳輸系統的空閒或大批量數據丟失等異常情況。另外,對於上述第二種方法,該方法 根據數據傳輸系統的處理能力來調節流速,無法根據下游的數據目的端的處理能力來動態地控制流速,不適用數據目的端處理能力弱於數據傳輸系統處理能力的情況。However, in the case of using asynchronous response mode, the above-mentioned first method uses the system load of the data transmission system as a hard indicator. If the system load exceeds the system load, data is not allowed to be transmitted, thus limiting the processing capabilities of the data transmission system and the data destination. , reducing the data transmission volume of the data transmission system; in addition, when the downstream data destination fails or expands or other events that affect processing capabilities, this method cannot sense and adjust the flow rate in a timely manner, which may cause the data transmission system to become idle or Abnormal situations such as massive data loss. In addition, for the second method mentioned above, this method adjusts the flow rate according to the processing capacity of the data transmission system. It cannot dynamically control the flow rate according to the processing capacity of the downstream data destination. It is not applicable to the data destination whose processing capacity is weaker than that of the data transmission system. ability situation.

本發明的一方面提供一種基於非同步應答的傳輸數據的方法,包括:抽取步驟:在一週期中從第一數據端抽取並存儲所述數據;流速調節步驟:基於在所述週期的上一週期中由第二數據端反饋的裝載結果和在所述上一週期中傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;以及裝載步驟:在所述週期中根據所述第二流速將所述數據裝載到所述第二數據端。One aspect of the present invention provides a method for transmitting data based on asynchronous response, including: an extraction step: extracting and storing the data from the first data terminal in a cycle; a flow rate adjustment step: based on the previous data in the cycle. The loading result fed back by the second data terminal in the cycle and the first flow rate of transmitting the data in the previous cycle determine the second flow rate of transmitting the data in the cycle; and the loading step: in the cycle Loading the data to the second data port according to the second flow rate.

本發明的另一方面提供一種基於非同步應答的傳輸數據的方法,包括:抽取步驟:在一週期中從第一數據端抽取第一數據,將所述第一數據存儲在第一隊列中;流速調節步驟:基於在所述週期的上一週期中由第二數據端反饋的第一裝載結果和在所述上一週期傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;以及裝載步驟:在所述週期中根據所述第二流速將所述第一隊列內的所述第一數據和第二隊列內的第二數據裝載到所述第二數據端。Another aspect of the present invention provides a method for transmitting data based on asynchronous responses, including: an extraction step: extracting first data from a first data terminal in one cycle, and storing the first data in a first queue; Flow rate adjustment step: determining to transmit the data in the cycle based on the first loading result fed back by the second data terminal in the previous cycle of the cycle and the first flow rate for transmitting the data in the previous cycle. a second flow rate; and a loading step: loading the first data in the first queue and the second data in the second queue to the second data terminal according to the second flow rate in the cycle .

本發明的又一方面提供一種基於非同步應答的傳輸數據的系統,包括:數據抽取模組,其用於在一週期中從第一數據端抽取並存儲所述數據;流速調節模組,其用於基於在所述週期的上一週期中由第二數據端反饋的裝載結果和在所述上一週期中傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;和數據裝載模組,其用於在所述週期中根據所述第二流速將所述數據裝載到所述第二數據端。Another aspect of the present invention provides a system for transmitting data based on asynchronous response, including: a data extraction module, which is used to extract and store the data from the first data terminal in one cycle; a flow rate adjustment module, which For determining a second flow rate for transmitting the data in the cycle based on the loading result fed back by the second data terminal in the previous cycle of the cycle and the first flow rate for transmitting the data in the previous cycle. flow rate; and a data loading module configured to load the data to the second data port according to the second flow rate during the cycle.

本發明的又一方面提供一種基於非同步應答的傳輸數據的系統,包括:數據抽取模組,其用於在一週期中從第一數據端抽取第一數據,將所述第一數據存儲在第一隊列中;流速調節模組,其用於基於在所述週期的上一週期中由第二數據端反饋的第一裝載結果和在所述上一週期傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;以及數據裝載模組,其用於在所述週期中根據所述第二流速將所述第一隊列內的所述第一數據和第二隊列內的第二數據裝載到所述第二數據端。Another aspect of the present invention provides a system for transmitting data based on asynchronous response, including: a data extraction module, which is used to extract the first data from the first data terminal in one cycle, and store the first data in In the first queue; a flow rate adjustment module configured to determine the first flow rate based on the first loading result fed back by the second data terminal in the previous cycle of the cycle and the first flow rate for transmitting the data in the previous cycle. a second flow rate for transmitting the data in the period; and a data loading module configured to load the first data and the second data in the first queue according to the second flow rate in the period. The second data in the queue is loaded into the second data terminal.

本發明的又一方面提供了一種計算機可讀介質,其上存儲有計算機可讀指令,所述計算機可讀指令被計算機執行時能夠執行根據本發明實施例所述的方法。Yet another aspect of the present invention provides a computer-readable medium having computer-readable instructions stored thereon. The computer-readable instructions, when executed by a computer, can perform the method according to the embodiment of the present invention.

本發明的實施例能夠在非同步應答的情況下、根據反饋的裝載結果自動調節數據傳輸系統的流速,從而在保證數據目的端不被壓垮且減少數據丟失的前提條件下盡可能地提高數據傳輸系統的吞吐量。Embodiments of the present invention can automatically adjust the flow rate of the data transmission system according to the feedback loading results in the case of asynchronous responses, thereby improving data as much as possible on the premise of ensuring that the data destination is not overwhelmed and reduces data loss. The throughput of the transmission system.

上述說明僅是本發明技術方案的概述,為了能夠更清楚瞭解本發明的技術手段,而可依照說明書的內容予以實施,並且為了讓本發明的上述和其它 目的、特徵和優點能夠更明顯易懂,以下特舉本發明的具體實施方式。The above description is only an overview of the technical solution of the present invention. In order to have a clearer understanding of the technical means of the present invention, it can be implemented according to the content of the description, and in order to make the above and other objects, features and advantages of the present invention more obvious and understandable. , the specific embodiments of the present invention are listed below.

下面將參考若干示例性實施方式來描述本發明的原理和精神。應當理解,給出這些實施方式僅僅是為了使本領域技術人員能夠更好地理解進而實現本發明,而並非以任何方式限制本發明的範圍。相反,提供這些實施方式是為了使本公開更加透徹和完整,並且能夠將本公開的範圍完整地傳達給本領域的技術人員。The principles and spirit of the invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are only provided to enable those skilled in the art to better understand and implement the present invention, but are not intended to limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

下面結合附圖對本發明的具體實施方式進行詳細描述。Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

圖1 示出了根據本發明的實施例的數據傳輸系統的示意圖。Figure 1 shows a schematic diagram of a data transmission system according to an embodiment of the present invention.

如圖1 所示,該系統包括五個模組:數據抽取模組、數據裝載模組、非同步應答處理模組、定時掃描模組以及流速調節模組。該系統還包括待裝載數據隊列、待重載數據隊列和待確認數據 Map。As shown in Figure 1, the system includes five modules: data extraction module, data loading module, asynchronous response processing module, timing scanning module and flow rate adjustment module. The system also includes a data queue to be loaded, a data queue to be reloaded, and a data map to be confirmed.

數據抽取模組可以從數據源抽取數據,將數據轉換格式後存入待裝載數據隊列,若隊列已滿則等待。在本文中,一個數據能夠代表一個業務,每個數據的大小可以不同。The data extraction module can extract data from the data source, convert the data into a format and store it in the data queue to be loaded. If the queue is full, it will wait. In this article, one data can represent a business, and the size of each data can be different.

數據裝載模組可以從待裝載數據隊列中取出數據,並通過流速調節模組判斷當前是否可以向數據目的端裝載數據。數據裝載模組還可以包括正常數據裝載模組和失敗數據裝載模組,其分別用於裝載待裝載數據隊列和待重載數據隊列中的數據。在每次裝載數據時,數據裝載模組可以同時將數據存儲在待確認數據Map 中。在一些實施例中,待確認數據Map 是一種數據存儲結構,其可以用於臨時存儲從數據裝載模組轉存的數據。待確認數據Map中的Key字段存儲數據的身份標識,Value字段存儲數據的值。The data loading module can retrieve data from the data queue to be loaded, and determine whether the data can currently be loaded to the data destination through the flow rate adjustment module. The data loading module may also include a normal data loading module and a failed data loading module, which are respectively used to load data in the data queue to be loaded and the data queue to be reloaded. Each time data is loaded, the data loading module can simultaneously store the data in the data map to be confirmed. In some embodiments, the data to be confirmed Map is a data storage structure that can be used to temporarily store data transferred from the data loading module. The Key field in the data Map to be confirmed stores the identity of the data, and the Value field stores the value of the data.

非同步應答處理模組可以處理數據目的端反饋的處理結果(即被裝載的數據的裝載結果,該結果為成功或失敗),並統計成功或失敗的數據的量。對於處理結果為成功的數據,非同步應答處理模組可以直接從待確認數據Map 刪除該數據。對於處理結果為失敗的數據,非同步應答處理模組可以將 裝載失敗的數據從待確認數據 Map 發送到待重載數據隊列,以待被數據裝載模組裝載。如果某數據裝載失敗的次數超過預定次數(即,重裝載次數上限),則丟棄該數據。The asynchronous response processing module can process the processing result fed back by the data destination (i.e., the loading result of the loaded data, which is success or failure), and count the amount of successful or failed data. For data whose processing result is successful, the asynchronous response processing module can directly delete the data from the data to be confirmed Map. For data whose processing result is failed, the asynchronous response processing module can send the data with failed loading from the data map to be confirmed to the data queue to be reloaded to be loaded by the data loading module. If the number of times a certain data load fails exceeds a predetermined number of times (that is, the upper limit of reload times), the data is discarded.

定時掃描模組可以通過掃描待確認數據Map 來統計超過一定時長仍未收到數據目的端的處理結果的數據(即未收到應答的超時數據),並將該數據從待確認數據 Map 發送到待重載數據隊列。定時掃描模組還可以通過掃描非同步應答處理模組中保存的、來自數據目的端的處理結果來計算當前週期內所統計的數據裝載的成功率,並將成功率發送到流速調節模組。The scheduled scanning module can scan the data map to be confirmed to count the data that has not received the processing result of the data destination for more than a certain period of time (that is, the timeout data for which no response has been received), and send the data from the data map to be confirmed. to the data queue to be reloaded. The timing scanning module can also calculate the statistical data loading success rate in the current cycle by scanning the processing results from the data destination stored in the asynchronous response processing module, and send the success rate to the flow rate adjustment module.

流速調節模組可以通過調整數據傳輸系統的TPS(Transaction Per Second,每秒業務處理量,例如每秒處理的交易的筆數)來實現流速控制。首先,可以設置一個最理想情況下的最大 TPS 值作為流速上限值,根據當前週期內數據裝載的成功率提高或降低數據傳輸系統的流速(TPS 值),從而實現系統的流速調節。The flow rate adjustment module can achieve flow rate control by adjusting the TPS (Transaction Per Second, business processing volume per second, such as the number of transactions processed per second) of the data transmission system. First, you can set a maximum TPS value under the most ideal situation as the upper limit of the flow rate, and increase or decrease the flow rate (TPS value) of the data transmission system according to the success rate of data loading in the current cycle, thereby realizing the flow rate adjustment of the system.

在圖2 中示出了數據抽取模組可以採用的用於抽取數據的方法。如圖2 所示,該方法包括如下步驟:Figure 2 shows the methods that the data extraction module can use to extract data. As shown in Figure 2, the method includes the following steps:

(1)數據抽取模組從數據源抽取數據,並將數據按統一格式進行轉換;(1) The data extraction module extracts data from the data source and converts the data into a unified format;

(2)若此時待裝載隊列未滿,則將轉換完格式的數據直接存入其中,然後繼續執行步驟(1),否則執行步驟(3);(2) If the queue to be loaded is not full at this time, the converted format data will be directly stored in it, and then step (1) will continue, otherwise step (3) will be executed;

(3)若待裝載隊列此時已滿,針對當前數據累加一次發送失敗次數, 如發送失敗次數未超過發送失敗次數的上限,則數據抽取模組休眠預定時間後重新執行步驟(2),否則將數據丟棄,開始重新執行步驟(1)。(3) If the queue to be loaded is full at this time, the number of transmission failures will be accumulated once for the current data. If the number of transmission failures does not exceed the upper limit of the number of transmission failures, the data extraction module will sleep for a predetermined time and re-execute step (2), otherwise Discard the data and start step (1) again.

在圖3 中示出了數據裝載模組可以採用的裝載數據的方法的時序圖。如圖3 所示,數據裝載模組可以從待裝載數據隊列中獲取轉換完格式的數據。在獲取到待裝載的數據後,為保證當前數據傳輸系統的流速不超過允 許的流速上限值,數據裝載模組需要向流速調節模組申請允許裝載數據的令牌,只有獲取到令牌後,才能夠向數據目的端發送待被裝載的數據。Figure 3 shows a sequence diagram of a method for loading data that can be used by the data loading module. As shown in Figure 3, the data loading module can obtain the converted format data from the data queue to be loaded. After obtaining the data to be loaded, in order to ensure that the flow rate of the current data transmission system does not exceed the allowed flow rate upper limit, the data loading module needs to apply to the flow rate adjustment module for a token that allows loading of data. Only after obtaining the token , the data to be loaded can be sent to the data destination.

流速調節模組在接收到關於令牌的申請時,檢查當前是否仍有可用的令牌,若暫無可用令牌則掛起該申請,等待新令牌生成。流速調節模組可以週期性地生成或清除令牌,例如,在每個週期結束時清空剩餘令牌,同 時生成數量與當前系統允許的流速上限值對應的令牌(例如,流速上限值是1000,這例如意味著每秒最多可以處理1000 個數據(例如,1000 筆交易),則流速調節模組可以生成1000 個令牌以允許處理1000 個數據)。該流速上限值會根據數據目的端的數據裝載的狀態進行更新。通過修改一個週期內允許的令牌數,可以實現系統流速的動態調整。When the flow rate adjustment module receives an application for a token, it checks whether there are still available tokens. If there are no available tokens, it suspends the application and waits for new tokens to be generated. The flow rate adjustment module can generate or clear tokens periodically, for example, clear the remaining tokens at the end of each cycle, and generate a number of tokens corresponding to the flow rate upper limit allowed by the current system (for example, the flow rate upper limit is 1000, which means for example that up to 1000 data can be processed per second (for example, 1000 transactions), then the flow rate adjustment module can generate 1000 tokens to allow 1000 data to be processed). The upper limit of the flow rate is updated based on the data loading status of the data destination. By modifying the number of tokens allowed in a cycle, the system flow rate can be dynamically adjusted.

圖 4 示出了根據本發明的實施例的用於調節流速的方法的時序圖。該方法涉及非同步應答處理模組、定時掃描模組以及流速調節模組。該方法可以執行的操作包括統計數據目的端的處理結果、統計超時未應答的數據、計算當前週期內裝載成功率以及更新系統允許的流速上限。Figure 4 shows a timing diagram of a method for adjusting flow rate according to an embodiment of the invention. The method involves an asynchronous response processing module, a timing scanning module and a flow rate adjustment module. The operations that this method can perform include statistics on the processing results of the data destination, statistics on timeout unanswered data, calculation of the loading success rate in the current cycle, and updating the upper limit of the flow rate allowed by the system.

非同步應答處理模組用於接收數據目的端反饋的裝載結果,對相應的數 據進行處理(即,將裝載成功的數據從待確認數據 Map 中刪除,或將裝載失敗的數據或未收到應答的超時數據發送到待重載數據隊列中),同時根據反饋的裝載結果更新裝載成功計數器或裝載失敗計數器的值。The asynchronous response processing module is used to receive the loading results fed back by the data destination and process the corresponding data (that is, delete the successfully loaded data from the data map to be confirmed, or delete the loaded data that failed or no response was received) The timeout data is sent to the data queue to be reloaded), and at the same time, the value of the load success counter or load failure counter is updated according to the feedback load result.

定時掃描模組可以在每個週期進行掃描,計算當前週期內數據目的端裝載數據(該數據是在之前的週期中應當由數據目的端裝載的數據,也可 以稱為歷史數據)的成功率,以此觸發流速調節模組來調節流速。對於計算成功率,定時掃描模組可以首先統計當前週期內所有未收到應答的超時數據量(例如存儲在超時數據計數器中),然後獲取當前時刻數據裝載成功計數器與裝載失敗計數器的值,根據如下公式來計算成功率:The scheduled scanning module can scan in each cycle and calculate the success rate of loading data by the data destination in the current cycle (this data is the data that should be loaded by the data destination in the previous cycle, which can also be called historical data). This triggers the flow rate adjustment module to adjust the flow rate. For calculating the success rate, the scheduled scan module can first count the amount of all timeout data that has not received a response in the current cycle (for example, stored in the timeout data counter), and then obtain the values of the data loading success counter and loading failure counter at the current moment. , calculate the success rate according to the following formula:

其中,S 為當前週期內數據裝載的成功率,Cs 與Cf 分別為當前裝載成功計數器和裝載失敗計數器的值,Ct 為當前未收到應答的超時數據計數器的值。在S 計算完成後立刻清空各計數器的值,以確保不會對下個週期的計算產生干擾。Among them, S is the success rate of data loading in the current cycle, Cs and Cf are the values of the current loading success counter and loading failure counter respectively, and Ct is the value of the timeout data counter for which no response has been received. Clear the value of each counter immediately after the S calculation is completed to ensure that there will be no interference with the calculation of the next cycle.

該調節流速的方法可以歸納如下:This method of adjusting flow rate can be summarized as follows:

(1)根據數據目的端的處理能力,配置可接受的流速上限Tmax;(1) Configure the acceptable flow rate upper limit Tmax according to the processing capability of the data destination;

(2)如果在當前週期內、從數據目的端反饋的數據裝載的成功率低於可接受的成功率下限值,則根據固定步長下調數據傳輸系統的流速,如果流速低於流速下限,則將流速下限作為實際的流速(根據確定的流速值生成與其對應的令牌的數量),若下調前的流速已達到可接受的流速下限, 不再下調系統流速,需人工介入排查;(2) If the success rate of data loading fed back from the data destination in the current cycle is lower than the acceptable lower limit of success rate, the flow rate of the data transmission system is reduced according to a fixed step size. If the flow rate is lower than the lower limit of the flow rate, Then the lower limit of the flow rate is used as the actual flow rate (the number of corresponding tokens is generated based on the determined flow rate value). If the flow rate before the reduction has reached the acceptable lower limit of the flow rate, the system flow rate will no longer be reduced, and manual intervention is required for investigation;

(3)如果在當前週期內的數據裝載的成功率大於成功率調整閾值(其大於成功率下限值)且當前系統流速小於Tmax,那麼可以根據固定步長上調流速,如果流速高於流速上限,則將流速上限作為實際的流速(根據確定的流速值生成與其對應的令牌的數量),若上調前的流速已達到Tmax,不再上調系統流速值;(3) If the success rate of data loading in the current cycle is greater than the success rate adjustment threshold (which is greater than the lower limit of the success rate) and the current system flow rate is less than Tmax, then the flow rate can be increased according to a fixed step size. If the flow rate is higher than the upper limit of the flow rate , then the upper limit of the flow rate is regarded as the actual flow rate (the number of corresponding tokens is generated based on the determined flow rate value). If the flow rate before the increase has reached Tmax, the system flow rate value will no longer be increased;

(4)如果成功率大於成功率下限值且小於成功率調整閾值,並且流速小於Tmax,則認為數據傳輸系統與下游系統(即數據目的端)均處於穩定狀態,無需調整數據傳輸系統的流速;(4) If the success rate is greater than the lower limit of the success rate and less than the success rate adjustment threshold, and the flow rate is less than Tmax, it is considered that both the data transmission system and the downstream system (i.e., the data destination) are in a stable state, and there is no need to adjust the flow rate of the data transmission system. ;

(5)若數據傳輸系統的流速維持在Tmax ,且計算出的成功率始終大於等於成功率調整閾值,嘗試上調Tmax;若上調Tmax 後成功率立刻下降,則恢復先前的Tmax 值,在一定週期內(例如,當天)不再嘗試上調Tmax;(5) If the flow rate of the data transmission system is maintained at Tmax, and the calculated success rate is always greater than or equal to the success rate adjustment threshold, try to increase Tmax; if the success rate drops immediately after increasing Tmax, restore the previous Tmax value, and in a certain period No more attempts to increase Tmax will be made during the day (for example, on the same day);

(6)若數據目的端發生擴容時,可以通過人工將Tmax 修改為與擴容後的處理能力相適應的流速上限值;(6) If the data destination is expanded, Tmax can be manually modified to the upper limit of the flow rate that is compatible with the expanded processing capacity;

(7)若計算出的成功率大於等於成功率調整閾值並且數據傳輸系統上調流速後,計算出的成功率又低於成功率下限值,使得數據傳輸系統下調流速,而且先上調流速又下調流速的過程又持續多次,那麼這可能代表計算得出的Tmax 不符合當前現狀,需人工介入排查,例如可以人工降低Tmax 的值。(7) If the calculated success rate is greater than or equal to the success rate adjustment threshold and the data transmission system increases the flow rate, the calculated success rate is lower than the lower limit of the success rate, causing the data transmission system to decrease the flow rate, and first increase the flow rate and then decrease it. If the flow rate process continues multiple times, this may mean that the calculated Tmax does not meet the current status and requires manual intervention. For example, the Tmax value can be manually reduced.

下面將描述實現上述調節流速的方法的一個實施例。首先,定義各參數,其含義如下:An embodiment of the method for realizing the above-mentioned adjustment of flow rate will be described below. First, define each parameter, its meaning is as follows:

Tmax:理想狀態下,數據目的端可承載的最大TPS(即流速上限),其可由系統運維人員手動配置與修改;Tmax: Under ideal conditions, the maximum TPS (i.e., the upper limit of flow rate) that the data destination can carry, which can be manually configured and modified by system operation and maintenance personnel;

Tmin:數據目的端可接受的最低TPS,低於此值時需人工介入排查;Tmin: The lowest TPS acceptable by the data destination. If it is lower than this value, manual intervention is required;

Smin:數據目的端允許的數據裝載的最小成功率;Smin: The minimum success rate of data loading allowed by the data destination;

Sadp:TPS 上調時可接受的最低成功率(即成功率調整閾值),僅當前成功率大於或等於該值時可嘗試上調TPS 的值;Sadp: The lowest acceptable success rate when TPS is increased (i.e., the success rate adjustment threshold). Only when the current success rate is greater than or equal to this value can you try to increase the value of TPS;

st:TPS 調節步長,即單次上調或下調TPS 的值;st: TPS adjustment step size, that is, the value of a single upward or downward adjustment of TPS;

Tcur:數據目的端當前允許的TPS 值,其數據傳輸系統啟動時可以任意配置Tcur,使得Tcur 不大於Tmax 。Tcur: The TPS value currently allowed by the data destination. Tcur can be configured arbitrarily when the data transmission system is started, so that Tcur is not greater than Tmax.

此外,本文將一次連續的TPS 上調和下調或一次連續的TPS 下調和上調定義為一次震盪過程,若持續地發生震盪,說明Tmax 取值與數據目的端的當前狀態不符合,需提醒運維人員進行排查和確認,必要時需要修改Tmax的取值。In addition, this article defines a continuous TPS increase and decrease or a continuous TPS decrease and increase as a oscillation process. If the oscillation continues, it means that the Tmax value does not match the current status of the data destination, and the operation and maintenance personnel need to be reminded. Check and confirm, and modify the value of Tmax if necessary.

基於此,可以例如使用標誌位 UD 記錄各個調節操作:Based on this, the individual adjustment operations can be recorded, for example, using the flag UD:

UD=00:未調節;UD=10:上調TPS;UD=01:下調TPSUD=00: Unadjusted; UD=10: Increase TPS; UD=01: Decrease TPS

另外使用UDp 記錄上一次流速調節操作。例如,可以通過計算UD|UDp(或運算)來表示是否發生震盪現象(比如UD|UDp=11,表示發生了一次震盪),使用Ccon 記錄連續震盪次數,使用Mcon 表示可接受的最大連續震盪次數。In addition, use UDp to record the last flow rate adjustment operation. For example, you can calculate UD|UDp (or operation) to indicate whether oscillation occurs (for example, UD|UDp=11, indicating that a oscillation occurred), use Ccon to record the number of continuous oscillations, and use Mcon to indicate the maximum acceptable number of continuous oscillations. .

基於上述定義,調節流速的方法的具體實現方式如下:Based on the above definition, the specific implementation method of adjusting the flow rate is as follows:

● 當S≥Sadp 且Tcur <Tmax 時,此時UD=10,那麼更新Tcur+=st,計算UD|UDp:● When S≥Sadp and Tcur <Tmax, then UD=10, then update Tcur+=st and calculate UD|UDp:

若UD|UDp=11,修改Ccon+=1,UDp=10;If UD|UDp=11, modify Ccon+=1, UDp=10;

若 UD|UDp!=11,修改 Ccon=0,UDp=10。If UD|UDp!=11, modify Ccon=0 and UDp=10.

●當S≥Sadp 且Tcur =Tmax 時,Tcur 保持不變,修改Ccon=0,UDp=00●When S≥Sadp and Tcur =Tmax, Tcur remains unchanged, modify Ccon=0, UDp=00

●當S≤Smin 且Tcur >Tmin 時,此時UD=01,更新Tcur-=st,計算UD|UDp:●When S≤Smin and Tcur>Tmin, then UD=01, update Tcur-=st, and calculate UD|UDp:

若UD|UDp=11,修改Ccon+=1,UDp=01;If UD|UDp=11, modify Ccon+=1, UDp=01;

若UD|UDp!=11,修改Ccon=0,UDp=01。If UD|UDp!=11, modify Ccon=0 and UDp=01.

●當S≤Smin 且Tcur =Tmin 時,Tcur 保持不變,修改 Ccon=0,UDp=00,需發出告警,以提示人工介入排查;●When S≤Smin and Tcur =Tmin, Tcur remains unchanged, modify Ccon=0, UDp=00, and an alarm needs to be issued to prompt manual intervention;

●當Smin<S<Sadp 時,Tcur 保持不變,修改Ccon=0,UDp=00。●When Smin<S<Sadp, Tcur remains unchanged, modify Ccon=0, UDp=00.

每次調節流速的算法執行完成時,首先根據更新後的數據目的端允許的TPS 值生成對應的令牌數,同時檢查Ccon。若Ccon≥Mcon,則說明數據傳輸系統連續震盪次數超過上限值,即Tmax  的取值不適合當前的數據目的端,因此數據傳輸系統會發出告警以提醒運維人員介入排查。Each time the flow rate adjustment algorithm is executed, the corresponding number of tokens is first generated based on the updated TPS value allowed by the data destination, and Ccon is checked at the same time. If Ccon≥Mcon, it means that the number of continuous oscillations of the data transmission system exceeds the upper limit, that is, the value of Tmax is not suitable for the current data destination. Therefore, the data transmission system will issue an alarm to remind operation and maintenance personnel to intervene.

為了減少異常數據(其包括裝載失敗的數據和未收到應答的超時數據),非同步應答處理模組或定時掃描模組會將異常數據發送至待重載數據隊列中,並通過數據裝載模組中的失敗數據重裝模組重新裝載該異常數據。In order to reduce abnormal data (including data that failed to load and timeout data that did not receive a response), the asynchronous response processing module or the scheduled scanning module will send the abnormal data to the data queue to be reloaded, and load it through the data Failed data reloading in the module The module reloads the abnormal data.

圖 5 示出了根據本發明的實施例的用於處理異常數據的方法的流程圖。用於處理異常數據的方法如下:Figure 5 shows a flowchart of a method for processing abnormal data according to an embodiment of the present invention. The methods used to handle abnormal data are as follows:

(1)非同步應答處理模組在接收到處理結果後進行判斷,結果為成功時,直接從待確認數據Map 中移除該數據,流程結束;否則進入步驟(2);(1) The asynchronous response processing module makes a judgment after receiving the processing result. When the result is successful, the data is directly removed from the data map to be confirmed, and the process ends; otherwise, proceed to step (2);

(2)結果不為成功時,更新失敗次數,如果失敗次數超過上限值,直接從待確認數據 Map 中移除該數據,並報出異常(例如發出告警),否則進入步驟(3);(2) When the result is not successful, update the number of failures. If the number of failures exceeds the upper limit, directly remove the data from the data map to be confirmed and report an exception (such as issuing an alarm), otherwise proceed to step (3);

(3)如果此時待重載數據隊列不滿,則將數據直接轉存入待重載數據隊列中,否則記作轉存失敗,直接更新其失敗次數,繼續執行步驟(4);(3) If the data queue to be reloaded is not full at this time, the data will be directly transferred to the data queue to be reloaded. Otherwise, it will be recorded as a transfer failure, and the number of failures will be directly updated, and step (4) will be continued;

(4)如果數據失敗次數超過失敗上限,直接丟棄該數據並報出異常。(4) If the number of data failures exceeds the upper limit of failures, the data will be discarded directly and an exception will be reported.

否則將其繼續存放在待確認數據 Map 中,等待一段時間後進入步驟(3)。Otherwise, it will continue to be stored in the data map to be confirmed, wait for a period of time and then enter step (3).

從圖1 和圖5 可以看出,處理異常數據的方法還可以通過裝載隔離來降低異常數據對系統的影響性,即使用正常數據裝載模組負責待裝載數據隊列中的數據的處理,使用失敗數據裝載模組負責待重載數據隊列中的數據的處理,兩個模組並行執行。基於此,可以將流速調節模組計算出的當前系統或數據目的端允許的TPS 值Tcur 細分成正常數據裝載TPS(記為Tnor)和異常數據裝載TPS(記為Tuno),不同的裝載模組請求各自的裝載令牌,從而實現正常數據和異常數據的裝載隔離,具體的方法如下:As can be seen from Figure 1 and Figure 5, the method of processing abnormal data can also reduce the impact of abnormal data on the system through load isolation, that is, the normal data loading module is used to process the data in the data queue to be loaded, and the use fails The data loading module is responsible for processing the data in the data queue to be reloaded, and the two modules execute in parallel. Based on this, the TPS value Tcur allowed by the current system or data destination calculated by the flow rate adjustment module can be subdivided into normal data loading TPS (denoted as Tnor) and abnormal data loading TPS (denoted as Tuno). Different loading modules Request respective load tokens to achieve load isolation of normal data and abnormal data. The specific method is as follows:

(1)如果成功率不為100%,則將成功率與當前流速相乘以作為正常數據裝載的流速,將當前流速的剩餘部分作為異常數據裝載的流速,並更新異常數據的流速在當前流速中的佔比,以供數據傳輸系統在後續週期中使用。具體實現方法可以例如是:(1) If the success rate is not 100%, multiply the success rate and the current flow rate as the flow rate for normal data loading, use the remaining part of the current flow rate as the flow rate for abnormal data loading, and update the flow rate for abnormal data at the current flow rate proportion for the data transmission system to use in subsequent cycles. The specific implementation method can be, for example:

S≠100%時,Tnor= Tcur*S,Tuno=Tcur*(1-S);更新RP = Tuno/ Tcur。When S≠100%, Tnor= Tcur*S, Tuno=Tcur*(1-S); update R P = Tuno/ Tcur.

(2)如果成功率為100%,則異常數據裝載的流速是待重載數據隊列中的數據的個數、和上述佔比與當前流速的乘積中的最小值。因此,正常 數據裝載的流速是當前流速與異常數據裝載的流速的差。可以更新異常數據的流速在當前流速中的佔比,以供數據傳輸系統在後續週期中使用。具體實現方法可以例如是:(2) If the success rate is 100%, the flow rate of abnormal data loading is the minimum value of the number of data in the data queue to be reloaded and the product of the above proportion and the current flow rate. Therefore, the flow rate for normal data loading is the difference between the current flow rate and the flow rate for abnormal data loading. The proportion of the flow rate of abnormal data in the current flow rate can be updated for use by the data transmission system in subsequent cycles. The specific implementation method can be, for example:

S=100%時,Tuno=min(Lw RP * Tcur) ,Tnor= Tcur-Tuno,更新RP = Tuno/ Tcur。When S=100%, Tuno=min(L w R P * Tcur), Tnor= Tcur-Tuno, update R P = Tuno/ Tcur.

其中,S 為當前週期內數據裝載成功率,Rp 為上一週期內異常數據裝載TPS 在系統總TPS 中的佔比,Lu 為待重載數據隊列中數據的個數(例如,交易的筆數)。Among them, S is the data loading success rate in the current cycle, Rp is the proportion of abnormal data loading TPS in the total system TPS in the previous cycle, and Lu is the number of data in the data queue to be reloaded (for example, the number of transactions ).

可以以一種或多種程序設計語言的任意組合來編寫用於執行本發明操作的程序代碼,所述程序設計語言包括面向對象的程序設計語言—諸如Java、C++等,還包括常規的過程式程序設計語言—諸如“C”語言或類似的程序設計語言。程序代碼可以完全地在用戶計算設備上執行、部分地在用戶設備上執行、部分在用戶計算設備上執行、或者完全在遠程計算設備或服務器上執行。在涉及遠程計算設備的情形中,遠程計算設備可以通過任 意種類的網絡——包括局域網(LAN)或廣域網(WAN)—連接到用戶計算設備,或者,可以連接到外部計算設備(例如利用因特網服務提供商來通過因特網連接)。Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's computing device, partly on the user's computing device, or entirely on a remote computing device or server. In situations involving remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., utilizing an Internet service provider to connect via the Internet).

此外,儘管在附圖中以特定順序描述了本發明方法的操作,但是,這並非要求或者暗示必須按照該特定順序來執行這些操作,或是必須執行全部所示的操作才能實現期望的結果。附加地或備選地,可以省略某些步驟,將多個步驟合併為一個步驟執行,和/或將一個步驟分解為多個步驟執行。Furthermore, although the operations of the methods of the present invention are depicted in a particular order in the drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the illustrated operations must be performed to achieve desired results. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be broken down into multiple steps for execution.

應當注意,儘管在上文的詳細描述中提及了實現上述方法的若干軟件裝置/模組及子裝置/模組,但是這種劃分並非強制性的。實際上,根據本發明的實施方式,上文描述的兩個或更多裝置的特徵和功能可以在一個裝置/模組中具體化。反之,上文描述的一個裝置/模組的特徵和功能可以進一步劃分為由多個裝置/模組來具體化。It should be noted that although several software devices/modules and sub-devices/modules for implementing the above method are mentioned in the above detailed description, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more devices described above may be embodied in one device/module. Conversely, the features and functions of one device/module described above may be further divided into being embodied by multiple devices/modules.

雖然已經參考若干具體實施方式描述了本發明的精神和原理,但是應該理解,本發明並不限於所公開的具體實施方式,對各方面的劃分也不意味著這些方面中的特徵不能組合以進行受益,這種劃分僅是為了表述的方20 便。本發明旨在涵蓋所附權利要求的精神和範圍內所包括的各種修改和等同佈置。Although the spirit and principles of the invention have been described with reference to a number of specific embodiments, it should be understood that the invention is not limited to the specific embodiments disclosed, nor does the division into aspects mean that features in these aspects cannot be combined. Benefit, this division is only for convenience of expression. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

無。without.

[圖1]示出了根據本發明的實施例的數據傳輸系統的示意圖。 [圖2]示出了根據本發明的實施例的用於抽取數據的方法的流程圖。 [圖3]示出了根據本發明的實施例的用於裝載數據的方法的時序圖。 [圖4]示出了根據本發明的實施例的用於調節流速的方法的時序圖。 [圖5]示出了根據本發明的實施例的用於處理異常數據的方法的流程圖。[Fig. 1] shows a schematic diagram of a data transmission system according to an embodiment of the present invention. [Fig. 2] A flowchart showing a method for extracting data according to an embodiment of the present invention. [Fig. 3] A sequence diagram showing a method for loading data according to an embodiment of the present invention. [Fig. 4] A timing chart showing a method for adjusting a flow rate according to an embodiment of the present invention. [Fig. 5] A flowchart showing a method for processing abnormal data according to an embodiment of the present invention.

Claims (31)

一種基於非同步應答的傳輸數據的方法,包括:抽取步驟:在一週期中從第一數據端抽取並存儲所述數據;流速調節步驟:基於在所述週期的上一週期中由第二數據端反饋的裝載結果和在所述上一週期中傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;和裝載步驟:在所述週期中根據所述第二流速將所述數據裝載到所述第二數據端,其中,所述裝載結果是在所述上一周期中由所述第二數據端反饋的裝載成功的歷史數據的數量、在所述上一周期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,其中,所述流速調節步驟還包括:統計在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,和通過如下公式來計算成功率:
Figure 109127142-A0305-02-0015-1
其中,S為所述成功率,Cs為在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量,Cf為在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,Ct為在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,其中,所述裝載步驟包括:在所述週期中根據所述第二流速和所述成功率生成用於裝載所述數據的令 牌;根據所述令牌提取隊列中的數據;和將所提取的所述隊列中的數據裝載到所述第二數據端。
A method of transmitting data based on asynchronous response, including: an extraction step: extracting and storing the data from a first data terminal in one cycle; a flow rate adjustment step: based on the second data in the previous cycle of the cycle The loading result fed back by the terminal and the first flow rate for transmitting the data in the previous cycle determine the second flow rate for transmitting the data in the cycle; and the loading step: in the cycle according to the second flow rate The data is loaded to the second data terminal at a flow rate, where the loading result is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, The number of historical data of loading failures fed back by the second data terminal in the cycle, wherein the flow rate adjustment step further includes: counting whether the second data has not been received after a predetermined time in the previous cycle The number of timeout historical data fed back by the end, and the success rate is calculated through the following formula:
Figure 109127142-A0305-02-0015-1
Where, S is the success rate, C s is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, and C f is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle. The number of historical data of loading failure fed back by the second data terminal, C t is the number of timeout historical data fed back by the second data terminal that has not been received after the predetermined time in the previous cycle, wherein, the The loading step includes: generating a token for loading the data according to the second flow rate and the success rate in the cycle; extracting the data in the queue according to the token; and transferring the extracted queue The data in is loaded into the second data port.
如請求項1所述的方法,所述抽取步驟包括:(a)從所述第一數據端抽取所述數據,並按預定格式轉換所述數據;(b)判斷隊列是否已滿,如果未滿,則將經轉換的數據存儲所述隊列中並進入步驟(a),否則進入步驟(c);(c)針對所述經轉換的數據累加一次發送失敗次數,如所述發送失敗次數未超過發送失敗次數的上限,則等待預定時間後重新進入步驟(b),否則丟棄所述經轉換的數據並進入步驟(a)。 As in the method described in claim 1, the extracting step includes: (a) extracting the data from the first data terminal and converting the data according to a predetermined format; (b) judging whether the queue is full, and if not is full, then store the converted data in the queue and enter step (a), otherwise enter step (c); (c) accumulate one number of transmission failures for the converted data, if the number of transmission failures has not been If the upper limit of the number of failed transmissions is exceeded, step (b) is entered again after waiting for a predetermined time; otherwise, the converted data is discarded and step (a) is entered. 如請求項1所述的方法,其中,所述流速調節步驟還包括:(a)如果所述成功率小於等於成功率下限且所述第一流速高於流速下限,則按照第一預定數值減少所述第一流速以獲得所述第二流速,如果減少後的第一流速小於所述流速下限,則將所述流速下限作為所述第二流速;(b)如果所述成功率小於等於所述成功率下限且所述第一流速等於所述流速下限,則將所述流速下限作為所述第二流速;(c)如果所述成功率高於成功率調整閾值且所述流速低於流速上限,則按照第二預定數值增加所述第一流速以獲得所述第二流速,如果增加後的第一流速大於所述流速上限,則將所述流速上限作為所述第二流速;(d)如果所述成功率高於成功率調整閾值且所述第一流速達到所述流速上限,則將所述流速上限作為所述第二流速;或(e)如果所述成功率在所述成功率下限和所述成功率調整閾值之間,則將所述第一流速作為所述第二流。 The method according to claim 1, wherein the flow rate adjustment step further includes: (a) if the success rate is less than or equal to a success rate lower limit and the first flow rate is higher than the flow rate lower limit, reducing the flow rate by a first predetermined value The first flow rate is used to obtain the second flow rate. If the reduced first flow rate is less than the flow rate lower limit, the flow rate lower limit is used as the second flow rate; (b) If the success rate is less than or equal to the If the success rate is lower limit and the first flow rate is equal to the flow rate lower limit, then the flow rate lower limit is used as the second flow rate; (c) If the success rate is higher than the success rate adjustment threshold and the flow rate is lower than the flow rate If the upper limit is reached, increase the first flow rate according to a second predetermined value to obtain the second flow rate. If the increased first flow rate is greater than the upper limit of the flow rate, then use the upper limit of the flow rate as the second flow rate; (d ) If the success rate is higher than the success rate adjustment threshold and the first flow rate reaches the flow rate upper limit, then use the flow rate upper limit as the second flow rate; or (e) if the success rate is within the success rate If the rate is between the lower limit and the success rate adjustment threshold, the first flow rate is used as the second flow. 如請求項3所述的方法,其中,所述流速調節步驟還包括:當所述第二流速在第一預定數量的週期內保持在所述流速上限,並且所述成功率大於所述成功率調整閾值時,按照第二預定數值增加所述流速上限和所述第二流速。 The method of claim 3, wherein the flow rate adjustment step further includes: when the second flow rate remains at the flow rate upper limit within a first predetermined number of periods, and the success rate is greater than the success rate When adjusting the threshold, the flow rate upper limit and the second flow rate are increased according to a second predetermined value. 如請求項4所述的方法,其中,在所述按照第二預定數值增加所述流速上限和所述第二流速的步驟後,如果在所述週期的下一週期中所述成功率下降,則將增加後的流速上限和增加後的第二流速恢復到所述流速上限和所述第二流速並在第二預定數量的週期內不再增加所述流速上限。 The method of claim 4, wherein after the step of increasing the flow rate upper limit and the second flow rate according to a second predetermined value, if the success rate decreases in the next cycle of the cycle, Then, the increased flow rate upper limit and the increased second flow rate are restored to the flow rate upper limit and the second flow rate, and the flow rate upper limit is no longer increased within a second predetermined number of periods. 如請求項3所述的方法,其中,所述方法還包括:如果在多個週期中重複執行如下步驟並且實施所述重複執行操作的次數達到預設次數,則確定所述流速上限設置錯誤並發出告警信息:在執行所述步驟(c)之後直接執行所述步驟(a),或在執行所述步驟(a)之後直接執行所述步驟(c)。 The method of claim 3, wherein the method further includes: if the following steps are repeatedly performed in multiple cycles and the number of times the repeated operations are performed reaches a preset number of times, determining that the flow rate upper limit is set incorrectly and Issue an alarm message: perform step (a) directly after performing step (c), or perform step (c) directly after performing step (a). 一種基於非同步應答的傳輸數據的方法,包括:抽取步驟:在一週期中從第一數據端抽取第一數據,將所述第一數據存儲在第一隊列中;流速調節步驟:基於在所述週期的上一週期中由第二數據端反饋的第一裝載結果和在所述上一週期傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;和裝載步驟:在所述週期中根據所述第二流速將所述第一隊列內的所述第一數據和第二隊列內的第二數據裝載到所述第二數據端,其中,所述第一裝載結果是在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量、在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量, 其中,所述流速調節步驟還包括:統計在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,和計算在所述上一週期中由所述第二數據端反饋的裝載歷史數據的成功率,所述成功率用於確定所述第二流速,其中,所述成功率通過如下公式來計算:
Figure 109127142-A0305-02-0018-2
其中,S為所述成功率,Cs為在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量,Cf為在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,Ct為在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,其中,所述裝載步驟包括:(a)在所述週期中根據所述第二流速和所述成功率生成用於裝載所述第一數據的第一令牌和用於裝載所述第二數據的第二令牌;(b)根據所述第一令牌提取第一隊列中的第一數據並且根據所述第二令牌提取第二隊列中的第二數據;和(c)將所提取的第一數據和所提取的第二數據裝載到所述第二數據端。
A method of transmitting data based on asynchronous response, including: an extraction step: extracting first data from a first data terminal in a cycle, and storing the first data in a first queue; a flow rate adjustment step: based on the The first loading result fed back by the second data terminal in the previous cycle of the cycle and the first flow rate of transmitting the data in the previous cycle determine the second flow rate of transmitting the data in the cycle; and loading Step: Load the first data in the first queue and the second data in the second queue to the second data terminal according to the second flow rate in the cycle, wherein the first The loading result is the number of historical data with successful loading fed back by the second data terminal in the previous cycle, and the number of historical data with failed loading fed back by the second data terminal in the previous cycle. , wherein the flow rate adjustment step further includes: counting the number of timeout historical data that has not received feedback from the second data terminal for more than a predetermined time in the previous cycle, and calculating the number of timeout historical data in the previous cycle. The success rate of loading historical data fed back by the second data terminal is used to determine the second flow rate, where the success rate is calculated by the following formula:
Figure 109127142-A0305-02-0018-2
Where, S is the success rate, C s is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, and C f is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle. The number of historical data of loading failure fed back by the second data terminal, C t is the number of timeout historical data fed back by the second data terminal that has not been received after the predetermined time in the previous cycle, wherein, the The loading step includes: (a) generating a first token for loading the first data and a second token for loading the second data according to the second flow rate and the success rate in the cycle. card; (b) extracting the first data in the first queue according to the first token and extracting the second data in the second queue according to the second token; and (c) extracting the extracted first data and the extracted second data is loaded into the second data port.
如請求項7所述的方法,所述方法還包括:將所述第一數據和所述第二數據存儲在數據結構中以作為候選數據。 The method according to claim 7, further comprising: storing the first data and the second data in a data structure as candidate data. 如請求項8所述的方法,所述方法還包括:基於所述第二數據端在所述週期或所述週期後的至少一個週期中反饋的第二裝載結果確定所述數據結構中的候選數據是否裝載成功,如果成功,則在所述數據結構中刪除所述候選數據,如果不成功,則判斷所述候選數據被裝載的次數是否超過預定次數,如果超過所述預定次數,則在所述數據結構中刪除所述候選數據,如果未超過所 述預定次數,則在將所述候選數據發送至所述第二隊列以作為所述第二數據。 The method of claim 8, further comprising: determining a candidate in the data structure based on a second loading result fed back by the second data terminal in the cycle or at least one cycle after the cycle. Whether the data is loaded successfully, if successful, delete the candidate data in the data structure, if not, determine whether the number of times the candidate data has been loaded exceeds a predetermined number of times, if it exceeds the predetermined number of times, then delete the candidate data in the data structure. Delete the candidate data from the above data structure, if it does not exceed the the predetermined times, then the candidate data is sent to the second queue as the second data. 如請求項7所述的方法,所述抽取步驟包括:(a)從所述第一數據端抽取所述第一數據,並按預定格式轉換所述第一數據;(b)判斷第一隊列是否已滿,如果未滿,則將經轉換的第一數據存入所述第一隊列中並進入步驟(a),否則進入步驟(c);(c)針對所述經轉換的第一數據累加一次發送失敗次數,如所述發送失敗次數未超過發送失敗次數的上限,則等待預定時間後重新進入步驟(b),否則丟棄所述經轉換的第一數據並進入步驟(a)。 The method of claim 7, the extracting step includes: (a) extracting the first data from the first data terminal and converting the first data in a predetermined format; (b) determining the first queue Whether it is full, if not, store the converted first data in the first queue and enter step (a), otherwise enter step (c); (c) for the converted first data The number of transmission failures is accumulated once. If the number of transmission failures does not exceed the upper limit of the number of transmission failures, step (b) is entered again after waiting for a predetermined time. Otherwise, the converted first data is discarded and step (a) is entered. 如請求項7所述的方法,其中,所述流速調節步驟還包括:(a)如果所述成功率小於等於成功率下限且所述第一流速高於流速下限,則按照第一預定數值減少所述第一流速以獲得所述第二流速,如果減少後的第一流速小於所述流速下限,則將所述流速下限作為所述第二流速;(b)如果所述成功率小於等於所述成功率下限且所述第一流速等於所述流速下限,則將所述流速下限作為所述第二流速;(c)如果所述成功率高於成功率調整閾值且所述流速低於流速上限,則按照第二預定數值增加所述第一流速以獲得所述第二流速,如果增加後的第一流速大於所述流速上限,則將所述流速上限作為所述第二流速;(d)如果所述成功率高於成功率調整閾值且所述第一流速達到所述流速上限,則將所述流速上限作為所述第二流速;或(e)如果所述成功率在所述成功率下限和所述成功率調整閾值之間,則將所述第一流速作為所述第二流速。 The method of claim 7, wherein the flow rate adjustment step further includes: (a) if the success rate is less than or equal to a success rate lower limit and the first flow rate is higher than the flow rate lower limit, reducing the flow rate by a first predetermined value The first flow rate is used to obtain the second flow rate. If the reduced first flow rate is less than the flow rate lower limit, the flow rate lower limit is used as the second flow rate; (b) If the success rate is less than or equal to the If the success rate is lower limit and the first flow rate is equal to the flow rate lower limit, then the flow rate lower limit is used as the second flow rate; (c) If the success rate is higher than the success rate adjustment threshold and the flow rate is lower than the flow rate If the upper limit is reached, increase the first flow rate according to a second predetermined value to obtain the second flow rate. If the increased first flow rate is greater than the upper limit of the flow rate, then use the upper limit of the flow rate as the second flow rate; (d ) If the success rate is higher than the success rate adjustment threshold and the first flow rate reaches the flow rate upper limit, then use the flow rate upper limit as the second flow rate; or (e) if the success rate is within the success rate If the flow rate is between the lower limit of the flow rate and the success rate adjustment threshold, the first flow rate is used as the second flow rate. 如請求項11所述的方法,其中,所述流速調節步驟還包括:當所 述第二流速在第一預定數量的週期內保持在所述流速上限,並且所述成功率大於所述成功率調整閾值時,按照第二預定數值增加所述流速上限和所述第二流速。 The method according to claim 11, wherein the flow rate adjustment step further includes: when the When the second flow rate remains at the upper flow rate limit within a first predetermined number of periods, and the success rate is greater than the success rate adjustment threshold, the upper flow rate limit and the second flow rate are increased according to a second predetermined value. 如請求項12所述的方法,其中,在所述按照第二預定數值增加所述流速上限和所述第二流速的步驟後,如果在所述週期的下一週期中所述成功率下降,則將增加後的流速上限和增加後的第二流速恢復到所述流速上限和所述第二流速並在第二預定數量的週期內不再增加所述流速上限。 The method of claim 12, wherein after the step of increasing the flow rate upper limit and the second flow rate according to a second predetermined value, if the success rate decreases in the next cycle of the cycle, Then, the increased flow rate upper limit and the increased second flow rate are restored to the flow rate upper limit and the second flow rate, and the flow rate upper limit is no longer increased within a second predetermined number of periods. 如請求項11所述的方法,其中,所述方法還包括:如果在多個週期中重複執行如下步驟並且實施所述重複執行操作的次數達到預設次數,則確定所述流速上限設置錯誤並發出告警信息:在執行所述步驟(c)之後直接執行所述步驟(a),或在執行所述步驟(a)之後直接執行所述步驟(c)。 The method of claim 11, wherein the method further includes: if the following steps are repeatedly performed in multiple cycles and the number of times the repeated operations are performed reaches a preset number of times, determining that the flow rate upper limit is set incorrectly and Issue an alarm message: perform step (a) directly after performing step (c), or perform step (c) directly after performing step (a). 如請求項7所述的方法,其中,所述步驟(a)包括:當所述成功率小於100%時,將所述成功率與所述第二流速相乘以作為裝載所述第一數據的流速,將所述第二流速減去所述裝載所述第一數據的流速之間的差值以得到裝載所述第二數據的流速,更新所述裝載所述第二數據的流速與所述第二流速的比值,並且根據所述裝載所述第一數據的流速生成所述第一令牌且根據所述裝載所述第二數據的流速生成所述第二令牌;或當所述成功率等於100%時,將所述第二隊列中的數據的個數、與所述比值和所述第二流速的乘積中的最小值作為所述裝載所述第二數據的流速,將所述第二流速減去所述裝載所述第二數據的流速之間的差值以得到裝載所述第一數據的流速,更新所述比值,並且根據所述裝載所述第一數據的流速生成所述第一令牌且根據所述裝載所述第二數據的流速生成所述第二令牌。 The method of claim 7, wherein the step (a) includes: when the success rate is less than 100%, multiplying the success rate and the second flow rate to load the first data flow rate, subtract the difference between the flow rate for loading the first data from the second flow rate to obtain the flow rate for loading the second data, update the flow rate for loading the second data and the flow rate for loading the second data. The ratio of the second flow rate, and the first token is generated according to the flow rate of loading the first data and the second token is generated according to the flow rate of loading the second data; or when the When the success rate is equal to 100%, the minimum value of the number of data in the second queue, the product of the ratio and the second flow rate is used as the flow rate for loading the second data, and Subtract the difference between the flow rate loading the second data from the second flow rate to obtain the flow rate loading the first data, update the ratio, and generate a flow rate based on the flow rate loading the first data The first token and the second token are generated according to the flow rate of loading the second data. 一種計算機可讀介質,其上存儲有計算機可讀指令,所述計算機 可讀指令被計算機執行時能夠執行如權利要求1-15中任意之一所述的方法。 A computer-readable medium having computer-readable instructions stored thereon, the computer The readable instructions, when executed by a computer, can perform the method as claimed in any one of claims 1-15. 一種基於非同步應答的傳輸數據的系統,包括:數據抽取模組,其用於在一週期中從第一數據端抽取並存儲所述數據;流速調節模組,其用於基於在所述週期的上一週期中由第二數據端反饋的裝載結果和在所述上一週期中傳輸所述數據的第一流速確定在所述周期中傳輸所述數據的第二流速;和數據裝載模組,其用於在所述週期中根據所述第二流速將所述數據裝載到所述第二數據端,其中,所述裝載結果是在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量、在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,其中,所述系統還包括定時掃描模組,其用於統計在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,計算在所述上一週期中由所述第二數據端反饋的裝載歷史數據的成功率,並且將所述成功率發送至所述流速調節模組,其中,所述成功率通過如下公式來計算:
Figure 109127142-A0305-02-0021-3
其中,S為所述成功率,Cs為在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量,Cf5為在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,Ct為在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,其中,所述流速調節模組包括:用於在所述週期中根據所述第二流速和所述成功率生成用於裝載所述數據的令牌的模組; 所述數據裝載模組包括:用於根據所述令牌提取隊列中的數據的模組;和用於將所提取的所述隊列中的數據裝載到所述第二數據端的模組。
A system for transmitting data based on asynchronous response, including: a data extraction module, which is used to extract and store the data from the first data terminal in a cycle; a flow rate adjustment module, which is used based on the cycle The loading result fed back by the second data terminal in the previous cycle and the first flow rate of transmitting the data in the previous cycle determine the second flow rate of transmitting the data in the cycle; and the data loading module , which is used to load the data to the second data terminal according to the second flow rate in the cycle, wherein the loading result is fed back by the second data terminal in the previous cycle The number of historical data with successful loading, and the number of historical data with failed loading fed back by the second data terminal in the previous cycle, wherein the system also includes a timing scanning module for counting The number of timeout historical data fed back by the second data terminal that has not been received after a predetermined time in the previous cycle is calculated. The number of loading historical data fed back by the second data terminal in the previous cycle is calculated. The success rate is sent to the flow rate adjustment module, where the success rate is calculated by the following formula:
Figure 109127142-A0305-02-0021-3
Wherein, S is the success rate, C s is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, and C f5 is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle. The number of historical data of loading failure fed back by the second data terminal, C t is the number of timeout historical data fed back by the second data terminal that has not been received after the predetermined time in the previous cycle, wherein, the The flow rate adjustment module includes: a module for generating a token for loading the data according to the second flow rate and the success rate in the cycle; the data loading module includes: a module for generating the token according to the second flow rate and the success rate. a module for extracting data from the token queue; and a module for loading the extracted data from the queue into the second data terminal.
如請求項17_所述的系統,所述數據抽取模組還能夠執行如下步驟:(a)從所述第一數據端抽取所述數據,並按預定格式轉換所述數據;(b)判斷隊列是否已滿,如果未滿,則將經轉換的數據存儲所述隊列中並進入步驟(a),否則進入步驟(c);(c)針對所述經轉換的數據累加一次發送失敗次數,如所述發送失敗次數未超過發送失敗次數的上限,則等待預定時間後重新進入步驟(b),否則丟棄所述經轉換的數據並進入步驟(a)。 As in the system described in claim 17_, the data extraction module can also perform the following steps: (a) extract the data from the first data terminal and convert the data according to a predetermined format; (b) determine Whether the queue is full, if not, store the converted data in the queue and enter step (a), otherwise enter step (c); (c) accumulate the number of transmission failures for the converted data, If the number of failed transmissions does not exceed the upper limit of the number of failed transmissions, step (b) will be entered again after waiting for a predetermined time; otherwise, the converted data will be discarded and step (a) will be entered. 如請求項17所述的系統,其中,所述流速調節模組還包括:第一模組,其用於在所述成功率小於等於成功率下限且所述第一流速高於流速下限的情況下,按照第一預定數值減少所述第一流速以獲得所述第二流速,在減少後的第一流速小於所述流速下限的情況下,將所述流速下限作為所述第二流速;第二模組,其用於在所述成功率小於等於成功率下限且所述第一流速等於所述流速下限的情況下,將所述流速下限作為所述第二流速;第三模組,其用於在所述成功率高於成功率調整閾值且所述流速低於流速上限的情況下,按照第二預定數值增加所述第一流速以獲得所述第二流速,在增加後的第一流速大於所述流速上限的情況下,將所述流速上限作為所述第二流速;第四模組,其用於在所述成功率高於成功率調整閾值且所述第一流速達到 流速上限的情況下,將所述流速上限作為所述第二流速;或第五模組,其用於在所述成功率在所述成功率下限和所述成功率調整閾值之間的情況下,將所述第一流速作為所述第二流速。 The system according to claim 17, wherein the flow rate adjustment module further includes: a first module, which is used when the success rate is less than or equal to the lower limit of the success rate and the first flow rate is higher than the lower limit of the flow rate. , reducing the first flow rate according to a first predetermined value to obtain the second flow rate, and when the reduced first flow rate is less than the lower limit of the flow rate, the lower limit of the flow rate is used as the second flow rate; A second module, which is used to use the lower limit of flow rate as the second flow rate when the success rate is less than or equal to the lower limit of success rate and the first flow rate is equal to the lower limit of flow rate; a third module, which For when the success rate is higher than the success rate adjustment threshold and the flow rate is lower than the flow rate upper limit, increase the first flow rate according to a second predetermined value to obtain the second flow rate. After the increase, the first flow rate is When the flow rate is greater than the upper limit of the flow rate, the upper limit of the flow rate is used as the second flow rate; a fourth module is used when the success rate is higher than the success rate adjustment threshold and the first flow rate reaches In the case of an upper limit of the flow rate, the upper limit of the flow rate is used as the second flow rate; or a fifth module is used when the success rate is between the lower limit of the success rate and the adjustment threshold of the success rate. , taking the first flow rate as the second flow rate. 如請求項19所述的系統,其中,所述流速調節模組還包括:第六模組,其用於當所述第二流速在第一預定數量的週期內保持在所述流速上限,並且所述成功率大於所述成功率調整閾值時,按照第二預定數值增加所述流速上限和所述第二流速。 The system of claim 19, wherein the flow rate adjustment module further includes: a sixth module configured to maintain the upper flow rate limit when the second flow rate remains at the upper limit of the flow rate within a first predetermined number of periods, and When the success rate is greater than the success rate adjustment threshold, the flow rate upper limit and the second flow rate are increased according to a second predetermined value. 如請求項20所述的系統,其中,在按照第二預定數值增加所述流速上限和所述第二流速後,所述流速調節模組還能夠在所述週期的下一週期中所述成功率下降的情況下,將增加後的流速上限和增加後的第二流速恢復到所述流速上限和所述第二流速並在第二預定數量的週期內不再增加所述流速上限。 The system of claim 20, wherein after increasing the flow rate upper limit and the second flow rate according to a second predetermined value, the flow rate adjustment module can also succeed in the next cycle of the cycle. If the flow rate decreases, the increased flow rate upper limit and the increased second flow rate are restored to the flow rate upper limit and the second flow rate, and the flow rate upper limit is no longer increased within a second predetermined number of periods. 如請求項19所述的系統,其中,所述流速調節模組還用於在多個週期中重複執行如下步驟並且實施所述重複執行操作的次數達到預設次數的情況下,確定所述流速上限設置錯誤並發出告警信息:在使用所述第三模組之後直接使用所述第一模組;或在使用所述第一模組之後直接使用所述第三模組。 The system according to claim 19, wherein the flow rate adjustment module is also used to repeatedly perform the following steps in multiple cycles and determine the flow rate when the number of times of the repeated operations reaches a preset number. The upper limit is set incorrectly and an alarm message is issued: use the first module directly after using the third module; or use the third module directly after using the first module. 一種基於非同步應答的傳輸數據的系統,包括:數據抽取模組,其用於在一週期中從第一數據端抽取第一數據,將所述第一數據存儲在第一隊列中;流速調節模組,其用於基於在所述週期的上一週期中由第二數據端反饋的第一裝載結果和在所述上一週期傳輸所述數據的第一流速確定在所述週期中傳輸所述數據的第二流速;和數據裝載模組,其用於在所述週期中根據所述第二流速將所述第一隊列內 的所述第一數據和第二隊列內的第二數據裝載到所述第二數據端,其中,所述第一裝載結果是在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量、在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,其中,所述系統還包括定時掃描模組,其用於統計在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,並且計算在所述上一週期中由所述第二數據端反饋的裝載歷史數據的成功率,並且將所述成功率發送至所述流速調節模組,其中,所述成功率通過如下公式來計算:
Figure 109127142-A0305-02-0024-4
其中,S為所述成功率,Cs為在所述上一週期中由所述第二數據端反饋的裝載成功的歷史數據的數量,Cf為在所述上一週期中由所述第二數據端反饋的裝載失敗的歷史數據的數量,Ct25為在所述上一週期中已超過預定時間仍未收到所述第二數據端反饋的超時歷史數據的數量,其中,所述流速調節模組包括:用於在所述週期中根據所述第二流速和所述成功率生成用於裝載所述第一數據的第一令牌和用於裝載所述第二數據的第二令牌的模組;所述數據裝載模組包括:用於根據所述第一令牌提取第一隊列中的第一數據並且根據所述第二令牌提取第二隊列中的第二數據的模組;和用於將所提取的第一數據和所提取的第二數據裝載到所述第二數據端的模組。
A system for transmitting data based on asynchronous response, including: a data extraction module, which is used to extract first data from a first data terminal in a cycle, and store the first data in a first queue; flow rate adjustment A module configured to determine, based on the first loading result fed back by the second data terminal in the previous cycle of the cycle and the first flow rate of the data transmitted in the previous cycle, the data transmitted in the cycle. a second flow rate of the data; and a data loading module configured to load the first data in the first queue and the second data in the second queue according to the second flow rate in the cycle. to the second data terminal, wherein the first loading result is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, The number of historical data of loading failures fed back by the second data terminal, wherein the system also includes a timing scanning module for counting whether the second data has not been received after a predetermined time in the previous cycle. The number of timeout historical data fed back by the data terminal, and the success rate of loading historical data fed back by the second data terminal in the previous cycle is calculated, and the success rate is sent to the flow rate adjustment module. , where the success rate is calculated by the following formula:
Figure 109127142-A0305-02-0024-4
Where, S is the success rate, C s is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle, and C f is the number of successfully loaded historical data fed back by the second data terminal in the previous cycle. The number of historical data of loading failure fed back by the second data terminal, C t25 is the number of timeout historical data that has not been received from the second data terminal after exceeding the predetermined time in the previous cycle, wherein, the The flow rate adjustment module includes: a first token for loading the first data and a second token for loading the second data according to the second flow rate and the success rate in the cycle. Token module; the data loading module includes: a module for extracting the first data in the first queue according to the first token and extracting the second data in the second queue according to the second token. a module; and a module for loading the extracted first data and the extracted second data into the second data port.
如請求項23所述的系統,其中,所述數據裝載模組還用於將所述第一數據和所述第二數據存儲在數據結構中以作為候選數據。 The system according to claim 23, wherein the data loading module is further configured to store the first data and the second data in a data structure as candidate data. 如請求項24所述的系統,所述系統還包括:非同步應答處理模組,其用於基於所述第二數據端在所述週期或所述周期後的至少一個週期中反饋的第二裝載結果確定所述數據結構中的候選數據是否裝載成功,如果成功,則在所述數據結構中刪除所述候選數據,如果不成功,則判斷所述候選數據被裝載的次數是否超過預定次數,如果超過所述預定次數,則在所述數據結構中刪除所述候選數據,如果未超過所述預定次數,則在將所述候選數據發送至所述第二隊列以作為所述第二數據。 The system according to claim 24, the system further includes: an asynchronous response processing module, which is used to feedback the second data signal based on the second data terminal in the period or at least one period after the period. The loading result determines whether the candidate data in the data structure is loaded successfully. If successful, the candidate data is deleted from the data structure. If unsuccessful, it is determined whether the number of times the candidate data has been loaded exceeds a predetermined number of times. If the predetermined number of times is exceeded, the candidate data is deleted from the data structure; if the predetermined number of times is not exceeded, the candidate data is sent to the second queue as the second data. 如請求項23所述的系統,所述數據抽取模組還能夠執行如下步驟:(a)從所述第一數據端抽取所述第一數據,並按預定格式轉換所述第一數據;(b)判斷第一隊列是否已滿,如果未滿,則將經轉換的第一數據存入所述第一隊列中並進入步驟(a),否則進入步驟(c);(c)針對所述經轉換的第一數據累加一次發送失敗次數,如所述發送失敗次數未超過發送失敗次數的上限,則等待預定時間後重新進入步驟(b),否則丟棄所述經轉換的第一數據並進入步驟(a)。 As in the system described in claim 23, the data extraction module can also perform the following steps: (a) extract the first data from the first data terminal and convert the first data according to a predetermined format; ( b) Determine whether the first queue is full. If not, store the converted first data in the first queue and enter step (a). Otherwise, enter step (c); (c) For the The converted first data accumulates a number of transmission failures. If the number of transmission failures does not exceed the upper limit of the number of transmission failures, then wait for a predetermined time and then re-enter step (b), otherwise discard the converted first data and enter Step (a). 如請求項23所述的系統,其中,所述流速調節模組還包括:第一模組,其用於在所述成功率小於等於成功率下限且所述第一流速高於流速下限的情況下,按照第一預定數值減少所述第一流速以獲得所述第二流速,在減少後的第一流速小於所述流速下限的情況下,將所述流速下限作為所述第二流速;第二模組,其用於在所述成功率小於等於成功率下限且所述第一流速等於所述流速下限的情況下,將所述流速下限作為所述第二流速; 第三模組,其用於在所述成功率高於成功率調整閾值且所述流速低於流速上限的情況下,按照第二預定數值增加所述第一流速以獲得所述第二流速,在增加後的第一流速大於所述流速上限的情況下,將所述流速上限作為所述第二流速;第四模組,其用於在所述成功率高於成功率調整閾值且所述第一流速達到流速上限的情況下,將所述流速上限作為所述第二流速;或第五模組,其用於在所述成功率在所述成功率下限和所述成功率調整閾值之間的情況下,將所述第一流速作為所述第二流速。 The system according to claim 23, wherein the flow rate adjustment module further includes: a first module, which is used when the success rate is less than or equal to the lower limit of the success rate and the first flow rate is higher than the lower limit of the flow rate. , reducing the first flow rate according to a first predetermined value to obtain the second flow rate, and when the reduced first flow rate is less than the lower limit of the flow rate, the lower limit of the flow rate is used as the second flow rate; Two modules, which are used to use the lower limit of the flow rate as the second flow rate when the success rate is less than or equal to the lower limit of the success rate and the first flow rate is equal to the lower limit of the flow rate; A third module configured to increase the first flow rate by a second predetermined value to obtain the second flow rate when the success rate is higher than the success rate adjustment threshold and the flow rate is lower than the flow rate upper limit, When the increased first flow rate is greater than the upper limit of the flow rate, the upper limit of the flow rate is used as the second flow rate; a fourth module is used when the success rate is higher than the success rate adjustment threshold and the When the first flow rate reaches the upper limit of the flow rate, the upper limit of the flow rate is used as the second flow rate; or a fifth module is used when the success rate is between the lower limit of the success rate and the adjustment threshold of the success rate. In the case of time, the first flow rate is regarded as the second flow rate. 如請求項27所述的系統,其中,所述流速調節模組還包括:第六模組,其用於當所述第二流速在第一預定數量的週期內保持在所述流速上限,並且所述成功率大於所述成功率調整閾值時,按照第二預定數值增加所述流速上限和所述第二流速。 The system of claim 27, wherein the flow rate adjustment module further includes: a sixth module configured to maintain the upper flow rate limit when the second flow rate is maintained at the upper limit of the flow rate within a first predetermined number of periods, and When the success rate is greater than the success rate adjustment threshold, the flow rate upper limit and the second flow rate are increased according to a second predetermined value. 如請求項28所述的系統,其中,在所述按照第二預定數值增加所述流速上限和所述第二流速後,所述流速調節模組還能夠在所述週期的下一週期中所述成功率下降的情況下,將增加後的流速上限和增加後的第二流速恢復到所述流速上限和所述第二流速並在第二預定數量的週期內不再增加所述流速上限。 The system of claim 28, wherein after increasing the flow rate upper limit and the second flow rate according to the second predetermined value, the flow rate adjustment module can also adjust the flow rate in the next cycle of the cycle. In the case where the success rate decreases, the increased flow rate upper limit and the increased second flow rate are restored to the flow rate upper limit and the second flow rate, and the flow rate upper limit is no longer increased within a second predetermined number of periods. 如請求項27所述的系統,其中,所述流速調節模組還用於在多個週期中重複執行如下步驟並且實施所述重複執行操作的次數達到預設次數的情況下,確定所述流速上限設置錯誤並發出告警信息:在使用所述第三模組之後直接使用所述第一模組;或在使用所述第一模組之後直接使用所述第三模組。 The system according to claim 27, wherein the flow rate adjustment module is also used to determine the flow rate when the following steps are repeatedly performed in multiple cycles and the number of times the repeated operations are performed reaches a preset number of times. The upper limit is set incorrectly and an alarm message is issued: use the first module directly after using the third module; or use the third module directly after using the first module. 如請求項23所述的系統,其中,所述用於在所述週期中根據所述第二流速和所述成功率生成用於裝載所述第一數據的第一令牌和用於裝載所述 第二數據的第二令牌的模組還包括:用於當所述成功率小於100%時,將所述成功率與所述第二流速相乘以作為裝載所述第一數據的流速,將所述第二流速減去所述裝載所述第一數據的流速之間的差值以得到裝載所述第二數據的流速,更新所述裝載所述第二數據的流速與所述第二流速的比值,並且根據所述裝載所述第一數據的流速生成所述第一令牌且根據所述裝載所述第二數據的流速生成所述第二令牌的模組;和用於當所述成功率等於100%時,將所述第二隊列中的數據的個數、與所述比值和所述第二流速的乘積中的最小值作為所述裝載所述第二數據的流速,將所述第二流速減去所述裝載所述第二數據的流速之間的差值以得到裝載所述第一數據的流速,更新所述比值,並且根據所述裝載所述第一數據的流速生成所述第一令牌且根據所述裝載所述第二數據的流速生成所述第二令牌的模組。 The system of claim 23, wherein the step of generating a first token for loading the first data and a first token for loading the first data according to the second flow rate and the success rate in the cycle. describe The module for the second token of the second data further includes: when the success rate is less than 100%, multiplying the success rate and the second flow rate to serve as the flow rate for loading the first data, Subtract the difference between the flow rate loading the first data from the second flow rate to obtain the flow rate loading the second data, and update the flow rate loading the second data and the second flow rate. The ratio of the flow rate, and a module for generating the first token according to the flow rate for loading the first data and generating the second token according to the flow rate for loading the second data; and When the success rate is equal to 100%, the minimum value of the number of data in the second queue and the product of the ratio and the second flow rate is used as the flow rate for loading the second data, Subtract the difference between the flow rates loading the second data from the second flow rate to obtain the flow rate loading the first data, update the ratio, and calculate the flow rate based on the flow rate loading the first data. A module that generates the first token based on the flow rate and generates the second token based on the flow rate loading the second data.
TW109127142A 2020-01-20 2020-08-11 A method and a system for a data transmission method based on asynchronous response TWI818188B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010065609.2A CN111291104B (en) 2020-01-20 2020-01-20 Method and system for transmitting data based on asynchronous response
CN202010065609.2 2020-01-20

Publications (2)

Publication Number Publication Date
TW202129516A TW202129516A (en) 2021-08-01
TWI818188B true TWI818188B (en) 2023-10-11

Family

ID=71025480

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109127142A TWI818188B (en) 2020-01-20 2020-08-11 A method and a system for a data transmission method based on asynchronous response

Country Status (4)

Country Link
CN (1) CN111291104B (en)
SG (1) SG11202113121TA (en)
TW (1) TWI818188B (en)
WO (1) WO2021147304A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291104B (en) * 2020-01-20 2023-07-28 中国银联股份有限公司 Method and system for transmitting data based on asynchronous response

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1169224A (en) * 1994-12-09 1997-12-31 英国电讯有限公司 Multi-processor environments
TW200537314A (en) * 2004-05-03 2005-11-16 Acer Inc Transmission rate auto-adjusted bus system and method
US20060159030A1 (en) * 2004-12-30 2006-07-20 Guenael Strutt System and method for managing communication links between nodes in a wireless communication network
CN1917413A (en) * 2005-08-18 2007-02-21 英业达股份有限公司 Automatic method for adjusting transmission rate
CN110191060A (en) * 2018-02-22 2019-08-30 中兴通讯股份有限公司 A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3309020B2 (en) * 1994-06-20 2002-07-29 富士通株式会社 Transmission throughput control apparatus and method
CN101174986A (en) * 2007-11-07 2008-05-07 中兴通讯股份有限公司 Method and apparatus for dynamic feedback of load distribution
CN105900061B (en) * 2014-10-22 2018-01-16 华为技术有限公司 Business method of flow control, controller and system in object storage system
US20170324642A1 (en) * 2016-05-04 2017-11-09 Microsoft Technology Licensing, Llc Initial and periodic slowdowns for background connections
CN107920027B (en) * 2016-10-08 2019-03-15 腾讯科技(深圳)有限公司 A kind of flow control methods and device
US10284480B2 (en) * 2016-12-27 2019-05-07 Netflix, Inc. Packet loss tolerant transmission control protocol congestion control
CN106850153B (en) * 2017-03-27 2020-05-22 网宿科技股份有限公司 Data retransmission method and system
CN111291104B (en) * 2020-01-20 2023-07-28 中国银联股份有限公司 Method and system for transmitting data based on asynchronous response

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1169224A (en) * 1994-12-09 1997-12-31 英国电讯有限公司 Multi-processor environments
TW200537314A (en) * 2004-05-03 2005-11-16 Acer Inc Transmission rate auto-adjusted bus system and method
US20060159030A1 (en) * 2004-12-30 2006-07-20 Guenael Strutt System and method for managing communication links between nodes in a wireless communication network
CN1917413A (en) * 2005-08-18 2007-02-21 英业达股份有限公司 Automatic method for adjusting transmission rate
CN110191060A (en) * 2018-02-22 2019-08-30 中兴通讯股份有限公司 A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate

Also Published As

Publication number Publication date
WO2021147304A1 (en) 2021-07-29
CN111291104B (en) 2023-07-28
SG11202113121TA (en) 2021-12-30
TW202129516A (en) 2021-08-01
CN111291104A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN110297801B (en) System and method for just-in-one transaction semantics of transaction system based on fault-tolerant FPGA
US7676580B2 (en) Message delivery with configurable assurances and features between two endpoints
US7594022B2 (en) Regulating client requests in an electronic messaging environment
US20160285812A1 (en) Method of issuing messages of a message queue and a message issuing device
CN110460534B (en) Method, device, equipment and storage medium for reporting request message
CN107257363B (en) Method and system for responding request of request terminal
TWI818188B (en) A method and a system for a data transmission method based on asynchronous response
WO2014187220A1 (en) Electronic device, storage medium and file transferrting method
CN108023759B (en) Self-adaptive resource scheduling method and device
WO2020134755A1 (en) Data transmission method and device
CN111245630B (en) Method for simultaneously upgrading multiple devices in local area network
CN110502364A (en) Across the cloud back-up restoring method of big data sandbox cluster under a kind of OpenStack platform
CN114844809B (en) Multi-factor arbitration method and device based on network heartbeat and kernel disk heartbeat
CN110365786B (en) Job processing system, asynchronous job scheduling method, and computer device
WO2023147716A1 (en) Flow control and billing methods, apparatuses and system, electronic device, medium and product
CN116860466A (en) Asynchronous communication to synchronous communication method based on MQTT
CN110825505A (en) Task scheduling method and device, computer equipment and storage medium
CN113612624B (en) Method and device for processing heartbeat between nodes
WO2019153482A1 (en) Method for generating data packets in anti-money laundering operation, storage medium and server
CN114327837A (en) Distributed task scheduling operation system and method based on message queue
CN114640703A (en) Data communication method and device, electronic equipment and storage medium
CN114021052A (en) Inference service method, equipment and system
CN108737460B (en) Connection processing method and client
CN115174440B (en) Connectivity detection method, device, storage medium and equipment
CN108737208A (en) Connection synchronous method, device and computer based on security gateway deep-packet detection