A method for pure software simulation of power communication

Through pure software simulation method, power communication simulation is performed using software simulation terminals and ONU simulation network elements, which solves the problem of poor training effect of existing simulated optical communication networks and realizes efficient and low-cost simulation training.

CN114710414BActive Publication Date: 2025-02-18STATE GRID HEBEI ELECTRIC POWER COMPANY TRAINING CENT +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210466539.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-02-18
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

The existing simulated optical communication network has poor training results, high hardware maintenance costs, and large equipment area, making it difficult to train a large number of operation and maintenance personnel at the same time.

Method used

The pure software simulation method is adopted, and the simulation terminal, ONU simulation network element and the second simulation terminal established through software simulation are used to analyze and forward simulated frame data using the interface module and the forwarding processing module to realize pure software simulation of the power communication simulation system.

Benefits of technology

Simulation can be achieved without combining hardware, which reduces simulation costs, simplifies the working process of optical network units, and improves simulation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114710414B_ABST
    Figure CN114710414B_ABST
Patent Text Reader

Abstract

The present invention provides a method for pure software simulation of electric power communication, the method comprising: a first interface module, configured to send first simulation frame data sent by a first simulation terminal to a forwarding processing module; a second interface module, configured to send second simulation frame data sent by a second simulation terminal to the forwarding processing module; the first simulation frame data and the second simulation frame data have the same frame structure and different frame types; the frame type is used to instruct the interface module to perform corresponding analysis and processing; the forwarding processing module is configured to forward the first simulation frame data and the second simulation frame data according to the destination address in the simulation frame data after analyzing the simulation frame data. The present invention can reduce simulation costs, simplify the working process of an optical network unit, and improve simulation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of simulation training, and in particular to a method for pure software simulation of power communication. Background Art

[0002] In order to improve the knowledge and skills of power communication operation and maintenance personnel, it is usually necessary to carry out relevant training for the operation and maintenance personnel. At present, the relevant training of Optical Network Unit (ONU) is mainly implemented by combining software and hardware. In addition to simulation software, special hardware such as optical network unit, user line interface circuit, encoder and decoder, digital signal processor (DSP) are also needed to form a simulated communication network.

[0003] The hardware maintenance cost in this type of simulation communication network is high, the equipment occupies a large area, and the network scale is small, making it difficult to train a large number of operation and maintenance personnel at the same time, resulting in poor training results. Summary of the invention

[0004] The invention provides a method for pure software simulation of electric power communication, so as to solve the problem of poor training effect of existing simulated optical communication network.

[0005] In a first aspect, the present invention provides a method for pure software simulation of electric power communication, which is applied to an electric power communication simulation system; the electric power communication simulation system comprises: a first simulation terminal established by software simulation, an ONU simulation network element, and a second simulation terminal; wherein the ONU simulation network element comprises: a first interface module, a forwarding processing module, and a second interface module;

[0006] The method for pure software simulation of power communication includes: a first interface module, configured to send first simulation frame data sent by a first simulation terminal to a forwarding processing module; a second interface module, configured to send second simulation frame data sent by a second simulation terminal to the forwarding processing module; the first simulation frame data and the second simulation frame data have the same frame structure but different frame types; the frame type is used to instruct the interface module to perform corresponding analysis and processing; the forwarding processing module is configured to analyze the simulation frame data, and then forward the first simulation frame data to the second interface module according to the destination address in the simulation frame data, and forward the second simulation frame data to the first interface module.

[0007] In a possible implementation, the first simulated terminal is a simulated user terminal, and the second simulated terminal is a simulated optical line terminal;

[0008] The first interface module is an Ethernet interface module, and the second interface module is an EPON interface module;

[0009] The Ethernet interface module is configured to connect to the simulated user terminal through the Ethernet port, and the EPON interface module is configured to connect to the simulated optical line terminal through the PON port;

[0010] The forwarding processing module is configured to analyze the destination address in the processed first simulation frame data in combination with the MAC address forwarding table to determine the address of the PON port, and to analyze the destination address in the processed second simulation frame data in combination with the MAC address forwarding table to determine the address of the Ethernet port; wherein the MAC address forwarding table includes the correspondence between the MAC address and the port type.

[0011] In a possible implementation, the frame structure includes a frame type; the frame type includes: Ethernet frame, Ethernet frame with VLAN tag, EPON frame, EPON frame with VLAN tag.

[0012] In a possible implementation, the frame structure further includes a VLAN identifier;

[0013] The Ethernet interface module includes an Ethernet receiving unit;

[0014] The Ethernet receiving unit is configured as:

[0015] Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the first simulation frame data;

[0016] If the VLAN mode of the Ethernet port is TAGGED or TRUNK, and the frame type of the first simulation frame data is an Ethernet frame, the frame type of the first simulation frame data is modified to an Ethernet frame with a VLAN tag, and the VLAN representation of the first simulation frame data is modified to the VLAN identifier of the Ethernet port, and the modified first simulation frame data is forwarded to the forwarding processing module;

[0017] If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the first simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the Ethernet port, the first simulation frame data is forwarded to the forwarding processing module;

[0018] If the VLAN mode of the Ethernet port is TRANSPARENT, the first simulation frame data is forwarded to the forwarding processing module.

[0019] In a possible implementation, the frame structure further includes a VLAN tag; the Ethernet interface module includes an Ethernet sending unit;

[0020] The Ethernet transmit unit is configured as:

[0021] Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the second simulation frame data;

