CN103051528A - Method and device for rapidly distributing messages for bus - Google Patents

Method and device for rapidly distributing messages for bus Download PDF

Info

Publication number
CN103051528A
CN103051528A CN2012105458799A CN201210545879A CN103051528A CN 103051528 A CN103051528 A CN 103051528A CN 2012105458799 A CN2012105458799 A CN 2012105458799A CN 201210545879 A CN201210545879 A CN 201210545879A CN 103051528 A CN103051528 A CN 103051528A
Authority
CN
China
Prior art keywords
message
module
local
distribution
far
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.)
Granted
Application number
CN2012105458799A
Other languages
Chinese (zh)
Other versions
CN103051528B (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom 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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201210545879.9A priority Critical patent/CN103051528B/en
Publication of CN103051528A publication Critical patent/CN103051528A/en
Application granted granted Critical
Publication of CN103051528B publication Critical patent/CN103051528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a device for rapidly distributing messages for a bus, which belong to the technical field of communication. The method and the device are used for rapidly distributing the messages and realize simultaneous management over local equipment and remote equipment. The method comprises the following steps of: analyzing each time when a message is received, and judging the target of the message according to an analyzed result; when the message belongs to a local message, sending the local message to a management module of the local equipment to be processed; when the message belongs to a remote message, sending the remote message to a message queue distribution module; and receiving and sending the next message when the local message is processed by the local management module or the remote message is sent to the message queue distribution module.

Description

A kind of message rapid distribution method and device for bus
Technical field
The present invention relates to communication technique field, particularly a kind of message rapid distribution method and device for bus.
Background technology
Existing communication equipment carries out local management and generally takes such mode, and a main control device connects the ancillary equipment that is plugged on this equipment by its cpu bus interface.Configuration and management to ancillary equipment are all normally finished at main control device.By bus communication, real-time the obtaining of the state information of ancillary equipment is saved in this locality between main control device and the ancillary equipment, and can arrives each ancillary equipment to the configuration distributing of ancillary equipment.
Remote side administration refers to connect by optical fiber or cable between two equipment, and main equipment can be added to management information circuit and get on long-distance transmissions to from equipment.After receiving remote side administration information, process the management information of main equipment from equipment according to the agreement of communication protocol.
General CPU has multiple bus interface, and every kind of interface can be done different purposes according to demand.Such as certain CPU two RS232 interfaces are arranged, can one be used for doing local equipment control, another does the management of remote equipment.But when certain CPU only has the interface of an a certain type, and this interface is when having multiple regulatory requirement.Although in other words when early stage exploitation time certain interface have a plurality ofly, provide more single function to it, and when when expanding afterwards, needing to increase new function to certain interface.Need a kind of processing mode that can realize satisfying from software the demand and assurance management of performance.
And existing bus interface processing procedure when processing message is long, causes sometimes can not in time processing the message that arrives, and causes the message of follow-up arrival to cover the untreated message in front, has caused losing of data.
Summary of the invention
The embodiment of the invention provides a kind of message rapid distribution method and device for bus, in order to distributing fast message, and realizes managing simultaneously local device and remote equipment.
A kind of message rapid distribution method for bus that the embodiment of the invention provides, the method comprises:
When receiving message message each time, resolve, according to analysis result the whereabouts of this message message is judged;
When this message message is local message message, described local message message distribution to the administration module of local device is processed; When this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
Finish or after this far-end message message has been distributed in the message queue distribution module, carry out again next time reception and the distribution of message message in this local message message of described local management resume module.
The quick dispensing device of a kind of message for bus that the embodiment of the invention provides, this device comprises:
The message judge module is used for resolving when receiving message message each time, according to analysis result the whereabouts of this message message is judged;
The message distribution module is used for when this message message is local message message described local message message distribution to the administration module of local device being processed; When this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
The message receiver module is used for finishing or after this far-end message message has been distributed to the message queue distribution module, carrying out next time reception and the distribution of message message again in this local message message of described local management resume module.
The message judge module of embodiment of the invention setting has been realized the distinguishing of message message realized simultaneously local message and strange land message being managed simultaneously by a bus interface; Be provided with the message distribution module, when processing far-end message message, only far-end message message is put into the message queue distribution module, do not carry out follow-up transmission flow, the reception of having shortened bus interface sends circulation process, namely only distribute, do not send, so can process faster the message message that receives, shortened the time interval of processing message, reduce message message and covered, caused the occurrence probability of loss of data.
Description of drawings
The schematic flow sheet of a kind of message rapid distribution method for bus that Fig. 1 provides for the embodiment of the invention;
The structural representation of a kind of quick dispensing device of message for bus that Fig. 2 provides for the embodiment of the invention;
Fig. 3 for the embodiment of the invention provide a kind of for the message rapid distribution method of bus and the schematic flow sheet of device.
Embodiment
The embodiment of the invention provides a kind of message rapid distribution method and device, is used for bus interface, in order to fast the message that arrives being distributed, and realizes managing simultaneously local device and remote equipment.
Based on above-mentioned purpose, as shown in Figure 1, the embodiment of the invention at first provides a kind of message rapid distribution method for bus, and the method comprises:
S101 when receiving message message each time, resolves;
S102 judges the whereabouts of this message message according to analysis result;
S103 when this message message is local message message, processes described local message message distribution to the administration module of local device; S104, when this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
Finish or after this far-end message message has been distributed in the message queue distribution module, carry out again next time reception and the distribution of message message in this local message message of described local management resume module.
In the embodiment of the invention, set up the mechanism of a message message distribution at the interface of bus, can identify and fast distribution the message message that arrives, the administration module that local message message sends to local device is processed, and being put into the message queue distribution module, far-end message message goes to send, described administration module process that local message message is finished or far-end message message put into the message queue distribution module finish after, expression this method is finished the distribution to this message, and this mechanism of resetting rapidly is to begin next time reception and the distribution of message message.
In the embodiment of the invention, the message that this method has changed conventional bus receives and transmission flow, when processing far-end message message, only far-end message message is put into the message queue distribution module, do not carry out follow-up transmission flow, the reception of having shortened bus interface sends circulation process, namely only distribute, do not send, so can process faster the message message that receives, shorten the time interval of processing message, reduced message message and covered, caused the occurrence probability of loss of data.
Usually, can process function for message of each bus interface binding according to the number of bus interface, described local message message is processed function by the message that calls and is sent to the local management module.
Usually, after the local message message of described local management resume module is finished, should return the response message of finishing dealing with for expression, this message message distribution mechanism is reset behind this response message of acquisition like this, carries out next time reception and the distribution of message message.
Described message queue distribution module sends to the administration module of remote equipment after receiving described far-end message message.Above-mentioned message queue distribution module carries out the transmission of message message, and the mechanism of described message message distribution is carried out the distribution of message message, and the two cooperation has been finished whole bus interface for reception, distribution and the transmission of message message.And with message message
Preferably, the administration module of described remote equipment returns response message to the administration module of described local device after handling described far-end message message, allow local device learn the management of remote equipment is finished.
Preferably, described message queue distribution module can be stored many far-end message message simultaneously, and the reception order according to far-end message message sends successively, and this is equivalent to increase a secondary message buffer, has improved the message processing capability of system.
As shown in Figure 2, in order to cooperate said method, the embodiment of the invention also provides a kind of message for bus quick dispensing device, and this device comprises:
Message judge module 2 is used for resolving when receiving message message each time, according to analysis result the whereabouts of this message message is judged;
Message distribution module 3 is used for when this message message is local message message described local message message distribution to the administration module of local device being processed; When this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
Message receiver module 1 is used for finishing or after this far-end message message has been distributed to the message queue distribution module, carrying out next time reception and the distribution of message message again in this local message message of described local management resume module.
In above-described embodiment, interface in bus is provided with a quick dispensing device of message, can the message message that arrive be identified and fast distribution by secondary bus, the administration module that local message message sends to local device is processed, and being put into the message queue distribution module, far-end message message goes to send, described administration module process that local message message is finished or far-end message message put into the message queue distribution module finish after, represent that this device finishes the distribution to this message, resetting rapidly, this installs to begin next time reception and the distribution of message message.
In the embodiment of the invention, this device receives and transmission flow with the message that the bus cooperating has changed conventional bus, when processing far-end message message, only far-end message message is put into the message queue distribution module, do not carry out follow-up transmission flow, the reception of having shortened bus interface sends circulation process, namely only distribute, do not send, so can process faster the message message that receives, shorten the time interval of processing message, reduced because message message covers, caused the occurrence probability of loss of data.
Apparatus of the present invention are applicable to have administrative institute's usefulness between the equipment of master slave relation, can make main equipment pass through a bus interface and realize that this device also is applicable to have the distributed apparatus of a plurality of bus interface to the managing simultaneously from equipment of local device and far-end.
Usually, can process function for message of each bus interface binding according to the number of bus interface, described message distribution module is processed function by the message that calls local message message is sent to the local management module.
Usually, after the local message message of described local management resume module is finished, should return the response message of finishing dealing with for expression to the message receiver module, the quick dispensing device of this message is reset behind this response message of acquisition like this, carries out next time reception and the distribution of message message.
Preferably, this device also can comprise message transmission module, is used for sending to the administration module of remote equipment after described message queue distribution module is receiving described far-end message message.
It should be noted that this message transmission module is responsible for the transmission of message message, above-mentioned message judge module, message distribution module and message receiver module are responsible for the distribution of message message, send with being distributed in to belong to two independent tasks in this device, mutually without impact.
Preferably, the administration module of described remote equipment returns response message to the administration module of described local device after handling described far-end message message, allow local device learn the management of remote equipment is finished.
Usually, described message transmission module sends successively according to the order of described message queue distribution module reception far-end message message.
The applicant finds through trial edition apparatus and method on the compact multi-business multiplexing equipment RC3000 series of products of producing in auspicious this Condar development in science and technology Co., Ltd, equipment after the use can be good at utilizing a SPI (Serial Peripheral Interface, Serial Peripheral Interface (SPI)) bus is finished the management to local device, simultaneously can use spi bus to be managed bus interface as far-end, receive the management of far-end main equipment.And be that local management or reception far-end message message are all very stable, response speed is also well guaranteed.
As shown in Figure 3, technical scheme for a better understanding of the present invention, the below introduces a kind of message rapid distribution method flow process in detail take bus interface of CPU as example:
At first, need to prove, before work, for message of each bus interface binding is processed function.
S201, this flow process is a circulation message distribution flow, and message receiver module interrupt bit to this bus after last message message distribution is finished carries out poll, when finding to have interrupt flag, from reception buffer zone, read message information and be put in the internal memory, and interrupt flag is removed;
S202, the message judge module is resolved message message, judges that this message message is local message message or far-end message message;
S203, the message distribution module is according to judged result, local message message distribution to the administration module of local device is processed, with far-end message message distribution to the message queue distribution module of message transmission module, so far this device has been finished the distribution of a message message, and described message receiver module is the interrupt bit of poll bus again.
As another independent task arranged side by side with above-mentioned distribution flow, described message transmission module is carried out the successively transmission of far-end message message according to the reception order of far-end message message.
In sum, the message judge module of embodiment of the invention setting has been realized the distinguishing of message message realized simultaneously local message and strange land message being managed simultaneously by a bus interface; Be provided with the message distribution module, when processing far-end message message, only far-end message message is put into the message queue distribution module, do not carry out follow-up transmission flow, the reception of having shortened bus interface sends circulation process, namely only distribute, do not send, so can process faster the message message that receives, shortened the time interval of processing message, reduce message message and covered, caused the occurrence probability of loss of data; Original bus message Message Processing flow process is divided into independent distribution and sends two parallel tasks, be independent of each other, accelerate to greatest extent bus to the processing speed of the message message of reception, allow as much as possible message message can not lose.
Those skilled in the art should understand that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, complete implement software example or in conjunction with the form of the embodiment of software and hardware aspect.And the present invention can adopt the form of the computer program of implementing in one or more computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) that wherein include computer usable program code.
The present invention is that reference is described according to flow chart and/or the block diagram of method, equipment (system) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block diagram and/or square frame and flow chart and/or the block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device producing a machine, so that the instruction of carrying out by the processor of computer or other programmable data processing device produces the device of the function that is used for being implemented in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, so that the instruction that is stored in this computer-readable memory produces the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device, so that carry out the sequence of operations step producing computer implemented processing at computer or other programmable devices, thereby be provided for being implemented in the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame in the instruction that computer or other programmable devices are carried out.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (12)

