Transmission bandwidth adjustment method and device, electronic equipment and storage medium

By adjusting the number of transmission channels according to the buffer occupancy, the problem that transmission bandwidth cannot be dynamically adjusted in the prior art is solved, which improves bandwidth utilization and reduces equipment power consumption.

CN119814571AActive Publication Date: 2025-04-11BEIJING X RING TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411846186.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The prior art cannot dynamically adjust the transmission bandwidth, resulting in low bandwidth utilization and high equipment power consumption.

Method used

By determining the current buffer occupancy, adjust the number of transmission channels in the active state to achieve dynamic adjustment of transmission bandwidth.

Benefits of technology

It improves the effective utilization rate of transmission bandwidth, reduces equipment power consumption, and achieves accurate and timely dynamic adjustment of transmission bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814571A_ABST
    Figure CN119814571A_ABST
Patent Text Reader

Abstract

The invention provides a transmission bandwidth adjustment method and device, electronic equipment and a storage medium, and relates to the technical field of interfaces. The method comprises the following steps: firstly, determining the current buffer area occupancy, and then adjusting the number of first transmission channels in an activated state at present according to the current buffer area occupancy. Therefore, more accurate and timely dynamic adjustment of the transmission bandwidth is realized, the effective utilization rate of the transmission bandwidth is improved, and conditions are provided for reducing power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of interface technology, and in particular to a method, device, electronic device and storage medium for adjusting transmission bandwidth. Background Art

[0002] In the prior art, the transmission bandwidth is usually set according to the static needs of users or applications. However, this method cannot dynamically set the transmission bandwidth, which may affect the effective utilization of the transmission bandwidth and increase the power consumption of the device. How to provide a transmission bandwidth adjustment method to improve the effective utilization of the transmission bandwidth and reduce the power consumption of the device is a problem that needs to be solved urgently. Summary of the invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0004] The first aspect of the present disclosure provides a method for adjusting transmission bandwidth, including:

[0005] Determine the current buffer occupancy;

[0006] According to the current buffer occupancy, the number of first transmission channels currently in an activated state is adjusted.

[0007] The second aspect of the present disclosure provides a transmission bandwidth adjustment device, including:

[0008] A first determination module, used to determine the current buffer occupancy;

[0009] The adjustment module is used to adjust the number of first transmission channels currently in an activated state according to the current buffer occupancy.

[0010] The third aspect embodiment of the present disclosure proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the transmission bandwidth adjustment method proposed in the first aspect embodiment of the present disclosure is implemented.

[0011] The fourth aspect embodiment of the present disclosure proposes a computer-readable storage medium storing computer execution instructions. When the computer execution instructions are executed by a processor, the transmission bandwidth adjustment method proposed in the first aspect embodiment of the present disclosure is implemented.

[0012] The fifth aspect embodiment of the present disclosure proposes a chip, which includes a processing circuit and an interface circuit; wherein the interface circuit is used to obtain instructions and send the instructions to the processing circuit, and the processing circuit is used to execute the instructions to implement the transmission bandwidth adjustment method proposed in the first aspect embodiment of the present disclosure.

[0013] The sixth aspect embodiment of the present disclosure proposes a computer program product, including a computer program, which, when executed by a processor, implements the transmission bandwidth adjustment method proposed in the first aspect embodiment of the present disclosure.

[0014] The transmission bandwidth adjustment method, device, electronic device and storage medium provided by the present disclosure have the following beneficial effects:

[0015] In the disclosed embodiment, the current buffer occupancy is first determined, and then the number of first transmission channels currently in an activated state is adjusted according to the current buffer occupancy. Thus, by adjusting the number of transmission channels currently in an activated state based on the current buffer occupancy, a more accurate and timely dynamic adjustment of the transmission bandwidth is achieved, the effective utilization rate of the transmission bandwidth is improved, and conditions are provided for reducing power consumption.

[0016] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0018] Figure 1 A schematic diagram of a flow chart of a method for adjusting a transmission bandwidth provided by an embodiment of the present disclosure;

[0019] Figure 2 A schematic diagram of an application scenario of the transmission bandwidth adjustment method proposed in the present disclosure;

[0020] Figure 3 A schematic flow chart of a method for adjusting transmission bandwidth provided by another embodiment of the present disclosure;

[0021] Figure 4 A schematic flow chart of a method for adjusting transmission bandwidth provided by another embodiment of the present disclosure;

[0022] Figure 5 A schematic flow chart of a method for adjusting transmission bandwidth provided by another embodiment of the present disclosure;

[0023] Figure 6 A system logic diagram of a transmission bandwidth adjustment method proposed in an embodiment of the present disclosure;

[0024] Figure 7 A schematic diagram of the structure of a transmission bandwidth adjustment device provided by another embodiment of the present disclosure;

[0025] Figure 8A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown;