[0022] If the VLAN mode of the Ethernet port is TAGGED, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, then the frame type of the second simulation frame data is modified to an Ethernet frame, and the modified second simulation frame data is sent to the simulation user terminal through the Ethernet port;

[0023] If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, the second simulation frame data is sent to the simulation user terminal through the Ethernet port;

[0024] If the VLAN mode of the Ethernet port is TRANSPARENT, the second simulation frame data is sent to the simulation user terminal through the Ethernet port.

[0025] In a possible implementation, the frame structure further includes a VLAN tag; the EPON interface module includes an EPON receiving unit;

[0026] The EPON receiving unit is configured as:

[0027] Determine whether the VLAN mode of the PON port corresponds to the frame type of the second simulation frame data;

[0028] If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame, the frame type of the second simulation frame data is modified to an EPON frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is modified to the VLAN identifier of the PON port, and the LLID flag of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is forwarded to the forwarding processing module;

[0029] If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the MAC address forwarding table of the PON port, then the LLID flag bit of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module;

[0030] If the VLAN mode of the PON port is TRANSPARENT, the LLID flag bit of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module.

[0031] In a possible implementation, the frame structure further includes a VLAN tag; the EPON interface module includes an EPON sending unit;

[0032] The EPON sending unit is configured as:

[0033] Determine whether the VLAN mode of the PON port corresponds to the frame type of the first simulation frame data;

[0034] If the VLAN mode of the PON port is TRUNK, and the frame type of the first simulation frame data is an EPON frame with VLAN tags, and the VLAN identifier is equal to the VLAN identifier of the PON port, then the frame type of the first simulation frame data is modified to an EPON frame, and the modified first simulation frame data is sent to the second simulation terminal through the PON port;

[0035] If the VLAN mode of the PON receiving port is TRANSPARENT, the first simulation frame data is sent to the second simulation terminal through the PON port.

[0036] In a possible implementation, the Ethernet interface module is further configured as follows:

[0037] Obtain the parameter table of the ONU simulation network element, and determine the open state of the Ethernet port and the open state of the ONU simulation network element;

[0038] If the Ethernet port or ONU emulation network element is turned off, the analysis and processing of the emulation frame data is stopped;

[0039] and / or,

[0040] The EPON interface module is also configured as:

[0041] Obtain the parameter table of the ONU simulation network element, and determine the open state of the PON port and the open state of the ONU simulation network element;

[0042] If the on state of the PON port or the ONU simulation network element is off, the analysis and processing of the simulation frame data is stopped.

[0043] In a possible implementation, the frame structure further includes a source address;

[0044] The forwarding processing module is also configured to:

[0045] It is determined whether the source address in the simulation frame data exists in the MAC address forwarding table. If not, the source address in the simulation frame data is added to the MAC address forwarding table.

[0046] In a possible implementation, the forwarding processing module is further configured to:

[0047] Filter and delete the addresses in the MAC address forwarding table that have not sent or received simulation frame data within the set time.

[0048] In a second aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation manner of the first aspect are implemented.

[0049] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the first aspect or any possible implementation method of the first aspect.

[0050] The present invention provides a method for pure software simulation of electric power communication, which is applied to an electric power communication simulation system; the electric power communication simulation system includes: a first simulation terminal established by software simulation, an ONU simulation network element, and a second simulation terminal; wherein the ONU simulation network element includes: a first interface module, a forwarding processing module, and a second interface module; the method for pure software simulation of electric power communication includes: a first interface module, configured to send first simulation frame data sent by the first simulation terminal to the forwarding processing module; a second interface module, configured to send second simulation frame data sent by the second simulation terminal to the forwarding processing module; the first simulation frame data and the second simulation frame data have the same frame structure and different frame types; the frame type is used to instruct the interface module to perform corresponding analysis and processing; the forwarding processing module is configured to forward the first simulation frame data to the second interface module according to the destination address in the simulation frame data after analyzing the simulation frame data, and forward the second simulation frame data to the first interface module. The present invention uses a pure software method to construct an electric power communication simulation system, and can realize simulation without combining hardware, thereby reducing the simulation cost; and using simulation frame data with the same structure but different types to replace actual frame data can simplify the working process of an optical network unit during simulation and improve simulation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0052] Figure 1 This is an application scenario diagram of the method for pure software simulation of power communication provided by an embodiment of the present invention;

[0053] Figure 2is a flow chart of an implementation method for pure software simulation of power communication provided by an embodiment of the present invention;

[0054] Figure 3 is another application scenario diagram of the method for pure software simulation of power communication provided by an embodiment of the present invention;

[0055] Figure 4 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0058] Figure 1 This is an application scenario diagram of the method for pure software simulation of power communication provided by an embodiment of the present invention. Figure 1 As shown, the method is applied to an electric power communication simulation system, the electric power communication simulation system includes: a first simulation terminal established by software simulation, an ONU simulation network element, and a second simulation terminal; wherein the ONU simulation network element includes: a first interface module, a forwarding processing module, and a second interface module. The first simulation terminal and the second simulation terminal are respectively used to simulate terminals of different types, and bidirectional communication can be performed between the first simulation terminal and the second simulation terminal.

[0059] See also Figure 2 , which shows an implementation flow chart of a method for pure software simulation of power communication provided by an embodiment of the present invention, which is described in detail as follows:

[0060] Step 201, a first interface module is configured to send first simulation frame data sent by a first simulation terminal to a forwarding processing module;

