Currently, we are working on a Baidu open cloud interface, which is about the activation of live broadcasting and traffic statistics. However, there is a latency in Baidu's traffic statistics. about 20 minutes, how can I avoid this latency using php and accurately calculate the traffic fee? if your balance is insufficient, disable its live broadcast... currently, we are working on a Baidu open cloud interface, which is about the activation of live broadcasting and traffic statistics. However, there is a latency in Baidu's traffic statistics. about 20 minutes, how can I avoid this latency using php and accurately calculate the traffic fee? if your balance is insufficient, disable its live video;
The solution I came up with is to make a scheduled task that will be executed 20 minutes after the user stops broadcasting, but there is still a problem that live broadcasting can still be performed when the user is in arrears, is there any other solution ??
Reply content:
Currently, we are working on a Baidu open cloud interface, which is about the activation of live broadcasting and traffic statistics. However, there is a latency in Baidu's traffic statistics. about 20 minutes, how can I avoid this latency using php and accurately calculate the traffic fee? if your balance is insufficient, disable its live video;
The solution I came up with is to make a scheduled task that will be executed 20 minutes after the user stops broadcasting, but there is still a problem that live broadcasting can still be performed when the user is in arrears, is there any other solution ??
This statistical delay comes from upstream (your service provider Baidu Open Cloud) you cannot control the latency downstream. you can set a security threshold for the user to estimate the amount of traffic that the user can use in 20 minutes. when the user's balance approaches this traffic, you can the user sends an alarm