[0026] Fig. 9 It is a schematic diagram of the structure of the chip proposed in the embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0028] The following describes a transmission bandwidth adjustment method, device, electronic device, and storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0029] Figure 1 A schematic diagram of a flow chart of a transmission bandwidth adjustment method provided in an embodiment of the present disclosure.

[0030] It should be noted that the transmission bandwidth adjustment method of the embodiment of the present disclosure can be applied to a transmission bandwidth adjustment device. In some possible embodiments, the device can be configured in an electronic device or a chip so that the electronic device or the chip can execute the transmission bandwidth adjustment method proposed in the embodiment of the present disclosure.

[0031] like Figure 1 As shown, the transmission bandwidth adjustment method may include the following steps:

[0032] Step 101, determine the current buffer occupancy.

[0033] It should be noted that the transmission bandwidth adjustment method provided by the present disclosure can be applied to a scenario where a system with a processor and a memory is connected to a network device through a PCIe interface to perform data transmission. Figure 2 For example, Figure 2 A schematic diagram of an application scenario of the transmission bandwidth adjustment method proposed in the present disclosure.

[0034] Figure 2 In the CPU, it is the abbreviation of Central Processing Unit (CPU);

[0035] AP is the abbreviation of Application Processor (AP);

[0036] PCIe is a high-speed serial computer expansion bus standard.

[0037] RC is the abbreviation of Root Complex (RC); EP is the Endpoint, which is a PCIe device;

[0038] DDR is the abbreviation of Double Data Rate SDRAM (DDR);

[0039] SDRAM is the abbreviation of Synchronous Dynamic Random-Access Memory (SDRAM);

[0040] WIFI is the abbreviation of Wireless Fidelity (WIFI); Modem is the abbreviation of modem.

[0041] like Figure 2 As shown, the application scenario of the transmission bandwidth adjustment method provided by the present disclosure may be a scenario in which a computer system (host) transmits data to a wired network card or a wireless network card through a transmission channel of PCIe bandwidth, or may be a scenario in which a mobile phone system (application processor AP) transmits data to a wireless cellular data processor through a transmission channel of PCIe bandwidth, and the present disclosure does not limit this.

[0042] It should be noted that the buffer can be set in the DDR of the host or application processor side, which can be a data buffer used for PCIe transmission, and the present disclosure does not limit this.

[0043] In the present disclosure, before adjusting the transmission bandwidth, in order to improve the effective utilization rate of the adjusted transmission bandwidth and realize dynamic adjustment of the transmission bandwidth, the current buffer occupancy can be determined first, thereby providing conditions for determining the adjustment strategy of the transmission bandwidth.

[0044] Step 102: adjusting the number of first transmission channels currently in an activated state according to the current buffer occupancy.

[0045] The transmission channel may be a transmission channel (Lane) of PCIe bandwidth.

[0046] It should be noted that when the number of first transmission channels currently in an activated state is adjusted according to the current buffer occupancy, the adjustment method can be to keep the number of first transmission channels currently in an activated state unchanged, or to increase the number of first transmission channels in an activated state, or to reduce the number of first transmission channels in an activated state, and the present disclosure does not limit this.

[0047] In the present disclosure, after determining the current buffer occupancy, the number of first transmission channels currently in an activated state can be adjusted according to the current buffer occupancy, thereby achieving dynamic adjustment of the transmission bandwidth and improving the accuracy of the transmission bandwidth adjustment.

[0048] In the disclosed embodiment, the current buffer occupancy is first determined, and then the number of first transmission channels currently in an activated state is adjusted according to the current buffer occupancy. Thus, by adjusting the number of transmission channels currently in an activated state based on the current buffer occupancy, accurate and timely dynamic adjustment of the transmission bandwidth is achieved, the effective utilization rate of the transmission bandwidth is improved, and conditions are provided for reducing power consumption.

[0049] Figure 3 A schematic diagram of a flow chart of a transmission bandwidth adjustment method provided in an embodiment of the present disclosure.

[0050] like Figure 3 As shown, the transmission bandwidth adjustment method may include the following steps:

[0051] Step 301, determine the current buffer occupancy.

[0052] The specific implementation form of step 301 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0053] Step 302: Determine a bandwidth adjustment strategy according to a relationship between a current buffer occupancy and a first interval, wherein the first interval is a buffer range corresponding to the first number of transmission channels.

[0054] The first interval is the buffer occupancy range corresponding to the first transmission channel number. For example, when the total buffer capacity is 100MB, and the buffer occupancy range corresponding to the first transmission channel number is 25MB to 50MB, the first interval can be the buffer occupancy range of 25MB to 50MB, and the present disclosure does not limit this.

[0055] The bandwidth adjustment strategy may be a strategy for adjusting the number of transmission channels currently in an activated state, for example, keeping the number unchanged, increasing the number, or decreasing the number, which is not limited in the present disclosure.