[0061] Step 202, the second interface module is configured to send the second simulation frame data sent by the second simulation terminal to the forwarding processing module; the first simulation frame data and the second simulation frame data have the same frame structure, but different frame types; the frame type is used to instruct the interface module to perform corresponding analysis and processing;

[0062] Step 203, the forwarding processing module is configured to analyze the simulation frame data, forward the first simulation frame data to the second interface module according to the destination address in the simulation frame data, and forward the second simulation frame data to the first interface module.

[0063] In this embodiment, the communication data processed by the ONU in the power communication network are mainly of two types: one is Ethernet data interacting with the end user, and the other is EPON data interacting with the optical line terminal (OLT, Optical Line Terminal). The Ethernet data usually adopts the Ethernet frame structure of ETHERNET II type, including 8 bytes of preamble and frame start field, 6 bytes of destination address (DA) field, 6 bytes of source address (SA) field, 2 bytes of type (Type) field, 46 to 1500 bytes of load (Payload) field, 4 bytes of redundancy check (FCS) field.

[0064] EPON data uses an EPON frame structure that is similar to but not completely consistent with the Ethernet frame structure, including an 8-byte preamble field (including a 2-byte logical link identifier LLID) field, a 6-byte destination address (DA) field, a 6-byte source address (SA) field, a 2-byte length / type (L_T) field, a 46-1500-byte data (Data) field, and a 4-byte checksum (FCS) field.

[0065] In addition, in order to achieve Ethernet isolation and reduce unnecessary broadcast data, ONU supports the Virtual Local Area Network (VLAN) function and modifies the traditional Ethernet frame format. A 4-byte 802.1Q tag / VLAN tag field is inserted between the source address (SA) field and the type (Type) field in the standard Ethernet frame structure, including a 16-bit tag protocol identifier (TPID), a 3-bit priority (Priority), a 1-bit canonical format indicator (CFI) and a 12-bit VLAN identifier (VID). It can be seen that there are at least four types of frames in the real communication system composed of ONUs, and their lengths are different.

[0066] In view of the above situation, the present invention designs an EPON / ETH (Ethernet) joint simulation frame structure, innovatively uses the same frame structure to realize the description and transmission of Ethernet frame data, EPON frame data and VLAN information, and solves the problems of complex mutual conversion process between different types of data frames and low transmission and processing efficiency.

[0067] This embodiment can use the EPON / ETH joint simulation frame structure to perform simulation communication. The specific structure is shown in Table 1:

[0068] Table 1

[0069]

[0070] As can be seen from Table 1, in the EPON / ETH joint simulation frame structure, the frame header length excluding the data part is 19 bytes. Compared with ordinary Ethernet frames and EPON frames without VLAN tags, the frame header part is 3 bytes less. Compared with Ethernet frames and EPON frames with VLAN tags, the frame header part is 7 bytes less. In addition, in the EPON / ETH joint simulation frame structure, the 4-byte checksum (FCS) field is omitted, reducing the amount of data processed and forwarded during the simulation process. At the same time, the EPON / ETH joint simulation frame structure uses a unified frame structure to replace 4 frame formats (Ethernet frames, Ethernet frames with VLAN tags, EPON frames, and EPON frames with VLAN tags), thereby reducing the processing complexity of the simulation system and improving the processing efficiency.

[0071] In some embodiments, the first simulated terminal is a simulated user terminal, and the second simulated terminal is a simulated optical line terminal (Optical Line Terminal, OLT);

[0072] The first interface module is an Ethernet interface module, and the second interface module is an EPON interface module;

[0073] The Ethernet interface module is configured to connect to the simulated user terminal through the Ethernet port, and the EPON interface module is configured to connect to the simulated optical line terminal through the PON port;

[0074] The forwarding processing module is configured to analyze the destination address in the processed first simulation frame data in combination with the MAC address forwarding table to determine the address of the PON port, and to analyze the destination address in the processed second simulation frame data in combination with the MAC address forwarding table to determine the address of the Ethernet port; wherein the MAC address forwarding table includes the correspondence between the MAC address and the port type.

[0075] In this embodiment, the ONU simulation network element may have multiple ports, each port has multiple parameters, and the parameters of each port are stored in a port parameter table. The port parameters are used to indicate the status of the Ethernet port and the PON port. The specific parameter types may be as shown in Table 2:

[0076] Table 2

[0077]

[0078]

[0079] As can be seen from Table 2, modifying the enable parameter of a port can achieve switching the enable state of the port.

[0080] In addition, the parameters of the ONU simulation network element in this embodiment may also include device static parameters and device dynamic parameters. The device static parameters are parameters of the ONU simulation network element that remain unchanged during the simulation process (can be modified by configuration commands or simulation network management software), and their data types and definitions are shown in Table 3:

[0081] Table 3

[0082]

[0083] The network element dynamic parameters are parameters that are updated according to different operating states during the operation of the ONU simulation network element. The data types and definitions are shown in Table 4:

[0084] Table 4

[0085]

[0086]

[0087] In some embodiments, the frame structure includes a frame type; the frame type includes: Ethernet frame, Ethernet frame with VLAN tag, EPON frame, EPON frame with VLAN tag.

[0088] In this embodiment, the frame structure includes a frame type field, and the values ​​of the field include 1, 2, 3, and 4, which respectively represent Ethernet frames, Ethernet frames with VLAN tags, EPON frames, and EPON frames with VLAN tags.

