Buffer area adjusting method and equipment

By dynamically adjusting the buffer size of IoT devices, the problem of insufficient buffer capacity of IoT devices in smart homes is solved, and support for larger packets and communication success rate is improved.

CN119497138APending Publication Date: 2025-02-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311022281.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-14
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In smart home scenarios, the buffer capacity of IoT devices is small and cannot support larger packets sent by hub devices or other electronic devices, resulting in communication failure.

Method used

A buffer adjustment method is provided, which sends buffer information to the management device through an electronic device, receives control commands, and dynamically adjusts the buffer size according to the commands to adapt to the packet size to be sent.

Benefits of technology

Ensure that electronic devices can successfully receive messages sent by management devices, improve communication success rate, and expand the service capabilities of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119497138A_ABST
    Figure CN119497138A_ABST
Patent Text Reader

Abstract

The invention provides a buffer area adjusting method and equipment. In the method, an electronic device sends buffer area information to a management device, the buffer area information comprises related information used for determining a first value, and the first value is the size of a buffer area before the electronic device is adjusted; the electronic equipment receives a control command sent by the management equipment, wherein the control command is used for indicating the electronic equipment to adjust the size of the buffer area; the electronic equipment adjusts the size of the buffer area to a target value according to the control command; and after the size of the buffer area is adjusted to the target value, the electronic equipment receives at least one message sent by the management equipment. Through the scheme, the electronic equipment can report the size of the buffer area before the electronic equipment is adjusted to the management equipment, the management equipment can indicate the electronic equipment to adjust the size of the buffer area, and the electronic equipment can flexibly adjust the size of the buffer area to receive the message sent by the management equipment, so that the success rate of communication between the electronic equipment and the management equipment can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a buffer adjustment method and device. Background Art

[0002] With the popularization of broadband services, smart home, as the basic application of Internet of Things (IoT) technology, has been widely promoted in life, entertainment, learning and office scenes, and various types of IoT devices have also been widely used. For example, common IoT devices in smart home scenes include lamps, electric curtains, smart doorbells, smart speakers, washing machines and other devices.

[0003] In a smart home scenario, IoT devices can establish a connection with a central device and accept control from the central device. The buffer used by IoT devices to receive messages is usually a fixed storage space with a small capacity. When a central device or other electronic device needs to send a large message to an IoT device, the communication may fail because the buffer of the IoT device cannot support the transmission of the large message. Summary of the invention

[0004] The present application provides a buffer zone adjustment method and device, which are used to provide a solution for dynamically adjusting the buffer zone of an electronic device.

[0005] In a first aspect, the present application provides a buffer adjustment method, which can be performed by an electronic device. The method includes: the electronic device sends buffer information to a management device, the buffer information includes relevant information for determining a first value, the first value is the buffer size before the electronic device is adjusted; the electronic device receives a control command sent by the management device, the control command is used to instruct the electronic device to adjust the buffer size; the electronic device adjusts the buffer size to a target value according to the control command; after adjusting the buffer size to the target value, the electronic device receives at least one message sent by the management device.

[0006] In this method, the electronic device can send buffer information to the management device, so that the management device can know the buffer size of the electronic device before adjustment, the management device can instruct the electronic device to adjust the buffer size, and the electronic device can flexibly adjust the buffer size to receive the message sent by the management device, thereby ensuring the communication success rate between the electronic device and the management device.

[0007] In one possible design, the buffer information includes at least one of the following: the buffer size of the electronic device before adjustment; the type of the electronic device; and an indication value used to determine the buffer size of the electronic device before adjustment.

[0008] Through this design, the electronic device can directly send the buffer size of the electronic device before adjustment to the management device through the buffer information, or the electronic device can carry the type of the electronic device and an indication value of the buffer size before adjustment in the buffer information to indicate the buffer size of the electronic device before adjustment, so that the electronic device can flexibly report the buffer size to the management device.

[0009] In one possible design, the buffer information also includes relevant information for determining an adjustment value of the buffer of the electronic device.

[0010] With this design, the electronic device can also report relevant information for determining the buffer adjustment value to the management device through the buffer information, so that the management device can accurately determine the buffer size that the electronic device can adjust.

[0011] In one possible design, the buffer information includes an allowable adjustment range of the buffer size of the electronic device; before sending the buffer information to the management device, the method also includes: determining the allowable adjustment range of the buffer size according to the business operation status.

[0012] Through this design, the electronic device can determine the allowable adjustment range of the buffer size according to the business operation status, and carry the allowable adjustment range of the buffer size in the buffer information, so that the management device can know the maximum adjustable buffer size of the electronic device and more accurately determine the target value of the electronic device for adjusting the buffer size.

[0013] In one possible design, the control command is also used to indicate an effective duration; after adjusting the buffer size to a target value according to the control command, the method further includes: after the effective duration, adjusting the buffer size from the target value to a second value.

[0014] Through this design, the electronic device can reset the buffer to a second value after completing message reception. The second value can be a preset value or a memory available space value determined by the electronic device based on the business operation status, thereby not affecting other businesses of the electronic device that require memory.

[0015] In one possible design, the target value is greater than the first value.

[0016] Through this design, when the management device has a large message to be sent to the electronic device, the electronic device can increase the buffer size according to the control command sent by the management device, so that the electronic device has the ability to receive larger messages and expand the business capabilities of the electronic device.

[0017] In one possible design, the control command includes at least one of the following: the target value; the amplitude value of the electronic device adjusting the buffer size; and the adjustment range of the electronic device adjusting the buffer size.

[0018] Through this design, multiple management devices are provided to instruct electronic devices to adjust buffer sizes, thereby improving the flexibility of the buffer adjustment method.

[0019] In one possible design, before adjusting the buffer size to the target value according to the control command, the method further includes: determining the target value according to a service operation status of the electronic device.

[0020] With this design, the electronic device can determine the target value for adjusting the buffer size according to its own business operation status, thereby ensuring that the adjusted buffer size does not affect the normal business of the electronic device.

[0021] In one possible design, after adjusting the buffer size to the target value and before receiving at least one message sent by the management device, the method also includes: sending a first confirmation message to the management device, wherein the first confirmation message is used to indicate that the electronic device has adjusted the buffer size to the target value.

[0022] Through this design, after receiving the first confirmation message, the central device can determine that the electronic device has adjusted the buffer size, and then send a message to the electronic device, further ensuring that the electronic device can successfully receive the message.