1. message rapid distribution method that is used for bus is characterized in that the method comprises:
When receiving message message each time, resolve, according to analysis result the whereabouts of this message message is judged;
When this message message is local message message, described local message message distribution to the administration module of local device is processed; When this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
Finish or after this far-end message message has been distributed in the message queue distribution module, carry out again next time reception and the distribution of message message in this local message message of described local management resume module.
2. the method for claim 1 is characterized in that, described local message message is processed function by the message that calls and sent to the local management module.
3. method as claimed in claim 2 is characterized in that, after the local message message of described local management resume module is finished, returns the response message of finishing dealing with for expression.
4. the method for claim 1 is characterized in that, described message queue distribution module sends to the administration module of remote equipment after receiving described far-end message message.
5. method as claimed in claim 4 is characterized in that, the administration module of described remote equipment returns response message to the administration module of described local device after handling described far-end message message.
6. method as claimed in claim 4 is characterized in that, described message queue distribution module sends successively according to the reception order of far-end message message.
7. quick dispensing device of message that is used for bus is characterized in that this device comprises:
The message judge module is used for resolving when receiving message message each time, according to analysis result the whereabouts of this message message is judged;
The message distribution module is used for when this message message is local message message described local message message distribution to the administration module of local device being processed; When this message message is far-end message message, with described far-end message message distribution to the message queue distribution module;
The message receiver module is used for finishing or after this far-end message message has been distributed to the message queue distribution module, carrying out next time reception and the distribution of message message again in this local message message of described local management resume module.
8. device as claimed in claim 7 is characterized in that, described message distribution module sends to the local management module by calling message processing function with local message message.
9. device as claimed in claim 8 is characterized in that, after the local message message of described local management resume module is finished, returns the response message of finishing dealing with for expression to described message receiver module.
10. device as claimed in claim 7 is characterized in that, this device also comprises message transmission module, is used for sending to the administration module of remote equipment after described message queue distribution module is receiving described far-end message message.
11. device as claimed in claim 10 is characterized in that, the administration module of described remote equipment returns response message to the administration module of described local device after handling described far-end message message.
12. device as claimed in claim 10 is characterized in that, described message transmission module sends successively according to the order of described message queue distribution module reception far-end message message.
CN201210545879.9A 2012-12-14 2012-12-14 A kind of message rapid distribution method for bus and device Active CN103051528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210545879.9A CN103051528B (en) 2012-12-14 2012-12-14 A kind of message rapid distribution method for bus and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210545879.9A CN103051528B (en) 2012-12-14 2012-12-14 A kind of message rapid distribution method for bus and device