[0089] In some embodiments, the frame structure further includes a VLAN identifier;

[0090] The Ethernet interface module includes an Ethernet receiving unit;

[0091] The Ethernet receiving unit is configured as:

[0092] Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the first simulation frame data;

[0093] If the VLAN mode of the Ethernet port is TAGGED or TRUNK, and the frame type of the first simulation frame data is an Ethernet frame, the frame type of the first simulation frame data is modified to an Ethernet frame with a VLAN tag, and the VLAN representation of the first simulation frame data is modified to the VLAN identifier of the Ethernet port, and the modified first simulation frame data is forwarded to the forwarding processing module;

[0094] If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the first simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the Ethernet port, the first simulation frame data is forwarded to the forwarding processing module;

[0095] If the VLAN mode of the Ethernet port is TRANSPARENT, the first simulation frame data is forwarded to the forwarding processing module.

[0096] In this embodiment, the specific working process of the Ethernet receiving unit can be configured as follows:

[0097] 1) Monitor the data frames (EPON / ETH joint simulation frame format) from each simulated user terminal software. After receiving the first simulation frame data (set as frame1), record the information of the port receiving the data, including the port type (set as port_type1), port number (set as port_no1), etc.;

[0098] 2) Query the port parameter table through port_type1 and port_no1 to obtain the relevant parameters of the port (including enable, state, vlan_mode, vlan_id, trunk_allowed_vlan_list, etc.);

[0099] 3) Determine the enable and state parameters of the port. If any parameter is false, indicating that the port is abnormal, the processing ends; otherwise, the processing continues;

[0100] 4) Determine the value of FRAME_TYPE in frame1. If it is not 1 or 2 (i.e., the frame type is not an Ethernet frame or an Ethernet frame with a VLAN tag), then the processing ends; otherwise, the processing continues;

[0101] 5) Analyze the port's vlan_mode parameter. If the value is 1 (the VLAN mode is TAGGED), go to 5.1) to continue processing. If the value is 2 (the VLAN mode is TRUNK), go to 5.2) to continue processing. If the value is 3 (the VLAN mode is TRANSPARENT), go to 5.3) to continue processing.

[0102] 5.1) Determine the value of FRAME_TYPE in frame1. If it is 1 (i.e., the frame type is Ethernet frame), set it to 2 (i.e., the frame type is Ethernet frame with VLAN tag), and set the VID in frame1 to the vlan_id of the port, and go to 6) to continue processing; if it is 2 (i.e., the frame type is Ethernet frame with VLAN tag), end the processing;

[0103] 5.2) Determine the value of FRAME_TYPE in frame1. If it is 1 (i.e., the frame type is Ethernet frame), set it to 2 (i.e., the frame type is Ethernet frame with VLAN tag), and set the VID in frame1 to the vlan_id of the port, and go to 6) to continue processing; if it is 2 (i.e., the frame type is Ethernet frame with VLAN tag) and the VID in frame1 is in the trunk_allowed_vlan_list of the port, directly go to 6) to continue processing; if it is 2 and the VID in frame1 is not in the trunk_allowed_vlan_list of the port, end the processing;

[0104] 5.3) Do not do anything and go to 6) to continue processing.

[0105] 6) Send the modified data frame frame1 and receiving port information (port_type1, port_no1) to the forwarding processing module.

[0106] In some embodiments, the frame structure further includes a VLAN tag; the Ethernet interface module includes an Ethernet sending unit;

[0107] The Ethernet transmit unit is configured as:

[0108] Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the second simulation frame data;

[0109] If the VLAN mode of the Ethernet port is TAGGED, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, then the frame type of the second simulation frame data is modified to an Ethernet frame, and the modified second simulation frame data is sent to the simulation user terminal through the Ethernet port;

[0110] If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, the second simulation frame data is sent to the simulation user terminal through the Ethernet port;

[0111] If the VLAN mode of the Ethernet port is TRANSPARENT, the second simulation frame data is sent to the simulation user terminal through the Ethernet port.

[0112] In this embodiment, the specific working process of the Ethernet sending unit can be configured as follows:

[0113] 1) Monitor the second simulation frame data (set to frame2) from the forwarding processing module and the information of the designated sending port, including the port type (set to port_type2), the port number (port_no2), etc.;

[0114] 2) Query the port parameter table through port_type2 and port_no2 to obtain the relevant parameters of the port (including enable, state, vlan_mode, vlan_id, trunk_allowed_vlan_list, etc.);

[0115] 3) Determine the enable and state parameters of the port. If any parameter is false, indicating that the port is abnormal, the processing ends; otherwise, the processing continues;

[0116] 4) Analyze the port's vlan_mode parameter. If the value is 1 (the VLAN mode is TAGGED), go to 4.1) to continue processing; if the value is 2 (the VLAN mode is TRUNK), go to 4.2) to continue processing; if the value is 3 (the VLAN mode is TRANSPARENT), go to 4.3) to continue processing;

[0117] 4.1) Determine the value of FRAME_TYPE in frame2. If it is 1 (i.e., the frame type is an Ethernet frame), the processing ends; if it is 2 (i.e., the frame type is an Ethernet frame with a VLAN tag) and the VID in frame2 is equal to the vlan_id of the port, set FRAME_TYPE to 1 (i.e., the frame type is set to an Ethernet frame), and go to 5) to continue processing; if it is 2 and the VID in frame2 is not equal to the vlan_id of the port, the processing ends;

