Unified cost calculation method and device based on Astar way finding
By introducing relay cost attenuation and discrete normal distribution description wavelength distribution in the Astar pathfinding algorithm, the unified cost is calculated, and the problems of slow WSON calculation speed, non-smooth wave change and inaccurate relay estimate cost are solved, and efficient calculation and wave change strategy are realized.
Patent Information
- Application Number
- CN202510259095.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-27
AI Technical Summary
The existing WSON calculation speed is slow. As the business scale increases, the calculation time increases nonlinearly, and the wave change is not smooth enough, and the relay estimate cost is not accurate enough, which affects the acceleration effect of the A* algorithm.
The unified cost calculation method based on Astar pathfinding is adopted to describe the wavelength distribution and adjacent wave-changing wave scenes through relay cost attenuation and discrete normal distribution, and calculate the minimum relay cost and the passing path cost to obtain the unified cost.
Under large business volume, the calculation speed is ensured, the wave change is smooth, the relay estimate cost is more accurate, and the calculation efficiency is significantly improved.
Smart Images

Figure CN120223179A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of optical communication technology, and in particular to a unified cost calculation method and device based on Astar pathfinding. Background Art
[0002] ASON (Automatically Switched Optical Network) is an intelligent optical network architecture that aims to achieve efficient utilization and dynamic management of optical network resources through automation and intelligent technology. Its core technologies are mainly the following two points: 1. Automated management: ASON can automatically establish, dismantle and restore optical paths. Through automatic switching technology, network resources can be dynamically adjusted to adapt to changing needs, providing higher flexibility and efficiency. 2. Intelligent control: ASON uses intelligent control technology, such as distributed control, centralized control or hybrid control, to achieve intelligent management of the network. The control plane and the transmission plane are separated. The control plane is responsible for signaling and routing, while the transmission plane is responsible for data transmission.
[0003] WSON (Wavelength Switched Optical Network) is an ASON based on WDM transmission network and is an intelligent wavelength division standard advocated by the IETF standards organization.
[0004] A* (A-star) algorithm is a heuristic algorithm for graph search and path finding, widely used in computer science and artificial intelligence. A* algorithm is based on Dijkstra algorithm and greedy best-first search, which can improve search efficiency while ensuring the shortest path is found.
[0005] With existing technologies, WSON has a slow path calculation speed for large batches. As the scale of services increases, the path calculation time increases nonlinearly. This problem will be an important obstacle to the evolution of leveling technology to large services, so it must be solved. The time complexity of the commonly used Dijkstra algorithm is O(VE), and even if the time complexity is optimized with Heap, there will be no significant improvement. The wave change is not smooth enough, and a more statistical model is needed to characterize the possibility of wavelength distribution. If the adjacent wave changes, the original strategy will cause the spectrum to be too concentrated. From a reasonable perspective, the wave should be changed to the expected wave as much as possible. If the corresponding resources are not idle, the wave should be changed to the surrounding bands as much as possible. The relay cost is not dynamic, and the impact of occupancy on the cost cannot be well characterized, which will affect the acceleration of A*.
[0006] In summary, there is an urgent need for a technical solution that guarantees the speed of path calculation, smooths wave changes, and makes relay cost estimation more accurate. Summary of the invention
[0007] In view of the above problems, the present disclosure provides a unified cost calculation method and device based on Astar pathfinding.
[0008] In a first aspect, a unified cost calculation method based on Astar pathfinding, the method includes:
[0009] Based on Astar heuristic search, using relay cost attenuation, obtain the minimum relay cost h;
[0010] Use discrete normal distribution to describe the wavelength distribution and adjacent wave change scenarios, and obtain the path cost g;
[0011] According to the minimum relay cost h and the path cost g, obtain the unified cost.
[0012] Further, the minimum relay cost h, the calculation formula is as follows:
[0013]
[0014] C free_reg = 10e 7 ;
[0015] Wherein, is the a-th relay cost in the predicted path h, C free_reg is the cost when the relay is not used; C reg is the cost after being used z times; z is the relay usage times; a is the a-th relay in the path; m is the total number of relays on the predicted path h; is used to represent relay cost attenuation, The value of decreases as the number of times z increases.
[0016] Further, the path cost g, the calculation formula is as follows:
[0017]
[0018] C i = w * (1 - P(X = x i ));
[0019]
[0020] w = 10 4 ;
[0021] Wherein, i refers to the i-th optical channel segment, q is the total number of optical channels that have been calculated, C i is the wavelength cost, d i is the distance cost of the i-th och segment, w is the fixed wavelength weight, P is the probability that the random variable X takes a certain x i value, x iFor the wave to be configured, μ is the mean of X, σ is the standard deviation of X, j is the j-th wave, and n is the total number of wavelengths in the system.
[0022] Further, based on the minimum relay cost h and the cost g of the traversed path, a unified cost f is obtained, including:
[0023] f = g + h.
[0024] Further, based on the minimum relay cost h and the cost g of the traversed path, a unified cost f is obtained, including:
[0025]
[0026] Among them, i refers to the i-th optical channel segment, q is the total number of optical channels that have been calculated, C i is the wavelength cost, d i is the distance cost of the i-th och segment, w is the fixed wavelength weight, P is the probability that the random variable X takes a certain x i , x i is the wave to be configured, a is the relay of the entire path; m is the total number of relays, is the a-th relay cost in the predicted path h.
[0027] In a second aspect, a unified cost calculation device based on Astar pathfinding includes: a minimum relay cost calculation unit, a traversed path cost calculation unit, and a unified cost calculation unit;
[0028] The minimum relay cost calculation unit is used to obtain the minimum relay cost h based on Astar heuristic search and using relay cost attenuation;
[0029] The traversed path cost calculation unit is used to describe the wavelength distribution and the adjacent wave change wave scenario using a discrete normal distribution to obtain the traversed path cost g;
[0030] The unified cost calculation unit is used to obtain a unified cost based on the minimum relay cost h and the traversed path cost g.
[0031] In a third aspect, a routing method for an automatically switched optical network
[0032] uses the above-mentioned unified cost calculation method based on Astar pathfinding to calculate the unified cost and uses it for routing.
[0033] In a fourth aspect, an automatically switched optical network routing device
[0034] uses the above-mentioned unified cost calculation method based on Astar pathfinding to calculate the unified cost and uses it for routing.
[0035] In a fifth aspect, an electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0036] The memory stores a computer program;
[0037] The processor is configured to implement the above-mentioned unified cost calculation method based on Astar pathfinding when executing the computer program stored on the memory.
[0038] In a sixth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned unified cost calculation method based on Astar pathfinding is implemented.
[0039] The present disclosure at least includes the following beneficial effects:
[0040] The present disclosure can also ensure the path calculation speed, smooth wave change, and more accurate relay estimated cost in the case of a large traffic volume.
[0041] Other features and advantages of the present disclosure will be described in the subsequent description, and some of them will become obvious from the description, or can be understood by implementing the present disclosure. The objectives and other advantages of the present disclosure can be achieved and obtained through the structures pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a schematic flowchart of the calculation method according to an embodiment of the present disclosure;
[0044] Figure 2 It is a schematic structural diagram of the calculation method device according to an embodiment of the present disclosure;
[0045] Figure 3 It is a schematic structural diagram of an electronic device;
[0046] Figure 4 It is a schematic network topology diagram;
[0047] Figure 5 It is a schematic diagram of the algorithm principle;
[0048] Figure 6 It is a schematic diagram of the configured wave. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts fall within the scope of protection of the present disclosure.
[0050] As Figure 1 shown, a unified cost calculation method based on Astar pathfinding, the method includes:
[0051] S101, based on Astar heuristic search, using relay cost attenuation, to obtain the minimum relay cost h;
[0052] S102, using a discrete normal distribution to describe the wavelength distribution and the adjacent wave change wave scenario, to obtain the path cost g;
[0053] S103, according to the minimum relay cost h and the path cost g, to obtain the unified cost.
[0054] Specifically, the implementation is as follows:
[0055] The minimum relay cost h, the calculation formula is as follows:
[0056]
[0057] C free_reg = 10e 7 ;
[0058] Wherein, is the a-th relay cost in the predicted path h, C free_reg is the cost when the relay is not used; C reg is the cost after being used z times; z is the number of times the relay is used; a is each relay in the full path; m is the total number of relays.
[0059] The path cost g, the calculation formula is as follows:
[0060]
[0061] C i = w * (1 - P(X = x i ));
[0062]
[0063] w = 10 4 ;
[0064] Among them, i refers to the i-th segment of OCH, q is the total number of OCHs that have passed (been calculated), C i is the wavelength cost, d i is the distance cost of the i-th segment of OCH, w is the fixed wavelength weight, P is the probability that the random variable X takes a certain xi, x i is the wave to be configured, μ is the mean of X, σ is the standard deviation of X, j is the j-th wave, and n is the total number of wavelengths in the system, such as an 80-wave system or a 96-wave system.
[0065] According to the minimum relay cost h and the cost g of the passed path, the unified cost f is obtained, including:
[0066] f = g + h
[0067]
[0068] Among them, i refers to the i-th optical channel, q is the total number of optical channels that have been calculated, C i is the wavelength cost, d i is the distance cost of the i-th segment of OCH, w is the fixed wavelength weight, P is the probability that the random variable X takes a certain xi, x i is the wave to be configured, a is the relay of the whole path; m is the total number of relays, is the cost of the a-th relay in the predicted path h.
[0069] As Figure 2 shown, a unified cost calculation device based on Astar path finding includes: a minimum relay cost calculation unit 201, a passed path cost calculation unit 202, and a unified cost calculation unit 203;
[0070] The minimum relay cost calculation unit 201 is used to obtain the minimum relay cost h based on Astar heuristic search and using relay cost attenuation;
[0071] The passed path cost calculation unit 202 is used to describe the wavelength distribution and the adjacent wave change wave scenario using the discrete normal distribution to obtain the passed path cost g;
[0072] The unified cost calculation unit 203 is used to obtain the unified cost according to the minimum relay cost h and the passed path cost g.
[0073] A routing method for an automatically switched optical network,
[0074] Adopt the above-mentioned unified cost calculation method based on Astar path finding, calculate the unified cost, and use it for routing.
[0075] An automatically switched optical network routing device,
[0076] Adopt the above unified cost calculation method based on Astar pathfinding, calculate the unified cost, and use it for routing.
[0077] As Figure 3 shown, the present disclosure provides an electronic device, including a processor 301, a communication interface 302, a memory 303, and a communication bus 304. Among them, the processor 301, the communication interface 302, and the memory 303 complete communication with each other through the communication bus 304;
[0078] The memory 303 stores a computer program;
[0079] The processor 301 is configured to implement the above unified cost calculation method based on Astar pathfinding when executing the computer program stored on the memory 303.
[0080] The present disclosure provides a computer-readable storage medium storing a computer program, and the computer program realizes the above unified cost calculation method based on Astar pathfinding when executed by a processor.
[0081] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; it may also exist alone without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiments of the present disclosure is realized.
[0082] According to the embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, device, or device.
[0083] To enable those skilled in the art to better understand the present disclosure, the principle of the present disclosure is described below in conjunction with the accompanying drawings:
[0084] The routing calculation speed of WSON in large quantities is relatively slow. As the service scale increases, the routing calculation time increases non-linearly. This problem will be an important obstacle to the evolution of the control plane technology towards large traffic volumes, so it must be solved. The time complexity of the commonly used Dijkstra algorithm is O(VE), that is, even if optimized with a Heap, the time complexity will not be significantly improved.
[0085] The wavelength variation is not smooth enough, and a more statistical model is needed to characterize the possibility of wavelength distribution. If it is a neighboring wavelength variation, following the original strategy will cause the spectrum part to be too concentrated. From a reasonable perspective, it should vary to the expected wavelength as much as possible. If there is no idle corresponding resource, it should vary to the surrounding wavelength bands as much as possible.
[0086] The relay cost is not dynamic and cannot well characterize the impact of occupancy on the cost, which will affect the acceleration of A*. This mainly lies in the aspect of RegCost. By recalculating and adjusting the estimated cost based on the relay occupancy, it is the heuristic function h of A*.
[0087] To solve the above technical problems, a unified cost routing strategy is proposed based on AStar search.
[0088] As Figure 4 shown, the more complex the topology, the slower the path calculation. This is because the time complexity O(VE) of the Dijkstra algorithm grows non-linearly as the network scale increases. In addition, there are two topological attributes that seriously affect the algorithm efficiency. One is the wavelength resource (the wavelength resources on the local group and the direction group), and the other is the relay resource. To combine the actual scenario and accelerate the algorithm as much as possible, we propose a unified cost routing strategy based on AStar.
[0089] As Figure 5 shown, we compared the new and old technical solutions. The core algorithm of the old solution is a special case of the A* algorithm, and this special case is the so-called Dijkstra algorithm. Although this solution can find the minimum cost path, too many unnecessary nodes are searched, and this part is Figure 2 optimized in the improved solution in the following figure, that is, the acceleration of A* is achieved.
[0090] As Figure 6 shown, to ensure that when the wavelength varies, it varies to the neighboring wavelengths on both sides and the span of the wavelength is as small as possible, this distribution is introduced to depict this bilateral decay process.
[0091] Finally, the unified cost is obtained:
[0092]
[0093] Among them, i refers to the i-th optical channel, q is the total number of optical channels that have been calculated, C i is the wavelength cost, d i is the distance cost of the i-th och, w is the fixed wavelength weight, P is the probability that the random variable X takes a certain x i , x i is the wavelength to be configured, a is the relay of the whole path; m is the total number of relays, To predict the cost of the a-th relay in the path h.
[0094] The algorithm steps are as follows:
[0095]
[0096] Repeat the two parts of Main and Extend until the target node is reached.
[0097] The simulation results are shown in Table 1, and the time of this algorithm is significantly reduced.
[0098] Table 1
[0099]
[0100]
[0101] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A unified cost calculation method based on Astar pathfinding, characterized in that: The method comprises: Based on Astar heuristic search, relay cost attenuation is adopted to obtain the minimum relay cost h; The discrete normal distribution is used to describe the wavelength distribution and the adjacent wave-wave changing scenario, and the path cost g is obtained; According to the minimum relay cost h and the path cost g, a unified cost is obtained.
2. According to claim 1, a unified cost calculation method based on Astar pathfinding is characterized in that: The minimum relay cost h is calculated as follows: C free_reg 10th 7 ; in, To predict the a-th relay cost in path h, C free_reg The cost when the relay is not used; C reg is the cost after being used z times; z is the number of times the relay is used; a is the ath relay on the path; m is the total number of relays on the predicted path h; Used to characterize the attenuation of relay cost, The value of decreases as the number z increases.
3. A unified cost calculation method based on Astar pathfinding according to claim 1, characterized in that: The calculation formula of the path cost g is as follows: C i =w*(1-P(X=x i )); w=10 4 ; Where i refers to the i-th optical channel, q is the total number of optical channels that have been calculated, and C i is the wavelength penalty, d i is the distance cost of the i-th segment och, w is the fixed wavelength weight, and P is the random variable X taking a certain x i The probability of x i is the wave to be configured, μ is the mean of X, σ is the standard deviation of X, j is the jth wave, and n is the total number of wavelengths in the system.
4. A unified cost calculation method based on Astar pathfinding according to claim 1, characterized in that: According to the minimum relay cost h and the path cost g, the unified cost f is obtained, including: f=g+h.
5. A unified cost calculation method based on Astar pathfinding according to claim 4, characterized in that: According to the minimum relay cost h and the path cost g, the unified cost f is obtained, including: Where i refers to the i-th optical channel, q is the total number of optical channels that have been calculated, and C i is the wavelength penalty, d i is the distance cost of the i-th segment och, w is the fixed wavelength weight, and P is the random variable X taking a certain x i The probability of x i is the wave to be configured, a is the relay of the entire path; m is the total number of relays, is the cost of the ath relay in the predicted path h.
6. A unified cost calculation device based on Astar pathfinding, characterized in that: include: A minimum relay cost calculation unit, a passing path cost calculation unit and a unified cost calculation unit; The minimum relay cost calculation unit is used to obtain the minimum relay cost h based on Astar heuristic search and relay cost attenuation; The passing path cost calculation unit is used to use discrete normal distribution to describe the wavelength distribution and the adjacent wave-changing wave scenario to obtain the passing path cost g; The unified cost calculation unit is used to obtain a unified cost according to the minimum relay cost h and the passing path cost g.
7. A routing method for an automatic switched optical network, characterized in that: A unified cost calculation method based on Astar pathfinding according to any one of claims 1 to 5 is used to calculate a unified cost, which is used for routing.
8. An automatic switching optical network routing device, characterized in that: A unified cost calculation method based on Astar pathfinding according to any one of claims 1 to 5 is adopted to calculate a unified cost and use it for routing.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; a memory storing a computer program; The processor is used to implement a unified cost calculation method based on Astar pathfinding as described in any one of claims 1 to 5 when executing a computer program stored in a memory.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the unified cost calculation method based on Astar pathfinding according to any one of claims 1 to 5 is implemented.
