CN108897632A - A kind of message system and message method - Google Patents

A kind of message system and message method Download PDF

Info

Publication number
CN108897632A
CN108897632A CN201810806753.XA CN201810806753A CN108897632A CN 108897632 A CN108897632 A CN 108897632A CN 201810806753 A CN201810806753 A CN 201810806753A CN 108897632 A CN108897632 A CN 108897632A
Authority
CN
China
Prior art keywords
message
module
sender
unit
template
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
CN201810806753.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.)
Hangzhou Xinhehui Internet Financial Services Co Ltd
Original Assignee
Hangzhou Xinhehui Internet Financial Services 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 Hangzhou Xinhehui Internet Financial Services Co Ltd filed Critical Hangzhou Xinhehui Internet Financial Services Co Ltd
Priority to CN201810806753.XA priority Critical patent/CN108897632A/en
Publication of CN108897632A publication Critical patent/CN108897632A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The invention discloses a kind of message systems, including request inlet module, correction verification module, message factory module, sender's module and template module;Request inlet module includes that the request Concurrency for the built-in system transmission that api interface unit and WATCHER unit receive called side is sent to correction verification module, and the request that correction verification module sends request inlet module verifies;Message factory module is used to produce message object according to different event types, and packaged message is sent to sender's module;Sender's module includes letter sender's unit, Email Sender's unit, short message sender unit and wechat sender's unit in station, and corresponding third-party platform is called to transmit the message to user;Template module is for storing template;Invention additionally discloses a kind of message methods.Message is sent and is stripped out from the main flow of business by the present invention, the degree of coupling between reduction system, reduces the influence to main business workflow.

Description

