Optical bus communication method and communication device
By exchanging messages between the master optical terminal and the slave optical terminal, the problem of limited scalability of optical terminals in optical bus networks is solved, and the scalability and communication performance of optical terminals are improved.
Patent Information
- Application Number
- CN202310525798.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
The scalability of optical terminals in existing optical bus networks is limited, and the number of optical terminals that can be connected to by a single optical head is limited, which restricts application scenarios.
By exchanging messages between the master optical terminal and the slave optical terminal, the extended slave optical terminal reuses the uplink and downlink optical paths between the master optical terminal and the optical head, reducing the probability of message collisions on the transmission link, improving communication real-time performance, and realizing the scalability of the optical terminal.
It improves the scalability of optical terminals in optical bus networks, reduces communication latency and time overhead caused by collisions, and enhances communication performance.
Smart Images

Figure CN118944997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to an optical bus communication method and a communication device. Background Art
[0002] In the field bus, in order to meet the requirements of low latency and large bandwidth for services such as video and control mixed transmission, a field bus based on optical communication (or optical bus (OptiXBus)) can be used. Among them, the optical head end (OHE) in the optical bus network can use the optical distribution network (ODN) to connect multiple optical terminators (OT), thereby realizing the interaction between the controller and multiple field devices.
[0003] However, in the above optical bus network, the number of optical terminals that can be connected to an optical head end is limited, resulting in limited application scenarios. Therefore, how to improve the scalability of optical terminals in the optical bus network is an urgent problem to be solved. Summary of the invention
[0004] The optical bus communication method and communication device provided in the embodiments of the present application can improve the scalability of optical terminals in an optical bus network.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, an optical bus communication method is provided, wherein the optical bus network includes an optical head end, a master optical terminal connected to the optical head end, and at least one slave optical terminal networked with the master optical terminal. The method can be executed by the master optical terminal, or by a component of the master optical terminal, such as a processor, a chip, or a chip system of the master optical terminal, or by a logic module or software that can realize all or part of the functions of the master optical terminal. The following is an explanation of the method being executed by the master optical terminal as an example. The method includes: the master optical terminal sends an exchange message to a target slave optical terminal among at least one slave optical terminal, and receives an exchange message returned by the target slave optical terminal. The exchange message includes indication information corresponding to the target slave optical terminal, and the indication information is used to indicate: reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end into the data area of the exchange message.
[0007] Since in the embodiment of the present application, the extended slave optical terminal communicates and interacts with the optical head end through the master optical terminal, the slave optical terminal can reuse the uplink and downlink optical paths between the master optical terminal and the optical head end, that is, the optical head end does not need to allocate uplink time slots for the extended slave optical terminal, nor does it need to occupy the optical path power budget of the downlink optical path, so that one optical head end can connect to more slave optical terminals. Furthermore, since the data interaction between the extended slave optical terminal and the master optical terminal can be realized by transmitting an exchange message once, that is, the slave optical terminal reads data and / or writes data according to the indication information in the exchange message, and forwards the exchange message, the probability of multiple messages appearing on the transmission link at the same time can be reduced, that is, by reducing the probability of conflicts, the time overhead caused by conflicts can be reduced, that is, the communication delay between the master optical terminal and the slave optical terminal is reduced, and the real-time performance of the communication is improved, thereby improving the communication performance between the extended slave optical terminal and the optical head end. Therefore, the optical bus communication party provided in the embodiment of the present application can improve the scalability of optical terminals in optical bus networks.
[0008] In combination with the first aspect above, in a possible implementation, the master optical terminal sends an exchange message to a target slave optical terminal among at least one slave optical terminal, including: the master optical terminal determines the period of sending the exchange message according to the period of the optical head end obtaining the reported data; the master optical terminal sends the exchange message to the target slave optical terminal according to the period of the exchange message, and the indication information corresponding to the target slave optical terminal in the exchange message is used to indicate: write the data reported to the optical head end in the data area of the exchange message. Among them, the period of sending the exchange message can be less than or equal to the period of the optical head end obtaining the reported data. In other words, the master optical terminal can periodically obtain the data reported to the optical head end by the target slave optical terminal by periodically sending the exchange message to the target slave optical terminal. Further, the master optical terminal can store the obtained data reported to the optical head end by the target slave optical terminal, and return the data reported to the optical head end by the target slave optical terminal in response to the request of the optical head end; or, the master optical terminal can also actively send the data reported to the optical head end by the target slave optical terminal to the optical head end.
[0009] It should be understood that since the master optical terminal is networked with at least one slave optical terminal, when the optical head end accesses the target slave optical terminal, it is necessary to transmit exchange messages between the master optical terminal and the target slave optical terminal. However, when transmitting the exchange messages, other slave optical terminals will be passed through, which will cause delays. Therefore, the delay of the optical head end accessing the master optical terminal is less than the delay of the optical head end accessing the target slave optical terminal. In other words, the master optical terminal actively sends exchange messages to the target slave optical terminal to obtain the data reported by the target slave optical terminal to the optical head end in advance before the optical head end accesses the target slave optical terminal, thereby avoiding the above-mentioned delay.
[0010] In combination with the above-mentioned first aspect, in a possible implementation method, the method provided by the first aspect also includes: the master optical terminal receives a downlink message from the optical head end, and the downlink message includes data from the optical head end that needs to be read by the target slave optical terminal; accordingly, the master optical terminal sends a message to at least one target slave optical terminal among the slave optical terminals, including: the master optical terminal sends an exchange message to the target slave optical terminal according to the downlink message, and the indication information corresponding to the target slave optical terminal in the exchange message is used to indicate to read the data from the optical head end from the data area of the exchange message, and the data area of the exchange message includes the data from the optical head end that needs to be read by the target slave optical terminal.
[0011] In combination with the above-mentioned first aspect, in a possible implementation method, the method provided by the first aspect also includes: the main optical terminal sends an uplink message to the optical head end according to the exchange message returned by the target slave optical terminal, and the uplink message includes the data reported to the optical head end written by the target slave optical terminal.
[0012] In a second aspect, an optical bus communication method is provided, which is applied to an optical bus network, wherein the optical bus network includes an optical head end, a master optical terminal connected to the optical head end, and at least one slave optical terminal networked with the master optical terminal, wherein the at least one slave optical terminal includes a target slave optical terminal. The method can be executed by the target slave optical terminal, or by a component of the target slave optical terminal, such as a processor, a chip, or a chip system of the target slave optical terminal, or by a logic module or software that can realize all or part of the functions of the target slave optical terminal. The following is an example of the method being executed by the target slave optical terminal. The method includes: the method includes: the target slave optical terminal receives an exchange message from the master optical terminal, the exchange message includes indication information corresponding to the target slave optical terminal; the target slave optical terminal reads data from the optical head end from the data area of the exchange message according to the indication information, and / or writes data reported to the optical head end in the data area of the exchange message; the target slave optical terminal returns the exchange message to the master optical terminal.
[0013] Among them, the technical effect of the second aspect can refer to the above-mentioned first aspect and will not be repeated here.
[0014] In combination with the first aspect or the second aspect, in a possible implementation, the indication information corresponding to the target slave optical terminal may include the address information of the target slave optical terminal and the indication information corresponding to the address information of the target slave optical terminal. The address information of the target slave optical terminal may be used for addressing the target slave optical terminal, thereby determining the indication information corresponding to the target slave optical terminal in the exchange message. The address information of the target slave optical terminal may correspond one-to-one with the ID of the target slave optical terminal, for example, the address information of the target slave optical terminal may be the logical address of the target slave optical terminal.
[0015] Furthermore, the exchange message may include: address information of the target slave optical terminal, indication information corresponding to the target slave optical terminal, and data area corresponding to the target slave optical terminal. The address information of the target slave optical terminal may also be used by the target slave optical terminal to determine the data area corresponding to the target slave optical terminal in the exchange message.
[0016] In combination with the first aspect or the second aspect, in a possible implementation, the exchange message may include a message header and one or more sub-messages. The message header may include the data length of the sub-message in the exchange message, the type of the exchange message, etc. The type of the exchange message may be used to indicate that the exchange message is a message for communicating with a slave optical terminal. One sub-message corresponds to one slave optical terminal.
[0017] In combination with the first aspect or the second aspect, in a possible implementation, the data area of the exchange message includes the data area corresponding to the target slave optical terminal; the indication information corresponding to the target slave optical terminal is used to indicate reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end in the data area of the exchange message, including: the indication information corresponding to the target slave optical terminal is used to indicate reading data from the optical head end from the data area corresponding to the target slave optical terminal, and / or writing data reported to the optical head end in the data area corresponding to the target slave optical terminal. That is to say, when the target slave optical terminal reads data and / or writes data according to the indication information, it needs to operate in its corresponding data area.
[0018] It should be understood that the data read by the target slave optical terminal in its corresponding data area according to the indication information may also include data other than the data from the optical head end. For example, the indication information corresponding to the target slave optical terminal is used to indicate reading first data from the data area corresponding to the target slave optical terminal, and the first data includes data from the optical head end and data from the master optical terminal. The data from the master optical terminal may include indication information, configuration information, etc. of the master optical terminal for the target slave optical terminal.
[0019] It should be understood that the data written by the target slave optical terminal in its corresponding data area according to the indication information may also include data other than the data reported to the optical head end. For example, the indication information corresponding to the target slave optical terminal is used to indicate that second data is written in the data area corresponding to the target slave optical terminal, and the second data includes the data reported to the optical head end and the data reported to the master optical terminal.
[0020] In combination with the first aspect or the second aspect, in a possible implementation, the target slave optical terminal may be a slave optical terminal that needs to read data from the optical head end among at least one slave optical terminal. It can be understood that since the master optical terminal can receive a downlink message from the optical head end, it can determine which slave optical terminal among the at least one slave optical terminal is the target slave optical terminal according to the data carried in the downlink message.
[0021] Furthermore, the indication information corresponding to the target slave optical terminal can also be used to instruct the target slave optical terminal to write the data reported to the optical head end in the data area of the exchange message. In other words, the master optical terminal can complete the data exchange with the target slave optical terminal by sending an exchange message once, which can reduce the redundancy of communication and reduce the delay of the target slave optical terminal reporting the optical head end data, thereby improving the real-time performance of the optical head end obtaining the feedback data from the target slave optical terminal.
[0022] In combination with the first aspect or the second aspect above, in a possible implementation, the target slave optical terminal may be the slave optical terminal expected by the master optical terminal. Among them, the indication information corresponding to the target slave optical terminal can be used to instruct the target slave optical terminal to write the data reported to the optical head end in the data area of the exchange message. It can be understood that, as described above regarding the industrial bus, in some business scenarios (such as sensor monitoring, or data collection, etc.), the slave optical terminal needs to report data periodically, and then the master optical terminal actively sends an exchange message to the slave optical terminal expected by the master optical terminal to obtain the data reported to the optical head end.
[0023] In combination with the first aspect or the second aspect, in a possible implementation, the transmission path of the exchange message includes a transmission path of the exchange message between each slave optical terminal in at least one slave optical terminal. That is, the transmission of the exchange message between the master optical terminal and the target slave optical terminal needs to traverse each slave optical terminal in at least one slave optical terminal.
[0024] Furthermore, the exchange message includes indication information corresponding to the target slave optical terminal, including: the exchange message includes indication information corresponding to each slave optical terminal in at least one slave optical terminal. Wherein, the indication information corresponding to each slave optical terminal is used to indicate: write the data reported to the optical head end in the data area corresponding to the slave optical terminal. It should be understood that for the optical head end, both the master optical terminal and the slave optical terminal are objects that need to be managed, and they are nodes at the same level, that is, the master optical terminal is only responsible for forwarding the data corresponding to the slave optical terminal, and cannot parse the information carried by the data corresponding to the slave optical terminal, and thus the master optical terminal cannot predict which slave optical terminals in each slave optical terminal will report data to the optical head end. In other words, the transmission path of the exchange message will traverse the characteristics of each slave optical terminal, and through the indication information corresponding to each slave optical terminal in the exchange message, the master optical terminal can obtain the data reported to the optical head end corresponding to each slave optical terminal by sending an exchange message once, which can reduce the redundancy of communication.
[0025] In combination with the first aspect or the second aspect, in a possible implementation, the data area of the exchange message includes a data area corresponding to each of the at least one slave optical terminal. That is, the slave optical terminal performs read and write operations in its own data area, so that the data areas between different slave optical terminals can be isolated.
[0026] In combination with the first aspect or the second aspect above, in a possible implementation, the transmission path of the exchanged message is determined based on routing information, and the routing information is preconfigured. Specifically, the routing information is determined based on the connection order of the hardware ports when the master optical terminal is networked with at least one slave optical terminal. In other words, when the master optical terminal and at least one slave optical terminal complete the networking, the transmission path of the exchanged message has been determined. In other words, the transmission path of the exchanged message is fixed each time, and thus the delay is relatively fixed, that is, the jitter is small, which is convenient for compensating the delay. Furthermore, since the transmission path between the master optical terminal and the slave optical terminal is fixed, the optical head end accessing the slave optical terminal through the master optical terminal will not add additional jitter compared to the optical head end accessing the master optical terminal.
[0027] In a third aspect, a communication device is provided for implementing the various methods described above. The communication device may be the master optical terminal in the first aspect or any of its implementations, or a device including the master optical terminal, or a device included in the master optical terminal, such as a chip; or the communication device may be the target slave optical terminal in the second aspect or any of its implementations, or a device including the target slave optical terminal, or a device included in the target slave optical terminal, such as a chip. The communication device includes a module, unit, or means corresponding to the implementation of the above method, and the module, unit, or means may be implemented by hardware, software, or by executing the corresponding software implementation by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
[0028] In some possible designs, the communication device may include a processing module and a transceiver module. The transceiver module, which may also be referred to as a transceiver unit, is used to implement the sending and / or receiving functions in any of the above aspects and any possible implementations thereof. The transceiver module may be composed of a transceiver circuit, a transceiver, a transceiver or a communication interface. The processing module may be used to implement the processing functions in any of the above aspects and any possible implementations thereof.
[0029] In some possible designs, the transceiver module includes a sending module and a receiving module, which are respectively used to implement the sending and receiving functions in any of the above aspects and any possible implementation methods thereof.
[0030] In a fourth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer instructions, and when the processor executes the instructions, the communication device executes the method described in any one of the above aspects. The communication device can be the master optical terminal in the above first aspect or any implementation thereof, or a device including the above master optical terminal, or a device included in the above master optical terminal, such as a chip; or the communication device can be the target slave optical terminal in the above second aspect or any implementation thereof, or a device including the above target slave optical terminal, or a device included in the above target slave optical terminal, such as a chip.
[0031] In a fifth aspect, a communication device is provided, comprising: a processor and a communication interface; the communication interface is used to communicate with a module outside the communication device; the processor is used to execute a computer program or instruction so that the communication device executes the method described in any of the above aspects. The communication device can be the master optical terminal in the above first aspect or any implementation thereof, or a device including the above master optical terminal, or a device included in the above master optical terminal, such as a chip; or the communication device can be the target slave optical terminal in the above second aspect or any implementation thereof, or a device including the above target slave optical terminal, or a device included in the above terminal device, such as a chip.
[0032] In a sixth aspect, a communication device is provided, comprising: at least one processor; the processor is used to execute a computer program or instruction stored in a memory, so that the communication device executes the method described in any of the above aspects. The memory may be coupled to the processor, or may be independent of the processor. The communication device may be the master optical terminal in the above first aspect or any implementation thereof, or a device including the above master optical terminal, or a device included in the above master optical terminal, such as a chip; or the communication device may be the target slave optical terminal in the above second aspect or any implementation thereof, or a device including the above target slave optical terminal, or a device included in the above target slave optical terminal, such as a chip.
[0033] In a seventh aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer-readable storage medium is run on a communication device, the communication device can execute the method described in any one of the above aspects or any one of its implementation methods.
[0034] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a communication device, enables the communication device to execute the method described in any one of the above aspects or any one of its implementations.
[0035] In a ninth aspect, a communication device (for example, the communication device may be a chip or a chip system) is provided, wherein the communication device includes a processor for implementing the functions involved in any of the above aspects or any of its implementation methods.
[0036] In some possible designs, the communication device includes a memory for storing necessary program instructions and data.
[0037] In some possible designs, when the device is a chip system, it can be composed of a chip or include a chip and other discrete devices.
[0038] It can be understood that when the communication device provided in any one of the third aspect to the ninth aspect is a chip, the above-mentioned sending action / function can be understood as output, and the above-mentioned receiving action / function can be understood as input.
[0039] Among them, the technical effects brought about by any design method in the third to ninth aspects can refer to the technical effects brought about by different design methods in the above-mentioned first or second aspects, and will not be repeated here.
[0040] In a tenth aspect, a communication method is provided, which includes the method described in the first aspect or any of its implementations, and the method described in the second aspect or any of its implementations.
[0041] In an eleventh aspect, a communication system is provided, the communication system comprising the master optical terminal described in the above aspect and the target slave optical terminal described in the above aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a schematic diagram of an EtherCAT network architecture provided in an embodiment of the present application;
[0043] Figure 2 This is a schematic diagram of an optical bus network architecture provided in an embodiment of the present application. Figure 1 ;
[0044] Figure 3 This is a schematic diagram of an optical bus network architecture provided in an embodiment of the present application. Figure 2 ;
[0045] Figure 4 This is a schematic diagram of an optical bus network architecture provided in an embodiment of the present application. Figure 3 ;
[0046] Figure 5 It is a schematic diagram of a connection structure between a master optical terminal and a plurality of slave optical terminals provided in an embodiment of the present application;
[0047] Figure 6 This is a schematic diagram of the logical function structure of an optical head end provided in an embodiment of the present application;
[0048] Figure 7 It is a schematic diagram of the logical functional structure of an optical terminal provided in an embodiment of the present application;
[0049] Figure 8 It is a schematic diagram of a cascade interface logic function structure provided by an embodiment of the present application;
[0050] Fig. 9 is a structural diagram of a communication device provided in an embodiment of the present application;
[0051] Fig.10 This is a flow chart of an optical bus communication method provided by an embodiment of the present application;
[0052] Fig.11 This is a schematic diagram of an exchange message structure provided in an embodiment of the present application. Figure 1 ;
[0053] Fig.12 This is a schematic diagram of an exchange message structure provided in an embodiment of the present application. Figure 2 ;
[0054] Fig.13 It is a schematic diagram of a transmission process for exchanging messages between a master optical terminal and a slave optical terminal provided in an embodiment of the present application;
[0055] Fig.14 is a structural schematic diagram of a main optical terminal provided in an embodiment of the present application;
[0056] Fig.15 It is a structural schematic diagram of a target slave optical terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] To facilitate understanding of the technical solutions provided by the embodiments of the present application, a brief introduction to the related technologies of the present application is first given. The brief introduction is as follows:
[0058] First, fieldbus:
[0059] Fieldbus can be used for digital communication between a controller and multiple field devices. The controller can serve as the management center of the entire fieldbus network, thereby managing and maintaining multiple field devices. The controller can be a programmable logic controller (PCL); or, the controller can also be a device with computing processing capabilities other than PLC, such as a motion controller. Field devices can include motors, drives, actuators, robotics, sensors, and other input / output (I / O) devices.
[0060] Currently, fieldbus technology can adopt an open architecture based on Ethernet, such as Ethernet control automation technology (EtherCAT). Figure 1 As shown, the EtherCAT network architecture includes a controller and multiple field devices (such as Figure 1 The controller can be called a master station, and the field devices can be called slave stations. The topology formed by the network between the master station and multiple slave stations can be star-shaped, tree-shaped, or daisy-chain-shaped.
[0061] Furthermore, EtherCAT uses standard Ethernet data frames and a physical layer that complies with the Ethernet standard (ie, Institute of Electrical and Electronics Engineers (IEEE) 802.3). The EtherCAT data frame is generated by a controller and transmitted in a serial manner.
[0062] However, since the data frame will generate a delay (e.g. 100-500ns) when passing through the field equipment, and the data frame needs to pass through all the field equipment, the delay will also accumulate as the number of field equipment increases. Therefore, when there are many field equipment, there will be a large delay in the communication between the controller and the field equipment. In addition, the bandwidth of EtherCAT is usually at the 100M level, which cannot meet the needs of machine vision, motion control and other businesses for large bandwidth networks.
[0063] To meet the requirements of low latency and large bandwidth, the optical bus can provide lower latency and larger bandwidth. The optical bus network architecture is introduced below.
[0064] Second, optical bus network architecture:
[0065] Optical bus can be used for digital communication between controllers and multiple field devices in business scenarios such as industrial sites, smart homes, or building automation. Among them, the optical bus used in industrial sites can also be called industrial optical bus (IOB). In the optical bus network architecture, since one optical head end can connect multiple optical terminals through a splitter network, that is, point to multipoint (P2MP), the optical bus network architecture can enable the controller to send information to multiple field devices in parallel, so that multiple field devices can share bandwidth, and the overall communication delay will not increase with the increase in the number of field devices.
[0066] Combine the following Figure 2 and Figure 3Introduce the optical bus network architecture.
[0067] For example, Figure 2 Schematic diagram of an optical bus network architecture provided by an embodiment of the present application. Figure 2 As shown, the optical bus network architecture may include: a controller, an optical communication system, and multiple field devices. Among them, the optical communication system may include: an optical head end, a splitter network, and an optical terminal. The controller may be used to manage the optical head end, the optical terminal, and the field devices. The optical terminal may correspond to one or more field devices. The splitter network includes a trunk optical fiber, a splitter, and a branch optical fiber. The splitter (or optical splitter) is used for coupling and distribution of optical signals. For example, the splitter may be an optical fiber junction device having one or more input ends and multiple output ends. Specifically, the optical head end may be connected to the splitter through the trunk optical fiber, and the splitter may be connected to multiple optical terminals through multiple branch optical fibers, thereby realizing P2MP networking between an optical head end and multiple optical terminals.
[0068] Furthermore, according to the distribution ratio of the optical signal power by the optical splitter, the topological structure of the network between an optical head end and multiple optical terminals can be an equal-ratio splitting tree structure or an unequal-ratio splitting daisy chain structure. Figure 2 The structure of the optical communication system in the communication system, that is, the optical splitter in the communication system has one input end and three output ends, the input end is connected to the optical head end through the trunk optical fiber, and the output end is connected to the optical terminal #1~#3 through the branch optical fiber. The optical splitter can distribute the power of the optical signal from the input end to the three output ends in equal proportion, and then the power of the optical signal output from the three output ends is the same.
[0069] For the unequal-ratio splitting daisy-chain structure, the optical splitter can distribute the power of the optical signal from the input end to multiple output ends in unequal proportions, such as 1:2, 1:4, or 1:8, etc. Among them, the output end that distributes more power among the multiple output ends can be called a cascade end, which can be connected to other optical splitters through optical fibers; the output end that distributes less power among the multiple output ends can be connected to an optical terminal through optical fibers.
[0070] For example, Figure 3 The structure of the optical communication system in the optical bus network architecture shown is an unequal-ratio split daisy chain structure. Figure 3As shown, the communication system may include splitters #1 to #3, and each splitter may include 1 input end, 1 output end, and 1 cascade end. The input end of splitter #1 may be connected to the optical head end, the output end of splitter #1 may be connected to optical terminal #1, and the cascade end of splitter #1 may be connected to splitter #2. The output end of splitter #2 may be connected to optical terminal #2, and the cascade end of splitter #2 may be connected to splitter #3. The output end of splitter #3 may be connected to optical terminal #3, and the cascade end of splitter #2 may be used for extended connection, such as connecting to other splitters or optical terminals, or may be left vacant, which is not limited in the embodiments of the present application.
[0071] It should be understood that the above Figure 2 and Figure 3 The form and quantity of each structure in the optical bus network architecture shown in the figure are only used for example and do not constitute a limitation on the embodiments of the present application. For example, the optical head end, optical terminal, splitter, and the number of ports included in the above optical communication system are only examples. In addition, the name of each device or communication entity (or node) in the above optical communication system is only an example. The name of each device or communication entity in the specific implementation may also be other names. The embodiments of the present application do not make specific limitations on this. For example, the optical head end can also be called an optical line terminal (OLT), an optical controller, an optical master station, or an optical communication device, etc. The optical terminal can also be called an optical network terminal (ONT), an optical network unit (ONU), an optical slave station, or an optical communication device, etc.
[0072] In one possible implementation, the optical communication system may be a passive optical network (PON) system, wherein the PON system may be, for example, a gigabit capable PON (GPON) system, an Ethernet passive optical network (EPON) system, a 10 Gigabit Ethernet passive optical network (10Gb / sethernet passive optical network, 10G-EPON) system, a time and wavelength division multiplexing passive optical network (TWDM-PON), a 10 Gigabit passive optical network (XG-PON) system, or a 10 Gigabit symmetric passive optical network (XGS-PON) system, etc. Of course, with the emergence of new technologies in the future, the rate of the PON system may be increased to 25Gbps, 50Gbps or even 100Gbps, so the optical communication system can also be a PON system with a higher transmission rate, which is not limited in the embodiments of the present application.
[0073] Based on the above description of the optical communication system, the working principle of the optical communication system is introduced below by taking the optical communication system as a PON system as an example.
[0074] like Figure 2 and Figure 3 As shown, the transmission direction of data or optical signals carrying data from the optical head end to the optical terminal is called the downlink direction. The direction in which data or optical signals carrying data are transmitted from the optical terminal to the optical head end is called the uplink direction. The optical signal transmission method from the optical head end to the optical terminal can be broadcast or unicast; the optical terminal can transmit the optical signal to the optical head end by unicast. It should be understood that for the uplink direction, the PON system is a multipoint to point (MP2P) system; for the downlink direction, the PON system is a P2MP system. The optical communication system can be a single-fiber bidirectional system, and the controller and the optical head end can communicate through the service node interface (SNI), and the optical terminal and the field equipment it manages can communicate through the user network interface (UNI).
[0075] Furthermore, in the downstream direction, the signal sent by the optical head end can be divided into n signals through a splitter with a 1:n distribution ratio (n is an integer greater than 1), and arrive at each optical terminal respectively; in the upstream direction, the signal sent by any optical terminal will only arrive at the optical head end, and will not arrive at other optical terminals. If multiple optical terminals send signals at the same time, the multiple signals will be combined into one signal through the splitter and arrive at the optical head end, and then there will be a superposition of optical signals with the same wavelength. After receiving the superposition signal, the optical head end cannot parse the superposition signal. Therefore, in order to avoid upstream data conflicts and improve network utilization efficiency, multiple access methods such as time division multiple access (TMDA) can be used in the upstream direction, and the upstream data from each optical terminal can be arbitrated. For example, the optical head end allocates different upstream time slots to each optical terminal, and each optical terminal sends upstream data or upstream transmission frames in its corresponding upstream time slot to ensure that the upstream data sent by each optical terminal will not conflict or interfere during the transmission process. The specific PON communication mechanism and protocol will not be repeated here.
[0076] However, according to the working principle of the above optical communication system, the number of optical terminals that can be connected to an optical head end is limited due to the limitation of the optical path power budget and configuration parameters. Specifically, for the downlink direction, the optical signal sent by the optical head end to the optical terminal reaches the optical terminal through a 1:n distribution ratio of the optical splitter and the optical fiber. The transmission of the optical signal through optical devices such as the optical splitter and the optical fiber transmission will cause the optical signal to attenuate (i.e., optical attenuation). In theory, the optical attenuation of the optical signal cannot be greater than the threshold (e.g., 28 decibels (dB), or 30dB, or 31dB, etc.), which will limit the distribution ratio of the optical signal power (e.g., the maximum distribution ratio of the optical splitter is 1:128 under ideal conditions), thereby limiting the number of optical terminals that can be connected to the optical splitter. For the uplink direction, as mentioned above, the optical head end needs to allocate different configuration parameters such as uplink time slots to each optical terminal to avoid conflicts. As the number of optical terminals increases, the uplink time slots that need to be allocated will also accumulate, but considering the ratio between the uplink and downlink transmission time, the duration of the uplink transmission in an uplink transmission cycle is limited, that is, the number of uplink time slots in an uplink transmission cycle is limited.
[0077] In one possible implementation, multiple optical terminals are networked. The multiple optical terminals may include a master optical terminal and a slave optical terminal, the master optical terminal is optically connected to the optical head end, and the slave optical terminal is connected to the optical head end through the master optical terminal. In other words, by changing the network structure in the above optical communication system, the number of optical terminals that can be connected to an optical head end can be increased. However, when the master optical terminal and different slave optical terminals exchange data through messages, different messages need to share at least part of the transmission link, and as the number of slave optical terminals that need to exchange data increases, the probability of multiple messages existing on the shared transmission link at the same time will increase, that is, the probability of conflict will increase, resulting in the inability of the extended slave optical terminal to communicate normally with the master optical terminal. Therefore, the scalability of the optical terminal in the optical bus network is limited.
[0078] Based on this, the embodiments of the present application provide an optical bus communication method and a communication device, which can improve the scalability of optical terminals in an optical bus network.
[0079] The technical solution in the embodiment of the present application will be described below in conjunction with the accompanying drawings in the embodiment of the present application. In order to facilitate understanding of the embodiment of the present application, the following points are explained before introducing the embodiment of the present application.
[0080] 1. In the embodiments of the present application, for the convenience of description, when numbering is involved, the consecutive numbering can be started from 1, the consecutive numbering can be started from 0, or the numbering can be started from any parameter.
[0081] 2. "Pre-definition", "pre-configuration", or "pre-configuration" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, an optical terminal or an optical head end). The embodiments of the present application do not limit the specific implementation method.
[0082] 3. The "protocol" involved in the embodiments of the present application may refer to the IEEE 802.3 protocol family, the PON protocol family in the communication field, or related protocols of the optical bus used in future communication systems, and the embodiments of the present application are not limited to this.
[0083] 4. In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that under certain objective circumstances, the device (such as the master optical terminal or the slave optical terminal) will make corresponding processing, which does not limit the time, and does not require the device (such as the master optical terminal or the slave optical terminal) to have a judgment action when implementing it, nor does it mean that there are other limitations.
[0084] 5. In the embodiments of the present application, “sending information to...(main optical terminal)” can be understood as the destination of the information being the main optical terminal, which may include directly or indirectly sending information to the main optical terminal. “Receiving information from...(main optical terminal)” or “receiving information from...(main optical terminal)” can be understood as the source of the information being the main optical terminal, which may include directly or indirectly receiving information from the main optical terminal. The information may be processed as necessary between the source and destination of the information transmission, such as format changes, etc., but the destination can understand the valid information from the source. Similar expressions in the present application can be understood similarly and will not be repeated here.
[0085] 6. In the description of the embodiments of the present application, unless otherwise specified, the "and / or" in the embodiments of the present application indicates that there may be three relationships, for example, A and / or B, which may indicate: A exists alone, A and B exist at the same time, and B exists alone, wherein A and B may be singular or plural. Moreover, "at least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art may understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit the certain difference. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations.
[0086] The technical solutions of the embodiments of the present application can be applied to various communication systems. For example: PON communication system, optical communication system based on Ethernet standard, or other optical communication system. In addition, the communication system can also be applied to future-oriented communication technologies, all of which are applicable to the technical solutions provided in the embodiments of the present application. The above-mentioned communication systems applicable to the present application are only examples, and the communication systems applicable to the present application are not limited thereto. They are uniformly described here and will not be repeated below.
[0087] In addition, the communication architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can know that with the evolution of the communication architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0088] like Figure 4As shown, it is a schematic diagram of an optical bus network architecture provided by an embodiment of the present application, and the optical bus network includes an optical head end, a master optical terminal, and at least one slave optical terminal (for example, slave optical terminals #1 to #n, where n is an integer greater than 1). Among them, the optical head end and the master optical terminal are optically interconnected, for example, the optical head end and the master optical terminal are optically interconnected through the above-mentioned split optical network. The network structure between the master optical terminal and at least one slave optical terminal can be star-shaped, tree-shaped, or daisy-chain-shaped. For example, as Figure 5 As shown, the master optical terminal and the slave optical terminals #1 to #n may be cascaded to each other (or called a hand-in-hand structure). In a possible implementation, the optical head end is connected to the controller, and the master optical terminal and each of the at least one slave optical terminal are connected to the field device ( Figure 4 Not shown, please refer to Figure 2 and Figure 3 ). Furthermore, the optical head end may also be connected to other optical terminals that do not need to be networked, which is not specifically limited in the embodiments of the present application.
[0089] In a possible implementation, the master optical terminal sends an exchange message to a target slave optical terminal among at least one slave optical terminal, and receives an exchange message returned by the target slave optical terminal. The exchange message includes indication information corresponding to the target slave optical terminal, and the indication information is used to indicate: reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end into the data area of the exchange message.
[0090] The specific implementation of the above solution will be described in detail in the following embodiments and will not be repeated here.
[0091] Since, in the embodiment of the present application, the extended slave optical terminal communicates and interacts with the optical head end through the master optical terminal, the slave optical terminal can multiplex the uplink and downlink optical paths between the master optical terminal and the optical head end, that is, the optical head end does not need to allocate uplink time slots for the extended slave optical terminal, nor does it need to occupy the optical path power budget of the downlink optical path, so that one optical head end can connect to a larger number of slave optical terminals. Furthermore, since the data interaction between the extended slave optical terminal and the master optical terminal is realized by transmitting exchange messages, that is, the slave optical terminal reads data and / or writes data according to the indication information in the exchange message, and forwards the exchange message, the probability of multiple messages appearing on the transmission link at the same time can be reduced, that is, the time overhead caused by the conflict can be reduced by reducing the probability of conflict, that is, the communication delay between the master optical terminal and the slave optical terminal is reduced, and the real-time nature of the communication is improved, thereby improving the communication performance between the extended slave optical terminal and the optical head end. Therefore, the optical bus communication party provided in the embodiment of the present application can improve the scalability of the optical terminal in the optical bus network. The following is combined with the above Figure 4 and Figure 5The optical bus network architecture shown is a schematic diagram of the logical functional structure of the optical head end, the master optical terminal, and the slave optical terminal in the embodiment of the present application.
[0092] In one possible implementation, the optical head end and the controller can be deployed in a unified system, for example, both are deployed in the optical head end. In this case, the controller can be specifically implemented as a PLC module, and the interface between the optical head end and the PLC module is an internal software transceiver interface.
[0093] In another possible implementation, the controller and the optical head end can be deployed separately, and the controller and the optical head end are connected by an external interface. In this case, the SNI interface of the optical bus system can be an Ethernet interface or a high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIE) interface. In a possible implementation, the UNI interface can be an Ethernet interface, a serial peripheral interface (serial peripheral interface, SPI) interface, a servo motor monitoring and drive interface (such as a general-purpose input / output port (general-purpose input / output, GPIO), or an electrical characteristic of a balanced voltage digital interface circuit (RS-422) interface, etc.).
[0094] Furthermore, the optical head end is mainly used to carry and multiplex bus services / Ethernet services in the P2MP communication system. Figure 6 As shown, the optical head end may include, for example: a PLC module (optionally), an optical bus module, an Ethernet service module (optionally), a point-to-multipoint module, and a head-end optical module, etc. Among them, the PLC module can be used to complete the programming and management functions of multiple industrial network controls (such as the optical head end and the optical terminal managed by the optical head end, etc.). The optical bus module can be used to complete the carrying of optical bus services, and its service data is the data of the control machine or the query / collection machine. The Ethernet service module can be used to carry the Ethernet service of the local end, and the interface provided by the module to the outside is the Ethernet interface. The point-to-multipoint module can be used to complete the link layer communication of multiple optical terminals in a point-to-multipoint network. The head-end optical module can be used to complete the transmission of optical signals at the optical head end and the reception of optical signals at the optical terminal. The light here can be single wavelength or multi-wavelength, which is not limited in this application.
[0095] The following introduces the logical functional structure of the master optical terminal and the slave optical terminal in the embodiment of the present application.
[0096] The master optical terminal and the slave optical terminal may have the same module. The master optical terminal may have other modules for the slave optical terminal. Figure 7As shown, both the slave optical terminal and the master optical terminal may include: a peripheral interface module, a data processing and storage module, a cascade forwarding module, a serializer / deserializer (serializer deserializer, SDS), and a cascade interface module. Among them, the peripheral interface module is used to communicate with external information, such as obtaining field device data (such as sensor data, analog I / O data, etc.) through the SPI interface.
[0097] The data processing and storage module is used for address mapping of local data, data synchronization processing, etc. Among them, the data processing and storage module can obtain field device data through the peripheral interface module, and for example, the data processing and storage module can exchange data through the cascade forwarding module to exchange messages. Specifically, the data processing and storage module can read the data from the optical head end carried in the exchange message, and / or write the local data into the data area of the exchange message.
[0098] The cascade forwarding module is used for cascade protocol processing and forwarding to achieve communication with the cascaded slave optical terminals (for example Figure 5 communication between slave optical terminal #1 and slave optical terminal #2 in the example above), and / or communication with a cascaded master optical terminal (e.g. Figure 5 The communication between the slave optical terminal #1 and the master optical terminal in the process), and the cascade forwarding module can obtain the field device data from the data processing and storage module.
[0099] SDS is used to realize serial-to-parallel conversion of data.
[0100] The cascade interface module is used to perform signal interaction with the cascaded slave optical terminal and / or master optical terminal.
[0101] It can be understood that after the switching message enters the optical terminal through the cascade interface module, it can be converted from serial to parallel through SDS, and the converted switching message enters the cascade forwarding module, and then exchanges data with the local data in the data processing and storage module through the cascade forwarding module, and is forwarded again through SDS and the cascade interface module.
[0102] Further, for the slave optical terminal, the cascade interface module can be logically divided into two types of cascade interfaces, which are respectively used to connect the slave optical terminals on both sides of the cascade (e.g., slave optical terminal #1 and slave optical terminal #3 on both sides of slave optical terminal #2), or respectively used to connect the cascaded slave optical terminal and the master optical terminal (e.g., master optical terminal and slave optical terminal #2 on both sides of slave optical terminal #1). The above two types of cascade interfaces can receive or send signals.
[0103] For example, the process of transmitting the exchange message through the cascade interface is described by taking the slave optical terminal #2 as the target slave optical terminal and combining the above exchange message. Figure 5As shown, the master optical terminal sends an exchange message to the slave optical terminal #2, and receives the exchange message returned by the slave optical terminal #2, and then the transmission path of the exchange message can be: the master optical terminal sends an exchange message to the slave optical terminal corresponding to the next destination address (i.e., slave optical terminal #1); the slave optical terminal #1 receives the exchange message, processes it, and sends the exchange message to the slave optical terminal corresponding to the next destination address (i.e., slave optical terminal #2); the slave optical terminal #2 receives the exchange message, and performs corresponding processing according to the indication information in the exchange message, and sends the exchange message to the slave optical terminal corresponding to the next destination address (for example, it may be slave optical terminal #1), and then the slave optical terminal #1 forwards the exchange message to the master optical terminal.
[0104] In the above-mentioned process of transmitting exchange messages, for the cascade interface between the slave optical terminal #1 and the master optical terminal (or referred to as cascade interface #1), the cascade interface #1 receives exchange messages that have not yet reached the slave optical terminal #2 from the master optical terminal, and sends exchange messages returned by the slave optical terminal #2 to the master optical terminal. Similarly, for the cascade interface between the slave optical terminal #1 and the slave optical terminal #2 (or referred to as cascade interface #2), the cascade interface #2 also includes sending and receiving exchange messages.
[0105] It can be understood that, based on the above description of the process of transmitting and exchanging messages, the above cascade interface #1 can be called a cascade input interface, and the above cascade interface #2 can be called a cascade output interface. Of course, the above cascade interface #1 can also be replaced by other names, such as "cascade receiving interface", or the above cascade interface #2 can also be replaced by other names, such as "cascade sending interface", which is not limited in the embodiments of the present application.
[0106] Based on the above description of the cascade interface, the definition of the cascade interface is introduced in detail below.
[0107] Figure 8 1 is a schematic diagram of a cascade interface logic function structure provided by an embodiment of the present application. Figure 8 As shown, the cascade interface can functionally include a cascade send / receive interface. Among them, the cascade send / receive interface can be used for data transmission (e.g., exchanging messages), and the exchanged messages can be carried by electrical signals or optical signals. For example, the electrical signal can be an electrical signal of a differential level type (e.g., low-voltage differential signaling (LVDS)), and can be transmitted through a balanced cable. It is understood that the optical signal can be transmitted through an optical fiber.
[0108] Optionally, the cascade interface may also include a clock time interface in terms of function. The clock time interface may be used for time synchronization of the cascaded master optical terminal / slave optical terminal. For example, the cascade input interface is used to receive clock time information; the cascade output interface is used to send clock time information.
[0109] Optionally, the cascade interface may also include a power interface in its function. The power interface may be used to power the cascaded slave optical terminal. For example, for the cascade input interface, it is used for power input; for the cascade output interface, it is used for power output. It is understood that when the cascade interface transmits an optical signal through an optical fiber, the optical fiber may be an optical-electrical integrated optical fiber, thereby providing a power supply function.
[0110] like Figure 7 As shown, in addition to the above modules, the main optical terminal may also include: an industrial optical bus processing module and a communication interface module. Among them, the industrial optical bus processing module is used for industrial optical bus protocol processing (such as link layer processing of point-to-multipoint network), to realize communication between the main optical terminal and the optical head end, and to obtain field equipment data from the data processing and storage module. The communication interface module is used to complete the transceiver processing of optical signals between the main optical terminal and the optical head end. It should be understood that logically, the communication interface module may include a communication sending interface and a communication receiving interface, the communication sending interface is used to send optical signals to the optical head end, and the communication receiving interface is used to receive optical signals from the optical head end.
[0111] In a possible implementation, the main optical terminal may further include a dual-transmit selective receiving module, wherein the dual-transmit selective receiving module supports two communication interfaces connected to the optical head end, thereby realizing dual-transmit selective receiving, so that service switching will not be interrupted, and the reliability of optical bus communication is improved.
[0112] It can be understood that, in combination with the modules corresponding to the above-mentioned master optical terminal, the workflow of the master optical terminal is: receiving the downlink message from the optical head end through the communication interface module, and after the downlink message enters the device, the "serial-parallel" conversion is realized through the SDS, and converted into a data stream through the dual-transmitter and receiver module. Furthermore, the data stream implements protocol conversion through the industrial optical bus processing module, and then performs local data exchange through the data processing and storage module, while driving the cascade forwarding module to access the connected slave optical terminal, thereby completing the conversion of the data stream between the master optical terminal and the extended slave optical terminal.
[0113] It should be understood that the above description of the interface is a classification based on different interfaces in terms of logical functions. The embodiment of the present application does not specifically limit the number of interfaces and the input and output methods. The input (or receiving) interface and the output (or sending) interface can be the same physical port or two separate physical ports. Furthermore, the number of physical ports corresponding to the interface can be 2, 3, or more physical ports, which is not specifically limited in the embodiment of the present application.
[0114] It can be understood that, combined with the above description of the logical functional structure of the master optical terminal and the slave optical terminal, since both the master optical terminal and the slave optical terminal have the cascade connection function, the master optical terminal and the slave optical terminal can be designed in a normalized manner, for example, Figure 7 The optical terminal shown is configured so that the optical terminal is in a master optical terminal mode or a slave optical terminal mode. The master optical terminal mode can also be replaced by an optical terminal mode, and the slave optical terminal mode can also be replaced by an extension module or an extension IO mode, etc., which is not specifically limited in the embodiments of the present application.
[0115] In a possible implementation, the optical terminal may further include a device type module and a register. The device type module is used to configure the optical terminal to be in a master optical terminal mode or a slave optical terminal mode. The register is used for optical terminal status and function configuration. For example, the register can be used to select whether to drive the above-mentioned industrial optical bus processing module and / or the cascade forwarding module. It can be understood that if the above-mentioned industrial optical bus processing module and the cascade forwarding module can be driven, the optical terminal is in the master optical terminal mode; if only the cascade forwarding module is driven, the optical terminal is in the slave optical terminal mode.
[0116] That is to say, the above-mentioned related functions of the master optical terminal or the slave optical terminal in the embodiment of the present application can be implemented by one device, or by multiple devices together, or by one or more functional modules in one device. It can be understood that the above-mentioned functions can be components in hardware devices, or software functions running on dedicated hardware, or a combination of hardware and software, or virtualized functions instantiated on a platform (e.g., a cloud platform).
[0117] For example, the related functions of the master optical terminal or the slave optical terminal in the embodiment of the present application can be Fig. 9 The communication device 900 is used to implement the above.
[0118] Fig. 9 FIG. 1 is a schematic diagram of the structure of a communication device 900 provided in an embodiment of the present application. The communication device 900 includes one or more processors 901, a communication line 902, and at least one communication interface ( Fig. 9The communication device 900 is merely illustrative and is described by taking a communication interface 904 and a processor 901 as an example. In a possible implementation, the communication device 900 may further include a memory 903.
[0119] The processor 901 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0120] Communication line 902 may include pathways for connecting different components.
[0121] The communication interface 904 may be a transceiver module for communicating with other devices or communication networks, such as a splitter network in a PON, Ethernet, etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. In a possible implementation, the communication interface 904 may also be a transceiver circuit located in the processor 901, for implementing signal input and signal output of the processor.
[0122] The memory 903 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 902. The memory may also be integrated with the processor.
[0123] The memory 903 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 901. The processor 901 is used to execute the computer-executable instructions stored in the memory 903, thereby implementing the method provided in the embodiment of the present application.
[0124] Alternatively, in an embodiment of the present application, the processor 901 may also execute processing-related functions in the method provided in the following embodiments of the present application, and the communication interface 904 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiments of the present application.
[0125] The computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which is not specifically limited in the embodiments of the present application.
[0126] In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as Fig. 9 CPU0 and CPU1 in.
[0127] In a specific implementation, as an embodiment, the communication device 900 may include multiple processors, such as Fig. 9 901 and processor 907 in the embodiment. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0128] Optionally, the communication apparatus 900 may further include an output device 905 and an input device 906. The output device 905 communicates with the processor 901 and may display information in a variety of ways.
[0129] The communication device 900 can be a general device or a dedicated device. For example, the communication device 900 can be a vehicle-mounted terminal device, an embedded device, a router, a repeater, or a Fig. 9 The embodiment of the present application does not limit the type of the communication device 900.
[0130] The following will be combined Figure 4 , the optical bus communication method provided in the embodiment of the present application is described in detail.
[0131] It should be understood that the message names between the various devices or the names of the various parameters in the messages in the following embodiments of the present application are merely examples, and other names may be used in specific implementations, and the embodiments of the present application do not specifically limit this.
[0132] by Figure 4 As shown in the figure, the interaction between the master optical terminal and the slave optical terminal is taken as an example. Fig.10 As shown, it is a schematic diagram of the optical bus communication method provided in an embodiment of the present application, comprising the following steps:
[0133] S1001: A master optical terminal sends an exchange message to a target slave optical terminal among at least one slave optical terminal. Correspondingly, the target slave optical terminal receives the exchange message from the master optical terminal.
[0134] The exchange message includes indication information corresponding to the target slave optical terminal, and the indication information is used to indicate: reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end into the data area of the exchange message.
[0135] S1002. The target slave optical terminal reads data from the optical head end from the data area of the exchange message according to the instruction information, and / or writes data reported to the optical head end into the data area of the exchange message.
[0136] S1003: The target slave optical terminal returns an exchange message to the master optical terminal. Correspondingly, the master optical terminal receives the exchange message returned by the target slave optical terminal.
[0137] Steps S1001 to S1003 are described below respectively.
[0138] For step S1001:
[0139] It should be understood that, as mentioned above Figure 4 As shown in the relevant description of the optical bus network architecture, the master optical terminal is networked with at least one slave optical terminal, so the master optical terminal needs to scan and discover each slave optical terminal in at least one slave optical terminal, and configure each slave optical terminal to complete the networking. Specifically, the master optical terminal can be controlled by the host computer to complete the networking with each slave optical terminal, or the master optical terminal can discover each slave optical terminal through broadcast addressing, and configure each slave optical terminal to complete the networking. The configuration information of the slave optical terminal may include the name of the slave optical terminal, interface type, memory management, data type, data length, clock information, and address for data interaction, etc. Among them, the address for data interaction can be a logical address assigned by the master optical terminal to each slave optical terminal, and the logical address corresponds to the slave optical terminal one by one, and then used for the slave optical terminal to address the corresponding data area and indication information in the exchange message. The indication information can be used to indicate, for example: whether the slave optical terminal reads data in the data area corresponding to the slave optical terminal, and / or whether to write data in the data area corresponding to the slave optical terminal.
[0140] In a possible implementation, the master optical terminal may allocate a logical address to each of the at least one slave optical terminal according to the distance between the master optical terminal and the at least one slave optical terminal in the topological structure. The logical address may be represented by numbers or letters, and may be arranged in ascending / descending order according to the distance in the topological structure. For example, Figure 5Taking the cascade structure shown in the figure as an example, the logical addresses [IO1 ID, IO2 ID, IO3 ID, ..., IOn ID] corresponding to the optical terminals #1 to #n can be: [1, 2, 3, ..., n], or [1 / 2, 1 / 3, ..., 1 / n]. For another example, taking A as the logical address of the main optical terminal, the logical addresses [IO1 ID, IO2 ID, IO3 ID, ..., IOn ID] corresponding to the optical terminals #1 to #n can be: [A+1, A+2, ..., A+n], or [A+1 / 2, A+1 / 3, ..., A+1 / n], etc., which are not specifically limited in the embodiments of the present application.
[0141] In another possible implementation manner, the master optical terminal may allocate a logical address to each of the at least one slave optical terminal according to a physical distance between the master optical terminal and the at least one slave optical terminal.
[0142] It can be understood that since the optical head end needs to exchange data with the slave optical terminal, the master optical terminal needs to send the configuration information of each slave optical terminal to the optical head end. The optical head end can allocate an identification (identification / identity, ID) to each slave optical terminal according to the configuration information of each slave optical terminal in at least one slave optical terminal, and use it for data exchange.
[0143] Furthermore, the optical head end sends the assigned ID to the master optical terminal, so that the master optical terminal can determine the data from the optical head end corresponding to each slave optical terminal according to the ID of each slave optical terminal. The master optical terminal can map the ID of each slave optical terminal to the logical address of each slave optical terminal one by one, so that the master optical terminal can write the data from the optical head end that needs to be read by each slave optical terminal into the data area of the exchange message, and the master optical terminal can read the data written by each slave optical terminal and reported to the optical head end from the data area of the returned exchange message.
[0144] For example, Figure 5 Taking the at least one slave optical terminal networked with the main optical terminal as an example, including slave optical terminals #1 to #n (n is an integer greater than 3), the optical head end allocates IDs to slave optical terminals #1 to #n, the data from the optical head end that needs to be read from the optical terminal, and the mapping relationship between the logical addresses is shown in Table 1.
[0145] Table 1
[0146] From the optical terminal ID Data from the optical head end Logical address From optical terminal #1 IO1 IO1 data IO1 ID From optical terminal #2 IO2 IO2 data IO2 ID From optical terminal #3 IO3 IO3 data IO3 ID … … … … From optical terminal #n IOn IOn data IOn ID
[0147] It should be understood that the ID of the slave optical terminal in Table 1 is merely exemplary, and the ID of the slave optical terminal may be represented by numbers, letters, or other symbols, and the embodiments of the present application do not specifically limit this.
[0148] In a possible implementation, the indication information corresponding to the target slave optical terminal may include the address information of the target slave optical terminal and the indication information corresponding to the address information of the target slave optical terminal. The address information of the target slave optical terminal may be used for addressing the target slave optical terminal, and then determine the indication information corresponding to the target slave optical terminal in the exchange message. The address information of the target slave optical terminal may correspond one-to-one with the ID of the target slave optical terminal, for example, the address information of the target slave optical terminal may be the logical address of the target slave optical terminal.
[0149] Furthermore, the exchange message may include: address information of the target slave optical terminal, indication information corresponding to the target slave optical terminal, and data area corresponding to the target slave optical terminal. The address information of the target slave optical terminal may also be used by the target slave optical terminal to determine the data area corresponding to the target slave optical terminal in the exchange message.
[0150] The specific structure of the exchange message is introduced below.
[0151] In a possible implementation, the exchange message may include a message header and one or more sub-messages. The message header may include the data length of the sub-message in the exchange message, the type of the exchange message, and other contents. The type of the exchange message may be used to indicate that the exchange message is a message used to communicate with the slave optical terminal. One sub-message corresponds to one slave optical terminal.
[0152] Specifically, Fig.11 As shown, the sub-message may include an address field, a command and length field, and a data area. The address field is used to indicate the address information of the target slave optical terminal. The command and length field may include a command subfield and a length subfield, the command subfield may be used to indicate the indication information corresponding to the target slave optical terminal, and the length subfield indicates the length of the data area corresponding to the target slave optical terminal. Further, the data area corresponding to the target slave optical terminal may be divided into: a data area for reading data from the target slave optical terminal and a data area for writing data to the target slave optical terminal.
[0153] It can be understood that, since the address field of the sub-message in the exchange message can be used to determine the target slave optical terminal that needs to execute the above instruction information, the exchange message may not include the destination address information.
[0154] It can also be understood that when other slave optical terminals except the target slave optical terminal receive the exchange message, and other slave optical terminals determine that the address indicated by the address field in the sub-message does not belong to themselves, other slave optical terminals can skip the sub-message and parse the content of the next sub-message. Further, if other slave optical terminals do not address their own sub-messages in the exchange message, they forward the exchange message.
[0155] In a possible implementation, the data area of the exchange message includes a data area corresponding to the target slave optical terminal; the indication information corresponding to the target slave optical terminal is used to indicate reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end in the data area of the exchange message, including:
[0156] The indication information corresponding to the target slave optical terminal is used to indicate reading data from the optical head end from the data area corresponding to the target slave optical terminal, and / or writing data reported to the optical head end into the data area corresponding to the target slave optical terminal.
[0157] That is, when the target reads data and / or writes data from the optical terminal according to the instruction information, it needs to perform operations in its corresponding data area.
[0158] It should be understood that the data read by the target slave optical terminal in its corresponding data area according to the indication information may also include data other than the data from the optical head end.
[0159] In a possible implementation, the indication information corresponding to the target slave optical terminal is used to indicate reading data from the optical head end from the data area of the exchange message, including: the indication information corresponding to the target slave optical terminal is used to indicate reading first data from the data area corresponding to the target slave optical terminal, and the first data includes data from the optical head end and data from the master optical terminal. The data from the master optical terminal may include indication information, configuration information, etc. of the master optical terminal for the target slave optical terminal, and the embodiment of the present application does not specifically limit this.
[0160] It should be understood that the data written by the target slave optical terminal in its corresponding data area according to the indication information may also include data other than the data reported to the optical head end.
[0161] In one possible implementation, the indication information corresponding to the target slave optical terminal is used to instruct the writing of the data reported to the optical head end in the data area corresponding to the target slave optical terminal, including: the indication information corresponding to the target slave optical terminal is used to instruct the writing of second data in the data area corresponding to the target slave optical terminal, and the second data includes the data reported to the optical head end and the data reported to the master optical terminal.
[0162] The target slave optical terminal is introduced below.
[0163] In a possible implementation, the target slave optical terminal may be a slave optical terminal among at least one slave optical terminal that needs to read data from the optical head end. It can be understood that since the master optical terminal can receive downlink messages from the optical head end, it can determine which slave optical terminal among at least one slave optical terminal is the target slave optical terminal according to the data carried in the downlink messages.
[0164] Furthermore, the indication information corresponding to the target slave optical terminal can be used to instruct the target slave optical terminal to read the data from the optical head end from the data area of the exchange message. The data area of the exchange message includes the data from the optical head end corresponding to the target slave optical terminal.
[0165] Optionally, the indication information corresponding to the target slave optical terminal can also be used to instruct the target slave optical terminal to write the data reported to the optical head end in the data area of the exchange message. In other words, the master optical terminal can complete the data exchange with the target slave optical terminal by sending an exchange message once, which can reduce the redundancy of communication and reduce the delay of the target slave optical terminal reporting the optical head end data, thereby improving the real-time performance of the optical head end obtaining the feedback data from the target slave optical terminal.
[0166] In another possible implementation, the target slave optical terminal may be the slave optical terminal expected by the master optical terminal. The indication information corresponding to the target slave optical terminal may be used to instruct the target slave optical terminal to write the data reported to the optical head end in the data area of the exchange message. It can be understood that, as described above with respect to the industrial bus, in some business scenarios (such as sensor monitoring, or data collection, etc.), the slave optical terminal needs to report data periodically, and then the master optical terminal actively sends an exchange message to the slave optical terminal expected by the master optical terminal to obtain the data reported to the optical head end.
[0167] In one possible implementation, the master optical terminal sends an exchange message to a target slave optical terminal among at least one slave optical terminal (i.e., step S1001), including: the master optical terminal determines the period for sending the exchange message according to the period for the optical head end to obtain the reported data; the master optical terminal sends the exchange message to the target slave optical terminal according to the period for the exchange message, and the indication information corresponding to the target slave optical terminal in the exchange message is used to indicate: writing the data reported to the optical head end into the data area of the exchange message.
[0168] The period of sending exchange messages may be less than or equal to the period of the optical head end obtaining reported data. That is, the master optical terminal can periodically obtain the data reported by the target slave optical terminal to the optical head end by periodically sending exchange messages to the target slave optical terminal.
[0169] Furthermore, the master optical terminal can store the acquired data reported by the target slave optical terminal to the optical head end, and return the data reported by the target slave optical terminal to the optical head end in response to the request of the optical head end; alternatively, the master optical terminal can also actively send the data reported by the target slave optical terminal to the optical head end, and the embodiments of the present application do not make specific limitations on this.
[0170] In a possible implementation manner, the master optical terminal may request the optical head end to obtain a period for reporting data, and determine a period for sending exchange messages according to the period.
[0171] It should be understood that since the master optical terminal is networked with at least one slave optical terminal, when the optical head end accesses the target slave optical terminal, it is necessary to transmit exchange messages between the master optical terminal and the target slave optical terminal. However, when transmitting the exchange messages, other slave optical terminals will be passed through, which will cause delays. Therefore, the delay of the optical head end accessing the master optical terminal is less than the delay of the optical head end accessing the target slave optical terminal. In other words, the master optical terminal actively sends exchange messages to the target slave optical terminal to obtain the data reported by the target slave optical terminal to the optical head end in advance before the optical head end accesses the target slave optical terminal, thereby avoiding the above-mentioned delay.
[0172] In a possible implementation, the master optical terminal may send an exchange message to a target slave optical terminal according to a topological structure between the master optical terminal and at least one slave optical terminal. The master optical terminal may send an exchange message to a target slave optical terminal according to a transmission path that passes through the least number of slave optical terminals in the topological structure.
[0173] For step S1002 and step S1003:
[0174] In a possible implementation manner, the target slave optical terminal can be addressed to the indication information and data area corresponding to the target slave optical terminal in the exchange message according to the address information of the exchange message.
[0175] Further, the target slave optical terminal can read the data from the optical head end in the data area corresponding to the target slave optical terminal according to the indication information, and / or write the data reported to the optical head end in the data area corresponding to the target slave optical terminal.
[0176] It should be understood that the target slave optical terminal may choose to return the exchange message via the last slave optical terminal that forwarded the exchange message; or, the target slave optical terminal may select other transmission paths according to the topology structure to return the exchange message.
[0177] The transmission path of the exchanged messages is further described below.
[0178] In a possible implementation, the transmission path of the exchange message includes the transmission path of the exchange message between each slave optical terminal in at least one slave optical terminal. That is, the transmission of the exchange message between the master optical terminal and the target slave optical terminal needs to traverse each slave optical terminal in at least one slave optical terminal.
[0179] Further, the exchange message includes indication information corresponding to the target slave optical terminal, including: the exchange message includes indication information corresponding to each slave optical terminal in at least one slave optical terminal. The indication information corresponding to each slave optical terminal is used to indicate: writing the data reported to the optical head end into the data area corresponding to the slave optical terminal.
[0180] It should be understood that for the optical head end, both the master optical terminal and the slave optical terminal are objects that need to be managed, and they are nodes at the same level. That is, the master optical terminal is only responsible for forwarding the data corresponding to the slave optical terminal, and cannot parse the information carried by the data corresponding to the slave optical terminal. Furthermore, the master optical terminal cannot predict which of each slave optical terminal will report data to the optical head end.
[0181] That is to say, the transmission path of the exchange message will traverse the characteristics of each slave optical terminal, and through the indication information corresponding to each slave optical terminal in the exchange message, the master optical terminal can obtain the data reported by each slave optical terminal by sending an exchange message once, thereby reducing the redundancy of communication.
[0182] In a possible implementation manner, the data area of the exchange message includes a data area corresponding to each slave optical terminal in at least one slave optical terminal.
[0183] That is to say, the slave optical terminal performs read and write operations in its own data area, thereby achieving isolation of data areas between different slave optical terminals.
[0184] Further, the exchange message may include at least one sub-message corresponding to each slave optical terminal in the slave optical terminal. The structure of the sub-message can refer to the above description of Fig.11 The relevant instructions will not be repeated here.
[0185] For example, taking the ID and logical address of the slave terminal corresponding to the slave optical terminals #1 to #n in Table 1 as an example, Fig.12 As shown, the exchange message may include n sub-messages, and the address field of each sub-message corresponds to the logical address of the slave optical terminal.
[0186] It can be understood that the indication information corresponding to each of the above-mentioned slave optical terminals may be different. For example, some indication information may be used to indicate that the data reported to the optical head end is written in the corresponding data area, and some indication information may be used to indicate that the data reported to the optical head end is prohibited from being written in the corresponding data area. In other words, the optical head end may only obtain part of the data reported to the optical head end corresponding to the slave optical terminal.
[0187] In a possible implementation, the transmission path of the exchanged message is determined according to the routing information. The routing information is preconfigured. Specifically, the routing information is determined according to the connection sequence of the hardware ports when the master optical terminal is networked with at least one slave optical terminal. In other words, when the master optical terminal is networked with at least one slave optical terminal, the transmission path of the exchanged message is determined.
[0188] That is to say, the transmission path of each exchange message is fixed, and thus the delay is relatively fixed, that is, the jitter is small, which is convenient for delay compensation. Furthermore, since the transmission path between the master optical terminal and the slave optical terminal is fixed, the optical head end accesses the slave optical terminal through the master optical terminal, which does not add additional jitter compared to the optical head end accessing the master optical terminal.
[0189] For example, Fig.13 The master optical terminal and slave optical terminals #1 to #n are networked as an example to illustrate the transmission path of the exchanged message. Fig.13 As shown, when the master optical terminal sends a switching message, it will detect whether a device is connected according to its cascade interface. If the device is connected, the switching message will be output through the cascade interface, that is, the master optical terminal will send a switching message to the slave optical terminal #1. Fig.13 As shown in (a), the exchange message includes data from the optical head end corresponding to the optical terminal #1, and data from the optical head end corresponding to the optical terminal #n. The indication information corresponding to the optical terminal #1 in the exchange message is used to indicate that the data from the optical head end is read in the data area corresponding to the optical terminal #1. The indication information corresponding to the optical terminal #n in the exchange message is used to indicate that the data reported to the optical head end is written in the data area corresponding to the optical terminal #n.
[0190] Furthermore, when the optical terminal #1 receives the exchange message for the first time, it will parse the exchange message. If it does not find its own logical address in the exchange message, it will forward the exchange message. If it finds its own logical address from the optical terminal #1, it will perform the corresponding operation according to the instruction information corresponding to the optical terminal #1 in the exchange message. Fig.13 As shown in (b) in FIG. 1 , the slave optical terminal #1 reads data from the data area corresponding to the slave optical terminal #1.
[0191] Similarly, the exchange message will be transmitted along the transmission path of the master optical terminal, slave optical terminal #1, slave optical terminal #2, slave optical terminal #3, ..., slave optical terminal #n. Fig.13 As shown in (c), after receiving the exchange message from the optical terminal #n, the data from the optical head end is read in the data area corresponding to the optical terminal #n, and the data reported to the optical head end is written. After the optical terminal #n completes the data exchange for the exchange message, if the next device is not detected in the cascade interface, the optical terminal #n will return the exchange message along the original transmission path. It should be understood that when the exchange message is returned, the optical terminal may not parse the exchange message, and directly forward the exchange message along the original transmission path.
[0192] It should also be understood that the above Fig.13 The transmission paths shown are only exemplary. The transmission paths of the exchanged messages can also be different according to different network topologies. For example, if Fig.13If the slave optical terminal #n is directly connected to the master optical terminal, the slave optical terminal #n will send the exchange message to the master optical terminal. The embodiment of the present application does not specifically limit the specific path of the transmission path traversing each slave optical terminal.
[0193] It can be understood that, in addition to the periodic sending of exchange messages in the above step S1001, the master optical terminal can also send exchange messages in bursts. The following describes the master optical terminal sending exchange messages in bursts.
[0194] In a possible implementation, the optical bus communication method provided in the embodiment of the present application may further include, before step S1001:
[0195] S1004: The optical head end sends a downlink message to the main optical terminal. Correspondingly, the main optical terminal receives the downlink message from the optical head end. The downlink message includes data from the optical head end that needs to be read by the target optical terminal.
[0196] In a possible implementation manner, the master optical terminal sends a message to a target slave optical terminal among at least one slave optical terminal (step S1001), including: the master optical terminal sends a switching message to the target slave optical terminal according to the downlink message.
[0197] The indication information corresponding to the target slave optical terminal is used to indicate reading the data from the optical head end from the data area of the exchange message. The data area of the exchange message includes the data from the optical head end that needs to be read by the target slave optical terminal.
[0198] That is, the master optical terminal can generate a switching message in response to the downlink message sent by the optical head end, and then forward the data from the optical head end that needs to be read by the target slave optical terminal to the target slave optical terminal through the switching message.
[0199] It should be understood that the master optical terminal may also send exchange messages in a burst without receiving a downlink message from the optical head end, and the embodiment of the present application does not specifically limit the timing when the master optical terminal sends the exchange message.
[0200] In a possible implementation, the optical bus communication method provided in the embodiment of the present application further includes:
[0201] S1005. The master optical terminal sends an uplink message to the optical head end according to the exchange message returned by the target slave optical terminal. The uplink message includes the data written by the target slave optical terminal to report to the optical head end.
[0202] The exchange message returned by the target from the optical terminal includes the data reported to the optical head end written by the target from the optical terminal.
[0203] That is to say, the master optical terminal can send an exchange message to the target slave optical terminal to obtain the data written by the target slave optical terminal to report to the optical head end, and then send the data to the optical head end, thereby realizing uplink transmission between the target slave optical terminal and the optical head end.
[0204] Since in the embodiment of the present application, the extended slave optical terminal communicates and interacts with the optical head end through the master optical terminal, the slave optical terminal can reuse the uplink and downlink optical paths between the master optical terminal and the optical head end, that is, the optical head end does not need to allocate uplink time slots for the extended slave optical terminal, nor does it need to occupy the optical path power budget of the downlink optical path, so that one optical head end can connect to more slave optical terminals. Furthermore, since the data interaction between the extended slave optical terminal and the master optical terminal is realized by transmitting an exchange message once, that is, the slave optical terminal reads data and / or writes data according to the indication information in the exchange message, and forwards the exchange message, the probability of multiple messages appearing on the transmission link at the same time can be reduced, that is, by reducing the probability of conflicts, the time overhead caused by conflicts can be reduced, that is, the communication delay between the master optical terminal and the slave optical terminal is reduced, and the real-time performance of the communication is improved, thereby improving the communication performance between the extended slave optical terminal and the optical head end. Therefore, the optical bus communication party provided in the embodiment of the present application can improve the scalability of optical terminals in the optical bus network.
[0205] The actions of the main optical terminal in the above steps S1001 to S1005 can be performed by Fig. 9 The processor 901 in the communication device 900 shown in the figure calls the application code stored in the memory 903 to instruct the communication device 900 to execute the target operation of the optical terminal from the above steps S1001 to S1005. Fig. 9 The processor 901 in the communication device 900 shown calls the application code stored in the memory 903 to instruct the communication device 900 to execute, and the embodiment of the present application does not impose any limitation on this.
[0206] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of interaction between various network elements. Accordingly, the embodiment of the present application also provides a communication device, which is used to implement the above various methods. The communication device can be the master optical terminal in the above method embodiment, or a device including the above master optical terminal, or a component that can be used for the master optical terminal; or, the communication device can be the target slave optical terminal in the above method embodiment, or a device including the above target slave optical terminal, or a component that can be used for the target slave optical terminal. It can be understood that in order to implement the above functions, the communication device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0207] The embodiment of the present application can divide the functional modules of the communication device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be understood that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0208] For example, taking the communication device as the main optical terminal in the above method embodiment, Fig.14 The schematic diagram of the structure of a main optical terminal 140 is shown. The main optical terminal 140 includes a transceiver module 1401 and a processing module 1402. The transceiver module 1401, which may also be called a transceiver unit, is used to implement the transceiver function, for example, it may be a transceiver circuit, a transceiver, a transceiver or a communication interface.
[0209] The transceiver module 1401 is used to send an exchange message to at least one target slave optical terminal in the slave optical terminal, and receive an exchange message returned by the target slave optical terminal. The exchange message includes indication information corresponding to the target slave optical terminal, and the indication information is used to indicate: reading data from the optical head end from the data area of the exchange message, and / or writing data reported to the optical head end in the data area of the exchange message.
[0210] In some embodiments, the processing module 1402 is used to determine the period of sending the exchange message according to the period of the optical head end obtaining the reported data; the transceiver module 1401 is also used to send the exchange message to the target slave optical terminal according to the period of the exchange message. The indication information corresponding to the target slave optical terminal in the exchange message is used to indicate: write the data reported to the optical head end in the data area of the exchange message.
[0211] In some embodiments, the transceiver module 1401 is further used to receive a downlink message from the optical head end, the downlink message includes data from the optical head end that needs to be read by the target from the optical terminal; the transceiver module 1401 is further used to send an exchange message to the target from the optical terminal according to the downlink message. The indication information corresponding to the target from the optical terminal in the exchange message is used to indicate to read the data from the optical head end from the data area of the exchange message, and the data area of the exchange message includes the data from the optical head end that needs to be read by the target from the optical terminal.
[0212] In some embodiments, the transceiver module 1401 is further used to send an uplink message to the optical head end according to the exchange message returned by the target from the optical terminal, wherein the uplink message includes the data written by the target from the optical terminal to report to the optical head end.
[0213] In some embodiments, the transmission path of the exchange message includes the transmission path of the exchange message between each slave optical terminal in at least one slave optical terminal; the exchange message includes indication information corresponding to the target slave optical terminal, including: the exchange message includes indication information corresponding to each slave optical terminal in at least one slave optical terminal.
[0214] In some embodiments, the data area of the exchange message includes a data area corresponding to each slave optical terminal in at least one slave optical terminal.
[0215] In some embodiments, the transmission path of the exchanged message is determined based on routing information, and the routing information is preconfigured.
[0216] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0217] In the embodiment of the present application, the main optical terminal 140 is presented in the form of dividing various functional modules in an integrated manner. The "module" here can refer to a specific ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, a person skilled in the art can imagine that the main optical terminal 140 can be used Fig. 9 The form of the communication device 900 is shown.
[0218] for example, Fig. 9The processor 901 in the communication device 900 shown can call the computer execution instructions stored in the memory 903 to enable the communication device 900 to execute the optical bus communication method in the above method embodiment.
[0219] Specifically, Fig.14 The functions / implementation process of the transceiver module 1401 and the processing module 1402 can be Fig. 9 The processor 901 in the communication device 900 shown calls the computer execution instructions stored in the memory 903 to implement. Or, Fig.14 The function / implementation process of the processing module 1402 in Fig. 9 The processor 901 in the communication device 900 shown calls the computer execution instructions stored in the memory 903 to implement, Fig.14 The function / implementation process of the transceiver module 1401 can be Fig. 9 It is implemented by the communication interface 904 in the communication device 900 shown in FIG.
[0220] Since the master optical terminal 140 provided in the embodiment of the present application can execute the above optical bus communication method, the technical effects that can be obtained can refer to the above method embodiment and will not be repeated here.
[0221] Or, for example, taking the communication device as the target slave optical terminal in the above method embodiment as an example, Fig.15 The schematic diagram of the structure of a target slave optical terminal 150 is shown. The target slave optical terminal 150 includes a transceiver module 1501 and a processing module 1502. The transceiver module 1501, which may also be called a transceiver unit, is used to implement the transceiver function, and may be a transceiver circuit, a transceiver, a transceiver or a communication interface.
[0222] Among them, the transceiver module 1501 is used to receive the exchange message from the main optical terminal, and the exchange message includes the indication information corresponding to the target slave optical terminal; the processing module 1502 is used to read the data from the optical head end from the data area of the exchange message according to the indication information, and / or write the data reported to the optical head end in the data area of the exchange message; the transceiver module 1501 is also used to return the exchange message to the main optical terminal.
[0223] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0224] In the embodiment of the present application, the target optical terminal 150 is presented in the form of dividing various functional modules in an integrated manner. The "module" here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, those skilled in the art can imagine that the target optical terminal 150 can be used Fig. 9 The form of the communication device 900 is shown.
[0225] for example, Fig. 9 The processor 901 in the communication device 900 shown can call the computer execution instructions stored in the memory 903 to enable the communication device 900 to execute the optical bus communication method in the above method embodiment.
[0226] Specifically, Fig.15 The functions / implementation process of the transceiver module 1501 and the processing module 1502 can be Fig. 9 The processor 901 in the communication device 900 shown calls the computer execution instructions stored in the memory 903 to implement. Or, Fig.15 The function / implementation process of the processing module 1502 in Fig. 9 The processor 901 in the communication device 900 shown calls the computer execution instructions stored in the memory 903 to implement, Fig.15 The function / implementation process of the transceiver module 1501 can be Fig. 9 It is implemented by the communication interface 904 in the communication device 900 shown in FIG.
[0227] Since the target slave optical terminal 150 provided in this embodiment can execute the above optical bus communication method, the technical effects that can be obtained can refer to the above method embodiments and will not be repeated here.
[0228] It should be understood that one or more of the above modules or units can be implemented by software, hardware or a combination of the two. When any of the above modules or units are implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and the processor can be used to execute the program instructions and implement the above method flow. The processor can be built into an SoC (system on chip) or an ASIC, or it can be an independent semiconductor chip. In addition to the core used to execute software instructions for calculation or processing in the processor, it can also further include necessary hardware accelerators, such as field programmable gate arrays (FPGA), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.
[0229] When the above modules or units are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a digital signal processing (DSP) chip, a microcontroller unit (MCU), an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.
[0230] In a possible implementation, an embodiment of the present application further provides a communication device (for example, the communication device may be a chip or a chip system), which includes a processor for implementing the method in any of the above method embodiments. In a possible design, the communication device also includes a memory. The memory is used to store necessary program instructions and data, and the processor can call the program code stored in the memory to instruct the communication device to execute the method in any of the above method embodiments. Of course, the memory may not be in the communication device. When the communication device is a chip system, it may be composed of chips, or it may include chips and other discrete devices, which is not specifically limited in the embodiments of the present application.
[0231] In one possible implementation, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program or instruction. When the computer-readable storage medium is run on a communication device, the communication device can execute the method described in any of the above method embodiments or any of its implementations.
[0232] In a possible implementation, an embodiment of the present application further provides a communication method, which includes the method described in any of the above method embodiments or any of its implementations.
[0233] In a possible implementation, an embodiment of the present application further provides a communication system, which includes the master optical terminal described in the above method embodiment and the target slave optical terminal described in the above method embodiment.
[0234] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0235] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0236] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An optical bus communication method, characterized in that: The optical bus network includes an optical head end, a master optical terminal connected to the optical head end, and at least one slave optical terminal networked with the master optical terminal, and the method includes: The master optical terminal sends an exchange message to a target slave optical terminal among the at least one slave optical terminal, wherein the exchange message includes indication information corresponding to the target slave optical terminal, and the indication information is used to indicate: reading data from the optical head end from a data area of the exchange message, and / or writing data reported to the optical head end into the data area of the exchange message; The master optical terminal receives the exchange message returned by the target slave optical terminal.
2. The method according to claim 1, characterized in that The transmission path of the exchange message includes the transmission path of the exchange message between each slave optical terminal in the at least one slave optical terminal; the exchange message includes the indication information corresponding to the target slave optical terminal, including: the exchange message includes the indication information corresponding to each slave optical terminal in the at least one slave optical terminal.
3. The method according to claim 1 or 2, characterized in that: The data area of the exchange message includes a data area corresponding to each slave optical terminal in the at least one slave optical terminal.
4. The method according to any one of claims 1 to 3, characterized in that The transmission path of the exchange message is determined according to routing information, and the routing information is preconfigured.
5. The method according to any one of claims 1 to 4, characterized in that The master optical terminal sends an exchange message to a target slave optical terminal in the at least one slave optical terminal, including: The master optical terminal determines the period of sending the exchange message according to the period of the optical head end acquiring the reported data; The master optical terminal sends the exchange message to the target slave optical terminal according to the cycle of the exchange message, and the indication information corresponding to the target slave optical terminal in the exchange message is used to indicate: writing the data reported to the optical head end in the data area of the exchange message.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The master optical terminal receives a downlink message from the optical head end, wherein the downlink message includes data from the optical head end that needs to be read by the target slave optical terminal; Accordingly, the master optical terminal sends a message to a target slave optical terminal in the at least one slave optical terminal, including: The master optical terminal sends the exchange message to the target slave optical terminal according to the downlink message, and the indication information is used to indicate reading the data from the optical head end from the data area of the exchange message, and the data area of the exchange message includes the data from the optical head end that needs to be read by the target slave optical terminal.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The master optical terminal sends an uplink message to the optical head end according to the exchange message returned by the target slave optical terminal, and the uplink message includes data written by the target slave optical terminal to report to the optical head end.
8. A communication device, characterized in that: The communication device is used to execute the optical bus communication method according to any one of claims 1 to 7.
9. A communication device, characterized in that: The communication device includes a processor and a storage medium, wherein the storage medium stores instructions, and when the instructions are executed by the processor, the optical bus communication method according to any one of claims 1 to 7 is implemented.
10. A chip, characterized in that: The chip comprises a processor, and the processor is used to be coupled with a memory. When the processor executes a computer program or instruction in the memory, the optical bus communication method according to any one of claims 1 to 7 is executed.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed by a processor, the optical bus communication method according to any one of claims 1 to 7 is implemented.