[0023] In a second aspect, the present application provides a buffer adjustment method, which can be executed by a management device, which can be, for example, a hub device in a smart home system. The method includes: the management device receives buffer information sent by an electronic device, the buffer information includes relevant information for determining a first value, and the first value is the buffer size of the electronic device before adjustment; the management device sends a control command to the electronic device according to the buffer information, and the control command is used to instruct the electronic device to adjust the buffer size; the management device sends at least one message to the electronic device.

[0024] In this method, when the management device determines that the buffer size of the electronic device needs to be adjusted based on the buffer information sent by the electronic device, it can send a control command to the electronic device to instruct the electronic device to adjust the buffer size to ensure that the adjusted buffer can receive the message sent by the management device and ensure successful transmission of the message.

[0025] In one possible design, the buffer information includes at least one of the following: the buffer size of the electronic device before adjustment; the type of the electronic device; and an indication value used to determine the buffer size of the electronic device before adjustment.

[0026] In one possible design, before sending the control command to the electronic device according to the buffer information, the method also includes: determining that there is at least one message to be sent to the electronic device, and the at least one message includes a message whose message size is greater than the first value.

[0027] Through this design, when the management device determines that there is a message in the message to be sent to the electronic device whose size is larger than the buffer size of the electronic device before adjustment, it can instruct the electronic device to adjust the buffer size, thereby improving the success rate of message transmission.

[0028] In one possible design, the buffer information also includes relevant information for determining an adjustment value of the buffer of the electronic device.

[0029] In one possible design, the buffer information includes an allowable adjustment range of the buffer size of the electronic device; sending a control command to the electronic device based on the buffer information includes: determining an adjustment target value based on a message size of a target message and the allowable adjustment range; the target message is a message with the largest message size among the at least one message; sending the control command to the electronic device, the control command including information for determining the adjustment target value.

[0030] Through this design, the management device can determine the adjustment target value based on the message size of the target message with the largest message size among the messages to be sent to the electronic device, so that after the electronic device adjusts the buffer size according to the adjustment target value, the electronic device can successfully receive at least one message sent by the management device, thereby improving the communication success rate.

[0031] In a possible design, the adjustment target value is greater than the first value.

[0032] In one possible design, the control command includes at least one of the following: an adjustment target value for adjusting the buffer size by the electronic device; an amplitude value for adjusting the buffer size by the electronic device; and an adjustment range for adjusting the buffer size by the electronic device.

[0033] In a possible design, the control instruction is also used to indicate the effectiveness duration.

[0034] In one possible design, before sending a control command to the electronic device according to the buffer information, the method further includes:

[0035] The duration required for the message transmission task is determined according to the message size and the message transmission rate of the at least one message, and the validity duration is determined according to the duration required for the message transmission task.

[0036] Through this design, the electronic device can complete receiving at least one message within the effective time determined by the management device. After the effective time, the electronic device can adjust the buffer size again so as not to affect the normal business of the electronic device.

[0037] In one possible design, sending at least one message to the electronic device includes: sending multiple messages to the electronic device; sending multiple messages to the electronic device includes: sending a first part of the multiple messages to the electronic device at a first transmission rate, and sending a second part of the multiple messages to the electronic device at a second transmission rate.

[0038] Through this design, the management device can adjust the transmission rate of sending messages to electronic devices to adapt to the rate at which electronic devices process messages, further improving the success rate of message transmission.

[0039] In one possible design, the at least one message includes a first message and a second message, and the second message is the next message of the first message to be sent to the electronic device; sending at least one message to the electronic device includes: sending the first message to the electronic device; after receiving a second confirmation message corresponding to the first message sent by the electronic device, sending the second message to the electronic device.

[0040] Through this design, after receiving the second confirmation message corresponding to the first message, the management device sends the next message after the first message to the electronic device, which can ensure that the electronic device can correctly receive each message sent by the central device, thereby improving communication accuracy.

[0041] In one possible design, the sum of the message size of the first message and the message size of the second message is greater than the target value.

[0042] Through this design, the management device determines that the sum of the message size of the first message and the message size of the second message is greater than the target value, indicating that the electronic device cannot receive the second message before completing the message processing of the first message. The management device can then send the second message to the electronic device after receiving the second confirmation message corresponding to the first message, ensuring that the electronic device has sufficient buffer to receive the second message, thereby further ensuring the communication success rate.

[0043] In one possible design, after sending a control command to the electronic device according to the buffer information and before sending at least one message to the electronic device, the method also includes: receiving a first confirmation message sent by the electronic device, wherein the first confirmation message is used to indicate that the electronic device has adjusted the buffer size to a target value.

[0044] Through this design, after receiving the first confirmation message, the management device can determine that the electronic device has adjusted the buffer size, and then send a message to the electronic device, further ensuring that the electronic device can successfully receive the message.

[0045] In a third aspect, the present application provides a buffer adjustment method, which can be performed by an electronic device. The method includes: the electronic device determines that the target service is running, and adjusts the buffer size of the electronic device from a third value to a target value; the third value is the memory available space value of the electronic device when the target service is not running, and the third value is greater than the target value; the electronic device sends first buffer information to a management device, and the first buffer information is used to indicate that the buffer size of the electronic device is adjusted to the target value; the electronic device receives at least one message sent by the management device.

[0046] In this method, the electronic device can set the buffer size to a larger value, such as the third value, so that the electronic device can receive larger messages sent by the management device or other electronic devices at any time to ensure normal communication of the electronic device. When the electronic device detects that the target service is running, the buffer size can be adjusted to the target value, which is less than the third value, thereby reducing the storage space occupied by the buffer, providing more memory space for the target service, and ensuring the normal operation of the target service.

[0047] In one possible design, after determining that the target service is running and before adjusting the buffer size of the electronic device from a third value to a target value, the method further includes: determining the target value based on a storage space value required to be occupied by the target service.

[0048] Through this design, after determining that the target business is running, the electronic device can determine the target value based on the storage space value required by the target business. After the electronic device adjusts the buffer size to the target value, it can ensure that the memory can provide sufficient storage space for the target business and the target business can run normally.

[0049] In one possible design, the method also includes: after the target service ends, adjusting the buffer size of the electronic device from the target value to the third value; sending second buffer information to the management device, the second buffer information being used to indicate that the buffer size of the electronic device is adjusted to the third value.

[0050] Through this design, after the electronic device adjusts the buffer size to the third value, it can send the second buffer information to the management device, so that the electronic device can report the buffer size to the central device again, ensuring that the central device can know the buffer size of the electronic device in time.

[0051] In a fourth aspect, the present application provides a buffer adjustment method, which can be executed by a management device. The method includes: the management device receives first buffer information sent by an electronic device, the first buffer information is used to indicate that the buffer size of the electronic device is adjusted to the target value; the management device sends at least one message to the electronic device according to the target value.

