CN105162634B - The processing method of OAM protocol packages is received and dispatched in same thread - Google Patents

The processing method of OAM protocol packages is received and dispatched in same thread Download PDF

Info

Publication number
CN105162634B
CN105162634B CN201510612577.2A CN201510612577A CN105162634B CN 105162634 B CN105162634 B CN 105162634B CN 201510612577 A CN201510612577 A CN 201510612577A CN 105162634 B CN105162634 B CN 105162634B
Authority
CN
China
Prior art keywords
oam protocol
protocol packages
thread
message
oam
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510612577.2A
Other languages
Chinese (zh)
Other versions
CN105162634A (en
Inventor
马丰玺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Guangda Hengji Communication Technology Co., Ltd
Original Assignee
Chengdu Guangda New Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Guangda New Network Technology Co Ltd filed Critical Chengdu Guangda New Network Technology Co Ltd
Priority to CN201510612577.2A priority Critical patent/CN105162634B/en
Publication of CN105162634A publication Critical patent/CN105162634A/en
Application granted granted Critical
Publication of CN105162634B publication Critical patent/CN105162634B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Abstract

The present invention relates to configuration management fields of the local side apparatus OLT to terminal device ONU, especially a kind of processing method that OAM protocol packages are received and dispatched in same thread.It receives and dispatches the processing method of OAM protocol packages in same thread, it handles all OAM protocol packages in same thread, OAM protocol packages are sent including structure and parse the OAM protocol packages received, and preferential structure for sending OAM protocol packages of the processing for parsing received OAM protocol packages etc..The present invention wakes up OAM protocol packages processing thread by creating OAM protocol packages processing thread and sending message queue and reception message queue, by sending signaling interface;OAM protocol packages handle the request message that thread is either received according to transmission message queue in message queue and carry out OAM protocol packages establishment transmission or receive parsing.

Description

The processing method of OAM protocol packages is received and dispatched in same thread
Technical field
The present invention relates to configuration management fields of the local side apparatus OLT to terminal device ONU, and especially one kind is in same thread The processing method of middle transmitting-receiving OAM protocol packages.
Background technology
Local side apparatus OLT configuration management terminal devices ONU is realized by interaction OAM protocol packages.Send OAM protocol packages The path and direction walked with reception OAM protocol packages are all different.So existing processing method is exactly in different threads Processing sends the structure of OAM protocol packages and receives the parsing of OAM protocol massages respectively.
Processing is carried out in different threads and there is the competition or conflict accessed resource.To solve the problems, such as that this is just needed Increase uses synchronization and mutual exclusive resource.Also the consumption of cpu resource will be increased.The complexity of processing is added at the same time, reduces wind The degree of controllability of danger.
There is stronger causalnexus between OAM protocol packages and received OAM protocol packages that local side apparatus OLT is sent, Receiving the buffering of OAM protocol packages always has what size limited.Carry out to destroy during asynchronism and concurrency processing in different threads this Causalnexus, may cause because exceeding buffer size, should received OAM agreements packet loss.Increase retransmits probability and more Resource consumption, efficiency reduce.Hidden danger increases, risk increase.
Fig. 1 is the schematic diagram handled respectively OAM protocol packages in two different threads.The structure of OAM protocol packages The structure for being responsible for handling OLT device to OAM protocol packages when ONU equipment progress acquisition of information or configuration management to transmission thread is related Bag processing work.OAM agreement Packet analyzing threads are responsible for handling the OAM protocol packages from ONU equipment received in OLT device Context resolution it is relevant bag processing work.It can be seen in the figure from signal.The two threads are all independent operatings, are all individually joined With obtaining CPU operation chances.Their operation relation is asynchronism and concurrency operation.Do not ensure that they run order and completely Impartial operation chance.The OAM protocol packages of the two thread process are all on management configuration ONU.So probably deposit The shown competition to shared resource is, it is necessary to increase synchronization and mutex mechanism to solve the problems, such as competition in Fig. 1.This adds increased The consumption of system resource.When dealing with improperly, it is also possible to introduce potential unknown problem.Increase potential risks.
The content of the invention
The technical problems to be solved by the invention are:In view of the problems of the existing technology, there is provided one kind is in same thread The processing method of middle transmitting-receiving OAM protocol packages, it handles all OAM protocol packages in same OAM protocol packages handle thread, including The OAM protocol packages that structure sends OAM protocol packages and parsing receives, and the processing for parsing received OAM protocol packages is preferentially sent Structure of OAM protocol packages etc..
The technical solution adopted by the present invention is as follows:
The processing method of OAM protocol packages is received and dispatched in same thread to be included:
Step 1:Thread can be waken up by creating block type signal, and thread is handled as OAM protocol packages;Create and send message queue With reception message queue, it is respectively used to receive transmission request message and receives request message;
Step 2:Request message is first put into corresponding message queue by message request thread, then at OAM protocol packages Lineation journey sends signal, wakes up OAM protocol packages processing thread.OAM protocol packages handle thread according to request message, carry out OAM associations View bag, which creates, sends or receives parsing, and wherein request message refers to sending the message in message queue, for building OAM associations View wraps and is sent to ONU equipment or receives the message in message queue, they issue the OAM agreements of OLT device for ONU equipment Bag, request OLT device carry out dissection process.
OAM protocol packages processing thread carries out OAM protocol packages according to request message and creates transmission or reception in the step 3 Parsing specifically includes:
Step 21:When OAM protocol packages processing thread process sends the request message of message queue, first judge to receive message Whether the OAM protocol package that from ONU equipment receives come is had in queue;If so, then perform step 22;Otherwise, OAM protocol packages are handled Thread creation simultaneously sends OAM protocol packages to corresponding ONU equipment;When OAM protocol packages processing thread process receives message queue During request message, then step 22 is performed;The request message for wherein sending message queue is the message produced by transmission information interface; The request message for receiving message queue is when sending OAM data bag to OLT device by ONU equipment, OLT device bottom layer driving and to connect The message that mouth produces;
Step 22:All OAM protocol packages that the processing thread parsing of OAM protocol packages receives.
The transmission information interface for producing transmission request message is client.
In conclusion by adopting the above-described technical solution, the beneficial effects of the invention are as follows:
The problem of transmitting-receiving OAM protocol packages are handled in same thread, eliminate the competition and access conflict to resource.Save The use of synchronization and mutex resource has been gone, has also reduced the loss of cpu resource, the efficiency of system resource can be improved.According to OAM agreements The sequence arrangement and guarantee that the causalnexus of pack receiving and transmitting handles send and receive packets, can greatly reduce the OAM associations because that should receive Re-transmission probability caused by discussing packet loss.So as to improve the utilization rate and efficiency of system resource.Hidden danger is reduced, increase risk is controllable Property.
Fig. 2 is the schematic diagram handled in same thread OAM protocol packages.Because receive and dispatch the processing of OAM bags all It is in same thread, is not in asking for competition to resource just there is no the situation of two thread asynchronism and concurrencies processing Topic, does not just have to the synchronization and mutex resource using system yet, eliminates because of the cpu resource using these resource consumptions yet.So as to The resource utilization and efficiency of system can be improved to a certain extent.It is ensured that processing is different types of in a thread The order of OAM bags processing:Processing of the received OAM protocol packages prior to transmission OAM protocol packages.The arrangement of this processing sequence is According to causalnexus existing for transmitting-receiving OAM agreement parlors, an OAM protocol package is sent, a corresponding sound will be received Answer OAM protocol packages.Suppress to send OAM protocol package excessive velocities, reduce the OAM protocol packages number that receives beyond buffering maximum and The problem of loss.Improve the utilization rate and efficiency of reliability and system resource.
Brief description of the drawings
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is the schematic diagram handled respectively OAM protocol packages in two different threads.
Fig. 2 is OAM protocol packages processing schematic diagram when an OLT device corresponds to an ONU equipment in a thread.
Embodiment
All features disclosed in this specification, or disclosed all methods or during the step of, except mutually exclusive Feature and/or step beyond, can combine in any way.
This specification(Including any accessory claim, summary and attached drawing)Disclosed in any feature, except non-specifically chatting State, can be replaced by other alternative features that are equivalent or have similar purpose.I.e., unless specifically stated, each feature It is an example in a series of equivalent or similar characteristics.
Bottom layer driving and interface refer to bsp driver and hardware interface etc..OAM protocol packages processing thread is sent to The ONU equipment received in the OAM protocol packages and reception message queue of ONU equipment is sent to the OAM protocol packages of OLT device, all It is that the bottom layer driving interface for needing OLT device participates in.
When one OLT device corresponds to multiple ONU equipments, OAM protocol package processing procedures are identical.
Operation principle:
1st, thread can be waken up by creating block type signal, and thread is handled as OAM protocol packages.Using reception in the thread The processing of OAM protocol packages always carries out Message processing prior to sending the processing strategy of OAM protocol massages.
2nd, create and send signaling interface, for sending signal to OAM protocol packages processing thread, wake up the thread.
3rd, create and send message queue and receive message queue, be respectively used to receive transmission request message and receive request to disappear Breath.Processing OAM protocol packages thread obtains message from the two message queues, then carries out corresponding processing.
4th, request message is first put into corresponding message queue by message request thread, then calls transmission signaling interface to call out OAM protocol packages of waking up processing thread.
Specific embodiment:
Step 1:Thread can be waken up by creating block type signal, and thread is handled as OAM protocol packages;Transmission signal is created to connect Mouthful, for sending signal to OAM protocol packages processing thread, wake up the thread;Create and send message queue and reception message queue, It is respectively used to receive and sends request message and reception request message;
Step 2:Request message is first put into corresponding message queue by message request thread, then calls transmission signal to connect Mouth wakes up OAM protocol packages processing thread;
Step 3:When OAM protocol packages processing thread receives the request message for sending message queue, first judge receiving Whether the OAM protocol package that from ONU equipment receives come is had in message queue;If so, then the parsing of OAM protocol packages processing thread receives All OAM protocol packages arrived;Otherwise, OAM protocol packages handle thread creation and send OAM protocol packages to corresponding ONU equipment;When OAM protocol packages processing thread process receives the request message of message queue, then the institute that the parsing of OAM protocol packages processing thread receives There are OAM protocol packages.
Wherein OAM protocol packages processing thread detects the OAM data for receiving and having multiple ONU equipments to send in message queue Bag, then all handled all OAM data bags received, then according to request to create message, creates corresponding OAM associations View bag, and the protocol package is issued into corresponding ONU equipment.
The invention is not limited in foregoing embodiment.The present invention, which expands to, any in the present specification to be disclosed New feature or any new combination, and disclose any new method or process the step of or any new combination.

Claims (3)

  1. A kind of 1. processing method that OAM protocol packages are received and dispatched in same thread, it is characterised in that including:
    Step 1:Thread can be waken up by creating block type signal, and thread is handled as OAM protocol packages;Create and send message queue and connect Message queue is received, is respectively used to receive transmission request message and receives request message;
    Step 2:Request message is first put into corresponding message queue by message request thread, then handles line to OAM protocol packages Journey sends signal, wakes up OAM protocol packages processing thread;
    OAM protocol packages handle thread according to request message, carry out OAM protocol packages and create transmission or receive parsing, wherein asking Message refer to send message queue in message, it be used for build OAM protocol packages and be sent to optical network unit ONU equipment or Person receives the message in message queue, it issues the OAM protocol packages of optical line terminal OLT equipment for ONU equipment;
    OLT device is asked to carry out dissection process.
  2. 2. the processing method according to claim 1 that OAM protocol packages are received and dispatched in same thread, it is characterised in that the step OAM protocol packages processing thread carries out OAM protocol packages establishment transmission or receives parsing to specifically include according to request message in rapid 2:
    Step 21:When OAM protocol packages processing thread process sends the request message of message queue, first judge to receive message queue In whether have received from ONU equipment come OAM protocol packages;If so, then perform step 22;Otherwise, OAM protocol packages processing thread Create and send OAM protocol packages to corresponding ONU equipment;When OAM protocol packages processing thread process receives the request of message queue Message, then perform step 22;The request message for wherein sending message queue is the message produced by transmission information interface;Reception disappears The request message of breath queue is when sending OAM data bag to OLT device by ONU equipment, and OLT device bottom layer driving and interface produce Message;
    Step 22:All OAM protocol packages that the processing thread parsing of OAM protocol packages receives.
  3. 3. the processing method according to claim 1 that OAM protocol packages are received and dispatched in same thread, it is characterised in that the production It is client that the transmission information interface of request message is sent in hair tonic.
CN201510612577.2A 2015-09-24 2015-09-24 The processing method of OAM protocol packages is received and dispatched in same thread Expired - Fee Related CN105162634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510612577.2A CN105162634B (en) 2015-09-24 2015-09-24 The processing method of OAM protocol packages is received and dispatched in same thread

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510612577.2A CN105162634B (en) 2015-09-24 2015-09-24 The processing method of OAM protocol packages is received and dispatched in same thread

Publications (2)

Publication Number Publication Date
CN105162634A CN105162634A (en) 2015-12-16
CN105162634B true CN105162634B (en) 2018-05-15

Family

ID=54803396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510612577.2A Expired - Fee Related CN105162634B (en) 2015-09-24 2015-09-24 The processing method of OAM protocol packages is received and dispatched in same thread

Country Status (1)

Country Link
CN (1) CN105162634B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790632B (en) * 2017-01-03 2020-07-14 北京奇虎科技有限公司 Streaming data concurrent transmission method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098197A (en) * 2010-12-15 2011-06-15 杭州万隆光电设备有限公司 Signal access device for connecting optical network with coaxial network
CN201986096U (en) * 2010-12-21 2011-09-21 四川九州电子科技股份有限公司 Terminal equipment ONU for EPON system
CN103517164A (en) * 2013-10-25 2014-01-15 和记奥普泰通信技术有限公司 Data configuring and controlling method for optical network unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098197A (en) * 2010-12-15 2011-06-15 杭州万隆光电设备有限公司 Signal access device for connecting optical network with coaxial network
CN201986096U (en) * 2010-12-21 2011-09-21 四川九州电子科技股份有限公司 Terminal equipment ONU for EPON system
CN103517164A (en) * 2013-10-25 2014-01-15 和记奥普泰通信技术有限公司 Data configuring and controlling method for optical network unit

Also Published As

Publication number Publication date
CN105162634A (en) 2015-12-16

Similar Documents

Publication Publication Date Title
CN108270732B (en) A kind of Streaming Media processing method and system
CN107104936B (en) Establish the method and system of full-duplex bi-directional communication
CN105528254B (en) A kind of method for processing business and device
CN103152260B (en) Message forwarding system, method and device
CN107070613B (en) Reliable data transmission method in distributed network environment
CN104735077B (en) It is a kind of to realize the efficiently concurrent methods of UDP using Circular buffer and circle queue
TW200929972A (en) Multi-protocols/single-medium network data transmitting method and the apparatus of the same
CN102332968A (en) Communication equipment, communication means and computer program
CN101009649A (en) Queue management in a network processor
WO2012151920A1 (en) Method and device for service transmission
CN102970157A (en) Link failure processing method, intelligent resilient framework (IRF) member device and data communication device
CN108566390B (en) Satellite message monitoring and distributing service system
CN103944880B (en) A kind of method of ZigBee data transfers
CN107515793A (en) A kind of module communication means for supporting message mechanism
CN105162634B (en) The processing method of OAM protocol packages is received and dispatched in same thread
CN102761608B (en) The method of UDP session multiplexing and load balancing equipment
CN108076535B (en) Method, device, terminal and storage medium for controlling radio resource control connection
CN104753813B (en) The method that DMA transmits message
CN108462650B (en) Output unit based on TTE switch
CN108462653B (en) TTE-based rapid protocol control frame sending method
CN104636206B (en) The optimization method and device of a kind of systematic function
CN109922012A (en) A kind of method and relevant device for transmitting data
CN104102494B (en) Radio communication base station is eated dishes without rice or wine data cipher accelerated methods
CN104270320B (en) A kind of method of distributed communication system active flow control
CN110290139A (en) Method for message transmission and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200803

Address after: Floor 2, No.16, Gaopeng Avenue, high tech Zone, Chengdu, Sichuan 610000

Patentee after: Chengdu Guangda Hengji Communication Technology Co., Ltd

Address before: 610041 building four, building two, Shiyang Industrial Park, five village, Shiyang village, fifty-five village, Chengdu hi tech Zone, Sichuan, Qingyun

Patentee before: CHENGDU GUANGDA NEW NETWORK TECHNOLOGY Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180515

Termination date: 20200924