Publications (2)

Publication Number Publication Date
CN103051528A true CN103051528A (en) 2013-04-17
CN103051528B CN103051528B (en) 2016-02-10

Family

ID=48064033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210545879.9A Active CN103051528B (en) 2012-12-14 2012-12-14 A kind of message rapid distribution method for bus and device

Country Status (1)

Country Link
CN (1) CN103051528B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908488A (en) * 2017-11-14 2018-04-13 中国银行股份有限公司 Message request interactive interfacing method, apparatus, computer equipment and storage medium
CN109510781A (en) * 2018-11-22 2019-03-22 成都傅立叶电子科技有限公司 A kind of diversiform data distribution control method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030887A (en) * 2007-04-16 2007-09-05 北京瑞斯康达科技发展有限公司 Network management
CN101169771A (en) * 2007-11-30 2008-04-30 华为技术有限公司 Multiple passage internal bus external interface device and its data transmission method
CN102148757A (en) * 2011-01-31 2011-08-10 中兴通讯股份有限公司 Message distributing method and device of multi-core system
CN102394925A (en) * 2011-10-28 2012-03-28 广东电网公司电力科学研究院 Communication method and device for remote monitoring diagnosis center and area regulation center

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030887A (en) * 2007-04-16 2007-09-05 北京瑞斯康达科技发展有限公司 Network management
CN101169771A (en) * 2007-11-30 2008-04-30 华为技术有限公司 Multiple passage internal bus external interface device and its data transmission method
CN102148757A (en) * 2011-01-31 2011-08-10 中兴通讯股份有限公司 Message distributing method and device of multi-core system
CN102394925A (en) * 2011-10-28 2012-03-28 广东电网公司电力科学研究院 Communication method and device for remote monitoring diagnosis center and area regulation center

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908488A (en) * 2017-11-14 2018-04-13 中国银行股份有限公司 Message request interactive interfacing method, apparatus, computer equipment and storage medium
CN109510781A (en) * 2018-11-22 2019-03-22 成都傅立叶电子科技有限公司 A kind of diversiform data distribution control method and system