[0118] 4.2) Determine the value of FRAME_TYPE in frame1. If it is 1 (i.e., the frame type is an Ethernet frame), the processing ends; if it is 2 (i.e., the frame type is an Ethernet frame with a VLAN tag) and the VID in frame2 is in the trunk_allowed_trunk_list of the port, go to 4.4) to continue processing; if it is 2 and the VID in frame2 is not in the trunk_allowed_trunk_list of the port, the processing ends;

[0119] 4.3) Do not do anything and go to 5) to continue processing.

[0120] 4.4) Further determine whether the VID in frame2 is equal to the vlan_id of the port. If they are equal, set FRAME_TYPE to 1 (i.e., the frame type is set to Ethernet frame), and go to 5) to continue processing; otherwise, directly go to 5) to continue processing;

[0121] 5) Find the simulated user terminal connected to the port and send frame2 to the simulated terminal.

[0122] In some embodiments, the frame structure further includes a VLAN tag; the EPON interface module includes an EPON receiving unit;

[0123] The EPON receiving unit is configured as:

[0124] Determine whether the VLAN mode of the PON port corresponds to the frame type of the second simulation frame data;

[0125] If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame, the frame type of the second simulation frame data is modified to an EPON frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is modified to the VLAN identifier of the PON port, and the LLID flag of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is forwarded to the forwarding processing module;

[0126] If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the MAC address forwarding table of the PON port, then the LLID flag bit of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module;

[0127] If the VLAN mode of the PON port is TRANSPARENT, the LLID flag bit of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module.

[0128] In this embodiment, the specific workflow of the EPON receiving unit can be configured as follows:

[0129] 1) Monitor the second simulation frame data (EPON / ETH joint simulation frame format) from the simulated optical line terminal. After receiving the second simulation frame data (set as frame4), record the information of the port receiving the data, including the port type (set as port_type4), the port number (set as port_no4), etc.;

[0130] 2) Analyze the value of the dynamic parameter of the online_state network element. If it is false, end the processing; otherwise, continue the processing;

[0131] 3) Query the port parameter table through port_type4 and port_no4 to obtain the relevant parameters of the port (including enable, state, vlan_mode, vlan_id, trunk_allowed_vlan_list, etc.);

[0132] 4) Determine the enable and state parameters of the port. If any parameter is false, indicating that the port is abnormal, the processing ends; otherwise, the processing continues;

[0133] 5) Determine the value of FRAME_TYPE in frame1. If it is not 3 or 4 (i.e., the frame type is not an EPON frame or an EPON frame with a VLAN tag), then the processing ends; otherwise, the processing continues;

[0134] 6) Analyze the port's vlan_mode parameter. If the value is 2 (i.e., the VLAN mode is TRUNK), go to 6.1) to continue processing; if the value is 3 (i.e., the VLAN mode is TRANSPARENT), go to 6.2) to continue processing;

[0135] 6.1) Determine the value of FRAME_TYPE in frame4. If it is 3 (i.e., the frame type is EPON frame), set it to 4 (i.e., the frame type is set to EPON frame with VLAN tag), and set the VID in frame4 to the vlan_id of the port, and go to 7) to continue processing; if it is 4 and the VID in frame4 is in the trunk_allowed_vlan_list of the port, directly go to 7) to continue processing; if it is 4 and the VID in frame4 is not in the trunk_allowed_vlan_list of the port, end the processing;

[0136] 6.2) Do not do anything and go to 7) to continue processing.

[0137] 7) Set the LLID in frame4 to the llid network element dynamic parameter value, and send the modified data frame frame4 and the receiving port information (port_type4, port_no4) to the forwarding processing module.

[0138] In some embodiments, the frame structure further includes a VLAN tag; the EPON interface module includes an EPON sending unit;

[0139] The EPON sending unit is configured as:

[0140] Determine whether the VLAN mode of the PON port corresponds to the frame type of the first simulation frame data;

[0141] If the VLAN mode of the PON port is TRUNK, and the frame type of the first simulation frame data is an EPON frame with VLAN tag, and the VLAN identifier is equal to the VLAN identifier of the PON port, then the frame type of the first simulation frame data is modified to an EPON frame, and the modified first simulation frame data is sent to the first simulation terminal through the PON port;

[0142] If the VLAN mode of the PON receiving port is TRANSPARENT, the first simulation frame data is sent to the first simulation terminal through the PON port.

[0143] In this embodiment, the specific workflow of the EPON sending unit can be configured as follows:

[0144] 1) Monitor the first simulation frame data (set to frame5) and the information of the designated sending port from the forwarding processing module, including the port type (set to port_type5), the port number (port_no5), etc.;

[0145] 2) Analyze the value of the dynamic parameter of the online_state network element. If it is false, end the processing; otherwise, continue the processing;

[0146] 3) Query the port parameter table through port_type5 and port_no5 to obtain the relevant parameters of the port (including enable, state, vlan_mode, vlan_id, trunk_allowed_vlan_list, etc.);

[0147] 4) Determine the enable and state parameters of the port. If any parameter is false, indicating that the port is abnormal, the processing ends; otherwise, the processing continues;

[0148] 5) Analyze the port's vlan_mode parameter. If the value is 2 (i.e., the VLAN mode is TRUNK), go to 5.1) to continue processing; if the value is 2 (i.e., the VLAN mode is TRANSPARENT), go to 5.2) to continue processing;