[0052] In this method, after adjusting the buffer size, the electronic device can report the adjusted buffer size to the management device, and the management device can send a message to the electronic device according to the adjusted buffer size of the electronic device to improve the communication success rate.

[0053] In one possible design, sending at least one message to the electronic device according to the target value includes: when a message size of a first message is greater than the target value, splitting the first message into multiple sub-messages according to the target value, and sending the multiple sub-messages to the electronic device in sequence according to the order of the multiple sub-messages; the first message is any one of the at least one message.

[0054] Through this design, when the management device determines that there is a message in the message to be sent to the electronic device whose size is larger than the buffer size of the electronic device, the message can be split into multiple sub-messages and the multiple sub-messages can be sent separately to ensure that the electronic device can accurately receive the message sent by the management device.

[0055] In one possible design, sending at least one message to the electronic device includes: sending multiple messages to the electronic device; sending multiple messages to the electronic device includes: sending a first part of the multiple messages to the electronic device at a first transmission rate, and sending a second part of the multiple messages to the electronic device at a second transmission rate.

[0056] In one possible design, the at least one message includes a first message and a second message, and the second message is the next message of the first message to be sent to the electronic device; sending at least one message to the electronic device includes: sending the first message to the electronic device; after receiving a confirmation message corresponding to the first message sent by the electronic device, sending the second message to the electronic device.

[0057] In one possible design, the sum of the message size of the first message and the message size of the second message is greater than the target value.

[0058] In a fifth aspect, the present application provides an electronic device, the electronic device comprising multiple functional modules; the multiple functional modules interact with each other to implement the method performed by the electronic device in any of the above aspects and its embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0059] In a sixth aspect, the present application provides an electronic device comprising at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the method executed by the electronic device in any of the above aspects and its various embodiments.

[0060] In a seventh aspect, the present application provides a management device, the management device comprising a plurality of functional modules; the plurality of functional modules interact with each other to implement the method performed by the management device in any of the above aspects and in each of its embodiments. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be arbitrarily combined or divided based on specific implementations.

[0061] In an eighth aspect, the present application provides a management device, comprising at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the management device is running, the at least one processor executes the method executed by the management device in any of the above aspects and its various embodiments.

[0062] In a ninth aspect, the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method executed by the electronic device or management device in any of the above aspects and its various embodiments.

[0063] In the tenth aspect, the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method executed by the electronic device or management device in any of the above aspects and its various embodiments.

[0064] In the eleventh aspect, the present application also provides a chip, which is used to read a computer program stored in a memory and execute a method executed by an electronic device or a management device in any of the above aspects and their respective embodiments.

[0065] In a twelfth aspect, the present application further provides a chip system, which includes a processor for supporting a computer device to implement a method executed by an electronic device or a management device in any of the above aspects and its various embodiments. In a possible design, the chip system also includes a memory, which is used to store programs and data necessary for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A schematic diagram of a smart home scenario provided in an embodiment of the present application;

[0067] Figure 2 An architecture diagram of a smart home system provided in an embodiment of the present application;

[0068] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0069] Figure 4 A flowchart of a buffer adjustment method provided in an embodiment of the present application;

[0070] Figure 5 A flowchart of a buffer adjustment method provided in an embodiment of the present application;

[0071] Figure 6 A structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0073] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0074] The Internet of Things (IoT), which can be understood as "the Internet of Everything Connected", is a network extended and expanded on the basis of the Internet. It is a huge network formed by combining various information sensing devices with the network. It can realize the interconnection of people, machines and things at any time and any place.

[0075] Smart home is the basic application of the Internet of Things in the home. With the popularization of broadband services, smart products involve all aspects of users' lives. Figure 1 A schematic diagram of a smart home scenario provided in an embodiment of the present application. Figure 1 , the scenario includes a gateway device, a management device and at least one electronic device, such as Figure 1 3 electronic devices are used as an example. The management device and at least one electronic device can be connected to the gateway device to establish a network connection, and the management device can be used to control at least one electronic device. In some embodiments, the gateway device can also serve as a management device. In this embodiment, at least one electronic device can be connected to the gateway device and be controlled by the gateway device.

[0076] Among them, the gateway device can be a device with routing function, such as a router. The electronic device can be an IoT device, such as a smart doorbell, smart door lock, refrigerator, washing machine, smart speaker, smart TV, etc. The management device is also called a hub device. In the following introduction, the management device is taken as a hub device as an example. The hub device can integrate home business services to control at least one electronic device in the smart home scene. The hub device can be a long-lasting electrical device that resides in the home, such as a smart speaker, smart TV, smart routing device, set-top box and other devices, or it can be a dedicated home device.

[0077] exist Figure 1In the smart home scenario shown, the hub device can control at least one electronic device, and different electronic devices can also communicate with each other. However, the random access memory (RAM) of the electronic device is limited, and the buffer used to receive messages is usually a fixed storage space in the memory, and the capacity of the buffer is small. For example, the buffer used to receive messages in some lightweight IoT devices is only 1k in size. When the hub device or other electronic devices need to send a large message to the IoT device, the communication may fail because the buffer of the IoT device cannot support the transmission of the large message.

[0078] For example, in Figure 1 In the smart home scenario shown, since the buffer for receiving messages of the lightweight IoT device is small, it is unable to receive messages with large data volume such as certificates sent by the central device or other electronic devices, and thus the identity authentication between devices cannot be completed. For another example, the central device can perform batch control on multiple electronic devices. The central device can integrate the control commands corresponding to each electronic device into a message, and send the message to multiple electronic devices at the same time, so as to achieve the effect of multiple electronic devices executing commands at the same time. For example, the central device can be configured to turn on all the lights in the living room at 18:00 every day and adjust the color temperature to 2700K. Then the central device sends a message to all the lamps in the living room at 18:00. The message includes the control commands corresponding to all the lamps in the living room. When the buffer for receiving messages of the lamp is small, the lamp cannot receive the message for batch control sent by the central device, and the lamp cannot respond to the control command of the central device, resulting in control failure.

[0079] In some embodiments, electronic devices that support audio and video playback can dynamically adjust the buffer. In a specific implementation, the electronic device can dynamically adjust the size of the audio and video receiving buffer according to the audio and video download rate and playback rate during the audio and video playback process. However, this solution requires the electronic device to have high computing power and is not suitable for lightweight IoT devices.

