Method and network device, electronic device, computer-readable medium for resource allocation

The automated resource configuration method in optical transmission networks addresses the complexity of configuring resources for diverse business types by adapting local resources to match remote configurations, enhancing efficiency and reducing manual errors.

CN113691386BActive Publication Date: 2025-07-15ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010425996.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-19
Publication Date
2025-07-15
Estimated Expiration
2040-05-19

AI Technical Summary

Technical Problem

In the transmission network, the diversified service types of access layer equipment lead to complex resource allocation and low efficiency, and a high manual configuration error rate.

Method used

Through an automated resource configuration method, the same or local idle resources are configured for the port to be configured according to the service and resource conditions of the peer-to-end port of the remote device, solving the problem of inefficient manual configuration.

Benefits of technology

Improve the efficiency of resource allocation, reduce the configuration error rate, and simplify the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113691386B_ABST
    Figure CN113691386B_ABST
Patent Text Reader

Abstract

An embodiment of the present disclosure provides a method for resource allocation. The method includes: determining that the service of at least one port is updated to a service to be enabled, and the port whose service is updated to the service to be enabled is a port to be configured; obtaining the service and resources of the peer port of the remote device connected to the port to be configured; if the peer port has been configured, configuring the same resources as the peer port for the port to be configured, and if the peer port has not been configured, configuring resources for the port to be configured at least according to local idle resources; wherein, the peer port having been configured means that the service of the peer port is the service to be enabled and resources have been configured. An embodiment of the present disclosure also provides a network device, an electronic device, and a computer-readable medium for resource allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of transmission networks, and particularly to methods for resource allocation, network devices, electronic devices, and computer-readable media. Background Art

[0002] In a transmission network (such as an optical transmission network), compared with core layer and aggregation layer devices, the service types of access layer devices are more diverse. For different service types, the bandwidth requirements are also different, and the requirements for resources are also diverse. Some require continuous resources, while others can be discrete.

[0003] When an access layer device opens a service, an operator needs to manually configure service ports through an NMS (Network Management System) according to the accessed service type. For example, an FC1600 (Fibre Channel 1600) service needs to occupy 11 discontinuous resources, and the operator needs to manually check multiple resource numbers on the NMS interface. Summary of the Invention

[0004] Embodiments of the present disclosure provide a method for resource allocation, a network device, an electronic device, and a computer-readable medium.

[0005] In a first aspect, embodiments of the present disclosure provide a method for resource allocation, which includes:

[0006] Determine that the service of at least one port is updated to a service to be opened, and the port whose service is updated to the service to be opened is a port to be configured;

[0007] Obtain the service and resources of the peer port of the remote device connected to the port to be configured;

[0008] If the peer port has been configured, configure the same resources for the port to be configured as those of the peer port. If the peer port has not been configured, configure resources for the port to be configured at least according to local idle resources;

[0009] Wherein,

[0010] The fact that the peer port has been configured means that the service of the peer port is the service to be opened and resources have been configured.

[0011] In some embodiments, between determining that the service of at least one port is updated to a service to be opened and obtaining the service and resources of the peer port of the remote device connected to the port to be configured, it further includes: if the port to be configured has been configured with resources, release the configured resources.

[0012] In some embodiments, configuring resources for the port to be configured according to at least local idle resources includes:

[0013] If the peer port has not been configured with resources, configure resources for the port to be configured according to the local idle resources and the remote idle resources, where the remote idle resources are the idle resources of the remote device;

[0014] If the peer port has been configured with resources and the service of the peer port is not the service to be enabled, configure resources for the port to be configured from the local idle resources according to a predetermined rule.

[0015] In some embodiments, configuring resources for the port to be configured according to the local idle resources and the remote idle resources includes:

[0016] If the number of resources that are both in the local idle resources and in the remote idle resources is not less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the resources that are both in the local idle resources and in the remote idle resources according to a predetermined rule.

[0017] In some embodiments, configuring resources for the port to be configured according to the local idle resources and the remote idle resources includes:

