CN-122027573-A - Flow control method, system, electronic device and storage medium
Abstract
The application relates to a flow control method, a flow control system, electronic equipment and a storage medium. The method comprises the steps of obtaining the accumulated number of offline reconnections between target equipment and a cloud server, obtaining a rate adjustment coefficient of a current period and a period adjustment coefficient of the current period, determining a target data transmission rate based on the rate adjustment coefficient of the current period and a data transmission rate of a previous period, determining a target transmission duration based on the period adjustment coefficient of the current period and a data transmission duration of the previous period, determining a target supplementary flow according to the target data transmission rate, the target transmission duration and the transmitted data flow of the current period, and starting a standby interface of the target equipment under the condition that the target equipment and the cloud server are in network connection, and transmitting data corresponding to the target supplementary flow to the cloud server by using the standby interface. According to the technical scheme provided by the application, the flexibility of flow control, the stability of integral operation and the response speed can be improved.
Inventors
- CAI RUIJIA
Assignees
- 宁波方太厨具有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260107
Claims (10)
- 1. A flow control method, comprising: Acquiring the accumulated number of offline reconnection times between the target equipment and the cloud server; Acquiring a rate adjustment coefficient of a current period, a period adjustment coefficient of the current period, transmitted data traffic of the current period, data transmission duration of the previous period and data transmission rate of the previous period under the condition that the accumulated times reach preset reconnection times; Determining a target data transmission rate of the current period based on the rate adjustment coefficient of the current period and the data transmission rate of the previous period; Determining a target transmission duration of the current period based on the period adjustment coefficient of the current period and the data transmission duration of the previous period; Determining a target supplementary flow according to the target data transmission rate, the target transmission duration and the transmitted data flow of the current period; And under the condition that the target equipment and the cloud server are in network connection restoration, starting a standby interface of the target equipment, and transmitting data corresponding to the target supplementary flow to the cloud server by using the standby interface.
- 2. The flow control method according to claim 1, wherein the obtaining a rate adjustment coefficient of a current period includes: Acquiring data transmission flow of each of a plurality of history periods; Determining the flow difference value of adjacent historical periods in the historical periods according to the data transmission flow of each of the historical periods; Determining a maximum flow difference value and a minimum flow difference value from a plurality of flow difference values, and determining an average flow difference value of the maximum flow difference value and the minimum flow difference value; and determining a rate adjustment coefficient of the current period according to the average flow difference value and the maximum flow difference value.
- 3. The flow control method according to claim 2, characterized in that the method further comprises: In the case that the rate adjustment coefficient of the current period is greater than the maximum rate adjustment coefficient, determining the maximum rate adjustment coefficient as the rate adjustment coefficient of the current period, or And determining the minimum rate adjustment coefficient as the rate adjustment coefficient of the current period under the condition that the rate adjustment coefficient of the current period is smaller than the minimum rate adjustment coefficient.
- 4. The flow control method according to claim 1, wherein the obtaining step of the cycle adjustment coefficient of the current cycle includes: acquiring data transmission flow of each of a plurality of history periods and predicted transmission flow corresponding to each of the plurality of history periods; Determining the number of times that the data transmission flow of each history period in the plurality of history periods is greater than or equal to the preset transmission flow of each history period in the plurality of history periods according to the data transmission flow of each history period and the predicted transmission flow corresponding to each history period; Obtaining a cycle adjustment proportion of the current cycle based on the ratio of the flow meeting times to the number of the plurality of historical cycles; and determining a period adjustment coefficient of the current period according to the period adjustment proportion of the current period.
- 5. The flow control method according to claim 1, wherein the determining a target supplementary flow according to the target data transmission rate, the target transmission duration, and the transmitted data flow of the current period comprises: multiplying the target data transmission rate and the target transmission duration to obtain a target data transmission flow of the current period; And carrying out difference value calculation processing on the target data transmission flow and the transmitted data flow in the current period, and determining the target supplementary flow.
- 6. The flow control method according to claim 1, wherein the obtaining the accumulated number of offline reconnections between the target device and the cloud server includes: Acquiring a target communication state between the target equipment and the cloud server; and under the condition that the target communication state does not meet the preset communication condition, determining the accumulated number of offline reconnection.
- 7. The flow control method of claim 6, further comprising: And under the condition that the target communication state meets the preset communication condition, controlling the data in the current period to be transmitted from a target interface of the target equipment to the cloud server.
- 8. A flow control system, comprising: The accumulated time acquisition module is used for acquiring accumulated times of offline reconnection between the target equipment and the cloud server; The adjustment coefficient acquisition module is used for acquiring a rate adjustment coefficient of a current period, a period adjustment coefficient of the current period, a transmitted data flow of the current period, a data transmission duration of the previous period and a data transmission rate of the previous period under the condition that the accumulated times reach a preset reconnection time; a target data transmission rate determining module, configured to determine a target data transmission rate of the current period based on the rate adjustment coefficient of the current period and the data transmission rate of the previous period; the target transmission time length determining module is used for determining the target transmission time length of the current period based on the period adjustment coefficient of the current period and the data transmission time length of the previous period; The target supplementary flow determining module is used for determining target supplementary flow according to the target data transmission rate, the target transmission duration and the transmitted data flow of the current period; And the transmission module is used for starting a standby interface of the target equipment under the condition that the target equipment and the cloud server are in network connection restoration, and transmitting data corresponding to the target supplementary flow to the cloud server by using the standby interface.
- 9. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the flow control method of any one of claims 1 to 7.
- 10. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the flow control method of any one of claims 1 to 7.
Description
Flow control method, system, electronic device and storage medium Technical Field The present application relates to the field of network traffic technologies, and in particular, to a traffic control method, system, electronic device, and storage medium. Background Under the condition that the Internet of things and cloud computing are widely applied at present, terminal equipment, such as intelligent home equipment and a cloud server, generally conduct data interaction so as to achieve functions of data synchronization, remote control, state reporting and the like. However, in the actual operation situation, due to the reasons of unstable network or signal interference, the connection between the terminal device and the cloud server will be interrupted, and the terminal device is in an offline state. During the communication disconnection period, the terminal device may not normally record the generated data and the corresponding flow information, so that the data in the time period is lost, and the device side cannot supplement the data to the cloud platform. Particularly, under the condition of frequent heavy connection, the problems of high data delay, poor system real-time performance, reduced operation stability and the like are easily caused. In addition, since the flow data of the disconnection period is not uploaded, the operation data of the device acquired by the cloud platform is incomplete, which may affect the subsequent analysis and judgment of the operation state of the device. For example, when a device fails, due to lack of complete data records, it is difficult to accurately trace and analyze the failure cause, thereby affecting quick positioning and processing of the problem, and finally reducing the use experience and service quality of the user. Disclosure of Invention The application provides a flow control method, a flow control system, electronic equipment and a storage medium, which at least solve the problems of how to accurately obtain supplementary flow, improve the reliability of data transmission and the like in the related technology. The technical scheme of the application is as follows: according to a first aspect of an embodiment of the present application, there is provided a flow control method, including: Acquiring the accumulated number of offline reconnection times between the target equipment and the cloud server; Acquiring a rate adjustment coefficient of a current period, a period adjustment coefficient of the current period, transmitted data traffic of the current period, data transmission duration of a previous period and data transmission rate of the previous period under the condition that the accumulated times reach the preset reconnection times; determining a target data transmission rate of the current period based on the rate adjustment coefficient of the current period and the data transmission rate of the previous period; determining a target transmission duration of the current period based on the period adjustment coefficient of the current period and the data transmission duration of the previous period; Determining a target supplementary flow according to the target data transmission rate, the target transmission duration and the transmitted data flow of the current period; Under the condition that the target equipment and the cloud server are in network connection restoration, a standby interface of the target equipment is started, and data corresponding to the target supplementary flow are transmitted to the cloud server by using the standby interface. According to a second aspect of an embodiment of the present application, there is provided a flow control device including: The accumulated time acquisition module is used for acquiring accumulated times of offline reconnection between the target equipment and the cloud server; The adjustment coefficient acquisition module is used for acquiring a rate adjustment coefficient of the current period, a period adjustment coefficient of the current period, transmitted data traffic of the current period, data transmission duration of the previous period and data transmission rate of the previous period under the condition that the accumulated times reach the preset reconnection times; The target data transmission rate determining module is used for determining the target data transmission rate of the current period based on the rate adjustment coefficient of the current period and the data transmission rate of the previous period; the target transmission time length determining module is used for determining the target transmission time length of the current period based on the period adjustment coefficient of the current period and the data transmission time length of the previous period; The target supplementary flow determining module is used for determining the target supplementary flow according to the target data transmission rate, the target transmission duration and the transmitted data flow of the