[0080] Based on the above problems, an embodiment of the present application provides a buffer adjustment method, which is used to provide a solution for dynamically adjusting the buffer of an electronic device. Figure 2 This is an architecture diagram of the smart home system provided in the embodiment of the present application. Figure 2 The smart home system includes at least one electronic device and a hub device. Figure 2 In the figure, two electronic devices (electronic device 1 and electronic device 2) are used as an example. Figure 2The electronic device shown may include a buffer management module, a buffer, and a service module. In the embodiment of the present application, the memory of the electronic device may include a buffer for receiving messages and a memory for service operation. The buffer management module in the electronic device may monitor the operation of the service module and calculate the maximum adjustment value of the buffer, which may be the maximum storage space size in the memory of the electronic device that can be used to receive messages.

[0081] like Figure 2 As shown, the central device may include a buffer management module of electronic device 1 and a buffer management module of electronic device 2. The buffer management module of electronic device 1 may include a message cache, a time calculation module, a rate monitoring module, and a recording module, wherein the message cache is used to store messages to be sent from the central device to the electronic device 1; the time calculation module is used to calculate the effective duration of the adjustment of the buffer size of the electronic device 1; the rate monitoring module is used to monitor the rate at which the electronic device 1 processes messages; the recording module is used to record the size of messages sent to the electronic device 1 within the sending cycle, and is used to record the maximum adjustment value of the buffer supported by the electronic device 1. It should be noted that the maximum adjustment value may be a refreshable value reported by the electronic device 1 to the central device.

[0082] It should be noted that Figure 2 Taking the buffer management module of electronic device 1 in the hub device and the structure of electronic device 1 as an example, the structure of the buffer management module of electronic device 2 can refer to the structure of the buffer management module of electronic device 1, and the structure of electronic device 2 can refer to the structure of electronic device 1, and the repeated parts will not be repeated. Figure 2 The structure shown is only an example of the central device and the electronic device provided in the embodiment of the present application, and cannot be used to limit the central device and the electronic device provided in the embodiment of the present application. In specific implementation, the central device and the electronic device may have more Figure 2 More or fewer modules in the structure shown, for example, excluding the rate monitoring module and / or the time calculation module, etc. In addition, the electronic device 1 buffer management module and the electronic device 2 buffer management module included in the above-mentioned central device can be set to the same one in the specific implementation, and manage the buffers of the electronic device 1 and the electronic device 2 respectively; or they can be set to different modules, respectively managing the buffer of the electronic device 1 and the buffer of the electronic device 2.

[0083] based on Figure 2In the smart home system shown, the size of the buffer in the electronic device 1 can be adjusted, and the default size of the buffer of the electronic device 1 is a preset value. The buffer management module in the electronic device 1 can monitor the operation of the business module, calculate the maximum adjustment value of the buffer in the memory of the electronic device that can be used to receive the message, and the electronic device 1 can send the adjustment range of the buffer (such as the adjustment range can be a preset value to the maximum adjustment value) and the current buffer size of the electronic device 1 to the central device. The recording module of the central device can record the adjustment range of the buffer of the electronic device 1 and the buffer size of the electronic device 1. When the central device needs to send a message to the electronic device 1, the central device can determine whether the buffer of the electronic device 1 needs to be adjusted according to the size of the message to be sent and the buffer size of the electronic device 1. When the size of the message to be sent is greater than the buffer size of the electronic device 1, the central device can determine the target value according to the size of the message to be sent, and instruct the electronic device 1 to adjust the buffer size to the target value, the buffer management module of the electronic device 1 can adjust the buffer size to the target value, and the central device can send the message to be sent to the electronic device 1 to ensure that the central device and the electronic device 1 can communicate normally.

[0084] Furthermore, before the central device instructs the electronic device 1 to adjust the buffer size to the target value, the time efficiency calculation module of the central device can also calculate the effective duration of the electronic device 1 adjusting the buffer size according to the time required for the central device to send the message to be sent, and when instructing the electronic device 1 to adjust the buffer size to the target value, the effective duration is simultaneously indicated to the electronic device 1. The electronic device 1 can adjust the buffer size to the target value within the effective duration.

[0085] When sending a message to the electronic device 1, the rate monitoring module in the central device can adjust the message sending rate according to the sent message size and the target value obtained by the recording module to ensure that the message can be successfully transmitted.

[0086] It should be noted that Figure 2 The specific functions of each module in the electronic device and the central device shown can be found in the following embodiments and will not be described in detail here.

[0087] The hardware structure of the electronic device involved in the embodiment of the present application is introduced below:

[0088] Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Figure 3As shown, the electronic device 100 may include a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, etc.

[0089] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.

[0090] The wireless communication function of the electronic device 100 can be implemented by an antenna, a wireless communication module 160, a modulation and demodulation processor, and a baseband processor. The antenna is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0091] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0092] In some embodiments, the antenna of the electronic device 100 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).

[0093] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application, etc. The data storage area can store data generated during the use of the electronic device 100 (such as captured images, recorded videos, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0094] In an embodiment of the present application, the memory storage 121 may include a buffer for storing messages received by the electronic device 100. After the electronic device 100 receives messages sent by other electronic devices through the wireless communication module 160, the received messages are stored in the buffer in the memory storage 121. When the buffer size is smaller than the message size of the message to be received, the electronic device 100 may not be able to receive the message correctly. In an embodiment of the present application, the electronic device 100 can adjust the buffer size. For example, when other services are not running, the electronic device 100 can use the storage space reserved for the service in the memory storage 121 as a buffer, thereby increasing the buffer size so that the buffer can be used to receive messages with larger message sizes.

[0095] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0096] Among them, the sensor module 180 may include a distance sensor 180F, a temperature sensor 180J, an ambient light sensor 180L, etc.

[0097] Understandably, Figure 3 The components shown do not constitute a specific limitation on the electronic device 100. The electronic device may also include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. Figure 3 The combination / connection relationship between the components can also be adjusted and modified.

[0098] The buffer adjustment method provided in the embodiment of the present application is further described below. Figure 4 A flowchart of a buffer adjustment method provided in an embodiment of the present application, the method can be Figure 1 The hub device and the electronic device are implemented as shown. Figure 4 , the method comprises the following steps:

[0099] S401: The electronic device determines an allowable adjustment range of the buffer size according to a service operation status.

[0100] In an embodiment of the present application, the allowable adjustment range of the buffer size may be a preset value to a maximum adjustment value. Among them, the electronic device buffer is set to a preset value by default, and the preset value may be a storage space value that does not affect the memory occupied by other services of the electronic device. In other words, the electronic device may reserve storage space for other services, and the buffer size is part or all of the available storage space size in the memory excluding the reserved storage space. In an embodiment of the present application, the electronic device may use the free memory as a buffer, thereby dynamically adjusting the buffer size.