[0056] It should be noted that the relationship between the current buffer occupancy and the first interval can be that the buffer occupancy belongs to the first interval, or it can also be that the buffer occupancy is greater than or equal to the maximum value in the first interval, or it can also be that the buffer occupancy is less than or equal to the minimum value in the first interval. The present disclosure does not limit this.

[0057] In the present disclosure, the corresponding relationship between the buffer occupancy and the number of transmission channels that need to be activated can be determined through simulation. For example, the PCIe bandwidth includes 16 transmission channels. When the total capacity of the buffer is 100 megabytes (MB) and the occupancy is 50MB, after simulation, it can be determined that when the occupancy of the buffer is 50MB, 8 transmission channels need to be activated in the PCIe bandwidth, and so on. The present disclosure does not limit this.

[0058] Optionally, when setting the interval of the buffer zone, the present disclosure may determine each interval corresponding to the system and the endpoint value corresponding to each interval based on a preset interval setting method.

[0059] Among them, the interval setting method can be determined according to actual needs, and it can be a uniform setting method or a non-uniform setting method. For example, when the total capacity of the buffer is 100MB, a waterline can be set at 25MB, 50MB, 75MB and 100MB respectively, and then a corresponding interval is set for the buffer occupancy range less than or equal to 25MB, 25MB to 50MB, 50MB to 75MB and 75MB to 100MB respectively, and the interval length of each interval is the same, or it can also be unevenly divided according to the buffer occupancy, so that the interval length of the interval corresponding to each range may be different, and the present disclosure does not limit this.

[0060] Optionally, when setting the buffer interval, the present invention can first determine the number of intervals corresponding to the system (which may be the same as the number of transmission channels) based on the total number of transmission channels included in the system. Since the correspondence between the buffer occupancy and the number of transmission channels of the PCIe bandwidth can be determined first through simulation, at this time, the endpoint values ​​corresponding to each interval, namely the maximum buffer occupancy and the minimum buffer occupancy, can be determined based on the number of intervals corresponding to the system and the corresponding relationship, thereby improving the precision of the interval setting.

[0061] It should be noted that when setting the interval of the buffer zone, the present disclosure can also set the pickup according to the total capacity of the buffer zone. For example, the larger the total capacity of the buffer zone, the more intervals may need to be set, thereby ensuring the precision of the intervals and improving the accuracy of the transmission bandwidth adjustment. The present disclosure does not limit this.

[0062] Optionally, when determining the total capacity of the buffer zone, the present disclosure may determine the total capacity of the buffer zone according to at least one of the total transmission bandwidth corresponding to the system and the type of application currently in operation.

[0063] The application type may be any type, such as a video type, or a social type, etc., which is not limited in the present disclosure.

[0064] It should be noted that different types of applications currently in operation may require different transmission bandwidths. For example, video applications require a larger transmission bandwidth, while social applications require a smaller transmission bandwidth, etc. This disclosure does not limit this.

[0065] In the present disclosure, after determining the current buffer occupancy, in order to allow the transmission bandwidth to be dynamically adjusted according to the current data transmission flow demand, a bandwidth adjustment strategy may be determined according to the relationship between the current buffer occupancy and the first interval.

[0066] Step 303: Adjust the number of first transmission channels based on the bandwidth adjustment strategy.

[0067] In the present disclosure, after determining the bandwidth adjustment strategy, the number of first transmission channels can be adjusted based on the bandwidth adjustment strategy, thereby realizing automatic dynamic adjustment of the transmission bandwidth, improving the effective utilization of the transmission bandwidth, and reducing the computing power requirements of the processor.

[0068] In the disclosed embodiment, the current buffer occupancy is first determined, then the bandwidth adjustment strategy is determined based on the relationship between the current buffer occupancy and the first interval, and finally the number of first transmission channels is adjusted based on the bandwidth adjustment strategy. Thus, the number of transmission channels in the active state is adjusted based on the relationship between the current buffer occupancy and the buffer range corresponding to the number of transmission channels in the active state, thereby achieving more accurate and timely adjustment of the transmission bandwidth and improving the reliability of the transmission bandwidth adjustment.

[0069] Figure 4 A schematic flow chart of a method for adjusting transmission bandwidth provided by another embodiment of the present disclosure.

[0070] like Figure 4 As shown, the transmission bandwidth adjustment method may include the following steps:

[0071] Step 401, determine the current buffer occupancy.

[0072] Step 402: Determine a bandwidth adjustment strategy according to a relationship between a current buffer occupancy and a first interval, wherein the first interval is a buffer range corresponding to the first number of transmission channels.

[0073] Optionally, when the buffer occupancy belongs to the first interval, it can be determined that the number of transmission channels currently in the activated state can meet the data transmission flow demand. At this time, the bandwidth adjustment strategy can be determined to keep the number of transmission channels currently in the activated state unchanged.