[0149] 5.1) Determine the value of FRAME_TYPE in frame5. If it is 3 (i.e., the frame type is an EPON frame), the processing ends; if it is 4 (i.e., the frame type is an EPON frame with a VLAN tag) and the VID in frame5 is in the trunk_allowed_trunk_list of the port, go to 5.3) to continue processing; if it is 4 and the VID in frame5 is not in the trunk_allowed_trunk_list of the port, the processing ends;

[0150] 5.2) Do not do anything and go to 6) to continue processing.

[0151] 5.3) Further determine whether the VID in frame5 is equal to the vlan_id of the port. If they are equal, set FRAME_TYPE to 3 (i.e., the frame type is set to EPON frame), and go to 6) to continue processing; otherwise, directly go to 6) to continue processing;

[0152] 6) Find the simulated OLT connected to the port and send frame 5 to the simulated OLT.

[0153] In some embodiments, it is characterized in that the Ethernet interface module is further configured to:

[0154] Obtain the parameter table of the ONU simulation network element, and determine the open state of the Ethernet port and the open state of the ONU simulation network element;

[0155] If the Ethernet port or ONU emulation network element is turned off, the analysis and processing of the emulation frame data is stopped;

[0156] and / or,

[0157] The EPON interface module is also configured as:

[0158] Obtain the parameter table of the ONU simulation network element, and determine the open state of the PON port and the open state of the ONU simulation network element;

[0159] If the on state of the PON port or the ONU emulation network element is off, the analysis and processing of the emulation frame data is stopped.

[0160] In this embodiment, in a real communication system, when a port or ONU is closed, data cannot be transmitted. In this embodiment, the open state of the port and ONU simulation network element is determined by parameter values ​​to make the data transmission logic of the power communication simulation system consistent with the data transmission logic of the real communication system.

[0161] In some embodiments, the frame structure further includes a source address;

[0162] The forwarding processing module is also configured to:

[0163] It is determined whether the source address in the simulation frame data exists in the MAC address forwarding table. If not, the source address in the simulation frame data is added to the MAC address forwarding table.

[0164] In this embodiment, the forwarding processing module software completes the forwarding of the simulation data frame based on the MAC address forwarding table. The MAC address forwarding table contains several entries and has two generation methods: dynamic generation and manual setting. The manually set entry is generated by configuration commands or network management software. The dynamically generated entry is automatically generated and regularly updated by the forwarding processing module software based on the receiving port parameters and the source address field in the received data frame, and if an entry is not updated for a long time, it will be cleared. The parameters contained in each entry in the MAC address forwarding table are shown in Table 5:

[0165] Table 5

[0166]

[0167] The forwarding process of the forwarding processing module software can be specifically configured as follows:

[0168] 1) The forwarding processing module software monitors the data frame (EPON / ETH joint simulation frame format) from the Ethernet receiving unit software or the EPON receiving unit software. When the data frame is received (set to frame3), the receiving port information is recorded at the same time, including the port type (set to port_type3), port number (set to port_no3), etc.

[0169] 2) Determine whether the MAC address corresponding to the SA in frame3 exists in the MAC address forwarding table. If not, add a new entry to the MAC address forwarding table and set the mac_address in the entry to SA, the port_type to port_type3, the port_no to port_no3, and the dynamic_type to true;

[0170] 3) Determine whether the MAC address corresponding to the DA in frame3 exists in the MAC address forwarding table. If so, read the port information in the table entry, including the port type (set to port_type_s), port number (set to port_no_s), etc., and go to 4) to continue processing; if not, scan the port parameter table to find all other ports that are not receiving ports (i.e., ports with a port type of port_type3 and a port number of port_no3), and read the port information of each found port, including the port type (set to port_type_s) and port number (set to port_no_s), and execute the processing in 4);

[0171] 4) Analyze port_type_s. If the value is 1 (i.e., the port type is a PON port), go to 4.1) to continue processing; if the value is 2 (i.e., the port type is an Ethernet port), go to 4.2) to continue processing;

[0172] 4.1) Determine port_type3. If the value is 1 (i.e., the port type is a PON port), the processing ends; otherwise, add 2 to FRAME_TYPE in frame3, and send the data frame (frame3) and the sending port parameters (port_type_s, port_no_s) to the EPON sending unit.

[0173] 4.2) Determine port_type3. If the value is 1 (i.e., the port type is a PON port), reduce FRAME_TYPE in frame3 by 2, and send the data frame (frame3) and the sending port parameters (port_type_s, port_no_s) to the Ethernet sending unit; otherwise, send the data frame (frame3) and the sending port parameters (port_type_s, port_no_s) to the Ethernet sending unit.

[0174] In one possible implementation, Figure 3 As shown, the Ethernet interface module includes an Ethernet sending unit and an Ethernet receiving unit, and the EPON interface module includes an EPON sending unit and an EPON receiving unit. In this power communication simulation system, the first simulation frame data is sent from the simulated user terminal to the Ethernet receiving unit, and then sent by the Ethernet receiving unit to the forwarding processing module, then forwarded by the forwarding processing module to the EPON sending unit, and finally sent by the EPON sending unit to the simulated OLT; the second simulation frame data is sent from the simulated OLT to the EPON receiving unit, and then sent by the EPON receiving unit to the forwarding processing module, then forwarded by the forwarding processing module to the Ethernet sending unit, and finally sent by the Ethernet sending unit to the simulated user terminal. Based on this structure, the power communication simulation system can realize two-way communication between the simulated user terminal and the simulated OLT.