[0101] In an optional implementation, the electronic device may determine the maximum adjustment value of the buffer according to the service operation status. As described above, the electronic device may reserve storage space in the memory for various services supported by the electronic device, and when the service is not in operation, the reserved storage space corresponding to the service is in an idle state. The electronic device may determine the free storage space in the memory based on a preset period, and determine the adjustment range of the buffer size according to the free storage space.

[0102] S402: The electronic device sends buffer information to the central device.

[0103] In an embodiment of the present application, the electronic device may execute the step of reporting buffer information to the central device based on a preset period.

[0104] In an optional implementation, the buffer information may include relevant information for determining a first value, where the first value is the buffer size of the electronic device before adjustment. For example, the buffer information may include at least one of the buffer size of the electronic device before adjustment, the type of the electronic device, and an indication value for determining the buffer size of the electronic device before adjustment.

[0105] Optionally, the central device can store the correspondence between the type of electronic device and the buffer size of the electronic device before adjustment, so that when the central device receives the type of electronic device, it can calculate the buffer size of the electronic device before adjustment based on the type of electronic device and the stored correspondence between the type of electronic device and the buffer size of the electronic device before adjustment.

[0106] Optionally, the central device can store the correspondence between multiple buffer sizes and multiple indication values ​​of the electronic device, and there is a one-to-one correspondence between the multiple buffer sizes and the multiple indication values. When the central device receives the indication value of the buffer size, the buffer size before the electronic device is adjusted can be determined based on the stored correspondence between the buffer size and the indication value and the received indication value.

[0107] Optionally, the buffer size before adjustment by the electronic device may be a preset value.

[0108] In an optional implementation, the buffer information may include relevant information for determining an adjustment value of a buffer of the electronic device. For example, the buffer information may include an allowable adjustment range of the buffer size. Referring to S401, the allowable adjustment range of the buffer size determined by the electronic device may be a preset value to a maximum adjustment value.

[0109] Optionally, the hub device may receive buffer information sent by multiple electronic devices respectively, and store the buffer information of each electronic device.

[0110] It is understandable that in the embodiment of the present application, the electronic device can periodically execute S401-S402 to periodically report the buffer information of the electronic device, and the central device can promptly know the buffer size of the electronic device and the range in which the buffer size of the electronic device can be adjusted.

[0111] Optionally, the electronic device may also report the buffer information to the central device based on other preset rules in addition to the specified period, such as automatic triggering when a certain matching condition is met.

[0112] Optionally, S401-S402 can be composed of Figure 2 The buffer management module of the electronic device in the smart home system shown is executed.

[0113] S403: The central device determines that there is a message to be sent to the electronic device, and determines that the electronic device needs to adjust the buffer size according to the message size of the message to be sent and the buffer size of the electronic device before adjustment.

[0114] In an optional implementation, before the central device sends a message to the electronic device, it can determine whether the buffer size of the electronic device needs to be adjusted based on the message size of the message to be sent and the buffer size of the electronic device before adjustment in the buffer information reported by the electronic device in S402. When the central device determines that the message size of the message to be sent is larger than the buffer size of the electronic device before adjustment, it means that the current buffer of the electronic device cannot support receiving the message, and the central device can determine that it is necessary to instruct the electronic device to adjust the buffer size; when the central device determines that the message size of the message to be sent is less than or equal to the buffer size of the electronic device before adjustment, it means that the current buffer of the electronic device supports receiving the message, and the central device can directly send the message to the electronic device.

[0115] In some embodiments of the present application, there may be at least one message to be sent to the electronic device in the central device, and the central device can obtain the message size of each message to be sent respectively. When there is at least one message to be sent whose message size is larger than the buffer size of the electronic device at the first moment, the central device can determine that it is necessary to instruct the electronic device to adjust the buffer size. For example, assuming that the buffer size of the electronic device at the first moment is 10k; the message size of message 1 to be sent to the electronic device in the central device is 8k, and the message size of message 2 is 15k, the central device can determine that the message size of message 2 is larger than the buffer size of the electronic device, and then the central device can determine that it is necessary to instruct the electronic device to adjust the buffer size to ensure that the buffer of the electronic device can successfully receive message 2.

[0116] S404: The central device determines the target value and effective duration.

[0117] Optionally, the target value in the embodiment of the present application is the adjusted buffer size of the electronic device determined by the hub device.

[0118] In an optional implementation, when the central device needs to send at least one message to the electronic device, the central device can determine the target message with the largest message size from the at least one message, and determine the target value according to the message size of the target message, the target value is greater than or equal to the message size of the target message, and the target value belongs to the allowable adjustment range of the buffer size of the electronic device. For example, assuming that the buffer adjustment range of the electronic device is 1k-20k, the message size of message 1 that the central device needs to send to the electronic device is 15K, the message size of message 2 is 3K, and the message size of message 3 is 10K, then the central device can determine that the target value needs to be greater than or equal to the message size of message 1, such as the central device can determine the target value to be 16K.

[0119] In some embodiments, when the central device determines that the message size of the target message is greater than the maximum adjustment value, it means that the maximum adjustment value to which the electronic device buffer can currently be adjusted still cannot support receiving the target message. The central device can determine that the target value is the maximum adjustment value, and when sending the target message, the central device can split the target message into multiple messages, and the size of each message after splitting is less than or equal to the maximum adjustment value of the electronic device. The central device can send the multiple messages obtained by splitting to the electronic device in sequence according to the order of the multiple messages, thereby completing the sending of the target message.

[0120] In an optional implementation, the central device may also determine the adjustment range of the buffer size of the electronic device according to the message size of the target message and the allowable adjustment range of the buffer size of the electronic device, and the target value may be any value within the adjustment range.

[0121] The effective duration in the embodiment of the present application can be the duration for the central device to instruct the electronic device to maintain the buffer size as the target value. The central device can determine the duration required for the message transmission task based on the message size of at least one message to be sent to the electronic device and the message transmission rate of the message transmission between the central device and the electronic device, and determine the effective duration based on the duration required for the message transmission task, and the effective duration is greater than or equal to the duration required for the message transmission task.

[0122] S405: The central device sends a control command to the electronic device.

[0123] The control command is used to instruct the electronic device to adjust the buffer size, and the control command may include information for determining the adjustment target value.

[0124] In an optional implementation, the control command may include at least one of a target value, an amplitude value for adjusting the buffer size of the electronic device, and an adjustment range for adjusting the buffer size of the electronic device. The target value may be the buffer size that the electronic device needs to adjust to as determined by the central device in S404; the amplitude value for adjusting the buffer size of the electronic device may be the difference between the target value determined by the central device and the buffer size before the electronic device adjusts; the adjustment range for adjusting the buffer size of the electronic device may be a range for adjusting the buffer size of the electronic device as determined by the central device, and the electronic device may determine the target value from the adjustment range according to the service operation status.

