PON topological structure prediction model training method and PON topological structure prediction method

Through the deep learning model based on the contrastive learning algorithm, ONU embedding features are generated, which solves the problem of inaccurate PON network topology prediction and achieves more efficient topology update and management.

CN118797330APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +3
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202311471296.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, the prediction of the PON network topology is inaccurate, making it difficult to update the topology between the secondary optical splitter and the ONU, and there are problems of high economic cost and low accuracy.

Method used

Using a deep learning model based on the contrastive learning algorithm, by obtaining the optical power data of the target ONU and the optical power data of multiple ONUs connected to it, ONU embedded features are generated, which are used to predict the connection between the target ONU and the secondary optical splitter, improving Topology prediction accuracy.

Benefits of technology

It achieves accurate prediction of PON network topology, reduces noise interference and scarcity of positive samples, and improves the efficiency of PON network management and the accuracy of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797330A_ABST
    Figure CN118797330A_ABST
Patent Text Reader

Abstract

The invention discloses a PON topological structure prediction model training method and a PON topological structure prediction method. The method comprises the following steps: acquiring a first training sample set, wherein the first training sample set comprises a first positive sample and a first negative sample; the first positive sample is optical power data of a target optical ONU and optical power data of a plurality of ONUs connected with a first secondary optical splitter corresponding to the target ONU, and the second negative sample is optical power data of the target ONU and optical power data of a plurality of ONUs connected with a second secondary optical splitter corresponding to the target ONU; training a to-be-trained deep learning model according to the first training sample set to obtain a PON topological structure prediction model, the PON topological structure prediction model being used for predicting whether a target ONU is connected with a target secondary optical splitter; the feature extractor in the to-be-trained deep learning model is obtained by training based on a comparative learning algorithm and is used for generating ONU embedding features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data analysis and intelligent networking, and specifically relates to a PON topology structure prediction model training and a PON topology structure prediction method. Background Art

[0002] Passive Optical Network (PON) is a point-to-multipoint fiber access technology, which includes: an optical line terminal (OLT) installed in a central control station, a group of supporting optical network units (ONUs) installed in user locations, namely ONUs, and an optical distribution network (ODN) between OLT and ONU. Among them, ODN provides an optical transmission channel between OLT and ONU, generally including optical fiber and two-stage optical splitters, among which the topology between the first and second stage optical splitters is known, but the topology between the second stage optical splitter and the user-side ONU needs to be frequently updated because of the easy occurrence of abnormalities such as damage to the ONU or the deployment of the ONU.

[0003] In order to update the topology between the secondary splitter and the ONU in time, manual or hardware troubleshooting is usually adopted. However, this method has the problems of long troubleshooting time and high economic cost, and is prone to omissions, that is, the troubleshooting accuracy is often not high.

[0004] In the related art, software troubleshooting is used to determine whether the ONU is abnormal based on the characteristics of the neural network mining traffic data. However, due to the small number of ONUs under the same secondary splitter, it is impossible to provide enough positive samples for model training, and there may be inconsistencies in the waveforms of ONUs under the same splitter due to interference such as noise and delay. Therefore, only using clustering algorithms or deep neural network models cannot accurately distinguish between normal ONUs and abnormal ONUs. In other words, in the related art, there is a problem of inaccurate prediction of the topological structure of the PON network. Summary of the invention

[0005] The embodiments of the present application provide a PON topology structure prediction model training and a PON topology structure prediction method, which can solve the problem of inaccurate prediction of the topology structure of the PON network in the related art.

[0006] In a first aspect, an embodiment of the present application provides a method for training a PON topology prediction model, the method comprising: obtaining a first training sample set, the first training sample set comprising a first positive sample and a first negative sample; the first positive sample is optical power data of a target ONU, and optical power data of multiple ONUs connected to a first or second level optical splitter corresponding to the target ONU, and the second negative sample is optical power data of the target ONU, and optical power data of multiple ONUs connected to a second or second level optical splitter corresponding to the target ONU; training a deep learning model to be trained according to the first training sample set to obtain a PON topology prediction model, the PON topology prediction model being used to predict the target ONU Whether it is connected to the target secondary splitter; the feature extractor in the deep learning model to be trained is trained based on the contrastive learning algorithm and is used to generate ONU embedded features; wherein the first secondary splitter is a secondary splitter connected to the target ONU based on the PON topology data registered in the system, the second secondary splitter is any secondary splitter other than the first secondary splitter obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target secondary splitter is the first secondary splitter corresponding to the target ONU or the second secondary splitter corresponding to the target ONU.

[0007] In a second aspect, an embodiment of the present application provides a PON topology prediction method, the method comprising: obtaining a set to be predicted based on PON topology data registered in the system, the set to be predicted comprising optical power data of a target ONU and optical power data of multiple ONUs connected to a selected secondary splitter; inputting the optical power data of the target ONU and the optical power data of multiple ONUs connected to the selected secondary splitter into a PON topology prediction model as described in the first aspect, to obtain a prediction result of the PON topology prediction model, the prediction result being used to indicate whether the target ONU and the selected secondary splitter are connected; determining a PON topology according to the prediction result; wherein the target ONU is any one of the multiple ONUs in the PON topology data, and the selected secondary splitter is any one of the multiple secondary splitters in the PON topology data.

[0008] In a third aspect, an embodiment of the present application provides a PON topology structure prediction model training device, including: an acquisition module for acquiring a first training sample set, the first training sample set including a first positive sample and a first negative sample; the first positive sample is the optical power data of a target ONU, and the optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, and the second negative sample is the optical power data of the target ONU, and the optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU; a training module is used to train a deep learning model to be trained according to the first training sample set to obtain a PON topology structure prediction model, and the PON topology structure prediction model is used to predict Whether the target ONU is connected to the target secondary splitter; the feature extractor in the deep learning model to be trained is obtained based on the contrastive learning algorithm and is used to generate ONU embedded features; wherein the first secondary splitter is a secondary splitter connected to the target ONU obtained based on the PON topology data registered in the system, the second secondary splitter is any secondary splitter other than the first secondary splitter obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target secondary splitter is the first secondary splitter corresponding to the target ONU or the second secondary splitter corresponding to the target ONU.

[0009] In a fourth aspect, an embodiment of the present application provides a PON topology prediction device, comprising: an acquisition module, used to obtain a set to be predicted based on PON topology data registered in the system, wherein the set to be predicted includes optical power data of a target ONU and optical power data of multiple ONUs connected to a selected secondary splitter; a prediction module, used to input the optical power data of the target ONU and the optical power data of multiple ONUs connected to the selected secondary splitter into the PON topology prediction model as described in the first aspect, to obtain a prediction result of the PON topology prediction model, wherein the prediction result is used to indicate whether the target ONU and the selected secondary splitter are connected; a determination module, used to determine the PON topology according to the prediction result; wherein the target ONU is any one of the multiple ONUs in the PON topology data, and the selected secondary splitter is any one of the multiple secondary splitters in the PON topology data.

[0010] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions are configured to be executed by the processor, and the executable instructions include instructions for executing the PON topology structure prediction model training method as described in the first aspect, or for executing the PON topology structure prediction method as described in the second aspect.

[0011] In a sixth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium is used to store computer-executable instructions, wherein the computer-executable instructions enable a computer to execute the PON topology structure prediction model training method as described in the first aspect, or to execute the PON topology structure prediction method as described in the second aspect.

[0012] In an embodiment of the present application, a first training sample set is obtained, wherein the first training sample set includes a first positive sample and a first negative sample; the first positive sample is optical power data of a target optical network unit ONU, and optical power data of multiple ONUs connected to a first and second-level optical splitter corresponding to the target ONU; the second negative sample is optical power data of the target ONU, and optical power data of multiple ONUs connected to a second and second-level optical splitter corresponding to the target ONU; wherein the first and second-level optical splitter is a secondary optical splitter connected to the target ONU and obtained based on PON topology data registered in the system; the second and second-level optical splitter is any secondary optical splitter other than the first and second-level optical splitter and obtained based on the PON topology data; the target ONU is any one of the multiple ONUs in the PON topology data; and the target secondary optical splitter is the first and second-level optical splitter corresponding to the target ONU or the second and second-level optical splitter corresponding to the target ONU. Furthermore, the deep learning model to be trained is trained according to the first training sample set to obtain a PON topology prediction model, the PON topology prediction model is used to predict whether the target ONU is connected to the target secondary splitter, and the feature extractor in the deep learning model to be trained is obtained based on the contrastive learning algorithm and is used to generate ONU embedded features. Compared with the model that only uses the clustering algorithm or the deep neural network, the technical solution is combined with the contrastive learning algorithm for training, which effectively enhances the robustness of the ONU embedded features generated by the feature extractor in the PON topology prediction model. In the case that it is impossible to provide enough positive samples for the training of the deep neural network model, or the optical power data of the ONU is interfered by noise, etc., it can still generate relatively accurate ONU embedded features, so as to accurately determine whether the optical power data of the target ONU is consistent with the optical power data of the ONU connected to the target secondary splitter, and achieve the effect that the trained PON topology prediction model can accurately predict whether the target ONU is connected to the target secondary splitter (the topology of the PON network). BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flow chart of a PON topology structure prediction model training method provided in an embodiment of the present application;

[0014] Figure 2 is a schematic diagram of PON topology data registered in a system provided in an embodiment of the present application;

[0015] Figure 3 It is a flowchart of another PON topology prediction model training method provided in an embodiment of the present application;

[0016] Figure 4It is a flow chart of a PON topology prediction method provided in an embodiment of the present application;

[0017] Figure 5 It is a structural schematic diagram of a PON topology prediction model training device provided in an embodiment of the present application;

[0018] Figure 6 It is a structural schematic diagram of a PON topology prediction device provided in an embodiment of the present application;

[0019] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0022] The following, in conjunction with the accompanying drawings, describes in detail the PON topology structure prediction model training and the PON topology structure prediction method provided by the embodiments of the present application through specific embodiments and their application scenarios.

[0023] Figure 1 A PON topology structure prediction model training method provided by an embodiment of the present invention is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:

[0024] S102: Obtain a first training sample set, the first training sample set including a first positive sample and a first negative sample; the first positive sample is optical power data of a target ONU and optical power data of multiple ONUs connected to first and second level optical splitters corresponding to the target ONU, and the second negative sample is optical power data of the target ONU and optical power data of multiple ONUs connected to second and second level optical splitters corresponding to the target ONU.

[0025] Among them, the first and second level splitters are the second level splitters connected to the target ONU and obtained based on the PON topology data registered in the system, the second level splitter is any one of the second level splitters except the first and second level splitters and obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target level splitter is the first and second level splitter corresponding to the target ONU or the second level splitter corresponding to the target ONU.

[0026] Specifically, the PON topology data registered in the system includes a plurality of secondary optical splitters, a plurality of ONUs, and connection relationships between the plurality of secondary optical splitters and the plurality of ONUs (each secondary optical splitter is connected to one or more ONUs).

[0027] This embodiment does not specifically limit the form of registering PON topology data in the system. For ease of understanding, Figure 2 The PON topology data registered in the system is shown in the form of as an example. Figure 2 As shown, the PON topology data registered in the system includes secondary optical splitter 201, secondary optical splitter 202, secondary optical splitter 203, ONU 204, ONU 205, ..., ONU 211 and ONU 212, as well as the connection relationship between the secondary optical splitter and the ONU.

[0028] It should be understood that any one of the multiple ONUs in the PON topology data can be used as the target ONU. Therefore, there are many possibilities for the target ONU, which can be any one of the above-mentioned ONU204, ONU205, ... and ONU212.

[0029] For example, if the target ONU is ONU204, the corresponding secondary optical splitter connected to ONU204 (target ONU) is secondary optical splitter 201, and secondary optical splitter 201 is the first secondary optical splitter. Then, the first positive sample is the optical power data of ONU204, ONU205 and ONU206. The second secondary splitter is any secondary splitter other than the first secondary splitter. Accordingly, the second secondary splitter may be a secondary splitter 202 or a secondary splitter 203 other than the secondary splitter 201 (the first secondary splitter). If the second secondary splitter is the secondary splitter 202, the first negative sample may be the optical power data of ONU204, the optical power data of ONU207, and the optical power data of ONU208. If the second secondary splitter is the secondary splitter 203, the first negative sample may be the optical power data of ONU204, the optical power data of ONU209, the optical power data of ONU210, the optical power data of ONU211, and the optical power data of ONU212.

[0030] It should be understood that the first positive sample and the first negative sample are correspondingly different for different target ONUs, so the first training sample set may include multiple first positive samples and corresponding multiple first negative samples.

[0031] The function of the secondary optical splitter is to realize the branching of optical signals. It can divide one input optical signal into multiple output optical signals in equal proportion. The optical signals (optical power data) output by the same secondary optical splitter to multiple ONUs connected to it are consistent.

[0032] S104: Train the deep learning model to be trained according to the first training sample set to obtain a PON topology structure prediction model, where the PON topology structure prediction model is used to predict whether the target ONU is connected to the target secondary splitter; the feature extractor in the deep learning model to be trained is obtained based on a contrastive learning algorithm and is used to generate ONU embedded features.

[0033] The feature extractor is used to generate an ONU embedded feature, and the ONU embedded feature is used to describe the features of the optical power data.

[0034] Optionally, the feature extractor may be a long short-term memory network (LSTM) or a Transformer neural network.

[0035] The contrastive learning algorithm is a self-supervised learning, or unsupervised learning. It trains the feature extractor in the deep learning model to be trained by data enhancement, so that the feature extractor can determine the similarity of the input ONU optical power data and generate highly robust ONU embedded features.

[0036] It should be noted that the feature extractor in the above-mentioned deep learning model to be trained is obtained by training based on the contrastive learning algorithm and is used to generate ONU embedded features. It is not limited to that the feature extractor in the deep learning model to be trained has been trained when training based on the contrastive learning algorithm, and no adjustment training is performed in the subsequent process. That is to say, before obtaining the PON topology structure prediction model, iterative training of the feature extractor in the deep learning model to be trained can still be performed based on the contrastive learning algorithm.

[0037] Optionally, the above-mentioned PON topology structure prediction model can determine whether the target ONU is connected to the target secondary splitter by determining the ONU embedding characteristics of the target ONU and the ONU embedding characteristics at the target secondary splitter level, or by determining the ONU embedding characteristics of the target ONU and the ONU embedding characteristics of any one of the multiple ONUs connected to the target secondary splitter.

[0038] The PON topology prediction model training method provided by the embodiment of the present invention obtains a first training sample set, the first training sample set includes a first positive sample and a first negative sample, the first positive sample is the optical power data of the target optical network unit ONU, and the optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, and the second negative sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU, wherein the first and second level optical splitters are the second level optical splitters connected to the target ONU and obtained based on the PON topology data registered in the system, the second level optical splitter is any one of the second level optical splitters other than the first and second level optical splitters obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target second level optical splitter is the first and second level optical splitter corresponding to the target ONU or the second and second level optical splitter corresponding to the target ONU. Furthermore, the deep learning model to be trained is trained according to the first training sample set to obtain a PON topology prediction model, which is used to predict whether the target ONU is connected to the target secondary splitter, and the feature extractor in the deep learning model to be trained is obtained based on the contrastive learning algorithm and is used to generate ONU embedded features. Compared with the model that only uses the clustering algorithm or the deep neural network, the technical solution is combined with the contrastive learning algorithm for training, which effectively enhances the robustness of the ONU embedded features generated by the feature extractor in the PON topology prediction model. In the case that it is impossible to provide enough positive samples for the training of the deep neural network model, or the optical power data of the ONU is interfered by noise, etc., it can still generate relatively accurate ONU embedded features, thereby determining whether the optical power data of the target ONU is consistent with the optical power data of the ONU connected to the target secondary splitter, and achieving the effect that the trained PON topology prediction model can accurately predict whether the target ONU is connected to the target secondary splitter (the topology of the PON network).

[0039] In one implementation, the deep learning model to be trained further includes a first attention unit, a second attention unit, a bidirectional long short-term memory (BiLSTM) network and a multilayer perceptron (MLP); the first attention unit and the second attention unit are used to determine the weights of the ONU embedded features of multiple ONUs connected to the target secondary splitter; the BiLSTM network is used to interact with the ONU embedded features of multiple ONUs connected to the target secondary splitter; the MLP is used to determine the connection probability of the target secondary splitter and the target ONU.

[0040] It should be understood that the above-mentioned PON topology structure prediction model is obtained by training the deep learning model to be trained. Similarly, the above-mentioned PON topology structure prediction model also includes: a feature extractor, a first attention unit, a second attention unit, a BiLSTM network and an MLP.

[0041] The attention unit may be in the form of an inner product, MLP or other network, without specific limitation, and it only needs to be able to calculate the weight coefficients of the ONU embedding features of multiple ONUs connected to the target secondary splitter.

[0042] In one implementation, training the deep learning model to be trained according to the first training sample set (i.e., S104) can be specifically performed as follows: Steps A1 to A9:

[0043] Step A1: input the first positive sample or the first negative sample into the deep learning model to be trained.

[0044] Step A2: Based on the feature extractor, the optical power data of the target ONU and the optical power data of multiple ONUs connected to the target secondary optical splitter are processed to obtain the embedded features of the target ONU and the first embedded feature sequence of the target secondary optical splitter.

[0045] The first embedded feature sequence of the target secondary optical splitter is a sequence obtained by concatenating multiple ONU embedded features corresponding to multiple ONUs connected to the target secondary optical splitter.

[0046] Exemplarily, the optical power data of the target ONU input to the deep learning model to be trained is x t , the optical power data of multiple ONUs connected to the target secondary optical splitter is L c =[x1,x2,…,x l ], where l is the number of ONUs connected to the target secondary optical splitter. The optical power data x of the target ONU is extracted by the feature extractor in the deep learning model to be trained. t Perform feature extraction to obtain the embedded feature Z of the target ONU t , the optical power data L of multiple ONUs connected to the target secondary optical splitter c =[x1,x2,…,x l ] to extract features, and then obtain the corresponding embedded features of each ONU in the multiple ONUs connected to the target secondary optical splitter (multiple ONU embedded features corresponding to the multiple ONUs), and then perform a splicing operation on the multiple ONU embedded features corresponding to the multiple ONUs connected to the target secondary optical splitter to obtain the first embedded feature sequence E of the target secondary optical splitter Lc =[Z1,Z2,…,Z l ].

[0047] Step A3: determining, by a first attention unit, a first weight of each ONU embedded feature in a first embedded feature sequence of a target secondary optical splitter.

[0048] Step A4: determining a first embedding representation of the target secondary optical splitter according to the first weight.

[0049] Determine the first embedding feature sequence E of the target secondary splitter by the first attention unit in the deep learning model to be trained Lc =[Z1,Z2,…,Z l The first weight α of each ONU embedding feature in i , and then according to multiple first weights α i , determine the first embedding representation Z of the target secondary splitter att :

[0050]

[0051] Among them, Z i is the first embedded feature sequence [Z1, Z2, …, Z l ], is the embedding feature of the target ONU (the embedding feature Z of the target ONU mentioned above t , in order to be consistent with [Z1,Z2,…,Z l ], using the embedded features Sigmoid has a normalization effect here and is part of the first attention calculation unit.

[0052] Step A5: Perform feature interaction on multiple ONU embedded features in the first embedded feature sequence of the target secondary optical splitter through a BiLSTM network to obtain a second embedded feature sequence of the target secondary optical splitter.

[0053] Specifically, the first embedding feature sequence [Z1, Z2, …, Z l ] to embed features of multiple ONUs for feature interaction:

[0054] [O1,O2,…,O l ]=BiLSTM([Z1,Z2,…,Z l ]), where [O1,O2,…,O l ] is the second embedded feature sequence of the target secondary spectrometer obtained after feature interaction.

[0055] Step A6: determining, by a second attention unit, a second weight of each ONU embedded feature in a second embedded feature sequence of the target secondary optical splitter.

[0056] Step A7: determining a second embedding representation of the target secondary optical splitter according to the second weight.

[0057] The second embedding feature sequence [O1, O2, …, O l The second weight β of each ONU embedding feature in i , according to multiple second weights β i Determine the second embedding representation O of the target secondary splitter att :

[0058]

[0059] Among them, O i is the second embedded feature sequence [O1, O2, …, O l ], Same as above.

[0060] Step A8, concatenating the embedded features of the target ONU, the first embedded representation, and the second embedded representation to obtain multi-dimensional features.

[0061] Specifically, the multi-dimensional features can be [Z t ,Z att ,O att ].

[0062] Step A9, classifying and processing the multi-dimensional features through MLP to determine the probability of the target ONU being connected to the target secondary optical splitter.

[0063] Specifically, the multi-dimensional features are classified and processed by MLP to determine the probability y of the target ONU being connected to the target secondary splitter. p :

[0064] y p =sigmoid(ReLU(W2(ReLU(W1[Z t ,Z att ,O att ]+b1)+b2))).

[0065] Among them, W1, W2, b1 and b2 are the parameters that need to be trained. The loss l is calculated by the following formula (1): p train:

[0066]

[0067] In this embodiment, compared with directly using a convolutional neural network to extract features, the above-mentioned deep learning model to be trained (PON topology prediction model) designs a multi-layer attention mechanism on the deep neural network structure, and performs multi-layer feature interaction and extraction on the optical power data of the ONU connected to the same target secondary splitter. It can obtain more accurate features at the target secondary splitter level, thereby improving the accuracy of the PON topology prediction model classification, and subsequently improving the accuracy of matching the target ONU to the corresponding secondary splitter in the application stage of PON topology prediction based on the PON topology prediction model.

[0068] In one implementation, before training the deep learning model to be trained according to the first training sample set (ie, S104), the deep learning model to be trained can be obtained by performing the following steps B1 to B2:

[0069] Step B1, obtaining a second training sample set, the second training sample set includes a second sample and a third sample corresponding to the second sample, the second positive sample is the optical power data of the target ONU, and the third sample is the optical power data of multiple ONUs connected to the second secondary splitter in the PON topology data.

[0070] Step B2: Based on the second training sample set, the initial deep learning model to be trained is trained according to the contrastive learning algorithm to obtain the deep learning model to be trained.

[0071] In order to enable the initial deep learning model to be trained to learn which of the input ONU optical power data are similar and which are different (to be able to determine the similarity of the input ONU optical power data), the second sample obtained and the third sample corresponding to the second sample, the optical power data of the ONUs corresponding to the two samples need to be inconsistent. If the second sample is the optical power data of the target ONU, the third sample corresponding to the second sample is the ONU optical power data connected to the secondary splitter other than the first and second splitters (the secondary splitter connected to the target ONU) in the above-mentioned PON topology structure data.

[0072] It should be understood that any one of the multiple ONUs in the PON topology data can be used as the target ONU. Therefore, there are multiple possibilities for the target ONU. Different target ONUs have different second samples, and the third samples corresponding to the second samples are also different. Therefore, the second training sample set can include multiple second samples and multiple third samples corresponding to the second samples.

[0073] In one implementation, obtaining the first training sample set (ie, S102), or obtaining the second training sample set (ie, step B1), can be specifically performed as follows: step C1 to step C6:

[0074] Step C1, obtaining PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data.

[0075] Step C2, matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data.

[0076] Specifically, outliers are data points that are clearly beyond the normal data range, and null values ​​can be filled using the mean or constant based on the actual data.

[0077] Step C3, dividing the optical power data of each ONU in the first data according to a preset time length to obtain second data.

[0078] The optical power data of ONU generally has a long time span, which may be several months or even longer. If it is used directly, a large amount of data needs to be mined for features, and since the time length of the optical power data of each ONU is not necessarily the same, it is not convenient to compare the features. If only the power data in a shorter time is compared, the features of the entire data may not be captured, resulting in deviations in the prediction results. By dividing the optical power data of ONU according to the preset time length, the optical power data of ONUs including multiple preset time lengths are obtained, which can facilitate accurate extraction and comparative calculation of features (effective information).

[0079] Step C4, performing Min-Max normalization on the second data to obtain third data.

[0080] There are large differences in basic information such as the mean and variance of different secondary spectrometers. Directly using the second data with large differences in basic information such as the mean and variance of different secondary spectrometers will affect the learning effect of the model, and the gradient descent will be slow or non-convergent. By performing Min-Max normalization on the second data, the third data with the difference in basic information such as the mean and variance of different secondary spectrometers is obtained, and the model is subsequently trained through the third data, which can improve the optimization efficiency of the model parameters.

[0081] Step C5: Process the third data according to the Savitzky-Golay convolution smoothing algorithm to obtain target data.

[0082] Processing the third data by using the Savitzky-Golay convolution smoothing algorithm can improve the smoothness of the optical power data, reduce noise interference, and reduce the problem of inconsistent waveforms of optical power data of ONUs connected to the same optical splitter due to noise interference.

[0083] Step C6: obtaining a first training sample set from the target data, or obtaining a second training sample set from the target data.

[0084] Optionally, the first training sample set may be obtained from the target data, or the second training sample set may be obtained from the target data, or both the first training sample set and the second training sample set may be obtained from the target data.

[0085] For example, taking the optical power data of the target ONU in the first training sample set and the second training sample set as an example, the optical power data of the target ONU is x t =[s1,s2,…,s i …,s n ], where n is the number of time slices into which the optical power data of the ONU is divided according to the preset time length, and s i It is the optical power data of each time slice.

[0086] Since the optical power data of the ONU in the target data includes optical power data of multiple time slices, correspondingly, in the above step A2, specifically, the optical power data x of the target ONU is extracted by the feature extractor in the deep learning model to be trained. t After feature extraction, splicing operation is required to obtain the embedded feature Z of the target ONU. t , the optical power data L of multiple ONUs connected to the target secondary optical splitter c =[x1,x2,…,x l ] to extract features, and then a splicing operation is also required to obtain multiple ONU embedded features corresponding to the multiple ONUs connected to the target secondary splitter.

[0087] For example, the optical power data x of the target ONU is extracted by a feature extractor. t =[s1,s2,…,s i …,s n ] to obtain the embedded feature Z of the target ONU t ,for:

[0088] Z t =concat([Enc(s1),Enc(s2),…,Enc(s n )])

[0089] In this embodiment, noise is reduced by multiple methods, and effective information in the optical power data of the ONU is extracted to obtain high-quality sample data, thereby training a PON topology prediction model with better prediction effect.

[0090] In one implementation, the initial deep learning model to be trained further includes a proxy function module and a similarity calculation module;

[0091] Based on the second training sample set, the initial deep learning model to be trained is trained according to the contrastive learning algorithm (i.e., step B2), which can be specifically performed as follows: steps b1 to b4:

[0092] Step b1: input the second sample and the third sample into the initial deep learning model to be trained.

[0093] Step b2: Process the second sample through two different proxy tasks of the proxy function module to obtain a second positive sample pair, and process the third sample to obtain multiple second negative sample pairs.

[0094] Step b3: Process the second positive sample pair and the multiple second negative sample pairs through a feature extractor to obtain a first embedded representation corresponding to the second positive sample pair, a second embedded representation, and multiple third embedded representations corresponding to the multiple second negative sample pairs.

[0095] Data enhancement methods are usually used as proxy tasks, such as adding Gaussian noise, random data loss, adding time shift, etc.

[0096] Exemplarily, through two different proxy tasks (for example, one proxy task is to add Gaussian noise, and the other proxy task is to add time shift), for the optical power data x (second sample) of a target ONU, a second positive sample pair {x i ,x j}, for the optical power data of multiple ONUs connected to the second secondary optical splitter in the PON topology data (the third sample corresponding to the second sample), generate multiple second negative sample pairs.

[0097] The second positive sample pair and the plurality of second negative sample pairs are processed by the feature extractor to obtain a first embedding representation corresponding to the second positive sample pair, a second embedding representation, and a plurality of third embedding representations Z corresponding to the plurality of second negative sample pairs. k .

[0098] Step b4: determining the similarity between the first embedded representation and the second embedded representation, or determining the similarity between the first embedded representation and the third embedded representation, or determining the similarity between the second embedded representation and the third embedded representation according to the similarity calculation module.

[0099] According to the similarity calculation module, the similarity between the first embedded representation and the second embedded representation is determined: sim(z i ,z j ), or, determining the similarity sim(z i ,z k ), or, determining the similarity sim(zj ,z k ).

[0100] Optionally, the similarity calculation module may be an MLP or a cosine similarity calculation function.

[0101] Based on the second training sample set, the loss function for training the initial deep learning model to be trained according to the contrastive learning algorithm can adopt NCEloss, which is specifically as follows:

[0102]

[0103] Wherein, N is the number of optical power data of ONUs included in a batch of the second training sample set (a second sample and a third sample corresponding to the second sample constitute a batch). After the above-mentioned proxy task processing, the number of samples becomes 2N. τ is a hyperparameter. Generally, it is a number less than 1, such as 0.1, which is used to amplify the difference in value.

[0104] In the above formula, the numerator considers the similarity between the embedded representations (same category) corresponding to the optical power data of the same ONU processed by different proxy tasks, while the denominator considers the similarity between the embedded representations (different categories) corresponding to the optical power data of different ONUs processed by the same or different proxy tasks. By dividing the logarithm by τ (a decimal), the result can be amplified. The smaller the distance between the same category, the larger the distance between different categories.

[0105] Specifically, according to the loss Perform iterative training, and after the training is completed, remove the proxy function module and the similarity calculation module to obtain the PON topology structure prediction model. It consists of two parts: one is the loss l of training the initial deep learning model to be trained according to the contrastive learning algorithm c , see the above formula (2), and the other part see the loss l of the above formula (1) p , specifically,

[0106] In this embodiment, the sample data (the second sample and the third sample) are processed based on the proxy task, the number of samples is increased, and the information characteristics of the samples are enhanced. The sample data processed by the proxy task is then used to train the initial deep learning model to be trained. This can enhance the information extraction capability of the feature extractor in the final PON topology structure prediction model for the input data, alleviate the problem of few positive samples, and enable the feature extractor to determine the similarity of the input ONU optical power data, generate highly robust ONU embedded features, and improve the training effect of the PON topology structure prediction model.

[0107] Figure 3 FIG. 1 is a flow chart of another PON topology prediction model training method provided by an embodiment of the present application. Figure 3 As shown, the method may include the following S302-S316:

[0108] S302: Acquire PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data.

[0109] S304, matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data.

[0110] S306, dividing the optical power data of each ONU in the first data according to a preset time length to obtain second data.

[0111] S308, performing Min-Max normalization on the second data to obtain third data.

[0112] S310, processing the third data according to a Savitzky-Golay convolution smoothing algorithm to obtain target data;

[0113] S312, obtaining a first training sample set and a second training sample set from the target data, wherein the first training sample set includes a first positive sample and a first negative sample, and the second training sample set includes a second sample and a third sample corresponding to the second sample.

[0114] Among them, the first positive sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the first and second level splitters corresponding to the target ONU, and the second negative sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the second and second level splitters corresponding to the target ONU; the first and second level splitters are the second level splitters connected to the target ONU based on the PON topology data registered in the system, the second level splitters are any second level splitters other than the first and second level splitters obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, the target second level splitter is the first and second level splitter corresponding to the target ONU or the second and second level splitter corresponding to the target ONU; the second sample is the optical power data of the target ONU, and the third sample is the optical power data of any one of the multiple ONUs connected to the second and second level splitter in the PON topology data.

[0115] S314: Based on the second training sample set, the initial deep learning model to be trained is trained according to a contrastive learning algorithm to obtain a deep learning model to be trained.

[0116] Among them, the initial deep learning model to be trained includes a proxy function module and a similarity calculation module.

[0117] S316, training the deep learning model to be trained according to the first training sample set to obtain a PON topology structure prediction model, where the PON topology structure prediction model is used to predict whether the target ONU is connected to the target secondary splitter.

[0118] The PON topology structure prediction model is a deep neural network model obtained by removing the proxy function module and the similarity calculation module from the trained deep learning model to be trained. The PON topology structure prediction model includes a feature extractor, a first attention unit, a second attention unit, a BiLSTM network and an MLP.

[0119] The specific process of S302-S316 has been described in detail in the above embodiment and will not be repeated here.

[0120] In this embodiment, the PON topology data registered in the system and the optical power data of multiple ONUs in the PON topology data are obtained, the PON topology data and the optical power data of multiple ONUs in the PON topology data are matched, and outliers are eliminated and null values ​​are filled to obtain first data, the optical power data of each ONU in the first data is segmented according to a preset time length to obtain second data, the second data is Min-Max normalized to obtain third data, and the third data is processed according to the Savitzky-Golay convolution smoothing algorithm to obtain target data. Then, a first training sample set and a second training sample set are obtained from the target data, the first training sample set includes a first positive sample and a first negative sample, and the second training sample set includes a second sample and a third sample corresponding to the second sample. Based on the second training sample set, the initial deep learning model to be trained is trained according to the contrast learning algorithm to obtain a deep learning model to be trained, and the deep learning model to be trained is trained according to the first training sample set, and finally a PON topology prediction model is obtained, and the PON topology prediction model is used to predict whether the target ONU is connected to the target secondary splitter. Compared with the model that only uses clustering algorithm or deep neural network, this technical solution can reduce noise and extract effective information in the sequence due to preprocessing of sample data (segmentation according to preset time length, Min-Max normalization, Savitzky-Golay convolution smoothing algorithm). Combined with contrast learning algorithm for training, the sample data is further enhanced, and finally the robustness of ONU embedded features generated by feature extractor in PON topology prediction model is effectively enhanced. In the case that sufficient positive samples cannot be provided for the training of deep neural network model, or the optical power data of ONU is interfered by noise, it can still generate relatively accurate ONU embedded features, so as to determine whether the optical power data of target ONU is consistent with the optical power data of ONU connected to target secondary optical splitter, so as to achieve the effect that the trained PON topology prediction model can accurately predict whether the target ONU is connected to the target secondary optical splitter (topology of PON network).

[0121] Corresponding to the above Figures 1 to 3 The PON topology structure prediction model training method described above is based on the same technical concept. The embodiment of the present application also provides a PON topology structure prediction method. Figure 4 A flowchart of a PON topology prediction method provided in an embodiment of the present application is provided. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:

[0122] S402, based on the PON topology data registered in the system, a set to be predicted is obtained, where the set to be predicted includes optical power data of a target ONU and optical power data of multiple ONUs connected to the selected secondary optical splitter.

[0123] The target ONU is any one of the multiple ONUs in the PON topology structure data, and the secondary optical splitter to be selected is any one of the multiple secondary optical splitters in the PON topology structure data.

[0124] Specifically, in order to predict the PON topology structure, the set to be predicted includes at least optical power data of a target ONU and optical power data of a plurality of ONUs connected to a selected secondary optical splitter.

[0125] The above set to be predicted can be obtained through the following steps:

[0126] Acquire PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data;

[0127] Matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data;

[0128] The optical power data of each ONU in the first data is divided according to a preset time length to obtain second data;

[0129] Performing Min-Max normalization on the second data to obtain third data;

[0130] According to the Savitzky-Golay convolution smoothing algorithm, the third data is processed to obtain the target data;

[0131] Get the set to be predicted from the target data.

[0132] S404, inputting the optical power data of the target ONU and the optical power data of multiple ONUs connected to the selected secondary splitter into the PON topology structure prediction model of any of the above embodiments to obtain a prediction result of the PON topology structure prediction model, wherein the prediction result is used to indicate whether the target ONU and the selected secondary splitter are connected.

[0133] Specifically, the PON topology prediction model includes: a feature extractor, a first attention unit, a second attention unit, a BiLSTM network and an MLP.

[0134] S406: Determine the PON topology structure according to the prediction result.

[0135] The target ONU is any one of the multiple ONUs in the PON topology structure data, and the secondary optical splitter to be selected is any one of the multiple secondary optical splitters in the PON topology structure data.

[0136] It should be noted that the training process of the PON topology prediction model can refer to the specific implementation process of the above embodiment, which will not be repeated here.

[0137] In the PON topology prediction method in the embodiment of the present application, the PON topology prediction model used introduces a contrastive learning algorithm to enhance optical power data and embedding representation in the model training phase, which can alleviate the problem of scarcity of positive samples and reduce the impact of noise, delay, etc., and the PON topology prediction model captures the characteristics of the secondary splitter level, predicts the secondary splitter to which the ONU belongs (is connected), and finally obtains the complete topology of the entire PON network. Through intelligent PON topology prediction, the efficiency of PON network management can be improved, and staff can more accurately allocate resources and locate faults.

[0138] Based on the same idea as the PON topology structure prediction model training method provided in one or more of the above embodiments, one or more embodiments of this specification further provide a PON topology structure prediction model training device.

[0139] Corresponding to the PON topology structure prediction model training method provided in the above embodiment, based on the same technical concept, the embodiment of the present invention also provides a PON topology structure prediction model training device, Figure 5 1 is a schematic diagram of a PON topology structure prediction model training device according to an embodiment of the present invention, wherein the PON topology structure prediction model training device is used to perform Figures 1 to 3 The PON topology prediction model training method described in Figure 5 As shown, the PON topology structure prediction model training device includes: an acquisition module 510 and a training module 520.

[0140] The acquisition module 510 is used to acquire a first training sample set, where the first training sample set includes a first positive sample and a first negative sample, where the first positive sample is optical power data of a target ONU and optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, and the second negative sample is optical power data of the target ONU and optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU;

[0141] A training module 520 is used to train the deep learning model to be trained according to the first training sample set to obtain a PON topology structure prediction model, where the PON topology structure prediction model is used to predict whether the target ONU is connected to the target secondary splitter; the feature extractor in the deep learning model to be trained is obtained based on a contrastive learning algorithm and is used to generate ONU embedded features;

[0142] Among them, the first and second level splitters are the second level splitters connected to the target ONU and obtained based on the PON topology data registered in the system, the second level splitter is any one of the second level splitters except the first and second level splitters and obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target level splitter is the first and second level splitter corresponding to the target ONU or the second level splitter corresponding to the target ONU.

[0143] In one implementation, the deep learning model to be trained also includes a first attention unit, a second attention unit, a bidirectional long short-term memory BiLSTM network and a multi-layer perceptron MLP; the first attention unit and the second attention unit are used to determine the weights of the ONU embedded features of multiple ONUs connected to the target secondary splitter; the BiLSTM network is used to interact with the ONU embedded features of multiple ONUs connected to the target secondary splitter; the MLP is used to determine the connection probability of the target secondary splitter and the target ONU.

[0144] In one implementation, the training module 520 is specifically configured to:

[0145] Inputting the first positive sample or the first negative sample into the deep learning model to be trained;

[0146] Based on the feature extractor, the optical power data of the target ONU and the optical power data of multiple ONUs connected to the target secondary optical splitter are processed to obtain the embedded features of the target ONU and the first embedded feature sequence of the target secondary optical splitter, wherein the first embedded feature sequence of the target secondary optical splitter is a sequence obtained by splicing multiple ONU embedded features corresponding to the multiple ONUs connected to the target secondary optical splitter;

[0147] Determine, by a first attention unit, a first weight of each ONU embedded feature in a first embedded feature sequence of a target secondary optical splitter;

[0148] Determining a first embedding representation of the target secondary splitter according to the first weight;

[0149] Perform feature interaction on multiple ONU embedded features in the first embedded feature sequence of the target secondary optical splitter through a BiLSTM network to obtain a second embedded feature sequence of the target secondary optical splitter;

[0150] Determining, by a second attention unit, a second weight of each ONU embedded feature in a second embedded feature sequence of the target secondary optical splitter;

[0151] Determining a second embedding representation of the target secondary splitter according to the second weight;

[0152] The embedded features of the target ONU, the first embedded representation, and the second embedded representation are concatenated to obtain multi-dimensional features;

[0153] The multi-dimensional features are classified and processed by MLP to determine the probability of the target ONU being connected to the target secondary splitter.

[0154] In one implementation, the PON topology structure prediction model training device further includes:

[0155] The sample acquisition module 530 is used to acquire a second training sample set, where the second training sample set includes a second sample and a third sample corresponding to the second sample, where the second sample is optical power data of a target ONU, and the third sample is optical power data of a plurality of ONUs connected to the second secondary optical splitter in the PON topology data;

[0156] The deep learning model to be trained training module 540 is used to train the initial deep learning model to be trained based on the second training sample set and according to the contrastive learning algorithm to obtain the deep learning model to be trained.

[0157] In one implementation, the acquisition module 510, or the sample acquisition module 530, is specifically configured to:

[0158] Acquire PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data;

[0159] Matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data;

[0160] The optical power data of each ONU in the first data is divided according to a preset time length to obtain second data;

[0161] Performing Min-Max normalization on the second data to obtain third data;

[0162] According to the Savitzky-Golay convolution smoothing algorithm, the third data is processed to obtain the target data;

[0163] A first training sample set is obtained from the target data, or a second training sample set is obtained from the target data.

[0164] In one implementation, the initial deep learning model to be trained further includes a proxy function module and a similarity calculation module; the deep learning model to be trained training module 540 is specifically used to:

[0165] Inputting the second sample and the third sample into the initial deep learning model to be trained;

[0166] The second sample is processed by two different proxy tasks of the proxy function module to obtain a second positive sample pair, and the third sample is processed to obtain multiple second negative sample pairs;

[0167] Processing the second positive sample pair and the plurality of second negative sample pairs by a feature extractor to obtain a first embedding representation and a second embedding representation corresponding to the second positive sample pair and a plurality of third embedding representations corresponding to the plurality of second negative sample pairs;

[0168] According to the similarity calculation module, the similarity between the first embedded representation and the second embedded representation is determined, or the similarity between the first embedded representation and the third embedded representation is determined, or the similarity between the second embedded representation and the third embedded representation is determined.

[0169] The PON topology prediction model training device provided by the embodiment of the present invention obtains a first training sample set, the first training sample set includes a first positive sample and a first negative sample, the first positive sample is the optical power data of the target optical network unit ONU, and the optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, the first negative sample is the optical power data of the target ONU, and the optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU, wherein the first and second level optical splitters are the second level optical splitters connected to the target ONU obtained based on the PON topology data registered in the system, the second level optical splitter is any one of the second level optical splitters other than the first and second level optical splitters obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target second level optical splitter is the first and second level optical splitter corresponding to the target ONU or the second and second level optical splitter corresponding to the target ONU. Furthermore, the deep learning model to be trained is trained according to the first training sample set to obtain a PON topology prediction model, which is used to predict whether the target ONU is connected to the target secondary splitter, and the feature extractor in the deep learning model to be trained is obtained based on the contrastive learning algorithm and is used to generate ONU embedded features. Compared with the model that only uses the clustering algorithm or the deep neural network, the technical solution is combined with the contrastive learning algorithm for training, which effectively enhances the robustness of the ONU embedded features generated by the feature extractor in the PON topology prediction model. In the case that it is impossible to provide enough positive samples for the training of the deep neural network model, or the optical power data of the ONU is interfered by noise, etc., it can still generate relatively accurate ONU embedded features, thereby determining whether the optical power data of the target ONU is consistent with the optical power data of the ONU connected to the target secondary splitter, and achieving the effect that the trained PON topology prediction model can accurately predict whether the target ONU is connected to the target secondary splitter (the topology of the PON network).

[0170] Those skilled in the art should understand that the above-mentioned PON topology structure prediction model training device can be used to implement the PON topology structure prediction model training method mentioned above, and the detailed description thereof should be similar to the description of the method part mentioned above, and will not be repeated here to avoid repetition.

[0171] Based on the same idea as the PON topology structure prediction method provided in one or more embodiments above, one or more embodiments of this specification further provide a PON topology structure prediction device.

[0172] Corresponding to the PON topology prediction method provided in the above embodiment, based on the same technical concept, the embodiment of the present invention also provides a PON topology prediction device, Figure 6is a schematic diagram of a PON topology prediction device according to an embodiment of the present invention, wherein the PON topology prediction device is used to perform Figure 4 The PON topology prediction method described in Figure 6 As shown, the PON topology structure prediction device includes: a set acquisition module 610 , a prediction module 620 and a determination module 630 .

[0173] A set acquisition module 610 is used to obtain a set to be predicted based on the PON topology data registered in the system, where the set to be predicted includes the optical power data of the target ONU and the optical power data of multiple ONUs connected to the selected secondary optical splitter;

[0174] Prediction module 620, used for inputting the optical power data of the target ONU and the optical power data of the multiple ONUs connected to the selected secondary optical splitter into the PON topology prediction model, and obtaining the prediction result of the PON topology prediction model, and the prediction result is used to indicate whether the target ONU is connected to the selected secondary optical splitter;

[0175] A determination module 630 is used to determine the PON topology according to the prediction result;

[0176] The target ONU is any one of the multiple ONUs in the PON topology structure data, and the secondary optical splitter to be selected is any one of the multiple secondary optical splitters in the PON topology structure data.

[0177] In one implementation, the set acquisition module 610 is specifically configured to:

[0178] Acquire PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data;

[0179] Matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data;

[0180] The optical power data of each ONU in the first data is divided according to a preset time length to obtain second data;

[0181] Performing Min-Max normalization on the second data to obtain third data;

[0182] According to the Savitzky-Golay convolution smoothing algorithm, the third data is processed to obtain the target data;

[0183] Get the set to be predicted from the target data.

[0184] In the PON topology prediction device in the embodiment of the present application, the PON topology prediction model used introduces a contrastive learning algorithm to enhance optical power data and embedding representation in the model training phase, which can alleviate the problem of scarcity of positive samples and reduce the impact of noise, delay, etc., and the PON topology prediction model captures the characteristics of the secondary splitter level, predicts the secondary splitter to which the ONU belongs (is connected), and finally obtains the complete topology of the entire PON network. Through intelligent PON topology prediction, the efficiency of PON network management can be improved, and staff can more accurately allocate resources and locate faults.

[0185] Those skilled in the art should understand that the above-mentioned PON topology structure prediction device can be used to implement the above-mentioned PON topology structure prediction method, and the detailed description thereof should be similar to the description of the above-mentioned method part, and will not be repeated here to avoid repetition.

[0186] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned PON topology structure prediction model training method, or to execute the above-mentioned PON topology structure prediction method. Figure 7 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 710, a communication interface (CommunicationsInterface) 720, a memory (memory) 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program stored in the memory 730 and executable on the processor 710 to perform the following steps:

[0187] Obtain a first training sample set, the first training sample set including a first positive sample and a first negative sample, the first positive sample is optical power data of a target ONU and optical power data of multiple ONUs connected to a first and second level optical splitter corresponding to the target ONU, and the second negative sample is optical power data of the target ONU and optical power data of multiple ONUs connected to a second and second level optical splitter corresponding to the target ONU;

[0188] The deep learning model to be trained is trained according to the first training sample set to obtain a PON topology structure prediction model, where the PON topology structure prediction model is used to predict whether a target ONU is connected to a target secondary optical splitter; a feature extractor in the deep learning model to be trained is obtained based on a contrastive learning algorithm and is used to generate ONU embedded features;

[0189] Among them, the first and second level splitters are the second level splitters connected to the target ONU and obtained based on the PON topology data registered in the system, the second level splitter is any one of the second level splitters except the first and second level splitters and obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target level splitter is the first and second level splitter corresponding to the target ONU or the second level splitter corresponding to the target ONU.

[0190] Alternatively, follow these steps:

[0191] Based on the PON topology data registered in the system, a set to be predicted is obtained, where the set to be predicted includes optical power data of a target ONU and optical power data of multiple ONUs connected to the selected secondary optical splitter;

[0192] Inputting the optical power data of the target ONU and the optical power data of multiple ONUs connected to the selected secondary optical splitter into the above PON topology prediction model to obtain the prediction result of the PON topology prediction model, which is used to indicate whether the target ONU and the selected secondary optical splitter are connected;

[0193] Determine the PON topology according to the prediction results;

[0194] The target ONU is any one of the multiple ONUs in the PON topology structure data, and the secondary optical splitter to be selected is any one of the multiple secondary optical splitters in the PON topology structure data.

[0195] The technical solution of one or more embodiments of the present specification is adopted, by obtaining a first training sample set, the first training sample set includes a first positive sample and a first negative sample, the first positive sample is the optical power data of the target optical network unit ONU, and the optical power data of multiple ONUs connected to the first and second level splitters corresponding to the target ONU, the second negative sample is the optical power data of the target ONU, and the optical power data of multiple ONUs connected to the second and second level splitters corresponding to the target ONU, wherein the first and second level splitters are the second level splitters connected to the target ONU obtained based on the PON topology data registered in the system, the second level splitter is any one of the second level splitters other than the first and second level splitters obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target level splitter is the first and second level splitter corresponding to the target ONU or the second level splitter corresponding to the target ONU. Furthermore, the deep learning model to be trained is trained according to the first training sample set to obtain a PON topology prediction model, which is used to predict whether the target ONU is connected to the target secondary splitter, and the feature extractor in the deep learning model to be trained is obtained based on the contrastive learning algorithm and is used to generate ONU embedded features. Compared with the model that only uses the clustering algorithm or the deep neural network, the technical solution is combined with the contrastive learning algorithm for training, which effectively enhances the robustness of the ONU embedded features generated by the feature extractor in the PON topology prediction model. In the case that it is impossible to provide enough positive samples for the training of the deep neural network model, or the optical power data of the ONU is interfered by noise, etc., it can still generate relatively accurate ONU embedded features, thereby determining whether the optical power data of the target ONU is consistent with the optical power data of the ONU connected to the target secondary splitter, and achieving the effect that the trained PON topology prediction model can accurately predict whether the target ONU is connected to the target secondary splitter (the topology of the PON network).

[0196] The specific execution steps can refer to the above-mentioned PON topology structure prediction model training method embodiment and the various steps of the above-mentioned PON topology structure prediction method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0197] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.

[0198] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0199] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0200] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0201] The embodiment of the present application also provides a storage medium, on which computer executable instructions are stored. When the computer executable instructions are executed by a processor, the above-mentioned PON topology structure prediction model training method embodiment or the various processes of the above-mentioned PON topology structure prediction method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0202] The processor is the processor in the electronic device described in the above embodiment. The storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0203] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include multitasking and parallel processing according to the functions involved, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0205] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A passive optical network PON topology prediction model training method, characterized in that: include: Acquire a first training sample set, where the first training sample set includes a first positive sample and a first negative sample; The first positive sample is the optical power data of the target optical network unit ONU and the optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, and the second negative sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU; The deep learning model to be trained is trained according to the first training sample set to obtain a PON topology structure prediction model, wherein the PON topology structure prediction model is used to predict whether a target ONU is connected to a target secondary optical splitter; the feature extractor in the deep learning model to be trained is obtained based on a contrastive learning algorithm and is used to generate ONU embedded features; The first secondary optical splitter is a secondary optical splitter obtained based on the PON topology data registered in the system and connected to the target ONU, the second secondary optical splitter is any secondary optical splitter other than the first secondary optical splitter obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target secondary optical splitter is the first secondary optical splitter corresponding to the target ONU or the second secondary optical splitter corresponding to the target ONU.

2. The method according to claim 1, characterized in that The deep learning model to be trained also includes a first attention unit, a second attention unit, a bidirectional long short-term memory BiLSTM network and a multi-layer perceptron MLP; the first attention unit and the second attention unit are used to determine the weights of the ONU embedded features of multiple ONUs connected to the target secondary splitter; the BiLSTM network is used to interact with the ONU embedded features of multiple ONUs connected to the target secondary splitter; the MLP is used to determine the connection probability between the target secondary splitter and the target ONU.

3. The method according to claim 2, characterized in that The training of the deep learning model to be trained according to the first training sample set includes: Inputting the first positive sample or the first negative sample into the deep learning model to be trained; Based on the feature extractor, the optical power data of the target ONU and the optical power data of the multiple ONUs connected to the target secondary optical splitter are processed to obtain an embedded feature of the target ONU and a first embedded feature sequence of the target secondary optical splitter, wherein the first embedded feature sequence of the target secondary optical splitter is a sequence obtained by splicing multiple ONU embedded features corresponding to the multiple ONUs connected to the target secondary optical splitter; Determine, by the first attention unit, a first weight of each ONU embedded feature in the first embedded feature sequence of the target secondary optical splitter; Determining a first embedded representation of the target secondary splitter according to the first weight; Performing feature interaction on a plurality of ONU embedded features in the first embedded feature sequence of the target secondary optical splitter through the BiLSTM network to obtain a second embedded feature sequence of the target secondary optical splitter; Determine, by a second attention unit, a second weight of each ONU embedded feature in a second embedded feature sequence of the target secondary optical splitter; Determining a second embedded representation of the target secondary optical splitter according to a second weight; The embedded features of the target ONU, the first embedded representation, and the second embedded representation are concatenated to obtain multi-dimensional features; The multi-dimensional features are classified and processed by the MLP to determine the probability that the target ONU is connected to the target secondary optical splitter.

4. The method according to claim 1, characterized in that: Before training the deep learning model to be trained according to the first training sample set, the method further includes: Acquire a second training sample set, where the second training sample set includes a second sample and a third sample corresponding to the second sample, where the second positive sample is optical power data of a target ONU, and the third sample is optical power data of a plurality of ONUs connected to the second secondary optical splitter in the PON topology data; Based on the second training sample set, the initial deep learning model to be trained is trained according to the contrastive learning algorithm to obtain the deep learning model to be trained.

5. The method according to claim 1 or 4, characterized in that: The obtaining of the first training sample set or the obtaining of the second training sample set includes: Acquire PON topology data registered in the system and optical power data of multiple ONUs in the PON topology data; Matching the PON topology data and the optical power data of multiple ONUs in the PON topology data, and performing outlier removal and null value filling to obtain first data; The optical power data of each ONU in the first data is divided according to a preset time length to obtain second data; Performing Min-Max normalization on the second data to obtain third data; Processing the third data according to a Savitzky-Golay convolution smoothing algorithm to obtain target data; A first training sample set is obtained from the target data, or a second training sample set is obtained from the target data.

6. The method according to claim 4, characterized in that The initial deep learning model to be trained also includes a proxy function module and a similarity calculation module; the training of the initial deep learning model to be trained based on the second training sample set according to the contrastive learning algorithm includes: Inputting the second sample and the third sample into the initial deep learning model to be trained; Processing the second sample through two different proxy tasks of the proxy function module to obtain a second positive sample pair, and processing the third sample to obtain a plurality of second negative sample pairs; Processing the second positive sample pair and the plurality of second negative sample pairs by the feature extractor to obtain a first embedding representation and a second embedding representation corresponding to the second positive sample pair and a plurality of third embedding representations corresponding to the plurality of second negative sample pairs; According to the similarity calculation module, the similarity between the first embedded representation and the second embedded representation is determined, or the similarity between the first embedded representation and the third embedded representation is determined, or the similarity between the second embedded representation and the third embedded representation is determined.

7. A PON topology prediction method, characterized in that: include: Based on the PON topology data registered in the system, a set to be predicted is obtained, wherein the set to be predicted includes optical power data of a target ONU and optical power data of multiple ONUs connected to the selected secondary optical splitter; Inputting the optical power data of the target ONU and the optical power data of the multiple ONUs connected to the selected secondary optical splitter into the PON topology structure prediction model according to any one of claims 1 to 6, and obtaining a prediction result of the PON topology structure prediction model, wherein the prediction result is used to indicate whether the target ONU and the selected secondary optical splitter are connected; Determine the PON topology according to the prediction result; The target ONU is any one of the multiple ONUs in the PON topology structure data, and the to-be-selected secondary optical splitter is any one of the multiple secondary optical splitters in the PON topology structure data.

8. A PON topology prediction model training device, characterized in that: include: An acquisition module, configured to acquire a first training sample set, wherein the first training sample set includes a first positive sample and a first negative sample; The first positive sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the first and second level optical splitters corresponding to the target ONU, and the second negative sample is the optical power data of the target ONU and the optical power data of multiple ONUs connected to the second and second level optical splitters corresponding to the target ONU; A training module, used for training the deep learning model to be trained according to the first training sample set to obtain a PON topology prediction model, wherein the PON topology prediction model is used to predict whether a target ONU is connected to a target secondary splitter; a feature extractor in the deep learning model to be trained is obtained based on a contrastive learning algorithm and is used to generate ONU embedded features; The first secondary optical splitter is a secondary optical splitter obtained based on the PON topology data registered in the system and connected to the target ONU, the second secondary optical splitter is any secondary optical splitter other than the first secondary optical splitter obtained based on the PON topology data, the target ONU is any one of the multiple ONUs in the PON topology data, and the target secondary optical splitter is the first secondary optical splitter corresponding to the target ONU or the second secondary optical splitter corresponding to the target ONU.

9. An electronic device, characterized in that: The electronic device comprises: Processor; and A memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for executing the PON topology structure prediction model training method according to any one of claims 1 to 6, or for executing the PON topology structure prediction method according to claim 7.

10. A storage medium, characterized in that: The storage medium is used to store computer-executable instructions, and the computer-executable instructions enable a computer to execute the PON topology structure prediction model training method according to any one of claims 1 to 6, or to execute the PON topology structure prediction method according to claim 7.