Optical fiber connection detection method, device, computer equipment, storage medium and product
By obtaining the optical path status parameters of the optical fiber connector and equipment and performing logical operations, the problem that the existing technology cannot detect optical fiber connection failures is solved, and fault detection of optical fiber connection paths is realized, which improves the reliability of the connection.
Patent Information
- Application Number
- CN202211069766.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-09-02
AI Technical Summary
The existing fiber connection methods cannot detect faults on fiber connections, resulting in failures in fiber circuits that cannot be detected in time.
By acquiring the optical path status parameters of the first fiber port of the optical fiber connector and the second fiber port of the device, logical operations are performed to detect whether the optical fiber connection path is faulty.
The fault detection of the optical fiber connection path is realized during optical fiber connection, and the reliability and stability of optical fiber connection are improved.
Smart Images

Figure CN115459842B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photoelectric detection technology, and in particular to a method, device, computer equipment, storage medium and product for detecting optical fiber connection. Background Art
[0002] Fiber optic connectors are devices used to connect optical fibers. Through fiber optic connectors, the ports of different optical fibers can be precisely docked, thereby connecting two optical fibers, so that optical signals can be continuously transmitted in the two optical fibers to form an optical path. When using fiber optic connectors to connect optical fibers, one optical fiber is used to send optical signals and the other optical fiber is used to receive optical signals. The sending and receiving of optical signals must be performed at the same time. At this time, the two optical fibers can be successfully connected through fiber optic connectors.
[0003] When using optical fiber connectors for optical fiber connection in actual applications, the two optical fibers connected by the optical fiber connectors may be in the state of sending optical signals at the same time, or the two optical fibers connected by the optical fiber connectors may be in the state of receiving optical signals at the same time, which indicates that the connection between the two optical fibers is abnormal, thereby causing a failure in the optical fiber circuit. However, the existing optical fiber connection method cannot detect the fault of the optical fiber connection when performing optical fiber connection. Summary of the invention
[0004] Based on this, it is necessary to provide a fiber optic connection detection method, device, computer equipment, storage medium and product that can perform fault detection when the fiber optic is connected to address the above technical problems.
[0005] In a first aspect, the present application provides a method for detecting an optical fiber connection. The method comprises:
[0006] When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port;
[0007] Performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0008] According to the logic operation result, it is detected whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port.
[0009] In one embodiment, the optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; the logical operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logical operation result, including:
[0010] Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation;
[0011] A second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and the second logic operation result is used as the logic operation result; the second-level logic operation includes an OR operation.
[0012] In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; and obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port includes:
[0013] Obtain an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port.
[0014] In one embodiment, when the first optical fiber port is connected to the second optical fiber port, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port;
[0015] The performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result includes:
[0016] Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0017] Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0018] The first logic operation result is obtained based on the first AND operation result and the second AND operation result.
[0019] In one embodiment, performing a second-level logic operation on the first logic operation result to generate a second logic operation result includes:
[0020] An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0021] In one embodiment, a photosensitive device is respectively provided on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path, and if there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0022] In one embodiment, the step of obtaining the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port includes:
[0023] Obtaining, by means of a photosensor on the first optical fiber port, whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a second logical value;
[0024] Through the photosensor on the second optical fiber port, it is determined whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
[0025] In one embodiment, the method further comprises:
[0026] An indication signal is sent out through the indicator light on the optical fiber connector; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0027] In a second aspect, the present application also provides a fiber optic connection detection device. The fiber optic connection detection device includes a fiber optic connector, the fiber optic connector includes a first fiber optic port and a photosensitive device, the photosensitive device is arranged inside the first fiber optic port; the photosensitive device corresponding to the first fiber optic port is used to obtain the optical path state parameters of the first fiber optic port;
[0028] The optical fiber connection detection device also includes a second optical fiber port connected to the first optical fiber port, and a photosensitive device is arranged in the second optical fiber port; the photosensitive device corresponding to the second optical fiber port is used to obtain the optical path state parameters of the second optical fiber port.
[0029] In a third aspect, the present application also provides a fiber connection detection device. The device comprises:
[0030] An optical path state parameter acquisition module, used to acquire the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector;
[0031] A logic operation result generating module, used for performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0032] A fault detection module is used to detect whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the logic operation result.
[0033] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0034] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0035] In a sixth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0036] The above-mentioned optical fiber connection detection method, device, computer equipment, storage medium and product, when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtain the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port; perform logical operations on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate logical operation results; according to the logical operation results, detect whether the optical fiber connection path between the first optical fiber port and the second optical fiber port is faulty. Using the above-mentioned method, by obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, the optical path state of each optical fiber port in the optical fiber connection path can be determined, and then the optical path state of each optical fiber port is logically operated to obtain the logical operation result, and then the optical path state of each optical fiber port can be determined according to the logical operation result. Whether the optical fiber connection path is faulty is compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether the connection between the two optical fibers is abnormal. The optical fiber connection detection method in the present application not only completes the optical fiber connection, but also can perform fault detection on the optical fiber connection by performing logical operations on the optical path state of each optical fiber port. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A diagram showing an application environment of a method for detecting optical fiber connection in an embodiment;
[0038] Figure 2 A schematic diagram of a process of detecting a fiber connection in one embodiment;
[0039] Figure 3 is a flow chart of a logic operation step in one embodiment;
[0040] Figure 4 A schematic diagram of the connection between an optical fiber connector and a device in one embodiment;
[0041] Figure 5 is a circuit connection diagram of a photosensitive device in one embodiment;
[0042] Figure 6 A schematic diagram of a process of obtaining light path state parameters in one embodiment;
[0043] Figure 7 is a flow chart of the first-level logic operation steps in one embodiment;
[0044] Figure 8 It is a flowchart of a method for detecting optical fiber connection in a specific embodiment;
[0045] Fig. 9 A schematic diagram of the structure of an optical fiber connection detection device in one embodiment;
[0046] Fig.10 is a structural block diagram of an optical fiber connection detection device in one embodiment;
[0047] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] Fiber optic connectors are devices used to connect optical fibers. Through fiber optic connectors, the ports of different optical fibers can be precisely docked, thereby connecting two optical fibers, so that optical signals can be continuously transmitted in the two optical fibers to form an optical path. When using fiber optic connectors to connect optical fibers, one optical fiber is used to send optical signals and the other optical fiber is used to receive optical signals. The sending and receiving of optical signals must be performed at the same time. At this time, the two optical fibers can be successfully connected through fiber optic connectors.
[0050] When using optical fiber connectors for optical fiber connection in actual applications, the two optical fibers connected by the optical fiber connectors may be in the state of sending optical signals at the same time, or the two optical fibers connected by the optical fiber connectors may be in the state of receiving optical signals at the same time, which indicates that the connection between the two optical fibers is abnormal, thereby causing a failure in the optical fiber circuit. However, the existing optical fiber connection method cannot detect the fault of the optical fiber connection when performing optical fiber connection.
[0051] The optical fiber connection detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 120 is connected to the optical fiber connector 140 and the device 160 through the network. When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, the terminal 120 obtains the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port; performs logical operations on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate logical operation results; according to the logical operation results, detects whether the optical fiber connection path between the first optical fiber port and the second optical fiber port is faulty. Among them, the terminal 120 can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
[0052] In one embodiment, Figure 2As shown, a method for detecting optical fiber connection is provided, and the method is applied to Figure 1 The terminal 120 in the example is used as an example to illustrate, and the following steps are included:
[0053] Step 220: When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtain the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port.
[0054] Specifically, the optical fiber path is successfully connected by connecting the first optical fiber port of the optical fiber connector to the second optical fiber port of the device. The connection method between the first optical fiber port of the optical fiber connector and the second optical fiber port of the device can be a plug-in connection, that is, the optical fiber port at one end is a plug, and the optical fiber port at the other end is a socket, and the connection can be completed by inserting the optical fiber port at one end into the optical fiber port at the other end; the connection method between the first optical fiber port of the optical fiber connector and the second optical fiber port of the device can also be a spiral connection, that is, the optical fiber port at one end is inserted into the optical fiber port at the other end and then rotated half a circle and fixedly connected by a bayonet. Of course, the embodiment of the present application does not limit the connection method between the first optical fiber port of the optical fiber connector and the second optical fiber port of the device.
[0055] After the optical fiber path is successfully connected, the terminal can determine whether there is an optical signal in the first optical fiber port and the second optical fiber port through a photosensitive device, thereby obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port; or the optical power meter can be used to detect the luminous power of the first optical fiber port and the second optical fiber port, thereby obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port. Of course, the embodiment of the present application does not limit the specific method for obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port.
[0056] Step 240, performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result.
[0057] Specifically, after the terminal obtains the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, if the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are high or low level signals or other non-logical values, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are first converted into logical values, and then logical operations are performed on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate logical operation results; if the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are logical values, logical operations are directly performed on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate logical operation results.
[0058] Step 260: Detect whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the result of the logic operation.
[0059] Specifically, the terminal determines whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the generated logical operation result. When the logical operation result is 1, the output is that the optical fiber connection is normal; when the logical operation result is 0, the output is that the optical fiber connection is normal. The judgment is made according to the actual setting, and the embodiment of the present application does not limit this.
[0060] In the above-mentioned optical fiber connection detection method, when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, the terminal obtains the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port; performs logical operations on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate logical operation results; and detects whether the optical fiber connection path between the first optical fiber port and the second optical fiber port is faulty according to the logical operation results. Using the above-mentioned method, by obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, the optical path state of each optical fiber port in the optical fiber connection path can be determined, and then the optical path state of each optical fiber port is logically operated to obtain the logical operation result, and then the optical path state of each optical fiber port can be determined according to the logical operation result. Whether the optical fiber connection path is faulty is compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether the connection between the two optical fibers is abnormal. The optical fiber connection detection method in the present application not only completes the optical fiber connection, but also can perform fault detection on the optical fiber connection by performing logical operations on the optical path state of each optical fiber port.
[0061] In the above embodiment, it is mentioned that the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are logically operated to generate a logical operation result. The specific method is introduced below. In one embodiment, Figure 3 As shown, the optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port are logically operated to generate a logical operation result, including:
[0062] Step 320, performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation.
[0063] Specifically, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port obtained in the embodiment of the present application are both logical values, wherein the logical values can be either 0 or 1. Thus, a first-level logical operation can be performed on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, and the first-level logical operation includes an AND operation, thereby generating a first logical operation result, which can also be either 0 or 1.
[0064] Step 340, performing a second-level logic operation on the first logic operation result to generate a second logic operation result, and using the second logic operation result as the logic operation result; the second-level logic operation includes an OR operation.
[0065] Specifically, a second-level logic operation is performed on the first logic operation result obtained through the first-level logic operation, and the second-level logic operation includes an OR operation, so that a second logic operation result can be generated, and the second logic operation result can be 0 or 1, and the second logic operation result is used as the logic operation result. Among them, in this embodiment, after two levels of logic operation, the optical path state parameters of multiple optical fiber ports are converted into a unique logic operation result, so that it can be judged according to the preset rules that when the logic operation result is 0, it indicates that the optical fiber connection is normal; when the logic operation result is 1, it indicates that the optical fiber connection is abnormal.
[0066] In this embodiment, a first-level logical operation is performed on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate a first logical operation result; the first-level logical operation includes an AND operation; a second-level logical operation is performed on the first logical operation result to generate a second logical operation result, and the second logical operation result is used as the logical operation result; the second-level logical operation includes an OR operation. In the embodiment of the present application, by performing two-level logical operations on the acquired optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to obtain the logical operation result, it is possible to determine whether the optical fiber connection path has a fault based on the logical operation result. Compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether there is an abnormality in the connection between the two optical fibers. The optical fiber connection detection method in the present application not only completes the optical fiber connection, but also can detect faults in the optical fiber connection by performing logical operations on the optical path state of each optical fiber port.
[0067] The above embodiments introduce the method of obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port. The specific method is introduced below. In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port includes:
[0068] Obtain an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port.
[0069] Specifically, if Figure 4 As shown, Figure 4 The figure is a schematic diagram of the connection between the optical fiber connector and the device in an embodiment. The optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, wherein there are two optical fibers connected to the optical fiber connector in the embodiment of the present application, the first optical fiber port includes the first optical fiber sub-port (B port) and the second optical fiber sub-port (D port), and the second optical fiber port includes the third optical fiber sub-port (A port) and the fourth optical fiber sub-port (C port). Thus, the optical path state parameters of the first optical fiber sub-port (B port), the optical path state parameters of the second optical fiber sub-port (D port), the optical path state parameters of the third optical fiber sub-port (A port), and the optical path state parameters of the fourth optical fiber sub-port (C port) can be obtained.
[0070] In this embodiment, by obtaining the optical path state parameters of the first optical fiber sub-port, the optical path state parameters of the second optical fiber sub-port, the optical path state parameters of the third optical fiber sub-port and the optical path state parameters of the fourth optical fiber sub-port, the optical path state of each optical fiber port in the optical fiber connection path can be determined, so as to prepare for subsequent logical operations on the optical path state of each optical fiber port and determine whether the optical fiber connection path has a fault based on the results of the logical operations.
[0071] In one embodiment, photosensors are respectively provided on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0072] Specifically, a photosensitive device is provided on the first optical fiber port and the second optical fiber port, respectively. The photosensitive device refers to a component that can convert an optical signal into an electrical signal. The photosensitive device can cooperate with the light-emitting tube to realize the mutual conversion between electrical energy and light energy. The photosensitive device includes a photoresistor, a photodiode, a phototransistor, etc. Figure 5 As shown, Figure 5: is a circuit connection diagram of a photosensitive device 502 in an embodiment. The photosensitive device may be a photoresistor, and DO is a logic value output by a light path state parameter. The light path state parameter may be obtained by the photosensitive device, and the light path state parameter is used to indicate whether there is a light signal in the light path. It can be obtained through the circuit that if there is a light signal in the light path, the light path state parameter is a first logic value, that is, the logic value output by the light path state parameter is 0; if there is no light signal in the light path, the light path state parameter is a second logic value, that is, the logic value output by the light path state parameter is 1.
[0073] In this embodiment, a photosensitive device is provided on the first optical fiber port and the second optical fiber port respectively; the optical path state parameter is used to indicate whether there is an optical signal in the optical path, and if there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value. In this embodiment of the present application, by providing a photosensitive device on the first optical fiber port and the second optical fiber port respectively, the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port are obtained, so that the optical path state of each optical fiber port in the optical fiber connection path can be determined, and preparations can be made for subsequent logical operations on the optical path state of each optical fiber port, and judging whether the optical fiber connection path has a fault according to the logical operation result.
[0074] The above embodiment mentions obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, and the specific method thereof is introduced below. Figure 6 As shown, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port includes:
[0075] Step 620, obtain whether there is an optical signal in the first optical fiber port through the photosensor on the first optical fiber port; if there is an optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a second logical value.
[0076] Step 640, using the photosensor on the second optical fiber port, obtain whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, determine that the optical path state parameter of the second optical fiber port is a first logical value; if there is no optical signal in the second optical fiber port, determine that the optical path state parameter of the first optical fiber port is a second logical value.
[0077] Specifically, by setting a photosensor on the first optical fiber port, it is possible to obtain whether there is an optical signal in the first optical fiber port. If there is an optical signal in the first optical fiber port, it is determined that the optical path state parameter of the first optical fiber port is a first logical value, that is, the logical value output by the optical path state parameter is 0; if there is no optical signal in the first optical fiber port, it is determined that the optical path state parameter of the first optical fiber port is a second logical value, that is, the logical value output by the optical path state parameter is 1. By setting a photosensor on the second optical fiber port, it is possible to obtain whether there is an optical signal in the second optical fiber port. If there is an optical signal in the second optical fiber port, it is determined that the optical path state parameter of the second optical fiber port is a first logical value, that is, the logical value output by the optical path state parameter is 0; if there is no optical signal in the second optical fiber port, it is determined that the optical path state parameter of the first optical fiber port is a second logical value, that is, the logical value output by the optical path state parameter is 1.
[0078] In this embodiment, the photosensitive device on the first optical fiber port is used to obtain whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a first logical value; if there is no optical signal in the first optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value; the photosensitive device on the second optical fiber port is used to obtain whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value. In the embodiment of the present application, by using the photosensitive device set on the first optical fiber port and the photosensitive device set on the second optical fiber port, it can be determined whether there is an optical signal in each optical fiber port in the optical fiber connection path, thereby obtaining the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port, so as to prepare for the subsequent logical operation of the optical path state of each optical fiber port and determine whether the optical fiber connection path has a fault according to the result of the logical operation.
[0079] The above embodiments mentioned that the first-level logic operation is performed on the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to generate the first logic operation result. The specific method is introduced below. In one embodiment, when the first optical fiber port is connected to the second optical fiber port, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port;
[0080] like Figure 7 As shown, a first-level logic operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result, including:
[0081] Step 720, performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result.
[0082] Step 740: Perform an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result.
[0083] Step 760, obtaining a first logic operation result based on the first AND operation result and the second AND operation result.
[0084] Specifically, the connection between the first optical fiber port and the second optical fiber port specifically means that the first optical fiber sub-port (B port) is connected to the third optical fiber sub-port (A port), and the second optical fiber sub-port (D port) is connected to the fourth optical fiber sub-port (C port). After the optical fibers are connected, an AND operation can be performed on the optical path state parameters of the first optical fiber sub-port (B port) and the optical path state parameters of the third optical fiber sub-port (A port) to generate a first AND operation result. Then, an AND operation is performed on the optical path state parameters of the second optical fiber sub-port (D port) and the optical path state parameters of the fourth optical fiber sub-port (C port) to generate a second AND operation result. Based on the first and second AND operation results, a first logic operation result is obtained.
[0085] Since it is preset that only one of the first fiber sub-port (B port) and the second fiber sub-port (D port) has an optical signal, and only one of the third fiber sub-port (A port) and the fourth fiber sub-port (C port) has an optical signal, all possible optical path status conditions can be obtained. Among them, if the port has an optical signal, the optical path state parameter is 0; if the port does not have an optical signal, the optical path state parameter is 1. As shown in Table 1, Table 1 shows all possible optical path status conditions.
[0086] Table 1
[0087]
[0088] It can be seen from Table 1 that when the optical fiber connection is in normal condition, the optical path conditions of each port include two types. In the first case, the first optical fiber sub-port (port B) has no optical signal, the second optical fiber sub-port (port D) has an optical signal, the third optical fiber sub-port (port A) has an optical signal, and the fourth optical fiber sub-port (port C) has no optical signal; in the second case, the first optical fiber sub-port (port B) has an optical signal, the second optical fiber sub-port (port D) has no optical signal, the third optical fiber sub-port (port A) has no optical signal, and the fourth optical fiber sub-port (port C) has an optical signal. When a fiber optic connection fails, there are two optical path conditions for each port. In the first condition, there is an optical signal at the first fiber optic sub-port (port B), there is no optical signal at the second fiber optic sub-port (port D), there is an optical signal at the third fiber optic sub-port (port A), and there is no optical signal at the fourth fiber optic sub-port (port C); in the second condition, there is no optical signal at the first fiber optic sub-port (port B), there is an optical signal at the second fiber optic sub-port (port D), there is no optical signal at the third fiber optic sub-port (port A), and there is an optical signal at the fourth fiber optic sub-port (port C).
[0089] First, an AND operation (i.e., a first-level logic operation) is performed on all possible optical path status conditions, that is, an AND operation is performed on the first fiber sub-port (B port) and the third fiber sub-port (A port) to generate a first AND operation result. And an AND operation is performed on the second fiber sub-port (D port) and the fourth fiber sub-port (C port) to generate a second AND operation result. Afterwards, based on the obtained first and second AND operation results, the possible results of the first logic operation are obtained. As shown in Table 2, Table 2 is the possible results of the first logic operation.
[0090] Table 2
[0091]
[0092]
[0093] In this embodiment, the optical path state parameters of the first optical fiber sub-port and the optical path state parameters of the third optical fiber sub-port are ANDed to generate a first ANDed result; the optical path state parameters of the second optical fiber sub-port and the optical path state parameters of the fourth optical fiber sub-port are ANDed to generate a second ANDed result; based on the first ANDed result and the second ANDed result, a first logic operation result is obtained. In the embodiment of the present application, the first-level logic ANDed operation can be performed on the obtained optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port to obtain a first logic operation result, and then a second-level logic operation or operation can be performed according to the first logic operation result. After that, it can be determined whether the optical fiber connection path has a fault according to the logic operation result. Compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether there is an abnormality in the connection between the two optical fibers. The optical fiber connection detection method in the present application not only completes the optical fiber connection, but also can perform a logic operation on the optical path state of each optical fiber port, thereby detecting the fault of the optical fiber connection.
[0094] The above embodiment mentioned that the second-level logic operation is performed on the first logic operation result to generate the second logic operation result. The specific method is introduced below. In one embodiment, the second-level logic operation is performed on the first logic operation result to generate the second logic operation result, including:
[0095] An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0096] Specifically, an OR operation (i.e., a second-level logic operation) is performed on the first and second AND operation results, that is, an OR operation is performed on the result after the AND operation is performed on the first fiber sub-port (B port) and the third fiber sub-port (A port), and the result after the AND operation is performed on the second fiber sub-port (D port) and the fourth fiber sub-port (C port), thereby generating a second logic operation result. As shown in Table 3, Table 3 shows the possible results of the second logic operation.
[0097] Table 3
[0098]
[0099] In this embodiment, by performing an OR operation on the first and second AND operation results to generate a second logic operation result, and using the second logic operation result as the logic operation result, it is possible to determine whether the optical fiber connection path has a fault based on the logic operation result. Compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether there is an abnormality in the connection between the two optical fibers, the optical fiber connection detection method in this application not only completes the optical fiber connection, but also can perform a logic operation on the optical path status of each optical fiber port, thereby performing a fault detection on the optical fiber connection.
[0100] The above embodiment mentioned obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port. Another embodiment of the optical fiber connection detection method is introduced below. In one embodiment, a method for detecting an optical fiber connection is provided, further comprising:
[0101] An indicator light on the optical fiber connector sends an indication signal; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0102] Specifically, an indicator light is pre-set on the optical fiber connector, and the indicator light can send out an indication signal, which is used to indicate whether there is a fault in the optical fiber connection path. According to the result of the logical operation, when a fault is detected in the optical fiber connection path between the first optical fiber port and the second optical fiber port, the indicator light sends out a red indication signal, and the staff can reconnect the optical fiber according to the indication signal; when it is detected that there is no fault in the optical fiber connection path between the first optical fiber port and the second optical fiber port, the indicator light sends out a green indication signal, indicating that the optical fiber connection is successful.
[0103] In this embodiment, an indicator light on the optical fiber connector sends an indication signal; the indication signal is used to indicate whether the optical fiber connection path has a fault. In this embodiment of the application, an indicator light on the optical fiber connector sends an indication signal, which can intuitively show whether the optical fiber connection path has a fault, making it easier for workers to observe whether the optical fiber connection has a fault during actual operation.
[0104] In a specific embodiment, Figure 8 As shown, a method for detecting an optical fiber connection is provided, comprising:
[0105] Step 802, respectively setting a photosensitive device on the first optical fiber port and the second optical fiber port;
[0106] Step 804, when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtain whether there is an optical signal in the first optical fiber port through the photosensor on the first optical fiber port; if there is an optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a second logical value;
[0107] Step 806, obtaining, by means of a photosensor on the second optical fiber port, whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, determining that the optical path state parameter of the second optical fiber port is a first logic value; if there is no optical signal in the second optical fiber port, determining that the optical path state parameter of the first optical fiber port is a second logic value;
[0108] Step 808, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; obtain the optical path state parameters of the first optical fiber sub-port, the optical path state parameters of the second optical fiber sub-port, the optical path state parameters of the third optical fiber sub-port, and the optical path state parameters of the fourth optical fiber sub-port;
[0109] Step 810, performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0110] Step 812, performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0111] Step 814, obtaining a first logic operation result based on the first AND operation result and the second AND operation result;
[0112] Step 816, performing an OR operation on the first AND operation result and the second AND operation result to generate a second logic operation result, and using the second logic operation result as the logic operation result;
[0113] Step 818, detecting whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the result of the logic operation;
[0114] Step 820: Send an indication signal through the indicator light on the optical fiber connector; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0115] In this embodiment, when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained; the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are logically operated to generate a logical operation result; according to the logical operation result, whether the optical fiber connection path between the first optical fiber port and the second optical fiber port is faulty is detected. Using the above method, by obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port, the optical path state of each optical fiber port in the optical fiber connection path can be determined, and then the optical path state of each optical fiber port is logically operated to obtain the logical operation result, and whether the optical fiber connection path is faulty can be determined according to the logical operation result. Compared with the traditional optical fiber connection method, which simply connects two optical fibers and cannot determine whether the connection between the two optical fibers is abnormal. The optical fiber connection detection method in the present application not only completes the optical fiber connection, but also performs logical operations on the optical path state of each optical fiber port, thereby detecting the fault of the optical fiber connection.
[0116] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0117] In one embodiment, Fig. 9 As shown, a fiber optic connection detection device is provided, the fiber optic connection detection device includes a fiber optic connector 920, the fiber optic connector 920 includes a first fiber optic port 922 and a photosensitive device 924, and the photosensitive device 924 is arranged inside the first fiber optic port 922; the photosensitive device 924 corresponding to the first fiber optic port 922 is used to obtain the optical path state parameters of the first fiber optic port 922;
[0118] The optical fiber connection detection device also includes a second optical fiber port 940 connected to the first optical fiber port 922 , in which a photosensor 942 is disposed; the photosensor 942 corresponding to the second optical fiber port 940 is used to obtain optical path state parameters of the second optical fiber port 940 .
[0119] In this embodiment, the optical fiber connection detection device includes an optical fiber connector, the optical fiber connector includes a first optical fiber port and a photosensitive device, the photosensitive device is arranged inside the first optical fiber port; the photosensitive device corresponding to the first optical fiber port is used to obtain the optical path state parameters of the first optical fiber port; the optical fiber connection detection device also includes a second optical fiber port connected to the first optical fiber port, the photosensitive device is arranged inside the second optical fiber port; the photosensitive device corresponding to the second optical fiber port is used to obtain the optical path state parameters of the second optical fiber port. The above optical fiber connection detection device can obtain the optical path state parameters of the first optical fiber port of the optical fiber connector and the optical path state parameters of the second optical fiber port of the device, and provide accurate optical path state parameters of each optical fiber port for the optical fiber connection detection method, so that fault detection of the optical fiber connection can be performed.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a fiber connection detection device for implementing the fiber connection detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more fiber connection detection device embodiments provided below can refer to the limitations of the fiber connection detection method above, and will not be repeated here.
[0121] In one embodiment, Fig.10 As shown, a fiber connection detection device 1000 is provided, comprising: an optical path state parameter acquisition module 1020, a logic operation result generation module 1040 and a fault detection module 1060, wherein:
[0122] An optical path state parameter acquisition module 1020, for acquiring an optical path state parameter of the first optical fiber port and an optical path state parameter of the second optical fiber port when the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector;
[0123] A logic operation result generating module 1040, configured to perform a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0124] The fault detection module 1060 is used to detect whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the logic operation result.
[0125] In one embodiment, the optical path state parameter includes two different logic values; the logic operation includes a first-level logic operation and a second-level logic operation; the logic operation result generation module 1040 includes:
[0126] A first-level logic operation unit is used to perform a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation;
[0127] The second-level logic operation unit is used to perform a second-level logic operation on the first logic operation result to generate a second logic operation result, and use the second logic operation result as the logic operation result; the second-level logic operation includes an OR operation.
[0128] In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; the optical path state parameter acquisition module 1020 includes:
[0129] The optical path state parameter acquisition unit is used to acquire the optical path state parameters of the first optical fiber sub-port, the optical path state parameters of the second optical fiber sub-port, the optical path state parameters of the third optical fiber sub-port and the optical path state parameters of the fourth optical fiber sub-port.
[0130] In one of the embodiments, when the first optical fiber port is connected to the second optical fiber port, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port;
[0131] The first-level logic operation unit includes:
[0132] A first AND operation unit, used for performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0133] A second AND operation unit, used for performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0134] The first logic operation unit is used to obtain a first logic operation result based on the first AND operation result and the second AND operation result.
[0135] In one embodiment, the second-level logic operation unit includes:
[0136] The second logic operation unit is used to perform an OR operation on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0137] In one embodiment, the optical fiber connection detection device 1000 further includes:
[0138] A photosensitive device is respectively arranged on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0139] In one embodiment, the optical path state parameter acquisition module 1020 includes:
[0140] A first optical path state parameter acquisition unit is used to acquire whether there is an optical signal in the first optical fiber port through a photosensor on the first optical fiber port; if there is an optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determine that the optical path state parameter of the first optical fiber port is a second logical value;
[0141] The second optical path state parameter acquisition unit is used to obtain whether there is an optical signal in the second optical fiber port through a photosensor on the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
[0142] In one embodiment, the optical fiber connection detection device 1000 further includes:
[0143] The indication signal sending unit is used to send an indication signal through the indicator light on the optical fiber connector; the indication signal is used to prompt whether a fault occurs in the optical fiber connection path.
[0144] Each module in the above optical fiber connection detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0145] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store IO blocking detection data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fiber optic connection detection method is implemented.
[0146] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for detecting an optical fiber connection is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0147] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0149] When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port;
[0150] Performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0151] According to the logic operation result, it is detected whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port.
[0152] In one embodiment, the optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; a logical operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logical operation result, and the processor further implements the following steps when executing the computer program:
[0153] Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation;
[0154] A second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and the second logic operation result is used as the logic operation result; the second-level logic operation includes an OR operation.
[0155] In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and the processor further implements the following steps when executing the computer program:
[0156] Obtain an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port.
[0157] In one embodiment, when the first fiber port is connected to the second fiber port, the first fiber sub-port is connected to the third fiber sub-port, and the second fiber sub-port is connected to the fourth fiber sub-port;
[0158] A first-level logic operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result. When the processor executes the computer program, the following steps are also implemented:
[0159] Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0160] Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0161] A first logic operation result is obtained based on the first AND operation result and the second AND operation result.
[0162] In one embodiment, a second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and the processor further implements the following steps when executing the computer program:
[0163] An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0165] A photosensitive device is respectively arranged on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0166] In one embodiment, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and the processor further implements the following steps when executing the computer program:
[0167] Obtaining, by means of a photosensor on the first optical fiber port, whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determining that the optical path state parameter of the first optical fiber port is a second logical value;
[0168] Through the photosensor on the second optical fiber port, it is determined whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0170] An indicator light on the optical fiber connector sends an indication signal; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0171] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0172] When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port;
[0173] Performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0174] According to the logic operation result, it is detected whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port.
[0175] In one embodiment, the optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; the logical operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logical operation result, and the computer program is executed by the processor to implement the following steps:
[0176] Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation;
[0177] A second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and the second logic operation result is used as the logic operation result; the second-level logic operation includes an OR operation.
[0178] In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and when the computer program is executed by the processor, the following steps are implemented:
[0179] Obtain an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port.
[0180] In one embodiment, when the first fiber port is connected to the second fiber port, the first fiber sub-port is connected to the third fiber sub-port, and the second fiber sub-port is connected to the fourth fiber sub-port;
[0181] A first-level logic operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result. When the computer program is executed by the processor, the following steps are implemented:
[0182] Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0183] Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0184] A first logic operation result is obtained based on the first AND operation result and the second AND operation result.
[0185] In one embodiment, a second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and when the computer program is executed by the processor, the following steps are implemented:
[0186] An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0187] In one embodiment, the computer program, when executed by a processor, implements the following steps:
[0188] A photosensitive device is respectively arranged on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0189] In one embodiment, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and when the computer program is executed by the processor, the following steps are implemented:
[0190] Obtaining, by means of a photosensor on the first optical fiber port, whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determining that the optical path state parameter of the first optical fiber port is a second logical value;
[0191] Through the photosensor on the second optical fiber port, it is determined whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
[0192] In one embodiment, the computer program, when executed by a processor, implements the following steps:
[0193] An indicator light on the optical fiber connector sends an indication signal; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0194] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0195] When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port;
[0196] Performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result;
[0197] According to the logic operation result, it is detected whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port.
[0198] In one embodiment, the optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; a logical operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logical operation result, and the computer program further implements the following steps when executed by the processor:
[0199] Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation;
[0200] A second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and the second logic operation result is used as the logic operation result; the second-level logic operation includes an OR operation.
[0201] In one embodiment, the first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and when the computer program is executed by the processor, the following steps are also implemented:
[0202] Obtain an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port.
[0203] In one embodiment, when the first fiber port is connected to the second fiber port, the first fiber sub-port is connected to the third fiber sub-port, and the second fiber sub-port is connected to the fourth fiber sub-port;
[0204] A first-level logic operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result. When the computer program is executed by the processor, the following steps are also implemented:
[0205] Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result;
[0206] Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result;
[0207] A first logic operation result is obtained based on the first AND operation result and the second AND operation result.
[0208] In one embodiment, a second-level logic operation is performed on the first logic operation result to generate a second logic operation result, and when the computer program is executed by the processor, the following steps are further implemented:
[0209] An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
[0210] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0211] A photosensitive device is respectively arranged on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
[0212] In one embodiment, the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port are obtained, and when the computer program is executed by the processor, the following steps are also implemented:
[0213] Obtaining, by means of a photosensor on the first optical fiber port, whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determining that the optical path state parameter of the first optical fiber port is a second logical value;
[0214] Through the photosensor on the second optical fiber port, it is determined whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
[0215] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0216] An indicator light on the optical fiber connector sends an indication signal; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
[0217] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0219] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0220] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting optical fiber connection, It is characterized in that The method comprises: When the optical fiber is connected to the second optical fiber port of the device through the first optical fiber port of the optical fiber connector, obtaining the optical path state parameters of the first optical fiber port and the optical path state parameters of the second optical fiber port; Performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result; According to the logic operation result, detecting whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port; The optical path state parameter includes two different logical values; the logical operation includes a first-level logical operation and a second-level logical operation; the logical operation is performed on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logical operation result, including: Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation; Performing a second-level logic operation on the first logic operation result to generate a second logic operation result, and using the second logic operation result as the logic operation result; the second-level logic operation includes an OR operation; The first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; wherein, only one of the first optical fiber sub-port and the second optical fiber sub-port has an optical signal, and only one of the third optical fiber sub-port and the fourth optical fiber sub-port has an optical signal, if the port has an optical signal, the optical path state parameter is 0, and if the port does not have an optical signal, the optical path state parameter is 1; Acquiring the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port includes: Acquire an optical path state parameter of the first optical fiber sub-port, an optical path state parameter of the second optical fiber sub-port, an optical path state parameter of the third optical fiber sub-port, and an optical path state parameter of the fourth optical fiber sub-port; In the case where the first optical fiber port is connected to the second optical fiber port, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port; The performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result includes: Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result; Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result; The first logic operation result is obtained based on the first AND operation result and the second AND operation result.
2. The method according to claim 1, It is characterized in that The performing a second-level logic operation on the first logic operation result to generate a second logic operation result includes: An OR operation is performed on the first AND operation result and the second AND operation result to generate a second logic operation result.
3. The method according to claim 1 or 2, It is characterized in that A photosensitive device is respectively set on the first optical fiber port and the second optical fiber port; the optical path state parameter is used to indicate whether there is an optical signal in the optical path. If there is an optical signal in the optical path, the optical path state parameter is a first logical value; if there is no optical signal in the optical path, the optical path state parameter is a second logical value.
4. The method according to claim 3, It is characterized in that The obtaining of the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port includes: Obtaining, by means of a photosensor on the first optical fiber port, whether there is an optical signal in the first optical fiber port; if there is an optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a first logical value; if there is no optical signal in the first optical fiber port, determining that an optical path state parameter of the first optical fiber port is a second logical value; Through the photosensor on the second optical fiber port, it is determined whether there is an optical signal in the second optical fiber port; if there is an optical signal in the second optical fiber port, the optical path state parameter of the second optical fiber port is determined to be a first logical value; if there is no optical signal in the second optical fiber port, the optical path state parameter of the first optical fiber port is determined to be a second logical value.
5. The method according to claim 1 or 2, It is characterized in that The method further comprises: An indication signal is sent out through the indicator light on the optical fiber connector; the indication signal is used to indicate whether a fault occurs in the optical fiber connection path.
6. A fiber optic connection detection device, It is characterized in that The optical fiber connection detection device comprises an optical fiber connector, the optical fiber connector comprises a first optical fiber port and a photosensitive device, the photosensitive device is arranged inside the first optical fiber port; the photosensitive device corresponding to the first optical fiber port is used to obtain the optical path state parameters of the first optical fiber port; The optical fiber connection detection device further comprises a second optical fiber port connected to the first optical fiber port, wherein a photosensitive device is arranged in the second optical fiber port; the photosensitive device corresponding to the second optical fiber port is used to obtain the optical path state parameters of the second optical fiber port; Performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation; Performing a second-level logic operation on the first logic operation result to generate a second logic operation result, and using the second logic operation result as the logic operation result; the second-level logic operation includes an OR operation; The first optical fiber port includes a first optical fiber sub-port and a second optical fiber sub-port, and the second optical fiber port includes a third optical fiber sub-port and a fourth optical fiber sub-port; wherein, only one of the first optical fiber sub-port and the second optical fiber sub-port has an optical signal, and only one of the third optical fiber sub-port and the fourth optical fiber sub-port has an optical signal, if the port has an optical signal, the optical path state parameter is 0, and if the port does not have an optical signal, the optical path state parameter is 1; The photosensor obtains the optical path state parameter of the first optical fiber sub-port, the optical path state parameter of the second optical fiber sub-port, the optical path state parameter of the third optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port; When the first optical fiber port and the second optical fiber port of the optical fiber connector are connected, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port; Performing an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result; Performing an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result; The first logic operation result is obtained based on the first AND operation result and the second AND operation result.
7. An optical fiber connection detection device, It is characterized in that The device comprises: an optical path state parameter acquisition module, for acquiring, when an optical fiber is connected to a second optical fiber port of a device through a first optical fiber port of an optical fiber connector, an optical path state parameter of the first optical fiber port and an optical path state parameter of the second optical fiber port, the first optical fiber port including a first optical fiber sub-port and a second optical fiber sub-port, the second optical fiber port including a third optical fiber sub-port and a fourth optical fiber sub-port, wherein only one of the first optical fiber sub-port and the second optical fiber sub-port has an optical signal, and only one of the third optical fiber sub-port and the fourth optical fiber sub-port has an optical signal, if the port has an optical signal, the optical path state parameter is 0, and if the port does not have an optical signal, the optical path state parameter is 1; a logic operation result generating module, used for performing a logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a logic operation result; the optical path state parameter includes two different logic values; the logic operation includes a first-level logic operation unit and a second-level logic operation unit; a fault detection module, configured to detect whether a fault occurs in the optical fiber connection path between the first optical fiber port and the second optical fiber port according to the result of the logic operation; A first-level logic operation unit, used for performing a first-level logic operation on the optical path state parameter of the first optical fiber port and the optical path state parameter of the second optical fiber port to generate a first logic operation result; the first-level logic operation includes an AND operation; A second-level logic operation unit is used to perform a second-level logic operation on the first logic operation result to generate a second logic operation result, and use the second logic operation result as the logic operation result; the second-level logic operation includes an OR operation; The optical path state parameter acquisition module includes an optical path state parameter acquisition unit, which is used to acquire the optical path state parameter of the first optical fiber sub-port, the optical path state parameter of the second optical fiber sub-port, the optical path state parameter of the third optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port; in the case where the first optical fiber port is connected to the second optical fiber port, the first optical fiber sub-port is connected to the third optical fiber sub-port, and the second optical fiber sub-port is connected to the fourth optical fiber sub-port; The first-level logic operation unit includes a first AND operation unit, a second AND operation unit and a first logic operation unit; The first AND operation unit is used to perform an AND operation on the optical path state parameter of the first optical fiber sub-port and the optical path state parameter of the third optical fiber sub-port to generate a first AND operation result; The second AND operation unit is used to perform an AND operation on the optical path state parameter of the second optical fiber sub-port and the optical path state parameter of the fourth optical fiber sub-port to generate a second AND operation result; The first logic operation unit is used to obtain the first logic operation result based on the first AND operation result and the second AND operation result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Optical signal processing method and device
CN111106868A
Equipment alarm method and device, storage medium and electronic equipment
CN114839953A