[0074] Optionally, when the buffer occupancy is greater than or equal to the maximum value in the first interval, it can be determined that the current buffer occupancy has exceeded the buffer occupancy range corresponding to the first interval. In order to ensure the stability and reliability of data transmission, at this time, the bandwidth adjustment strategy can be determined to increase the transmission channel in the activated state.

[0075] Optionally, when the buffer occupancy is less than or equal to the minimum value in the first interval, it can be determined that the current buffer occupancy is reduced. In order to improve the effective utilization of the transmission bandwidth and avoid waste of resources, at this time, the bandwidth adjustment strategy can be determined to reduce the transmission channels in the activated state.

[0076] The specific implementation forms of step 401 to step 402 may refer to the detailed description of other embodiments of the present disclosure, and will not be repeated here.

[0077] Step 403: When the bandwidth adjustment strategy is to increase or decrease the number of transmission channels in an activated state, determine the second interval to which the buffer occupancy belongs.

[0078] In the present disclosure, after determining the bandwidth adjustment strategy, when the bandwidth adjustment strategy is to increase or decrease the transmission channels in the activated state, in order to improve the determination of the number of transmission channels to be increased or decreased, the second interval to which the current buffer occupancy belongs can be first determined.

[0079] Step 404: determine the difference between the second transmission channel quantity associated with the second interval and the first transmission channel quantity as the current transmission channel quantity to be increased or decreased.

[0080] In the present disclosure, when the bandwidth adjustment strategy is to increase the number of transmission channels in the activated state, the number of second transmission channels associated with the second interval is greater than the number of first transmission channels. At this time, the difference obtained by subtracting the second transmission channel from the first transmission channel can be determined as the number of transmission channels to be added.

[0081] For example, taking the current occupancy of the buffer as 45MB, the maximum value in the first interval is 25MB, the number of first transmission channels is 4, the second interval is 25MB to 50MB, the number of associated second transmission channels is 8, the number of currently activated transmission channels is 4, and the transmission bandwidth has a total of 16 transmission channels. Since the current occupancy of the buffer is 50MB, which is greater than 25MB and less than 50MB, it belongs to the second interval, and the number of second transmission channels associated with the second interval is 8, in order to ensure the stability of data transmission, at this time, it can be determined that the current number of transmission channels to be added is 4, and the present disclosure does not limit this.

[0082] In the present disclosure, when the bandwidth adjustment strategy is to reduce the number of transmission channels in the activated state, the number of second transmission channels associated with the second interval is less than the number of first transmission channels. At this time, the difference obtained by subtracting the first transmission channel from the second transmission channel can be determined as the number of transmission channels to be reduced.

[0083] For example, taking the current occupancy of the buffer as 20MB, the minimum value in the first interval as 25MB, the number of first transmission channels as 8, the second interval as 0MB to 25MB, the number of associated second transmission channels as 4, the number of currently activated transmission channels as 8, and the total number of transmission bandwidth as 16 transmission channels, since the current occupancy of the buffer as 20MB is less than 25MB, it belongs to the second interval, and the number of second transmission channels associated with the second interval is 4, in order to reduce the waste of transmission bandwidth, at this time, it can be determined that the number of transmission channels to be reduced is 4, and the present disclosure does not limit this.

[0084] Step 405: Adjust the number of first transmission channels based on the number of transmission channels to be increased or decreased.

[0085] In the present disclosure, after determining the current number of transmission channels to be increased or decreased, the first number of transmission channels can be adjusted based on the number of transmission channels to be increased or decreased, thereby achieving more accurate dynamic real-time adjustment of the number of activated transmission channels and more effectively reducing the power consumption of PCIe devices.

[0086] In the disclosed embodiment, the current buffer occupancy is first determined, and then the bandwidth adjustment strategy is determined based on the relationship between the current buffer occupancy and the first interval. When the bandwidth adjustment strategy is to increase or decrease the transmission channels in the activated state, the second interval to which the buffer occupancy belongs is determined, and then the difference between the number of second transmission channels associated with the second interval and the number of first transmission channels is determined as the number of transmission channels to be increased or decreased at present, and finally the number of first transmission channels is adjusted based on the number of transmission channels to be increased or decreased at present. Thus, by determining the bandwidth adjustment strategy based on the relationship between the current buffer occupancy and the buffer range corresponding to the number of transmission channels in the currently activated state, when the bandwidth adjustment strategy is to increase or decrease the transmission channels in the activated state, the number of transmission channels to be increased or decreased is determined based on the difference between the number of transmission channels associated with the interval to which the buffer capacity currently belongs and the number of transmission channels associated with the interval corresponding to the number of transmission channels in the currently activated state, so as to adjust the number of transmission channels in the activated state, thereby realizing dynamic adjustment of the transmission bandwidth and improving the accuracy of the transmission bandwidth adjustment.

