CN105516265A - Short message transmission method and apparatus - Google Patents

Short message transmission method and apparatus Download PDF

Info

Publication number
CN105516265A
CN105516265A CN201510854239.XA CN201510854239A CN105516265A CN 105516265 A CN105516265 A CN 105516265A CN 201510854239 A CN201510854239 A CN 201510854239A CN 105516265 A CN105516265 A CN 105516265A
Authority
CN
China
Prior art keywords
message
short message
consumer
queue
producer
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.)
Pending
Application number
CN201510854239.XA
Other languages
Chinese (zh)
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.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering 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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201510854239.XA priority Critical patent/CN105516265A/en
Publication of CN105516265A publication Critical patent/CN105516265A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/226Delivery according to priorities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a short message transmission method and apparatus. The method comprises the steps of receiving a short message sent from a message producer, adding the short message to a producer message queue, forwarding short messages in the producer message queue to a consumer message queue, and directly sending short messages in the consumer message queue to consumers. Through adoption of the short message transmission method and apparatus, the transmission process is simplified, and the transmission efficiency is improved.

Description

A kind of short message transmission method and device
Technical field
The present invention relates to message-oriented middleware technical field, particularly relate to a kind of short message transmission method and device.
Background technology
Along with domestic informationization build day by day deep, the network communications technology have also been obtained and develops fast.Meanwhile, enterprise goes from strength to strength and the quickening of informatization along with self scale, occur that there is different application systems in different department, different sub-systems completes different functions, but be not often connected mutually between each system or contact seldom, thus forming the phenomenon of many inside " information island ".Therefore, between system and system interconnect and information transmission becomes more and more important.Message-oriented middleware becomes the key component of information sharing and transfer of data between system and system gradually, can be carried out the transmission of data, message and file between the systems, thus make to achieve between system and system organically to contact by message-oriented middleware.
In existing message-oriented middleware, after the data receiving producer's transmission, first judge that these data are message or file, when these data are message, described message is transmitted, and before described message is sent to consumer, safety verification is carried out to described message, just described message is sent to consumer when described information authentication is safe.
Realizing in process of the present invention, inventor finds at least there is following technical problem in prior art:
Existing message-oriented middleware, when transmitting short message, transmitting procedure is more complicated, and efficiency of transmission is lower.
Summary of the invention
The invention provides a kind of short message transmission method and device, can transmitting procedure be simplified, improve efficiency of transmission.
First aspect, the invention provides a kind of short message transmission method, and described short message transmission method is applied in safe and reliable transmission environment, comprises the following steps:
The short message that the receipt message producer sends;
Add described short message to producer message queue;
By the short message in described producer's message queue to consumer's message queue;
Short message in described consumer's message queue is directly sent to consumer.
Second aspect, the invention provides a kind of short message transmission device, and described short message transmission application of installation is in safe and reliable transmission environment, and described device comprises:
Receiving element, for the short message that the receipt message producer sends;
First adding device, for adding described short message to producer message queue;
Retransmission unit, for by the short message in described producer's message queue to consumer's message queue;
Transmitting element, for directly sending to consumer by the short message in described consumer's message queue.
A kind of short message transmission method that the embodiment of the present invention provides and device, for in safe and reliable transmission environment, such as corporate intranet short message transmission provides a kind of transmission policy of optimization, after the short message receiving producer's transmission, do not judge that it is message or file, and before described short message is sent to consumer, safety verification is not carried out to described short message and life cycle is verified, directly send consumer to.Thus simplify the process of transmission, improve the efficiency of transmission.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of one embodiment of the invention short message transmission method;
Fig. 2 is the flow chart of another embodiment of the present invention short message transmission method;
Fig. 3 is the structural representation of one embodiment of the invention short message transmission device;
Fig. 4 is the structural representation of another embodiment of the present invention short message transmission device.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The invention provides a kind of short message transmission method, under safe and reliable transmission environment, such as, in corporate intranet, for message body type be text message, message size is less but size of message is huge and the short message that transmission frequency is very high, Effect-based operation middleware provides a kind of transmission policy of optimization.Wherein message-oriented middleware is the one of middleware, and middleware is a large class of basic software, and belong to the category of reusable software, middleware is in the centre of the application software of operating system software and user.Message-oriented middleware is a kind of middleware Technology be made up of message transfer mechanism or SMS queue's pattern, utilizes the message passing mechanism of high efficient and reliable to carry out the irrelevant data exchange of platform, and carries out the integrated of distributed system based on data communication.
As shown in Figure 1, described short message transmission method comprises:
Step S11: the short message that the receipt message producer sends;
Wherein, conventional JMS message comprises message header, message attributes and source body.Message header is the envelope of message, is included as and makes all information of message arrival required for destination.Message attributes can Custom Attributes, to carry out the selection of message.Message subject contains the core data of message, comprises TextMessage, MapMessage, BytesMessage, StreamMessage, ObjectMessage five class type of message.The short message that here the message producer manufactures refers to that source body adopts text message TextMessage and the message of less (being less than 8K).
Step S12: add described short message to producer message queue;
Wherein, message queue be in order to effective control message transmitting-receiving process in the message between the data structure of storing message built-in in part.In addition set of queues high for priority can be made into a Priority Queues, so that the short message worried preferentially is processed.
Step S13: by the short message in described producer's message queue to consumer's message queue;
Step S14: the short message in described consumer's message queue is directly sent to consumer.
A kind of short message transmission method that the embodiment of the present invention provides, for message body type be text message, message size is less but size of message is huge and the transmitting scene of the short message that transmission frequency is very high is optimized, only short message is comprised in the data of message producer transmission, thus relative to the transmission of messages of Effect-based operation middleware of the prior art, the data that message-oriented middleware does not need the decision message producer to transmit are message or file.In addition, under a kind of short message transmission method that the embodiment of the present invention provides is applied in safe and reliable transmission environment, such as, in the network of enterprises, the secure match rank of the message producer and message person is higher, before the short message in consumer's message queue is directly sent to consumer, do not need the checking carrying out safety verification and life cycle.Thus simplify the process of transmission, improve the efficiency of transmission.
Alternatively, the short message that the message producer sends was added to Messages-Waiting queue before adding short message to producer message queue, judge that whether producer's message queue is full, if producer's message queue is full, then short message continues to wait in Messages-Waiting queue, otherwise adds short message to producer message queue.
Alternatively, before the short message in consumer's message queue is directly sent to consumer, also comprise: message monitoring is carried out to consumer's message queue, judge that whether consumer's message queue is as empty, if consumer's message queue is empty, then wait for, otherwise the short message in consumer's message queue is directly sent to consumer.
Alternatively, short message in producer's message queue is transmitted to consumer's message queue successively according to the sequencing added in queue, due to the control mode in queue short message many employings first in first out, therefore, usually adopt queue as the storage organization of message.
Alternatively, the short message that the described receipt message producer sends comprises: the short message sent by the Messaging Application Programming Interface receipt message producer; Describedly consumer is directly sent to comprise the short message in described consumer's message queue: by Messaging Application Programming Interface, the short message in described consumer's message queue directly to be sent to consumer.Namely the message producer calls the api function sending message, and will the short message sent be needed to be stored in producer's message queue, the short message of needs takes out by the api function that consumer calls receipt message from consumer's message queue.The short message transmission policy technology of current main-stream or server/customer end (CS) structure, except except build-in services end, also need client is installed, in the present invention, by adopting application programming interfaces form, save client-side program set-up time, space, the client-side program installation and operation problem that different system environment can also be avoided to cause.
In addition, the short message transmission in the method for message transmission in the present invention between the message producer and consumer also supports the version of publish/subscribe.
Particularly, as shown in Figure 2, a kind of short message transmission method that the embodiment of the present invention provides, comprising:
Step S21: the message producer calls Messaging Application Programming Interface (API) function sending message and adds the short message of manufacture to Messages-Waiting queue.
Step S22: judge that whether producer's message queue is full, if producer's message queue is full, then performs step S23, otherwise performs step S24.
Step S23, short message continues to wait in Messages-Waiting queue, returns and performs step S21.
Step S24, adds producer's message queue to by short message.
Step S25: by the short message in producer's message queue to consumer's message queue.
Step S26: before the short message in consumer's message queue is directly sent to consumer, message monitoring is carried out to consumer's message queue.
Step S27: judge that whether consumer's message queue is as empty, if consumer's message queue is empty, then performs step S28, otherwise performs step S29.
Step S28, to wait for, return and perform step S26.
Step S29, the short message in consumer's message queue is directly sent to consumer, short message is taken out reception by Messaging Application Programming Interface (API) function that consumer calls receipt message from consumer's message queue.
In addition, the embodiment of the present invention also provides a kind of short message transmission device, and as shown in Figure 3, described device comprises:
Receiving element 31, for the short message that the receipt message producer sends;
Wherein, conventional JMS message comprises message header, message attributes and source body.Message header is the envelope of message, is included as and makes all information of message arrival required for destination.Message attributes can also Custom Attributes, to carry out the selection of message.Message subject contains the core data of message, comprises TextMessage, MapMessage, BytesMessage, StreamMessage, ObjectMessage five class type of message.The short message that here the message producer manufactures refers to that source body adopts text message TextMessage and the message of less (being less than 8K).
First adding device 32, for adding described short message to producer message queue;
Wherein, message queue be in order to effective control message transmitting-receiving process in the message between the data structure of storing message built-in in part.In addition set of queues high for priority can be made into a Priority Queues, so that the short message worried preferentially is processed.
Retransmission unit 33, for by the short message in described producer's message queue to consumer's message queue;
Transmitting element 34, for directly sending to consumer by the short message in described consumer's message queue.
A kind of short message transmission device provided by the invention, for message body type be text message, message size is less but size of message is huge and the transmitting scene of the short message that transmission frequency is very high is optimized, only short message is comprised in the data of message producer transmission, thus relative to the transmission of messages of Effect-based operation middleware of the prior art, the data that message-oriented middleware does not need the decision message producer to transmit are message or file.In addition, short message transmission application of installation of the present invention is under safe and reliable transmission environment, such as, in the network of enterprises, the level of security of the message producer and message person is higher, before the short message in consumer's message queue is directly sent to consumer, do not need the checking carrying out safety verification and life cycle.Thus simplify the process of transmission, improve the efficiency of transmission.
Alternatively, as shown in Figure 4, the short message transmission device that the embodiment of the present invention provides also comprises:
Second adding device 45, before adding described short message to producer message queue at described first adding device, adds the short message that the described message producer sends to Messages-Waiting queue;
Judging unit 46, for judging that whether described producer's message queue is full; If when described producer's message queue is expired, described short message continues to wait in described Messages-Waiting queue; Otherwise described first adding device adds described short message to described producer's message queue.
Alternatively, as shown in Figure 4, the short message transmission device that the embodiment of the present invention provides also comprises:
Monitoring unit 47, before the short message in described consumer's message queue directly being sent to consumer at described transmitting element, carries out message monitoring to described consumer's message queue, judges that whether described consumer's message queue is as empty; When described monitoring unit judges that described consumer's message queue is as empty, waits for; Otherwise the short message in described consumer's message queue is directly sent to consumer by described transmitting element.
Alternatively, described retransmission unit 43 is for being transmitted to consumer's message queue by the short message in producer's message queue successively according to the sequencing added in queue.Due to the control mode of message many employings first in first out, therefore, usually adopt queue as the storage organization of message.
Alternatively, described receiving element 41, for the short message sent by the Messaging Application Programming Interface receipt message producer; Transmitting element 44, for directly sending to consumer by messages application layer interface by the short message in described consumer's message queue.Namely the message producer calls the api function sending message, and will the short message sent be needed to be stored in producer's message queue, the message of needs be taken out by the api function that consumer calls receipt message from consumer's message queue.The short message transmission policy technology of current main-stream or server/customer end (CS) structure, except build-in services end, also need client is installed, in the present invention, by adopting application programming interfaces form, save client-side program set-up time, space, the client-side program installation and operation problem that different system environment can also be avoided to cause.
In addition, the short message transmission in the short message transmission device in the present invention between the message producer and consumer also supports the version of publish/subscribe.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (10)

1. a short message transmission method, described short message transmission method is applied in safe and reliable transmission environment, it is characterized in that, described method comprises:
The short message that the receipt message producer sends;
Add described short message to producer message queue;
By the short message in described producer's message queue to consumer's message queue;
Short message in described consumer's message queue is directly sent to consumer.
2. a kind of short message transmission method according to claim 1, is characterized in that, described add described short message to producer message queue before, also comprise:
Add the short message that the described message producer sends to Messages-Waiting queue;
Judge that whether described producer's message queue is full;
If described producer's message queue is full, then described short message continues to wait in described Messages-Waiting queue; Otherwise add described short message to described producer's message queue.
3. a kind of short message transmission method according to claim 1 and 2, is characterized in that, described short message in described consumer's message queue directly sent to consumer before, also comprise:
Message monitoring is carried out to described consumer's message queue, judges that whether described consumer's message queue is as empty;
If described consumer's message queue is empty, then wait for; Otherwise the short message in described consumer's message queue is directly sent to consumer.
4. a kind of short message transmission method according to claim 1, it is characterized in that, described short message in described producer's message queue to be comprised to consumer's message queue: the short message in described producer's message queue is transmitted to consumer's message queue successively according to the sequencing added in queue.
5. a kind of short message transmission method according to claim 1, is characterized in that, the short message that the described receipt message producer sends comprises: the short message sent by the Messaging Application Programming Interface receipt message producer;
Describedly consumer is directly sent to comprise the short message in described consumer's message queue: by Messaging Application Programming Interface, the short message in described consumer's message queue directly to be sent to consumer.
6. a short message transmission device, described short message transmission application of installation, in safe and reliable transmission environment, is characterized in that, described device comprises:
Receiving element, for the short message that the receipt message producer sends;
First adding device, for adding described short message to producer message queue;
Retransmission unit, for by the short message in described producer's message queue to consumer's message queue;
Transmitting element, for directly sending to consumer by the short message in described consumer's message queue.
7. a kind of short message transmission device according to claim 6, is characterized in that, also comprise:
Second adding device, before adding described short message to producer message queue at described first adding device, adds the short message that the described message producer sends to Messages-Waiting queue;
Judging unit, for judging that whether described producer's message queue is full;
If when described producer's message queue is expired, described short message continues to wait in described Messages-Waiting queue; Otherwise described first adding device adds described short message to described producer's message queue.
8. a kind of short message transmission device according to any one of claim 6-7, is characterized in that, also comprise:
Monitoring unit, before the short message in described consumer's message queue directly being sent to consumer at described transmitting element, carries out message monitoring to described consumer's message queue, judges that whether described consumer's message queue is as empty;
If described consumer's message queue is empty, wait for; Otherwise the short message in described consumer's message queue is directly sent to consumer by described transmitting element.
9. a kind of short message transmission device according to claim 6, is characterized in that, described retransmission unit is used for the short message in described producer's message queue to be transmitted to consumer's message queue successively according to the sequencing added in queue.
10. a kind of short message transmission device according to claim 6, is characterized in that, described receiving element is used for the short message sent by the messages application layer interface receipt message producer;
Described transmitting element, for directly sending to consumer by Messaging Application Programming Interface by the short message in described consumer's message queue.
CN201510854239.XA 2015-11-27 2015-11-27 Short message transmission method and apparatus Pending CN105516265A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510854239.XA CN105516265A (en) 2015-11-27 2015-11-27 Short message transmission method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510854239.XA CN105516265A (en) 2015-11-27 2015-11-27 Short message transmission method and apparatus