[0125] In an optional implementation, the control command may also be used to indicate the validity period.

[0126] In an embodiment of the present application, when a control command is used to indicate a target value and an effective duration, the control command may include the target value and the effective duration. Alternatively, the control command may include an identifier corresponding to the target value and an identifier corresponding to the effective duration. The electronic device may store multiple buffer sizes and identifiers corresponding to each buffer size, and the electronic device may also store multiple durations and identifiers corresponding to each duration. After receiving the control command, the electronic device may determine the target value based on the stored correspondence between the buffer size and the identifier and the identifier corresponding to the target value, and determine the effective duration based on the stored correspondence between the duration and the identifier and the identifier corresponding to the effective duration.

[0127] Optionally, S403-S405 can be composed of Figure 2 The electronic device buffer management module of the central device in the smart home system shown is executed.

[0128] S406: The electronic device adjusts the buffer size to the target value according to the control command.

[0129] Optionally, after receiving the control command, the electronic device may determine the target value according to the control command. Referring to S405, the control command may include at least one of the target value, the amplitude value of the electronic device adjusting the buffer size, and the adjustment range of the electronic device adjusting the buffer size. When the control command includes the target value, the electronic device can directly obtain the target value from the control command; when the control command includes the amplitude value of the electronic device adjusting the buffer size, the electronic device can determine the target value based on the buffer size before adjustment and the amplitude value of the adjusted buffer size; when the control command includes the adjustment range of the electronic device adjusting the buffer size, the electronic device can determine the target value from the adjustment range of the buffer size according to the business operation status.

[0130] After determining the target value, the electronic device can adjust the buffer size to the target value. For example, assuming that the preset value is 1k and the target value is 20k, the buffer size of the electronic device is the preset value when receiving the control command, and the electronic device can adjust the buffer size to the target value after receiving the control command. Optionally, after receiving the control command, the electronic device first determines that the electronic device is not currently running the upgrade service, and the electronic device can use the storage space reserved for the upgrade service as a buffer, so that the buffer size can be adjusted from 1k to 20k.

[0131] In an embodiment of the present application, when the control command is also used to indicate the effective duration, the electronic device can start the timing after completing the buffer size adjustment, and adjust the buffer size to a second value after reaching the effective duration. Optionally, the second value can be a preset value, which can be a storage space value that does not affect the memory occupied by other services of the electronic device; or the second value can be a memory available space value determined by the electronic device according to the business operation status. Through this design, the electronic device can increase the buffer when the receiving hub device sends a large message, and after completing the message reception, reset the buffer to the preset value or the memory available space value, so as not to affect other services of the electronic device that need to occupy memory.

[0132] S407: The electronic device sends a first confirmation message to the central device.

[0133] Optionally, the first confirmation message is used to indicate that the electronic device has adjusted the buffer size to the target value. For example, the first confirmation message can be an acknowledgement character (ACK) sent by the electronic device to the hub device after receiving a control command sent by the hub device and adjusting the buffer size to the target value.

[0134] Through this design, after receiving the first confirmation message, the central device can determine that the electronic device has adjusted the buffer size, and then execute S408, further ensuring that the electronic device can successfully receive the message.

[0135] It should be noted that in a specific implementation, S407 may be an optional step, that is, after sending a control command to the electronic device, the central device may send a message to the electronic device without waiting for the electronic device to send a first confirmation message.

[0136] S408: The central device sends a message to the electronic device.

[0137] In an optional implementation, when the central device sends a message to the electronic device, it can monitor the electronic device's processing of the message. For example, after the central device sends a message to the electronic device, if the electronic device successfully receives the message, the electronic device can send a confirmation message to the central device, such as the electronic device can send ACK to the central device. The central device can monitor whether the electronic device returns a response message corresponding to the message, and adjust the rate of sending messages according to the size of the sent message and the target value.

[0138] For example, assuming that the target value is 20k, the central device sends a first message to the electronic device, and the size of the first message is 15k. After sending the first message, the central device needs to send a second message to the electronic device, and the size of the second message is 6k. At this time, the central device can determine that the size of the sent message is 15k, and the adjusted buffer size of the electronic device is 20k. Before the electronic device completes receiving the first message, the electronic device does not have enough buffer to receive the second message. The central device waits to receive the confirmation message corresponding to the first message sent by the electronic device before sending the second message to the electronic device. Although this solution will increase the duration of message transmission, it can ensure that the electronic device can correctly receive each message sent by the central device, thereby improving communication accuracy.

[0139] In another optional implementation, when the central device sends multiple messages to an electronic device, it can also adjust the message transmission rate according to the processing capability of the electronic device. For example, the central device can send the first part of the multiple messages to the electronic device at a first transmission rate, and send the second part of the multiple messages to the electronic device at a second transmission rate.

[0140] Optionally, the step of adjusting the message sending rate in S407 may be performed by Figure 2 The rate monitoring module of the central device in the smart home system shown is executed.

[0141] Based on the buffer adjustment method provided in the embodiment of the present application, the central device can transmit a larger message to the electronic device, such as the central device can transmit a certificate to the electronic device. The central device can also perform batch control on multiple electronic devices at the same time. For example, the central device can integrate the control instructions for ten smart lamps into a batch control message. The central device can send control commands to the ten smart lamps respectively according to the size of the batch control message and the buffer information reported by each smart lamp. Each smart lamp can adjust its own buffer size according to the control command. The specific way in which the central device instructs each smart lamp to adjust the buffer size can be found in Figure 4The central device can send batch control messages to ten smart lamps at the same time, so that each smart lamp can execute the control instructions corresponding to the smart lamp after receiving the batch control message, so as to achieve the effect of multiple smart lamps executing instructions at the same time, such as ten smart lamps lighting up at the same time, improving user experience.

[0142] Based on the same inventive concept, the embodiment of the present application also provides a buffer adjustment method. Figure 5 A flowchart of a buffer adjustment method provided in an embodiment of the present application. Figure 5 , the method comprises the following steps:

[0143] S501: The electronic device determines that a target service is running, and adjusts the buffer size from a third value to a target value.