[0018] If the number of resources that are both in the local idle resources and in the remote idle resources is less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the local idle resources according to a predetermined rule.

[0019] In some embodiments, configuring resources for the port to be configured from the local idle resources according to a predetermined rule includes:

[0020] If the number of resources in the local idle resources is not less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the local idle resources in sequence;

[0021] If the number of resources in the local idle resources is less than the number of resources required for the service to be enabled, return to the step of obtaining the service and resources of the peer port of the remote device connected to the port to be configured.

[0022] In some embodiments, the port to be configured and the peer port are connected through an optical transmission network.

[0023] In a second aspect, an embodiment of the present disclosure provides a network device for resource configuration, which includes:

[0024] At least one port, where the port is connected to the port of a remote device;

[0025] An identification module, configured to determine that the service update of at least one port is a service to be activated, and the port whose service update is a service to be activated is a port to be configured;

[0026] An acquisition module, configured to acquire the services and resources of the peer port of the remote device connected to the port to be configured;

[0027] A configuration module, configured to, when the peer port has been configured, configure the same resources as the peer port for the port to be configured, and when the peer port has not been configured, configure resources for the port to be configured at least according to local idle resources;

[0028] Wherein,

[0029] The peer port has been configured means that the service of the peer port is the service to be activated and the resources have been configured.

[0030] In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes:

[0031] One or more processors;

[0032] A memory, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors perform any of the above resource configuration methods;

[0033] One or more I / O interfaces, connected between the processor and the memory, for realizing information interaction between the processor and the memory.

[0034] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, it implements any of the above resource configuration methods.

[0035] The resource configuration method, network device, electronic device, and computer-readable medium provided by the embodiments of the present disclosure automatically configure the local port according to the services and resources of the peer port of the remote device, solve the problems of low efficiency and cumbersome operation of manual configuration, and improve the efficiency of resource configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In the drawings of the embodiments of the present disclosure:

[0037] Figure 1 is a flowchart of a resource configuration method provided by an embodiment of the present disclosure;

[0038] Figure 2 is a flowchart of some steps in another resource configuration method provided by an embodiment of the present disclosure;

[0039] Figure 3 Flowchart of some steps in another resource allocation method provided by an embodiment of the present disclosure;

[0040] Figure 4 Flowchart of some steps in another resource allocation method provided by an embodiment of the present disclosure;

[0041] Figure 5 Flowchart of some steps in another resource allocation method provided by an embodiment of the present disclosure;

[0042] Figure 6 Block diagram of a network device A and a network device B provided by an embodiment of the present disclosure;

[0043] Figure 7 Block diagram of a resource allocation network device provided by an embodiment of the present disclosure;

[0044] Figure 8 Block diagram of an electronic device provided by an embodiment of the present disclosure;

[0045] Figure 9 Block diagram of a computer-readable medium provided by an embodiment of the present disclosure. Detailed implementation manners

[0046] To enable those skilled in the art to better understand the technical solutions of the embodiments of the present disclosure, the resource allocation methods, network devices, electronic devices, and computer-readable media provided by the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0047] The embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. However, the disclosed embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0048] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation to the present disclosure. By describing the detailed exemplary embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.

[0049] The embodiments of the present disclosure may be described with reference to the plan views and / or cross-sectional views by means of the ideal schematic diagrams of the present disclosure. Therefore, the exemplary illustrations may be modified according to the manufacturing technology and / or tolerances.

[0050] Without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0051] The terms used in this disclosure are only for describing specific embodiments and are not intended to limit this disclosure. As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items. As used in this disclosure, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. As used in this disclosure, the terms "comprising", "consisting of", specify the presence of the stated features, wholes, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their groups.

[0052] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless this disclosure clearly so defines.

[0053] Embodiments of this disclosure are not limited to the embodiments shown in the drawings, but include modifications to the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be restrictive.

[0054] In a first aspect, with reference to Figure 1 , embodiments of this disclosure provide a method for resource allocation.

