CN105681446A - Message transmission system and method - Google Patents
Message transmission system and method Download PDFInfo
- Publication number
- CN105681446A CN105681446A CN201610089440.8A CN201610089440A CN105681446A CN 105681446 A CN105681446 A CN 105681446A CN 201610089440 A CN201610089440 A CN 201610089440A CN 105681446 A CN105681446 A CN 105681446A
- Authority
- CN
- China
- Prior art keywords
- server end
- configuration parameter
- module
- parameter
- client
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a message transmission system and method; wherein the message transmission system comprises a client side and a server side; the client side and the server side are in communication connection; the server side comprises a storage module stored with configuration parameters; the server side reads the configuration parameters stored in the storage module, thus carrying out initializing operations and constructing an assembly based on the configuration parameters for the client side to invoke; and the client side builds the communication connection with the server side based on the configuration parameters contained in the assembly. Through adoption of the mode, the uniformity of the configuration parameters of the server side and the client side is kept; the error rate of code is reduced; moreover, the maintainability of the system is improved; when the configuration parameters of the server side change, it is unnecessary to modify the corresponding configuration parameters of the client side manually; and the resources are saved.
Description
Technical field
The present invention relates to communication technical field, particularly relate to a kind of message delivery system and method thereof.
Background technology
In web (the Internet) application system, server end substantially all adopts websocket, and (websocketprotocol is the agreement that HTML5 is a kind new, it achieve the full-duplex communication (full-duplex) between client and server) mode to client push message, customer terminal webpage is needed to initiate socket (socket) connection to server end initialized time making to communicate in this way, and after only socket successful connection is set up, could proper communication between server end and client.
But, in currently existing scheme, client and server end is in setting up the process that two-way communication connects, the configuration parameter of two sides needs to keep unanimously, such as, after server end have modified the configuration parameter of websocket service, client is also required to amendment according to server end immediately and revises accordingly, bring puzzlement to technical staff undoubtedly, waste substantial amounts of manpower and materials. Especially when outfield technical support personnel needs amendment service parameter configuration, resend associated documents after even needing contact research staff's amendment and could realize purpose, and after technical staff revises the configuration parameter of websocket server end according to network condition, also need to amendment client configuration, the process of software maintenance exists very big trouble.
Summary of the invention
For the problems referred to above, it is desirable to provide a kind of message delivery system and method thereof, it can keep the concordance of configuration parameter in server end and client, reduces coding error probability.
Technical scheme provided by the invention is as follows:
A kind of message delivery system, including client and server end, described client and the communication connection of described server end;
Described server end includes a storage the memory module of configuration parameter; Described server end reads the configuration parameter of storage in described memory module to carry out initialization operation and builds the assembly based on described configuration parameter for described client call, and described client sets up the communication connection between described server end based on the described configuration parameter comprised in described assembly.
In the technical program, after the configuration parameter of server end changes, it is no longer necessary to artificial actively go amendment client correspondingly parameter, client has only to call this assembly and obtains the configuration parameter wherein comprised, it is greatly saved manpower and materials, improves efficiency.
Further preferably, described configuration parameter includes: the Internet protocol (IP of server, InternetProtocol) URL (URL, UniformResourceLocator) of address, server end slogan and server end.
It is further preferred that described server end includes: the first parameter acquisition module being connected with described memory module, described first parameter acquisition module obtains the configuration parameter of described server end, and is stored in described memory module by described configuration parameter.
It is further preferred that described server end also includes the parameter read module being connected with described memory module and the initialization module being connected with described parameter read module, wherein,
Described parameter read module for reading described configuration parameter from described memory module;
The described configuration parameter that described initialization module reads based on described parameter read module initializes described server end.
Further preferably, described server end also includes the assembly generation module being connected respectively with described initialization module and described memory module, described assembly generation module generates the assembly based on configuration parameter based on the initialization result of described initialization module, and is stored in described memory module by described assembly.
In the technical program, described assembly generation module generates ajax (asynchronous JavaScript and XML) service for client call based on the configuration parameter stored in a storage module.
It is further preferred that described client includes the second parameter acquisition module and link block, wherein,
Described second parameter module is for obtaining described assembly from described server end, and then obtains the configuration parameter that described assembly includes;
Described link block, is connected with described second parameter acquisition module, and described link block sends connection request to described server end based on described configuration parameter, to set up the communication connection between described client and described server end.
In the technical program, client is machine-processed after the configuration parameter that server end obtains by ajax, namely sends socket connection request to server end based on this configuration parameter obtained, and request communicates to connect.
It is further preferred that described second parameter acquisition module obtains described assembly by the mode of asynchronous communication from described server.
A kind of method for message transmission, including:
Server end performs initialization operation based on the configuration parameter of self;
Described server end builds corresponding assembly based on described configuration parameter;
The assembly of server end described in client call, with the configuration parameter that acquisition wherein comprises;
Described client sends connection request to described server end based on described configuration parameter, to set up the communication connection with described server end.
It is further preferred that described configuration parameter includes: the URL of the Internet protocol address of server, server end slogan and server end; Described assembly is synchronous communication module.
It is further preferred that server end is based on the configuration parameter execution initialization operation of self, specifically include:
Server end obtains described configuration parameter and is stored by described configuration parameter;
Described server end reads the described configuration parameter of storage, and based on the described configuration parameter initialization server end read.
Message delivery system provided by the invention and method thereof, it is possible to bring following beneficial effect:
In the present invention, configuration parameter based on server end generates the assembly for client call, client sends connection request to before server end, the assembly of invoking server end is to obtain its built-in configuration parameter, so, client sends connection request to server end based on this configuration parameter, after successful connection, gets final product proper communication after obtaining connection handle.
Keep the concordance of server end and client configuration parameter in this way, reduce the error rate of coding; Meanwhile, improve the maintainability of system, when the configuration parameter of server end changes, it is no longer necessary to the corresponding configuration parameter of artificial amendment client, economize on resources; Further, technical staff can revise the configuration parameter of server end at any time according to network condition, while improve the allocative efficiency of Internet resources, accelerate the speed of data transmission.
Accompanying drawing explanation
Below by the way of clearly understandable, accompanying drawings preferred implementation, above-mentioned characteristic, technical characteristic, advantage and implementation thereof are further described.
Fig. 1 is the structural representation of the first embodiment of message delivery system provided by the invention;
The structural representation of Fig. 2 message delivery system the second embodiment for providing in the present invention;
The structural representation of the Fig. 3 the third embodiment of message delivery system for providing in the present invention;
The structural representation of the Fig. 4 the 4th kind of embodiment of message delivery system for providing in the present invention;
The structural representation of the Fig. 5 the 5th kind of embodiment of message delivery system for providing in the present invention
The Fig. 6 method for message transmission schematic flow sheet for providing in the present invention.
Drawing reference numeral illustrates:
100-message delivery system, 110-client, 120-server end, 121-memory module, 122-the first parameter acquisition module, 123-parameter read module, 124-initialization module, 125-assembly generation module, 111-the second parameter acquisition module, 112-link block.
Detailed description of the invention
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below comparison accompanying drawing is illustrated the specific embodiment of the present invention. 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 premise not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings, and obtain other embodiment.
It is illustrated in figure 1 the structural representation of the first embodiment of message delivery system 100 provided by the invention, as can be seen from the figure, in the present embodiment, this message delivery system 100 includes client 110 and the server end 120 that can intercom mutually, wherein, include a storage at server end 120 and have the memory module 121 of configuration parameter. specifically, when needing to set up communication connection between client 110 and server end 120, first server end 120 reads the configuration parameter of storage in memory module 121, and the configuration parameter initialization server end 120 read, and after server end 120 initializes successfully, build the assembly based on configuration parameter to call for client 110, the configuration parameter that client 110 gets immediately sets up the communication connection between server end 120, and after successful connection obtains connection handle, proper communication just can be carried out between client 110 and server end 120. can be seen that, after the configuration parameter of server end 120 changes, it is no longer necessary to artificial actively go amendment client 110 correspondingly parameter, client 110 has only to call this assembly and obtains the configuration parameter wherein comprised, it is greatly saved manpower and materials, improves efficiency.
Specifically, above-mentioned configuration parameter includes: the URL (URL) of the Internet protocol address (IP address) of server, server end 120 slogan and server end 120.In a specific embodiment, the raw assembly generated based on these three parameter of server end 120 is ajax assembly, call for client 110, so, client 110 is after getting these three parameter, initiate socket connection request based on these three parameter to server end 120 immediately, set up the communication connection at two ends with this. It should be noted that at server end 120, if the configuration parameter being correlated with by configuration file amendment, then need to restart server end 120, realizing the initialization operation of server end 120, afterwards, client 110 initiates socket connection request based on amended configuration parameter again. It can be seen that based on this mode, technical staff only need to revise the configuration parameter in the configuration file of server end 120, it is not necessary to the configuration parameter in amendment client 110, enhance the maintainability of system, decrease error probability.
Above-mentioned embodiment is improved, obtain the second embodiment, as in figure 2 it is shown, in the present embodiment, except the content including the first embodiment, server end 120 also includes: the first parameter acquisition module 122 being connected with memory module 121. When needing the configuration parameter of amendment server end 120, this first parameter acquisition module 122 obtains, based on the amendment of technical staff, the configuration parameter that server end 120 is new, and is stored in memory module 121 by the configuration parameter that this is new. Certainly, if not revising the configuration parameter of server end 120, but client 110 is not communicatively coupled with this server end 120, this first parameter acquisition module 122 can obtain this server end 120 configuration parameter now equally, and is stored in memory module 121 by this configuration parameter.
Above-mentioned the second embodiment is improved, obtain the third embodiment, as shown in Figure 3, in the present embodiment, except including the content of above two embodiment, server end 120 also includes the parameter read module 123 being connected with memory module 121 and the initialization module 124 being connected with parameter read module 123. Specifically, in the course of the work, when needing to set up the connection between client 110 and server end 120, parameter read module 123 reads the configuration parameter prestored from memory module 121, the configuration parameter initialization server end 120 that then initialization module 124 reads based on parameter read module 123.
The third embodiment above-mentioned is improved, obtain the 4th kind of embodiment, as shown in Figure 4, in the present embodiment, except including the content of above two embodiment, server end 120 also includes the assembly generation module 125 being connected respectively with initialization module 124 and memory module 121, and assembly generation module 125 generates the assembly based on configuration parameter based on the initialization result of initialization module 124, and assembly is stored in memory module 121, call for client 110. Specifically, assembly generation module 125 generates ajax (asynchronous JavaScript and XML) service based on the configuration parameter being stored in memory module 121 and calls for client 110, and client 110 by ajax mechanism from after server end 120 obtains configuration parameter, namely sending socket connection request to server end 120 based on this configuration parameter obtained, request communicates to connect.
Above-mentioned 4th kind of embodiment is improved, obtain the 5th kind of embodiment, as shown in Figure 5, in the present embodiment, except including the content of above two embodiment, client 110 includes the second parameter acquisition module 111 and link block 112, wherein, second parameter module is used for from server end 120 securing component, and then the configuration parameter that securing component includes;Link block 112, is connected with the second parameter acquisition module 111, and link block 112 sends connection request to server end 120 based on configuration parameter, to set up the communication connection between client 110 and server end 120. Specifically, linking request here is socket connection request. Before client 110 is initiated to connect to server end 120, corresponding configuration parameter is obtained by ajax mechanism from server end 120 first by the second parameter module, if server end 120 configuration parameter obtains successfully, then utilize this configuration parameter to use link block 112 to initiate socket to client 110 and connect.
Present invention also offers a kind of method for message transmission, as shown in Figure 6, this method for message transmission specifically includes following steps: S1 server end 120 performs initialization operation based on the configuration parameter of self, specifically, this configuration parameter includes: the URL of the Internet protocol address of server, server end 120 slogan and server end 120; Assembly is synchronous communication module; S2 server end 120 builds corresponding assembly based on configuration parameter; The assembly of S3 client 110 invoking server end 120, with the configuration parameter that acquisition wherein comprises; S4 client 110 sends connection request to server end 120 based on configuration parameter, to set up the communication connection with server end 120.
Specifically, in step s 2, server end 120 performs initialization operation based on the configuration parameter of self, specifically includes: server end 120 obtains configuration parameter and stored by configuration parameter; Server end 120 reads the configuration parameter of storage, and based on the configuration parameter initialization server end 120 read.
More particularly, in step s3, server end 120 generates ajax (asynchronous JavaScript and XML) service based on the configuration parameter that storage prestores and calls for client 110, and after client 110 obtains configuration parameter by ajax mechanism from server end 120, namely sending socket connection request to server end 120 based on this configuration parameter obtained, request communicates to connect. After server end 120 receives this socket connection request, accept this socket connection request, set up the communication connection between server end 120 and client 110 with this.
It should be noted that, above-described embodiment all can independent assortment as required. The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (10)
1. a message delivery system, it is characterised in that described message delivery system includes client and server end, described client and the communication connection of described server end;
Described server end includes a storage the memory module of configuration parameter; Described server end reads the configuration parameter of storage in described memory module to carry out initialization operation and builds the assembly based on described configuration parameter for described client call, and described client sets up the communication connection between described server end based on the described configuration parameter comprised in described assembly.
2. message delivery system as claimed in claim 1, it is characterised in that described configuration parameter includes: the URL of the Internet protocol address of server, server end slogan and server end.
3. message delivery system as claimed in claim 1, it is characterized in that, described server end includes: the first parameter acquisition module being connected with described memory module, described first parameter acquisition module obtains the configuration parameter of described server end, and is stored in described memory module by described configuration parameter.
4. message delivery system as claimed in claim 3, it is characterised in that described server end also includes the parameter read module being connected with described memory module and the initialization module being connected with described parameter read module, wherein,
Described parameter read module for reading described configuration parameter from described memory module;
The described configuration parameter that described initialization module reads based on described parameter read module initializes described server end.
5. message delivery system as claimed in claim 4, it is characterized in that, described server end also includes the assembly generation module being connected respectively with described initialization module and described memory module, described assembly generation module generates the assembly based on configuration parameter based on the initialization result of described initialization module, and is stored in described memory module by described assembly.
6. the message delivery system as described in claim 1-5 any one, it is characterised in that described client includes the second parameter acquisition module and link block, wherein,
Described second parameter module is for obtaining described assembly from described server end, and then obtains the configuration parameter that described assembly includes;
Described link block, is connected with described second parameter acquisition module, and described link block sends connection request to described server end based on described configuration parameter, to set up the communication connection between described client and described server end.
7. message delivery system as claimed in claim 6, it is characterised in that described second parameter acquisition module obtains described assembly by the mode of asynchronous communication from described server.
8. a method for message transmission, it is characterised in that described method for message transmission includes:
Server end performs initialization operation based on the configuration parameter of self;
Described server end builds corresponding assembly based on described configuration parameter;
The assembly of server end described in client call, with the configuration parameter that acquisition wherein comprises;
Described client sends connection request to described server end based on described configuration parameter, to set up the communication connection with described server end.
9. method for message transmission as claimed in claim 8, it is characterised in that described configuration parameter includes: the URL of the Internet protocol address of server, server end slogan and server end; Described assembly is synchronous communication module.
10. method for message transmission as claimed in claim 8 or 9, it is characterised in that server end performs initialization operation based on the configuration parameter of self, specifically includes:
Server end obtains described configuration parameter and is stored by described configuration parameter;
Described server end reads the described configuration parameter of storage, and based on the described configuration parameter initialization server end read.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610089440.8A CN105681446A (en) | 2016-02-18 | 2016-02-18 | Message transmission system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610089440.8A CN105681446A (en) | 2016-02-18 | 2016-02-18 | Message transmission system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105681446A true CN105681446A (en) | 2016-06-15 |
Family
ID=56193249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610089440.8A Pending CN105681446A (en) | 2016-02-18 | 2016-02-18 | Message transmission system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105681446A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789377A (en) * | 2017-03-24 | 2017-05-31 | 聚好看科技股份有限公司 | The service parameter update method of network element cluster |
US11201925B2 (en) | 2020-04-28 | 2021-12-14 | Caterpillar Inc. | Communicating parameters based on a change |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011001303A1 (en) * | 2009-06-29 | 2011-01-06 | Nokia Corporation | Method, apparatus and computer program for providing multimedia functions using a software wrapper component |
CN102025722A (en) * | 2010-10-19 | 2011-04-20 | 深圳市拜特科技股份有限公司 | Method for C/S architecture client to safely acquire database server link information |
WO2012092118A2 (en) * | 2010-12-31 | 2012-07-05 | Alibaba Group Holding Limited | Method and web server for implementing web access |
CN102902745A (en) * | 2012-09-17 | 2013-01-30 | 国家基础地理信息中心 | Web service integration method of geographic information |
CN104022894A (en) * | 2014-05-12 | 2014-09-03 | 东软熙康健康科技有限公司 | Method for managing application configuration parameters in concentrated mode and method for configuring application parameters |
CN104615726A (en) * | 2015-02-06 | 2015-05-13 | 北京神舟航天软件技术有限公司 | Method for displaying a large number of business objects based on lazy loading technique |
CN105337947A (en) * | 2014-08-13 | 2016-02-17 | 无锡华润微电子有限公司 | Information diffluence conversion tool, semiconductor production system and communication method thereof |
-
2016
- 2016-02-18 CN CN201610089440.8A patent/CN105681446A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011001303A1 (en) * | 2009-06-29 | 2011-01-06 | Nokia Corporation | Method, apparatus and computer program for providing multimedia functions using a software wrapper component |
CN102473100A (en) * | 2009-06-29 | 2012-05-23 | 诺基亚公司 | Software component wrappers for multimedia subcomponents that control the performance of the multimedia function of the subcomponents |
CN102025722A (en) * | 2010-10-19 | 2011-04-20 | 深圳市拜特科技股份有限公司 | Method for C/S architecture client to safely acquire database server link information |
WO2012092118A2 (en) * | 2010-12-31 | 2012-07-05 | Alibaba Group Holding Limited | Method and web server for implementing web access |
CN102567400A (en) * | 2010-12-31 | 2012-07-11 | 阿里巴巴集团控股有限公司 | Method for realizing Web visit and Web server |
US20130275551A1 (en) * | 2010-12-31 | 2013-10-17 | Alibaba Group Holding Limited | Method and Web Server for Implementing Web Access |
CN102902745A (en) * | 2012-09-17 | 2013-01-30 | 国家基础地理信息中心 | Web service integration method of geographic information |
CN104022894A (en) * | 2014-05-12 | 2014-09-03 | 东软熙康健康科技有限公司 | Method for managing application configuration parameters in concentrated mode and method for configuring application parameters |
CN105337947A (en) * | 2014-08-13 | 2016-02-17 | 无锡华润微电子有限公司 | Information diffluence conversion tool, semiconductor production system and communication method thereof |
CN104615726A (en) * | 2015-02-06 | 2015-05-13 | 北京神舟航天软件技术有限公司 | Method for displaying a large number of business objects based on lazy loading technique |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789377A (en) * | 2017-03-24 | 2017-05-31 | 聚好看科技股份有限公司 | The service parameter update method of network element cluster |
CN106789377B (en) * | 2017-03-24 | 2020-09-29 | 聚好看科技股份有限公司 | Service parameter updating method of network element cluster |
US11201925B2 (en) | 2020-04-28 | 2021-12-14 | Caterpillar Inc. | Communicating parameters based on a change |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105763619B (en) | The method and device that client and server-side are communicated | |
CN101981897B (en) | The method and apparatus communicated in client server system according to standard agreement OPC UA | |
TWI513257B (en) | Graphic sharing method, system and terminal | |
CN102945169A (en) | Native APP fused Web APP development system based on Android | |
CN103179133A (en) | Communication method between client side and server based on entity class | |
CN107741884B (en) | Method and device for realizing message pushing by hierarchical state machine | |
CN104363285A (en) | Network communication program generating method and device | |
CN108683653A (en) | A kind of active message push system based on WebSocket | |
CN114567620A (en) | MQTT protocol-based digital model and physical equipment matching system and method | |
CN105681446A (en) | Message transmission system and method | |
CN1973282A (en) | System and method for managing a change to a cluster configuration | |
CN109450907A (en) | Communication system building method and device based on websocket | |
CN104486330A (en) | Two-way communication system based on remote procedure calls (RPCs) | |
CN103138871B (en) | The server data processing system of application program and method in mobile communcations system | |
CN110166479A (en) | A kind of method that Transmission system promotes UDP transmitting efficiency | |
CN108989157B (en) | Method and device for controlling intelligent equipment | |
CN110417875B (en) | Method, system, equipment and storage medium for docking between cloud servers | |
CN109522469B (en) | Scheduling management method for distributed crawlers | |
CN107517247A (en) | A kind of socket interfaces applied to financial industry turn the system and method for http interfaces | |
CN111756844A (en) | Multi-language message agent method and device | |
CN102629943A (en) | Mobile broadband device and method for processing mobile broadband business thereof | |
CN109302496A (en) | A kind of novel real time information stream exchange method | |
CN101695169B (en) | Remote-end maintaining method of operation support system data as well as system and remote-end account opening proxy | |
CN112188301B (en) | Communication method, apparatus, system, terminal, and computer-readable storage medium | |
CN111614612B (en) | Communication protocol implementation method, device, network management server 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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160615 |
|
WD01 | Invention patent application deemed withdrawn after publication |