[0087] Figure 5 A schematic flow chart of a method for adjusting transmission bandwidth provided by another embodiment of the present disclosure.

[0088] like Figure 5 As shown, the transmission bandwidth adjustment method may include the following steps:

[0089] Step 501: upon receiving a buffer update request, determining the type of the update request and the first buffer capacity included in the update request, wherein the type of the update request is any one of the following: an occupation request and a release request.

[0090] It should be noted that when the type of the update request is an occupation request, the first buffer capacity may be the buffer capacity that needs to be occupied, and when the type of the update request is a release request, the first buffer capacity may be the buffer capacity that needs to be released.

[0091] The occupation request may be a request for occupying the buffer capacity, and the release request may be a request for releasing the occupied buffer capacity.

[0092] In some embodiments, when a buffer update request is received, the buffer may be updated via a memory block descriptor.

[0093] Among them, the memory block descriptor can be used to map the memory blocks in the buffer, which may include parameters such as memory block address, page table, size, etc., so that the memory blocks in the buffer can be managed by means of the address and page table in the memory block descriptor, and the present disclosure does not limit this.

[0094] In the present disclosure, when the type of update request is an occupation request, the update request can be received through the memory application interface, and the first buffer capacity included in the update request can be obtained, and the memory block requested to be occupied in the buffer can be determined through the memory block descriptor. The present disclosure does not limit this.

[0095] In the present disclosure, when the type of update request is a release type, the update request can be received through the memory release interface, and the first buffer capacity in the update request can be obtained. The memory block to be released in the buffer can be determined through the memory block descriptor. The present disclosure does not limit this.

[0096] For example, taking user 1, user 2 and user 3 applying for buffer capacity or releasing buffer capacity as an example, when the update request is an occupation request, the update request may include the first buffer capacity of 5MB applied for by user 1, and the corresponding memory block descriptor, which includes information such as the address of the memory block applied for occupation, the first buffer capacity of 15MB applied for by user 2 and the corresponding memory block descriptor, and the first buffer capacity of 20MB applied for by user 3 and the corresponding memory block descriptor. When the update request is a release request, the update request may include the first buffer capacity of 5MB applied for release by user 1, and the corresponding memory block descriptor, which includes information such as the address of the memory block applied for release, the first buffer capacity of 10MB applied for release by user 2 and the corresponding memory block descriptor, and the first buffer capacity of 10MB applied for release by user 3 and the corresponding memory block descriptor.

[0097] Step 502: Determine the currently occupied capacity of the second buffer zone.

[0098] In the present disclosure, after determining the type of update request and the first buffer capacity included in the update request, the second buffer capacity currently occupied in the buffer can be determined, thereby providing a data basis for buffer update.

[0099] Step 503: Determine the current buffer occupancy according to the type of update request, the first buffer capacity and the second buffer capacity.

[0100] In the present disclosure, after determining the currently occupied second buffer capacity, the current buffer occupancy can be determined according to the type of update request and the first buffer capacity, so that the transmission bandwidth can be adjusted according to the current buffer occupancy.

[0101] Optionally, when the type of the update request is an occupation request, the sum of the first buffer capacity and the second buffer capacity may be determined as the current buffer occupancy.

[0102] Taking the above example, taking the second buffer capacity currently occupied by the buffer as 0MB as an example, when the type of update request is an occupation request, user 1 applies to occupy a first buffer capacity of 5MB, user 2 applies to occupy a first buffer capacity of 15MB, and user 3 applies to occupy a first buffer capacity of 20MB. After the memory application management module allocates the corresponding memory blocks to the corresponding users based on the memory block addresses and other information applied for occupation in the memory block descriptors corresponding to users 1, 2, and 3 respectively, since the second buffer capacity currently occupied by the buffer is 0MB, at this time, the current buffer occupancy is the sum of the first buffer capacities corresponding to users 1, 2, and 3, that is, 40MB, and the present disclosure does not limit this.

[0103] Optionally, when the type of the update request is a release request, the difference between the second buffer capacity and the first buffer capacity may be determined as the current buffer occupancy.

[0104] Taking the above example, taking the second buffer capacity currently occupied by the buffer as 40MB, when the type of update request is a release request, the first buffer capacity applied for release by user 1 is 5MB, the first buffer capacity applied for release by user 2 is 10MB, and the first buffer capacity applied for release by user 3 is 10MB. After the memory return management module releases the corresponding memory blocks to the buffer based on the addresses and other information of the memory blocks applied for release in the memory block descriptors corresponding to users 1, 2 and 3 respectively, the current buffer occupancy is the second buffer capacity corresponding to the buffer, 40MB, which is the difference between the sum of the first buffer capacities corresponding to users 1, 2 and 3, that is, 15MB. The present disclosure does not limit this.