[0055] The method of the embodiments of this disclosure is used for a network device to execute, and different network devices can be interconnected to form a network. Among them, each network device has one or more ports, and the corresponding ports of two interconnected network devices are connected. When the corresponding ports of two interconnected network devices access the same service and use the same resources, the corresponding service is enabled, and the two can achieve service information exchange.

[0056] Among them, in some embodiments, the network device can be an optical network device, and the network formed by interconnecting different network devices is an optical transmission network.

[0057] With the rapid development of 5G, the service access types of the access layer devices in the optical transmission network are becoming increasingly rich, such as SDH (Synchronous Digital Hierarchy), FC (Fibre Channel), CPRI (Common Public Radio Interface), OTN (Optical Transport Network), FICON (Fiber Connection), Ethernet, etc. Different service types require different resources, resulting in a complex configuration process and a high error rate for manual configuration.

[0058] However, the resource configuration method of this embodiment can automatically implement resource configuration and solve the problem of difficult resource configuration in the optical transmission network.

[0059] The resource configuration method of this embodiment specifically includes:

[0060] S101. Determine that the service of at least one port is updated to a service to be enabled, and the port whose service is updated to a service to be enabled is the port to be configured.

[0061] The identification module of the local device identifies that the access service of a certain port in the local device has changed (such as changing from no service access to having service access, or changing from one service to another service), and it is necessary to reconfigure resources for it. Then, determine the port whose service has changed as the port to be configured, and the service after the change is the service to be enabled.

[0062] S102. Obtain the service and resources of the peer port of the remote device connected to the port to be configured.

[0063] After the identification module of the local device determines that the port connected to the port to be configured in the remote device connected to the local device is the peer port, the acquisition module of the local device acquires the current service of the peer port and the resources it occupies.

[0064] S103. If the peer port has been configured, configure the same resources as the peer port for the port to be configured; if the peer port has not been configured, configure resources for the port to be configured at least according to the local idle resources, where the peer port has been configured means that the service of the peer port is the service to be enabled and the resources have been configured.

[0065] The configuration module of the local device determines whether the peer port has been configured (that is, the current service of the peer port is the service to be enabled, and the port has been configured with resources that meet the requirements of the service to be enabled).

[0066] If so, configure the same resources for the port to be configured according to the resource configuration of the peer port.

[0067] If it is determined that the peer port has not been configured (that is, the peer port has not been configured with resources or the current service of the peer port is not the service to be enabled), then configure resources for the port to be configured at least according to the local idle resources.

[0068] The completion of the service requires the port to be configured and the peer port to be configured with the same resources. Therefore, if the peer port has been configured, only configure the same resources for the port to be configured according to the resource configuration of the peer port. If the peer port has not been configured, then configure resources for the port to be configured at least according to the local idle resources. When the peer port needs to be configured with resources, configure the same resources as the port to be configured to complete the service.

[0069] The local device is a network device that executes the method of resource configuration, and the port where the access service changes is the port to be configured. The remote device refers to the network device connected to the local device, and the port connected to the port to be configured in the remote device is the peer port.

[0070] Therefore, for the same network device, different ports may have changes in access services at different times. Therefore, any port in the local device can become the port to be configured.

[0071] Since the condition for enabling the service is that both connected ports access the service and are configured with the same resources, the access service types of the two connected ports will change (but there may be a time difference in the change of the access service type). Therefore, the network devices where the two connected ports are located will both execute the method of resource configuration. Therefore, when these two network devices execute the method of resource configuration, they are both local devices and also the remote devices of each other.

[0072] At the same time, since the resource configuration of the two ports is usually not completely synchronized, but one is configured first and the other is configured later. Therefore, for the port configured first, when its network device executes the method of resource configuration, it will find that the corresponding remote port has not been configured, so configure the port to be configured at least according to the local idle resources; for the port configured later, when its network device executes the method of resource configuration, it will find that the corresponding remote port has been configured, so it can configure resources for it according to the resource configuration of the remote port.