[0175] In addition, multiple simulated user terminals can be connected to the simulated ONU network element. The first simulated user terminal sends the first simulated frame data to the Ethernet receiving unit, and the Ethernet receiving unit forwards the first simulated frame data to the forwarding processing module. The forwarding processing module analyzes the destination address of the first simulated frame data, determines that the destination address is the second simulated user terminal, and then sends the first simulated frame data to the Ethernet receiving unit. Finally, the Ethernet receiving unit sends the first simulated frame data to the second simulated user terminal, thereby realizing the communication between the simulated user terminals on the unified simulated ONU network element.

[0176] In some embodiments, the forwarding processing module is further configured to:

[0177] Filter and delete the addresses in the MAC address forwarding table that have not sent or received simulation frame data within the set time.

[0178] In some embodiments, multiple ONU simulation network elements may be created and the ONU simulation network element communication logic functions may be performed through the following steps:

[0179] 1) Create a corresponding script file for each ONU simulation network element, which defines the values ​​of the static parameters of the simulation device, including device static parameters and port parameters.

[0180] 2) Load all simulation software modules for each ONU simulation network element, including Ethernet interface module software (including sending unit and receiving unit software), forwarding processing module software and EPON interface module software (including sending unit and receiving unit software), and read the static parameters and port parameters in the script file corresponding to this simulation device to initialize the ONU simulation software operation logic.

[0181] 3) The ONU simulation software receives Ethernet simulation data from the simulated user side and EPON simulation data from the simulated OLT, performs relevant analysis and processing, updates the network element dynamic parameters and MAC address forwarding table, and realizes the simulation of ONU device functions.

[0182] The above steps only require setting the parameters of the ONU simulation network element to create an ONU simulation network element, which occupies a small amount of computer storage space and can realize simulation of multiple ONU simulation network elements on one computer.

[0183] From the above, it can be seen that the embodiment of the present invention uses a pure software method to construct an electric power communication simulation system, which can realize simulation without combining hardware, thereby reducing the simulation cost; and uses simulation frame data with the same structure but different types to replace the actual frame data, which can simplify the working process of the optical network unit during simulation and improve the simulation efficiency.

[0184] The present invention designs an ONU simulation software model, and proposes a classification and definition method for ONU device simulation parameters, realizes an abstract description of the functions of different types of ONU devices, and solves the problem of lack of comprehensive description of the functional characteristics and management characteristics of simulated ONU. The present invention proposes an implementation method of the communication logic software of each component unit in the ONU simulation software model, which makes up for the problem of the current lack of a specific implementation scheme for realizing the simulation of the communication function of ONU devices using software.

[0185] Through the comprehensive application of the above methods, multiple ONU simulation network elements can be constructed through computer software, and the simulation of communication interaction processing functions between the simulated ONU software and the simulated user terminal software and the simulated OLT software can be realized. After application, a fully digital ONU equipment simulation environment can be conveniently built on the user's computer, which can efficiently and quickly support the training of power communication professional and technical personnel in carrying out ONU equipment networking methods, operating principles, etc., and greatly save training equipment investment, which has great social and economic benefits.

[0186] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0187] Figure 4 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 4 As shown, the terminal 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned method embodiments for pure software simulation of power communication are implemented.

[0188] Exemplarily, the computer program 42 may be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 42 in the terminal 4.

[0189] The terminal 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0190] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0191] The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal 4. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0192] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0193] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0194] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software 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 be beyond the scope of the present invention.

[0195] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0198] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments for pure software simulation of power communication can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0199] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for pure software simulation of power communication, characterized in that: Applied to power communication simulation system; The electric power communication simulation system comprises: a first simulation terminal, an ONU simulation network element and a second simulation terminal established by software simulation; wherein the ONU simulation network element comprises: a first interface module, a forwarding processing module and a second interface module; a method for pure software simulation of electric power communication comprises: a first interface module, configured to send first simulation frame data sent by the first simulation terminal to the forwarding processing module; a second interface module, configured to send second simulation frame data sent by the second simulation terminal to the forwarding processing module; the first simulation frame data and the second simulation frame data have the same frame structure but different frame types; the frame type is used to instruct the interface module to perform corresponding analysis and processing; wherein the fields included in the frame header of the simulation frame are frame type, logical link identifier, virtual local area network identifier, destination address, source address and length / type in sequence, and the values ​​of the frame type field include 1, 2, 3, and 4, representing Ethernet frame, Ethernet frame with VLAN tag, EPON frame, and EPON frame with VLAN tag, respectively; the forwarding processing module is configured to forward the first simulation frame data to the second interface module according to the destination address in the simulation frame data after analyzing the simulation frame data, and forward the second simulation frame data to the first interface module; The first simulated terminal is a simulated user terminal, and the second simulated terminal is a simulated optical line terminal; The first interface module is an Ethernet interface module, and the second interface module is an EPON interface module; The Ethernet interface module is configured to connect to the simulated user terminal via an Ethernet port, and the EPON interface module is configured to connect to the simulated optical line terminal via a PON port; The forwarding processing module is configured to analyze the destination address in the processed first simulation frame data in combination with the MAC address forwarding table to determine the address of the PON port, and analyze the destination address in the processed second simulation frame data in combination with the MAC address forwarding table to determine the address of the Ethernet port; wherein the MAC address forwarding table includes a correspondence between a MAC address and a port type; The ONU simulation network element has multiple ports. The parameters of each port are stored in the port parameter table. The port parameters include enable parameter and state parameter. When the enable parameter takes the value true, it means that the port is in the enabled state. When the value false, it means that the port is in the disabled state. When the state parameter takes the value true, it means that the port is normal. When the value false, it means that the port is abnormal. The enable state of the port is modified by modifying the value of the enable parameter of the port, the abnormal state of the port is modified by modifying the value of the state parameter of the port, and the frame type of the simulation frame is modified by modifying the value of the frame type field in the simulation frame.