A kind of message system and message method
Technical field
The present invention relates to message transmission technology field, a kind of message system and message method.
Background technique
Message system is the subsystem for sending service for providing message, and being system is based on certain event immediate feedback to user Important channel.Timeliness, the accuracy of message profoundly affect the user experience of system.
It before the transmission of message is realized in main website code library, provides message transmission for each functional module of system Service.But with the increase of portfolio and the fractionation of system and increase, bring some problems:
Standardization:The mode disunity for calling message to send in main website at present, some call message module service layer Sending method, some directly enter transmit queue, and some calls directly short message channel.In addition, with the fractionation and new industry of system The new system that business is born has the demand for sending message, if also only resting on main website carries out message transmission, will be insufficient for Growing business demand.
Scalability:Code degree of coupling at present between master station module is higher, and business is caused to rectify and improve and extend It is more troublesome.
High availability:Server or database in main website go wrong, and will cause the mutual shadow of function between business It rings, related reaction occurs.
Isolation:The table of each business be easy to cause the data between different business to usurp all in the same library in main website Change.
Summary of the invention
The purpose of the present invention is to provide a kind of message system and message methods, and message is sent from the main of business It is stripped out in process, the degree of coupling between reduction system, reduces the influence to main business workflow.
To achieve the above object, the present invention provides the following technical solutions:
A kind of message system, which is characterized in that including requesting inlet module, correction verification module, message factory module, sender Module and template module,
The request inlet module includes the built-in system transmission that api interface unit and WATCHER unit receive called side Request Concurrency send to correction verification module, the api interface unit be used for built-in system provide message send standard interface and Interface is customized, the WATCHER unit passes through the broadcast event of starting queue active sniffing RabbitMQ interchanger, according to not Same event carries out message transmission;
The request that the correction verification module sends request inlet module carries out verification and sends it to after confirmation is legal Message factory module;
Message factory module is used to produce message object according to different event types, and message parent is according to disappearing The method of breath object implementatio8 is packaged message and packaged message is sent to sender's module;
Sender's module includes letter sender's unit, Email Sender's unit, short message sender unit and micro- in station Believe sender's unit, letter sender's unit saves message in standing in letter table in the station, and Email Sender's unit will Information enters mail transmit queue, recalls mail platform and sends information to user, the short message sender unit enters message Short message transmit queue recalls SMS platform and sends information to user, and information is entered wechat and sent out by the wechat sender unit Queue is sent, wechat platform is recalled and sends information to user;
The template module is for storing template.
Further, the verification includes signature check, system information verification, message template verification and template data school It tests.
Further, the message object includes standard message object and customization message object.
Further, the attribute of the message object includes type of message, message medium, message sending strategy, the attribute It inherits in message parent.
Further, described to include to the concrete operations that message is packaged:Message template is obtained, configuration sends medium, Sending strategy is configured, template is replaced, finally gives packaged message to corresponding sender.
A kind of message method, which is characterized in that include the following steps,
Step S1:The built-in system of called side issues request and carries out message transmission;
Step S2:The request is verified;
Step S3:Message object is produced according to different event types;
Step S4:Message object is processed, packaged information is sent to each different sender;
Step S5:Each different sender transmits the message to user by corresponding platform.
Further, the verification in the step S2 includes signature check, system information verification, message template verification and mould Plate data check.
Further, the concrete operations encapsulated in the step S4 include:Message template is obtained, configuration sends medium, matches Sending strategy is set, template is replaced, finally gives packaged message to corresponding sender.
Compared with prior art, the beneficial effects of the invention are as follows:The present invention is used as one for message sending function is independent Message can be sent and is stripped out from the main flow of business by the subsystem of a infrastructure service, the coupling between reduction system It is right, reduce the influence to main business workflow.In addition, message, which sends relevant business datum, to be migrated out, prevent The relevant data of message are distorted by other business.We can also do the measure of a little High Availabitities for message system, realize message The autonomy of system.
Detailed description of the invention
Fig. 1 is system module block diagram of the invention.
Fig. 2 is the schematic diagram for requesting entrance.
Fig. 3 is the schematic diagram of message factory.
Fig. 4 is the schematic diagram of encapsulation.
Fig. 5 is the schematic diagram that message is sent.
Fig. 6 is flow chart of the method for the present invention.
Specific embodiment
The following is a clear and complete description of the technical scheme in the embodiments of the invention, it is clear that described embodiment Only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, the common skill in this field Art personnel every other embodiment obtained without making creative work belongs to the model that the present invention protects It encloses.
The present invention provides a kind of message system, and message system uses LNMP framework.Wherein, PHP uses PHALCON frame Frame, Phalcon are open source, global function stack, the PHP frame write, optimized for high-performance using C extension.In addition, between system also It is decoupled using MQ technology, MQ full name is Message Queue, and message queue (MQ) is a kind of application program to using journey The communication means of sequence.Application program is communicated by reading and writing the message (for the data of application program) of enqueue, without Dedicated connection is to link them.
Please refer to Fig. 1, message system include request inlet module, correction verification module, message factory module, sender's module and Template module,
The request inlet module includes the built-in system transmission that api interface unit and WATCHER unit receive called side Request Concurrency send to correction verification module.As shown in Fig. 2, the api interface unit is used to provide what message was sent to built-in system Standard interface and customization interface, in this present embodiment, standard interface are determined mainly in universal method and the instant short message of transmission Inhibition and generation interface mainly for different systems, such as Shanhai Pass system, business background system, customer center system, main station system, The built-in system of called side only need to send http request according to the parameter that interface defines.The WATCHER unit passes through The broadcast event for starting queue active sniffing RabbitMQ interchanger carries out message transmission, this method master according to different events It is used for customized development, the degree of coupling to be lower, and safety is higher.
The request that the correction verification module sends request inlet module carries out a series of verification such as parameter and closes in confirmation Message factory module is sent it to after method;Specifically, message system upon receiving a request, will do it a series of verification, Including:Signature check, system information verification, message template verification and template data verification, confirmation all it is legal after be sent to Give message factory module.
Referring to figure 3., message factory module is used to produce message object, including mark according to different event types Quasi- message object and customization message object.The attribute of message object includes type of message, message medium, message sending strategy, The inheritance of attribute is in message parent, it is also necessary to which the abstract method for realizing parent mainly has:Setting sends medium, standardizes template Data etc..Referring to figure 4., message parent (also known as message object base class) carries out message according to the method that message object is realized It encapsulates and packaged message is sent to sender's module, the concrete operations of encapsulation include:Message template is obtained, configuration is sent Medium configures sending strategy, replaces template, finally gives packaged message to corresponding sender.
Sender's module includes letter sender's unit, Email Sender's unit, short message sender unit and micro- in station Believe sender's unit, letter sender's unit saves message in standing in letter table in the station, and Email Sender's unit will Information enters mail transmit queue, recalls mail platform and sends information to user, the short message sender unit enters message Short message transmit queue recalls SMS platform and sends information to user, and information is entered wechat and sent out by the wechat sender unit Queue is sent, wechat platform is recalled and sends information to user;As shown in figure 5, being broadly divided into two steps, the first step is to send Object generates transmission task, and second step is to execute transmission task;The first step is to the effect that sent out based on the division for sending medium Object concurrency is sent to send object base class, the main contents of second step are then that message is sent to user by corresponding platform.
The template module further includes the addition of template for storing template, modification and deletion work.
Fig. 6 is please referred to, the present invention also provides a kind of message methods, which is characterized in that include the following steps,
Step S1:The built-in system of called side issues request and carries out message transmission;
Step S2:The request is verified, including signature check, system information verification, message template verification and mould Plate data check;
Step S3:Message object is produced according to different event types;
Step S4:Message object is processed, packaged information is sent to each different sender;Wherein seal The concrete operations of dress include:Message template is obtained, configuration sends medium, configures sending strategy, replaces template, finally will be packaged Message give corresponding sender;
Step S5:Each different sender transmits the message to user by corresponding platform.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included within the present invention.

Claims (8)

1. a kind of message system, which is characterized in that including requesting inlet module, correction verification module, message factory module, sender's mould Block and template module,
The request inlet module includes asking for the built-in system transmission of api interface unit and WATCHER unit reception called side Correction verification module is sought and is sent to, the api interface unit is used to provide the standard interface and customization that message is sent to built-in system Change interface, the WATCHER unit passes through the broadcast event of starting queue active sniffing RabbitMQ interchanger, according to different Event carries out message transmission;
The request that the correction verification module sends request inlet module carries out verification and sends it to message after confirmation is legal Factory's module;
Message factory module is used to produce message object according to different event types, and message parent is according to message pair Message is packaged as the method for realization and packaged message is sent to sender's module;
Sender's module includes letter sender's unit in station, Email Sender's unit, short message sender unit and wechat hair The person's of sending unit, letter sender's unit saves message in standing in letter table in the station, and Email Sender's unit is by information Enter mail transmit queue, recalls mail platform and send information to user, message is entered short message by the short message sender unit Transmit queue recalls SMS platform and sends information to user, and information is entered wechat and sends team by the wechat sender unit Column, recall wechat platform and send information to user;
The template module is for storing template.
2. message system according to claim 1, which is characterized in that the verification includes signature check, system information school It tests, message template verification and template data verification.
3. message system according to claim 1, which is characterized in that the message object includes standard message object and determines Inhibition and generation message object.
4. message system according to claim 1, which is characterized in that the attribute of the message object include type of message, Message medium, message sending strategy, the inheritance of attribute is in message parent.
5. message system according to claim 1, which is characterized in that the concrete operations packet being packaged to message It includes:Message template is obtained, configuration sends medium, configures sending strategy, replaces template, finally gives packaged message relatively The sender answered.
6. a kind of message method, which is characterized in that include the following steps,
Step S1:The built-in system of called side issues request and carries out message transmission;
Step S2:The request is verified;
Step S3:Message object is produced according to different event types;
Step S4:Message object is processed, packaged information is sent to each different sender;
Step S5:Each different sender transmits the message to user by corresponding platform.
7. message system according to claim 6, which is characterized in that the verification in the step S2 includes signature check, System information verification, message template verification and template data verification.
8. message system according to claim 6, which is characterized in that the concrete operations encapsulated in the step S4 include: Message template is obtained, configuration sends medium, configures sending strategy, replaces template, finally gives packaged message corresponding Sender.
CN201810806753.XA 2018-07-18 2018-07-18 A kind of message system and message method Pending CN108897632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810806753.XA CN108897632A (en) 2018-07-18 2018-07-18 A kind of message system and message method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810806753.XA CN108897632A (en) 2018-07-18 2018-07-18 A kind of message system and message method

Publications (1)

Publication Number Publication Date
CN108897632A true CN108897632A (en) 2018-11-27

Family

ID=64351231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810806753.XA Pending CN108897632A (en) 2018-07-18 2018-07-18 A kind of message system and message method

Country Status (1)

