CN103051528B - A kind of message rapid distribution method for bus and device - Google Patents

A kind of message rapid distribution method for bus and device Download PDF

Info

Publication number
CN103051528B
CN103051528B CN201210545879.9A CN201210545879A CN103051528B CN 103051528 B CN103051528 B CN 103051528B CN 201210545879 A CN201210545879 A CN 201210545879A CN 103051528 B CN103051528 B CN 103051528B
Authority
CN
China
Prior art keywords
message
module
local
far
distribution
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.)
Active
Application number
CN201210545879.9A
Other languages
Chinese (zh)
Other versions
CN103051528A (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

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of message rapid distribution method for bus and device, relate to communication technique field, in order to distribute message fast, and realize managing local device and remote equipment simultaneously.The method comprises: when receiving message each time, resolving, judging according to the whereabouts of analysis result to this message; When this message is local message, the administration module that described local message is distributed to local device is processed; When this message is far-end message, described far-end message is distributed in message queue distribution module; To complete or far-end message has been distributed to after in message queue distribution module at the local message of described local management resume module, carry out reception and the distribution of message next time.

Description

A kind of message rapid distribution method for bus and device
Technical field
The present invention relates to communication technique field, particularly a kind of message rapid distribution method for bus and device.
Background technology
Existing communication equipment carries out local management and generally takes such mode, and a main control device connects grafting ancillary equipment on the device by its cpu bus interface.The configuration of ancillary equipment and management are all normally completed on main control device.By bus communication between main control device and ancillary equipment, acquisition real-time for the state information of ancillary equipment is saved in this locality, and can by the configuration distributing of ancillary equipment to each ancillary equipment.
Remote side administration is referred to and is connected by optical fiber or cable between two equipment, and management information can be added to circuit and get on long-distance transmissions to from equipment by main equipment.From equipment after receiving remote side administration information, according to the management information of the agreement process main equipment of communication protocol.
General CPU has multiple bus interface, and often kind of interface can do different purposes according to demand.Such as certain CPU has two RS232 interfaces, 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 time this interface has a multiple regulatory requirement.Although when early development time, certain interface has multiple in other words, only to which providing more single function, and when needing when expanding afterwards to increase New function to certain interface.Need a kind of processing mode that can meet the demand and guarantee management of performance from software simulating.
And existing bus interface processing procedure when processing message is long, causes sometimes to process in time the message arrived, causing the message of follow-up arrival to cover untreated message above, cause the loss of data.
Summary of the invention
Embodiments provide a kind of message rapid distribution method for bus and device, in order to distribute message fast, and realize managing local device and remote equipment simultaneously.
A kind of message rapid distribution method for bus that the embodiment of the present invention provides, the method comprises:
When receiving message each time, resolving, judging according to the whereabouts of analysis result to this message;
When this message is local message, the administration module that described local message is distributed to local device is processed; When this message is far-end message, described far-end message is distributed in message queue distribution module;
To complete or this far-end message has been distributed to after in message queue distribution module at this local message of described local management resume module, then carry out reception and the distribution of message next time.
The quick dispensing device of a kind of message for bus that the embodiment of the present invention provides, this device comprises:
Message judge module, for when receiving message each time, resolving, judging according to the whereabouts of analysis result to this message;
Message distribution module, for when this message is local message, processes the administration module that described local message is distributed to local device; When this message is far-end message, described far-end message is distributed in message queue distribution module;
Message receiver module, for complete at this local message of described local management resume module or this far-end message has been distributed to after in message queue distribution module, then carries out reception and the distribution of message next time.
The message judge module that the embodiment of the present invention is arranged achieves distinguishing message, achieves and is managed local message and strange land message by a bus interface simultaneously simultaneously; Be provided with message distribution module, when processing far-end message, only far-end message is put into message queue distribution module, do not carry out follow-up transmission flow, the reception shortening bus interface sends circulation process, namely only distribute, do not send, so the message received can be processed faster, shorten the time interval of process message, reduce message to cover, cause the occurrence probability of loss of data.
Accompanying drawing explanation
The schematic flow sheet of a kind of message rapid distribution method for bus that Fig. 1 provides for the embodiment of the present invention;
The structural representation of the quick dispensing device of a kind of message for bus that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 for the embodiment of the present invention provide a kind of for the message rapid distribution method of bus and the schematic flow sheet of device.
Embodiment
Embodiments provide a kind of message rapid distribution method and device, for bus interface, in order to distribute the message arrived fast, and realize managing local device and remote equipment simultaneously.
Based on above-mentioned purpose, as shown in Figure 1, the embodiment of the present invention provide firstly a kind of message rapid distribution method for bus, and the method comprises:
S101, when receiving message each time, resolves;
S102, judges according to the whereabouts of analysis result to this message;
S103, when this message is local message, processes the administration module that described local message is distributed to local device; S104, when this message is far-end message, is distributed in message queue distribution module by described far-end message;
To complete or this far-end message has been distributed to after in message queue distribution module at this local message of described local management resume module, then carry out reception and the distribution of message next time.
In the embodiment of the present invention, the mechanism of a message distribution is set up at the interface of bus, identification and distribution fast can be carried out to the message arrived, the administration module of local device is sent to process local message, and far-end message is put into message queue distribution module go send, complete or far-end message put into after message queue distribution module completes at the local message of described administration module process, represent that this method completes the distribution to this message, reset this mechanism rapidly to start reception and the distribution of message next time.
In the embodiment of the present invention, the message that this method changes conventional bus receives and transmission flow, when processing far-end message, only far-end message is put into message queue distribution module, do not carry out follow-up transmission flow, the reception shortening bus interface sends circulation process, namely only distribute, do not send, so the message received can be processed faster, shorten the time interval of process message, reduce message and cover, cause the occurrence probability of loss of data.
Usually, the number according to bus interface can bind a Message processing function for each bus interface, and described local message sends to local management module by the Message processing function called.
Usually, after the local message of described local management resume module completes, should return for representing the response message processed, this message message distribution mechanism resets after this response message of acquisition like this, carries out reception and the distribution of message next time.
Described message queue distribution module, after receiving described far-end message, sends to the administration module of remote equipment.Above-mentioned message queue distribution module carries out the transmission of message, and the mechanism of described message distribution carries out the distribution of message, and the two coordinates and completes whole bus interface for the reception of message, distribution and transmission.And by message
Preferably, the administration module of described remote equipment, after processing described far-end message, returns the administration module of response message to described local device, allows local device learn and complete the management of remote equipment.
Preferably, described message queue distribution module can store many far-end message simultaneously, and according to the reception order of far-end message, send successively, this is equivalent to add a secondary message buffer, improves the message processing capability of system.
As shown in Figure 2, in order to coordinate said method, the embodiment of the present invention additionally provides the quick dispensing device of a kind of message for bus, and this device comprises:
Message judge module 2, for when receiving message each time, resolving, judging according to the whereabouts of analysis result to this message;
Message distribution module 3, for when this message is local message, processes the administration module that described local message is distributed to local device; When this message is far-end message, described far-end message is distributed in message queue distribution module;
Message receiver module 1, for complete at this local message of described local management resume module or this far-end message has been distributed to after in message queue distribution module, then carries out reception and the distribution of message next time.
In above-described embodiment, a quick dispensing device of message is provided with at the interface of bus, identification and distribution fast can be carried out by secondary bus to the message arrived, the administration module of local device is sent to process local message, and far-end message is put into message queue distribution module go send, complete or far-end message put into after message queue distribution module completes at the local message of described administration module process, represent that this device completes the distribution to this message, reset this device rapidly to start reception and the distribution of message next time.
In the embodiment of the present invention, the message that this device and bus cooperating change conventional bus receives and transmission flow, when processing far-end message, only far-end message is put into message queue distribution module, do not carry out follow-up transmission flow, the reception shortening bus interface sends circulation process, namely only distribute, do not send, so the message received can be processed faster, shorten the time interval of process message, reduce because message covers, cause the occurrence probability of loss of data.
Administrative institute's use between the equipment that apparatus of the present invention are applicable to have master slave relation, main equipment can be made to realize simultaneously managing from equipment local device and far-end by a bus interface, and this device is also applicable to the distributed apparatus with multiple bus interface.
Usually, the number according to bus interface can bind a Message processing function for each bus interface, and local message is sent to local management module by the Message processing function called by described message distribution module.
Usually, after the local message of described local management resume module completes, should return for representing the response message processed to message receiver module, the quick dispensing device of this message resets after this response message of acquisition like this, carries out reception and the distribution of message next time.
Preferably, this device also can comprise message transmission module, at described message queue distribution module after receiving described far-end message, send to the administration module of remote equipment.
It should be noted that this message transmission module is responsible for the transmission of message, above-mentioned message judge module, message distribution module and message receiver module are responsible for the distribution of message, send and belong to two independent tasks, mutually without impact with being distributed in this device.
Preferably, the administration module of described remote equipment, after processing described far-end message, returns the administration module of response message to described local device, allows local device learn and complete the management of remote equipment.
Usually, described message transmission module receives the order of far-end message according to described message queue distribution module, sends successively.
Applicant's trial edition apparatus and method on the compact multi-business multiplexing equipment RC3000 series of products produced in this Condar development in science and technology Co., Ltd auspicious find, equipment after using can be good at utilizing a SPI (SerialPeripheralInterface, Serial Peripheral Interface (SPI)) bus completes management to local device, spi bus can be used as far-end by pipe bus interface simultaneously, receive the management of far-end main equipment.And be that local management or reception far-end message are all very stable, response speed is also well ensured.
As shown in Figure 3, technical scheme for a better understanding of the present invention, below for CPU bus interface, introduce a kind of message rapid distribution method flow process in detail:
First, it should be noted that, before work, for each bus interface binds a Message processing function.
S201, this flow process is a circulation message distribution flow, and message receiver module carries out poll to the interrupt bit of this bus after last message has been distributed, when finding to there is interrupt flag, from reception buffer zone, read message information be put in internal memory, and interrupt flag is removed;
S202, message judge module is resolved message, judges that this message is local message or far-end message;
S203, message distribution module is according to judged result, the administration module that local message is distributed to local device is processed, far-end message is distributed in the message queue distribution module of message transmission module, so far this device completes the distribution of a message, the interrupt bit of described message receiver module poll bus again.
As another independent task arranged side by side with above-mentioned distribution flow, described message transmission module, according to the reception order of far-end message, carries out the transmission successively of far-end message.
In sum, the message judge module that the embodiment of the present invention is arranged achieves distinguishing message, achieves and is managed local message and strange land message by a bus interface simultaneously simultaneously; Be provided with message distribution module, when processing far-end message, only far-end message is put into message queue distribution module, do not carry out follow-up transmission flow, the reception shortening bus interface sends circulation process, namely only distribute, do not send, so the message received can be processed faster, shorten the time interval of process message, reduce message to cover, cause the occurrence probability of loss of data; Original bus message Message Processing flow process is divided into independent distribution and transmission two parallel tasks, is independent of each other, accelerate the processing speed of bus to the message received to greatest extent, allow message lose as much as possible.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (12)

1., for a message rapid distribution method for bus, it is characterized in that, the method comprises:
When receiving message each time, resolving, judging according to the whereabouts of analysis result to this message;
When this message is local message, the administration module that described local message is distributed to local device is processed; When this message is far-end message, described far-end message is distributed in message queue distribution module;
To complete or this far-end message has been distributed to after in message queue distribution module at this local message of described local management resume module, then carry out reception and the distribution of message next time.
2. the method for claim 1, is characterized in that, described local message sends to local management module by the Message processing function called.
3. method as claimed in claim 2, is characterized in that, after the local message of described local management resume module completes, returns for representing the response message processed.
4. the method for claim 1, is characterized in that, described message queue distribution module, after receiving described far-end message, sends to the administration module of remote equipment.
5. method as claimed in claim 4, is characterized in that, the administration module of described remote equipment, after processing described far-end message, returns the administration module of response message to described local device.
6. method as claimed in claim 4, is characterized in that, described message queue distribution module, according to the reception order of far-end message, sends successively.
7., for the quick dispensing device of message of bus, it is characterized in that, this device comprises:
Message judge module, for when receiving message each time, resolving, judging according to the whereabouts of analysis result to this message;
Message distribution module, for when this message is local message, processes the administration module that described local message is distributed to local device; When this message is far-end message, described far-end message is distributed in message queue distribution module;
Message receiver module, for complete at this local message of described local management resume module or this far-end message has been distributed to after in message queue distribution module, then carries out reception and the distribution of message next time.
8. device as claimed in claim 7, it is characterized in that, local message is sent to local management module by calling Message processing function by described message distribution module.
9. device as claimed in claim 8, is characterized in that, after the local message of described local management resume module completes, returns for representing the response message processed to described message receiver module.
10. device as claimed in claim 7, it is characterized in that, this device also comprises message transmission module, at described message queue distribution module after receiving described far-end message, send to the administration module of remote equipment.
11. devices as claimed in claim 10, is characterized in that, the administration module of described remote equipment, after processing described far-end message, returns the administration module of response message to described local device.
12. devices as claimed in claim 10, is characterized in that, described message transmission module receives the order of far-end message according to described message queue distribution module, sends successively.
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 CN103051528A (en) 2013-04-17
CN103051528B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908488B (en) * 2017-11-14 2021-12-07 中国银行股份有限公司 Message request interface interaction method and device, computer equipment and storage medium
CN109510781B (en) * 2018-11-22 2022-05-03 成都傅立叶电子科技有限公司 Multi-type 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

Also Published As

Publication number Publication date
CN103051528A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
CN110750341B (en) Task scheduling method, device, system, terminal equipment and storage medium
CN105450618A (en) Operation method and operation system of big data process through API (Application Programming Interface) server
CN103401909B (en) Data interactive method based on BS and system, client and server
CN105511954A (en) Method and device for message processing
CN107807815B (en) Method and device for processing tasks in distributed mode
CN107678752A (en) A kind of task processing method and device towards isomeric group
CN104239088B (en) Operation is executed to the node of distributed computer network (DCN)
CN105808374A (en) Snapshot processing method and associated equipment
CN104935639A (en) Intelligent terminal, and applied distributed exploitation system and method
CN103455363A (en) Command processing method, device and physical host of virtual machine
CN106897299A (en) A kind of data bank access method and device
CN103581273A (en) Service executing method, device and system for distributed system
CN103051528B (en) A kind of message rapid distribution method for bus and device
CN103634385A (en) System, method and server for data synchronizing
CN110022323A (en) A kind of method and system of the cross-terminal real-time, interactive based on WebSocket and Redux
CN103634322A (en) Heartbeat management method, heartbeat management device and heartbeat management system for application programs
CN105530140A (en) Cloud scheduling system, method and device for removing tight coupling of use case and environment
CN102193884B (en) Data transfer circuit and method
CN105335362A (en) Real-time data processing method and system, and instant processing system
CN115277707A (en) Service processing method, device, electronic equipment and storage medium
CN104580328A (en) Virtual machine migration method, device and system
CN113792093A (en) Signal system interface service creating and executing method, device and electronic equipment
CN107895075B (en) Method for developing general simulation framework of airborne bus
CN102289966A (en) Radar simulation system
CN108259527B (en) Proxy-based service processing method and device and network element equipment

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