CN109739654A - Message-oriented middleware and method for message transmission - Google Patents

Message-oriented middleware and method for message transmission Download PDF

Info

Publication number
CN109739654A
CN109739654A CN201810913922.XA CN201810913922A CN109739654A CN 109739654 A CN109739654 A CN 109739654A CN 201810913922 A CN201810913922 A CN 201810913922A CN 109739654 A CN109739654 A CN 109739654A
Authority
CN
China
Prior art keywords
message
class
timing
service request
message service
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
CN201810913922.XA
Other languages
Chinese (zh)
Other versions
CN109739654B (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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201810913922.XA priority Critical patent/CN109739654B/en
Publication of CN109739654A publication Critical patent/CN109739654A/en
Application granted granted Critical
Publication of CN109739654B publication Critical patent/CN109739654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention proposes a kind of message-oriented middleware and method for message transmission, the message-oriented middleware includes JMS messaging service component, for receiving the message service request of host computer transmission, and call timing interface that message service request is added in the sequential queue in message manager;Message manager, for managing sequential queue, it include multiple timing in sequential queue, each timing is used to describe the message service request of host computer transmission, message manager handles message service request in the corresponding message threads of message service request, and the response message of message service request is generated according to processing result;JMS messaging service component, is also used to that message interface is called to be packaged response message, and the response message after encapsulation is provided to the corresponding slave computer of message service request.The messaging standards degree of AFC system can be effectively promoted through the invention, promote compatible result and scalability.

Description

Message-oriented middleware and method for message transmission
Technical field
The present invention relates to technical field of rail traffic more particularly to a kind of message-oriented middlewares and method for message transmission.
Background technique
AFC system (Automatic Fare Collection system, AFC) is one kind by computer set The closed automated network of the automatic ticketing (including semi-automatic ticketing) of middle control, automatic fare collection and automatic charging and statistics System.The structure of AFC has carried out distinguishing hierarchy, is divided into ticket, station terminal equipment, station centre's system, wire center meter Five calculation machine system, score-clearing system levels.In the application field of AFC, from service layer, the total demand and layer architecture of AFC On be almost the same.But industry and not formed consistent messaging standards, typically each region, each city, Oneself AFC business norms (messaging standards), including network connection, message structure, time sequence definition etc. are formulated.Moreover, The design side of each AFC/supplier can realize respective traffic model, Er Qiejun according to the messaging standards of each place More conservative, technical detail does not disclose.
Under this mode, the messaging standards degree of AFC system is not high, compatible result and scalability It is bad.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, can effectively promote automatic ticket inspection system an object of the present invention is to provide a kind of message-oriented middleware The messaging standards degree of system promotes compatible result and scalability.
It is another object of the present invention to propose a kind of method for message transmission.
In order to achieve the above objectives, the message-oriented middleware that first aspect present invention embodiment proposes is applied to automatic ticket inspection System, the message-oriented middleware include JMS messaging service component, message interface, timing interface and message manager, wherein The JMS messaging service component for receiving the message service request of host computer transmission, and calls the timing interface described Message service request is added in the sequential queue in the message manager;The message manager, when for managing described Sequence queue, includes multiple timing in the sequential queue, and each timing is used to describe the message industry that one host computer is sent Business request, the message manager handle the message service request in the corresponding message threads of the message service request, And the response message of the message service request is generated according to processing result;The JMS messaging service component is also used to call institute It states message interface to be packaged the response message, and the response message after encapsulation is provided to the message service request pair The slave computer answered.
The message-oriented middleware that first aspect present invention embodiment proposes receives host computer hair by JMS messaging service component The message service request sent, and call timing interface that message service request is added in the sequential queue in message manager; Message manager manages sequential queue, includes multiple timing in sequential queue, and each timing is sent for describing a host computer Message service request, message manager handles message service request, and root in the corresponding message threads of message service request The response message of message service request is generated according to processing result;JMS messaging service component, call message interface to response message into Row encapsulation, and the response message after encapsulation is provided to the corresponding slave computer of message service request, it can effectively promote automatic selling The messaging standards degree of ticket-checking system promotes compatible result and scalability.
In order to achieve the above objectives, the method for message transmission that second aspect of the present invention embodiment proposes is applied to automatic selling and examines Bill system, comprising: receive the message service request that host computer is sent, and timing interface is called to add the message service request In sequential queue into message manager;The sequential queue is managed, includes multiple timing, Mei Geshi in the sequential queue Sequence is used to describe the message service request of host computer transmission, and in the corresponding message threads of the message service request The middle processing message service request, and generate according to processing result the response message of the message service request;Calling disappears Breath interface is packaged the response message, and it is corresponding that the response message after encapsulation is provided to the message service request Slave computer.
The method for message transmission that second aspect of the present invention embodiment proposes is asked by receiving the messaging service that host computer is sent It asks, and calls timing interface that message service request is added in the sequential queue in message manager;Sequential queue is managed, when It include multiple timing in sequence queue, each timing is used to describe the message service request of host computer transmission, and in message industry Business requests to handle message service request in corresponding message threads, and the response of message service request is generated according to processing result Message;It calls message interface to be packaged response message, and the response message after encapsulation is provided to message service request pair The slave computer answered can effectively promote the messaging standards degree of AFC system, promote compatible result and can expand Malleability.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the structural schematic diagram for the message-oriented middleware that one embodiment of the invention proposes;
Fig. 2 is AFC traffic model level schematic diagram in the embodiment of the present invention;
Fig. 3 is timing static structure figure in the embodiment of the present invention;
Fig. 4 is the corresponding class formation figure of message-oriented middleware in the embodiment of the present invention;
Fig. 5 is a kind of reception sequence chart in the embodiment of the present invention;
Fig. 6 is a kind of transmission sequence chart in the embodiment of the present invention;
Fig. 7 is the flow diagram for the method for message transmission that one embodiment of the invention proposes.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not considered as limiting the invention.On the contrary, this The embodiment of invention includes all changes fallen within the scope of the spiritual and intension of attached claims, modification and is equal Object.
Fig. 1 is the structural schematic diagram for the message-oriented middleware that one embodiment of the invention proposes.
Message-oriented middleware is applied in AFC system.
AFC is a kind of automatic ticketing (including semi-automatic ticketing) by centralized computer control, automatic fare collection and automatic The closed automatic network system of charge and statistics.The structure of AFC has carried out distinguishing hierarchy, is divided into ticket, station terminal Five equipment, station centre's system, wire center computer system, score-clearing system levels.In the application field of AFC, from business Level is almost the same in the total demand and layer architecture of AFC.But industry and not formed consistent messaging standards, The AFC business norms (messaging standards) of oneself have been formulated in typically each region, each city, including network connects It connects, message structure, time sequence definition etc..Moreover, the design side of each AFC/supplier, it can be according to the messaging standards of each place Realize respective traffic model, and more conservative, technical detail does not disclose.
Under this mode, the messaging standards degree of AFC system AFC is not high, compatible result and expansible Property is bad.
In order to solve the above-mentioned technical problem, a kind of message-oriented middleware is provided in the embodiment of the present invention, message-oriented middleware includes JMS messaging service component, message interface, timing interface and message manager, wherein JMS messaging service component, for connecing Receive host computer send message service request, and call timing interface by message service request be added in message manager when In sequence queue;Message manager includes multiple timing in sequential queue, each timing is for describing for managing sequential queue The message service request that one host computer is sent, message manager handle message in the corresponding message threads of message service request Service request, and according to the response message of processing result generation message service request;JMS messaging service component, is also used to call Message interface is packaged response message, and the response message after encapsulation is provided to the corresponding bottom of message service request Machine can effectively promote the messaging standards degree of AFC system AFC, promote compatible result and scalability.
Referring to Fig. 1, which includes: Java Message Service (Java Message Service, JMS) message Serviced component 101, message interface 102, timing interface 103 and message manager 104, wherein
JMS messaging service component 101 for receiving the message service request of host computer transmission, and calls timing interface 103 Message service request is added in the sequential queue in message manager 104.
The embodiment of the present invention is during specific execute, and referring to fig. 2, Fig. 2 is AFC traffic model in the embodiment of the present invention Level schematic diagram, wherein the message transmission between the bottom AFC operation system and the upper operation system of AFC is related to many levels (packet Include: timing supports level 21, message management level 22 and connection management level 23, TCP/IP network level), each level mentions The basic messaging interface in AFC system is supplied, message-oriented middleware 10 provided in the embodiment of the present invention is related to following The design of several levels, timing support level 21, message management level 22 and connection management level 23.
JMS messaging service component 101 therein, i.e. Java Message Service (Java Message Service, JMS) group Part, application programming interface API included in the component, is the API in Java platform about Message Oriented Middleware 10, Application programming interface API can be used between two application programs, or carry out between two distributed systems The transmission of message, and support asynchronous communication, which can be using the realization of current comparative maturity in the industry Scheme, for example, ActiveMQ, RabbitMQ, RocketMQ etc..
JMS messaging service component 101 in the embodiment of the present invention, in above-mentioned Java platform about Message Oriented Middleware 10 API is encapsulated, and the MQ solution for replacing each family can be facilitated, and is suitable for the invention 10 frame of message-oriented middleware Frame.
The simple timing class and combination timing class that timing interface 103 in the embodiment of the present invention derives from, also support timing Extension extends user by inheriting the timing interface 103 and realizes personalized time sequential type, to meet personalization Business demand.
Message interface 102 in the embodiment of the present invention, for being packaged to communication information, specific encapsulation messages head disappears ID, message body, checking algorithm, Encryption Algorithm etc. are ceased, in addition, also providing communication information serializing and unserializing method.This hair Message format in bright embodiment can use Json character string, be the common format of current network message, be easily understood, be convenient for Storage, transmission and explanation, and support the extension of message body, allow user to define satisfaction on the basis of Information frame personalized Diversified business realized by the message body of demand.
Optionally, in some embodiments, the embodiment of the present invention is in order to realize the design of timing support level, timing interface 103 derive from simple timing class and combination timing class, and simple timing class derives from unidirectional promoter's timing class, two-way promoter's timing Class and two-way response person's timing class, combination timing class derive from sync timing class and asynchronous combination timing class, wherein when Each timing class is provided to host computer by sequence interface 103;JMS messaging service component 101 receives host computer based in practical application Business demand invocation target timing class message service request generated, and message service request is added to message manager In 104 in sequential queue corresponding with Goal time order class.
Message manager 104 includes multiple timing in sequential queue, each timing is for retouching for managing sequential queue The message service request of host computer transmission is stated, message manager 104 is in the corresponding message threads of message service request Message service request is managed, and generates the response message of message service request according to processing result.
Referring to Fig. 3, Fig. 3 is timing static structure figure in the embodiment of the present invention, which describes each timing Static inheritance between class.
From figure 3, it can be seen that timing class derives from simple timing class from timing interface ISequence (SimpleSequence) and timing class (GroupSequence) is combined.Timing Similar integral ISequence is combined, while being gathered again The burnt derived class of ISequence, because combination timing is the combination of several ISequence derived class.Simple timing derives from single To promoter's timing (OneWayDataInitSequence), two-way promoter's timing is derived from by unidirectional promoter's timing (TwoWayDataInitSequence) and two-way response person's timing (TwoWayDataResponderSequence), when combination Sequence derives from two subclasses: sync timing and asynchronous combination timing.
The embodiment of the present invention is during specific execute, and referring to fig. 4, Fig. 4 is message-oriented middleware in the embodiment of the present invention Corresponding class formation figure, wherein the message-oriented middleware software view include: message manager (MessageManager) class, Message (Message) class, timing (Sequence) class, conversation class (Session), producer's class (Producer), and consumption Person's class (Consumer).Wherein,
Message manager (MessageManager) class is the core classes of message-oriented middleware, its underlying attribute has: Sequences, for the queue being made of the element that type is timing (Sequence), upper-layer service is handled by construction timing Message service request, after which is added to the sequential queue of message manager, when message manager is handled in message threads Sequence, MQHandle: message queue process object encapsulates the information processing objects of JMS message components, and message manager passes through MQHandle object reference JMS message components messaging service request.The master of message manager (MessageManager) class Method is wanted to have: setMqProperties (setting Mq attribute) method: the method for initialization MQHandle object properties. SendMessage (sending message) method: MQHandle object sends message by sendMessage method, SendMessage method call MQHandle determines that the suitable producer sends message.OnSequenceReceived (triggering life At sequence) method: signal can be sent when upper-layer service module needs to run timing to trigger onSequenceReceived method. OnSequenceReceived method carries parameter: the timing needed to be implemented.The side signal_msgReceived (signal reception) Method: after message manager receives opposite end message service request, if without the MQHandle object handles message service request, The message service request is then forwarded to bussiness processing layer.
Message (Message) class: the association class of message manager, encased core data --- message.Message class is protected Two underlying attributes: message header (MessageHead) and message body (MessageBody).Message header includes message-length, transmission The attributes such as type, protocol version, message id, encryption method, verification are the guarantee fields in message transmitting procedure.Message body Save message data.Message class provides sequencing method and unserializing method, for easily converting the message to Json String format, alternatively, constructing message object via Json character string.Message manager receives or sends messaging service and asks When asking, is encapsulated by Message object, transmits, handles message.
Timing (Sequence) class: it is made of message, represents the core classes of service logic.Several message are according to certain order Sequence constitutes timing, and timing class releases timing interface (ISequence interface), which mainly has following methods: GetState (determining state)/setState (setting state) method: setting/acquisition time sequence status method.Timing has shape State is a state machine.StartSequence (starting timing) method: this method starts timing, after calling this method, timing State machine enters first state;StopSequence (stopping timing) method: this method stops the timing, calls this method Afterwards, time sequence status is set as stopping, and state machine terminates.IsExpectedMessage (target message confirmation method) method: this method Carry incoming Message parameter.This method judges whether the message is next message that current timing is waiting.Such as Fruit is to handle the message, otherwise, is not handled.HandleMessage (generate message handle) method: this method and above IsExpectedMessage is corresponding, signal_onSequenceStateChanged (time sequence status switching) method: timing class The interface of release triggers the interface when time sequence status generates variation, which sends signal.
Conversation class (Session): conversation class defined in JMS specification represents the session carried out on a connection, session Object generates producers and consumers.
Producer's class (Producer): the producer defined in JMS rule is encapsulated, message manager is according to messaging service The send method that the corresponding business demand of request constructs the producer, and the producer is called to provide sends message, the producer by Session is generated.
Consumer's class (Consumer): consumer defined in JMS specification is encapsulated, consumer's object is in message manager Pass through Session Object Creation, and the message service request for specifying it to be monitored when initialization, is asked when listening to messaging service When asking, the onMessage method of consumer's object is triggered.
JMS messaging service component 101 is also used to that message interface 102 is called to be packaged response message, and will be after encapsulation Response message be provided to the corresponding slave computer of message service request.
Optionally, in some embodiments, the timing sequence process of message-oriented middleware 10 in one is provided in the embodiment of the present invention Journey, wherein unidirectional promoter's timing class includes: unidirectional recipient's timing class, is unidirectional recipient's timing class in Goal time order class When, message service request is directly forwarded to the upper layer application of AFC system AFC system by message manager 104, via Upper layer application handles to generate response message message service request.
It as an example, is a kind of reception sequence chart in the embodiment of the present invention referring to Fig. 5, Fig. 5, wherein Fig. 5 is shown Goal time order class is unidirectional recipient's timing class, and message manager 51 receives the message service request that ActiveMQ52 is sent, directly The upper layer application APP53 that message service request is forwarded to AFC system AFC system is met, via upper layer application APP53 Message service request is handled to generate response message.
Optionally, in some embodiments, the timing sequence process of another message-oriented middleware 10 is provided in the embodiment of the present invention Process, wherein unidirectional promoter's timing class includes: unidirectional sender's timing class, and message manager 104 encapsulates Java Message Service In producer's class, Goal time order class be unidirectional sender's timing class when, message manager 104 calls directly producer's class pair The message method answered, and transmission processing is carried out to service message to be sent based on corresponding message method.
It as an example, is a kind of transmission sequence chart in the embodiment of the present invention referring to Fig. 6, Fig. 6, wherein Fig. 6 is shown Goal time order class is unidirectional sender's timing class, which describes timing from the angle of sender, firstly, it is necessary to send out The upper layer application APP61 of message is sent, the object of unidirectional sender's timing class 62 is constructed, then calls object sending method The object of unidirectional sender's timing class 62 is sent to message manager 63 by (postSequence method), triggers message management Device 63 (onSequenceReceived method), in onSequenceReceived method, message manager adds the timing Enter sequential queue, and its startSequence method is called to start timing, in the object of unidirectional sender's timing class 62 In startSequence method, the corresponding message method handle of producer's class is called to send message.
Optionally, in some embodiments, the timing sequence process of another message-oriented middleware 10 is provided in the embodiment of the present invention Process, wherein message manager 104 encapsulates consumer's class in Java Message Service, is two-way promoter in Goal time order class When timing class, message manager 104 is after carrying out transmission processing to message service request, via the corresponding message of consumer's class Method of reseptance receives the corresponding response message of message service request, and traverses sequential queue, with triggering via with send message industry Interaction between the upper layer application of request of being engaged in handles response message.
For the embodiment of the present invention during specific execute, message manager 104 encapsulates the consumption in Java Message Service Person's class, when Goal time order class is two-way promoter's timing class, message manager 104 carries out at transmission to message service request After reason, the message from opposite end also is received via the corresponding onMessage method of consumer's class, then, traverses timing team Column, and call the isExpectedMessage method of each timing object, however, it is determined that some timing object IsExpectedMessage method call is returned as very, then the message is the message that the timing waits, and further triggering calling should The handleMessage method processing message of timing further interacts place in handleMessage method with upper layer application Manage message.
Optionally, in some embodiments, the timing sequence process of another message-oriented middleware 10 is provided in the embodiment of the present invention Process, wherein when Goal time order class is two-way response person's timing class, message manager 104 is also used to receive upper layer application pair The response message that message service request is handled with generation, and mesh is generated according to the mark of message service request and response message Feedback message is marked, and, by object feedback message feedback to the host computer for sending message service request.
The embodiment of the present invention is during specific execute, can be with when Goal time order class is two-way response person's timing class It is regarded as on the basis of unidirectional recipient's timing class, increases a feedback message, unidirectional recipient's timing class is only to receive to disappear Service request is ceased, and two-way response person's timing class is after receiving message service request, to message service request in local progress Processing generates response message, and it is right to construct a TwoWayDataResponderSequence (two-way response person's timing class) As, and object feedback message is generated to carry out based on the object feedback message according to the mark of message service request and response message Feedback.
Optionally, in some embodiments, the timing sequence process of another message-oriented middleware 10 is provided in the embodiment of the present invention Process, wherein when Goal time order class is combination timing class, configuration status machine management module in message manager 104, wherein Message manager 104 determines the sub-sequence dispatched required for message service request according to practical business demand, and via state The state of machine management module and each sub-sequence is scheduled control to each sub-sequence.
The embodiment of the present invention, when Goal time order class is combination timing class, combines timing class during specific execute The interfaces such as startSequence, isExpectedMessage, handleMessage are provided, it is unified in message manager 104 Scheduling.Combine timing class based on service application demand, can in message manager 104 configuration status machine management module, Via state machine management module and the state of each sub-sequence, control is scheduled to each sub-sequence.
In the embodiment of the present invention, by making the communication nodes such as 10 encapsulation messages of message-oriented middleware, timing, the connection, make Each AFC manufacturer can not be related to message and specifically receive and dispatch details, be solely focused on business realizing in logic, provide preferable encapsulation Property, timing interface 103 is discharged by making the message-oriented middleware 10, user can be derived from based on timing interface 103, each AFC factory Quotient can extend the timing class of oneself on the basis of timing interface 103, have good expand according to respective actual use demand Malleability.By making the message-oriented middleware 10 according to JMS standard packaging message queue interface, AFC manufacturer can be according to business Situation selection integrates suitable message queue product, there is good flexibility.By above-mentioned so that message-oriented middleware 10 encapsulates respectively Timing sequence process process under kind application scenarios, and using Json character string as message transformat, there is good versatility.Separately Outside, the present invention is designed using Object--oriented method, has good readable, maintainable and scalability, mould High polymerization lower coupling, is methodically arranged, is easy to implement and is multiplexed between block.
In the present embodiment, by JMS messaging service component, when receiving the message service request that host computer is sent, and calling Message service request is added in the sequential queue in message manager by sequence interface;Message manager manages sequential queue, when It include multiple timing in sequence queue, each timing is used to describe the message service request of host computer transmission, message manager Message service request is handled in the corresponding message threads of message service request, and message service request is generated according to processing result Response message;JMS messaging service component calls message interface to be packaged response message, and the response after encapsulation is disappeared Breath is provided to the corresponding slave computer of message service request, can effectively promote the messaging standards of AFC system AFC Change degree promotes compatible result and scalability.
Fig. 7 is the flow diagram for the method for message transmission that one embodiment of the invention proposes.
Applied to AFC system.
Referring to Fig. 7, this method comprises:
S701: the message service request that host computer is sent is received, and timing interface is called to be added to message service request In sequential queue in message manager.
S702: managing sequential queue, includes multiple timing in sequential queue, each timing is for describing a host computer hair The message service request sent, and message service request is handled in the corresponding message threads of message service request, and according to place Manage the response message that result generates message service request.
S703: it calls message interface to be packaged response message, and the response message after encapsulation is provided to message industry Corresponding slave computer is requested in business.
Optionally, in some embodiments, timing interface derives from simple timing class and combination timing class, and simple timing class derives from Unidirectional promoter's timing class, two-way promoter's timing class and two-way response person's timing class, combination timing class derive from sync Timing class and asynchronous combination timing class, wherein
Each timing class is provided to host computer;
Host computer is received based on the business demand invocation target timing class message service request generated in practical application, And message service request is added in message manager in sequential queue corresponding with Goal time order class.
Optionally, in some embodiments, unidirectional promoter's timing class includes: unidirectional recipient's timing class, in Goal time order When class is unidirectional recipient's timing class, directly the upper layer that message service request is forwarded to AFC system AFC system is answered With being handled message service request to generate response message via upper layer application.
Optionally, in some embodiments, unidirectional promoter's timing class includes: unidirectional sender's timing class, message manager Producer's class in Java Message Service is encapsulated, when Goal time order class is unidirectional sender's timing class, calls directly the producer The corresponding message method of class, and transmission processing is carried out to service message to be sent based on corresponding message method.
Optionally, in some embodiments, message manager encapsulates consumer's class in Java Message Service, in Goal time order When class is two-way promoter's timing class, after carrying out transmission processing to message service request, disappear via consumer's class is corresponding Message receiving method receives the corresponding response message of message service request, and traverses sequential queue, with triggering via with send message Interaction between the upper layer application of service request handles response message.
Optionally, it in some embodiments, when Goal time order class is two-way response person's timing class, receives upper layer application and offsets Breath service request is handled the response message with generation, and generates target according to the mark of message service request and response message Feedback message, and, by object feedback message feedback to the host computer for sending message service request.
Optionally, in some embodiments, when Goal time order class is combination timing class, wherein
According to practical business demand, the sub-sequence dispatched required for message service request is determined, and via each sub-sequence State is scheduled control to each sub-sequence.
It should be noted that being also suitable in earlier figures 1- Fig. 6 embodiment to the explanation of 10 embodiment of message-oriented middleware In the method for message transmission of the embodiment, realization principle is similar, and details are not described herein again.
In the present embodiment, the message service request sent by receiving host computer, and call timing interface by messaging service Request is added in the sequential queue in message manager;Sequential queue is managed, includes multiple timing, Mei Geshi in sequential queue Sequence is used to describe the message service request of host computer transmission, and handles and disappear in the corresponding message threads of message service request Service request is ceased, and generates the response message of message service request according to processing result;Call message interface to response message It is packaged, and the response message after encapsulation is provided to the corresponding slave computer of message service request, can effectively be promoted automatic The messaging standards degree of ticket selling and checking system AFC promotes compatible result and scalability.
It should be noted that in the description of the present invention, term " first ", " second " etc. are used for description purposes only, without It can be interpreted as indication or suggestion relative importance.In addition, in the description of the present invention, unless otherwise indicated, the meaning of " multiple " It is two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (14)

1. a kind of message-oriented middleware, which is characterized in that be applied to AFC system, the message-oriented middleware includes that JMS disappears Cease serviced component, message interface, timing interface and message manager, wherein
The JMS messaging service component for receiving the message service request of host computer transmission, and calls the timing interface will The message service request is added in the sequential queue in the message manager;
The message manager includes multiple timing in the sequential queue for managing the sequential queue, and each timing is used In the message service request for describing the transmission of a host computer, the message manager is corresponding in the message service request The message service request is handled in message threads, and the response message of the message service request is generated according to processing result;
The JMS messaging service component is also used to that the message interface is called to be packaged the response message, and will encapsulation Response message afterwards is provided to the corresponding slave computer of the message service request.
2. message-oriented middleware as described in claim 1, which is characterized in that the timing interface derives from simple timing class and combination Timing class, the simple timing class derive from unidirectional promoter's timing class, two-way promoter's timing class and two-way response person's timing Class, the combination timing class derive from sync timing class and asynchronous combination timing class, wherein
Each timing class is provided to the host computer by the timing interface;
The JMS messaging service component receives the host computer based on the business demand invocation target timing class in practical application Message service request generated, and the message service request is added in the message manager and the Goal time order In the corresponding sequential queue of class.
3. message-oriented middleware as claimed in claim 2, which is characterized in that wherein, unidirectional promoter's timing class includes: list To recipient's timing class, when the Goal time order class is unidirectional recipient's timing class, the message manager directly will be described Message service request is forwarded to the upper layer application of the AFC system AFC system, via the upper layer application to described Message service request is handled to generate the response message.
4. message-oriented middleware as claimed in claim 2, which is characterized in that wherein, unidirectional promoter's timing class includes: list To sender's timing class, the message manager encapsulates producer's class in Java Message Service, is in the Goal time order class When unidirectional sender's timing class, the message manager calls directly the corresponding message method of producer's class, And transmission processing is carried out to service message to be sent based on the corresponding message method.
5. message-oriented middleware as claimed in claim 2, which is characterized in that in the message manager encapsulation Java Message Service Consumer's class, the Goal time order class be two-way promoter's timing class when, the message manager disappears to described After breath service request carries out transmission processing, the messaging service is received via the corresponding message receival method of consumer's class Corresponding response message is requested, and traverses the sequential queue, to trigger via the upper layer with the transmission message service request Interaction between handles the response message.
6. message-oriented middleware as claimed in claim 3, which is characterized in that the Goal time order class be the two-way response person When timing class, the message manager is also used to receive the upper layer application and is handled the message service request to generate The response message, and object feedback message is generated according to the mark of the message service request and the response message, with And by the object feedback message feedback to the host computer for sending the message service request.
7. message-oriented middleware as claimed in claim 2, which is characterized in that the Goal time order class be the combination timing class When, configuration status machine management module in the message manager, wherein
The message manager determines the period of the day from 11 p.m. to 1 a.m dispatched required for the message service request according to the practical business demand Sequence, and via the state machine management module and the state of each sub-sequence, control is scheduled to each sub-sequence.
8. a kind of method for message transmission, which is characterized in that be applied to AFC system, wherein
The message service request that host computer is sent is received, and calls timing interface that the message service request is added to message pipe It manages in the sequential queue in device;
The sequential queue is managed, includes multiple timing in the sequential queue, each timing is for describing a host computer hair The message service request sent, and handle the messaging service in the corresponding message threads of the message service request and ask It asks, and generates the response message of the message service request according to processing result;
It calls message interface to be packaged the response message, and the response message after encapsulation is provided to the messaging service Request corresponding slave computer.
9. method for message transmission as claimed in claim 8, which is characterized in that the timing interface derives from simple timing class and group Timing class is closed, when the simple timing class derives from unidirectional promoter's timing class, two-way promoter's timing class and two-way response person Sequence class, the combination timing class derive from sync timing class and asynchronous combination timing class, wherein
Each timing class is provided to the host computer;
The host computer is received based on the business demand invocation target timing class message service request generated in practical application, And the message service request is added in the message manager in sequential queue corresponding with the Goal time order class.
10. method for message transmission as claimed in claim 9, which is characterized in that wherein, unidirectional promoter's timing class packet Include: unidirectional recipient's timing class directly asks the messaging service when the Goal time order class is unidirectional recipient's timing class The upper layer application for being forwarded to the AFC system AFC system is sought, the messaging service is asked via the upper layer application It asks and is handled to generate the response message.
11. method for message transmission as claimed in claim 9, which is characterized in that wherein, unidirectional promoter's timing class packet Include: unidirectional sender's timing class, the message manager encapsulates producer's class in Java Message Service, in the Goal time order When class is unidirectional sender's timing class, the corresponding message method of producer's class is called directly, and based on described Corresponding message method carries out transmission processing to service message to be sent.
12. method for message transmission as claimed in claim 9, which is characterized in that the message manager encapsulation Java message clothes Consumer's class in business, when the Goal time order class is two-way promoter's timing class, to the message service request After carrying out transmission processing, it is corresponding that the message service request is received via the corresponding message receival method of consumer's class Response message, and the sequential queue is traversed, to trigger via between the upper layer application for sending the message service request Interaction handles the response message.
13. method for message transmission as claimed in claim 10, which is characterized in that the Goal time order class be the two-way sound When the person's of answering timing class, receives the upper layer application and the response message with generation is handled to the message service request, And object feedback message is generated according to the mark of the message service request and the response message, and, the target is anti- Message feedback is presented to the host computer for sending the message service request.
14. method for message transmission as claimed in claim 9, which is characterized in that when the Goal time order class is the combination When sequence class, wherein
According to practical business demand, the sub-sequence dispatched required for the message service request is determined, and via each period of the day from 11 p.m. to 1 a.m The state of sequence is scheduled control to each sub-sequence.
CN201810913922.XA 2018-08-10 2018-08-10 Message middleware and message transmission method Active CN109739654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810913922.XA CN109739654B (en) 2018-08-10 2018-08-10 Message middleware and message transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810913922.XA CN109739654B (en) 2018-08-10 2018-08-10 Message middleware and message transmission method

Publications (2)

Publication Number Publication Date
CN109739654A true CN109739654A (en) 2019-05-10
CN109739654B CN109739654B (en) 2022-09-09

Family

ID=66354386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810913922.XA Active CN109739654B (en) 2018-08-10 2018-08-10 Message middleware and message transmission method

Country Status (1)

Country Link
CN (1) CN109739654B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597920A (en) * 2019-09-26 2019-12-20 腾讯云计算(北京)有限责任公司 Information processing method and device
CN110888727A (en) * 2019-11-26 2020-03-17 北京达佳互联信息技术有限公司 Method, device and storage medium for realizing concurrent lock-free queue
CN111221667A (en) * 2020-01-09 2020-06-02 浪潮软件股份有限公司 Data distributed preprocessing method based on CMSP
CN111949420A (en) * 2020-08-10 2020-11-17 智业软件股份有限公司 Business operation flow control method, terminal equipment and storage medium
CN113965563A (en) * 2020-12-18 2022-01-21 深圳平安智汇企业信息管理有限公司 Model-based business processing method and device and server
CN114119019A (en) * 2021-11-26 2022-03-01 跨境银行间支付清算有限责任公司 Multi-channel access method and device based on cross-border payment system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030012348A1 (en) * 2000-02-29 2003-01-16 Ameritech Corporation. Method and system for filter based message processing in a unified messaging system
US20030085272A1 (en) * 2001-03-21 2003-05-08 David W. Andrews Customer administered autoload
CN1643552A (en) * 2002-02-28 2005-07-20 艾斯奥托公司 Iterative serialisation procedure for structured software objects
CN1834908A (en) * 2005-03-14 2006-09-20 捷讯研究有限公司 System and method for applying development patterns for component based applications
CN1984190A (en) * 2005-10-04 2007-06-20 罗伯特·博世公司 Method and apparatus for organizing and optimizing content in dialog systems
US20080033880A1 (en) * 2006-02-01 2008-02-07 Sara Fiebiger Techniques for authorization of usage of a payment device
CN102906697A (en) * 2010-06-03 2013-01-30 国际商业机器公司 Method and system of adapting data model to user interface component
US20140040194A1 (en) * 2012-08-02 2014-02-06 Amadeus S.A.S. Method, system and computer program product for sequencing asynchronous messages in a distributed and parallel environment
US20140279309A1 (en) * 2013-03-15 2014-09-18 Mastercard International Incorporated Transaction-history driven counterfeit fraud risk management solution
CN106603598A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Method for processing service request and apparatus thereof
CN106657232A (en) * 2016-09-29 2017-05-10 山东浪潮商用系统有限公司 Distributed server configuration and service method thereof
CN106713018A (en) * 2016-12-08 2017-05-24 中国电信股份有限公司物联网分公司 Message queue business data scheduling method and message queue implementation method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030012348A1 (en) * 2000-02-29 2003-01-16 Ameritech Corporation. Method and system for filter based message processing in a unified messaging system
US20030085272A1 (en) * 2001-03-21 2003-05-08 David W. Andrews Customer administered autoload
CN1643552A (en) * 2002-02-28 2005-07-20 艾斯奥托公司 Iterative serialisation procedure for structured software objects
CN1834908A (en) * 2005-03-14 2006-09-20 捷讯研究有限公司 System and method for applying development patterns for component based applications
CN1984190A (en) * 2005-10-04 2007-06-20 罗伯特·博世公司 Method and apparatus for organizing and optimizing content in dialog systems
US20080033880A1 (en) * 2006-02-01 2008-02-07 Sara Fiebiger Techniques for authorization of usage of a payment device
CN102906697A (en) * 2010-06-03 2013-01-30 国际商业机器公司 Method and system of adapting data model to user interface component
US20140040194A1 (en) * 2012-08-02 2014-02-06 Amadeus S.A.S. Method, system and computer program product for sequencing asynchronous messages in a distributed and parallel environment
US20140279309A1 (en) * 2013-03-15 2014-09-18 Mastercard International Incorporated Transaction-history driven counterfeit fraud risk management solution
CN106603598A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Method for processing service request and apparatus thereof
CN106657232A (en) * 2016-09-29 2017-05-10 山东浪潮商用系统有限公司 Distributed server configuration and service method thereof
CN106713018A (en) * 2016-12-08 2017-05-24 中国电信股份有限公司物联网分公司 Message queue business data scheduling method and message queue implementation method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
IOANNIS POLYZOS等: "A prototype implementation of Map/Reduce Model on Message-Oriented Middleware", 《2010 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN AND CYBERNETICS》 *
余腊生等: "基于智能体的消息中间件设计", 《科技创新导报》 *
张良春: "AFC系统通信中间件的研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597920A (en) * 2019-09-26 2019-12-20 腾讯云计算(北京)有限责任公司 Information processing method and device
CN110597920B (en) * 2019-09-26 2024-02-23 腾讯云计算(北京)有限责任公司 Information processing method and device
CN110888727A (en) * 2019-11-26 2020-03-17 北京达佳互联信息技术有限公司 Method, device and storage medium for realizing concurrent lock-free queue
CN110888727B (en) * 2019-11-26 2022-07-22 北京达佳互联信息技术有限公司 Method, device and storage medium for realizing concurrent lock-free queue
CN111221667A (en) * 2020-01-09 2020-06-02 浪潮软件股份有限公司 Data distributed preprocessing method based on CMSP
CN111221667B (en) * 2020-01-09 2024-03-22 浪潮软件股份有限公司 Data distributed preprocessing method based on CMSP
CN111949420A (en) * 2020-08-10 2020-11-17 智业软件股份有限公司 Business operation flow control method, terminal equipment and storage medium
CN113965563A (en) * 2020-12-18 2022-01-21 深圳平安智汇企业信息管理有限公司 Model-based business processing method and device and server
CN113965563B (en) * 2020-12-18 2023-09-26 深圳平安智汇企业信息管理有限公司 Service processing method and device based on model and server
CN114119019A (en) * 2021-11-26 2022-03-01 跨境银行间支付清算有限责任公司 Multi-channel access method and device based on cross-border payment system
CN114119019B (en) * 2021-11-26 2024-03-12 跨境银行间支付清算有限责任公司 Multi-channel access method and device based on cross-border payment system

Also Published As

Publication number Publication date
CN109739654B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN109739654A (en) Message-oriented middleware and method for message transmission
CN105472042B (en) The message-oriented middleware system and its data transferring method of WEB terminal control
CN111930372B (en) Service arrangement solution method and system realized through draggable flow chart
CN101159005A (en) Method and system to adaptively manage the quality of service of interactions between smart item networks and enterprise applications
CN107113232A (en) The method and apparatus that NFV manages layout
CN1533117B (en) News transmitting and receiving through tailered communication channel and program design model
US6041306A (en) System and method for performing flexible workflow process execution in a distributed workflow management system
CN108287756A (en) A kind of method and device of processing task
CN106462389A (en) Context-aware dynamic policy selection for messaging behavior
CN109408223A (en) Resource allocation method, device, terminal and storage medium
CN109756366A (en) System is realized in intelligent network SCP cloud service based on CAAS
TW200525938A (en) Remote system administration using command line environment
CN108462618A (en) Cloud Server and smart home device method for managing system
CN104967650A (en) Third-party e-commerce platform unified releasing method
CN107306232A (en) The network equipment, controller, queue management method and traffic management chip
CN110650203B (en) Data transmission method, device and system, computer storage medium and electronic equipment
CN104539669B (en) A kind of method of data synchronization based on mobile terminal
US20080201475A1 (en) Device Management Method Using Nodes Having Additional Attribute and Device Management Client Thereof
CN102520936A (en) Method for realizing sharing of Socket communication service on Android platform
CN110351366A (en) A kind of service scheduling method of Internet application, system and computer readable storage medium
CN110351532A (en) Video big data cloud platform cloud storage service method
CN107908488A (en) Message request interactive interfacing method, apparatus, computer equipment and storage medium
CN111970372A (en) Intelligent construction site Internet of things gateway communication method, gateway and system
CN101826981B (en) Method for processing event message, northbound interface and operation support system
CN109743249A (en) Forming method, integrated gateway and the integrated system of the integrated gateway of passenger information system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant