Business processing method and device, equipment, storage medium and computer program product
By decapsulating and writing the received SDH frames and decapitating the slowest channel address, the inefficiency problem caused by virtual channel group delay in Ethernet service processing is solved, real-time and efficient service processing is achieved .
Patent Information
- Application Number
- CN202411051666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-06
AI Technical Summary
In the existing Ethernet service processing solutions, due to the transmission delay of optical fibers and devices, the slowest channel in the virtual channel group (VCG) determines the service processing speed, affecting the entire Ethernet service processing efficiency.
By de-encapsulating the received SDH frame, the virtual channel group (VCG) is obtained, the data bytes are written to the cache area and the unique identifier is determined, the status information of the current slowest channel address is determined based on the unique identifier, and the status information of the slowest channel address is updated, and finally, according to the update The slowest channel address is demapping to avoid polling to determine the slowest channel address.
Improves the processing efficiency of Ethernet services, updates the slowest channel addresses in real time, reduces processing delays, and improves the speed and efficiency of service processing.
Smart Images

Figure CN119094483A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an Ethernet service processing method, apparatus, device, storage medium and computer program product. Background Art
[0002] Ethernet is the most common communication protocol standard used in existing local area networks. In recent years, with the rapid development of information technology, especially the development of Internet and multimedia technology, more and more requirements have been put forward for the transmission scenarios of Ethernet in the Multi-Service Transport Platform (MSTP) network.
[0003] Among them, the MSTP network is a typical representative of circuit switching composed of Synchronous Digital Hierarchy (SDH) and Ethernet over SDH (EoS) technology.
[0004] The way that the MSTP network carries data services is to encapsulate the data services that enter the network through the Ethernet interface of the access layer device through the Generic Framing Protocol (GFP), map them into multiple virtual channel groups (VCG), and then multiplex them into SDH data frames at the synchronous transport module-N (STM-N) rate through VCG, and transmit them in the form of SDH data frames within the MSTP network. After the data service is processed through this process, it becomes an EoS service. When the EoS service reaches the exit of the access layer device at the opposite end of the MSTP network, the SDH data frame is demultiplexed into VCG (where VCG is composed of n virtual channels vc), VCG is demapped into GFP frames, and GFP is decapsulated to restore the data service.
[0005] In the prior art, although the rate of each VC is fixed, due to the transmission delay of the optical fiber and the equipment, there is a certain delay in the VC received by the access layer device at the opposite end. When demapping, it is necessary to align n VCs to form a VGC, and then demap the VCG to correctly obtain the GFP frame. It can be seen that the slowest write address in the VCG will directly determine the service processing speed, so how to determine the slowest VC will directly affect the entire Ethernet service processing efficiency.
[0006] Therefore, how to determine the slowest VC to improve the processing efficiency of Ethernet services has become a problem to be solved urgently in the prior art. Summary of the invention
[0007] The embodiment of the present application provides an Ethernet service processing method to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0008] The embodiment of the present application also provides an Ethernet service processing device to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0009] The embodiment of the present application also provides an Ethernet service processing device to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0010] The embodiment of the present application also provides a computer-readable storage medium to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0011] The embodiment of the present application also provides a computer program product to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0012] The present application embodiment adopts the following technical solutions:
[0013] An Ethernet service processing method comprises: decapsulating a received SDH frame to obtain a virtual channel group VCG; the virtual channel group writes data bytes in the VCG into a buffer area and determines a unique identifier of the VCG; determining state information corresponding to a current slowest channel address according to the unique identifier of the VCG; updating the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address; demapping the VCG according to the updated slowest channel address to obtain Ethernet data.
[0014] An Ethernet service processing device comprises: a decapsulation unit, used for decapsulating a received SDH frame to obtain a virtual channel group VCG; a virtual channel group writing unit, used for writing data bytes in the VCG into a buffer area and determining a unique identifier of the VCG; a state information determination unit, used for determining state information corresponding to a current slowest channel address according to the unique identifier of the VCG; an updating unit, used for updating the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address; and a demapping unit, used for demapping the VCG according to the updated slowest channel address to obtain Ethernet data.
[0015] An Ethernet service processing device comprises: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor performs the following operations: decapsulating a received SDH frame to obtain a virtual channel group VCG; the virtual channel group writes data bytes in the VCG into a buffer area and determines a unique identifier of the VCG; determining state information corresponding to a current slowest channel address according to the unique identifier of the VCG; updating the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address; and demapping the VCG according to the updated slowest channel address to obtain Ethernet data.
[0016] A computer-readable storage medium stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device performs the following operations: decapsulate a received SDH frame to obtain a virtual channel group VCG; the virtual channel group writes data bytes in the VCG into a buffer area and determines a unique identifier of the VCG; determines status information corresponding to a current slowest channel address according to the unique identifier of the VCG; updates the slowest channel address according to the status information and the unique identifier of the VCG to obtain an updated slowest channel address; and demaps the VCG according to the updated slowest channel address to obtain Ethernet data.
[0017] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the following steps are implemented: decapsulating a received SDH frame to obtain a virtual channel group VCG; the virtual channel group writes data bytes in the VCG into a buffer area and determines a unique identifier of the VCG; determining state information corresponding to a current slowest channel address according to the unique identifier of the VCG; updating the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address; and demapping the VCG according to the updated slowest channel address to obtain Ethernet data.
[0018] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0019] By adopting an Ethernet service processing method provided by an embodiment of the present application, the received SDH frame can be decapsulated to obtain a virtual channel group VCG, the data bytes in the VCG can be written into a cache area, and the unique identifier of the VCG can be determined. According to the unique identifier of the VCG, the status information corresponding to the current slowest channel address is determined, and according to the status information and the unique identifier of the VCG, the slowest channel address is updated to obtain an updated slowest channel address, and demapping processing is performed according to the updated slowest channel address. By adopting the Ethernet service processing method provided by an embodiment of the present application, each time the VCG writes a data byte into the cache area, the status information corresponding to the current slowest channel address can be determined according to the unique identifier of the current VCG, and then the slowest channel address can be updated in real time according to the status information and the unique identifier of the VCG. After completing the update of the slowest channel address, demapping can be performed according to the current slowest channel address without the need to determine the slowest channel address by polling, which greatly improves the processing efficiency of Ethernet services. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A schematic diagram of a specific process of Ethernet service processing provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the specific structure of an Ethernet service processing device provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the specific structure of an Ethernet service processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0025] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0026] An Ethernet service processing method provided in an embodiment of the present application is used to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency.
[0027] The execution subject of the Ethernet service processing method provided in the embodiment of the present application can be, but is not limited to, an EOS device.
[0028] The specific implementation flow diagram of the Ethernet service processing method provided in this application is as follows Figure 1 As shown, it mainly includes the following steps:
[0029] Step 11, decapsulate the received SDH frame to obtain a virtual channel group VCG;
[0030] In the embodiment of the present application, by decapsulating the received SDH frame, a virtual channel vc can be obtained, and n vcs are stored in corresponding virtual containers according to the relationship established during mapping to obtain VCG.
[0032] Step 12, write the data bytes in the VCG into the buffer area and determine the unique identifier of the VCG;
[0033] In the embodiment of the present application, each vc in the VCG can write one byte into the buffer buf at a time. Each time writing is performed, 1 will be added to the original write address to obtain the write address of the current VC.
[0034] In the embodiment of the present application, the write address can be expressed as: {cnt4[1:0], waddr}, where waddr represents the number of bytes in a multiframe, and the number of bytes is accumulated from 0 to m-1. When m-1 returns to 0, cnt4 is increased by 1, that is, a maximum of 4 multiframe bytes are retained in buf.
[0035] In addition, in the embodiment of the present application, after the byte is written into buf, the corresponding write address can be divided according to the unique identifier vc_id of the VC and saved in a random access memory (Random Access Memory, RAM).
[0036] Step 13, determining the status information corresponding to the current slowest channel address according to the unique identifier of the VCG;
[0037] It should be noted here that in an embodiment of the present application, when the EOS device starts to process Ethernet services for a new service, the EOS device CPU can determine the service identifier corresponding to the service, that is, the identifier VCG_id of the VCG corresponding to the service, and associate and save the unique identifiers (vc_id) of all VCs corresponding to the service with the VCG_id, and at the same time can configure the status information corresponding to the slowest channel address of the service id.
[0038] In this solution, when the VC writes bytes into buf, the EOS device can determine the corresponding VCG_id according to the vc_id of the VC, and then determine the status information corresponding to the current slowest channel address according to the VCG_id.
[0039] It should be noted here that the status information is pre-set by the EOS device CPU and is used to indicate the address status of the first and second slowest channels corresponding to the current service. In the embodiment of the present application, the status information may specifically include the following three categories:
[0040] The first state is used to indicate that the slowest channel address does not currently exist;
[0041] In the embodiment of the present application, the first state can be represented as: "00". Specifically, when the EOS device CPU creates a new service, the CPU can set the status information of the current slowest channel address of the service to "00". At this time, since the service has just been created, there is no valid slowest channel address in the first level and the second level.
[0042] The second state is used to indicate that the first-level slowest channel address currently exists;
[0043] In the embodiment of the present application, the second state can be represented as: "01". As the service processing proceeds, the first level may have the slowest channel address, while the second level does not have the slowest channel address at this time, and the state information of the current slowest channel address of the service is updated to "01".
[0044] The third state is used to indicate that there are currently the first-level slowest channel address and the second-level slowest channel address;
[0045] In the embodiment of the present application, the third state can be represented as: "11". As the service processing continues, the first level has the slowest channel address, and the second level also has the slowest channel address, and the state information of the current slowest channel address of the service is updated to "11".
[0046] Step 15, updating the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address;
[0047] In the embodiment of the present application, according to the status information determined by executing step 14, the EOS device can update the slowest channel address in different ways, which are explained below respectively.
[0048] 1. When, by executing step 14, it is determined that the state information of the current slowest channel address is the first state "00";
[0049] At this time, the EOS device can update the slowest channel address according to the following method, including: determining the write address corresponding to the data byte in the VCG write cache area; updating the write address to the first-level slowest channel address; updating the status information corresponding to the slowest channel address to the second status.
[0050] Specifically, when it is determined by executing step 14 that the status information of the current slowest channel address is the first state "00", it means that the service has just been created and the slowest channel number address has not been updated. The EOS device can update the write address corresponding to the data byte write cache area in the VCG to the first-level slowest channel address, and update the status information corresponding to the slowest channel address to "01".
[0051] 2. When the state information of the current slowest channel address is determined to be the second state "01" by executing step 14;
[0052] At this point, the EOS device can update the slowest channel address in the following sub-steps, including:
[0053] Sub-step 15a-01, determining whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address;
[0054] Sub-step 15a-02, when the judgment result is yes, determining the write address corresponding to the data byte in the VCG to be written into the cache area, and updating the original first-level slowest channel address according to the write address;
[0055] If the vc_id of the current write buf is the same as the service identifier corresponding to the original first-level slowest channel address, it means that the same VCG is still writing data, and the original first-level slowest channel address can be updated to the current write address of the VCG in buf.
[0056] Sub-step 15a-03, when the judgment result is no, determining the write address corresponding to the data byte in the VCG to be written into the cache area, and judging whether the write address is greater than the original first-level slowest channel address;
[0057] Sub-step 15a-04, when it is determined that the write address is less than the original first-level slowest channel address, the original first-level slowest channel address is updated according to the write address, the second-level slowest channel address is updated according to the original first-level slowest channel address, and the state information corresponding to the slowest channel address is updated to a third state;
[0058] When it is determined that the write address is less than the original first-level slowest channel address, it means that the current write address is the slowest channel address, and the first-level slowest channel address is updated to the current write address, and the first-level slowest channel address is updated to the second-level slowest channel address. At this time, since the second level also has the slowest channel address, the status information can be updated from "01" to "11".
[0059] Sub-step 15a-05, when it is determined that the write address is greater than the original first-level slowest channel address, the second-level slowest channel address is updated according to the write address, and the state information corresponding to the slowest channel address is updated to the third state.
[0060] When it is determined that the write address is greater than the original first-level slowest channel address, it means that the original first-level slowest channel address is still the slowest channel address and is recorded at the first level, and the current write address is used as the second-level slowest channel address, and the status information is updated from "01" to "11".
[0061] 3. When, by executing step 14, it is determined that the state information of the current slowest channel address is the second state "11";
[0062] At this point, the EOS device can update the slowest channel address in the following sub-steps, including:
[0063] Sub-step 15b-01, determining whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address;
[0064] Sub-step 15b-02, when the judgment result is yes, determining the write address corresponding to the data byte in the VCG to be written into the cache area, and updating the original first-level slowest channel address according to the write address;
[0065] If the vc_id of the current write buf is the same as the service identifier corresponding to the original first-level slowest channel address, it means that the same vc in the same VCG is still writing data, and the original first-level slowest channel address can be updated to the current write address of the vc in buf.
[0066] Sub-step 15b-03, when the judgment result is no, determining the write address corresponding to the data byte in the VCG to be written into the cache area, and judging whether the write address is greater than the original first-level slowest channel address;
[0067] Sub-step 15b-04, when it is determined that the write address is less than the original first-level slowest channel address, updating the original first-level slowest channel address according to the write address, and updating the original second-level slowest channel address according to the original first-level slowest channel address;
[0068] When it is determined that the write address is less than the original first-level slowest channel address, it means that the current write address is the slowest channel address, and the first-level slowest channel address is updated to the current write address, and the first-level slowest channel address is updated to the second-level slowest channel address. At this time, the slowest channel address also exists at the second level.
[0069] Sub-step 15b-05, when it is determined that the write address is greater than the original first-level slowest channel address, determining whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address;
[0070] Sub-step 15b-06, when it is determined that the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address, updating the original second-level slowest channel address according to the write address;
[0071] If the vc_id of the current write buf is the same as the service identifier corresponding to the original second-level slowest channel address, it means that the same vc in the same VCG is still writing data, and the original second-level slowest channel address can be updated to the current write address of the vc in buf.
[0072] Sub-step 15b-07, when it is determined that the service identifier corresponding to the VCG is different from the service identifier corresponding to the original second-level slowest channel address, determining whether the write address is greater than the original second-level slowest channel address;
[0073] Sub-step 15b-08, when it is determined that the write address is smaller than the original second-level slowest channel address, updating the original second-level slowest channel address according to the write address;
[0074] When it is determined that the write address is smaller than the original second-level slowest channel address, the second-level slowest channel address is updated to the current write address.
[0075] Sub-step 15b-09, when it is determined that the write address is greater than the original second-level slowest channel address, the original second-level slowest channel address is used as the current second-level slowest channel address.
[0076] When it is determined that the write address is greater than the original second-level slowest channel address, the second-level slowest channel address is kept unchanged.
[0077] It should be noted here that, in the Ethernet service processing process, when the vc channel in the VCG is deleted, in the embodiment of the present application, it can be processed as follows:
[0078] If the address of the slowest channel of the first level is deleted, and the newly input write address is the last byte of the multiframe, the address of the slowest channel of the second level is updated to the first level, and the state of the slowest channel is changed to 01, indicating that the address of the slowest channel of the second level is empty. If the address of the slowest channel of the second level is deleted, and the newly input write address is the last byte of the multiframe, the state of the slowest channel only needs to be changed to 01.
[0079] In addition, it should be noted that the embodiment of the present application can also latch the slowest channel address, and the specific method includes:
[0080] When the service is just created, the status information of the slowest channel address is 00, and no latching operation is required. When the second-level slowest channel address has the same value, it means that a complete polling has been completed. At this time, the latching status is changed to 01, indicating that the slowest channel address of the first level can be latched.
[0081] When a channel is added, and the added channel is the slowest channel, the latch state is changed to 10, indicating that the latch value needs to latch the slowest channel address of the second level. This is because the added channel data has not actually arrived yet and will only arrive in the next multiframe.
[0082] When the status information of the slowest channel address is 10, and the write address of the second-level channel is the last byte of the multiframe, the latch status is changed to 11. This means that the slowest address cannot be latched. It is necessary to stop waiting. Wait until the slowest channel of the first level updates to the last byte of the multiframe.
[0083] When the state information of the slowest channel address is 11, and the write address of the first-level channel is the last byte of the multiframe, the latch state will be changed to 10. This means that the data of the first-level channel will officially arrive.
[0084] Step 16: Demap the VCG according to the address of the slowest updated channel to obtain Ethernet data.
[0085] Specifically, in the embodiment of the present application, the vcg can be decapsulated into a GFP frame according to the updated slowest channel address, and then the GFP frame is decapsulated to obtain Ethernet data.
[0086] By adopting an Ethernet service processing method provided by an embodiment of the present application, a received SDH frame can be demapped to obtain a virtual channel group VCG, data bytes in the VCG can be written into a cache area, and the unique identifier of the VCG can be determined. According to the unique identifier of the VCG, the status information corresponding to the current slowest channel address is determined, and according to the status information and the unique identifier of the VCG, the slowest channel address is updated to obtain an updated slowest channel address, and demapping processing is performed according to the updated slowest channel address. By adopting the Ethernet service processing method provided by an embodiment of the present application, each time the VCG writes a data byte into the cache area, the status information corresponding to the current slowest channel address can be determined according to the unique identifier of the current VCG, and then the slowest channel address can be updated in real time according to the status information and the unique identifier of the VCG. After completing the update of the slowest channel address, demapping can be performed according to the current slowest channel address without the need to determine the slowest channel address by polling, which greatly improves the processing efficiency of Ethernet services.
[0087] In one implementation, the present application also provides an Ethernet service processing device to solve the problem that the existing Ethernet service processing solution has a delay resulting in low Ethernet service processing efficiency. Figure 2 As shown, it includes: a decapsulation unit 21, a writing unit 22, a state information determination unit 23, an updating unit 24 and a demapping unit 25.
[0088] The decapsulation unit 21 is used to decapsulate the received SDH frame to obtain a virtual channel group VCG;
[0089] A writing unit 22, used to write the data bytes in the VCG into a buffer area and determine a unique identifier of the VCG;
[0090] A status information determining unit 23, configured to determine status information corresponding to the current slowest channel address according to the unique identifier of the VCG;
[0091] An updating unit 24, configured to update the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address;
[0092] The demapping unit 25 is used to perform demapping processing according to the address of the slowest updated channel.
[0093] In one embodiment, the status information includes: a first state, used to indicate that the slowest channel address does not currently exist; a second state, used to indicate that a first-level slowest channel address currently exists; and a third state, used to indicate that a first-level slowest channel address and a second-level slowest channel address currently exist.
[0094] In one embodiment, when the status information corresponding to the current slowest channel address is determined to be the first state according to the service identifier, the update unit 24 is specifically used to: determine the write address corresponding to the cache area where the data bytes in the VCG are written; update the write address to the first-level slowest channel address; and update the status information corresponding to the slowest channel address to the second state.
[0095] In one embodiment, when it is determined according to the service identifier that the status information corresponding to the current slowest channel address is in the second state, the updating unit 24 is specifically used to: determine whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address; when the determination result is yes, determine the write address corresponding to the cache area where the data bytes in the VCG are written, and update the original first-level slowest channel address according to the write address; when the determination result is no, determine the write address corresponding to the cache area where the data bytes in the VCG are written, and determine whether the write address is greater than the original first-level slowest channel address; when it is determined that the write address is less than the original first-level slowest channel address, update the original first-level slowest channel address according to the write address, update the second-level slowest channel address according to the original first-level slowest channel address, and update the status information corresponding to the slowest channel address to a third state; when it is determined that the write address is greater than the original first-level slowest channel address, update the second-level slowest channel address according to the write address, and update the status information corresponding to the slowest channel address to the third state.
[0096] In one embodiment, when it is determined according to the service identifier that the status information corresponding to the current slowest channel address is in the third state, the updating unit 24 is specifically used to: determine whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address; when the judgment result is yes, determine the write address corresponding to the cache area where the data bytes in the VCG are written, and update the original first-level slowest channel address according to the write address; when the judgment result is no, determine the write address corresponding to the cache area where the data bytes in the VCG are written, and determine whether the write address is greater than the original first-level slowest channel address; when it is determined that the write address is less than the original first-level slowest channel address, update the original first-level slowest channel address according to the write address, and update the original second-level slowest channel address according to the original first-level slowest channel address ; When it is determined that the write address is greater than the original first-level slowest channel address, determine whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address; when it is determined that the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address, update the original second-level slowest channel address according to the write address; when it is determined that the service identifier corresponding to the VCG is different from the service identifier corresponding to the original second-level slowest channel address, determine whether the write address is greater than the original second-level slowest channel address; when it is determined that the write address is less than the original second-level slowest channel address, update the original second-level slowest channel address according to the write address; when it is determined that the write address is greater than the original second-level slowest channel address, the original second-level slowest channel address is used as the current second-level slowest channel address.
[0097] By adopting an Ethernet service processing device provided by an embodiment of the present application, the received SDH frame can be decapsulated to obtain a virtual channel group VCG, the data bytes in the VCG can be written into a cache area, and the unique identifier of the VCG can be determined. According to the unique identifier of the VCG, the status information corresponding to the current slowest channel address is determined, and according to the status information and the unique identifier of the VCG, the slowest channel address is updated to obtain an updated slowest channel address, and demapping processing is performed according to the updated slowest channel address. By adopting the Ethernet service processing method provided by an embodiment of the present application, each time the VCG writes a data byte into the cache area, the status information corresponding to the current slowest channel address can be determined according to the unique identifier of the current VCG, and then the slowest channel address can be updated in real time according to the status information and the unique identifier of the VCG. After completing the update of the slowest channel address, demapping can be performed according to the current slowest channel address without the need to determine the slowest channel address by polling, which greatly improves the processing efficiency of Ethernet services.
[0098] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 3 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0099] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0100] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0101] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming an Ethernet service processing device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: decapsulate the received SDH frame to obtain a virtual channel group VCG; write the data bytes in the VCG into the cache area and determine the unique identifier of the VCG; determine the status information corresponding to the current slowest channel address according to the unique identifier of the VCG; update the slowest channel address according to the status information and the unique identifier of the VCG to obtain an updated slowest channel address; perform demapping processing according to the updated slowest channel address.
[0102] The above application Figure 3The method performed by the Ethernet service processing electronic device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0103] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0104] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations:
[0105] Decapsulate the received SDH frame to obtain a virtual channel group VCG; write the data bytes in the VCG into a cache area and determine the unique identifier of the VCG; determine the status information corresponding to the current slowest channel address according to the unique identifier of the VCG; update the slowest channel address according to the status information and the unique identifier of the VCG to obtain an updated slowest channel address; perform demapping processing according to the updated slowest channel address.
[0106] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0110] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0111] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0112] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0113] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0114] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0115] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for processing Ethernet services, characterized in that: include: Decapsulate the received SDH frame to obtain a virtual channel group VCG; Writing the data bytes in the VCG into a buffer area and determining a unique identifier of the VCG; Determine the status information corresponding to the current slowest channel address according to the unique identifier of the VCG; According to the state information and the unique identifier of the VCG, the slowest channel address is updated to obtain an updated slowest channel address; The VCG is demapped according to the address of the slowest updated channel to obtain Ethernet data.
2. The method according to claim 1, characterized in that The status information includes: The first state is used to indicate that the slowest channel address does not currently exist; The second state is used to indicate that the first-level slowest channel address currently exists; The third state is used to indicate that there are currently a first-level slowest channel address and a second-level slowest channel address.
3. The method according to claim 2, characterized in that When it is determined according to the service identifier that the state information corresponding to the current slowest channel address is in the first state, updating the slowest channel address according to the state information and the unique identifier of the VCG specifically includes: Determine the write address corresponding to the data byte written into the buffer area in the VCG; Updating the write address to the first-level slowest channel address; The state information corresponding to the slowest channel address is updated to a second state.
4. The method according to claim 2, characterized in that: When it is determined according to the service identifier that the state information corresponding to the current slowest channel address is in the second state, updating the slowest channel address according to the state information and the unique identifier of the VCG specifically includes: Determine whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address; When the judgment result is yes, determine the write address corresponding to the data byte in the VCG to be written into the cache area, and update the original first-level slowest channel address according to the write address; When the judgment result is no, determine the write address corresponding to the data byte in the VCG being written into the cache area, and judge whether the write address is greater than the original first-level slowest channel address; When it is determined that the write address is less than the original first-level slowest channel address, the original first-level slowest channel address is updated according to the write address, the second-level slowest channel address is updated according to the original first-level slowest channel address, and the state information corresponding to the slowest channel address is updated to a third state; When it is determined that the write address is greater than the original first-level slowest channel address, the second-level slowest channel address is updated according to the write address, and the state information corresponding to the slowest channel address is updated to a third state.
5. The method according to claim 2, characterized in that: When it is determined according to the service identifier that the state information corresponding to the current slowest channel address is in the third state, updating the slowest channel address according to the state information and the unique identifier of the VCG specifically includes: Determine whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original first-level slowest channel address; When the judgment result is yes, determine the write address corresponding to the data byte in the VCG being written into the cache area, and update the original first-level slowest channel address according to the write address; When the judgment result is no, determine the write address corresponding to the data byte in the VCG being written into the cache area, and judge whether the write address is greater than the original first-level slowest channel address; When it is determined that the write address is less than the original first-level slowest channel address, the original first-level slowest channel address is updated according to the write address, and the original second-level slowest channel address is updated according to the original first-level slowest channel address; When it is determined that the write address is greater than the original first-level slowest channel address, determining whether the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address; When it is determined that the service identifier corresponding to the VCG is the same as the service identifier corresponding to the original second-level slowest channel address, updating the original second-level slowest channel address according to the write address; When it is determined that the service identifier corresponding to the VCG is different from the service identifier corresponding to the original second-level slowest channel address, determining whether the write address is greater than the original second-level slowest channel address; When it is determined that the write address is less than the original second-level slowest channel address, updating the original second-level slowest channel address according to the write address; When it is determined that the write address is greater than the original second-level slowest channel address, the original second-level slowest channel address is used as the current second-level slowest channel address.
6. An Ethernet service processing device, characterized in that: include: The decapsulation unit is used to decapsulate the received SDH frame to obtain a virtual channel group VCG; A virtual channel group writing unit, used to write the data bytes in the VCG into a buffer area and determine a unique identifier of the VCG; A status information determining unit, configured to determine status information corresponding to a current slowest channel address according to a unique identifier of the VCG; An updating unit, configured to update the slowest channel address according to the state information and the unique identifier of the VCG to obtain an updated slowest channel address; A demapping unit is used to demap the VCG according to the address of the slowest updated channel to obtain Ethernet data.
7. The device according to claim 6, characterized in that When it is determined according to the service identifier that the state information corresponding to the current slowest channel address is in the first state, the updating unit is specifically configured to: Determine the write address corresponding to the data byte written into the buffer area in the VCG; Updating the write address to the first-level slowest channel address; The state information corresponding to the slowest channel address is updated to a second state.
8. An Ethernet service processing device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Decapsulate the received SDH frame to obtain a virtual channel group VCG; Writing the data bytes in the VCG into a buffer area and determining a unique identifier of the VCG; Determine the status information corresponding to the current slowest channel address according to the unique identifier of the VCG; According to the state information and the unique identifier of the VCG, the slowest channel address is updated to obtain an updated slowest channel address; The VCG is demapped according to the address of the slowest updated channel to obtain Ethernet data.
9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enables the electronic device to execute the Ethernet service processing method as claimed in any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the Ethernet service processing method as claimed in any one of claims 1 to 6.