Country Link
CN (1) CN108897632A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743214A (en) * 2019-03-01 2019-05-10 致讯科技(天津)有限公司 A kind of message gateway exchange controller
CN112860453A (en) * 2020-12-14 2021-05-28 广州市玄武无线科技股份有限公司 Message management method, system, electronic device and storage medium
CN113191607A (en) * 2021-04-20 2021-07-30 北京异乡旅行网络科技有限公司 Task supervision method, device and system
CN113381987A (en) * 2021-06-01 2021-09-10 西安联乘智能科技有限公司 Data processing method of Internet of vehicles service, electronic equipment and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523069A (en) * 2011-11-21 2012-06-27 天津中兴软件有限责任公司 Method for sending message
WO2017080422A1 (en) * 2015-11-12 2017-05-18 中兴通讯股份有限公司 Qos management method and device
CN107294741A (en) * 2017-05-11 2017-10-24 广州市华础软件科技有限公司 The Notification Method and system of a kind of video conference
CN107465759A (en) * 2017-09-07 2017-12-12 武汉楚鼎信息技术有限公司 A kind of message server, message issuing method and terminal
EP3288232A1 (en) * 2015-12-30 2018-02-28 Huawei Technologies Co., Ltd. Nas data access method, system and relevant device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523069A (en) * 2011-11-21 2012-06-27 天津中兴软件有限责任公司 Method for sending message
WO2017080422A1 (en) * 2015-11-12 2017-05-18 中兴通讯股份有限公司 Qos management method and device
EP3288232A1 (en) * 2015-12-30 2018-02-28 Huawei Technologies Co., Ltd. Nas data access method, system and relevant device
CN107294741A (en) * 2017-05-11 2017-10-24 广州市华础软件科技有限公司 The Notification Method and system of a kind of video conference
CN107465759A (en) * 2017-09-07 2017-12-12 武汉楚鼎信息技术有限公司 A kind of message server, message issuing method and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743214A (en) * 2019-03-01 2019-05-10 致讯科技(天津)有限公司 A kind of message gateway exchange controller
CN112860453A (en) * 2020-12-14 2021-05-28 广州市玄武无线科技股份有限公司 Message management method, system, electronic device and storage medium
CN112860453B (en) * 2020-12-14 2022-04-08 广州市玄武无线科技股份有限公司 Message management method, system, electronic device and storage medium
CN113191607A (en) * 2021-04-20 2021-07-30 北京异乡旅行网络科技有限公司 Task supervision method, device and system
CN113381987A (en) * 2021-06-01 2021-09-10 西安联乘智能科技有限公司 Data processing method of Internet of vehicles service, electronic equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN108897632A (en) A kind of message system and message method
CN110266658B (en) Information updating method and device, electronic equipment and storage medium
CN104081742A (en) Method and apparatus for providing federated service accounts
CN107464074B (en) Accurate logistics distribution method and system
CN103442032A (en) Vehicle navigation method and system based on cloud service
CN105183672B (en) A kind of adaptive interface call method and system
CN206441195U (en) A kind of identity real name Verification System
CN105187373A (en) Data transmission method and data transmission system
CN109685479A (en) A kind of methods of exhibiting, computer installation and the computer readable storage medium of construction tunnel progress
CN106535148B (en) System and method for realizing simultaneous online of one card and multiple numbers of mobile terminal
CN107659491A (en) A kind of Group file sharing method and system based on instant messaging
MX2007005008A (en) Method for registering a mobile communication terminal in a local area network.
CN105488645A (en) Position range obtaining method and device
CN111626802A (en) Method and apparatus for processing information
CN101945329A (en) Method and system for implementing point-to-point position-based positioning of mobile terminals
CN104486296A (en) Identity recognition device and identity recognition method
CN112286865A (en) Data exchange method based on government affair field
US20160366674A1 (en) Construction Method for Social Networking Platform on based beacon
CN103546463B (en) Additional-parameter transmission method and additional-parameter transmission device based on network connection central system
CN102567088B (en) Method of handling step execution result in software and application control management object
US10750011B2 (en) Accessible and updateable service records
CN103152233A (en) Method and system for implementing digital family culture public service content access interface
US20140046812A1 (en) Expense reports for payments made with a mobile device
CN101600202A (en) Network element registration subsystem system, telecom value-added service system and network element registration method
CN110827126B (en) Overhauling quotation processing method, device and 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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20210518

AD01 Patent right deemed abandoned