[0144] In this embodiment, the third value may be the value of the available memory space of the electronic device when the target service is not running. Optionally, the third value may be the default size of the buffer of the electronic device, and the third value may be a preset value. For example, the third value may be the maximum free memory or other estimated value when the electronic device is running in a steady state, wherein the steady state operation of the electronic device means that the services performed by the electronic device are all services with a high frequency of occurrence. For example, when the electronic device is a smart TV, the steady state operation of the smart TV may be a service for the smart TV to play videos, while the smart TV system upgrade service is a service with a low frequency of occurrence. When the smart TV executes the upgrade service, the smart TV is not in a steady state operation. The target value may be a storage space value that does not affect the memory occupied by other services of the electronic device. In this embodiment, the third value is greater than the target value.

[0145] Optionally, the target service may be a service that requires a relatively large memory space. For example, the target service may be an upgrade service. The upgrade service of the electronic device requires downloading an installation package, which requires a relatively large memory space.

[0146] In this embodiment, the electronic device can set the buffer size to a larger value, so that the electronic device can receive larger messages sent by the central device or other electronic devices at any time to ensure normal communication of the electronic device. When the electronic device detects that the target service is running, the storage space occupied by the buffer can be reduced to provide more memory space for the target service to ensure the normal operation of the target service.

[0147] S502: The electronic device sends first buffer information to the central device.

[0148] In an embodiment of the present application, the buffer information is used to indicate the adjusted buffer size of the electronic device. For example, if the electronic device adjusts the buffer size to the target value in S501, the first buffer information is used to indicate that the buffer size of the electronic device is adjusted to the target value.

[0149] Optionally, after adjusting the buffer size, the electronic device may report the buffer size to the central device. The central device may store the buffer sizes of multiple electronic devices, so that when the central device sends a message to the electronic device, it may adjust the message sending rate according to the buffer size of the electronic device.

[0150] Optionally, S501-S502 can be composed of Figure 2 The buffer management module of the electronic device in the smart home system shown is executed.

[0151] S503: The central device sends a message to the electronic device.

[0152] In an optional implementation, before the central device sends a message to the electronic device, it can adjust the message sending rate according to the message size and the buffer size reported by the electronic device in S502. In a specific implementation, taking the central device sending a first message to the electronic device as an example, when the central device determines that the message size of the first message is less than or equal to the buffer size of the electronic device, it means that the current buffer of the electronic device supports receiving the first message, and the central device can directly send the first message to the electronic device. When the central device determines that the message size of the first message is greater than the buffer size of the electronic device, it means that the current buffer of the electronic device cannot support receiving the first message, and the central device can split the first message into multiple sub-messages, and the size of each sub-message after the split is less than or equal to the buffer size of the electronic device. The central device can send the multiple sub-messages obtained by splitting to the electronic device in sequence according to the order of the multiple sub-messages, thereby completing the sending of the first message.

[0153] In this embodiment, when the central device sends a message to the electronic device, it can monitor the electronic device's processing of the message. For example, after the central device sends a message to the electronic device, if the electronic device successfully receives the message, the electronic device can send a confirmation message to the central device, such as the electronic device can send a confirmation character ACK to the central device. The central device can monitor whether the electronic device returns a response message corresponding to the message, and adjust the rate of sending messages according to the size of the sent message and the buffer size of the electronic device. For specific implementation, please refer to Figure 4 The repeated parts of S407 in the illustrated embodiment will not be described in detail.

[0154] S504: The electronic device determines that the target service is finished, and adjusts the buffer size from the target value to a third value.

[0155] In an optional implementation, when the electronic device determines that the target service is finished, the buffer size may be readjusted to a third value, so that the electronic device can continue to maintain a larger buffer to receive messages.

[0156] S505: The electronic device sends the second buffer information to the central device.

[0157] In an embodiment of the present application, after the electronic device adjusts the buffer size to the third value, it can send second buffer information to the central device. The second buffer information is used to instruct the electronic device to adjust the buffer size to the third value, so that the electronic device can report the buffer size to the central device again, ensuring that the central device can promptly know the buffer size of the electronic device.

[0158] Optionally, S504-S505 can be composed of Figure 2 The buffer management module of the electronic device in the smart home system shown is executed.

[0159] In some embodiments of the present application, the electronic device in S504 may also adjust the buffer size from the target value to a fourth value after determining that the target service has ended. The fourth value may be a value of available memory space determined by the electronic device based on the service operation status. For example, when the electronic device determines that the target service has ended, if there are still other services running, the electronic device may determine the fourth value based on the service operation status and adjust the buffer to the fourth value so as not to affect the memory occupancy requirements of other services.

[0160] It is understandable that in order to realize the functions of the central device and the electronic device in the above-mentioned embodiments, the central device and the electronic device include hardware structures and / or software results corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0161] Figure 6 A possible structural example diagram of a device provided in an embodiment of the present application, the device can be used to implement the functions of the central device in the above embodiment, and can also be used to implement the functions of the electronic device in the above embodiment, and thus can also achieve the beneficial effects of the above embodiment.

[0162] refer to Figure 6 , the device 600 may include a processor 601, a memory 602, and a communication interface 603. The processor 601, the memory 602, and the communication interface 603 are coupled to each other. Optionally, the memory 602 may be used to store instructions executed by the processor 601 or to store input data required by the processor 601 to run the instructions or to store data generated after the processor 601 runs the instructions. The communication interface 603 may be a transceiver or an input-output interface.

[0163] Optional, see Figure 6 , the processor 601, the memory 602 and the communication interface 603 are connected to each other via a bus 604. The bus 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0164] When the device 600 is applied to a hub device, the processor 601 can be used to implement Figure 4 or Figure 5 The communication interface 603 can be used to implement the processing function of the central device in the embodiment shown. Figure 4 or Figure 5 The transceiver function of the central device in the illustrated embodiment.

[0165] When the device 600 is applied to an electronic device, the processor 601 may be used to implement Figure 4 or Figure 5 The communication interface 603 can be used to implement Figure 4 or Figure 5 The transceiver function of the electronic device in the illustrated embodiment.

[0166] It is understandable that the processor 601 in the embodiment of the present application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.

[0167] This application Figure 6The memory 602 in the memory 602 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0168] Based on the above embodiments, the present application further provides an electronic device, the electronic device comprising multiple functional modules; the multiple functional modules interact with each other to implement the functions performed by the electronic device in each method described in the embodiments of the present application. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0169] Based on the above embodiments, the present application further provides a hub device, which includes multiple functional modules; the multiple functional modules interact with each other to implement the functions performed by the hub device in each method described in the embodiments of the present application. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0170] Based on the above embodiments, the present application further provides a computer program product comprising instructions, and when the computer program product is run on a computer, the computer is enabled to execute the methods described in the embodiments of the present application.

[0171] Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.

[0172] Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the methods described in the embodiments of the present application.