Also Published As

Publication number Publication date
CN103051528B (en) 2016-02-10

Similar Documents

Publication Publication Date Title
CN110750341B (en) Task scheduling method, device, system, terminal equipment and storage medium
CN103346974B (en) Controlling method of service process and network device
CN105511954A (en) Method and device for message processing
CN103309738A (en) User job scheduling method and device
CN105450618A (en) Operation method and operation system of big data process through API (Application Programming Interface) server
CN102193058A (en) Test apparatus and test module
CN104239088B (en) Operation is executed to the node of distributed computer network (DCN)
CN107678752A (en) A kind of task processing method and device towards isomeric group
CN106897299A (en) A kind of data bank access method and device
CN102957622A (en) Method, device and system for data processing
CN109327321B (en) Network model service execution method and device, SDN controller and readable storage medium
CN111026397B (en) Rpm packet distributed compiling method and device
CN104486373A (en) Lock resource migration method, nodes and distributed system
CN103581273A (en) Service executing method, device and system for distributed system
CN110022323A (en) A kind of method and system of the cross-terminal real-time, interactive based on WebSocket and Redux
CN103299298B (en) The method and system of process business
CN105335313A (en) Basic data transmission method and apparatus
CN103051528A (en) Method and device for rapidly distributing messages for bus
CN102724319A (en) Data synchronization method and system, and associated storage server
CN102970760A (en) Method and device for scheduling data traffic
CN105530140A (en) Cloud scheduling system, method and device for removing tight coupling of use case and environment
CN102193884B (en) Data transfer circuit and method
CN106095534B (en) A kind of calculating task processing method and system
CN103546341A (en) Automatic setup method of test environment
CN111309467B (en) Task distribution method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant