Optical fiber positioning method and device for optical fiber wiring
By using the fiber positioning method of feature extraction, diversification coding and strengthening modules in fiber positioning, the problems of low positioning efficiency and poor accuracy of traditional fibers are solved, and intelligent and high-precision positioning of fiber wiring are achieved.
Patent Information
- Application Number
- CN202411280035.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-24
AI Technical Summary
Traditional fiber positioning methods rely on manual operations, are inefficient and difficult to ensure accuracy, especially in complex environments, and cannot meet the needs of fast wiring. The existing image recognition algorithms are difficult to capture important features, resulting in low positioning accuracy.
An optical fiber positioning method is adopted to collect fiber wiring images and input them to a pre-trained positioning model, including feature extraction module, feature dispersion encoding module and enhancement module, to perform initial feature extraction, feature dispersion and encoding based on significance and global feature enhancement, and the final output of positioning results. This method uses the encoder and nonlinear activation processing of the Transformer structure to capture the implicit association relationship and importance semantics of the fiber positioning state.
It realizes the intelligence of fiber positioning, improves positioning accuracy and efficiency, adapts to complex wiring environments, provides a fast and accurate positioning basis, and enhances the comprehensiveness and accuracy of the fiber wiring process.
Smart Images

Figure CN119180934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an optical fiber positioning method and device for optical fiber wiring. Background Art
[0002] With the rapid development of information technology, fiber optic communication has become the backbone of modern communication networks due to its advantages such as high bandwidth, low loss, and strong anti-interference. It is widely used in various fields, including communication networks, data centers, medical equipment, etc.
[0003] In the optical fiber communication system, optical fiber wiring plays a vital role, which involves the positioning, connection, and fiber patching of optical fibers. Optical fiber positioning refers to determining the position and connection status of optical fibers, which is the basis for operations such as optical fiber connection and fiber patching. The accuracy and efficiency of optical fiber positioning play a key role in the performance and stability of the entire communication system.
[0004] However, traditional fiber optic positioning usually requires manual operation. Operators need to manually connect the optical fiber to the correct port, which is not only cumbersome and inefficient, but also easily affected by human factors, resulting in positioning errors. Especially in complex environments with many optical cable cores and dense ports, manual positioning is often inefficient and difficult to guarantee accuracy. In addition, due to the small size of fiber optic patch cords and high alignment requirements, traditional manual positioning methods are often slow and cannot meet the needs of fast wiring. With the continuous expansion of the scale and complexity of communication networks, the traditional method of relying on manual operation for optical fiber positioning and wiring can no longer meet the needs of fast and accurate wiring.
[0005] With the development of artificial intelligence, image recognition has also been applied to the field of fiber optic positioning. However, there are many fiber optic wiring ports and dense optical fibers. Traditional image recognition algorithms find it difficult to capture important features, resulting in low positioning accuracy. Summary of the invention
[0006] The present invention provides an optical fiber positioning method and device for optical fiber wiring, which can improve the accuracy of optical fiber positioning.
[0007] An optical fiber positioning method for optical fiber wiring, comprising:
[0008] Collect optical fiber wiring images;
[0009] Inputting the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model includes a feature extraction module, a feature dispersion coding module, an enhancement module, and a result output module;
[0010] The feature extraction module performs initial feature extraction on the optical fiber wiring image to obtain a state feature map;
[0011] The feature dispersion and encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence;
[0012] The strengthening module strengthens the context fiber state feature vector sequence based on the saliency and globality of the feature to obtain a strengthened context fiber state feature vector sequence;
[0013] The result output module outputs a positioning result based on the enhanced context fiber state feature vector sequence.
[0014] Furthermore, the feature dispersion encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence, including:
[0015] Mapping each interval in the state feature map to a single value along the channel dimension to obtain a discrete feature;
[0016] The scattered features are encoded using an encoder based on a Transformer structure to obtain the context fiber state feature vector sequence.
[0017] Furthermore, the enhancement module enhances the features of the context fiber state feature vector sequence based on saliency and globality to obtain an enhanced context fiber state feature vector sequence, including:
[0018] Calculating the mean and maximum value of the context fiber state feature vector sequence respectively, and obtaining the context fiber state global representation vector and the context fiber state salient representation vector according to the calculation results of the mean and the maximum value;
[0019] Capturing and expressing the features of the context fiber state global representation vector and the context fiber state salient representation vector respectively to obtain the context fiber state global activation representation vector and the context fiber state salient activation representation vector;
[0020] The context fiber state global activation representation vector and the context fiber state salient activation representation vector are merged to obtain a context fiber state global-salient activation representation vector;
[0021] Performing nonlinear activation processing on the context fiber state global-salient activation representation vector to obtain a global-salient semantic association weight feature vector;
[0022] The context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector to obtain an enhanced context fiber state feature vector sequence.
[0023] Further, the mean of the context fiber state feature vector sequence is calculated to obtain a plurality of vector means, wherein the plurality of vector means constitute the context fiber state global representation vector;
[0024] The maximum value of the context fiber state feature vector sequence is calculated to obtain a plurality of vector maximum values, and the plurality of vector maximum values constitute the context fiber state salient representation vector.
[0025] Furthermore, the feature capturing and expressing of the context fiber state global representation vector includes:
[0026] The context fiber state global representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state global representation vector;
[0027] The activation expression context fiber state global representation vector is subjected to one-dimensional convolution processing and then multiplied with the first trainable linear transformation weight matrix to obtain the context fiber state global activation representation vector.
[0028] Furthermore, the feature capturing and expressing of the context fiber state prominent representation vector includes:
[0029] The context fiber state salient representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state salient representation vector;
[0030] The activation expression context fiber state salient representation vector is subjected to one-dimensional convolution processing and then multiplied with a second trainable linear transformation weight matrix to obtain the context fiber state salient activation representation vector.
[0031] Further, nonlinear activation processing is performed on the context fiber state global-prominent activation representation vector, including:
[0032] Activating the context fiber state global-prominent activation representation vector using a hyperbolic tangent function and a sigmoid function respectively to obtain a context fiber state global-prominent hyperbolic tangent activation representation vector and a context fiber state global-prominent S-type activation representation vector;
[0033] The context fiber state global-salient hyperbolic tangent activation representation vector and the context fiber state global-salient S-type activation representation vector are point-multiplied by position to obtain the global-salient semantic association weight feature vector.
[0034] Further, the context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector, including:
[0035] The global-salient semantic association weight feature vector is used as a weight to perform a dot product on the context fiber state feature vector sequence, and then the context fiber state feature vector sequence is added to obtain the enhanced context fiber state feature vector sequence.
[0036] Further, the positioning result includes whether the positioning accuracy of the optical fiber meets the preset requirements or whether the positioning accuracy of the optical fiber does not meet the preset requirements;
[0037] The result output module outputs the positioning result based on the enhanced context fiber state feature vector sequence, including:
[0038] Cascading the enhanced context fiber state feature vector sequence to obtain a global cascade feature vector;
[0039] The global cascade feature vector is input into the classifier for prediction, and the positioning result is output.
[0040] An optical fiber positioning device for optical fiber wiring applied to the above method comprises:
[0041] A collection module, used to collect optical fiber wiring images;
[0042] An input module, used to input the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model includes a feature extraction module, a feature dispersion coding module, an enhancement module and a result output module;
[0043] The feature extraction module is used to perform initial feature extraction on the optical fiber wiring image to obtain a state feature map;
[0044] The feature dispersion encoding module is used to perform feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence;
[0045] The strengthening module is used to strengthen the features of the context fiber state feature vector sequence based on saliency and globality to obtain a strengthened context fiber state feature vector sequence;
[0046] The result output module is used to output the positioning result based on the enhanced context fiber state feature vector sequence.
[0047] Furthermore, the feature dispersion encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence, including:
[0048] Mapping each interval in the state feature map to a single value along the channel dimension to obtain a discrete feature;
[0049] The scattered features are encoded using an encoder based on a Transformer structure to obtain the context fiber state feature vector sequence.
[0050] Furthermore, the enhancement module enhances the features of the context fiber state feature vector sequence based on saliency and globality to obtain an enhanced context fiber state feature vector sequence, including:
[0051] Calculating the mean and maximum value of the context fiber state feature vector sequence respectively, and obtaining the context fiber state global representation vector and the context fiber state salient representation vector according to the calculation results of the mean and the maximum value;
[0052] Capturing and expressing the features of the context fiber state global representation vector and the context fiber state salient representation vector respectively to obtain the context fiber state global activation representation vector and the context fiber state salient activation representation vector;
[0053] The context fiber state global activation representation vector and the context fiber state salient activation representation vector are merged to obtain a context fiber state global-salient activation representation vector;
[0054] Performing nonlinear activation processing on the context fiber state global-salient activation representation vector to obtain a global-salient semantic association weight feature vector;
[0055] The context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector to obtain an enhanced context fiber state feature vector sequence.
[0056] Further, the enhancement module calculates the mean of the context fiber state feature vector sequence to obtain a plurality of vector means, and the plurality of vector means constitute the context fiber state global representation vector;
[0057] The maximum value of the context fiber state feature vector sequence is calculated to obtain a plurality of vector maximum values, and the plurality of vector maximum values constitute the context fiber state salient representation vector.
[0058] Furthermore, the enhancement module captures and expresses features of the context fiber state global representation vector, including:
[0059] The context fiber state global representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state global representation vector;
[0060] The activation expression context fiber state global representation vector is subjected to one-dimensional convolution processing and then multiplied with the first trainable linear transformation weight matrix to obtain the context fiber state global activation representation vector.
[0061] Furthermore, the enhancement module captures and expresses features of the context fiber state salient representation vector, including:
[0062] The context fiber state salient representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state salient representation vector;
[0063] The activation expression context fiber state salient representation vector is subjected to one-dimensional convolution processing and then multiplied with a second trainable linear transformation weight matrix to obtain the context fiber state salient activation representation vector.
[0064] Furthermore, the strengthening module performs nonlinear activation processing on the context fiber state global-prominent activation representation vector, including:
[0065] Activating the context fiber state global-prominent activation representation vector using a hyperbolic tangent function and a sigmoid function respectively to obtain a context fiber state global-prominent hyperbolic tangent activation representation vector and a context fiber state global-prominent S-type activation representation vector;
[0066] The context fiber state global-salient hyperbolic tangent activation representation vector and the context fiber state global-salient S-type activation representation vector are point-multiplied by position to obtain the global-salient semantic association weight feature vector.
[0067] Furthermore, the strengthening module strengthens the context fiber state feature vector sequence based on the global-salient semantic association weight feature vector, including:
[0068] The global-salient semantic association weight feature vector is used as a weight to perform a dot product on the context fiber state feature vector sequence, and then the context fiber state feature vector sequence is added to obtain the enhanced context fiber state feature vector sequence.
[0069] Further, the positioning result includes whether the positioning accuracy of the optical fiber meets the preset requirements or whether the positioning accuracy of the optical fiber does not meet the preset requirements;
[0070] The result output module outputs the positioning result based on the enhanced context fiber state feature vector sequence, including:
[0071] Cascading the enhanced context fiber state feature vector sequence to obtain a global cascade feature vector;
[0072] The global cascade feature vector is input into the classifier for prediction, and the positioning result is output.
[0073] A computer-readable storage medium stores a computer program, which, when executed, implements the above-mentioned optical fiber positioning method for optical fiber distribution.
[0074] The optical fiber positioning method and device for optical fiber wiring provided by the present invention have at least the following beneficial effects:
[0075] (1) In the process of optical fiber wiring positioning, optical fiber wiring images are collected, and the optical fiber wiring images are analyzed based on artificial intelligence image processing and analysis algorithms to learn and capture the semantic feature information about the optical fiber positioning status, so as to perceive the positioning status of the optical fiber and determine whether the optical fiber positioning accuracy meets the preset requirements. Intelligent positioning of the optical fiber wiring process can be realized to adapt to complex wiring environments such as multiple optical cable cores and multiple target ports, thereby further providing a basis for the wiring manipulator to quickly and accurately locate the adapter port;
[0076] (2) By performing feature dispersion processing on the extracted state feature graph along the channel dimension, the different aspects of the fiber positioning state in the state feature graph can be split, and the encoder of the Transformer structure is used to perform context association encoding and interactive analysis on these different aspects of the fiber positioning state, so as to learn and capture the implicit association relationship and interaction between these features, providing a more comprehensive and accurate basis for the judgment of the fiber positioning accuracy;
[0077] (3) By strengthening the data processing of the module, it is able to automatically learn and capture the correlation and importance semantics of different aspects and types of fiber optic positioning status features in the actual fiber optic positioning perception task, so as to pay more attention to the fiber optic positioning status type features with greater contribution in the fiber optic positioning and subsequent fiber optic wiring, and reduce the attention to the features with less contribution, so as to improve the comprehensiveness and accuracy of positioning perception. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 The present invention provides a flowchart of an embodiment of a method for locating an optical fiber for optical fiber distribution.
[0079] Figure 2 The present invention provides a flowchart of an embodiment of feature dispersion and encoding in the optical fiber positioning method for optical fiber distribution.
[0080] Figure 3 A flow chart of an embodiment of feature enhancement in the optical fiber positioning method for optical fiber distribution provided by the present invention.
[0081] Figure 4 The present invention provides a flowchart of an embodiment of the result output of the optical fiber positioning method for optical fiber distribution provided by the present invention.
[0082] Figure 5 A schematic structural diagram of an embodiment of an optical fiber positioning device for optical fiber distribution provided by the present invention. DETAILED DESCRIPTION
[0083] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0084] refer to Figure 1 In some embodiments, a method for locating an optical fiber for optical fiber distribution is provided, comprising:
[0085] S1, collecting optical fiber wiring images;
[0086] S2, inputting the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model includes a feature extraction module, a feature dispersion coding module, an enhancement module and a result output module;
[0087] S3, the feature extraction module performs initial feature extraction on the optical fiber wiring image to obtain a state feature map;
[0088] S4, the feature dispersion and encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence;
[0089] S5, the strengthening module strengthens the context fiber state feature vector sequence based on saliency and globality to obtain a strengthened context fiber state feature vector sequence;
[0090] S6. The result output module outputs a positioning result based on the enhanced context fiber state feature vector sequence.
[0091] Furthermore, in step S1, the optical fiber wiring image may be acquired by an image acquisition device.
[0092] Furthermore, in step S2, the optical fiber wiring image is input into a pre-trained positioning model, and the positioning model may be an improved atrous convolutional neural network model, including a feature extraction module, a feature scatter coding module, an enhancement module, and a result output module.
[0093] Further, in step S3, the feature extraction module performs initial feature extraction on the optical fiber wiring image to obtain a state feature map. In some embodiments, the feature extraction module may be a feature extractor of a hole convolutional neural network model.
[0094] Further, refer to Figure 2 In step S4, the feature dispersion encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence, including:
[0095] S41, mapping each interval in the state feature graph to a single value along the channel dimension to obtain a discrete feature;
[0096] S42: Encode the scattered features using an encoder based on a Transformer structure to obtain the context fiber state feature vector sequence.
[0097] Since the state feature graph contains implicit distribution features related to the fiber positioning state, and different channels in the state feature graph represent different aspects of fiber positioning state feature information, such as color, texture, shape and semantics. These different channel features have implicit associations and mutual influences, which can well reflect the positioning state of the fiber, so as to accurately judge whether the positioning accuracy of the fiber meets the preset requirements. Based on this, in order to be able to more comprehensively and meticulously analyze the positioning features and state of the fiber, so as to improve the accuracy and robustness of the judgment of the fiber positioning accuracy, in this embodiment, the state feature graph is further feature scattered along the channel dimension to obtain scattered features, and the scattered features are input into the encoder based on the Transformer structure to obtain the context fiber state feature vector sequence. By performing feature scattered processing on the state feature graph along the channel dimension, the different aspects of the fiber positioning state in the state feature graph can be split, and the encoder of the Transformer structure is used to perform context association coding and interactive analysis on these different aspects of the fiber positioning state, so as to learn and capture the implicit association relationship and interaction between these features, and provide a more comprehensive and accurate basis for the judgment of the fiber positioning accuracy.
[0098] Further, refer to Figure 3 In step S5, the enhancement module enhances the context fiber state feature vector sequence based on the saliency and globality of the feature to obtain an enhanced context fiber state feature vector sequence, including:
[0099] S51, respectively calculating the mean and the maximum of the context fiber state feature vector sequence, and obtaining the context fiber state global representation vector and the context fiber state salient representation vector according to the calculation results of the mean and the maximum;
[0100] S52, respectively capturing and expressing the features of the context fiber state global representation vector and the context fiber state prominent representation vector to obtain a context fiber state global activation representation vector and a context fiber state prominent activation representation vector;
[0101] S53, fusing the context fiber state global activation representation vector and the context fiber state prominent activation representation vector to obtain a context fiber state global-prominent activation representation vector;
[0102] S54, performing nonlinear activation processing on the context fiber state global-prominent activation representation vector to obtain a global-prominent semantic association weight feature vector;
[0103] S55. Strengthen the context fiber state feature vector sequence based on the global-salient semantic association weight feature vector to obtain a strengthened context fiber state feature vector sequence.
[0104] Considering that in the actual process of optical fiber positioning perception, different aspects of optical fiber positioning status features, such as color, texture, shape and semantics, have different importance and contribution to the final optical fiber positioning accuracy judgment in different scenarios. For example, color is usually used to distinguish different types of optical fibers or identify specific connections in optical fiber positioning. In some cases, color may be one of the important bases for judging the correctness of optical fiber connection; texture can provide information about the surface features of optical fiber, which helps to distinguish different optical fibers or determine the location of optical fibers. In complex environments, texture information can help improve the accuracy of optical fiber positioning. The shape features of optical fibers can be used to judge the type or state of optical fibers, such as direct connection or cross connection. Shape information has a certain contribution to the correctness of optical fiber positioning; semantic information can provide clues about the meaning and purpose of optical fiber connection, which helps to understand the contextual semantic relationship of optical fiber connection. In optical fiber wiring operations, semantic information can help the system better understand the purpose and requirements of the connection. Therefore, in order to better process and utilize these various aspects of optical fiber positioning status feature information, thereby improving the accuracy and stability of optical fiber positioning perception, in this embodiment, the context optical fiber state feature vector sequence is further enhanced based on saliency and globality to obtain an enhanced context optical fiber state feature vector sequence. Through the processing of the enhancement module, the correlation relationship and importance semantics of different aspects and types of optical fiber positioning state features in the actual optical fiber positioning perception task can be automatically learned and captured, so that higher attention can be paid to the optical fiber positioning state type features with greater contribution in optical fiber positioning and subsequent optical fiber wiring, while the attention to features with less contribution is reduced, so as to improve the comprehensiveness and accuracy of positioning perception.
[0105] Furthermore, in step S51, the mean of the context fiber state feature vector sequence is calculated to obtain multiple vector means, and the multiple vector means constitute the context fiber state global representation vector; the maximum value of the context fiber state feature vector sequence is calculated to obtain multiple vector maximum values, and the multiple vector maximum values constitute the context fiber state salient representation vector. In this way, the characteristics of the entire context fiber state feature vector sequence can be fully understood, while highlighting the overall semantic information and significant features, providing a richer feature description for subsequent analysis and application.
[0106] Furthermore, in step S52, the feature capturing and expression of the context fiber state global representation vector includes:
[0107] The context fiber state global representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state global representation vector;
[0108] The activation expression context fiber state global representation vector is subjected to one-dimensional convolution processing and then multiplied with the first trainable linear transformation weight matrix to obtain the context fiber state global activation representation vector.
[0109] Furthermore, the feature capturing and expressing of the context fiber state prominent representation vector includes:
[0110] The context fiber state salient representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state salient representation vector;
[0111] The activation expression context fiber state salient representation vector is subjected to one-dimensional convolution processing and then multiplied with a second trainable linear transformation weight matrix to obtain the context fiber state salient activation representation vector.
[0112] Among them, the first trainable linear transformation weight matrix and the second trainable linear transformation weight matrix are preset at the beginning of the positioning model training and are adjusted during the model training process.
[0113] Furthermore, in step S54, nonlinear activation processing is performed on the context fiber state global-prominent activation representation vector, including:
[0114] Activating the context fiber state global-prominent activation representation vector using a hyperbolic tangent function and a sigmoid function respectively to obtain a context fiber state global-prominent hyperbolic tangent activation representation vector and a context fiber state global-prominent S-type activation representation vector;
[0115] The context fiber state global-salient hyperbolic tangent activation representation vector and the context fiber state global-salient S-type activation representation vector are point-multiplied by position to obtain the global-salient semantic association weight feature vector.
[0116] Further, in step S55, the context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector, including:
[0117] The global-salient semantic association weight feature vector is used as a weight to perform a dot product on the context fiber state feature vector sequence, and then the context fiber state feature vector sequence is added to obtain the enhanced context fiber state feature vector sequence.
[0118] In this way, global correlation and prominent semantic information can be integrated, which helps to better describe and understand the characteristics of the fiber positioning state and improve the model's ability to understand the fiber positioning state.
[0119] Specifically, in step S5, the enhancement module enhances the features of the context fiber state feature vector sequence based on saliency and globality, and the saliency enhancement formula is:
[0120] V' = Avg(V);
[0121] V"=Max(V);
[0122]
[0123] V c =V⊙(tanh(C1+C2)⊙σ(C1+C2))+V;
[0124] Wherein, V is the context fiber state feature vector sequence, Avg(·) represents the mean calculation operation, Max(·) represents the maximum value calculation operation, V' is the context fiber state global representation vector, V" is the context fiber state salient representation vector, Conv(·) represents one-dimensional convolutional coding, ReLU(·) represents the ReLU activation function, and denote the first trainable linear transformation weight matrix and the second trainable linear transformation weight matrix, respectively. C1 and C2 are the context fiber state global activation representation vector and the context fiber state salient activation representation vector, respectively. σ(·) is the sigmoid function, tanh(·) is the tanh function, ⊙ denotes the positional dot product, V c is the sequence of feature vectors of the reinforced context fiber state.
[0125] Further, in step S6, the positioning result includes whether the positioning accuracy of the optical fiber meets the preset requirements or whether the positioning accuracy of the optical fiber does not meet the preset requirements;
[0126] refer to Figure 4 The result output module outputs the positioning result based on the enhanced context fiber state feature vector sequence, including:
[0127] S61, cascading the enhanced context fiber state feature vector sequence to obtain a global cascade feature vector;
[0128] S62: Input the global cascade feature vector into a classifier for prediction, and output a positioning result.
[0129] Specifically, the enhanced context fiber state feature vector sequence is used for classification processing to perceive the fiber positioning state and determine whether the fiber positioning accuracy meets the preset requirements. In this way, intelligent positioning of the fiber wiring process can be achieved to adapt to complex wiring environments such as multiple optical cable cores and multiple target ports, thereby further providing a basis for the wiring manipulator to quickly and accurately locate the adapter port.
[0130] Furthermore, in step S2, the positioning model needs to be trained in advance, specifically including:
[0131] An initial positioning model is established, which includes a feature extraction module, a feature dispersion coding module, an enhancement module and a result output module, and the parameters are initialized.
[0132] Acquire training data, the training data includes a training fiber positioning image captured by a camera, mark the positioning accuracy of the optical fiber in the training fiber positioning image and the port connected to it, and the positioning accuracy of the position between each optical fiber, and obtain a training sample; input the training sample into a feature extraction module to obtain a sample state feature map; perform feature dispersion on the sample state feature map along the channel dimension to obtain a dispersed feature; input the dispersed feature into an encoder based on a Transformer structure for encoding to obtain a sample context fiber state feature vector sequence; input the sample context fiber state feature vector sequence into an enhancement module to obtain an enhanced sample state feature map. The following is a sequence of fiber state feature vectors; the enhanced sample context fiber state feature vector sequence is cascaded to obtain a sample global cascade feature vector, and then a predicted positioning result is obtained through a classifier; the cross entropy loss function value between the predicted positioning result and the actual positioning accuracy of the mark is calculated to obtain a positioning result information cross entropy loss function value; based on the sample global cascade feature vector, a global cascade loss function value is calculated; the feature extraction module, the feature scatter coding module, the enhancement module and the result output module are trained with the weighted sum of the positioning perception result information cross entropy loss function value and the global cascade loss function value as the final loss function value.
[0133] For the channel context-related image semantic features of the sample optical fiber positioning image expressed by the sample context optical fiber state feature vector sequence, after the context semantics are enhanced by the enhancement module, due to the significance-global weight distribution difference caused by the distribution difference between the channels of the image semantic features, the sample global cascade feature vector will also have the problem of complicated fusion semantic feature distribution, resulting in relatively obvious insufficient classification understanding of complex feature expressions, affecting the accuracy of the classification results obtained by the sample global cascade feature vector through the classifier.
[0134] Based on this, this embodiment further introduces a loss function for promoting classification understanding based on the complex feature expression of the sample global cascade feature vector, that is, based on the sample global cascade feature vector, the global cascade loss function value is calculated. Wherein, based on the sample global cascade feature vector, the global cascade loss function value is calculated, including: first calculating the mean and variance between the eigenvalues at any two positions of the sample global cascade feature vector to obtain a mean weight matrix and a variance weight matrix, and then performing query-type multiplication of the sample global cascade feature vector with the mean weight matrix and the variance weight matrix, and then calculating the Frobenius norm of the autocorrelation matrix of the two eigenvectors, and subtracting the product of the Frobenius norm of the autocorrelation matrix of the sample global cascade feature vector and the weight as a hyperparameter to obtain the global cascade loss function value.
[0135] For example, the calculation process of the global cascade loss function value can be expressed as:
[0136]
[0137] Among them, V represents the global cascade feature vector of the sample, M μ is the mean weight matrix, M σ is the variance weight matrix, T represents the transpose of the vector, represents the matrix multiplication operation, α is the weight as a hyperparameter, ||·|| F represents the Frobenius norm of the matrix, and Loss represents the value of the global cascade loss function;
[0138] in:
[0139]
[0140] Among them, v i represents the i-th eigenvalue of the global concatenated eigenvector of the sample, v j represents the jth eigenvalue of the global concatenated eigenvector of the sample, M μ (i,j) represents the eigenvalue of the (i,j)th position of the mean weight matrix, M σ (i,j) represents the eigenvalue at the (i,j)th position of the variance weight matrix.
[0141] That is, the global cascade loss function value, based on determining the overall distributed structural bottleneck of the sample global cascade feature vector through the multi-dimensional interaction of the detail group of the sample global cascade feature vector, simulates the correlation between its structural details and the macroscopic structural feature representation behavior through the low-rank structured reasoning of the sample global cascade feature vector. In this way, by training the classifier with the global cascade loss function value, it is possible to model the structural detail dependency relative to the macroscopic complexity in the classification scenario, thereby promoting the understanding of the macroscopic complex feature expression based on the structural details of the sample global cascade feature vector and improving the accuracy of the classification results of the classifier. In this way, the positioning state of the optical fiber can be perceived more effectively to determine whether the optical fiber positioning accuracy meets the preset requirements, thereby realizing the intelligent positioning of the optical fiber wiring process.
[0142] refer to Figure 5 In some embodiments, a fiber positioning device for fiber distribution applied to the above method is provided, comprising:
[0143] Acquisition module 1, used for acquiring optical fiber wiring images;
[0144] An input module 2, used for inputting the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model comprises a feature extraction module 3, a feature dispersion coding module 4, an enhancement module 5 and a result output module 6;
[0145] The feature extraction module 3 is used to perform initial feature extraction on the optical fiber wiring image to obtain a state feature map;
[0146] The feature dispersion encoding module 4 is used to perform feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence;
[0147] The strengthening module 5 is used for strengthening the features of the context fiber state feature vector sequence based on saliency and globality to obtain a strengthened context fiber state feature vector sequence;
[0148] The result output module 6 is used to output the positioning result based on the enhanced context fiber state feature vector sequence.
[0149] Furthermore, the feature dispersion encoding module 4 performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence, including:
[0150] Mapping each interval in the state feature map to a single value along the channel dimension to obtain a discrete feature;
[0151] The scattered features are encoded using an encoder based on a Transformer structure to obtain the context fiber state feature vector sequence.
[0152] Furthermore, the enhancement module 5 enhances the features of the context fiber state feature vector sequence based on saliency and globality to obtain an enhanced context fiber state feature vector sequence, including:
[0153] Calculating the mean and maximum value of the context fiber state feature vector sequence respectively, and obtaining the context fiber state global representation vector and the context fiber state salient representation vector according to the calculation results of the mean and the maximum value;
[0154] Capturing and expressing the features of the context fiber state global representation vector and the context fiber state salient representation vector respectively to obtain the context fiber state global activation representation vector and the context fiber state salient activation representation vector;
[0155] The context fiber state global activation representation vector and the context fiber state salient activation representation vector are merged to obtain a context fiber state global-salient activation representation vector;
[0156] Performing nonlinear activation processing on the context fiber state global-salient activation representation vector to obtain a global-salient semantic association weight feature vector;
[0157] The context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector to obtain an enhanced context fiber state feature vector sequence.
[0158] Further, the strengthening module 5 calculates the mean of the context fiber state feature vector sequence to obtain a plurality of vector means, and the plurality of vector means constitute the context fiber state global representation vector;
[0159] The maximum value of the context fiber state feature vector sequence is calculated to obtain a plurality of vector maximum values, and the plurality of vector maximum values constitute the context fiber state salient representation vector.
[0160] Furthermore, the enhancement module 5 performs feature capture and expression on the context fiber state global representation vector, including:
[0161] The context fiber state global representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state global representation vector;
[0162] The activation expression context fiber state global representation vector is subjected to one-dimensional convolution processing and then multiplied with the first trainable linear transformation weight matrix to obtain the context fiber state global activation representation vector.
[0163] Furthermore, the enhancement module 5 captures and expresses the features of the context fiber state prominent representation vector, including:
[0164] The context fiber state salient representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state salient representation vector;
[0165] The activation expression context fiber state salient representation vector is subjected to one-dimensional convolution processing and then multiplied with a second trainable linear transformation weight matrix to obtain the context fiber state salient activation representation vector.
[0166] Furthermore, the strengthening module 5 performs nonlinear activation processing on the context fiber state global-prominent activation representation vector, including:
[0167] Activating the context fiber state global-prominent activation representation vector using a hyperbolic tangent function and a sigmoid function respectively to obtain a context fiber state global-prominent hyperbolic tangent activation representation vector and a context fiber state global-prominent S-type activation representation vector;
[0168] The context fiber state global-salient hyperbolic tangent activation representation vector and the context fiber state global-salient S-type activation representation vector are point-multiplied by position to obtain the global-salient semantic association weight feature vector.
[0169] Furthermore, the strengthening module 5 strengthens the context fiber state feature vector sequence based on the global-salient semantic association weight feature vector, including:
[0170] The global-salient semantic association weight feature vector is used as a weight to perform a dot product on the context fiber state feature vector sequence, and then the context fiber state feature vector sequence is added to obtain the enhanced context fiber state feature vector sequence.
[0171] Further, the positioning result includes whether the positioning accuracy of the optical fiber meets the preset requirements or whether the positioning accuracy of the optical fiber does not meet the preset requirements;
[0172] The result output module 6 outputs the positioning result based on the enhanced context fiber state feature vector sequence, including:
[0173] Cascading the enhanced context fiber state feature vector sequence to obtain a global cascade feature vector;
[0174] The global cascade feature vector is input into the classifier for prediction, and the positioning result is output.
[0175] In some embodiments, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed, the above-mentioned optical fiber positioning method for optical fiber distribution is implemented.
[0176] The optical fiber positioning method and device for optical fiber wiring provided in the above embodiments have at least the following beneficial effects:
[0177] (1) In the process of optical fiber wiring positioning, optical fiber wiring images are collected, and the optical fiber wiring images are analyzed based on artificial intelligence image processing and analysis algorithms to learn and capture the semantic feature information about the optical fiber positioning status, so as to perceive the positioning status of the optical fiber and determine whether the optical fiber positioning accuracy meets the preset requirements. Intelligent positioning of the optical fiber wiring process can be realized to adapt to complex wiring environments such as multiple optical cable cores and multiple target ports, thereby further providing a basis for the wiring manipulator to quickly and accurately locate the adapter port;
[0178] (2) By performing feature dispersion processing on the extracted state feature graph along the channel dimension, the different aspects of the fiber positioning state in the state feature graph can be split, and the encoder of the Transformer structure is used to perform context association encoding and interactive analysis on these different aspects of the fiber positioning state, so as to learn and capture the implicit association relationship and interaction between these features, providing a more comprehensive and accurate basis for the judgment of the fiber positioning accuracy;
[0179] (3) By strengthening the data processing of the module, it is able to automatically learn and capture the correlation and importance semantics of different aspects and types of fiber optic positioning status features in the actual fiber optic positioning perception task, so as to pay more attention to the fiber optic positioning status type features with greater contribution in the fiber optic positioning and subsequent fiber optic wiring, and reduce the attention to the features with less contribution, so as to improve the comprehensiveness and accuracy of positioning perception.
[0180] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for positioning optical fiber for optical fiber wiring, characterized in that: include: Collect optical fiber wiring images; Inputting the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model includes a feature extraction module, a feature dispersion coding module, an enhancement module, and a result output module; The feature extraction module performs initial feature extraction on the optical fiber wiring image to obtain a state feature map; The feature dispersion and encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence; The strengthening module strengthens the context fiber state feature vector sequence based on the saliency and globality of the feature to obtain a strengthened context fiber state feature vector sequence; The result output module outputs a positioning result based on the enhanced context fiber state feature vector sequence.
2. The method according to claim 1, characterized in that The feature dispersion and encoding module performs feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence, including: Mapping each interval in the state feature map to a single value along the channel dimension to obtain a discrete feature; The scattered features are encoded using an encoder based on a Transformer structure to obtain the context fiber state feature vector sequence.
3. The method according to claim 1, characterized in that The strengthening module strengthens the context fiber state feature vector sequence based on saliency and globality to obtain a strengthened context fiber state feature vector sequence, including: Calculating the mean and maximum value of the context fiber state feature vector sequence respectively, and obtaining the context fiber state global representation vector and the context fiber state salient representation vector according to the calculation results of the mean and the maximum value; Capturing and expressing the features of the context fiber state global representation vector and the context fiber state salient representation vector respectively to obtain the context fiber state global activation representation vector and the context fiber state salient activation representation vector; The context fiber state global activation representation vector and the context fiber state salient activation representation vector are merged to obtain a context fiber state global-salient activation representation vector; Performing nonlinear activation processing on the context fiber state global-salient activation representation vector to obtain a global-salient semantic association weight feature vector; The context fiber state feature vector sequence is enhanced based on the global-salient semantic association weight feature vector to obtain an enhanced context fiber state feature vector sequence.
4. The method according to claim 3, characterized in that Calculating the mean of the context fiber state feature vector sequence to obtain a plurality of vector means, wherein the plurality of vector means constitute the context fiber state global representation vector; The maximum value of the context fiber state feature vector sequence is calculated to obtain a plurality of vector maximum values, and the plurality of vector maximum values constitute the context fiber state salient representation vector.
5. The method according to claim 3, characterized in that: Capturing and expressing features of the context fiber state global representation vector includes: The context fiber state global representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state global representation vector; The activation expression context fiber state global representation vector is subjected to one-dimensional convolution processing and then multiplied with the first trainable linear transformation weight matrix to obtain the context fiber state global activation representation vector.
6. The method according to claim 3, characterized in that Capturing and expressing the features of the context fiber state salient representation vector includes: The context fiber state salient representation vector is subjected to one-dimensional convolution and then processed by a ReLU activation function to obtain an activation expression context fiber state salient representation vector; The activation expression context fiber state salient representation vector is subjected to one-dimensional convolution processing and then multiplied with a second trainable linear transformation weight matrix to obtain the context fiber state salient activation representation vector.
7. The method according to claim 3, characterized in that The context fiber state global-prominent activation representation vector is subjected to nonlinear activation processing, including: Activating the context fiber state global-prominent activation representation vector using a hyperbolic tangent function and a sigmoid function respectively to obtain a context fiber state global-prominent hyperbolic tangent activation representation vector and a context fiber state global-prominent S-type activation representation vector; The context fiber state global-salient hyperbolic tangent activation representation vector and the context fiber state global-salient S-type activation representation vector are point-multiplied by position to obtain the global-salient semantic association weight feature vector.
8. The method according to claim 3, characterized in that Strengthening the context fiber state feature vector sequence based on the global-salient semantic association weight feature vector includes: Taking the global-salient semantic association weight feature vector as a weight, performing a dot multiplication on the context fiber state feature vector sequence, and then adding the context fiber state feature vector sequence to obtain the enhanced context fiber state feature vector sequence; The positioning result includes whether the positioning accuracy of the optical fiber meets the preset requirements or whether the positioning accuracy of the optical fiber does not meet the preset requirements; The result output module outputs the positioning result based on the enhanced context fiber state feature vector sequence, including: Cascading the enhanced context fiber state feature vector sequence to obtain a global cascade feature vector; The global cascade feature vector is input into the classifier for prediction, and the positioning result is output.
9. An optical fiber positioning device for optical fiber wiring, characterized in that: include: A collection module, used to collect optical fiber wiring images; An input module, used to input the optical fiber wiring image into a pre-trained positioning model, wherein the positioning model includes a feature extraction module, a feature dispersion coding module, an enhancement module and a result output module; The feature extraction module is used to perform initial feature extraction on the optical fiber wiring image to obtain a state feature map; The feature dispersion encoding module is used to perform feature dispersion and encoding on the state feature graph to obtain a context fiber state feature vector sequence; The strengthening module is used to strengthen the features of the context fiber state feature vector sequence based on saliency and globality to obtain a strengthened context fiber state feature vector sequence; The result output module is used to output the positioning result based on the enhanced context fiber state feature vector sequence.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the optical fiber positioning method for optical fiber distribution according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Power grid obstacle recognition processing method and system based on image processing
CN116168352A
Production method and system of granular biological fertilizer
CN117392600A
Weighted fusion method for importance difference of multi-source survey data of power grid
CN118627007A