[0105] Step 504: Adjust the number of first transmission channels currently in an activated state according to the current buffer occupancy.

[0106] The specific implementation form of step 504 can refer to the detailed description of other embodiments of the present disclosure, and will not be repeated here.

[0107] In the disclosed embodiment, first, when a buffer update request is received, the type of the update request and the first buffer capacity included in the update request are determined, and the second buffer capacity currently occupied is determined. Then, according to the type of the update request, the first buffer capacity, and the second buffer capacity, the current buffer occupancy is determined. Finally, according to the current buffer occupancy, the number of first transmission channels currently in an activated state is adjusted. Thus, after receiving the buffer update request, the current buffer occupancy is determined based on the type of the update request, the buffer capacity included in the update request, and the currently occupied buffer capacity, and according to the current occupancy, the number of transmission channels currently in an activated state is adjusted, thereby improving the reliability and accuracy of the transmission bandwidth adjustment.

[0108] Combine the following Figure 6 , the transmission bandwidth adjustment method proposed in the present disclosure is illustrated by way of example. Figure 6 This is a system logic diagram of the transmission bandwidth adjustment method proposed in an embodiment of the present disclosure.

[0109] like Figure 6 As shown, the system logic of the transmission bandwidth adjustment method proposed in the present disclosure includes five modules, namely: memory application FIFO management module, memory return FIFO management module, buffer and management module, buffer interval calculation management module and PCIe bandwidth configuration module. Among them, FIFO is the abbreviation of First Input First Output (FIFO).

[0110] Among them, the memory application FIFO management module may include an interface for user memory application, a FIFO queue composed of memory block descriptors (including parameters such as the address, page table, and size of the memory block), which may supplement the memory block descriptors and obtain the corresponding memory blocks from the buffer by monitoring the usage of the user's application memory descriptor FIFO (such as by comparing and calculating the read and write pointers, etc.);

[0111] A memory return FIFO management module, which may include an interface for users to release and return memory, and a return memory descriptor FIFO queue, which may return the corresponding memory block to the buffer by monitoring the user's return memory block descriptor;

[0112] The buffer and management module can obtain memory blocks of different sizes from the buffer. It can manage memory blocks through page tables and indexes, and provide an interface for applying for and returning memory.

[0113] The buffer interval calculation management module can dynamically analyze and calculate the usage of the PCIe buffer, set the corresponding interval according to the relationship between the number of transmission channels and the range of buffer occupancy, update the interval to which the current buffer occupancy belongs, and trigger an interrupt or notify the PCIe bandwidth configuration module according to the set different intervals;

[0114] The PCIe bandwidth configuration module can receive the notification sent by the buffer interval calculation management module, trigger the bandwidth adjustment process of the PCIe controller, and make PCIe work in the bandwidth corresponding to the specified interval (the number of activated transmission channels).

[0115] In the present disclosure, by establishing a buffer and management module, users can apply for memory blocks from the buffer through a unified memory application FIFO management module, and release the used memory blocks to the buffer by returning the FIFO management module after use, thereby achieving the purpose of dynamic memory management and circulation. In addition, different intervals are set through the buffer interval calculation management module, and the interval endpoint interrupt or notification function is triggered to the PCIe bandwidth configuration module, bandwidth configuration is executed and acts on PCIe hardware, thereby realizing dynamic adjustment of transmission bandwidth and saving PCIe hardware power consumption.

[0116] It should be noted that the PCIe bandwidth configuration can be performed by software through interval endpoints to trigger an interrupt service program, or the relevant processing flow can be implemented through chip hardware, which is not limited in the present disclosure.

[0117] It should be noted that the unified application memory interface and return memory interface in the transmission bandwidth adjustment method provided by the present disclosure can support the dynamic increase or decrease of applications and users without modifying the code or hardware, thereby improving the efficiency of transmission bandwidth adjustment.

[0118] In order to implement the above embodiment, the present disclosure also proposes a transmission bandwidth adjustment device.

[0119] Figure 7 A schematic diagram of the structure of a transmission bandwidth adjustment device provided by another embodiment of the present disclosure.

[0120] like Figure 7 As shown, the transmission bandwidth adjustment device 700 may include: a first determination module 701 and an adjustment module 702 .

[0121] A first determination module 701 is used to determine the current buffer occupancy;

[0122] The adjustment module 702 is configured to adjust the number of first transmission channels currently in an activated state according to the current buffer occupancy.

[0123] Optionally, the adjustment module 702 is specifically configured to:

[0124] Determine a bandwidth adjustment strategy according to a relationship between the current buffer occupancy and a first interval, wherein the first interval is a buffer range corresponding to the first number of transmission channels;

[0125] Based on the bandwidth adjustment strategy, the number of the first transmission channels is adjusted.