[0073] Such as referring to Figure 6, there are two network devices, A and B. Each network device has n ports (numbered 1 to n) and can use 8 * n resources (numbered 1 to 8 * n). When a service needs to be established between network devices A and B, one port from each of A and B is required, and the same resources (i.e., resources with the same number) are configured for the ports. If the ports do not correspond or the configured resources are different, the service cannot be successfully established.

[0074] Generally speaking, the corresponding rule for ports of different network devices is that ports with the same number correspond to each other. The following also takes this as an example.

[0075] When the service type accessed by port 1 of A (for example) changes and resources need to be configured for it, port 1 of A is the port to be configured, and the corresponding port of B to port 1 of A is the peer port (i.e., port 1 of B).

[0076] Generally, when the service type accessed by port 1 of A (for example) changes, the corresponding port of B (i.e., port 1 of B) also needs to change (only the time may be different). When the service type accessed by port 1 of B (for example) changes and resources need to be configured for it, port 1 of B is the port to be configured, and the corresponding port of A to port 1 of B (i.e., port 1 of A) is the peer port.

[0077] Of course, the port correspondence relationship between A and B can be changed (such as modified through software configuration files, hardware DIP switches, network management configurations, etc.).

[0078] Then the process of this resource configuration method (taking the configuration of resources for port 1 of A as an example) can be specifically as follows:

[0079] Determine that port 1 of A is the port to be configured, and the service accessed by port 1 (such as a service that requires 7 non - consecutive resources) is the service to be updated.

[0080] Obtain the resource configuration and the accessed service of port 1 of B corresponding to port 1 of A.

[0081] If the configuration of port 1 of B has been completed, that is, the service accessed by port 1 of B is the service to be updated and resources have been configured, then only the corresponding - numbered resources need to be configured for port 1 of A.

[0082] If the configuration of port 1 of B has not been completed, then at least configure resources for port 1 of A according to the local idle resources (i.e., resources not configured for any port of A). When configuring resources for port 1 of B, the same resources can be configured for port 1 of B according to the configuration that port 1 of A has completed. It should be emphasized that during the process of configuring resources for port 1 of B, port 1 of B is the port to be configured in this process, while port 1 of A becomes the peer port.

[0083] The resource configuration method provided by the embodiment of the present disclosure automatically configures the local port according to the services and resources of the opposite port of the remote device, thereby solving the problems of low efficiency and cumbersome operation of manual configuration and improving the efficiency of resource configuration.

[0084] In some embodiments, reference Figure 2 , determining that the service of at least one port is updated as the service to be opened (S101) and obtaining the service and resources of the opposite port of the remote device connected to the port to be configured (S102) also includes: S201, if the port to be configured has been configured with resources, releasing the configured resources.

[0085] After the identification module determines the port to be configured, the configuration module first determines whether the port to be configured has been configured with resources before. If resources have been configured, the currently configured resources cannot meet the requirements of the service to be updated due to the change in the access service type. Therefore, it is necessary to release the configured resources and reconfigure the resources for the port to be configured.

[0086] Before reconfiguring resources for the port to be configured, the resources previously configured for the port to be configured are released, so that the number of idle resources can be increased, that is, the number of resources that can be configured for the port to be configured is increased, which is useful for configuring more appropriate resources for the port to be configured.

[0087] In some embodiments, reference Figure 3 , configuring resources for the port to be configured at least according to the local idle resources (S103) includes:

[0088] S301: If resources are not configured for the opposite port, configure resources for the port to be configured according to local idle resources and remote idle resources, wherein the remote idle resources are idle resources of a remote device.

[0089] S302: If resources have been configured for the opposite port and the service of the opposite port is not a service to be opened, resources are configured for the port to be configured from local idle resources according to a predetermined rule.

[0090] When the configuration module determines that the peer port has not completed configuration (ie, the peer port has no resources configured or the current service of the peer port is not a service to be opened), the configuration module needs to further determine whether the peer port has no resources configured or has resources configured but the current service is not a service to be opened.

[0091] If the opposite port is not configured with resources, the configuration module configures resources for the port to be configured according to the acquired local idle resources and remote idle resources.

[0092] The remote idle resources are idle resources of the remote device, that is, resources that are not configured to any port of the remote device.

[0093] The acquisition module of the local device can acquire the services and resources of the peer port of the remote device connected to the port to be configured (S102) while acquiring the remote free resources of the remote device (or acquiring the usage of all resources of the remote device); of course, the acquisition module can also acquire the remote free resources of the remote device and send them to the configuration module after the configuration module determines that the peer port has no configured resources for the configuration module to configure resources for the port to be configured according to the local free resources and the remote free resources.

[0094] When the peer port has no configured resources, resources are configured for the port to be configured according to the local free resources and the remote free resources. The resources configured by the port to be configured are within the remote free resources. Therefore, when configuring resources for the peer port according to the resources configured by the port to be configured, the situation where the resources to be configured are occupied will not occur, improving the configuration efficiency.

[0095] If the peer port has configured resources, but the accessed service is not the service to be updated, resources are configured for the port to be configured from the local free resources according to a predetermined rule.

[0096] When the peer port has already configured resources, but the accessed service is not the service to be updated, when the peer port accesses the service to be updated and needs to reconfigure resources for it, the currently occupied resources need to be released. After the release, the number of remote free resources is greater than the current number of remote free resources. Therefore, only the local free resources need to be used to configure resources for the port to be configured. This increases the number of resources available for configuration and is conducive to configuring more suitable resources for the port to be configured.

[0097] In some embodiments, referring to Figure 4 , configuring resources for the port to be configured according to the local free resources and the remote free resources (S301) includes:

[0098] S401. If the number of resources in both the local free resources and the remote free resources is not less than the number of resources required for the service to be enabled, resources are configured for the port to be configured from the resources in both the local free resources and the remote free resources according to a predetermined rule.

[0099] After the acquisition module acquires the local free resources and the remote free resources, the configuration module determines whether the resources in both the local free resources and the remote free resources (that is, the resources that are not allocated to any port of the local device and not allocated to any port of the remote device) meet the requirements of the service to be enabled (such as whether the quantity is sufficient). If sufficient, resources are configured for the port to be configured from the resources in both the local free resources and the remote free resources according to a predetermined rule.

[0100] Configure resources for the port to be configured from the resources that are both local idle resources and remote idle resources. The resources configured for the port to be configured are in the remote idle resources. Therefore, when configuring resources for the peer port according to the resources configured for the port to be configured, the situation where the resources to be configured are occupied will not occur, improving the configuration efficiency.

[0101] For example, configure resources for port 1 of A, and port 1 of B is the peer port of port 1 of A.

[0102] When port 1 of B is not configured with resources, obtain the resources that are both in the idle resources of A (resources not configured for any port of A) and in the idle resources of B (resources not configured for any port of B). For example, if the idle resource numbers of A are 1, 2, 3, 4 and the idle resource numbers of B are 2, 3, 4, 5, then the resources that are both in the idle resources of A and in the idle resources of B are 2, 3, 4.

[0103] If the service to be activated requires 2 consecutive resources, the resources that are both in the idle resources of A and in the idle resources of B meet the requirements of the service to be activated. Just configure resources for the port to be configured from the resources that are both in the idle resources of A and in the idle resources of B, such as 2 and 3.

[0104] In some embodiments, referring to Figure 4 , configuring resources for the port to be configured according to the local idle resources and the remote idle resources (S301) includes:

[0105] S402. If the number of resources that are both in the local idle resources and in the remote idle resources is less than the number of resources required for the service to be activated, then configure resources for the port to be configured from the local idle resources according to a predetermined rule.

[0106] After the acquisition module acquires the local idle resources and the remote idle resources, the configuration module determines whether the resources that are both in the local idle resources and in the remote idle resources (that is, the resources not allocated to any port of the local device and not allocated to any port of the remote device) meet the requirements of the service to be activated (such as whether the quantity is sufficient). If not, then configure resources for the port to be configured from the local idle resources according to a predetermined rule.