[0173] Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0178] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A buffer adjustment method, characterized in that: Applied to electronic equipment, the method comprises: Sending buffer information to a management device, the buffer information including relevant information for determining a first value, the first value being a buffer size of the electronic device before adjustment; receiving a control command sent by the management device, wherein the control command is used to instruct the electronic device to adjust the buffer size; adjusting the buffer size to a target value according to the control command; After adjusting the buffer size to the target value, receiving at least one message sent by the management device.

2. The method according to claim 1, characterized in that The buffer information includes at least one of the following: The buffer size of the electronic device before adjustment; the type of the electronic device; The indicator value is used to determine the size of the buffer before the electronic device adjusts.

3. The method according to claim 1 or 2, characterized in that The buffer information also includes relevant information for determining an adjustment value of the buffer of the electronic device.

4. The method according to claim 3, characterized in that The buffer information includes an allowable adjustment range of the buffer size of the electronic device; before sending the buffer information to the management device, the method further includes: The allowable adjustment range of the buffer size is determined according to the service operation status.

5. The method according to any one of claims 1 to 4, characterized in that: The control command is also used to indicate the effective duration; after adjusting the buffer size to the target value according to the control command, the method further includes: After the effective time period, the buffer size is adjusted from the target value to a second value.

6. The method according to any one of claims 1 to 5, characterized in that: The target value is greater than the first value.

7. The method according to any one of claims 1 to 6, characterized in that: The control command includes at least one of the following: the target value; The electronic device adjusts the magnitude value of the buffer size; The electronic device adjusts an adjustment range of the buffer size.

8. The method according to any one of claims 1 to 6, characterized in that: Before adjusting the buffer size to the target value according to the control command, the method further includes: The target value is determined according to the service operation status of the electronic device.

9. The method according to any one of claims 1 to 8, characterized in that After adjusting the buffer size to the target value and before receiving at least one message sent by the management device, the method further includes: A first confirmation message is sent to the management device, where the first confirmation message is used to indicate that the electronic device has adjusted the buffer size to the target value.

10. A buffer adjustment method, characterized in that: Applied to managing equipment, the method comprises: Receiving buffer information sent by an electronic device, the buffer information including relevant information for determining a first value, the first value being a buffer size before adjustment by the electronic device; Sending a control command to the electronic device according to the buffer information, wherein the control command is used to instruct the electronic device to adjust the buffer size; At least one message is sent to the electronic device.

11. The method according to claim 10, characterized in that The buffer information includes at least one of the following: The size of the buffer before adjustment by the electronic device; the type of the electronic device; The indicator value is used to determine the size of the buffer before the electronic device adjusts.

12. The method according to claim 10 or 11, characterized in that Before sending the control command to the electronic device according to the buffer information, the method further includes: It is determined that there is the at least one message to be sent to the electronic device, and the at least one message includes a message whose message size is greater than the first value.

13. The method according to any one of claims 10 to 12, characterized in that: The buffer information also includes relevant information for determining an adjustment value of a buffer of the electronic device.

14. The method according to claim 13, characterized in that The buffer information includes an allowable adjustment range of the buffer size of the electronic device; and sending a control command to the electronic device according to the buffer information includes: Determining the adjustment target value according to the message size of the target message and the allowable adjustment range; the target message is the message with the largest message size among the at least one message; The control command is sent to the electronic device, where the control command includes information for determining the adjustment target value.

15. The method according to any one of claims 10 to 14, characterized in that: The adjustment target value is greater than the first value.

16. The method according to any one of claims 10 to 15, characterized in that: The control command includes at least one of the following: The electronic device adjusts the target value of the buffer size; The electronic device adjusts the magnitude value of the buffer size; The electronic device adjusts an adjustment range of the buffer size.

17. The method according to any one of claims 10 to 16, characterized in that: The control instruction is also used to indicate the effective time.

18. The method according to claim 17, characterized in that Before sending a control command to the electronic device according to the buffer information, the method further includes: The duration required for the message transmission task is determined according to the message size and the message transmission rate of the at least one message, and the validity duration is determined according to the duration required for the message transmission task.

19. The method according to any one of claims 10 to 18, characterized in that: The sending at least one message to the electronic device comprises: sending a plurality of messages to the electronic device; The sending a plurality of messages to the electronic device comprises: A first portion of the plurality of messages is sent to the electronic device at a first transmission rate, and a second portion of the plurality of messages is sent to the electronic device at a second transmission rate.

20. The method according to any one of claims 10 to 18, characterized in that The at least one message includes a first message and a second message, wherein the second message is a message next to the first message to be sent to the electronic device; and sending at least one message to the electronic device includes: Sending the first message to the electronic device; After receiving a second confirmation message corresponding to the first message sent by the electronic device, the second message is sent to the electronic device.

21. The method of claim 20, wherein: The sum of the message size of the first message and the message size of the second message is greater than the adjustment target value.

22. The method according to any one of claims 10 to 21, characterized in that: After sending a control command to the electronic device according to the buffer information and before sending at least one message to the electronic device, the method further includes: A first confirmation message sent by the electronic device is received, where the first confirmation message is used to indicate that the electronic device has adjusted the buffer size to a target value.

23. A buffer adjustment method, characterized in that: Applied to electronic equipment, the method comprises: Determine that the target service is running, and adjust the buffer size of the electronic device from a third value to a target value; the third value is a value of available memory space of the electronic device when the target service is not running, and the third value is greater than the target value; Sending first buffer information to a management device, where the first buffer information is used to indicate that the buffer size of the electronic device is adjusted to the target value; Receive at least one message sent by the management device.

24. The method of claim 23, wherein: After determining that the target service is running and before adjusting the buffer size of the electronic device from the third value to the target value, the method further includes: The target value is determined according to the storage space value required to be occupied by the target business.

25. The method according to claim 23 or 24, characterized in that The method further comprises: After the target service is completed, adjusting the buffer size of the electronic device from the target value to the third value; Sending second buffer information to the management device, where the second buffer information is used to indicate that the buffer size of the electronic device is adjusted to the third value.

26. An electronic device, characterized in that: The method comprises at least one processor coupled to at least one memory, wherein the at least one processor is used to read a computer program stored in the at least one memory to execute a method as claimed in any one of claims 1 to 9, or to execute a method as claimed in any one of claims 23 to 25.

27. A management device, characterized in that: The system comprises at least one processor, wherein the at least one processor is coupled to at least one memory, and the at least one processor is configured to read a computer program stored in the at least one memory to execute the method according to any one of claims 10 to 22.

28. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method described in any one of claims 1 to 9, or the method described in any one of claims 10 to 22, or the method described in any one of claims 23 to 25.