Publications (1)

Publication Number Publication Date
CN105516265A true CN105516265A (en) 2016-04-20

Family

ID=55723896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510854239.XA Pending CN105516265A (en) 2015-11-27 2015-11-27 Short message transmission method and apparatus

Country Status (1)

Country Link
CN (1) CN105516265A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915647A (en) * 2016-06-17 2016-08-31 浙江万朋教育科技股份有限公司 System and method for improving short message sending performance
CN109491804A (en) * 2018-10-11 2019-03-19 视联动力信息技术股份有限公司 Method for message transmission and device
CN110781017A (en) * 2019-11-01 2020-02-11 华云数据有限公司 Message processing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025650A (en) * 2010-06-04 2011-04-20 西本新干线股份有限公司 Message processing system and message processing method of enterprise service bus
JP5085163B2 (en) * 2007-03-09 2012-11-28 株式会社日立製作所 Message transmission / reception system and transmission / reception method
CN103164721A (en) * 2013-03-15 2013-06-19 安徽皖通科技股份有限公司 Car connected network side information data collection and processing method
CN103428072A (en) * 2012-05-23 2013-12-04 北京大学 Persistent message publishing method and system
CN103516580A (en) * 2012-06-26 2014-01-15 北京大学 Method of realizing message receiving and forwarding based on message queue and system thereof
CN104601572A (en) * 2015-01-15 2015-05-06 北京工业大学 Trusted architecture based security message transmission method
CN104796495A (en) * 2015-05-08 2015-07-22 集怡嘉数码科技(深圳)有限公司 Message pushing method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5085163B2 (en) * 2007-03-09 2012-11-28 株式会社日立製作所 Message transmission / reception system and transmission / reception method
CN102025650A (en) * 2010-06-04 2011-04-20 西本新干线股份有限公司 Message processing system and message processing method of enterprise service bus
CN103428072A (en) * 2012-05-23 2013-12-04 北京大学 Persistent message publishing method and system
CN103516580A (en) * 2012-06-26 2014-01-15 北京大学 Method of realizing message receiving and forwarding based on message queue and system thereof
CN103164721A (en) * 2013-03-15 2013-06-19 安徽皖通科技股份有限公司 Car connected network side information data collection and processing method
CN104601572A (en) * 2015-01-15 2015-05-06 北京工业大学 Trusted architecture based security message transmission method
CN104796495A (en) * 2015-05-08 2015-07-22 集怡嘉数码科技(深圳)有限公司 Message pushing method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915647A (en) * 2016-06-17 2016-08-31 浙江万朋教育科技股份有限公司 System and method for improving short message sending performance
CN109491804A (en) * 2018-10-11 2019-03-19 视联动力信息技术股份有限公司 Method for message transmission and device
CN110781017A (en) * 2019-11-01 2020-02-11 华云数据有限公司 Message processing method, device, equipment and storage medium
CN110781017B (en) * 2019-11-01 2021-12-31 华云数据有限公司 Message processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3430772B1 (en) Message transfer system, method of transferring messages and software product
CN102469033B (en) Message subscription system and message sending method
CA2738152A1 (en) System and method for dynamic automatic communication path selection, distributed device synchronization and task delegation
US20140156028A1 (en) Cloud-based bi-directional messaging system for home appliance control
CN110808948B (en) Remote procedure calling method, device and system
US11044243B2 (en) Push notification for application updates
CN105871703A (en) Push and pull combined instant communication message acquisition system and method
JP5408711B2 (en) Content delivery control method and apparatus, and content receiving terminal
CN105516265A (en) Short message transmission method and apparatus
KR101809365B1 (en) Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms
CN107835529B (en) Dynamic access system, node, management center and method for space-based backbone network
CN102118395A (en) Simple object access protocol (SOAP)-based reliable cross-domain data transmission component and method
US8391307B2 (en) Method for handling communications over a non-permanent communication link
US20170302522A1 (en) Method and apparatus for dynamic vehicle communication response
CN109756464B (en) Communication method, server and client
KR20150144025A (en) System and method for telematics service of vehicle
CN104426746A (en) Client message pushing method, client message pushing device and server
CN102255895A (en) Method and system for data communication between client and server
CA2653644A1 (en) Enhanced wireless short message service
JP5545127B2 (en) Message exchange system, message exchange method, and message exchange program
CN112272241A (en) Cloud computing message sending method and related device
JP2014170437A (en) Message distribution system and operation method therefor
CN117615037A (en) Vehicle communication method, middleware system and storage medium
CN101702719B (en) Self-adaptive calling method based on CORBA interface method
CN110300135A (en) Content of text sending method, 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160420