[0107] For example, configure resources for port 1 of A, and port 1 of B is the peer port of port 1 of A.

[0108] When port 1 of B is not configured with resources, obtain the resources that are both in the idle resources of A (resources not configured for any port of A) and in the idle resources of B (resources not configured for any port of B). For example, if the idle resource numbers of A are 1, 2, 3, 4 and the idle resource numbers of B are 2, 3, 4, 5, then the resources that are both in the idle resources of A and in the idle resources of B are 2, 3, 4.

[0109] If the service to be activated requires 4 consecutive resources, the resources that are both in the idle resources of A and in the idle resources of B do not meet the requirements of the service to be activated. Resources can be configured for the port to be configured from the idle resources of A, such as 1, 2, 3, 4.

[0110] In some embodiments, referring to Figure 5 , configuring resources for the port to be configured from the local idle resources according to a predetermined rule includes:

[0111] S501. If the number of resources in the local idle resources is not less than the number of resources required for the service to be activated, configure resources for the port to be configured from the local idle resources in sequence.

[0112] The configuration module determines whether the resources that are both in the local idle resources (i.e., the resources that are not allocated to any port of the local device and not allocated to any port of the remote device) meet the requirements of the service to be activated (such as whether the quantity is sufficient). If sufficient, configure resources for the port to be configured from the local idle resources in sequence.

[0113] For example, when configuring resources for port 1 of A, the idle resources of A (the resources not configured for any port of A) are numbered 1, 2, 3, 4. If the service to be activated requires 2 consecutive resources, then configure resources for the port to be configured from the local idle resources in sequence, that is, the resources numbered 1 and 2.

[0114] S502. If the number of resources in the local idle resources is less than the number of resources required for the service to be activated, return to the step of determining that the services of at least one port are updated to services to be activated.

[0115] The configuration module determines whether the resources that are both in the local idle resources (i.e., the resources that are not allocated to any port of the local device and not allocated to any port of the remote device) meet the requirements of the service to be activated (such as whether the quantity is sufficient). If not enough, return to the step of determining that the services of at least one port are updated to services to be activated.

[0116] For example, when configuring resources for port 1 of A, the idle resources of A (the resources not configured for any port of A) are numbered 1, 2, 3, 4. If the service to be activated requires 5 consecutive resources, the idle resources of A do not meet the requirements, the configuration fails, and return to the step of obtaining the services and resources of the peer port of the remote device connected to the port to be configured.

[0117] In a second aspect, referring to Figure 7 , an embodiment of the present disclosure provides a network device for resource configuration, which includes:

[0118] At least one port, and the port is connected to the port of the remote device;

[0119] An identification module, configured to determine that the service of at least one port is updated to a service to be activated, and the port whose service is updated to a service to be activated is a port to be configured;

[0120] An acquisition module, configured to acquire the service and resources of the peer port of the remote device connected to the port to be configured;

[0121] A configuration module, configured to, when the peer port has been configured, configure the same resources for the port to be configured as those of the peer port, and when the peer port has not been configured, configure resources for the port to be configured at least according to local idle resources;

[0122] Wherein,

[0123] That the peer port has been configured means that the service of the peer port is a service to be activated and the resources have been configured.

[0124] In a third aspect, referring to Figure 8 , an embodiment of the present disclosure provides an electronic device, which includes:

[0125] One or more processors,

[0126] A memory, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the resource configuration method of any one of the above;

[0127] One or more I / O interfaces, connected between the processor and the memory, for implementing information interaction between the processor and the memory.

[0128] Wherein, the processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory is a device with data storage capabilities, including but not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read / write interface) is connected between the processor and the memory, for implementing information interaction between the memory and the processor, and includes but not limited to a data bus (Bus), etc.

[0129] In a fourth aspect, referring to Figure 9 , an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, the resource configuration method of any one of the above is implemented.