[0126] Optionally, the adjustment module 702 is further used for any of the following:

[0127] When the buffer occupancy falls within the first interval, determining the bandwidth adjustment strategy to keep the number of currently activated transmission channels unchanged;

[0128] When the buffer occupancy is greater than or equal to the maximum value in the first interval, determining the bandwidth adjustment strategy to add an activated transmission channel;

[0129] When the buffer occupancy is less than or equal to the minimum value in the first interval, the bandwidth adjustment strategy is determined to reduce the transmission channels in the activated state.

[0130] Optionally, the adjustment module 702 is further configured to:

[0131] In a case where the bandwidth adjustment strategy is to increase or decrease the transmission channels in an activated state, determining a second interval to which the buffer occupancy belongs;

[0132] Determine the difference between the number of second transmission channels associated with the second interval and the number of the first transmission channels as the number of transmission channels to be increased or decreased;

[0133] Based on the current number of transmission channels to be increased or decreased, the first number of transmission channels is adjusted.

[0134] Optionally, the first determining module 701 is specifically configured to:

[0135] In case of receiving a buffer update request, determining a type of the update request and a first buffer capacity included in the update request, wherein the type of the update request is any one of the following: an occupation request, a release request;

[0136] Determine the currently occupied capacity of the second buffer;

[0137] A current buffer occupancy is determined according to the type of the update request, the first buffer capacity, and the second buffer capacity.

[0138] Optionally, the first determining module 701 is further used for any of the following:

[0139] In a case where the type of the update request is an occupation request, determining the sum of the first buffer capacity and the second buffer capacity as the current buffer occupancy;

[0140] In a case where the type of the update request is a release request, a difference between the second buffer capacity and the first buffer capacity is determined as the current buffer occupancy.

[0141] Optionally, it also includes:

[0142] The second determination module (not shown in the figure) is used to determine the total capacity of the buffer according to at least one of the total transmission bandwidth corresponding to the system and the type of application currently in operation.

[0143] Optionally, it also includes:

[0144] The third determination module (not shown in the figure) is used to determine each interval corresponding to the system and the endpoint value corresponding to each interval based on a preset interval setting method.

[0145] Optionally, it also includes:

[0146] A fourth determination module (not shown in the figure) is used to determine the number of intervals corresponding to the system according to the total number of transmission channels included in the system;

[0147] The fifth determination module (not shown in the figure) is used to determine the endpoint value corresponding to each interval according to the number of intervals corresponding to the system.

[0148] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0149] The transmission bandwidth adjustment device of the embodiment of the present disclosure first determines the current buffer occupancy, and then adjusts the number of first transmission channels currently in an activated state according to the current buffer occupancy. Thus, by adjusting the number of transmission channels currently in an activated state based on the current buffer occupancy, accurate and timely dynamic adjustment of the transmission bandwidth is achieved, the effective utilization rate of the transmission bandwidth is improved, and conditions are provided for reducing power consumption.

[0150] Figure 8 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0151] like Figure 8As shown, the electronic device 800 is in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: one or more processors or processing units 816, a system memory 828, and a bus 818 connecting different system components (including the system memory 828 and the processing unit 816).

[0152] Bus 818 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnection (PCI) bus.

[0153] The electronic device 800 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 800, including volatile and non-volatile media, removable and non-removable media.

[0154] The memory 828 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 830 and / or cache memory 832. The electronic device 800 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 834 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8Not shown, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 818 via one or more data medium interfaces. The memory 828 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0155] A program / utility 840 having a set (at least one) of program modules 842 may be stored, for example, in the memory 828, such program modules 842 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 842 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0156] The electronic device 800 may also communicate with one or more external devices 814 (e.g., keyboard, pointing device, display 824, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 822. In addition, the electronic device 800 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 820. As shown, the network adapter 820 communicates with other modules of the electronic device 800 through a bus 818. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0157] The processing unit 816 executes various functional applications and data processing by running programs stored in the system memory 828, such as implementing the methods mentioned in the above embodiments.

[0158] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium storing computer execution instructions. When the computer execution instructions are executed by a processor, the transmission bandwidth adjustment method proposed in the above embodiments of the present disclosure is implemented.

[0159] In order to implement the above embodiments, the present disclosure further proposes a computer program product, including a computer program. When the computer program is executed by a processor, it implements the transmission bandwidth adjustment method proposed in the above embodiments of the present disclosure.

[0160] Fig. 9 is a schematic diagram of the structure of the chip proposed in the embodiment of the present disclosure. Fig. 9 The structure of the chip 900 is shown, but is not limited to this.

[0161] The chip 900 includes a processing circuit 901 , and the processing circuit 901 is configured to execute any of the above methods.

[0162] In some embodiments, the chip 900 further includes one or more interface circuits 902. Optionally, the interface circuit 902 is connected to the memory 903, and the interface circuit 902 can be used to receive signals from the memory 903 or other devices, and the interface circuit 902 can be used to send signals to the memory 903 or other devices. For example, the interface circuit 902 can read instructions stored in the memory 903 and send the instructions to the processing circuit 901.

[0163] In some embodiments, the interface circuit 902 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 901 performs other steps.

[0164] In some embodiments, terms such as interface circuit, interface, transceiver pin, and transceiver may be used interchangeably.

[0165] In some embodiments, the chip 900 further includes one or more memories 903 for storing instructions. Optionally, all or part of the memory 903 may be outside the chip 900.

[0166] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0167] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0168] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0169] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0170] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0171] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0172] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0173] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A method for adjusting transmission bandwidth, characterized in that: include: Determine the current buffer occupancy; According to the current buffer occupancy, the number of first transmission channels currently in an activated state is adjusted.

2. The method according to claim 1, characterized in that The step of adjusting the number of first transmission channels currently in an activated state according to the current buffer occupancy includes: Determine a bandwidth adjustment strategy according to a relationship between the current buffer occupancy and a first interval, wherein the first interval is a buffer range corresponding to the first number of transmission channels; Based on the bandwidth adjustment strategy, the number of the first transmission channels is adjusted.

3. The method according to claim 2, characterized in that The determining of the bandwidth adjustment strategy according to the relationship between the current buffer occupancy and the first interval includes any one of the following: When the buffer occupancy falls within the first interval, determining the bandwidth adjustment strategy to keep the number of currently activated transmission channels unchanged; When the buffer occupancy is greater than or equal to the maximum value in the first interval, determining the bandwidth adjustment strategy to add an activated transmission channel; When the buffer occupancy is less than or equal to the minimum value in the first interval, the bandwidth adjustment strategy is determined to reduce the transmission channels in the activated state.

4. The method according to claim 3, characterized in that The adjusting the number of the first transmission channels based on the bandwidth adjustment strategy includes: In a case where the bandwidth adjustment strategy is to increase or decrease the transmission channels in an activated state, determining a second interval to which the buffer occupancy belongs; Determine the difference between the number of second transmission channels associated with the second interval and the number of the first transmission channels as the number of transmission channels to be increased or decreased; Based on the current number of transmission channels to be increased or decreased, the first number of transmission channels is adjusted.

5. The method according to claim 1, characterized in that: Determining the current buffer occupancy includes: In case of receiving a buffer update request, determining a type of the update request and a first buffer capacity included in the update request, wherein the type of the update request is any one of the following: an occupation request, a release request; Determine the currently occupied capacity of the second buffer; A current buffer occupancy is determined according to the type of the update request, the first buffer capacity, and the second buffer capacity.

6. The method according to claim 5, characterized in that Determining the current buffer occupancy according to the type of the update request, the first buffer capacity, and the second buffer capacity includes any one of the following: In a case where the type of the update request is an occupation request, determining the sum of the first buffer capacity and the second buffer capacity as the current buffer occupancy; In a case where the type of the update request is a release request, a difference between the second buffer capacity and the first buffer capacity is determined as the current buffer occupancy.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The total capacity of the buffer is determined according to at least one of a total transmission bandwidth corresponding to the system and a type of application currently in operation.

8. The method according to claim 7, characterized in that The method further comprises: Based on a preset interval setting method, each interval corresponding to the system and an endpoint value corresponding to each of the intervals are determined.

9. The method according to claim 7, characterized in that The method further comprises: Determining the number of intervals corresponding to the system according to the total number of transmission channels included in the system; According to the number of intervals corresponding to the system, an endpoint value corresponding to each interval is determined.

10. A transmission bandwidth adjustment device, characterized in that: The device comprises: A first determination module, used to determine the current buffer occupancy; The adjustment module is used to adjust the number of first transmission channels currently in an activated state according to the current buffer occupancy.

11. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for adjusting the transmission bandwidth described in any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the transmission bandwidth adjustment method according to any one of claims 1 to 9 is implemented.

13. A chip, characterized in that: The chip includes a processing circuit and an interface circuit; wherein the interface circuit is used to obtain instructions and send the instructions to the processing circuit, and the processing circuit is used to execute the instructions to implement the transmission bandwidth adjustment method as described in any one of claims 1-9.

14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for adjusting the transmission bandwidth according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Adaptive bandwidth adjustment method and apparatus for SDN data transmission device

    CN106789743A

  • Interface circuit and communication device

    CN111585602A

  • Method and device for controlling memory bandwidth, processor and computing equipment

    CN115904689A

  • Method and device for dynamically adjusting size of buffer area and total number of maximum request threads

    CN117812152A

  • Bandwidth adjustment method and device, storage medium, electronic equipment and product

    CN118051451A