Live traffic statistics delay, how to achieve error-free calculation of traffic charges

WBOY
Release: 2016-09-06 08:57:07
Original
1105 people have browsed it

Currently, we are working on a Baidu open cloud interface, which is about the activation of live broadcast and traffic statistics. However, there is a delay in Baidu's traffic statistics, which is about 20 minutes. How can I avoid this delay using PHP, accurately calculate the traffic cost, and if the user's balance is insufficient, force the live broadcast to be closed;

<code>我想到的解决方案是,做一个定时任务,在用户停止直播后20分钟时执行,但仍然存在欠费时仍可直播的问题,大神们,还有没有其他方案呢??</code>
Copy after login
Copy after login

Reply content:

Currently, we are working on a Baidu open cloud interface, which is about the activation of live broadcast and traffic statistics. However, there is a delay in Baidu's traffic statistics, which is about 20 minutes. How can I avoid this delay using PHP, accurately calculate the traffic cost, and if the user's balance is insufficient, force the live broadcast to be closed;

<code>我想到的解决方案是,做一个定时任务,在用户停止直播后20分钟时执行,但仍然存在欠费时仍可直播的问题,大神们,还有没有其他方案呢??</code>
Copy after login
Copy after login

This statistical delay comes from the upstream (your service provider Baidu Open Cloud). You cannot control this delay downstream. You can set a safety threshold for the user, which is to estimate how much traffic the user can use in 20 minutes when the user's balance is close. This traffic time can send an alarm to the user

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!