A resource management method, apparatus, device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN FIBOCOM WIRELESS INC
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-07
AI Technical Summary
部分方案采用固定端点绑定方式,例如将控制指令或数据流固定映射至特定USB端点,难以根据5G切片状态变化进行动态调整
[0024] Fourthly, embodiments of this application provide a computer-readable storage medium for storing a computer program. When the computer program is run on a computer device, it causes the computer device to execute the resource management method provided by any possible implementation of the first aspect or any of the above aspects, and also achieves the beneficial effects of the resource management method provided by the first aspect.
Smart Images

Figure CN122534522A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a resource management method, apparatus, device, and storage medium. Background Technology
[0002] With the development of the Fifth Generation Mobile Communication System (5G), network slicing technology has been widely applied in differentiated service scenarios. By using Single Network Slice Selection Assistance Information (S-NSSAI) to identify service flows, different services can access different types of network slices, such as Ultra-Reliable and Low-Latency Communication (URLLC), Enhanced Mobile Broadband (EMBB), or Massive Internet of Things (MIoT), thereby achieving differentiated Quality of Service (QoS) guarantees, such as low latency or high bandwidth guarantees. In terminal devices, 5G communication modules typically interact with the host system via a Universal Serial Bus (USB) interface. Internally, USB devices use multiple endpoints to implement different types of data transmission. Each endpoint has a corresponding endpoint ID and is scheduled and allocated bandwidth according to the USB protocol specification.
[0003] However, in existing technologies, the QoS parameters such as latency and bandwidth defined by 5G slicing primarily apply to the air interface, while the USB bus side still allocates resources based on endpoint type and fixed priority. Some solutions employ fixed endpoint binding, such as mapping control commands or data streams to specific USB endpoints, making dynamic adjustments difficult based on changes in the 5G slice status. Furthermore, the lack of a unified cross-layer interaction mechanism between the 5G slicing protocol specification developed by the 3rd Generation Partnership Project (3GPP) and the USB protocol specification developed by the USB Implementers Forum (USB-IF) hinders the unified coordination of QoS parameters in end-to-end links.
[0004] Therefore, the resource management problem in the scenario of collaborative communication between 5G communication modules and USB devices urgently needs to be solved. Summary of the Invention
[0005] This application provides a resource management method, apparatus, device, and storage medium that can achieve the coordinated conversion of network-side QoS requirements to terminal-side resource scheduling, thereby improving resource utilization efficiency.
[0006] The present application is described below from different aspects. It should be understood that the different implementation methods and beneficial effects described below can be referenced from each other.
[0007] In a first aspect, embodiments of this application provide a resource management method, the method comprising: The terminal device obtains network slice status information, which includes at least QoS parameters; according to the cross-layer parameter mapping rules, the terminal device maps the QoS parameters to resource adjustment parameters for the first USB port; according to the resource adjustment parameters, the terminal device adjusts the resources of the first USB port.
[0008] The USB port in this application can also be described as a USB endpoint. For example, a first USB port can be described as a first USB endpoint.
[0009] In this embodiment, the terminal device obtains slice status information from the network side, including QoS parameters characterizing service requirements. Subsequently, the terminal device converts these QoS parameters into resource adjustment parameters executable by the USB port according to a preset cross-layer parameter mapping rule, transforming the abstract service requirements from the network side into specific resource control parameters from the USB device side. Finally, the terminal device adjusts the resources of the first USB port accordingly based on these resource adjustment parameters, thereby matching the USB resource allocation strategy with the QoS requirements of the network slice. This achieves a coordinated conversion of network-side QoS requirements to USB device-side resource scheduling, improving resource utilization efficiency.
[0010] In conjunction with the first aspect, in one possible implementation, the QoS parameter includes a bandwidth parameter; the terminal device maps the bandwidth parameter to a bandwidth quota parameter for the first USB port; based on the bandwidth quota parameter and the current resource status information of the first USB port, which includes at least the remaining bandwidth, the terminal device determines a bandwidth adjustment parameter for the first USB port; the terminal device adjusts the bandwidth of the first USB port to the bandwidth quota corresponding to the bandwidth adjustment parameter according to the bandwidth adjustment parameter.
[0011] In conjunction with the first aspect, in one possible implementation, the QoS parameter includes a latency parameter; the terminal device maps the latency parameter to a scheduling priority parameter for the first USB port; based on the scheduling priority parameter and the current resource status information of the first USB port, which includes at least load and / or remaining bandwidth, the terminal device determines a priority adjustment parameter for the first USB port; the terminal device adjusts the priority flag of the first USB port in the scheduling mechanism of the USB controller according to the priority adjustment parameter.
[0012] In conjunction with the first aspect, in one possible implementation, the QoS parameter includes a priority parameter; the terminal device maps the priority parameter to a scheduling weight parameter for the first USB port; based on the scheduling weight parameter and the current resource status information of the first USB port, which includes at least load and / or remaining bandwidth, the terminal device determines a scheduling adjustment parameter for the first USB port; according to the scheduling adjustment parameter, the terminal device adjusts the scheduling weight of the first USB port in the USB controller, the scheduling weight being used to determine the proportion of USB bus resources acquired by the first USB port.
[0013] In conjunction with the first aspect, in one possible implementation, the slice status information of the network also includes one or more of the following: slice identifier or slice type.
[0014] In conjunction with the first aspect, in one possible implementation, before mapping the QoS parameter to the resource adjustment parameter of the first USB port according to the cross-layer parameter mapping rule, the terminal device obtains the status information of multiple USB ports, the status information of the USB ports including at least the identifier of the USB port; according to the network slice status information and the preset USB port mapping rule, the terminal device selects at least one USB port from the multiple USB ports, the first USB port being one of the at least one USB port.
[0015] In conjunction with the first aspect, in one possible implementation, the terminal device determines a first USB port from the at least one USB port based on the QoS parameters in the network slice status information, the first USB port satisfying the QoS parameters.
[0016] Secondly, embodiments of this application provide a resource management apparatus for performing the method in the first aspect or any possible implementation thereof. The apparatus includes: The acquisition unit is used to acquire network slice status information, which includes at least QoS parameters. The mapping unit is used to map the QoS parameter to the resource adjustment parameter of the first USB port according to the cross-layer parameter mapping rules. The adjustment unit is used to adjust the resources of the first USB port according to the resource adjustment parameters.
[0017] In conjunction with the second aspect, in one possible implementation, the QoS parameter includes a bandwidth parameter; Specifically, this mapping unit is used to map the bandwidth parameter to the bandwidth quota parameter of the first USB port; The mapping unit is specifically used to determine the bandwidth adjustment parameters of the first USB port based on the bandwidth quota parameter and the current resource status information of the first USB port, the resource status information including at least the remaining bandwidth. The adjustment unit is specifically used to adjust the bandwidth of the first USB port to the bandwidth quota corresponding to the bandwidth adjustment parameter according to the bandwidth adjustment parameter.
[0018] In conjunction with the second aspect, in one possible implementation, the QoS parameter includes a latency parameter; Specifically, this mapping unit is used to map the latency parameter to the scheduling priority parameter of the first USB port; The mapping unit is specifically used to determine the priority adjustment parameters of the first USB port based on the scheduling priority parameter and the current resource status information of the first USB port, the resource status information including at least load and / or remaining bandwidth. The adjustment unit is specifically used to adjust the priority flag of the first USB port in the scheduling mechanism of the USB controller according to the priority adjustment parameter.
[0019] In conjunction with the second aspect, in one possible implementation, the QoS parameter includes a priority parameter; This mapping unit is specifically used to map the priority parameter to the scheduling weight parameter of the first USB port; The mapping unit is specifically used to determine the scheduling adjustment parameters of the first USB port based on the scheduling weight parameter and the current resource status information of the first USB port, which includes at least the load and / or remaining bandwidth. The adjustment unit is specifically used to adjust the scheduling weight of the first USB port in the USB controller according to the scheduling adjustment parameter. The scheduling weight is used to determine the proportion of USB bus resources that the first USB port can obtain.
[0020] In conjunction with the second aspect, in one possible implementation, the network's slice status information also includes one or more of the following: slice identifier or slice type.
[0021] In conjunction with the second aspect, in one possible implementation, the acquisition unit is further configured to acquire status information of multiple USB ports, the status information of which includes at least the identifier of the USB port; The device also includes a selection unit for selecting at least one USB port from the plurality of USB ports based on the network's slice status information and a preset USB port mapping rule, wherein the first USB port is one of the at least one USB port.
[0022] In conjunction with the second aspect, in one possible implementation, the apparatus further includes a determining unit for determining a first USB port from the at least one USB port, the first USB port satisfying the QoS parameters, based on QoS parameters in the network slice status information.
[0023] Thirdly, embodiments of this application provide a terminal device, which may include a processor, a memory, and a network interface. The processor is connected to the memory and the network interface. The network interface provides data communication functionality, the memory stores a computer program, and the processor invokes the computer program to enable the terminal device to execute the resource management method provided in the first aspect or any feasible implementation thereof, thereby achieving the beneficial effects of the resource management method provided in the first aspect.
[0024] Fourthly, embodiments of this application provide a computer-readable storage medium for storing a computer program. When the computer program is run on a computer device, it causes the computer device to execute the resource management method provided by any possible implementation of the first aspect or any of the above aspects, and also achieves the beneficial effects of the resource management method provided by the first aspect.
[0025] Fifthly, embodiments of this application provide a computer program product, which includes a computer program stored in a computer storage medium; a processor of a computer device reads the computer program from the computer storage medium and executes the computer program, so that the computer device executes the resource management method provided by any possible implementation of the first aspect or any of the above aspects, and can also achieve the beneficial effects of the resource management method provided by the first aspect. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of a resource management system architecture provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a resource management method provided in an embodiment of this application; Figure 3 This is a timing diagram of a resource management method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a resource management device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] In the description of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple 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 and b and c. Where a, b, and c can be single or multiple.
[0030] In this application, the words "exemplary" or "for example" are used to indicate that something is an example, illustration, or illustration. Any embodiment or design described as "exemplary," "for example," or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the words "exemplary," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0031] It should be understood that in this application, "when," "if," and "if" all refer to the device making a corresponding action under certain objective circumstances, and are not time-limited, nor do they require the device to make a judgment when it is implemented, nor do they imply any other limitations.
[0032] In this application, the use of singular designations for elements is intended to represent "one or more" rather than "one and only one," unless otherwise specified.
[0033] It is understood that in the various embodiments of this application, "B corresponding to A" means that there is a correspondence between A and B, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0034] First, combine Figure 1 This paper presents a system architecture diagram to which the resource management method protected in this application applies.
[0035] Please see Figure 1 , Figure 1 This is a schematic diagram of a resource management system architecture provided in an embodiment of this application. For example... Figure 1 As shown, the architecture includes a network layer 200, a terminal device 100, and a USB device 300.
[0036] The network layer 200 is communicatively connected to the terminal device 100 and is used to provide the terminal device with network slice status information. This slice status information includes at least QoS parameters, such as latency, bandwidth, and priority parameters, to characterize the resource requirements of different network slice services.
[0037] The terminal device 100 is the core execution entity in this application embodiment, used to perform cross-layer mapping and dynamic scheduling of USB resources based on the slice status information. The terminal device 100 may internally include a network slice monitoring module 101, a dynamic binding module 102, a parameter mapping module 103, a USB resource management module 104, and a cross-layer interaction interface module 105.
[0038] Specifically, the network slice monitoring module 101 is used to obtain slice status information issued by the network layer 200 and extract key data such as QoS parameters from it to provide input for subsequent processing.
[0039] The dynamic binding module 102 is connected to the network slice monitoring module 101 and the USB resource management module 104. It is used to select a target USB port that matches the current slice service requirements from multiple USB ports based on slice status information and USB port status information, according to a preset mapping rule, and establish an association between the target USB port and the slice identifier.
[0040] The parameter mapping module 103 is connected to the dynamic binding module 102 and is used to map the QoS parameter to the resource adjustment parameters of the target USB port according to the cross-layer parameter mapping rules. The resource adjustment parameters include, but are not limited to, scheduling priority parameters, bandwidth quota parameters, and scheduling weight parameters, which are used to indicate the specific adjustment method of USB resources.
[0041] The USB resource management module 104 is connected to the parameter mapping module 103 and is used to adjust the resources of the target USB port according to the resource adjustment parameters. The resource adjustment includes, but is not limited to, adjusting the bandwidth allocation, scheduling priority, scheduling weight of the USB port, and updating the allocation relationship of the USB port, so that the resource configuration of the USB port meets the QoS requirements of the corresponding network slice.
[0042] The cross-layer interaction interface module 105 is connected to both the network slice monitoring module 101 and the USB resource management module 104, and is used to realize information interaction between the network side and the USB side. For example, the cross-layer interaction interface module 105 can be used to obtain QoS parameters of the network layer and to feed back USB resource status information to the network layer, thereby supporting cross-layer resource collaboration.
[0043] The USB device 300 is connected to the terminal device 100 and is used for data transmission via the USB interface. The USB device 300 may include a USB network card, a communication module, or other peripherals, and its resource usage is scheduled and managed by the USB resource management module 104.
[0044] Through the above architecture, terminal devices can transform network layer QoS requirements into USB resource adjustment strategies through cross-layer parameter mapping, and dynamically configure USB port resources. This enables effective mapping and scheduling of network slicing service requirements at the USB resource layer, improves resource utilization efficiency, and meets the service quality requirements of different services.
[0045] The implementation process of the resource management method provided in this application will be described in detail below. Please refer to [link / reference needed]. Figure 2 , Figure 2 This is a flowchart illustrating a resource management method provided in an embodiment of this application. Figure 2 As shown, the resource management method can be applied to terminal devices in institutions such as enterprises, schools, hospitals, or research institutes. These terminal devices can be physical devices such as servers, server clusters, personal computers, laptops, and smartphones, or virtual devices such as virtual machines. The resource management method includes the following steps 201-203.
[0046] Step 201: The terminal device obtains the network slice status information, which includes at least the Quality of Service (QoS) parameters.
[0047] In one possible implementation, the terminal device can obtain the network slice status information through a communication interface with the network side. This network slice status information may include QoS parameters, which characterize the service performance requirements of the network slice. These QoS parameters include, but are not limited to, one or more of the following: latency parameters, bandwidth parameters, priority parameters, reliability parameters, or packet loss rate parameters.
[0048] Optionally, the network slice status information may also include, but is not limited to, one or more of the following: slice identifier, slice type, or slice current load. The slice identifier is used to identify different network slice instances. The slice type indicates the service type corresponding to the network slice, such as EMBB, URLLC, or MIoT slice types. The QoS parameter characterizes the service performance requirements of the corresponding slice. The slice current load reflects the resource occupancy of the current slice, thus providing a basis for subsequent resource allocation and adjustment.
[0049] In one possible implementation, the terminal device can continuously monitor the status of network slices through a network slice monitoring module (such as a 5G slice monitoring module) installed in the terminal device. This network slice monitoring module periodically collects network slice status information according to a preset cycle and provides this information to subsequent dynamic binding modules or parameter mapping modules.
[0050] Step 202: According to the cross-layer parameter mapping rules, the terminal device maps the QoS parameters to the resource adjustment parameters of the first USB port. In one possible implementation, the parameter mapping module in the terminal device receives the network slice status information and the USB port binding result, and performs cross-layer parameter mapping processing based on the QoS parameters in the slice status information.
[0051] This cross-layer parameter mapping rule is used to establish the correspondence between network slice QoS requirements and USB resource parameters. Through a preset mapping strategy, weight coefficient, or scheduling rule, the QoS parameter is converted into resource adjustment parameters for the first USB port. These resource adjustment parameters include, but are not limited to, USB port scheduling priority parameters, bandwidth quota parameters, scheduling weight parameters, scheduling period, or transmission mode parameters.
[0052] Specifically, the cross-layer parameter mapping rule includes at least one or more of the following: When the QoS parameter includes a latency parameter, the scheduling priority parameter of the first USB port is determined based on the latency parameter. The lower the latency requirement, the higher the corresponding scheduling priority. When the QoS parameter includes a bandwidth parameter, the bandwidth quota parameter of the first USB port is determined based on the bandwidth parameter. The greater the bandwidth requirement, the higher the allocated bandwidth quota. When the QoS parameter includes a priority parameter, the scheduling weight parameter of the first USB port is determined based on the priority parameter. The higher the priority, the greater the corresponding scheduling weight. When the QoS parameter includes a reliability parameter or a packet loss rate parameter, the transmission mode parameter of the first USB port is determined based on the reliability parameter.
[0053] Through the above cross-layer parameter mapping process, the QoS requirements of network slices are converted into resource adjustment parameters at the USB resource level, thereby providing a basis for subsequent USB port resource adjustments.
[0054] Step 203: Based on the resource adjustment parameters, the terminal device adjusts the resources of the first USB port.
[0055] In one possible implementation, the USB resource management module in the terminal device receives resource adjustment parameters output by the parameter mapping module and adjusts the configuration of the resources of the first USB port based on these parameters. These resource adjustment parameters include, but are not limited to, endpoint priority adjustment parameters, bandwidth adjustment parameters, scheduling weight parameters, or endpoint identifier allocation parameters.
[0056] Specifically, the USB resource management module performs resource adjustment operations on the first USB port based on the USB controller, including one or more of the following: (1) Endpoint identifier allocation adjustment: By maintaining the endpoint identifier allocation table, update the usage status of the endpoint identifier of the first USB port and its association with the slice identifier. When there is a resource conflict, the endpoint identifier is reallocated according to the preset strategy. (2) Scheduling priority adjustment: Based on the resource adjustment parameters, set the priority flag of the first USB port in the USB controller scheduling mechanism so that the scheduling priority of the first USB port in the USB bus resource scheduling is higher or lower than that of other USB ports, so as to adapt to the latency requirements of different slices. (3) Bandwidth allocation adjustment: Based on the resource adjustment parameters, the bandwidth quota of the first USB port is adjusted through the bandwidth management mechanism of the USB controller, including modifying the bandwidth allocation parameters or related configurations, so as to realize the bandwidth resource allocation between different slices; Optionally, during the bandwidth allocation process, the bandwidth allocation can be dynamically adjusted based on the real-time bandwidth usage and remaining bandwidth of the USB port to improve bandwidth utilization and avoid uneven resource allocation.
[0057] Optionally, during the scheduling process, data associated with the first USB port is prioritized for scheduling processing based on the scheduling priority of the first USB port in the USB controller, so as to reduce the transmission latency of high-priority services.
[0058] After completing the resource adjustment, the USB resource management module can update the resource status information of the USB port, including endpoint identifier allocation, scheduling priority and bandwidth usage, and use it for subsequent resource scheduling or cross-layer interaction processing.
[0059] Optionally, steps 201 to 203 may also have the following specific implementation methods.
[0060] In one possible implementation, the terminal device obtains network slice status information, which includes at least Quality of Service (QoS) parameters, including bandwidth parameters. The terminal device maps these bandwidth parameters to a bandwidth quota parameter for a first USB port. Based on the bandwidth quota parameter and the current resource status information of the first USB port, which includes at least the remaining bandwidth, a bandwidth adjustment parameter for the first USB port is determined. According to the bandwidth adjustment parameter, the bandwidth of the first USB port is adjusted to the bandwidth quota corresponding to the bandwidth adjustment parameter.
[0061] In step 201, the terminal device obtains network slice status information, which includes at least the Quality of Service (QoS) parameter, including the bandwidth parameter.
[0062] Specifically, terminal devices can receive slice status information from the network side through network interfaces, protocol stack modules, baseband modules, modems, or other communication modules that interact with the network side. This slice status information reflects the service requirements of the service corresponding to the current network slice, where the Quality of Service (QoS) parameter characterizes the performance requirements of the service during transmission.
[0063] This QoS parameter includes at least a bandwidth parameter. This bandwidth parameter can be used to represent the network slice's requirements for throughput, transmission rate, minimum guaranteed rate, peak rate, or target bandwidth range. For example, for enhanced mobile broadband services, the network side can allocate a higher bandwidth parameter. For control-related or low-data-volume services, the network side can allocate a relatively lower bandwidth parameter.
[0064] Optionally, the slice status information may also include slice identifier, slice type, priority information, load information, etc., but in this specific implementation, the bandwidth parameter is mainly used to participate in the subsequent mapping and adjustment process.
[0065] In step 202, after obtaining the bandwidth parameter, the terminal device maps the bandwidth parameter to the bandwidth quota parameter of the first USB port.
[0066] Specifically, "mapping" is not simply copying values, but rather converting network-side bandwidth requirements into resource allocation parameters that are recognizable and executable on the USB side, based on pre-defined cross-layer parameter mapping rules. This is because network-side QoS parameters belong to network slicing semantics, while USB-side resource control objects are USB ports or USB endpoints, whose directly controllable resources typically manifest as bandwidth quotas, bandwidth ratios, bandwidth thresholds, or scheduling windows. Therefore, mapping rules are needed to complete the conversion from "network requirement parameters" to "USB resource parameters."
[0067] For example, when the bandwidth parameter is within a first preset range, the bandwidth quota parameter of the first USB port is determined to be the first bandwidth quota. When the bandwidth parameter is within a second preset range, the bandwidth quota parameter of the first USB port is determined to be the second bandwidth quota. When the bandwidth parameter is higher than a third preset threshold, the bandwidth quota parameter of the first USB port is determined to be the third bandwidth quota. For instance, when the bandwidth parameter obtained by the terminal device is 5Mbps, since the bandwidth parameter is within the first preset range, the bandwidth quota parameter of the first USB port is determined to be the first bandwidth quota, i.e., 10Mbps. When the bandwidth parameter obtained by the terminal device is 30Mbps, since the bandwidth parameter is within the second preset range, the bandwidth quota parameter of the first USB port is determined to be the second bandwidth quota, i.e., 40Mbps. When the bandwidth parameter obtained by the terminal device is 100Mbps, since the bandwidth parameter is higher than the third preset threshold, the bandwidth quota parameter of the first USB port is determined to be the third bandwidth quota, i.e., 120Mbps.
[0068] In other words, this mapping can be achieved through table lookup, threshold comparison, proportional conversion, or other preset rules. For example, if the network indicates that a certain slice service requires high throughput, this bandwidth parameter can be mapped to a larger USB bandwidth quota parameter. If the network indicates a lower bandwidth requirement, it can be mapped to a smaller bandwidth quota parameter.
[0069] Therefore, this bandwidth quota parameter is essentially used to describe how much bandwidth resources should be reserved or allocated to the first USB port on the USB side.
[0070] In step 202, after mapping the bandwidth parameter to the bandwidth quota parameter of the first USB port, the bandwidth quota is not directly and mechanically executed. Instead, the bandwidth adjustment parameter of the first USB port is determined based on the bandwidth quota parameter and the current resource status information of the first USB port.
[0071] Because the bandwidth requirements provided by the network side are target requirements, while the available resources on the USB side are dynamically changing. Even if a certain slice service expects to obtain a large bandwidth, if USB bus resources are scarce and the remaining bandwidth of the first USB port is insufficient, the final adjustment value needs to be corrected based on the current resource status.
[0072] Therefore, the final bandwidth adjustment parameters must also be calculated by combining the current resource status information of the first USB port.
[0073] Optionally, the resource status information may also include current bandwidth usage, historical bandwidth usage, bandwidth utilization rate, port load, or other status information related to bandwidth resources.
[0074] For example, the terminal device may determine the bandwidth adjustment parameters of the first USB port in the following ways: When the current remaining bandwidth of the first USB port is greater than or equal to the target bandwidth corresponding to the bandwidth quota parameter, the bandwidth adjustment parameter is determined as the target bandwidth. When the remaining bandwidth of the first USB port is less than the target bandwidth corresponding to the bandwidth quota parameter, the bandwidth adjustment parameter is set to an adjustment value that is less than or equal to the current remaining bandwidth. Optionally, the allocable bandwidth of the first USB port can be recalculated by taking into account the resource usage of other USB ports to obtain updated bandwidth adjustment parameters.
[0075] For example, if the network requires a bandwidth quota of 100Mbps for the USB side corresponding to the slice service, but the available remaining bandwidth of the first USB port is only 80Mbps, the terminal device can determine the bandwidth adjustment parameter to be 80Mbps, or, under the premise of meeting the preset resource coordination policy, reclaim some bandwidth from the USB ports corresponding to other low-priority services, and then determine the bandwidth adjustment parameter to a value close to 100Mbps.
[0076] Therefore, this bandwidth adjustment parameter is not a simple target value, but an actual adjustment value obtained by combining the network-side bandwidth requirements and the current resource status of the USB side.
[0077] In step 203, the terminal device adjusts the bandwidth of the first USB port to the bandwidth quota corresponding to the bandwidth adjustment parameter according to the bandwidth adjustment parameter.
[0078] Specifically, the USB resource management module or USB control module in the terminal device can configure the bandwidth resources of the first USB port according to the bandwidth adjustment parameters. This configuration can be achieved through the bandwidth allocation mechanism of the USB controller, such as adjusting the bandwidth allocation parameters, bandwidth limit parameters, scheduling window parameters, or other bandwidth control parameters of the first USB port.
[0079] The terminal device adjusting the bandwidth of the first USB port to the bandwidth quota corresponding to the bandwidth adjustment parameter can be understood as follows: if the bandwidth adjustment parameter is higher than the currently allocated bandwidth, the terminal device increases the bandwidth quota of the first USB port; if the bandwidth adjustment parameter is lower than the currently allocated bandwidth, the terminal device decreases the bandwidth quota of the first USB port; if the bandwidth adjustment parameter is consistent with the current allocation, the terminal device keeps the current bandwidth configuration unchanged.
[0080] For example, if the first USB port was originally allocated 50Mbps bandwidth, and the bandwidth quota corresponding to the bandwidth adjustment parameters determined according to this embodiment is 80Mbps, then the terminal device will increase the bandwidth configuration of the first USB port from 50Mbps to 80Mbps. Conversely, if the bandwidth quota corresponding to the determined bandwidth adjustment parameters is only 30Mbps, then the bandwidth configuration of the first USB port can be reduced to 30Mbps to allocate the saved resources to other USB ports or other network slice services.
[0081] The above method enables the bandwidth resources actually obtained by the first USB port on the USB side to dynamically match the bandwidth requirements of network-side slice services.
[0082] Through this application, a terminal device obtains network slice status information, which includes at least Quality of Service (QoS) parameters. Based on cross-layer parameter mapping rules, the terminal device maps these QoS parameters to resource adjustment parameters for a first Universal Serial Bus (USB) port. Based on these resource adjustment parameters, the resources of the first USB port are adjusted. This enables the coordinated conversion of network-side QoS requirements to device-side resource scheduling, improving resource utilization efficiency.
[0083] Optionally, steps 201 to 203 may also have the following specific implementation methods.
[0084] In one possible implementation, the terminal device obtains network slice status information, which includes at least Quality of Service (QoS) parameters, including latency parameters. The terminal device maps the latency parameters to a scheduling priority parameter for a first USB port. Based on the scheduling priority parameter and the current resource status information of the first USB port, which includes at least load and / or remaining bandwidth, the terminal device determines a priority adjustment parameter for the first USB port. According to the priority adjustment parameter, the terminal device adjusts the priority flag of the first USB port in the USB controller's scheduling mechanism.
[0085] In step 201, the terminal device obtains the network slice status information, which includes at least the Quality of Service (QoS) parameter, including the latency parameter.
[0086] Specifically, terminal devices can receive slice status information from the network side through network interfaces, protocol stack processing modules, modems, or other communication modules that interact with the network side. This slice status information is used to characterize the operational status and service requirements of the service corresponding to the current network slice. The latency parameter in the QoS parameters indicates the degree of latency requirement for the corresponding service. Optionally, this latency parameter can be expressed as a target latency value, latency level, latency range, or other parameters that reflect the latency requirements of the service.
[0087] In step 202, the terminal device maps the latency parameter to the scheduling priority parameter of the first USB port.
[0088] In this embodiment, the parameter mapping module in the terminal device converts the latency requirements on the network side into executable scheduling priority parameters on the USB resource side according to a preset cross-layer parameter mapping rule. This cross-layer parameter mapping rule establishes the correspondence between latency parameters and USB port scheduling priorities. Generally, the lower the target latency represented by the latency parameter, the higher the real-time requirement of the service; correspondingly, the higher the scheduling priority parameter of the first USB port. Conversely, the higher the target latency represented by the latency parameter, the lower the scheduling priority parameter of the first USB port can be set.
[0089] For example, the terminal device can pre-set multiple latency requirement ranges and corresponding scheduling priority parameters for each latency requirement range. For instance, 0ms to 5ms can be set as a first preset range, 5ms to 20ms as a second preset range, and 20ms as a third preset threshold. Correspondingly, a first scheduling priority parameter, a second scheduling priority parameter, and a third scheduling priority parameter can be set respectively. The first scheduling priority parameter is higher than the second scheduling priority parameter, and the second scheduling priority parameter is higher than the third scheduling priority parameter.
[0090] When the latency parameters obtained by the terminal device are within a first preset range, it indicates that the corresponding service is a high real-time service. In this case, the scheduling priority parameter of the first USB port is determined as the first scheduling priority parameter. When the latency parameters obtained by the terminal device are within a second preset range, the scheduling priority parameter of the first USB port is determined as the second scheduling priority parameter. When the latency parameters obtained by the terminal device are higher than a third preset threshold, the scheduling priority parameter of the first USB port is determined as the third scheduling priority parameter. In this way, the continuously changing latency requirement parameters on the network side can be converted into scheduling priority parameters that can be recognized and executed on the USB resource side.
[0091] In step 202, after mapping the latency parameter to the scheduling priority parameter of the first USB port, the terminal device further determines the priority adjustment parameter of the first USB port based on the scheduling priority parameter and the current resource status information of the first USB port. The resource status information includes at least the load and / or remaining bandwidth.
[0092] The load parameter represents the data processing pressure, resource occupancy, or scheduling activity level of the first USB port currently being used. The remaining bandwidth parameter represents the bandwidth resources still available for allocation to the first USB port. Since network-side latency requirements only reflect target requirements, while USB-side resource status is dynamically changing, the current resource status of the USB port must be considered when determining priority adjustment parameters to obtain adjustment results that better reflect actual execution conditions.
[0093] For example, when the scheduling priority parameter corresponding to the first USB port is high and the current load is lower than a preset load threshold, the priority adjustment parameter can be set to a higher adjustment level to increase the scheduling priority of the first USB port in the USB controller. When the scheduling priority parameter corresponding to the first USB port is high, but the current load is already higher than the preset load threshold, the priority adjustment parameter can be set to an intermediate adjustment level to avoid a single USB port excessively occupying scheduling resources. Furthermore, when the remaining bandwidth is low, the priority adjustment parameter can also be modified so that the scheduling strategy simultaneously considers latency requirements and current resource availability.
[0094] In step 203, the terminal device adjusts the priority flag of the first USB port in the scheduling mechanism of the USB controller according to the priority adjustment parameter.
[0095] Specifically, after receiving the priority adjustment parameter, the USB resource management module in the terminal device adjusts the priority flag of the first USB port based on the USB controller's scheduling mechanism. This priority flag represents the priority level of the USB port during the USB controller's resource scheduling process. By adjusting this priority flag, the scheduling order of the first USB port during USB bus resource contention can be changed.
[0096] For example, when the priority adjustment parameter indicates that the scheduling priority of the first USB port should be increased, the terminal device sets the priority flag of the first USB port in the USB controller scheduling mechanism to a higher level, so that the first USB port is scheduled with priority over other USB ports during the scheduling process. When the priority adjustment parameter indicates that the scheduling priority of the first USB port should be maintained or decreased, its priority flag level is maintained or decreased accordingly.
[0097] In this way, the terminal device can convert the latency parameters in QoS into scheduling priority parameters on the USB resource side according to the latency requirements of the network slice, and further combine the current resource status of the USB port to determine the priority adjustment parameters. Finally, by adjusting the priority flag in the USB controller scheduling mechanism, the scheduling priority of the first USB port is matched with the latency requirements of the network slice, thereby improving the real-time transmission performance of low-latency services on the terminal device side.
[0098] Optionally, steps 201 to 203 may also have the following specific implementation methods.
[0099] In one possible implementation, the terminal device obtains network slice status information, which includes at least Quality of Service (QoS) parameters, including priority parameters. The terminal device maps these priority parameters to scheduling weight parameters for a first USB port. Based on these scheduling weight parameters and the current resource status information of the first USB port, which includes at least load and / or remaining bandwidth, the terminal device determines scheduling adjustment parameters for the first USB port. According to these scheduling adjustment parameters, the terminal device adjusts the scheduling weight of the first USB port in the USB controller, which is used to determine the proportion of USB bus resources that the first USB port acquires.
[0100] In step 201, the terminal device obtains the network slice status information, which includes at least the Quality of Service (QoS) parameter, including the priority parameter.
[0101] Specifically, terminal devices can receive slice status information from the network side through network interfaces, protocol stack processing modules, modems, or other communication modules that interact with the network side. This slice status information characterizes the operational status and service requirements of the services corresponding to the current network slice. The priority parameter in the QoS parameters characterizes the service level, resource guarantee level, or scheduling priority of the corresponding service during resource scheduling. Optionally, this priority parameter can be represented by a priority level value, priority identifier, 5QI parameter, or other parameters that reflect service priority.
[0102] In step 202, the terminal device maps the priority parameter to the scheduling weight parameter of the first USB port.
[0103] In this embodiment, the parameter mapping module in the terminal device converts the priority requirements of the network side into executable scheduling weight parameters of the USB resource side according to a preset cross-layer parameter mapping rule. This cross-layer parameter mapping rule is used to establish the correspondence between priority parameters and USB port scheduling weights. Generally, the higher the service priority represented by the priority parameter, the larger the scheduling weight parameter corresponding to the first USB port. Conversely, the lower the service priority represented by the priority parameter, the smaller the scheduling weight parameter corresponding to the first USB port.
[0104] For example, the terminal device can pre-set multiple priority levels and corresponding scheduling weight parameters for each priority level. For instance, high-priority services can be mapped to a first scheduling weight parameter, medium-priority services to a second scheduling weight parameter, and low-priority services to a third scheduling weight parameter, where the first scheduling weight parameter is greater than the second scheduling weight parameter, and the second scheduling weight parameter is greater than the third scheduling weight parameter. In this way, the priority parameters on the network side can be converted into scheduling weight parameters that are recognizable and executable on the USB resource side.
[0105] In step 202, after mapping the priority parameter to the scheduling weight parameter of the first USB port, the terminal device further determines the scheduling adjustment parameters of the first USB port based on the scheduling weight parameter and the current resource status information of the first USB port. The resource status information includes at least the load and / or remaining bandwidth.
[0106] The load parameter represents the data processing pressure, resource occupancy, or scheduling busyness of the services currently being handled by the first USB port. The remaining bandwidth parameter represents the bandwidth resources still available for allocation to the first USB port. Since the priority parameters on the network side reflect the degree of guarantee for target resources, while the resource status on the USB side is dynamically changing, the current resource status of the first USB port needs to be considered when determining the scheduling adjustment parameters to obtain a scheduling result that conforms to the actual execution conditions.
[0107] For example, when the scheduling weight parameter corresponding to the first USB port is large, and the current load is low and the remaining bandwidth is high, the scheduling adjustment parameter can be set to a higher level to increase the resource acquisition ratio of the first USB port in the USB controller. When the scheduling weight parameter corresponding to the first USB port is large, but the current load is high or the remaining bandwidth is low, the scheduling weight parameter can be adjusted to an intermediate level to avoid excessive occupation of USB bus resources by a single USB port. Furthermore, when the scheduling weight parameter corresponding to the first USB port is small, and there are higher priority services in the current system, the scheduling adjustment parameter can be set to a lower level to reduce the proportion of USB bus resources acquired by the first USB port.
[0108] In step 203, according to the scheduling adjustment parameter, the terminal device adjusts the scheduling weight of the first USB port in the USB controller. The scheduling weight is used to determine the proportion of USB bus resources that the first USB port can obtain.
[0109] Specifically, after receiving the scheduling adjustment parameters, the USB resource management module in the terminal device configures and adjusts the scheduling weight of the first USB port based on the scheduling mechanism of the USB controller. This scheduling weight represents the weight ratio of the first USB port in acquiring USB bus resources relative to other USB ports when multiple USB ports are competing for resources. By adjusting this scheduling weight, the resource share of the first USB port in the USB bus resource allocation process can be changed.
[0110] For example, when the scheduling adjustment parameters indicate that the resource guarantee level of the first USB port should be increased, the terminal device will increase the scheduling weight of the first USB port to a higher level so that the first USB port can obtain a higher proportion of bus resources when allocating USB bus resources; when the scheduling adjustment parameters indicate that the resource guarantee level of the first USB port should be decreased, its scheduling weight will be reduced so that more USB bus resources can be allocated to the services corresponding to other ports.
[0111] In this way, the terminal device can convert the priority parameters in QoS into scheduling weight parameters on the USB resource side according to the priority requirements of the network-side slicing services. Furthermore, it can determine the scheduling adjustment parameters by combining the current resource status of the first USB port. Finally, by adjusting the scheduling weight of the first USB port in the USB controller, the proportion of USB bus resources it can acquire can be dynamically changed, so that the USB side resource allocation result matches the priority requirements of the network slicing.
[0112] In one possible implementation, the terminal device adjusts the priority parameter according to the priority, sets the priority flag of the first USB port in the scheduling mechanism of the USB controller, and allocates the data associated with the first USB port to the first queue and allocates the data associated with other USB ports to the second queue based on the priority flag, wherein the scheduling priority of the first queue is higher than the scheduling priority of the second queue.
[0113] Specifically, in the aforementioned steps, the terminal device has determined the priority adjustment parameters of the first USB port based on the latency parameters of the network-side slice. These priority adjustment parameters indicate the direction and extent of priority adjustment for the first USB port within the USB controller's scheduling mechanism. Upon receiving these priority adjustment parameters, the USB resource management module in the terminal device can set a corresponding priority flag for the first USB port through the USB controller's scheduling mechanism, thereby changing the scheduling order of the first USB port during USB bus resource contention.
[0114] The priority flag can be understood as a priority configuration parameter referenced by the USB controller when performing port scheduling. For services with high real-time requirements, when this priority adjustment parameter indicates that the scheduling priority of the first USB port should be increased, the USB resource management module sets the priority flag of the first USB port in the USB controller scheduling mechanism to a higher level, so that the first USB port has a higher scheduling order in subsequent scheduling processes. Correspondingly, for ordinary data transmission services associated with other USB ports, their original priority flag can be maintained, or set to a lower level.
[0115] For example, the first USB port may correspond to a control service port, such as the USB port corresponding to the Attention (AT) command control channel. Other USB ports may correspond to data service ports, such as the USB port corresponding to network card data transmission. When the terminal device detects that the service corresponding to the first USB port is a low-latency service, a control service, or a high-priority slice service, based on the priority flag, the data associated with the first USB port is allocated to the first queue, while the data associated with other USB ports is allocated to the second queue. The scheduling priority of the first queue is higher than that of the second queue, so that the data in the first queue is processed first during the USB controller scheduling process.
[0116] "Data associated with the first USB port" can be data units, data packets, control data, or service data sent or received via the first USB port. "Data associated with other USB ports" can be data units, data packets, or service data sent or received via other USB ports. By placing the data associated with different USB ports into queues of different priorities, the priority requirements of network-side services can be implemented at the local scheduling level of the USB controller.
[0117] In this implementation, the configuration of the first and second queues can be maintained by the USB controller's scheduling mechanism. The first queue carries latency-sensitive or high-priority data, while the second queue carries data with normal priority. Since the first queue has a higher scheduling priority than the second queue, when the USB controller allocates bus resources, it prioritizes selecting data from the first queue for scheduling, and then schedules data from the second queue. In this way, data associated with the first USB port can obtain USB bus resources before data associated with other USB ports.
[0118] Furthermore, in USB hybrid device scenarios, different USB ports often carry different types of services. For example, AT ports correspond to control services, while network interface card (NIC) ports correspond to data transmission services. Without differentiated scheduling, large data transmissions from the NIC port may continuously occupy USB bus resources, causing control data corresponding to the AT port to fail to be sent in a timely manner, thus affecting the real-time performance of control services. To solve this problem, in this embodiment, the terminal device sets the priority flag of the first USB port according to the priority adjustment parameter, and places the data associated with the first USB port in the first queue, while placing the data associated with other USB ports in the second queue. In this way, when the first USB port corresponds to AT control services, the data corresponding to AT control services will preferentially enter the high-priority first queue, while the large-volume data from the NIC port will enter the lower-priority second queue, thereby ensuring that the data corresponding to AT control services can preferentially obtain USB bus scheduling opportunities and reducing congestion caused by large data transmissions from the NIC.
[0119] Optionally, the priority flag setting can also be dynamically adjusted based on the slice type and real-time load. For example, when the slice type corresponding to the first USB port is an ultra-low latency slice, or when the current load on the slice increases, the priority flag level corresponding to the first USB port can be increased, and the scheduling priority of the first queue can be increased accordingly; when the load on the slice decreases, the priority flag level of the first USB port can be decreased to free up more scheduling opportunities for other USB ports. By introducing the above dynamic adjustment mechanism, the queue scheduling status in the USB controller can be kept consistent with the slice service status information of the network.
[0120] In summary, by setting the priority flag of the first USB port in the USB controller scheduling mechanism according to the priority adjustment parameters, and allocating data associated with the first USB port to the first queue and data associated with other USB ports to the second queue, differentiated scheduling based on service priority can be implemented at the USB resource layer. This method can effectively transmit the latency or priority requirements of network-side slicing to the USB local scheduling layer, thereby reducing the queuing latency of high-priority services and alleviating the resource contention problem between control services and high-data transmission services in USB composite devices.
[0121] Optionally, before step 202, i.e. before mapping the QoS parameter to the resource adjustment parameter of the first USB port according to the cross-layer parameter mapping rule, the terminal device obtains the status information of multiple USB ports, which includes at least the identifier of the USB port. Based on the network slice status information and the preset USB port mapping rule, at least one USB port is selected from the multiple USB ports, and the first USB port is one of the at least one USB port.
[0122] Optionally, the status information of the USB port may also include one or more of the following: the current scheduling priority of the USB port, bandwidth usage, remaining bandwidth, usage status, resource occupancy, or data type information associated with the USB port. By obtaining the status information of multiple USB ports, a resource-side data foundation can be provided for the subsequent dynamic selection of USB ports.
[0123] Simultaneously, the terminal device acquires network slice status information. This slice status information includes at least Quality of Service (QoS) parameters, and optionally, it also includes information such as slice identifier, slice type, and slice load status. The slice identifier can be used to identify different network slice instances, and the slice type can include enhanced mobile broadband (eMBB), ultra-reliable low-latency communication (uRLLC), or massive machine-type communication (mIoT), etc. The QoS parameters are used to characterize the resource requirement characteristics of the corresponding slice service.
[0124] In this embodiment, the dynamic binding module in the terminal device receives the network slice status information and the status information of multiple USB ports, and selects at least one USB port from the multiple USB ports according to a preset USB port mapping rule. The first USB port is one of the at least one USB port. The preset USB port mapping rule is used to establish the correspondence between network slice status information and USB port resource status, thereby determining the port that matches the current slice service requirements from multiple candidate USB ports.
[0125] Optionally, the dynamic binding module can execute the USB port selection process when it detects a change in the network slice status. Such changes include, but are not limited to, the following: a change in slice type, fluctuations in slice load, changes in QoS parameters, or a switch in slice identifier. After detecting these changes, the dynamic binding module can re-acquire the latest USB port status information and, based on the updated slice status information and USB port status information, re-execute the USB port selection process to achieve dynamic adaptation between network slices and USB resources.
[0126] Specifically, selecting at least one USB port from the plurality of USB ports based on the network slice status information and preset USB port mapping rules may include the following process: First, determining resource preferences based on slice type and filtering out a set of candidate USB ports corresponding to the resource preferences from the plurality of USB ports; then, further filtering the set of candidate USB ports based on QoS parameters to remove USB ports that do not meet the current service requirements; finally, determining the at least one USB port from the filtered USB ports.
[0127] For example, when the slice type is a low-latency service, USB ports with higher scheduling priority, lower current load, or less queuing pressure can be selected from multiple USB ports; when the slice type is a high-bandwidth service, USB ports with larger remaining bandwidth or higher bandwidth carrying capacity can be selected from multiple USB ports. Through this method, differentiated selection of USB port resources can be achieved based on the characteristics of different slice services.
[0128] Optionally, after detecting a change in the slice status information, the terminal device first re-acquires the status information of multiple USB ports, and then re-filters and compares the multiple USB ports according to the updated slice status information and preset USB port mapping rules, thereby re-determining the target USB port. To distinguish it from the previously selected first USB port, the re-selected target USB port can be called the second USB port. This second USB port can be the same as or different from the first USB port.
[0129] When the changed slice status information indicates that the original first USB port can still meet the new QoS parameters under the current resource status, the terminal device can continue to use the first USB port as the updated target USB port. That is, at this time, the second USB port can be the same USB port as the first USB port. Only parameter mapping and resource adjustment need to be re-executed to adapt to the changed QoS requirements.
[0130] When the changed slice status information indicates that the original first USB port can no longer meet the new QoS parameters, such as when the remaining bandwidth of the original first USB port is lower than the new bandwidth requirement, the current load is higher than the preset threshold, or the scheduling resources have been occupied by other high-priority services, the terminal device will reselect a new target USB port from multiple USB ports, that is, determine another USB port different from the first USB port as the second USB port, and re-establish the association between the changed slice status information and the second USB port.
[0131] After determining the second USB port, the terminal device further maps the QoS parameters in the changed slice status information to resource adjustment parameters for the second USB port, and adjusts the resources of the second USB port according to these resource adjustment parameters. This resource adjustment includes, but is not limited to, one or more of the following: adjusting the bandwidth quota of the second USB port, adjusting the scheduling priority of the second USB port in the USB controller, adjusting the scheduling weight of the second USB port, and updating the resource allocation relationship of the second USB port. Through this method, the changed slice service requirements are re-adapted to the new target USB port.
[0132] In this way, terminal devices can update the associated objects and resource configurations of USB resources in a timely manner when the network slice status changes dynamically, avoiding resource mismatch problems caused by always using the originally selected USB port. In other words, this embodiment does not simply repeat the same set of resource adjustments on the original port, but allows the reselection of a second USB port and the re-establishment of binding and mapping relationships when the slice status changes. This ensures that the USB resource configuration results continuously match the current slice service requirements, improving the dynamism, accuracy, and adaptability of resource scheduling.
[0133] In one possible embodiment, a first USB port is determined from the at least one USB port based on the QoS parameters in the network slice status information, the first USB port satisfying the QoS parameters.
[0134] "Meets the QoS parameter" can be understood as: the current resource status of the first USB port matches the service requirements represented by the QoS parameter.
[0135] Specifically, when the QoS parameters include bandwidth parameters, the first USB port can be a USB port with remaining bandwidth not less than a preset threshold, or whose bandwidth carrying capacity matches the target bandwidth requirement; when the QoS parameters include latency parameters, the first USB port can be a USB port with low current load, high scheduling priority, or capable of providing low queuing latency; when the QoS parameters include priority parameters, the first USB port can be a USB port that supports high scheduling weight or high resource acquisition ratio.
[0136] For example, the dynamic binding module can first filter multiple candidate USB ports that meet the conditions from multiple USB ports based on QoS parameters, and then determine the first USB port from these multiple candidate USB ports. This determination process can be further combined with the current status information of the USB port, such as the current load, remaining bandwidth, or existing resource usage, to compare multiple candidate USB ports and select the USB port that matches the current slice service requirements more closely as the first USB port.
[0137] After determining the first USB port, the dynamic binding module can establish an association between this first USB port and the current slice status information, and provide this association result to the subsequent parameter mapping module. Based on this first USB port and the corresponding QoS parameters, the subsequent parameter mapping module continues to perform the mapping and calculation process of resource adjustment parameters, thereby ensuring that network-side slice requirements can be implemented in specific USB resource objects.
[0138] By adding a dynamic selection process for USB ports before step 202, the terminal device can first select the target port that matches the current slice service requirements from multiple USB ports, and then perform subsequent resource parameter mapping and resource adjustment on the target port. This improves the matching degree between network slice QoS requirements and USB resource configuration, and enhances the accuracy and flexibility of resource allocation.
[0139] Optionally, if the terminal device has only one USB port, or if only one USB port is currently available for resource scheduling, the terminal device obtains the status information of that USB port. This status information includes at least the USB port's identifier. Optionally, the USB port's status information may also include one or more of the following: current load, remaining bandwidth, bandwidth usage, scheduling priority, or resource occupancy.
[0140] Simultaneously, the terminal device acquires network slice status information, which includes at least Quality of Service (QoS) parameters. These QoS parameters characterize the resource requirements of the current slice service, such as bandwidth requirements, latency requirements, or priority requirements.
[0141] When there is only one USB port, the terminal device does not need to choose among multiple USB ports. Instead, it directly determines whether the USB port meets the QoS parameter based on the network slice status information and the preset USB port mapping rules.
[0142] Specifically, the preset USB port mapping rule is used to establish a matching relationship between QoS parameters and USB port resource status. For example, when the QoS parameter includes a bandwidth parameter, it can be determined whether the remaining bandwidth of the USB port is not lower than a preset bandwidth threshold; when the QoS parameter includes a latency parameter, it can be determined whether the current load of the USB port is lower than a preset load threshold; when the QoS parameter includes a priority parameter, it can be determined whether the USB port supports the corresponding scheduling priority or scheduling weight.
[0143] When the judgment result indicates that the USB port meets the QoS parameter, the USB port is determined as the target USB port, and subsequent parameter mapping and resource adjustment processes are performed based on the USB port.
[0144] When the determination result indicates that the USB port does not meet the QoS parameter, the terminal device can perform resource adjustment operations on the USB port to make its resource status meet the QoS parameter. For example, the bandwidth quota, scheduling priority, or scheduling weight of the USB port can be adjusted to improve its resource carrying capacity. Optionally, if the QoS parameter cannot be met by adjustment, a resource-constrained processing mechanism can also be triggered, such as reducing the service level or adjusting the resource scheduling strategy.
[0145] In this way, even with only one USB port, the terminal device can adapt the network slicing QoS requirements to the USB resource side without having to select between multiple ports.
[0146] Optionally, the terminal device updates the allocation relationship of the first USB port based on the resource adjustment parameters. The allocation relationship of the first USB port is used to describe the resource association status between the first USB port and the network slice. The allocation relationship of the first USB port includes, but is not limited to, one or more of the following: the slice identifier associated with the first USB port, the bandwidth quota allocated by the first USB port to the corresponding network slice, and the scheduling priority or scheduling weight of the first USB port.
[0147] Specifically, in the aforementioned embodiments, the terminal device has determined the resource adjustment parameters of the first USB port based on the network slice status information through parameter mapping processing, and adjusted the bandwidth, scheduling priority, or scheduling weight of the first USB port based on these resource adjustment parameters. Furthermore, the terminal device updates the allocation relationship of the first USB port to ensure that the resource association status between the first USB port and the corresponding network slice remains consistent with the current resource configuration result.
[0148] The allocation relationship of the first USB port describes the resource association status between the first USB port and the network slice. In other words, the allocation relationship indicates which network slice the first USB port serves in the current system state, and what resource configuration is provided to that network slice.
[0149] In this embodiment, the USB resource management module in the terminal device can maintain a port resource allocation table or endpoint identifier allocation table to record the resource allocation status of each USB port or endpoint. When the resource adjustment parameters change or the resource adjustment operation is completed, the USB resource management module updates the relevant record of the first USB port in the allocation table according to the resource adjustment parameters.
[0150] Specifically, the allocation relationship may include, but is not limited to, one or more of the following: (1) Slice identifier associated with the first USB port.
[0151] The slice identifier is used to identify the network slice instance currently served by the first USB port. For example, the first USB port can be bound to the corresponding slice identifier, so that all subsequent data from that slice will be transmitted through the first USB port.
[0152] (2) The first USB port is the bandwidth quota allocated to the corresponding network slice.
[0153] This bandwidth quota is used to characterize the amount of bandwidth resources currently allocated to the first USB port for this slice service. For example, after determining the bandwidth adjustment parameters of the first USB port based on the bandwidth parameters, the corresponding bandwidth quota can be written into this allocation relationship to reflect the bandwidth guarantee capability of the port for this slice.
[0154] (3) The scheduling priority or scheduling weight of the first USB port.
[0155] The scheduling priority or scheduling weight is used to characterize the resource acquisition capability of the first USB port during the USB controller scheduling process. For example, after adjusting the scheduling priority or scheduling weight of the first USB port according to the delay parameter or priority parameter, the updated priority or weight information can be recorded in the allocation relationship, thereby indicating the scheduling order or resource allocation ratio of the port in the resource contention process.
[0156] In this way, the allocation relationship not only records the binding relationship between the first USB port and the network slice, but also reflects the specific resource configuration provided by the port to the corresponding slice at the current moment, thus forming a complete "slice-port-resource" association information.
[0157] Furthermore, in a specific implementation, when a terminal device adjusts the endpoint identifier, the allocation relationship can be updated synchronously by updating the endpoint identifier allocation table. For example, this endpoint identifier allocation table can record the usage status of each endpoint identifier, the corresponding slice identifier, and the corresponding port type or service type. When the endpoint identifier corresponding to the first USB port changes, the slice association changes, or the resource configuration is adjusted, the USB resource management module can update the values of the corresponding fields in the endpoint identifier allocation table, thereby achieving dynamic updates of the allocation relationship.
[0158] For example, when the bandwidth demand of a network slice increases, the terminal device can update the bandwidth quota field corresponding to the first USB port in the allocation table while increasing the bandwidth quota of the first USB port. When the service priority of a slice is increased, the priority field in the allocation relationship can be updated while adjusting the scheduling priority of the first USB port. When the binding relationship between a slice and a port changes, the slice identifier field in the allocation relationship can be updated.
[0159] Through the aforementioned allocation relationship update mechanism, the terminal device can ensure that the resource configuration status of the USB port is always consistent with the current needs of the network slice, and provide an accurate data basis for subsequent resource scheduling, status feedback or cross-layer interaction.
[0160] Figure 3 This is a timing diagram illustrating a resource management method provided in an embodiment of this application.
[0161] like Figure 3 As shown, this embodiment realizes the cross-layer resource management process through the network slice monitoring module, USB resource management module, dynamic binding module, parameter mapping module, cross-layer interaction interface module, and interaction between USB device and network layer.
[0162] Specifically, the steps include the following: Data collection phase.
[0163] The network slice monitoring module collects network slice status information. It actively collects network slice status information at set time intervals. This information includes slice identifier, slice type, load status, and QoS parameters, providing network-side data support for subsequent system decisions.
[0164] Meanwhile, the USB resource management module monitors the status information of the USB ports. This status information can include the USB port identifier usage, current priority setting, or real-time bandwidth usage, ensuring that the system has a real-time understanding of the USB port resources.
[0165] During this phase, the network slice monitoring module sends network slice status information to the dynamic binding module, and the USB resource management module sends USB port status information to the dynamic binding module.
[0166] Dynamic binding phase.
[0167] The dynamic binding module receives status information about the USB port from the USB resource management module.
[0168] The dynamic binding module performs dynamic binding based on the received network slice status information and USB port status information, according to rules. These dynamic binding rules may include matching rules between slice type and port function, and adaptation rules between port resources and slice requirements. For example, the dynamic binding module selects at least one USB port from the plurality of USB ports, where the first USB port is one of the at least one USB port. Based on the QoS parameters in the network slice status information, the first USB port is determined from the at least one USB port, and this first USB port satisfies the QoS parameters.
[0169] During this binding phase, the dynamic binding module completes the dynamic binding of the network slice identifier and the USB port identifier, and sends the binding result to the parameter mapping module.
[0170] Parameter mapping stage.
[0171] After the parameter mapping module receives the binding result sent by the dynamic binding module, the network slice monitoring module sends QoS parameters to the parameter mapping module.
[0172] The parameter mapping module calculates a USB bus resource adjustment scheme based on the binding results and QoS parameters. This cross-layer parameter mapping algorithm can take into account the USB bus resource allocation mechanism and the QoS parameter requirements of network slicing. Then, the QoS parameters are mapped to USB resource adjustment parameters.
[0173] Subsequently, the parameter mapping module generates a USB resource adjustment scheme and sends a USB resource adjustment command to the USB resource management module.
[0174] USB resource management module execution phase.
[0175] After receiving the USB resource adjustment instruction, the USB resource management module operates the endpoint identifier allocation table, adjusts the scheduling flag, and modifies the bandwidth allocation register according to the adjustment instruction.
[0176] For example, in terms of port identifier adjustment, the port identifier allocation table maintained by the Linux USB controller driver layer is operated to update the usage status of the port identifier, the network slice identifier corresponding to the port identifier, and the functional port information to which the port identifier belongs, so as to ensure that the port identifier allocation is reasonable.
[0177] Regarding port priority adjustment, by setting the scheduling flag in the Linux USB scheduling algorithm, the priority of the corresponding USB port in competing for USB bus resources is adjusted, so that the port corresponding to the high priority slice can obtain the bus time slice or the USB bus resource first.
[0178] Regarding bandwidth allocation adjustment, the bandwidth management mechanism of the Linux USB controller is used to modify the bandwidth allocation parameters, reallocate the USB bus bandwidth according to the calculated bandwidth quota, and combine it with real-time bandwidth monitoring information to enable each network slice to obtain bandwidth resources that match its needs.
[0179] After completing the resource adjustment, the USB resource management module sends the updated USB device resource status information to the cross-layer interaction interface module.
[0180] Cross-layer interaction stage.
[0181] The cross-layer interaction interface module obtains the QoS parameters of the network slice from the network slice monitoring module and the updated USB device resource status information from the USB resource management module.
[0182] Subsequently, the cross-layer interaction interface module sends QoS parameters to the USB device according to the preset data format and communication protocol, enabling the USB device to make corresponding adjustments based on the QoS parameters of the network slice.
[0183] Meanwhile, the cross-layer interaction interface module sends USB device resource status information to the network layer, enabling the network layer to optimize and manage network slices based on the USB resource status.
[0184] Through the aforementioned two-way information exchange, collaborative scheduling between the network and the terminal is achieved, thereby ensuring end-to-end QoS services.
[0185] Through the above implementation process, dynamic binding, cross-layer parameter mapping, and resource adjustment between network slice status information and USB port resources are realized, solving the problems of cross-layer resource fragmentation, static binding, and USB resource contention in the existing technology, thereby improving resource utilization efficiency and ensuring the service quality of different services.
[0186] See Figure 4 , Figure 4 This is a schematic diagram of a resource management device provided in an embodiment of this application. The device includes: The acquisition unit 401 is used to acquire network slice status information, which includes at least the Quality of Service (QoS) parameters. The mapping unit 402 is used to map the QoS parameter to the resource adjustment parameter of the first universal serial bus USB port according to the cross-layer parameter mapping rules. The adjustment unit 403 is used to adjust the resources of the first USB port according to the resource adjustment parameters.
[0187] In one possible implementation, the QoS parameter includes a bandwidth parameter; The mapping unit 402 is also used to map the bandwidth parameter to the bandwidth quota parameter of the first USB port; The mapping unit 402 is specifically used to determine the bandwidth adjustment parameters of the first USB port based on the bandwidth quota parameter and the current resource status information of the first USB port, the resource status information including at least the remaining bandwidth. The adjustment unit 403 is also used to adjust the bandwidth of the first USB port to the bandwidth quota corresponding to the bandwidth adjustment parameter according to the bandwidth adjustment parameter.
[0188] In one possible implementation, the QoS parameter includes a latency parameter; The mapping unit 402 is also used to map the latency parameter to the scheduling priority parameter of the first USB port; The mapping unit 402 is specifically used to determine the priority adjustment parameters of the first USB port based on the scheduling priority parameter and the current resource status information of the first USB port, the resource status information including at least load and / or remaining bandwidth; The adjustment unit 403 is also used to adjust the priority flag of the first USB port in the scheduling mechanism of the USB controller according to the priority adjustment parameter.
[0189] In one possible implementation, the QoS parameter includes a priority parameter; The mapping unit 402 is also used to map the priority parameter to the scheduling weight parameter of the first USB port; The mapping unit 402 is specifically used to determine the scheduling adjustment parameters of the first USB port based on the scheduling weight parameter and the current resource status information of the first USB port, the resource status information including at least load and / or remaining bandwidth. The adjustment unit 403 is also used to adjust the scheduling weight of the first USB port in the USB controller according to the scheduling adjustment parameter. The scheduling weight is used to determine the proportion of USB bus resources that the first USB port can obtain.
[0190] In one possible implementation, the network's slice status information may also include one or more of the following: slice identifier or slice type.
[0191] In one possible implementation, the acquisition unit 401 is further configured to acquire status information of multiple USB ports, the status information of the USB ports including at least the identifier of the USB ports; The device also includes a selection unit 404, which selects at least one USB port from the plurality of USB ports according to the network slice status information and a preset USB port mapping rule, wherein the first USB port is one of the at least one USB port.
[0192] In one possible implementation, the device further includes a determining unit 405, configured to determine a first USB port from the at least one USB port based on QoS parameters in the network slice status information, the first USB port satisfying the QoS parameters.
[0193] Please see Figure 5 , Figure 5 This is a schematic diagram of a terminal device provided in an embodiment of this application. It can be used to implement the steps of the resource management method described in any of the above embodiments. The terminal device may include: a processor 501, a memory 502, a communication interface 503, and a bus system 504.
[0194] The memory 502 is, but is not limited to, RAM, ROM, EPROM, or CD-ROM, and is used to store related instructions and data. The memory 502 stores executable modules or data structures, or subsets thereof, or extended sets thereof: Operation instructions: This includes various operation instructions used to perform various operations.
[0195] Operating system: includes various system programs used to implement various basic business functions and handle hardware-based tasks.
[0196] Figure 5 Only one memory is shown in the image; of course, multiple memory can be configured as needed.
[0197] Processor 501 may be a controller, CPU, general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in connection with the embodiments of this application. For example, as described in Embodiment 1, the QoS parameter is mapped to resource adjustment parameters of the first Universal Serial Bus (USB) port according to cross-layer parameter mapping rules. Processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0198] The communication interface 503 can provide network communication functions and may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). As described in Embodiment 1, obtaining network slice status information includes at least Quality of Service (QoS) parameters.
[0199] In practical applications, the various components of the communication device are coupled together through a bus system 504. This bus system 504 includes not only a data bus but may also include a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 All buses are labeled as Bus System 504. For ease of representation, Figure 5 The image shown is only schematic.
[0200] It should be noted that in practical applications, the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0201] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). It should be noted that the memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memory.
[0202] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0203] In summary, the above description is merely a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A resource management method, characterized in that, The method includes: Obtain network slice status information, which includes at least Quality of Service (QoS) parameters; According to the cross-layer parameter mapping rules, the QoS parameters are mapped to the resource adjustment parameters of the first universal serial bus USB port; The resources of the first USB port are adjusted according to the resource adjustment parameters.
2. The method according to claim 1, characterized in that, The QoS parameters include bandwidth parameters; The step of mapping the QoS parameters to resource adjustment parameters of the first Universal Serial Bus (USB) port according to the cross-layer parameter mapping rules includes: The bandwidth parameters are mapped to the bandwidth quota parameters of the first USB port; Based on the bandwidth quota parameters and the current resource status information of the first USB port, including at least the remaining bandwidth, the bandwidth adjustment parameters of the first USB port are determined. According to the resource adjustment parameters, the resources of the first USB port are adjusted, including: According to the bandwidth adjustment parameters, the bandwidth of the first USB port is adjusted to the bandwidth quota corresponding to the bandwidth adjustment parameters.
3. The method according to claim 1, characterized in that, The QoS parameters include latency parameters; The step of mapping the QoS parameters to resource adjustment parameters of the first Universal Serial Bus (USB) port according to the cross-layer parameter mapping rules includes: The latency parameter is mapped to the scheduling priority parameter of the first USB port; Based on the scheduling priority parameter and the current resource status information of the first USB port, the resource status information including at least load and / or remaining bandwidth, the priority adjustment parameter of the first USB port is determined. According to the resource adjustment parameters, the resources of the first USB port are adjusted, including: According to the priority adjustment parameters, the priority flag of the first USB port in the scheduling mechanism of the USB controller is adjusted.
4. The method according to claim 1, characterized in that, The QoS parameters include priority parameters; The step of mapping the QoS parameters to resource adjustment parameters of the first Universal Serial Bus (USB) port according to the cross-layer parameter mapping rules includes: Map the priority parameter to the scheduling weight parameter of the first USB port; Based on the scheduling weight parameters and the current resource status information of the first USB port, including at least load and / or remaining bandwidth, the scheduling adjustment parameters of the first USB port are determined. According to the resource adjustment parameters, the resources of the first USB port are adjusted, including: Based on the scheduling adjustment parameters, the scheduling weight of the first USB port in the USB controller is adjusted, and the scheduling weight is used to determine the proportion of USB bus resources acquired by the first USB port.
5. The method according to any one of claims 1 to 4, characterized in that, The network slice status information also includes one or more of the following: slice identifier or slice type.
6. The method according to claim 5, characterized in that, Before mapping the QoS parameters to resource adjustment parameters of the first USB port according to the cross-layer parameter mapping rules, the method further includes: Obtain status information of multiple USB ports, wherein the status information of the USB ports includes at least the identifier of the USB ports; Based on the network slice status information and the preset USB port mapping rules, at least one USB port is selected from the plurality of USB ports, wherein the first USB port is one of the at least one USB port.
7. The method according to claim 6, characterized in that, The method further includes: Based on the QoS parameters in the network slice status information, a first USB port is determined from the at least one USB port, and the first USB port satisfies the QoS parameters.
8. A resource management device, characterized in that, include: An acquisition unit is used to acquire network slice status information, wherein the network slice status information includes at least Quality of Service (QoS) parameters. The mapping unit is used to map the QoS parameters to resource adjustment parameters of the first Universal Serial Bus (USB) port according to the cross-layer parameter mapping rules. The adjustment unit is used to adjust the resources of the first USB port according to the resource adjustment parameters.
9. A terminal device, characterized in that, include: Processor, memory, and network interface; The processor is connected to a memory and a network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to invoke the computer programs to cause the communication device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to cause a communication device having the processor to perform the method as described in any one of claims 1-7.