2. The method for pure software simulation of power communication according to claim 1, characterized in that: The frame structure includes frame types; the frame types include: Ethernet frame, Ethernet frame with VLAN tag, EPON frame, EPON frame with VLAN tag.

3. The method for pure software simulation of power communication according to claim 2, characterized in that: The frame structure also includes a VLAN identifier; The Ethernet interface module includes an Ethernet receiving unit; The Ethernet receiving unit is configured as follows: Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the first simulation frame data; If the VLAN mode of the Ethernet port is TAGGED or TRUNK, and the frame type of the first simulation frame data is an Ethernet frame, the frame type of the first simulation frame data is modified to an Ethernet frame with a VLAN tag, and the VLAN representation of the first simulation frame data is modified to the VLAN identifier of the Ethernet port, and the modified first simulation frame data is forwarded to the forwarding processing module; If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the first simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the Ethernet port, the first simulation frame data is forwarded to the forwarding processing module; If the VLAN mode of the Ethernet port is TRANSPARENT, the first simulation frame data is forwarded to the forwarding processing module.

4. The method for pure software simulation of power communication according to claim 2, characterized in that: The frame structure also includes a VLAN tag; the Ethernet interface module includes an Ethernet sending unit; The Ethernet sending unit is configured as follows: Determine whether the VLAN mode of the Ethernet port corresponds to the frame type of the second simulation frame data; If the VLAN mode of the Ethernet port is TAGGED, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, then the frame type of the second simulation frame data is modified to an Ethernet frame, and the modified second simulation frame data is sent to the simulation user terminal through the Ethernet port; If the VLAN mode of the Ethernet port is TRUNK, and the frame type of the second simulation frame data is an Ethernet frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is equal to the VLAN identifier of the Ethernet port, then the second simulation frame data is sent to the simulation user terminal through the Ethernet port; If the VLAN mode of the Ethernet port is TRANSPARENT, the second simulation frame data is sent to the simulation user terminal through the Ethernet port.

5. The method for pure software simulation of power communication according to claim 2, characterized in that: The frame structure also includes a VLAN tag; the EPON interface module includes an EPON receiving unit; The EPON receiving unit is configured as follows: Determining whether the VLAN mode of the PON port corresponds to the frame type of the second simulation frame data; If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame, the frame type of the second simulation frame data is modified to an EPON frame with a VLAN tag, and the VLAN identifier of the second simulation frame data is modified to the VLAN identifier of the PON port, and the LLID flag of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is forwarded to the forwarding processing module; If the VLAN mode of the PON port is TRUNK, and the frame type of the second simulation frame data is an EPON frame with a VLAN tag, and the VLAN identifier is in the allowed transmission list of the MAC address forwarding table of the PON port, then the LLID flag bit of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module; If the VLAN mode of the PON port is TRANSPARENT, the LLID flag of the second simulation frame data is modified to the LLID dynamic parameter value of the ONU simulation network element, and the modified second simulation frame data is sent to the forwarding processing module.

6. The method for pure software simulation of power communication according to claim 2, characterized in that: The frame structure also includes a VLAN tag; the EPON interface module includes an EPON sending unit; The EPON sending unit is configured as: Determining whether the VLAN mode of the PON port corresponds to the frame type of the first simulation frame data; If the VLAN mode of the PON port is TRUNK, and the frame type of the first simulation frame data is an EPON frame with VLAN tag, and the VLAN identifier is equal to the VLAN identifier of the PON port, then the frame type of the first simulation frame data is modified to an EPON frame, and the modified first simulation frame data is sent to the second simulation terminal through the PON port; If the VLAN mode of the PON port is TRANSPARENT, the first simulation frame data is sent to the second simulation terminal through the PON port.

7. The method for pure software simulation of power communication according to any one of claims 3 to 6, characterized in that: The Ethernet interface module is further configured as: Obtain a parameter table of the ONU simulation network element, and determine the enable status of the Ethernet port and the enable status of the ONU simulation network element; If the opening state of the Ethernet port or the ONU simulation network element is closed, then stop analyzing and processing the simulation frame data; and / or, The EPON interface module is also configured as: Obtain a parameter table of the ONU simulation network element, and determine the opening state of the PON port and the opening state of the ONU simulation network element; If the on state of the PON port or the ONU emulation network element is off, the analysis and processing of the emulation frame data is stopped.

8. The method for pure software simulation of power communication according to claim 1, characterized in that: The frame structure also includes a source address; The forwarding processing module is further configured to: It is determined whether the source address in the simulation frame data exists in the MAC address forwarding table. If not, the source address in the simulation frame data is added to the MAC address forwarding table.

9. The method for pure software simulation of power communication according to claim 8, characterized in that: The forwarding processing module is also used for: The addresses in the MAC address forwarding table that have not sent or received simulation frame data within a set time are screened and deleted.

Citation Information

Patent Citations

  • VLAN (virtual local area network) centralized control method and system of EPON (Ethernet passive optical network)

    CN104486242A