CN113438173B - Routing and spectrum allocation method, device, storage medium and electronic equipment - Google Patents

Routing and spectrum allocation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113438173B
CN113438173B CN202111000041.7A CN202111000041A CN113438173B CN 113438173 B CN113438173 B CN 113438173B CN 202111000041 A CN202111000041 A CN 202111000041A CN 113438173 B CN113438173 B CN 113438173B
Authority
CN
China
Prior art keywords
frequency
frequency slot
slots
path
connection request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111000041.7A
Other languages
Chinese (zh)
Other versions
CN113438173A (en
Inventor
许柳飞
黄岳彩
薛云
胡晓晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China Normal University
Original Assignee
South China Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China Normal University filed Critical South China Normal University
Priority to CN202111000041.7A priority Critical patent/CN113438173B/en
Publication of CN113438173A publication Critical patent/CN113438173A/en
Application granted granted Critical
Publication of CN113438173B publication Critical patent/CN113438173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明涉及一种路由和频谱分配方法、装置、存储介质以及电子设备,该方法包括:获取业务连接请求,获得候选路径以及对应的所述链路,根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵,计算每条候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小,根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合,在所述可用频隙槽集合中,获得可用频隙槽的起始位置和大小,获得一维频谱状态分布向量,将业务连接请求、路径链路关系矩阵、以及频谱状态分布向量输入至训练好的路由和频谱分配模型,获得业务连接请求对应的路由和频谱分配结果,提高了频谱资源的利用率。

Figure 202111000041

The present invention relates to a routing and spectrum allocation method, device, storage medium and electronic device. The method includes: obtaining a service connection request, obtaining a candidate path and the corresponding link, according to the candidate path and the corresponding link path, establish a path link relationship matrix, calculate the number of idle frequency slots, idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots on each candidate path, according to the number of frequency slots to be occupied. and the idle frequency slot, obtain a set of available frequency slots, in the set of available frequency slots, obtain the starting position and size of the available frequency slots, obtain a one-dimensional spectrum state distribution vector, and connect the service connection request, The path link relationship matrix and the spectrum state distribution vector are input to the trained routing and spectrum allocation model, and the routing and spectrum allocation results corresponding to the service connection request are obtained, which improves the utilization rate of spectrum resources.

Figure 202111000041

Description

路由和频谱分配方法、装置、存储介质以及电子设备Routing and spectrum allocation method, apparatus, storage medium, and electronic device

技术领域technical field

本发明涉及光纤通信技术领域,特别是涉及一种路由和频谱分配方法、装置、存储介质以及电子设备。The present invention relates to the technical field of optical fiber communication, and in particular, to a routing and spectrum allocation method, device, storage medium and electronic device.

背景技术Background technique

近年来,将深度强化学习应用于光网络的路由和频谱分配方面的研究受到关注。对于机器学习问题,数据和特征决定了性能的上限,而模型和算法只接近这个上限。在基于深度强化学习的路由和频谱分配中,输入状态代表了数据的结构和特征,因此状态表示是非常关键的。In recent years, research on applying deep reinforcement learning to routing and spectrum allocation in optical networks has received much attention. For machine learning problems, the data and features determine the upper limit of performance, and models and algorithms only approach this upper limit. In deep reinforcement learning based routing and spectrum allocation, the input state represents the structure and features of the data, so the state representation is very critical.

然而,目前大多数基于深度强化学习的路由和频谱分配方法在其状态表示中没有考虑光网络中链路的频隙资源分布是否集中以及频隙资源状态是否拥堵的问题,从而导致在光网络的路由频谱分配过程中,频隙资源利用率低、网络阻塞率高。However, most of the current deep reinforcement learning-based routing and spectrum allocation methods do not consider whether the frequency slot resource distribution of the link in the optical network is concentrated and whether the frequency slot resource state is congested in their state representation, which leads to the problem of congested frequency slot resources in the optical network. In the process of routing spectrum allocation, frequency slot resource utilization is low and network blocking rate is high.

发明内容SUMMARY OF THE INVENTION

基于此,本发明的目的在于,提供一种路由和频谱分配方法、装置、介质和电子设备,其具有提高频谱资源利用率、降低网络阻塞率的优点。Based on this, the purpose of the present invention is to provide a routing and spectrum allocation method, device, medium and electronic device, which have the advantages of improving the utilization rate of spectrum resources and reducing the network blocking rate.

根据本申请实施例的第一方面,提供一种路由和频谱分配方法,包括如下步骤:According to a first aspect of the embodiments of the present application, a routing and spectrum allocation method is provided, including the following steps:

获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度;Acquiring a service connection request and the frequency slot resource status of the current optical network, where the service connection request includes a source node, a destination node and a spectrum width;

根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成;According to the service connection request and the frequency slot resource state of the current optical network, obtain multiple candidate paths between the source node and the destination node and the service connection request needs to be performed on each candidate path The number of frequency slots occupied; wherein, each of the candidate paths consists of one or more links;

根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵;establishing a path link relationship matrix according to the candidate path and the corresponding link;

根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小;Calculate the number of idle frequency slots, idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots on each candidate path according to the state of each frequency slot on the candidate path;

根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合;Obtain a set of available frequency slots according to the number of frequency slots to be occupied and the idle frequency slots;

在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小;In the set of available frequency slots, obtain the starting position and size of the available frequency slot at the frontmost position on the frequency slot axis;

将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量;Splicing the number of idle frequency slots, the number of idle frequency slots, the size of the set of available frequency slots, the starting position and size of the available frequency slots, and the average size of the idle frequency slots , obtain a one-dimensional spectral state distribution vector;

将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。The service connection request, the path link relationship matrix, and the spectrum state distribution vector are input into the trained routing and spectrum allocation model to obtain a route and spectrum allocation result corresponding to the service connection request.

根据本申请实施例的第二方面,提供一种路由和频谱分配装置,包括:According to a second aspect of the embodiments of the present application, a routing and spectrum allocation apparatus is provided, including:

请求获取模块,用于获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度;a request acquisition module, configured to acquire a service connection request and a frequency slot resource state of the current optical network, where the service connection request includes a source node, a destination node and a spectrum width;

路径获得模块,用于根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成;A path obtaining module is configured to obtain a plurality of candidate paths between the source node and the destination node and the service connection request in each path according to the service connection request and the frequency slot resource state of the current optical network. The number of frequency slots to be occupied on the candidate path; wherein, each candidate path consists of one or more links;

矩阵建立模块,用于根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵;a matrix establishment module, configured to establish a path link relationship matrix according to the candidate path and the corresponding link;

频隙计算模块,用于根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小;A frequency slot calculation module, configured to calculate the number of idle frequency slots, idle frequency slots, the number of idle frequency slots, and idle frequency slots on each candidate path according to the state of each frequency slot on the candidate path average size;

频隙槽获得模块,用于根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合;a frequency slot obtaining module, configured to obtain a set of available frequency slots according to the number of frequency slots to be occupied and the idle frequency slots;

位置获得模块,用于在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小;a position obtaining module, configured to obtain, in the set of available frequency slots, the starting position and size of the available frequency slot that is at the frontmost position on the frequency slot axis;

向量获得拼接模块,用于将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量;A vector acquisition splicing module, configured to combine the number of free frequency slots, the number of free frequency slots, the size of the set of available frequency slots, the starting position and size of the available frequency slots, and the free The average size of the frequency slot is spliced to obtain a one-dimensional spectrum state distribution vector;

结果获得模块,用于将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。A result obtaining module is used to input the service connection request, the path link relationship matrix, and the spectrum state distribution vector into the trained routing and spectrum allocation model to obtain the route and spectrum corresponding to the service connection request Assign results.

根据本申请实施例的第三方面,提供一种电子设备,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如上述任意一项所述的路由和频谱分配方法。According to a third aspect of the embodiments of the present application, an electronic device is provided, including: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute any of the above A routing and spectrum allocation method as described.

根据本申请实施例的第四方面,提供一种计算机可读存储介质,其上储存有计算机程序,该计算机程序被处理器执行时实现如上述任意一项所述的路由和频谱分配方法。According to a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the routing and spectrum allocation method described in any one of the above.

本申请实施例通过获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度,根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成,根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵,根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小,根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合,在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小,将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量,将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。本发明通过将业务连接请求、路径链路关系矩阵、以及频谱状态分布向量作为路由和频谱分配模型的输入,从而充分考虑了光网络中链路的频隙资源分布是否集中以及频隙资源状态是否拥堵的问题,进而降低了路由和频谱分配模型对路由和频谱分配的网络阻塞率,提高了频谱资源的利用率。The embodiment of the present application acquires a service connection request and the frequency slot resource status of the current optical network, where the service connection request includes a source node, a destination node and a spectrum width, according to the service connection request and the frequency slot resource of the current optical network state, to obtain multiple candidate paths between the source node and the destination node and the number of frequency slots that the service connection request needs to occupy on each candidate path; wherein, each candidate path consists of a or multiple links, according to the candidate path and the corresponding link, establish a path link relationship matrix, according to the status of each frequency slot on the candidate path, calculate the idle on each candidate path The number of frequency slots, the number of idle frequency slots, the number of idle frequency slots, and the average size of the idle frequency slots. In the set of available frequency slots, obtain the starting position and size of the available frequency slot at the frontmost position on the frequency slot axis, and calculate the number of free frequency slots, the number of free frequency slots, and the available frequency slots. The size of the slot set, the starting position and size of the available frequency slots, and the average size of the idle frequency slots are spliced to obtain a one-dimensional spectrum state distribution vector, and the service connection request, the path chain The route relationship matrix and the spectrum state distribution vector are input to the trained routing and spectrum allocation model, and the routing and spectrum allocation results corresponding to the service connection request are obtained. The present invention fully considers whether the frequency slot resource distribution of the link in the optical network is concentrated and whether the frequency slot resource state is not The problem of congestion is further reduced, and the network congestion rate of routing and spectrum allocation model for routing and spectrum allocation is reduced, and the utilization rate of spectrum resources is improved.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not limiting of the present application.

为了更好地理解和实施,下面结合附图详细说明本发明。For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings.

附图说明Description of drawings

图1为本发明路由和频谱分配方法的流程示意图;1 is a schematic flowchart of a routing and spectrum allocation method of the present invention;

图2为本发明路由和频谱分配方法中S20计算视觉显著图的流程示意图;Fig. 2 is the schematic flow chart of S20 calculating the visual saliency map in the routing and spectrum allocation method of the present invention;

图3为本发明路由和频谱分配方法中S22的流程示意图;3 is a schematic flowchart of S22 in the routing and spectrum allocation method of the present invention;

图4为本发明路由和频谱分配方法中光网络拓扑结构示意图;4 is a schematic diagram of an optical network topology in the routing and spectrum allocation method of the present invention;

图5为本发明路由和频谱分配方法中S30的流程示意图;5 is a schematic flowchart of S30 in the routing and spectrum allocation method of the present invention;

图6为本发明路由和频谱分配方法中S40的流程示意图;6 is a schematic flowchart of S40 in the routing and spectrum allocation method of the present invention;

图7为本发明路由和频谱分配方法中链路频隙状态示意图;7 is a schematic diagram of a link frequency slot state in the routing and spectrum allocation method of the present invention;

图8为本发明路由和频谱分配方法中S50的流程示意图;8 is a schematic flowchart of S50 in the routing and spectrum allocation method of the present invention;

图9为本发明路由和频谱分配方法中S80的流程示意图;9 is a schematic flowchart of S80 in the routing and spectrum allocation method of the present invention;

图10为本发明路由和频谱分配装置的结构框图;10 is a structural block diagram of a routing and spectrum allocation device of the present invention;

图11为本发明路由和频谱分配装置路径获得模块92的结构框图;11 is a structural block diagram of the path obtaining module 92 of the routing and spectrum allocation device of the present invention;

图12为本发明路由和频谱分配装置频隙数计算单元924的结构框图;12 is a structural block diagram of the frequency slot number calculation unit 924 of the routing and spectrum allocation device of the present invention;

图13为本发明路由和频谱分配装置矩阵建立模块93的结构框图;13 is a block diagram of the structure of the routing and spectrum allocation device matrix building module 93 of the present invention;

图14为本发明路由和频谱分配装置频隙计算模块94的结构框图;14 is a structural block diagram of the frequency slot calculation module 94 of the routing and spectrum allocation device of the present invention;

图15为本发明路由和频谱分配装置频隙槽获得模块95的结构框图;15 is a structural block diagram of the frequency slot obtaining module 95 of the routing and spectrum allocation device of the present invention;

图16为本发明路由和频谱分配装置结果获得模块98的结构框图。FIG. 16 is a structural block diagram of the result obtaining module 98 of the routing and spectrum allocation apparatus of the present invention.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。It should be clear that the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

在本申请实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请实施例。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。Terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. As used in the embodiments of this application and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。在本申请的描述中,需要理解的是,术语“第一”、“第二”、“第三”等仅用于区别类似的对象,而不必用于描述特定的顺序或先后次序,也不能理解为指示或暗示相对重要性。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application, as recited in the appended claims. In the description of this application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence, nor can understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.

此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A 和/或 B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。Also, in the description of the present application, unless otherwise specified, "a plurality" means two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

请参阅图1,本发明实施例提供一种路由和频谱分配方法,包括的步骤如下:Referring to FIG. 1, an embodiment of the present invention provides a routing and spectrum allocation method, including the following steps:

S10. 获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度。S10. Acquire a service connection request and the frequency slot resource status of the current optical network, where the service connection request includes a source node, a destination node and a spectrum width.

光网络是使用光纤作为主要传输介质的广域网、城域网或者新建的大范围的局域网,光纤通过节点连接,多个相邻节点连接形成光网络的链路。频隙是链路中存储和传输数据的单元,每个频隙的固定带宽是12.5Gbps,频隙资源是光网络中所有链路上可容纳的频隙数量,频谱资源状态包括频隙的占用状态和空闲状态。频隙的占用状态指业务连接过程中已被分配的频隙状态,空闲状态指业务连接过程中未被分配的频隙状态。An optical network is a wide area network, a metropolitan area network or a newly built large-scale local area network that uses optical fibers as the main transmission medium. Optical fibers are connected through nodes, and multiple adjacent nodes are connected to form links of the optical network. The frequency slot is the unit that stores and transmits data in the link. The fixed bandwidth of each frequency slot is 12.5Gbps. The frequency slot resource is the number of frequency slots that can be accommodated on all links in the optical network. The state of the spectrum resource includes the occupancy of the frequency slot. state and idle state. The occupied state of the frequency slot refers to the state of the frequency slot that has been allocated during the service connection process, and the idle state refers to the state of the frequency slot that has not been allocated during the service connection process.

业务连接请求是从光网络的一个节点向另一个节点建立光纤通信,将业务数据进行传输的请求,数据输入的节点为源节点,数据接收的节点为目的节点,数据传输的速率为频谱宽度。A service connection request is a request to establish optical fiber communication from one node of an optical network to another node to transmit service data. The data input node is the source node, the data receiving node is the destination node, and the data transmission rate is the spectrum width.

在本申请实施例中,光网络运行一段时间后,在业务连接的动态建立和拆除过程中,频隙被不断分配、释放和重利用,进而使光网络中一些频隙为占用状态,一些频隙为空闲状态,因此,在建立业务连接请求时,应该获取当前光网络的频隙资源状态。所述源节点和目的节点通过泊松过程从当前光网络中生成,所述频谱带宽被设置为25到100 之间的12.5的倍数,单位是Gbps。其中,所述泊松过程是在所述光网络拓扑结构中选择两个随机的节点,并且使得两个所述节点互斥。In the embodiment of the present application, after the optical network has been running for a period of time, during the dynamic establishment and removal of service connections, frequency slots are continuously allocated, released, and reused, so that some frequency slots in the optical network are in an occupied state, and some frequency slots are in an occupied state. The slot is in an idle state. Therefore, when establishing a service connection request, the frequency slot resource state of the current optical network should be obtained. The source and destination nodes are generated from the current optical network through a Poisson process, and the spectral bandwidth is set to a multiple of 12.5 between 25 and 100 in Gbps. Wherein, the Poisson process is to select two random nodes in the optical network topology, and make the two nodes mutually exclusive.

S20.根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成。S20. According to the service connection request and the frequency slot resource state of the current optical network, obtain multiple candidate paths between the source node and the destination node and the service connection request in each candidate path The number of frequency slots to be occupied; wherein, each candidate path consists of one or more links.

在本申请实施例中,从源节点到目的节点,中间经过多个其他节点,相邻的节点之间形成链路,多条链路组合形成路径,因此,从源节点到目的节点中存在多条路径,这些路径则作为本申请的业务连接请求的候选路径,其中,每条候选路径由一条或多条链路组成。根据具体的业务连接请求中源节点和目的节点选取位置的不同以及频谱宽度的不同,可计算所述业务连接请求在每条所述候选路径上需占用的频隙数。In this embodiment of the present application, from the source node to the destination node, there are multiple other nodes in the middle, links are formed between adjacent nodes, and multiple links are combined to form a path. Therefore, there are multiple links from the source node to the destination node. paths, these paths are used as candidate paths for the service connection request of the present application, wherein each candidate path consists of one or more links. The number of frequency slots that the service connection request needs to occupy on each of the candidate paths can be calculated according to the difference in the selection positions of the source node and the destination node and the difference in the spectrum width in the specific service connection request.

S30.根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵。S30. Establish a path link relationship matrix according to the candidate paths and the corresponding links.

所述路径链路关系矩阵用于表示在光网络拓扑结构中,每条候选路径上的多条链路之间的连接关系。The path link relationship matrix is used to represent the connection relationship between multiple links on each candidate path in the optical network topology.

S40. 根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小。S40. Calculate the number of idle frequency slots, idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots on each candidate path according to the state of each frequency slot on the candidate path.

在本申请实施例中,每个频隙的状态包括占用状态和未占用状态(空闲状态)。在频隙轴上,所述占用状态可用0表示,所述空闲状态可用1表示,将每条所述候选路径上频隙轴上为1的频隙进行累加,即可计算出每条所述候选路径上的空闲频隙数。In this embodiment of the present application, the state of each frequency slot includes an occupied state and an unoccupied state (idle state). On the frequency slot axis, the occupied state can be represented by 0, and the idle state can be represented by 1. By accumulating the frequency slots of 1 on the frequency slot axis of each candidate path, each of the The number of free frequency slots on the candidate path.

所述空闲频隙槽由一个或多个连续相邻空闲频隙组成。获取所述空闲频隙槽时,可以在频隙轴上对相邻频隙对应的状态表示通过与运算来获得。其中,与运算的计算规则为:1&1=1,1&0=0,0&0=0,当频隙为占用状态用0表示,频隙为空闲状态用1表示时,多个连续相邻频隙均为空闲状态时,这些连续相邻频隙的与运算结果为1,当下一个相邻频隙为占用状态时,与运算结果为0,则将占用状态之前的多个相邻空闲频隙作为一个空闲频隙槽,如此,计算出每条所述候选路径上的空闲频隙槽数。The idle frequency slot slot consists of one or more consecutive adjacent idle frequency slots. When acquiring the idle frequency slot, the state representation corresponding to the adjacent frequency slot on the frequency slot axis can be obtained by AND operation. Among them, the calculation rule of AND operation is: 1&1=1, 1&0=0, 0&0=0, when the frequency slot is in the occupied state, it is represented by 0, and when the frequency slot is in the idle state, it is represented by 1, and multiple consecutive adjacent frequency slots are In the idle state, the AND operation result of these consecutive adjacent frequency slots is 1. When the next adjacent frequency slot is in the occupied state, the AND operation result is 0, and the adjacent idle frequency slots before the occupied state are regarded as one idle state. frequency slots, in this way, the number of free frequency slots on each of the candidate paths is calculated.

所述空闲频隙槽的平均大小是所述空闲频隙数与所述空闲频隙槽数的比值,如果这个数值大,表示空闲频隙槽分布稀疏,链路流量分布集中,网络状态不拥堵。反之,如果这个数值小表示空闲频隙槽分布密集,链路流量分布分散,网络状态拥堵。The average size of the idle frequency slots is the ratio of the number of idle frequency slots to the number of idle frequency slots. If this value is large, it means that the distribution of idle frequency slots is sparse, the link traffic distribution is concentrated, and the network status is not congested. . On the contrary, if this value is small, it means that the idle frequency slots are densely distributed, the link traffic distribution is scattered, and the network status is congested.

S50.根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合。S50. Obtain a set of available frequency slots according to the number of frequency slots to be occupied and the idle frequency slots.

在本申请实施例中,所述空闲频隙槽可能有多个,若所述空闲频隙槽对应的空闲频隙数大于或等于所述需占用的频隙数,则所述空闲频隙槽为满足所述业务连接请求的可用频隙槽,多个所述可用频隙槽组成可用频隙槽集合。In this embodiment of the present application, there may be multiple idle frequency slots, and if the number of idle frequency slots corresponding to the idle frequency slot is greater than or equal to the number of frequency slots to be occupied, the idle frequency slot In order to satisfy the available frequency slots of the service connection request, a plurality of the available frequency slots constitute a set of available frequency slots.

S60. 在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小。S60. In the set of available frequency slots, obtain the starting position and size of the available frequency slot at the frontmost position on the frequency slot axis.

可选的,可通过First-Fit方法获取在频隙轴上位置最靠前的可用频隙槽的起始位置和大小。其中,First-Fit方法是连续物理内存分配方法的一种,将空闲内存块按照地址从小到大的方式连起来。当分配内存时,从链表头开始向后找,即从低地址向高地址查找,一旦找到可以满足要求的内存块,即将该内存块分配出去。所述起始位置和大小是满足带宽需求的可用频率槽的特征信息。Optionally, the first-fit method can be used to obtain the starting position and size of the available frequency slot slot at the frontmost position on the frequency slot axis. Among them, the First-Fit method is a kind of continuous physical memory allocation method, which connects the free memory blocks according to the address from small to large. When allocating memory, search backwards from the head of the linked list, that is, from low address to high address. Once a memory block that can meet the requirements is found, the memory block is allocated. The starting position and size are characteristic information of available frequency slots that meet bandwidth requirements.

S70. 将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量。S70. Calculate the number of idle frequency slots, the number of idle frequency slots, the size of the set of available frequency slots, the starting position and size of the available frequency slots, and the average of the idle frequency slots Size splicing to obtain a one-dimensional spectral state distribution vector.

在本申请实施例中,将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接成一维频谱状态分布向量,这6个数值对应的所述频谱状态分布向量中的6个元素,用于表示链路的频谱分布状态。In this embodiment of the present application, the number of free frequency slots, the number of free frequency slots, the size of the set of available frequency slots, the starting position and size of the available frequency slots, and the free The average size of the frequency slots is spliced into a one-dimensional spectrum state distribution vector, and the six elements in the spectrum state distribution vector corresponding to these six values are used to represent the spectrum distribution state of the link.

S80. 将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。S80. Input the service connection request, the path link relationship matrix, and the spectrum state distribution vector into the trained routing and spectrum allocation model, and obtain a routing and spectrum allocation result corresponding to the service connection request.

在将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型之前,本申请实施例还对路由和频谱分配模型进行训练。所述路由和频谱分配模型由多个并列运行的智能体组成,且所述路由和频谱分配模型基于深度强化学习的异步优势动作评价方法进行训练,其中,每个智能体接收光网络的状态表示,然后从源节点到目的节点的多条候选路径中选择一条候选路径进行路由和频谱分配,如果路由和频谱分配成功,接收奖励值为正,如果路径选择以及频谱分配不成功,接收奖励值为负。本申请实施例中,所述状态表示包括业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量。具体的,每个智能体包括策略网络和价值网络,所述策略网络接收所述状态表示,然后怎样处理,产生动作,所述动作作用于光网络,用于从光网络选择一条候选路径进行路由和频谱分配,分配完成后接收奖励值。所述价值网络对所述奖励值进行评估。若从源节点至目的节点,业务连接请求中的数据传输成功,则路由和频谱分配成功;若业务连接请求中的数据传输失败,则路由和频谱分配失败,奖励值为-1。Before inputting the service connection request, the path link relationship matrix, and the spectrum state distribution vector into the trained routing and spectrum allocation model, this embodiment of the present application further trains the routing and spectrum allocation model. The routing and spectrum allocation model is composed of multiple agents running in parallel, and the routing and spectrum allocation model is trained based on the asynchronous dominant action evaluation method of deep reinforcement learning, wherein each agent receives the state representation of the optical network. , and then select a candidate path from the multiple candidate paths from the source node to the destination node for routing and spectrum allocation. If the routing and spectrum allocation are successful, the receiving reward value is positive. If the path selection and spectrum allocation are unsuccessful, the receiving reward value is burden. In this embodiment of the present application, the state representation includes a service connection request, the path link relationship matrix, and the spectrum state distribution vector. Specifically, each agent includes a policy network and a value network. The policy network receives the state representation, and how to process it to generate an action. The action acts on the optical network and is used to select a candidate path from the optical network for routing. And spectrum allocation, receive reward value after allocation is complete. The value network evaluates the reward value. If the data transmission in the service connection request is successful from the source node to the destination node, the routing and spectrum allocation is successful; if the data transmission in the service connection request fails, the routing and spectrum allocation fails, and the reward value is -1.

对于每个智能体的策略网络

Figure DEST_PATH_IMAGE001
和价值网络
Figure 355114DEST_PATH_IMAGE002
,设置了所述策略网络的权重参数
Figure DEST_PATH_IMAGE003
和所述价值网络的权重参数
Figure 183130DEST_PATH_IMAGE004
Figure DEST_PATH_IMAGE005
是时刻t接收的光网络状态表示,
Figure 164992DEST_PATH_IMAGE006
是时刻t策略网络根据
Figure 438979DEST_PATH_IMAGE005
产生的动作,更新权重参数
Figure 23544DEST_PATH_IMAGE003
Figure 768384DEST_PATH_IMAGE004
是针对每一段时间进行的,每一段时间包括
Figure DEST_PATH_IMAGE007
个连续的动作(时间步长
Figure 186727DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE009
),权重参数由
Figure 151272DEST_PATH_IMAGE003
Figure 211632DEST_PATH_IMAGE010
Figure DEST_PATH_IMAGE011
Figure 873295DEST_PATH_IMAGE012
更新。经过一段时间的训练后,参数由下式给出的小批量(批量大小为
Figure 931381DEST_PATH_IMAGE007
)进行梯度上升或下降更新。其中,更新公式为:policy network for each agent
Figure DEST_PATH_IMAGE001
and value network
Figure 355114DEST_PATH_IMAGE002
, which sets the weight parameters of the policy network
Figure DEST_PATH_IMAGE003
and the weight parameters of the value network
Figure 183130DEST_PATH_IMAGE004
,
Figure DEST_PATH_IMAGE005
is the optical network state representation received at time t,
Figure 164992DEST_PATH_IMAGE006
is the time t policy network according to
Figure 438979DEST_PATH_IMAGE005
Generated actions that update weight parameters
Figure 23544DEST_PATH_IMAGE003
and
Figure 768384DEST_PATH_IMAGE004
is performed for each period, each period includes
Figure DEST_PATH_IMAGE007
consecutive actions (time steps
Figure 186727DEST_PATH_IMAGE008
to
Figure DEST_PATH_IMAGE009
), the weight parameter is given by
Figure 151272DEST_PATH_IMAGE003
Towards
Figure 211632DEST_PATH_IMAGE010
,
Figure DEST_PATH_IMAGE011
Towards
Figure 873295DEST_PATH_IMAGE012
renew. After a period of training, the parameters are given by the mini-batch (batch size is
Figure 931381DEST_PATH_IMAGE007
) for gradient ascent or descent updates. Among them, the update formula is:

Figure DEST_PATH_IMAGE013
Figure DEST_PATH_IMAGE013

Figure 648801DEST_PATH_IMAGE014
Figure 648801DEST_PATH_IMAGE014

其中,

Figure DEST_PATH_IMAGE015
是优势函数的估计值,由下式给出in,
Figure DEST_PATH_IMAGE015
is an estimate of the advantage function, given by

Figure 778431DEST_PATH_IMAGE016
Figure 778431DEST_PATH_IMAGE016

Figure DEST_PATH_IMAGE017
是策略分布的熵,
Figure 497863DEST_PATH_IMAGE018
控制熵正则项的强度,
Figure DEST_PATH_IMAGE019
Figure 930113DEST_PATH_IMAGE020
是学习率,
Figure 728304DEST_PATH_IMAGE021
是折扣因子。经过循环迭代训练,对所述策略网络和所述价值网络进行优化,获得路由和频谱分配模型。
Figure DEST_PATH_IMAGE017
is the entropy of the policy distribution,
Figure 497863DEST_PATH_IMAGE018
controls the strength of the entropy regularizer,
Figure DEST_PATH_IMAGE019
and
Figure 930113DEST_PATH_IMAGE020
is the learning rate,
Figure 728304DEST_PATH_IMAGE021
is the discount factor. After cyclic and iterative training, the policy network and the value network are optimized to obtain a routing and spectrum allocation model.

应用本发明实施例,通过获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度,根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成,根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵,根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小,根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合,在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小,将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量,将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。本发明通过将业务连接请求、路径链路关系矩阵、以及频谱状态分布向量作为路由和频谱分配模型的输入,从而充分考虑了光网络中链路的频隙资源分布是否集中以及频隙资源状态是否拥堵的问题,降低了路由和频谱分配模型进行路由和频谱分配的网络阻塞率,提高了频谱资源的利用率。Applying the embodiment of the present invention, by acquiring the service connection request and the frequency slot resource status of the current optical network, the service connection request includes the source node, the destination node and the spectrum width, according to the service connection request and the frequency of the current optical network. slot resource status, obtain multiple candidate paths between the source node and the destination node and the number of frequency slots that the service connection request needs to occupy on each candidate path; wherein, each candidate path It consists of one or more links. According to the candidate path and the corresponding link, a path link relationship matrix is established, and according to the state of each frequency slot on the candidate path, the The number of idle frequency slots, the number of idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots, and the set of available frequency slots is obtained according to the number of frequency slots to be occupied and the idle frequency slots, In the set of available frequency slots, obtain the starting position and size of the available frequency slot at the frontmost position on the frequency slot axis, and combine the number of idle frequency slots, the number of idle frequency slots, the The size of the set of available frequency slots, the starting position and size of the available frequency slots, and the average size of the idle frequency slots are concatenated to obtain a one-dimensional spectrum state distribution vector, and the service connection request, the The path link relationship matrix and the spectrum state distribution vector are input into the trained routing and spectrum allocation model to obtain the routing and spectrum allocation results corresponding to the service connection request. The present invention fully considers whether the frequency slot resource distribution of the link in the optical network is concentrated and whether the frequency slot resource state is not The problem of congestion reduces the network congestion rate of routing and spectrum allocation in the routing and spectrum allocation model, and improves the utilization of spectrum resources.

在一个可选的实施例中,请参阅图2,所述步骤S20,包括S21~S22,具体如下:In an optional embodiment, please refer to FIG. 2, the step S20 includes S21-S22, and the details are as follows:

S21. 根据所述业务连接请求以及所述当前光网络的频隙资源状态,通过最短路径方法计算出源节点和目的节点之间的多条候选路径;S21. According to the service connection request and the frequency slot resource state of the current optical network, calculate a plurality of candidate paths between the source node and the destination node by the shortest path method;

在本申请实施例中,通过最短路径方法计算出源节点和目的节点之间的多条候选路径,所述最短路径方法具体为Dijkstra方法,将从某节点出发,沿带权值的有向图的边到达另一节点所经过的路径中,各边上权值之和最小的一条路径叫做最短路径。In the embodiment of the present application, multiple candidate paths between the source node and the destination node are calculated by the shortest path method. The shortest path method is specifically the Dijkstra method, which starts from a certain node and follows a directed graph with weights. Among the paths taken by an edge to reach another node, the path with the smallest sum of weights on each edge is called the shortest path.

S22. 根据每条所述候选路径的距离以及所述频谱宽度,计算所述业务连接请求在每条所述候选路径上需占用的频隙数。S22. Calculate the number of frequency slots to be occupied by the service connection request on each candidate path according to the distance of each candidate path and the spectrum width.

在本申请实施例中,不同的业务连接请求由于从源节点到目的节点的距离不同,频谱宽度要求不同,计算需占用的频隙数也不同。具体地,将每条所述候选路径的距离与预设的距离区间进行比较,获得每条所述候选路径对应的距离区间。对于同一个所述距离区间,通过所述频谱宽度与频谱固定带宽的比值进行频隙数的计算。In the embodiment of the present application, due to the different distances from the source node to the destination node for different service connection requests, the spectrum width requirements are different, and the number of frequency slots to be occupied by the calculation is also different. Specifically, the distance of each candidate path is compared with a preset distance interval to obtain a distance interval corresponding to each candidate path. For the same distance interval, the number of frequency slots is calculated by the ratio of the spectrum width to the spectrum fixed bandwidth.

在一个可选的实施例中,请参阅图3,所述步骤S22,包括S221~S222,具体如下:In an optional embodiment, please refer to FIG. 3 , the step S22 includes S221-S222, and the details are as follows:

S221. 获取每条所述候选路径的所有链路,遍历每一所述链路的节点,根据预设的节点拓扑距离表,获取每一所述链路的距离,将所述距离求和,得到每条所述候选路径的距离;S221. Obtain all the links of each of the candidate paths, traverse the nodes of each of the links, obtain the distance of each of the links according to a preset node topology distance table, and sum the distances, get the distance of each of the candidate paths;

S222. 将每条所述候选路径的距离与预设的距离区间进行比较,并根据每条所述候选路径的距离所在的距离区间和所述频谱宽度,计算所述业务连接请求在每条所述候选路径上需占用的频隙数;计算所述频隙数的方式为:S222. Compare the distance of each of the candidate paths with a preset distance interval, and calculate the service connection request in each The number of frequency slots to be occupied on the candidate path; the method of calculating the number of frequency slots is:

Figure DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE022

其中,

Figure 769948DEST_PATH_IMAGE023
表示为第
Figure 704405DEST_PATH_IMAGE025
条所述候选路径的距离,
Figure DEST_PATH_IMAGE026
Figure 573135DEST_PATH_IMAGE027
为一个频隙槽的固定带宽,大小为12.5Gbps,
Figure DEST_PATH_IMAGE028
为所述频谱宽度,
Figure 999569DEST_PATH_IMAGE029
为所述业务连接请求在第
Figure 267739DEST_PATH_IMAGE031
条所述候选路径上需占用的频隙数。in,
Figure 769948DEST_PATH_IMAGE023
expressed as the
Figure 704405DEST_PATH_IMAGE025
the distance of the candidate paths,
Figure DEST_PATH_IMAGE026
,
Figure 573135DEST_PATH_IMAGE027
is the fixed bandwidth of a frequency slot, the size is 12.5Gbps,
Figure DEST_PATH_IMAGE028
is the spectral width,
Figure 999569DEST_PATH_IMAGE029
request for the service connection in the
Figure 267739DEST_PATH_IMAGE031
The number of frequency slots to be occupied on the candidate path.

在本申请实施例中,对于相同的频谱宽度,距离越远,需占用的频隙数越多,距离越近,需占用的频隙数越少。对于相同距离范围内的业务连接请求,频谱宽度越大,需占用的频隙数越多,频谱宽度越小,需占用的频隙数越少,对所述候选路径的距离进行四个距离区间的划分,根据所述距离区间和所述频谱宽度,计算所述业务连接请求在每条所述候选路径上需占用的频隙数。如图4所示,光网络中有三个节点,节点1为源节点,节点2为目的节点,节点3为中间节点,从源节点到目的节点的候选路径的总数量K为2,对应的所述链路的总数量L为6,对应序号①到⑥。对于第一条候选路径,链路①的距离为500km,频谱宽度为50Gbps,则计算得到的频隙数为2;对于第二条候选路径,链路③的距离为750km,链路⑤的距离为750km,则所述第二条候选路径为1500km,频谱宽度为50Gbps,则计算得到的频隙数为3。In this embodiment of the present application, for the same spectrum width, the farther the distance is, the more frequency slots need to be occupied, and the closer the distance is, the fewer frequency slots need to be occupied. For service connection requests within the same distance range, the larger the spectrum width, the more frequency slots to be occupied, and the smaller the spectrum width, the less the number of frequency slots to be occupied. According to the distance interval and the spectrum width, the number of frequency slots that the service connection request needs to occupy on each of the candidate paths is calculated. As shown in Figure 4, there are three nodes in the optical network, node 1 is the source node, node 2 is the destination node, node 3 is the intermediate node, the total number K of candidate paths from the source node to the destination node is 2, and the corresponding The total number L of the above-mentioned links is 6, corresponding to the sequence numbers ① to ⑥. For the first candidate path, the distance of link ① is 500km and the spectrum width is 50Gbps, then the calculated number of frequency slots is 2; for the second candidate path, the distance of link ③ is 750km, and the distance of link ⑤ is 750km. is 750km, the second candidate path is 1500km, the spectrum width is 50Gbps, and the calculated number of frequency slots is 3.

在一个可选的实施例中,请参阅图5,所述步骤S30,包括S31~S33,具体如下:In an optional embodiment, referring to FIG. 5 , the step S30 includes S31 to S33, and the details are as follows:

S31.获取所述候选路径的总数量K以及所述链路的总数量L;S31. Obtain the total number K of the candidate paths and the total number L of the links;

S32.获取所述链路在总的链路中的编号

Figure 696184DEST_PATH_IMAGE032
以及所述链路在每条所述候选路径k对应的链路编号
Figure 63712DEST_PATH_IMAGE033
,其中,
Figure 836495DEST_PATH_IMAGE034
Figure 783723DEST_PATH_IMAGE035
Figure 692773DEST_PATH_IMAGE033
表示所述候选路径k的第
Figure 434464DEST_PATH_IMAGE036
条链路;S32. Obtain the number of the link in the total link
Figure 696184DEST_PATH_IMAGE032
and the link number corresponding to each candidate path k of the link
Figure 63712DEST_PATH_IMAGE033
,in,
Figure 836495DEST_PATH_IMAGE034
,
Figure 783723DEST_PATH_IMAGE035
,
Figure 692773DEST_PATH_IMAGE033
represents the first path of the candidate path k
Figure 434464DEST_PATH_IMAGE036
link;

S33.构建大小为K×L的路径链路关系矩阵R,其中,所述路径链路关系矩阵的元素

Figure 428965DEST_PATH_IMAGE037
表示候选路径
Figure 678418DEST_PATH_IMAGE039
以及链路
Figure 379658DEST_PATH_IMAGE032
,若链路
Figure 416884DEST_PATH_IMAGE032
对应为候选路径
Figure 39627DEST_PATH_IMAGE039
中的链路
Figure 453290DEST_PATH_IMAGE040
,将所述路径链路关系矩阵的元素
Figure 212299DEST_PATH_IMAGE037
设置为
Figure 420426DEST_PATH_IMAGE036
;否则,将所述元素
Figure 763421DEST_PATH_IMAGE037
设置为0。S33. Build a path link relationship matrix R with a size of K×L, wherein the elements of the path link relationship matrix
Figure 428965DEST_PATH_IMAGE037
Indicates a candidate path
Figure 678418DEST_PATH_IMAGE039
and link
Figure 379658DEST_PATH_IMAGE032
, if the link
Figure 416884DEST_PATH_IMAGE032
corresponding to the candidate path
Figure 39627DEST_PATH_IMAGE039
link in
Figure 453290DEST_PATH_IMAGE040
, the elements of the path link relationship matrix
Figure 212299DEST_PATH_IMAGE037
Set as
Figure 420426DEST_PATH_IMAGE036
; otherwise, the element
Figure 763421DEST_PATH_IMAGE037
Set to 0.

在本申请实施例中,如图4所示,对于第一条候选路径,即链路①,链路①为所述第一条候选路径的第1条链路,对于第二条候选路径即链路③到链路⑤,所述链路③和所述链路⑤分别为所述第二条候选路径的第1条链路和第2条链路,从而构建路径链路关系矩阵R为:In the embodiment of the present application, as shown in FIG. 4 , for the first candidate path, namely link ①, link ① is the first link of the first candidate path, and for the second candidate path, namely From link ③ to link ⑤, the link ③ and the link ⑤ are the first link and the second link of the second candidate path, respectively, so that the path link relationship matrix R is constructed as :

Figure 980776DEST_PATH_IMAGE041
Figure 980776DEST_PATH_IMAGE041

在一个可选的实施例中,请参阅图6,所述步骤S40,包括S41~S42,具体如下:In an optional embodiment, referring to FIG. 6 , the step S40 includes S41-S42, and the details are as follows:

S41. 根据每个频隙在所述候选路径上每条链路中的占用状态,计算每条所述候选路径上每个频隙的综合状态;其中,如果所述频隙在所述候选路径上的一条或多条链路中被占用,则所述候选路径上所述频隙的综合状态为占用,如果所述频隙在所述候选路径上的链路中均未被占用,则所述候选路径上所述频隙的综合状态为空闲;S41. Calculate the comprehensive state of each frequency slot on each candidate path according to the occupancy status of each frequency slot in each link on the candidate path; wherein, if the frequency slot is on the candidate path is occupied in one or more links on the candidate path, the comprehensive state of the frequency slot on the candidate path is occupied, and if the frequency slot is not occupied in the links on the candidate path, the the comprehensive state of the frequency slot on the candidate path is idle;

S42. 根据所述候选路径上每个频隙的综合状态,获得每条所述候选路径上的空闲频隙数、空闲频隙槽数、以及空闲频隙槽的平均大小;其中,所述空闲频隙槽由一个或多个连续的空闲频隙组成,所述空闲频隙槽的平均大小为所述空闲频隙数与所述空闲频隙槽数的比值。S42. According to the comprehensive state of each frequency slot on the candidate path, obtain the number of idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots on each of the candidate paths; wherein, the idle The frequency slot is composed of one or more consecutive idle frequency slots, and the average size of the idle frequency slot is the ratio of the number of idle frequency slots to the number of idle frequency slots.

在本申请实施例中,请参阅图7,在第一条候选路径的链路①的频隙轴上,有6个空隙频隙(空白方块),4个占用频隙(灰色方块)。因为第一条候选路径只有链路①,所以第一条候选路径每个频隙的综合状态即为链路①上每个频隙的状态。具体地,包括3个空闲频隙槽,第1个空闲频隙槽包括2个空闲频隙,第2个空闲频隙槽包括3个空闲频隙,第3个空闲频隙槽包括1个空闲频隙,所述空闲频隙槽的平均大小为2。在第二条候选路径的链路③的频隙轴上,有6个空隙频隙,4个占用频隙;链路⑤的频隙轴上,有7个空隙频隙,3个占用频隙。由于频隙轴上标号为7、8和9的频隙,在链路③和链路⑤中被占用,因此,所述第二条候选路径上标号为0、1、2、4和5的频隙为空闲状态,其余为占用状态,空闲频隙数为5,空闲频隙槽数为2,第1个空闲频隙槽包括3个空闲频隙,第2个空闲频隙槽包括2个空闲频隙,空闲频隙槽的平均大小为2.5。In the embodiment of the present application, referring to FIG. 7 , on the frequency slot axis of the link ① of the first candidate path, there are 6 empty frequency slots (blank squares) and 4 occupied frequency slots (gray squares). Because the first candidate path has only link ①, the comprehensive state of each frequency slot of the first candidate path is the state of each frequency slot on link ①. Specifically, it includes 3 idle frequency slots, the first idle frequency slot includes 2 idle frequency slots, the second idle frequency slot includes 3 idle frequency slots, and the third idle frequency slot includes 1 idle frequency slot. frequency slot, the average size of the idle frequency slot slot is 2. On the frequency slot axis of link ③ of the second candidate path, there are 6 empty frequency slots and 4 occupied frequency slots; on the frequency slot axis of link ⑤, there are 7 empty frequency slots and 3 occupied frequency slots . Since the frequency slots labeled 7, 8 and 9 on the frequency slot axis are occupied in link ③ and link ⑤, the second candidate path labeled 0, 1, 2, 4 and 5 The frequency slot is in the idle state, and the rest are in the occupied state. The number of idle frequency slots is 5, and the number of idle frequency slots is 2. The first idle frequency slot includes 3 idle frequency slots, and the second idle frequency slot includes 2 slots. Idle frequency slot, the average size of idle frequency slot slot is 2.5.

在一个可选的实施例中,请参阅图8,所述步骤S50,包括S51~S53,具体如下:In an optional embodiment, please refer to FIG. 8 , the step S50 includes S51 to S53, and the details are as follows:

S51. 将每条所述候选路径上每个所述空闲频隙槽对应的空闲频隙数的最大值,与所述需占用的频隙数进行比较;S51. Compare the maximum value of the number of idle frequency slots corresponding to each of the idle frequency slots on each of the candidate paths with the number of frequency slots to be occupied;

S52. 如果所述空闲频隙数的最大值大于或等于所述需占用的频隙数,将所述空闲频隙槽确定为满足所述业务连接请求的可用频隙槽;S52. If the maximum value of the number of idle frequency slots is greater than or equal to the number of frequency slots to be occupied, determine the idle frequency slot as an available frequency slot that satisfies the service connection request;

S53. 根据所述可用频隙槽,获得满足所述业务连接请求的可用频隙槽集合。S53. Obtain a set of available frequency slots that satisfy the service connection request according to the available frequency slots.

在本申请实施例中,对于第一条候选路径,由于业务连接请求需占用的频隙数为2,第1个空闲频隙槽和第2个空闲频隙槽的空闲频隙数分别为2和3,因此,将所述第1个空闲频隙槽和所述第2个空闲频隙槽均确定为可用频隙槽,这两个空闲频隙槽组成可用频隙槽集合。对于第二条候选路径,由于业务连接请求需占用的频隙数为3,第1个空闲频隙槽的空闲频隙数为3,因此,将所述第1个空闲频隙槽确定为可用频隙槽。In the embodiment of the present application, for the first candidate path, since the number of frequency slots to be occupied by the service connection request is 2, the number of idle frequency slots of the first idle frequency slot and the second idle frequency slot is 2 respectively and 3, therefore, both the first idle frequency slot and the second idle frequency slot are determined as available frequency slots, and these two idle frequency slots constitute a set of available frequency slots. For the second candidate path, since the number of frequency slots to be occupied by the service connection request is 3, and the number of idle frequency slots in the first idle frequency slot is 3, the first idle frequency slot is determined as available. frequency slot.

在一个可选的实施例中,请参阅图9,所述步骤S80,包括S81~S83,具体如下:In an optional embodiment, referring to FIG. 9 , the step S80 includes S81 to S83, and the details are as follows:

S81. 将所述业务连接请求中的源节点和目的节点转换为两个一维行向量

Figure 594291DEST_PATH_IMAGE042
Figure 973319DEST_PATH_IMAGE043
,将所述路径链路关系矩阵K×L转换为一维行向量M;其中,所述一维行向量M的行维度为1,列维度为K×L;S81. Convert the source node and the destination node in the service connection request into two one-dimensional row vectors
Figure 594291DEST_PATH_IMAGE042
and
Figure 973319DEST_PATH_IMAGE043
, convert the path link relationship matrix K×L into a one-dimensional row vector M; wherein, the row dimension of the one-dimensional row vector M is 1, and the column dimension is K×L;

S82. 将所述一维行向量

Figure 305075DEST_PATH_IMAGE042
Figure 60541DEST_PATH_IMAGE043
、所述一维行向量M、以及所述频谱状态分布向量进行向量拼接,得到状态向量S;S82. Convert the one-dimensional row vector
Figure 305075DEST_PATH_IMAGE042
and
Figure 60541DEST_PATH_IMAGE043
, the one-dimensional row vector M and the spectral state distribution vector carry out vector splicing to obtain a state vector S;

S83. 将所述状态向量S输入至训练好的路由和频谱分配模型,获得路由和频谱分配结果。S83. Input the state vector S into the trained routing and spectrum allocation model to obtain routing and spectrum allocation results.

在本申请实施例中,将所述源节点和目的节点分别建模为一个一维行向量

Figure 794142DEST_PATH_IMAGE042
Figure 609651DEST_PATH_IMAGE043
,一维行向量上的每个元素代表光网络的一个节点,源节点和目的节点为1,其他节点为0。也即,
Figure 497596DEST_PATH_IMAGE044
Figure 56753DEST_PATH_IMAGE045
。将所述路径链路关系矩阵K×L转换为一维行向量
Figure 441598DEST_PATH_IMAGE046
。对于第一条候选路径,所述频谱状态分布向量
Figure 303375DEST_PATH_IMAGE047
。对于第二条候选路径,所述频谱状态分布向量
Figure 734356DEST_PATH_IMAGE048
。将所述向量
Figure 441412DEST_PATH_IMAGE042
Figure 8660DEST_PATH_IMAGE043
Figure 539873DEST_PATH_IMAGE049
Figure 864675DEST_PATH_IMAGE050
Figure 765635DEST_PATH_IMAGE051
拼接,得到状态向量S。In the embodiment of the present application, the source node and the destination node are respectively modeled as a one-dimensional row vector
Figure 794142DEST_PATH_IMAGE042
and
Figure 609651DEST_PATH_IMAGE043
, each element on the one-dimensional row vector represents a node of the optical network, the source node and the destination node are 1, and the other nodes are 0. That is,
Figure 497596DEST_PATH_IMAGE044
,
Figure 56753DEST_PATH_IMAGE045
. Convert the path link relationship matrix K×L into a one-dimensional row vector
Figure 441598DEST_PATH_IMAGE046
. For the first candidate path, the spectral state distribution vector
Figure 303375DEST_PATH_IMAGE047
. For the second candidate path, the spectral state distribution vector
Figure 734356DEST_PATH_IMAGE048
. the vector
Figure 441412DEST_PATH_IMAGE042
,
Figure 8660DEST_PATH_IMAGE043
,
Figure 539873DEST_PATH_IMAGE049
,
Figure 864675DEST_PATH_IMAGE050
and
Figure 765635DEST_PATH_IMAGE051
Splicing to get the state vector S.

相应于上述方法实施例,请参阅图10,本发明实施例提供一种基于深度强化学习的路由和频谱分配装置9,包括:Corresponding to the above method embodiments, please refer to FIG. 10 , an embodiment of the present invention provides a routing and spectrum allocation device 9 based on deep reinforcement learning, including:

请求获取模块91,用于获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度;a request obtaining module 91, configured to obtain a service connection request and the frequency slot resource state of the current optical network, where the service connection request includes a source node, a destination node and a spectrum width;

路径获得模块92,用于根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成;The path obtaining module 92 is configured to obtain, according to the service connection request and the frequency slot resource state of the current optical network, a plurality of candidate paths between the source node and the destination node and the service connection request at each time. The number of frequency slots to be occupied on the candidate paths; wherein, each candidate path consists of one or more links;

矩阵建立模块93,用于根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵;a matrix establishment module 93, configured to establish a path link relationship matrix according to the candidate path and the corresponding link;

频隙计算模块94,用于根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小;A frequency slot calculation module 94, configured to calculate the number of idle frequency slots, idle frequency slots, idle frequency slots, and idle frequency slots on each candidate path according to the state of each frequency slot on the candidate path the average size of the slot;

频隙槽获得模块95,用于根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合;a frequency slot obtaining module 95, configured to obtain a set of available frequency slots according to the number of frequency slots to be occupied and the idle frequency slots;

位置获得模块96,用于在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小;a position obtaining module 96, configured to obtain, in the set of available frequency slots, the starting position and size of the available frequency slot that is at the frontmost position on the frequency slot axis;

向量获得模块97,用于将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量;A vector obtaining module 97, configured to obtain the number of free frequency slots, the number of free frequency slots, the size of the set of available frequency slots, the starting position and size of the available frequency slots, and the free The average size of the frequency slot is spliced to obtain a one-dimensional spectrum state distribution vector;

结果获得模块98,用于将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。The result obtaining module 98 is configured to input the service connection request, the path link relationship matrix, and the spectrum state distribution vector into the trained routing and spectrum allocation model, and obtain the route and the corresponding service connection request. Spectrum allocation results.

可选的,请参阅图11,所述路径获得模块92,包括:Optionally, please refer to FIG. 11 , the path obtaining module 92 includes:

路径计算单元922,用于根据所述业务连接请求以及所述当前光网络的频隙资源状态,通过最短路径方法计算出源节点和目的节点之间的多条候选路径;A path calculation unit 922, configured to calculate a plurality of candidate paths between the source node and the destination node by the shortest path method according to the service connection request and the frequency slot resource state of the current optical network;

频隙数计算单元924,用于根据每条所述候选路径的距离以及所述频谱宽度,计算所述业务连接请求在每条所述候选路径上需占用的频隙数。The frequency slot number calculation unit 924 is configured to calculate, according to the distance of each candidate path and the spectrum width, the number of frequency slots to be occupied by the service connection request on each candidate path.

可选的,请参阅图12,所述频隙数计算单元924,包括:Optionally, please refer to FIG. 12 , the frequency slot number calculation unit 924 includes:

链路获取单元926,用于获取每条所述候选路径的所有链路,遍历每一所述链路的节点,根据预设的节点拓扑距离表,获取每一所述链路的距离,将所述距离求和,得到每条所述候选路径的距离;The link obtaining unit 926 is configured to obtain all the links of each of the candidate paths, traverse the nodes of each of the links, obtain the distance of each of the links according to the preset node topology distance table, and set the The distances are summed to obtain the distance of each of the candidate paths;

距离划分单元928,用于将每条所述候选路径的距离划分为预设数量的距离区间,根据所述距离区间和所述频谱宽度,计算所述业务连接请求在每条所述候选路径上需占用的频隙数。A distance dividing unit 928, configured to divide the distance of each candidate path into a preset number of distance intervals, and calculate the service connection request on each candidate path according to the distance interval and the spectrum width The number of frequency slots to be occupied.

可选的,请参阅图13,所述矩阵建立模块93,包括:Optionally, please refer to FIG. 13, the matrix establishment module 93 includes:

数量获取单元932,用于获取所述候选路径的总数量K以及所述链路的总数量L;a quantity obtaining unit 932, configured to obtain the total quantity K of the candidate paths and the total quantity L of the links;

编号获取单元934,用于获取所述链路在总的链路中的编号

Figure 62756DEST_PATH_IMAGE032
以及所述链路在每条所述候选路径k对应的链路编号
Figure 390969DEST_PATH_IMAGE033
,其中,
Figure 406329DEST_PATH_IMAGE034
Figure 845401DEST_PATH_IMAGE035
Figure 761142DEST_PATH_IMAGE033
表示所述候选路径k的第
Figure 260256DEST_PATH_IMAGE036
条链路;A number acquiring unit 934, configured to acquire the number of the link in the total link
Figure 62756DEST_PATH_IMAGE032
and the link number corresponding to each candidate path k of the link
Figure 390969DEST_PATH_IMAGE033
,in,
Figure 406329DEST_PATH_IMAGE034
,
Figure 845401DEST_PATH_IMAGE035
,
Figure 761142DEST_PATH_IMAGE033
represents the first path of the candidate path k
Figure 260256DEST_PATH_IMAGE036
link;

矩阵构建单元936,用于构建大小为K×L的路径链路关系矩阵R,其中,所述路径链路关系矩阵的元素

Figure 559651DEST_PATH_IMAGE037
表示候选路径
Figure 677779DEST_PATH_IMAGE039
以及链路
Figure 542967DEST_PATH_IMAGE032
,若链路
Figure 885087DEST_PATH_IMAGE032
对应为候选路径
Figure 468515DEST_PATH_IMAGE039
中的链路
Figure 888870DEST_PATH_IMAGE040
,将所述路径链路关系矩阵的元素
Figure 405302DEST_PATH_IMAGE037
设置为
Figure 121585DEST_PATH_IMAGE036
;否则,将所述元素
Figure 457888DEST_PATH_IMAGE037
设置为0。A matrix construction unit 936, configured to construct a path link relationship matrix R with a size of K×L, wherein the elements of the path link relationship matrix
Figure 559651DEST_PATH_IMAGE037
Indicates a candidate path
Figure 677779DEST_PATH_IMAGE039
and link
Figure 542967DEST_PATH_IMAGE032
, if the link
Figure 885087DEST_PATH_IMAGE032
corresponding to the candidate path
Figure 468515DEST_PATH_IMAGE039
link in
Figure 888870DEST_PATH_IMAGE040
, the elements of the path link relationship matrix
Figure 405302DEST_PATH_IMAGE037
Set as
Figure 121585DEST_PATH_IMAGE036
; otherwise, the element
Figure 457888DEST_PATH_IMAGE037
Set to 0.

可选的,请参阅图14,所述频隙计算模块94,包括:Optionally, please refer to FIG. 14 , the frequency slot calculation module 94 includes:

状态计算单元942,用于根据每个频隙在所述候选路径上每条链路中的占用状态,计算每条所述候选路径上每个频隙的综合状态;其中,如果所述频隙在所述候选路径上的一条或多条链路中被占用,则所述候选路径上所述频隙的综合状态为占用,如果所述频隙在所述候选路径上的链路中均未被占用,则所述候选路径上所述频隙的综合状态为空闲;The state calculation unit 942 is configured to calculate the comprehensive state of each frequency slot on each candidate path according to the occupancy state of each frequency slot in each link on the candidate path; wherein, if the frequency slot If one or more links on the candidate path are occupied, the comprehensive state of the frequency slot on the candidate path is occupied, if the frequency slot is not used in any link on the candidate path is occupied, the comprehensive state of the frequency slot on the candidate path is idle;

空闲频隙获得单元944,用于根据所述候选路径上每个频隙的综合状态,获得每条所述候选路径上的空闲频隙数、空闲频隙槽数、以及空闲频隙槽的平均大小;其中,所述空闲频隙槽由一个或多个连续的空闲频隙组成,所述空闲频隙槽的平均大小为所述空闲频隙数与所述空闲频隙槽数的比值。The idle frequency slot obtaining unit 944 is configured to obtain the number of idle frequency slots, the number of idle frequency slots, and the average of idle frequency slots on each candidate path according to the comprehensive state of each frequency slot on the candidate path size; wherein, the idle frequency slot is composed of one or more consecutive idle frequency slots, and the average size of the idle frequency slot is the ratio of the number of idle frequency slots to the number of idle frequency slots.

可选的,请参阅图15,所述频隙槽获得模块95,包括:Optionally, please refer to FIG. 15 , the frequency slot obtaining module 95 includes:

频隙数比较单元952,用于将每条所述候选路径上每个所述空闲频隙槽对应的空闲频隙数的最大值,与所述需占用的频隙数进行比较;A frequency slot number comparison unit 952, configured to compare the maximum value of the number of idle frequency slots corresponding to each of the idle frequency slots on each of the candidate paths with the number of frequency slots to be occupied;

频隙槽确定单元954,用于如果所述空闲频隙数的最大值大于或等于所述需占用的频隙数,将所述空闲频隙槽确定为满足所述业务连接请求的可用频隙槽;A frequency slot determination unit 954, configured to determine the idle frequency slot as an available frequency slot satisfying the service connection request if the maximum value of the number of idle frequency slots is greater than or equal to the number of frequency slots to be occupied groove;

频隙槽集合获得单元956,用于根据所述可用频隙槽,获得满足所述业务连接请求的可用频隙槽集合。The frequency slot set obtaining unit 956 is configured to obtain, according to the available frequency slots, a set of available frequency slots that satisfy the service connection request.

可选的,请参阅图16,所述结果获得模块98,包括:Optionally, please refer to FIG. 16, the result obtaining module 98 includes:

向量转换单元982,用于将所述业务连接请求中的源节点和目的节点转换为两个一维行向量

Figure 917820DEST_PATH_IMAGE042
Figure 554337DEST_PATH_IMAGE043
,将所述路径链路关系矩阵K×L转换为一维行向量M;其中,所述一维行向量M的行维度为1,列维度为K×L;A vector conversion unit 982, configured to convert the source node and the destination node in the service connection request into two one-dimensional row vectors
Figure 917820DEST_PATH_IMAGE042
and
Figure 554337DEST_PATH_IMAGE043
, convert the path link relationship matrix K×L into a one-dimensional row vector M; wherein, the row dimension of the one-dimensional row vector M is 1, and the column dimension is K×L;

向量拼接单元984,用于将所述一维行向量

Figure 441522DEST_PATH_IMAGE042
Figure 265122DEST_PATH_IMAGE043
、所述一维行向量M、以及所述频谱状态分布向量进行向量拼接,得到状态向量S;The vector splicing unit 984 is used to combine the one-dimensional row vector
Figure 441522DEST_PATH_IMAGE042
and
Figure 265122DEST_PATH_IMAGE043
, the one-dimensional row vector M and the spectral state distribution vector carry out vector splicing to obtain a state vector S;

状态输入单元986,用于将所述状态向量S输入至训练好的路由和频谱分配模型,获得路由和频谱分配结果。The state input unit 986 is configured to input the state vector S into the trained routing and spectrum allocation model to obtain the routing and spectrum allocation results.

应用本发明实施例,通过获取业务连接请求以及当前光网络的频隙资源状态,所述业务连接请求包括源节点、目的节点和频谱宽度,根据所述业务连接请求以及所述当前光网络的频隙资源状态,获得所述源节点和所述目的节点之间的多条候选路径以及所述业务连接请求在每条所述候选路径上需占用的频隙数;其中,每条所述候选路径由一条或多条链路组成,根据所述候选路径以及对应的所述链路,建立路径链路关系矩阵,根据所述候选路径上每个频隙的状态,计算每条所述候选路径上的空闲频隙数、空闲频隙槽、空闲频隙槽数、以及空闲频隙槽的平均大小,根据所述需占用的频隙数和所述空闲频隙槽,获得可用频隙槽集合,在所述可用频隙槽集合中,获得在频隙轴上位置最靠前的可用频隙槽的起始位置和大小,将所述空闲频隙数、所述空闲频隙槽数、所述可用频隙槽集合的大小、所述可用频隙槽的起始位置和大小、以及所述空闲频隙槽的平均大小拼接,获得一维频谱状态分布向量,将所述业务连接请求、所述路径链路关系矩阵、以及所述频谱状态分布向量输入至训练好的路由和频谱分配模型,获得所述业务连接请求对应的路由和频谱分配结果。本发明通过将业务连接请求、路径链路关系矩阵、以及频谱状态分布向量作为路由和频谱分配模型的输入,从而充分考虑了光网络中链路的频隙资源分布是否集中以及频隙资源状态是否拥堵,降低了路由和频谱分配模型进行路由和频谱分配的网络阻塞率,提高了频谱资源的利用率。Applying the embodiment of the present invention, by acquiring the service connection request and the frequency slot resource status of the current optical network, the service connection request includes the source node, the destination node and the spectrum width, according to the service connection request and the frequency of the current optical network. slot resource status, obtain multiple candidate paths between the source node and the destination node and the number of frequency slots that the service connection request needs to occupy on each candidate path; wherein, each candidate path It consists of one or more links. According to the candidate path and the corresponding link, a path link relationship matrix is established, and according to the state of each frequency slot on the candidate path, the The number of idle frequency slots, the number of idle frequency slots, the number of idle frequency slots, and the average size of idle frequency slots, and the set of available frequency slots is obtained according to the number of frequency slots to be occupied and the idle frequency slots, In the set of available frequency slots, obtain the starting position and size of the available frequency slot at the frontmost position on the frequency slot axis, and combine the number of idle frequency slots, the number of idle frequency slots, the The size of the set of available frequency slots, the starting position and size of the available frequency slots, and the average size of the idle frequency slots are concatenated to obtain a one-dimensional spectrum state distribution vector, and the service connection request, the The path link relationship matrix and the spectrum state distribution vector are input into the trained routing and spectrum allocation model to obtain the routing and spectrum allocation results corresponding to the service connection request. The present invention fully considers whether the frequency slot resource distribution of the link in the optical network is concentrated and whether the frequency slot resource state is not Congestion reduces the network congestion rate of routing and spectrum allocation model for routing and spectrum allocation, and improves the utilization rate of spectrum resources.

本申请还提供一种电子设备,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述实施例的方法步骤。The present application also provides an electronic device, comprising: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the method steps of the above embodiments.

本申请还提供一种计算机可读存储介质,其上储存有计算机程序,该计算机程序被处理器执行时实现上述实施例的方法步骤。The present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method steps of the foregoing embodiments.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,则本发明也意图包含这些改动和变形。The above-mentioned embodiments only represent several embodiments of the present invention, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that, for those skilled in the art, some modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.

Claims (10)

1. A method of routing and spectrum allocation, comprising:
acquiring a service connection request and a frequency slot resource state of a current optical network, wherein the service connection request comprises a source node, a destination node and a spectrum width;
acquiring a plurality of candidate paths between the source node and the destination node and the number of frequency slots required to be occupied by the service connection request on each candidate path according to the service connection request and the frequency slot resource state of the current optical network; wherein each of the candidate paths consists of one or more links;
establishing a path link relation matrix according to the candidate paths and the corresponding links;
according to the state of each frequency slot on the candidate paths, calculating the number of idle frequency slots, the number of idle frequency slots and the average size of the idle frequency slots on each candidate path;
obtaining an available frequency slot set according to the frequency slot number to be occupied and the idle frequency slot;
obtaining the initial position and the size of the available frequency slot which is positioned most front on the frequency slot axis in the available frequency slot set;
splicing the number of the idle frequency slots, the number of the idle frequency slot slots, the size of the available frequency slot set, the initial position and the size of the available frequency slot and the average size of the idle frequency slot to obtain a one-dimensional spectrum state distribution vector;
and inputting the service connection request, the path link relation matrix and the spectrum state distribution vector into a trained routing and spectrum allocation model to obtain a routing and spectrum allocation result corresponding to the service connection request.
2. The method according to claim 1, wherein the obtaining a plurality of candidate paths between the source node and the destination node and the number of frequency slots that the service connection request needs to occupy on each of the candidate paths according to the service connection request and the frequency slot resource status of the current optical network comprises:
calculating a plurality of candidate paths between a source node and a destination node by a shortest path method according to the service connection request and the frequency slot resource state of the current optical network;
and calculating the frequency slot number of the service connection request on each candidate path according to the distance of each candidate path and the spectrum width.
3. The method according to claim 2, wherein the calculating the number of frequency slots required to be occupied by the service connection request on each of the candidate paths according to the distance of each of the candidate paths and the spectrum width comprises:
acquiring all links of each candidate path, traversing nodes of each link, acquiring the distance of each link according to a preset node topology distance table, and summing the distances to obtain the distance of each candidate path;
comparing the distance of each candidate path with a preset distance interval, and calculating the frequency slot number of the service connection request on each candidate path according to the distance interval of the distance of each candidate path and the frequency spectrum width; the frequency slot number is calculated in the following way:
Figure 419269DEST_PATH_IMAGE001
wherein,
Figure 798297DEST_PATH_IMAGE002
is shown as
Figure 130053DEST_PATH_IMAGE004
The distance of the candidate path is determined,
Figure 619940DEST_PATH_IMAGE005
k represents a total number of the plurality of candidate paths,
Figure 619120DEST_PATH_IMAGE006
is a fixed bandwidth of one slot, with a size of 12.5Gbps,
Figure 434629DEST_PATH_IMAGE007
for the said width of the frequency spectrum,
Figure 988101DEST_PATH_IMAGE008
requesting for said service connection at
Figure 281679DEST_PATH_IMAGE010
And the number of frequency slots required to be occupied on the candidate path.
4. The method of claim 1, wherein said constructing a path-link relationship matrix from said candidate paths and corresponding said links comprises:
acquiring the total number K of the candidate paths and the total number L of the links;
obtaining the number of the link in the total link
Figure 368322DEST_PATH_IMAGE011
And the link number corresponding to each candidate path k of the link
Figure 354732DEST_PATH_IMAGE012
Wherein
Figure 926659DEST_PATH_IMAGE013
Figure 23928DEST_PATH_IMAGE014
Figure 466542DEST_PATH_IMAGE012
represents the candidate path k
Figure 623854DEST_PATH_IMAGE015
A link;
constructing a path link relation matrix R with the size of KxL, wherein elements of the path link relation matrix
Figure 417497DEST_PATH_IMAGE016
Representing candidate paths
Figure 52878DEST_PATH_IMAGE018
And a link
Figure 114113DEST_PATH_IMAGE019
If the link is
Figure 442326DEST_PATH_IMAGE019
Corresponds to a candidate path
Figure 457686DEST_PATH_IMAGE018
In (1)
Figure 162337DEST_PATH_IMAGE020
Elements of the path-link relation matrix
Figure 579543DEST_PATH_IMAGE016
Is arranged as
Figure 78658DEST_PATH_IMAGE015
(ii) a Otherwise, the element is processed
Figure 581314DEST_PATH_IMAGE016
Is set to 0.
5. The method according to claim 1, wherein said calculating the number of free frequency slots, the average size of free frequency slots, and the average size of free frequency slots on each of the candidate paths according to the state of each frequency slot on the candidate paths comprises:
calculating the comprehensive state of each frequency slot on each candidate path according to the occupation state of each frequency slot in each link on the candidate path; wherein if the frequency slot is occupied in one or more links on the candidate path, the integrated state of the frequency slot on the candidate path is occupied, and if the frequency slot is not occupied in all links on the candidate path, the integrated state of the frequency slot on the candidate path is idle;
acquiring the number of idle frequency slots, the number of idle frequency slot slots and the average size of the idle frequency slot slots on each candidate path according to the comprehensive state of each frequency slot on the candidate path; the idle frequency slot is composed of one or more continuous idle frequency slots, and the average size of the idle frequency slot is the ratio of the number of the idle frequency slots to the number of the idle frequency slots.
6. The method according to claim 1, wherein said obtaining a set of available frequency slot slots according to the number of frequency slots to be occupied and the idle frequency slot slots comprises:
comparing the maximum value of the number of idle frequency slots corresponding to each idle frequency slot on each candidate path with the number of frequency slots to be occupied;
if the maximum value of the idle frequency slot number is larger than or equal to the frequency slot number to be occupied, determining the idle frequency slot as an available frequency slot meeting the service connection request;
and obtaining an available frequency slot set meeting the service connection request according to the available frequency slot.
7. The method according to claim 1, wherein the inputting the service connection request, the path link relation matrix, and the spectrum state distribution vector into a trained routing and spectrum allocation model to obtain a routing and spectrum allocation result corresponding to the service connection request comprises:
converting the source node and the destination node in the service connection request into two one-dimensional row vectors
Figure 558498DEST_PATH_IMAGE021
And
Figure 594325DEST_PATH_IMAGE022
converting the path link relation matrix into a one-dimensional row vector M; the one-dimensional row vector M has a row dimension of 1 and a column dimension of K × L; k is the total number of the candidate paths, and L is the total number of the links;
the one-dimensional row vector is processed
Figure 264340DEST_PATH_IMAGE021
And
Figure 254293DEST_PATH_IMAGE022
vector splicing is carried out on the one-dimensional row vector M and the frequency spectrum state distribution vector to obtain a state vector S;
and inputting the state vector S into a trained routing and spectrum allocation model to obtain a routing and spectrum allocation result.
8. A routing and spectrum allocation apparatus, comprising:
the request acquisition module is used for acquiring a service connection request and the frequency slot resource state of the current optical network, wherein the service connection request comprises a source node, a destination node and a spectrum width;
a path obtaining module, configured to obtain, according to the service connection request and a frequency slot resource state of the current optical network, multiple candidate paths between the source node and the destination node and a number of frequency slots that the service connection request needs to occupy on each candidate path; wherein each of the candidate paths consists of one or more links;
a matrix establishing module, configured to establish a path link relationship matrix according to the candidate path and the corresponding link;
the frequency slot calculation module is used for calculating the number of idle frequency slots, the average size of the idle frequency slots and the average size of the idle frequency slots on each candidate path according to the state of each frequency slot on each candidate path;
a frequency slot obtaining module, configured to obtain an available frequency slot set according to the number of frequency slots to be occupied and the idle frequency slots;
a position obtaining module, configured to obtain, in the available frequency slot set, a starting position and a size of an available frequency slot that is located most forward on a frequency slot axis;
a vector obtaining module, configured to splice the number of idle frequency slots, the size of the available frequency slot set, the initial position and size of the available frequency slot, and the average size of the idle frequency slots to obtain a one-dimensional spectrum state distribution vector;
and the result obtaining module is used for inputting the service connection request, the path link relation matrix and the spectrum state distribution vector into a trained routing and spectrum allocation model to obtain a routing and spectrum allocation result corresponding to the service connection request.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the routing and spectrum allocation method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the routing and spectrum allocation method according to any one of claims 1 to 7.
CN202111000041.7A 2021-08-30 2021-08-30 Routing and spectrum allocation method, device, storage medium and electronic equipment Active CN113438173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111000041.7A CN113438173B (en) 2021-08-30 2021-08-30 Routing and spectrum allocation method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111000041.7A CN113438173B (en) 2021-08-30 2021-08-30 Routing and spectrum allocation method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113438173A CN113438173A (en) 2021-09-24
CN113438173B true CN113438173B (en) 2021-11-23

Family

ID=77798280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111000041.7A Active CN113438173B (en) 2021-08-30 2021-08-30 Routing and spectrum allocation method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113438173B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584871B (en) * 2022-04-28 2022-08-05 华南师范大学 Spectrum allocation method, device, storage medium and device for elastic optical network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836736A (en) * 2015-05-26 2015-08-12 重庆邮电大学 Spectrum sensing-based energy efficiency resource allocation and path reconfiguration method in elastic optical network
CN108134967A (en) * 2017-11-27 2018-06-08 全球能源互联网研究院有限公司 A kind of electric power optical-fiber network routing frequency spectrum distributing method and system
CN112383846A (en) * 2020-11-13 2021-02-19 国网河南省电力公司信息通信公司 Cloud-fog elastic optical network-oriented spectrum resource allocation method for advance reservation request
CN112911429A (en) * 2021-02-04 2021-06-04 烽火通信科技股份有限公司 Routing frequency spectrum allocation method and device based on dynamic elastic optical network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103748817B (en) * 2011-08-23 2017-05-03 瑞典爱立信有限公司 Routing and bandwidth assignment for flexible grid wavelength switched optical networks
US9252912B2 (en) * 2012-04-09 2016-02-02 Telefonaktiebolaget L M Ericsson (Publ) Method for routing and spectrum assignment
CN111865800B (en) * 2020-07-07 2021-11-30 烽火通信科技股份有限公司 Routing frequency spectrum allocation method and device suitable for elastic optical network
CN112995805B (en) * 2021-02-04 2022-08-26 南京邮电大学 Routing and spectrum allocation method based on path idleness in EON

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836736A (en) * 2015-05-26 2015-08-12 重庆邮电大学 Spectrum sensing-based energy efficiency resource allocation and path reconfiguration method in elastic optical network
CN108134967A (en) * 2017-11-27 2018-06-08 全球能源互联网研究院有限公司 A kind of electric power optical-fiber network routing frequency spectrum distributing method and system
CN112383846A (en) * 2020-11-13 2021-02-19 国网河南省电力公司信息通信公司 Cloud-fog elastic optical network-oriented spectrum resource allocation method for advance reservation request
CN112911429A (en) * 2021-02-04 2021-06-04 烽火通信科技股份有限公司 Routing frequency spectrum allocation method and device based on dynamic elastic optical network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于频谱候选窗的弹性光网络频谱分配方案;刘晓玲 等;《光通信技术》;20181130(第11期);全文 *

Also Published As

Publication number Publication date
CN113438173A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN110618870B (en) Working method and device for deep learning training task
CN113784373B (en) Joint optimization method and system for time delay and spectrum occupancy in cloud-edge collaborative network
CN109639575B (en) Routing planning method based on link congestion coefficient
CN111641891B (en) Task peer-to-peer unloading method and device in multi-access edge computing system
CN105827528B (en) A kind of route selection method suitable for the flexible optical-fiber network of frequency spectrum
CN111385202A (en) Route distribution method based on virtual network function
TWI426383B (en) Estimation method to evaluate a system reliability of a cloud computing network
CN110996196B (en) Optimal route optimizing method for optical transmission network optical path fiber core utilization
CN115767325B (en) Service function chain profit maximization mapping method and system
CN102769806B (en) Resource assignment method and device of optical transmission net
JP2017500816A (en) Traffic engineering for large data center networks
CN113015040A (en) Resource allocation method based on fragment and domain matching degree in multi-core elastic optical network
JP2019514309A (en) System and method for communication network service connectivity
CN113438173B (en) Routing and spectrum allocation method, device, storage medium and electronic equipment
CN111800352B (en) Service function chain deployment method and storage medium based on load balancing
CN105472484A (en) Wave channel balancing route wavelength allocation method of power backbone optical transport network
CN103179035A (en) A network fixed path selection method, device and optical transmission network
CN109450587B (en) Spectrum integration processing method, device and storage medium
CN112995805A (en) Routing and spectrum allocation method based on path idleness in EON
CN111049588A (en) Quantum business deployment method and device based on quantum key pool state
CN115314775A (en) Intelligent light path scheduling method and device, electronic equipment and storage medium
CN114915595A (en) Burst packet matching method and electronic equipment
CN104518909B (en) The planning of optics connection in WDM optic networks
JPH09251302A (en) Network resource distribution method and apparatus
CN115209249B (en) Virtual network collaborative mapping method based on optical path adjacent link fragment awareness

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant