Method, system and device for generating optical power threshold value and medium
By generating dynamic optical power thresholds, using optical power prediction model and dynamic error update technology, the problem of high false alarm rate in traditional inspection methods is solved, network stability and reliability are improved, and operation and maintenance costs are reduced.
Patent Information
- Application Number
- CN202411639908.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional port optical power inspection methods rely on manual experience to set fixed threshold thresholds, resulting in frequent false alarms, poor network stability and reliability, and high operation and maintenance costs.
A method for generating optical power threshold is proposed. By acquiring historical optical power data and alternative thresholds, a trained optical power prediction model is used to generate dynamic threshold prediction data, and a more accurate threshold value is generated through dynamic error update and intersection update.
It reduces the false alarm rate of optical power inspection alarms, improves the stability and reliability of network operation, and reduces operation and maintenance costs.
Smart Images

Figure CN119519832A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of optical communication technology, and in particular to a method, system, device and medium for generating an optical power threshold. Background Art
[0002] Port optical power refers to the power consumed by a port when transmitting optical signals in a fiber-optic communication system. The size of the port optical power directly affects the stability and reliability of the fiber-optic communication system. Among them, port optical power inspection is one of the important operation and maintenance items in the daily maintenance of the fiber-optic communication system.
[0003] At present, the traditional port optical power inspection method is usually based on the upper and lower threshold ranges (such as -2.8dBm to 4.2dBm) provided by the manufacturer's network management operation and management center (OMC), and relies on manual experience to set a fixed narrowed range (such as -1.8dBm to 3.2dBm) as the upper and lower threshold inspection thresholds of the port optical power. The optical power inspection alarm is triggered by the relationship between the upper and lower threshold inspection thresholds and the collected port optical power values. This method cannot accurately judge whether the network is normal, and there is a certain false alarm phenomenon. The stability and reliability of network operation are poor, and the operation and maintenance cost is high.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0005] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.
[0006] The main purpose of the embodiments of the present application is to propose a method, system, device and medium for generating an optical power threshold value, wherein the generation method can provide dynamic upper and lower optical power threshold values for port optical power inspection, which can reduce the false alarm rate of optical power inspection alarms, improve the stability and reliability of network operation, and reduce operation and maintenance costs.
[0007] To achieve the above object, an embodiment of the present application provides a method for generating an optical power threshold value, the method comprising:
[0008] Acquire first historical optical power data of the target port before a specified time node and a preset candidate threshold value, and preprocess the first historical optical power data to obtain second historical optical power data;
[0009] Inputting the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model;
[0010] According to the second historical optical power data and the alternative threshold value, dynamically update the optical power prediction data to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having a minimum error with the alternative threshold value;
[0011] According to the candidate threshold values, the target prediction threshold value is updated by intersection to obtain a target threshold value corresponding to the target port.
[0012] In some embodiments, preprocessing the first historical optical power data to obtain second historical optical power data includes:
[0013] Performing data format verification on the first historical optical power data to obtain first intermediate optical power data;
[0014] Performing outlier detection on the first intermediate optical power data to obtain second intermediate optical power data;
[0015] Fill missing values in the second intermediate optical power data to obtain the second historical optical power data.
[0016] In some embodiments, the dynamically updating the optical power prediction data according to the second historical optical power data and the candidate threshold value includes:
[0017] Obtaining a predicted standard deviation and a predicted mean of the optical power prediction data, and a global standard deviation of the second historical optical power data;
[0018] According to the global standard deviation, the predicted standard deviation, the predicted mean value and the candidate threshold value, the optical power prediction data is dynamically thresholded to obtain the target prediction threshold value.
[0019] In some embodiments, the dynamically thresholding the optical power prediction data according to the global standard deviation, the prediction standard deviation, the prediction mean and the candidate threshold value to obtain the target prediction threshold value includes:
[0020] Get the preset ratio step and ratio threshold;
[0021] Using the current prediction standard deviation as a first standard deviation, and obtaining a first prediction ratio and a first global ratio corresponding to the first standard deviation;
[0022] According to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean and the candidate threshold value, a threshold error calculation is performed on the first standard deviation to obtain a second standard deviation and intermediate threshold error data;
[0023] Comparing the ratio threshold with the first predicted ratio to obtain a ratio comparison result;
[0024] If the ratio comparison result is that the first predicted ratio is less than the ratio threshold, the intermediate threshold error data is retained, and the first standard deviation is updated according to the second standard deviation, and the first predicted ratio and the first global ratio are updated according to the ratio step, and then the step of returning to execute the current predicted standard deviation as the first standard deviation, and obtaining the first predicted ratio and the first global ratio corresponding to the first standard deviation; or, if the ratio comparison result is that the first predicted ratio is equal to the ratio threshold, the target prediction threshold value is obtained according to all the intermediate threshold error data.
[0025] In some embodiments, the performing threshold error calculation on the first standard deviation according to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean and the alternative threshold value to obtain the second standard deviation and the intermediate threshold error data includes:
[0026] According to the first prediction ratio, performing a first ratio calculation on the first standard deviation to obtain prediction standard deviation data, and according to the first global ratio, performing a second ratio calculation on the global standard deviation to obtain global standard deviation data;
[0027] Aggregating the predicted standard deviation data according to the global standard deviation data to obtain the second standard deviation;
[0028] Performing a first threshold analysis on the predicted mean according to the second standard deviation to obtain an intermediate threshold corresponding to the second standard deviation;
[0029] According to the intermediate threshold value, a threshold error analysis is performed on the candidate threshold value to obtain the intermediate threshold error data.
[0030] In some embodiments, obtaining the target prediction threshold value according to all the intermediate threshold error data includes:
[0031] Performing minimum value screening on all the intermediate threshold error data to obtain target threshold error data, wherein the target threshold error data is the minimum intermediate threshold error data;
[0032] Obtaining a target standard deviation corresponding to the target threshold error data;
[0033] According to the target standard deviation, a second threshold analysis is performed on the predicted mean to obtain the target prediction threshold.
[0034] In some embodiments, the method further comprises:
[0035] Acquire third historical optical power data;
[0036] Constructing an optical power prediction model, and obtaining several hyperparameter combinations of the optical power prediction model based on a grid search algorithm;
[0037] According to the third historical optical power data and all the hyperparameter combinations, the optical power prediction model is trained and cross-validated to obtain a plurality of hyperparameter evaluation results, each of which corresponds to one of the hyperparameter combinations;
[0038] Performing optimal hyperparameter screening on all the hyperparameter evaluation results to obtain target hyperparameter evaluation results;
[0039] The trained optical power prediction model is obtained according to the target hyperparameter evaluation result.
[0040] To achieve the above object, another aspect of an embodiment of the present application provides a system for generating an optical power threshold, including:
[0041] A first processing unit, configured to obtain first historical optical power data of a target port before a specified time node and a preset candidate threshold value, and preprocess the first historical optical power data to obtain second historical optical power data;
[0042] A second processing unit is used to input the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model;
[0043] a third processing unit, configured to perform a dynamic error update on the optical power prediction data according to the second historical optical power data and the alternative threshold value, to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having a minimum error with the alternative threshold value;
[0044] The fourth processing unit is configured to perform intersection update on the target prediction threshold according to the candidate threshold to obtain a target threshold corresponding to the target port.
[0045] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.
[0046] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0047] The embodiments of the present application include at least the following beneficial effects:
[0048] The present application provides a method, system, device and medium for generating an optical power threshold value, wherein the generation method obtains first historical optical power data of a target port before a specified time node and a preset alternative threshold value, and preprocesses the first historical optical power data to obtain second historical optical power data; inputs the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model; according to the second historical optical power data and the alternative threshold value, dynamically error updates the optical power prediction data to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having the smallest error with the alternative threshold value; according to the alternative threshold value, performs intersection update on the target prediction threshold value to obtain a target threshold value corresponding to the target port. This generation method generates dynamic threshold prediction data through a trained optical power prediction model, and by dynamically updating the threshold prediction data and updating the intersection in turn, it can generate upper and lower optical power thresholds that are more in line with the actual situation and have better rationality and effectiveness, thereby reducing the false alarm rate of optical power inspection alarms, improving the stability and reliability of network operation, and reducing operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a flowchart of a method for generating an optical power threshold provided in an embodiment of the present application;
[0050] Figure 2 is a detailed flow chart of step S110 provided in an embodiment of the present application;
[0051] Figure 3 is a detailed flow chart of step S130 provided in an embodiment of the present application;
[0052] Figure 4 is a detailed flow chart of step B2 provided in an embodiment of the present application;
[0053] Figure 5 is a detailed flow chart of step B23 provided in an embodiment of the present application;
[0054] Figure 6 is a detailed flow chart of step B26 provided in an embodiment of the present application;
[0055] Figure 7 It is a schematic diagram of a training process of an optical power prediction model provided in an embodiment of the present application;
[0056] Figure 8 is a logic diagram of step S170 provided in an embodiment of the present application;
[0057] Fig. 9 It is a schematic diagram of a framework of a system for generating an optical power threshold value provided in an embodiment of the present application;
[0058] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices / equipment and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0060] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0061] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] At present, the traditional port optical power inspection method is usually based on the upper and lower threshold ranges (such as -2.8dBm to 4.2dBm) provided by the operation and management center (OMC) of the manufacturer's network management, and relies on manual experience to set a fixed narrowed range as the upper and lower threshold inspection thresholds of the port optical power, and triggers the optical power inspection alarm through the relationship between the upper and lower threshold inspection thresholds and the collected port optical power values. However, since the optical power value input to the port of the optical communication equipment will be affected by factors such as optical fiber aging, single board aging, optical module degradation, and optical cable splicing, and the actual optical power of the port will also change with time and environmental changes, the upper and lower threshold inspection thresholds of different optical communication equipment are only set in batches based on manual experience, and there are phenomena of missed and false alarms of inspection hidden dangers, which cannot accurately judge whether the network is normal, and the stability and reliability of network operation are poor; in addition, the upper and lower threshold inspection thresholds set in this way cannot be dynamically adjusted according to the actual situation in time, and it is often unable to discover potential hidden dangers in the network operation process in a relatively timely manner, resulting in high operation and maintenance costs.
[0064] In addition, there is currently a method of predicting the optical power value of the optical communication equipment port in the future period of time based on the random forest regression prediction model, and directly calculating the upper and lower inspection thresholds corresponding to the optical power value through the Raida criterion (3σ principle). This method is greatly affected by the prediction accuracy of the random forest regression prediction model. The upper and lower inspection thresholds obtained by this method are not accurate, and the rationality and effectiveness of the upper and lower inspection thresholds are not satisfactory.
[0065] In view of this, the present application provides a method for generating an optical power threshold value, wherein the generation method generates dynamic threshold prediction data through a trained optical power prediction model, and by dynamically updating the threshold prediction data in turn, it is possible to generate upper and lower optical power threshold values that are more in line with actual conditions and have better rationality and effectiveness, thereby reducing the false alarm rate of optical power patrol alarms, improving the stability and reliability of network operation, and reducing operation and maintenance costs.
[0066] A method for generating an optical power threshold value provided in an embodiment of the present application can be applied to optical communication application scenarios. In optical communication application scenarios, an optical communication service provider can provide dynamic upper and lower optical power threshold values for port optical power inspections through the method for generating an optical power threshold value provided in an embodiment of the present application, which can reduce the false alarm rate of optical power inspection alarms, improve the stability and reliability of network operation, and reduce operation and maintenance costs.
[0067] The method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the method, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0069] Reference Figure 1 , Figure 1 is an optional flow chart of a method for generating an optical power threshold provided in an embodiment of the present application, Figure 1 The generation method may include but is not limited to steps S110 to S140.
[0070] Step S110: acquiring first historical optical power data of the target port before a specified time node and a preset candidate threshold value, and preprocessing the first historical optical power data to obtain second historical optical power data;
[0071] In an embodiment of the present application, the target port can be a port of optical communication equipment such as an optical transport network (OTN) or a packet transport network (PTN) in a fiber optic communication system. The specified time node can be the current moment or any arbitrary moment. The embodiment of the present application takes the current moment as the specified time node as an example.
[0072] It can be understood that the alternative threshold value can be determined based on the upper and lower threshold ranges provided by the OMC. Specifically, the upper limit in the upper and lower threshold ranges provided by the OMC is determined as the upper threshold value of the alternative threshold value, and the lower limit in the upper and lower threshold ranges provided by the OMC is determined as the lower threshold value of the alternative threshold value; or, the alternative threshold value can also be the upper and lower thresholds of the optical power of the OMC northbound interface (Northbound I nterface), or it can be set manually, and the present application does not impose any restrictions on this.
[0073] It should be noted that the first historical optical power data may be the optical power value received by the port within a certain time range before the current moment and the corresponding time and date, wherein the time range may be flexibly set. In addition, the preprocessing of the first historical optical power data may be to perform data regularization on all data in the first historical optical power data to obtain the second historical optical power data corresponding to the input end of the trained optical power prediction model.
[0074] Reference Figure 2 In some embodiments, the step S110 of preprocessing the first historical optical power data to obtain second historical optical power data includes:
[0075] A1. Performing data format verification on the first historical optical power data to obtain first intermediate optical power data;
[0076] A2. Performing abnormal value detection on the first intermediate optical power data to obtain second intermediate optical power data;
[0077] A3. Fill missing values in the second intermediate optical power data to obtain the second historical optical power data.
[0078] In an embodiment of the present application, step A1 may be to verify the data format of the first historical optical power data, by eliminating the historical optical power data that does not conform to the preset data format, and retaining the historical optical power data that conforms to the preset data format. Specifically, it may be to verify whether the time and date corresponding to the optical power value in the first historical optical power data conforms to the preset data format, so as to obtain the first intermediate optical power data. Step A2 may be to eliminate abnormal optical power values in the first intermediate optical power data. Specifically, the abnormal optical power values in the first intermediate optical power data may be eliminated by the Raida criterion, and the first intermediate optical power data after elimination is determined as the second intermediate optical power data.
[0079] It can be understood that step A3 can first determine the number of missing optical power values in the second intermediate optical power data. When the number of missing optical power values in the second intermediate optical power data is greater than or equal to a preset threshold value, the second intermediate optical power data is discarded and the alternative threshold value is directly output; or, when the number of missing optical power values in the second intermediate optical power data is less than the preset threshold value, the missing optical power values in the second intermediate optical power data can be filled with missing values. There are many specific missing value filling methods, such as mean filling, median filling, K nearest neighbor filling, regression prediction filling, neighbor value average filling, etc. The present application does not impose any restrictions on this, and the second intermediate optical power data after the missing value filling is determined as the second historical optical power data.
[0080] Step S120: input the second historical optical power data into the trained optical power prediction model to obtain the optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is the optical power data after the specified time node predicted by the optical power prediction model;
[0081] In an embodiment of the present application, step S120 may be to input the second historical optical power data into a trained optical power prediction model, and generate an optical power prediction through the trained optical power prediction model to obtain optical power prediction data. The optical power prediction data may be an optical power prediction value for a period of time in the future, such as an optical power prediction value for the next seven days, an optical power prediction value for the next fifteen days, etc. The example in this application is for illustration only.
[0082] Step S130: dynamically update the optical power prediction data according to the second historical optical power data and the candidate threshold value to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having a minimum error with the candidate threshold value;
[0083] In the embodiment of the present application, the dynamic error update of step S130 may be to perform a threshold error update on the threshold prediction data corresponding to the optical power prediction data, so as to find a target prediction threshold value that is more in line with the actual situation.
[0084] Reference Figure 3 In some embodiments, the step S130, dynamically updating the optical power prediction data according to the second historical optical power data and the candidate threshold value, includes:
[0085] B1. Obtaining a predicted standard deviation and a predicted mean of the optical power prediction data, and a global standard deviation of the second historical optical power data;
[0086] In an embodiment of the present application, step B1 can be based on each optical power prediction value of the optical power prediction data, calculating the corresponding prediction standard deviation and prediction mean; the global standard deviation of the second historical optical power data can be obtained based on each optical power value in the second historical optical power data.
[0087] B2. Performing dynamic threshold update on the optical power prediction data according to the global standard deviation, the prediction standard deviation, the prediction mean and the candidate threshold value to obtain the target prediction threshold value.
[0088] Reference Figure 4 Further, the step B2, dynamically updating the optical power prediction data according to the global standard deviation, the predicted standard deviation, the predicted mean and the candidate threshold value to obtain the target prediction threshold value, includes:
[0089] B21, obtaining a preset ratio step and ratio threshold;
[0090] B22. Using the current prediction standard deviation as a first standard deviation, and obtaining a first prediction ratio and a first global ratio corresponding to the first standard deviation;
[0091] In the embodiment of the present application, the proportional step is used to indicate the proportional update amplitude of the first prediction ratio, which can be any one of 0.05, 0.1, 0.2, etc., and the proportional threshold can be any one of 0.9, 1, 2, etc. The embodiment of the present application takes the proportional threshold of 1 as an example. Specifically, if the current prediction standard deviation is the initial prediction standard deviation, the first prediction ratio obtained in step B22 can be a preset prediction ratio, and the first prediction ratio is specifically 0, and the corresponding first global ratio can be the difference between the proportional threshold and the first prediction ratio, that is, the first global ratio is 1; or, if the current prediction standard deviation is the second standard deviation obtained in the previous threshold error calculation process, the corresponding first prediction ratio is the first prediction ratio updated in the previous threshold error calculation process, and the corresponding first global ratio is the first global ratio updated in the previous threshold error calculation process.
[0092] B23, performing threshold error calculation on the first standard deviation according to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean and the candidate threshold value, to obtain a second standard deviation and intermediate threshold error data;
[0093] Reference Figure 5 Further, the step B23, performing threshold error calculation on the first standard deviation according to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean and the alternative threshold value, to obtain the second standard deviation and the intermediate threshold error data, includes:
[0094] B231. Performing a first ratio calculation on the first standard deviation according to the first prediction ratio to obtain prediction standard deviation data, and performing a second ratio calculation on the global standard deviation according to the first global ratio to obtain global standard deviation data;
[0095] B232. Aggregate the predicted standard deviation data according to the global standard deviation data to obtain the second standard deviation;
[0096] B233. Perform a first threshold analysis on the predicted mean according to the second standard deviation to obtain an intermediate threshold corresponding to the second standard deviation;
[0097] B234. Perform threshold error analysis on the candidate thresholds according to the intermediate threshold value to obtain the intermediate threshold error data.
[0098] In the embodiment of the present application, the first ratio calculation in step B231 can be based on the first predicted ratio in the current threshold error calculation process, and the first standard deviation is multiplied to obtain the predicted standard deviation data; and the second ratio calculation is similar to the first ratio calculation, and can be simply deduced by analogy to obtain the global characteristic difference data. Step B232 can be to sum the global standard deviation data and the predicted standard deviation to obtain the second standard deviation.
[0099] It can be understood that step B233 can be to generate an intermediate threshold value corresponding to the second standard deviation based on the Raida criterion. Specifically, the intermediate lower threshold value in the intermediate threshold value can be the difference between the predicted mean and three times the second standard deviation, and the intermediate upper threshold value in the intermediate threshold value can be the sum of the predicted mean and three times the second standard deviation. Step B234 can be to calculate the error difference between the intermediate threshold value and the alternative threshold value, and determine the calculated lower error difference and upper error difference as the intermediate threshold error data.
[0100] B24. Compare the ratio threshold and the first predicted ratio to obtain a ratio comparison result;
[0101] B25. If the ratio comparison result is that the first predicted ratio is less than the ratio threshold, retain the intermediate threshold error data, and update the first standard deviation according to the second standard deviation, and update the first predicted ratio and the first global ratio according to the ratio step, and then return to the step of taking the current predicted standard deviation as the first standard deviation and obtaining the first predicted ratio and the first global ratio corresponding to the first standard deviation;
[0102] In an embodiment of the present application, step B24 can be to compare the size relationship between a preset ratio threshold and the first predicted ratio to obtain a ratio comparison result. Specifically, if the ratio comparison result is that the first predicted ratio is less than the preset ratio threshold, it means that the exit condition of the cyclic optimization is still not met at this time. At this time, the intermediate threshold error data obtained in the current threshold error calculation process can be retained, and then the second standard deviation is used as the first standard deviation in the next threshold error calculation process.
[0103] It can be understood that step B25 can update the first predicted ratio and the first global ratio based on the preset proportional step. Specifically, it can be to calculate the sum of the first predicted ratio and the proportional step, and use the calculated sum as the first predicted ratio in the next threshold error calculation process; and calculate the difference between the first global ratio and the preset proportional step, and use the calculated difference as the first global ratio in the next threshold error calculation process, or calculate the difference between the proportional threshold and the first predicted ratio, and use the calculated difference as the first global ratio in the next threshold error calculation process. The examples in this application are for illustration only.
[0104] Alternatively, B26, if the ratio comparison result is that the first prediction ratio is equal to the ratio threshold, then the target prediction threshold is obtained according to all the intermediate threshold error data.
[0105] Reference Figure 6 Further, the step B26, obtaining the target prediction threshold value according to all the intermediate threshold error data, includes:
[0106] B261, performing minimum value screening on all the intermediate threshold error data to obtain target threshold error data, wherein the target threshold error data is the minimum intermediate threshold error data;
[0107] B262, obtaining a target standard deviation corresponding to the target threshold error data;
[0108] B263. Perform a second threshold analysis on the predicted mean according to the target standard deviation to obtain the target prediction threshold.
[0109] In an embodiment of the present application, if the ratio comparison result is that the first prediction ratio is equal to the preset ratio threshold, it means that the exit condition of the cyclic optimization is met at this time. At this time, the target prediction threshold with the minimum threshold error can be determined based on the intermediate threshold error data obtained in the previous threshold error calculation process and the intermediate threshold error data obtained in the current threshold error calculation process.
[0110] It can be understood that step B261 can be to compare the error size relationship between all the intermediate threshold error data, and determine the intermediate threshold error data with the smallest error as the target threshold error data; step B262 can first determine the threshold error calculation process when obtaining the target threshold error data, and then determine the second standard deviation generated in the threshold error calculation process as the target standard deviation corresponding to the target threshold error data. The second threshold analysis in step B263 is similar to the first threshold analysis in the aforementioned step B233, and can be simply deduced by analogy.
[0111] It should be noted that the embodiment of the present application dynamically updates the first standard deviation, predicted ratio and global ratio through a cyclic optimization mechanism, and can find the optimal ratio of predicted standard deviation data and global standard deviation data, so as to obtain the upper and lower optical power threshold values (i.e., the target prediction threshold) that are optimal and in line with the actual situation.
[0112] Step S140: performing intersection update on the target prediction threshold according to the candidate thresholds to obtain a target threshold corresponding to the target port.
[0113] In an embodiment of the present application, step S140 can be based on the alternative threshold value, and perform an intersection analysis on the target upper and lower threshold prediction thresholds in the target prediction threshold value, specifically by taking the minimum interval of the intersection of the alternative threshold value and the target prediction threshold value, so as to determine the target threshold value.
[0114] Reference Figure 7 In some embodiments, the method further comprises:
[0115] Step S150, obtaining third historical optical power data;
[0116] Step S160: construct an optical power prediction model, and obtain several hyperparameter combinations of the optical power prediction model based on a grid search algorithm;
[0117] Step S170: training and cross-validating the optical power prediction model according to the third historical optical power data and all the hyperparameter combinations to obtain a plurality of hyperparameter evaluation results, each of which corresponds to one of the hyperparameter combinations;
[0118] Step S180, performing optimal hyperparameter screening on all the hyperparameter evaluation results to obtain a target hyperparameter evaluation result;
[0119] Step S190: Obtain the trained optical power prediction model according to the target hyperparameter evaluation result.
[0120] In an embodiment of the present application, the third historical optical power data may include port received optical power, port bit errors, port alarms, upper and lower thresholds of northbound interface optical power, etc., wherein the port received optical power includes the port name, received optical power, receiving collection time point, etc.; the port bit error includes the bit error port name, CRC bit error, bit error collection time point, etc.; the port alarm includes the alarm port name, alarm occurrence time, alarm end time, etc.; the upper and lower thresholds of northbound interface optical power include the receiving output upper threshold, the receiving output lower threshold, etc. The examples in this application are for illustration only.
[0121] It can be understood that after obtaining the third historical optical power data, the 3σ criterion and interpolation method can be used to analyze the outliers first, the positions with outliers are blanked, and the missing positions are automatically filled with missing values by the average value of the neighboring values, so as to obtain the preprocessed third historical optical power data.
[0122] It should be noted that the optical power prediction model in the embodiment of the present application may be an LSTNet (Long-and Short-term Time-series Networks) model. Step S160 may first define a parameter range for the convolutional layer window size, number of hidden units, number of jump steps, etc. of the LSTNet model, and then generate several hyperparameter combinations based on a grid search method within the parameter range. Figure 8 , step S170 may first be to instantiate the optical power prediction model corresponding to the current hyperparameter combination, and then input the third historical optical power data into the optical power prediction model corresponding to the current hyperparameter combination for training, and obtain the hyperparameter evaluation result of the optical power prediction model corresponding to the current hyperparameter combination through K-fold cross validation, and the hyperparameter evaluation result includes evaluation score, training time, verification error, model complexity, etc.; then determine whether there is at least one hyperparameter combination that does not have a hyperparameter evaluation result. If there is at least one hyperparameter combination that does not have a hyperparameter evaluation result, the hyperparameter combination without a hyperparameter evaluation result may be used as the hyperparameter combination for the next training, and return to the process of instantiating the optical power prediction model corresponding to the current hyperparameter combination; or, if all hyperparameter combinations have hyperparameter evaluation results, the loop may be exited at this time.
[0123] It is worth mentioning that the optimal hyperparameter screening in step S180 can be to sort all hyperparameter evaluation results, and determine the hyperparameter evaluation result of the best ranked solution as the target hyperparameter evaluation result, and then obtain the trained optical power prediction model by inputting the third historical optical power data into the optical power prediction model corresponding to the target hyperparameter evaluation result for training.
[0124] See also Fig. 9 The embodiment of the present application also provides a system for generating an optical power threshold, including:
[0125] The first processing unit 810 is used to obtain first historical optical power data of the target port before a specified time node and a preset candidate threshold value, and pre-process the first historical optical power data to obtain second historical optical power data;
[0126] A second processing unit 820 is used to input the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model;
[0127] A third processing unit 830 is used to perform a dynamic error update on the optical power prediction data according to the second historical optical power data and the alternative threshold value to obtain a target prediction threshold value, where the target prediction threshold value is a prediction threshold value having a minimum error with the alternative threshold value;
[0128] The fourth processing unit 840 is configured to perform intersection update on the target prediction threshold according to the candidate threshold to obtain a target threshold corresponding to the target port.
[0129] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0130] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0131] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0132] See also Fig.10 , Fig.10 The hardware structure of an electronic device of an embodiment is illustrated, and the electronic device includes:
[0133] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0134] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 902, and the processor 901 calls and executes the methods of the embodiments of this application;
[0135] Input / output interface 903, used to implement information input and output;
[0136] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0137] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0138] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0139] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.
[0140] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0141] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0142] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0143] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0144] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0146] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0147] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0149] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0152] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for generating an optical power threshold, characterized in that: include: Acquire first historical optical power data of the target port before a specified time node and a preset candidate threshold value, and preprocess the first historical optical power data to obtain second historical optical power data; Inputting the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model; According to the second historical optical power data and the alternative threshold value, dynamically update the optical power prediction data to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having a minimum error with the alternative threshold value; According to the candidate threshold values, the target prediction threshold value is updated by intersection to obtain a target threshold value corresponding to the target port.
2. The generation method according to claim 1, characterized in that: The preprocessing of the first historical optical power data to obtain second historical optical power data includes: Performing data format verification on the first historical optical power data to obtain first intermediate optical power data; Performing outlier detection on the first intermediate optical power data to obtain second intermediate optical power data; Fill missing values in the second intermediate optical power data to obtain the second historical optical power data.
3. The generation method according to claim 1, characterized in that: The step of dynamically updating the optical power prediction data according to the second historical optical power data and the candidate threshold value to obtain a target prediction threshold value includes: Obtaining a predicted standard deviation and a predicted mean of the optical power prediction data, and a global standard deviation of the second historical optical power data; According to the global standard deviation, the predicted standard deviation, the predicted mean value and the candidate threshold value, the optical power prediction data is dynamically thresholded to obtain the target prediction threshold value.
4. The generation method according to claim 3, characterized in that: The step of dynamically updating the optical power prediction data according to the global standard deviation, the prediction standard deviation, the prediction mean, and the candidate threshold value to obtain the target prediction threshold value includes: Get the preset ratio step and ratio threshold; Using the current prediction standard deviation as a first standard deviation, and obtaining a first prediction ratio and a first global ratio corresponding to the first standard deviation; According to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean and the candidate threshold value, a threshold error calculation is performed on the first standard deviation to obtain a second standard deviation and intermediate threshold error data; Comparing the ratio threshold with the first predicted ratio to obtain a ratio comparison result; If the ratio comparison result is that the first predicted ratio is less than the ratio threshold, the intermediate threshold error data is retained, and the first standard deviation is updated according to the second standard deviation, and the first predicted ratio and the first global ratio are updated according to the ratio step, and then the step of returning to execute the current predicted standard deviation as the first standard deviation, and obtaining the first predicted ratio and the first global ratio corresponding to the first standard deviation; or, if the ratio comparison result is that the first predicted ratio is equal to the ratio threshold, the target prediction threshold value is obtained according to all the intermediate threshold error data.
5. The generation method according to claim 4, characterized in that: The step of performing threshold error calculation on the first standard deviation according to the first predicted ratio, the first global ratio, the global standard deviation, the predicted mean, and the candidate threshold value to obtain a second standard deviation and intermediate threshold error data includes: According to the first prediction ratio, performing a first ratio calculation on the first standard deviation to obtain prediction standard deviation data, and according to the first global ratio, performing a second ratio calculation on the global standard deviation to obtain global standard deviation data; Aggregating the predicted standard deviation data according to the global standard deviation data to obtain the second standard deviation; Performing a first threshold analysis on the predicted mean according to the second standard deviation to obtain an intermediate threshold corresponding to the second standard deviation; According to the intermediate threshold value, a threshold error analysis is performed on the candidate threshold value to obtain the intermediate threshold error data.
6. The generation method according to claim 4, characterized in that: The step of obtaining the target prediction threshold value according to all the intermediate threshold error data includes: Performing minimum value screening on all the intermediate threshold error data to obtain target threshold error data, wherein the target threshold error data is the minimum intermediate threshold error data; Obtaining a target standard deviation corresponding to the target threshold error data; According to the target standard deviation, a second threshold analysis is performed on the predicted mean to obtain the target prediction threshold.
7. The generation method according to claim 1, characterized in that: The method further comprises: Acquire third historical optical power data; Constructing an optical power prediction model, and obtaining several hyperparameter combinations of the optical power prediction model based on a grid search algorithm; According to the third historical optical power data and all the hyperparameter combinations, the optical power prediction model is trained and cross-validated to obtain a plurality of hyperparameter evaluation results, each of which corresponds to one of the hyperparameter combinations; Performing optimal hyperparameter screening on all the hyperparameter evaluation results to obtain target hyperparameter evaluation results; The trained optical power prediction model is obtained according to the target hyperparameter evaluation result.
8. A system for generating an optical power threshold, characterized in that: include: A first processing unit, configured to obtain first historical optical power data of a target port before a specified time node and a preset candidate threshold value, and preprocess the first historical optical power data to obtain second historical optical power data; A second processing unit is used to input the second historical optical power data into a trained optical power prediction model to obtain optical power prediction data output by the trained optical power prediction model, wherein the optical power prediction data is optical power data after the specified time node predicted by the optical power prediction model; a third processing unit, configured to perform a dynamic error update on the optical power prediction data according to the second historical optical power data and the alternative threshold value, to obtain a target prediction threshold value, wherein the target prediction threshold value is a prediction threshold value having a minimum error with the alternative threshold value; The fourth processing unit is configured to perform intersection update on the target prediction threshold according to the candidate threshold to obtain a target threshold corresponding to the target port.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method for adjusting emission light power of optical module
CN120454874A