[0130] Those of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules / units in the devices disclosed above can be implemented as software, firmware, hardware, and their appropriate combinations.

[0131] In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a single physical component may have multiple functions, or a function or step may be executed by the cooperation of several physical components.

[0132] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH), or other magnetic disk storage; compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical disc storage; magnetic cassettes, tapes, magnetic disk storage, or other magnetic storage; and any other medium that can be used to store the desired information and that can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery media.

[0133] The present disclosure has disclosed example embodiments, and although specific terms have been employed, they are used only and should be construed only as of a general illustrative meaning and not for a limiting purpose. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, the features, characteristics, and / or elements described in connection with a particular embodiment may be used alone or in combination with the features, characteristics, and / or elements described in connection with other embodiments. Accordingly, those skilled in the art will understand that various forms and details may be changed without departing from the scope of the present disclosure as set forth by the appended claims.

Claims

1. A method for resource allocation, comprising: Determine that the service of at least one port is updated to a service to be enabled, and the port whose service is updated to be enabled is a port to be configured; Obtain the service and resources of the peer port of the remote device connected to the port to be configured; If the peer port has been configured, configure the same resources for the port to be configured as those of the peer port. If the peer port has not been configured, configure resources for the port to be configured at least according to local idle resources; Wherein, That the peer port has been configured means that the service of the peer port is the service to be enabled and resources have been configured.

2. The method according to claim 1, wherein Between determining that the service of at least one port is updated to a service to be enabled and obtaining the service and resources of the peer port of the remote device connected to the port to be configured, further included is: If the port to be configured has configured resources, release the configured resources.

3. The method according to claim 1, wherein That configuring resources for the port to be configured at least according to local idle resources includes: If the peer port has not configured resources, configure resources for the port to be configured according to the local idle resources and the remote idle resources, wherein the remote idle resources are the idle resources of the remote device; If the peer port has configured resources and the service of the peer port is not the service to be enabled, configure resources for the port to be configured from the local idle resources according to a predetermined rule.

4. The method according to claim 3, wherein, That configuring resources for the port to be configured according to the local idle resources and the remote idle resources includes: If the number of resources that are both in the local idle resources and in the remote idle resources is not less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the resources that are both in the local idle resources and in the remote idle resources according to a predetermined rule.

5. The method according to claim 3, wherein That configuring resources for the port to be configured according to the local idle resources and the remote idle resources includes: If the number of resources that are both in the local idle resources and in the remote idle resources is less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the local idle resources according to a predetermined rule.

6. The method according to any one of claims 3 to 5, wherein That configuring resources for the port to be configured from the local idle resources according to a predetermined rule includes: If the number of resources in the local idle resources is not less than the number of resources required for the service to be enabled, configure resources for the port to be configured from the local idle resources in sequence; If the number of resources in the local idle resources is less than the number of resources required for the service to be enabled, return to the step of obtaining the service and resources of the peer port of the remote device connected to the port to be configured.

7. The method according to claim 1, wherein, The port to be configured and the peer port are connected through an optical transmission network.

8. A network device for resource allocation, comprising: At least one port, the port being connected to the port of a remote device; An identification module, configured to determine that the service of at least one port is updated to a service to be enabled, and the port whose service is updated to be enabled is a port to be configured; An obtaining module, configured to obtain the service and resources of the peer port of the remote device connected to the port to be configured; A configuration module, configured to configure the port to be configured with the same resources as the peer port when the peer port has been configured, and configure resources for the port to be configured at least according to local idle resources when the peer port has not been configured; wherein, the peer port has been configured means that the service of the peer port is the service to be activated and the resources have been configured.

9. An electronic device, comprising: one or more processors; a memory storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the resource configuration method according to any one of claims 1 to 7; one or more I / O interfaces connected between the processor and the memory for implementing information interaction between the processor and the memory.

10. A computer-readable medium having stored thereon a computer program, which when executed by a processor implements the resource configuration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Port configuration method and communication equipment

    CN110233799A