CN112152915A - Message forwarding network system and message forwarding method - Google Patents

Message forwarding network system and message forwarding method Download PDF

Info

Publication number
CN112152915A
CN112152915A CN201910576943.1A CN201910576943A CN112152915A CN 112152915 A CN112152915 A CN 112152915A CN 201910576943 A CN201910576943 A CN 201910576943A CN 112152915 A CN112152915 A CN 112152915A
Authority
CN
China
Prior art keywords
sent
gateway
message
data
http request
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
CN201910576943.1A
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.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201910576943.1A priority Critical patent/CN112152915A/en
Publication of CN112152915A publication Critical patent/CN112152915A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/044Network management architectures or arrangements comprising hierarchical management structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention discloses a message forwarding network relationship and a message forwarding method, and relates to the technical field of computers. One embodiment of the system comprises: the first gateway is used for receiving the HTTP request, analyzing the HTTP request and obtaining data to be sent; and the second gateway is used for generating a message to be sent according to the data to be sent and sending the message to be sent to the target terminal. The implementation mode can enable the user to send the message to the target terminal under the environment of various programming languages, breaks through the limit of official languages, and the user does not need to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.

Description

Message forwarding network system and message forwarding method
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a message forwarding network system and a message forwarding method.
Background
At present, with the development of big data technology, a data volume burst scene appears, and because such requirements often exceed the capability of the traditional data processing technology, the existing technology cannot well meet the requirements of real-time processing and analysis of massive and high-speed data, and a distributed stream technology, such as a distributed stream processing platform Kafka, arises. The goal of the platform is to provide a uniform, high throughput, low latency platform for processing real-time data. The existing common message processing mode generally uses a native Kafka producer client to send messages to topics specified by a version-compatible Kafka server cluster, and the messages in each Topic are divided into several partitions (partitions) to improve the processing efficiency of the messages. Wherein, Topic is a specific type of message flow used to classify the messages, and each piece of information entering into the Kafka server cluster is stored under one Topic. Specifically, as shown in fig. 1, when a user produces a message using a native Kafka client, the Kafka client directly relied on by the user, and the Kafka client used by the user must be compatible with the Kafka server cluster version.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
(1) kafka clients need to be compatible with Kafka server cluster versions. With increasing demand and increasing performance and security requirements, Kafka must be continuously updated. When the Kafka server cluster version is updated, all users' Kafka clients need to be updated to compatible versions as the Kafka server cluster version is updated.
(2) The user produces messages directly relying on the Kafka client, and the official provides support in only a few languages, and cannot directly use the Kafka to produce messages in some programming languages, such as the Shell development environment.
(3) The native Kafka client does not provide a monitoring function, and when the Kafka server cluster is abnormal, early warning cannot be timely performed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a message forwarding network system and a message forwarding method, which enable a user to send a message to a target terminal in multiple programming languages, thereby breaking through the restriction of an official language and enabling the user not to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a message forwarding gateway system including:
the first gateway is used for receiving a hypertext transfer protocol (HTTP) request, analyzing the HTTP request and acquiring data to be sent;
and the second gateway is used for receiving the data to be sent from the first gateway, generating a message to be sent according to the data to be sent and sending the message to be sent to the target terminal.
Optionally, the first gateway is further configured to: analyzing the HTTP request, and determining the time for initiating the HTTP request; determining whether the HTTP request is expired according to the time for initiating the HTTP request and the current time; and if so, discarding the HTTP request.
Optionally, the first gateway is further configured to: analyzing the HTTP request, and determining the identity information of the user who initiates the HTTP request; and determining the authority of the user initiating the HTTP request according to the identity information.
Optionally, the first gateway is further configured to: setting a time window request threshold; when receiving an HTTP request, counting the times of initiating the HTTP request by a user initiating the HTTP request in a time window, and if the times are greater than a time window request threshold value, discarding the HTTP request.
Optionally, the first gateway is further configured to: setting a black list and a white list; determining whether a user initiating the HTTP request is in the blacklist or the whitelist according to the identity information; if the user initiating the HTTP request is in the blacklist, discarding the HTTP request; and if the user initiating the HTTP request is in the white list, analyzing the HTTP request.
Optionally, the system further includes a monitoring module, configured to obtain a monitoring index, determine whether a message sending state in the current stage is normal according to the monitoring index, and output alarm information if the message sending state is not normal.
Optionally, the second gateway is further configured to: determining whether the message to be sent is successfully sent; and if not, retransmitting the message to be transmitted according to a retransmission mechanism.
Optionally, the retransmitting, by the second gateway, the message to be sent according to a retransmission mechanism includes: determining whether the total number of times of sending the message to be sent reaches a sending threshold value; if yes, writing the message to be sent into an offline log; and sending the message to be sent in the offline log at regular time through the timing task until the message to be sent is successfully sent.
Optionally, the first gateway includes a plurality of first servers, the plurality of first servers share a first domain name, and the plurality of first servers receive the request to be sent in turn;
the second gateway comprises a plurality of second servers, the second servers share a second domain name, and the second servers receive the message to be sent in turn.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a message forwarding method, where a gateway for message forwarding includes a first gateway and a second gateway, the message forwarding method includes: the first gateway receives a hypertext transfer protocol (HTTP) request, analyzes the HTTP request and obtains data to be sent; and the second gateway receives the data to be sent from the first gateway, generates a message to be sent according to the data to be sent, and sends the message to be sent to a target terminal.
Optionally, the method further comprises: and acquiring a monitoring index, determining whether the message sending state at the current stage is normal or not according to the monitoring index, and outputting alarm information if the message sending state at the current stage is not normal.
Optionally, sending the message to be sent to a target terminal includes: determining whether the message to be sent is successfully sent; and if not, retransmitting the message to be transmitted according to a retransmission mechanism.
Optionally, the retransmitting the message to be sent according to a retransmission mechanism includes: determining whether the total number of times of sending the message to be sent reaches a sending threshold value; if yes, writing the message to be sent into an offline log; and sending the message to be sent in the offline log at regular time through the timing task until the message to be sent is successfully sent.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a message forwarding method, including: receiving a hypertext transfer protocol (HTTP) request; and analyzing the HTTP request to obtain data to be sent, wherein the data to be sent is used for being sent to a second gateway, so that the second gateway generates a message to be sent according to the data to be sent, and the message to be sent is used for being sent to a target terminal.
Optionally, the method further comprises: analyzing the HTTP request, and determining the time for initiating the HTTP request; determining whether the HTTP request is expired according to the time for initiating the HTTP request and the current time; and if so, discarding the HTTP request.
Optionally, the method further comprises: analyzing the HTTP request, and determining the identity information of the user who initiates the HTTP request; and determining the authority of the user initiating the HTTP request according to the identity information.
Optionally, the method further comprises: setting a time window request threshold; when receiving an HTTP request, counting the times of initiating the HTTP request by a user initiating the HTTP request in a time window, and if the times are greater than a time window request threshold value, discarding the HTTP request.
Optionally, the method further comprises: setting a black list and a white list; determining whether a user initiating the HTTP request is in the blacklist or the whitelist according to the identity information; if the user initiating the HTTP request is in the blacklist, discarding the HTTP request; and if the user initiating the HTTP request is in the white list, analyzing the HTTP request.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a message forwarding method, including: receiving data to be sent from a first gateway, wherein the data to be sent is obtained by analyzing a received hypertext transfer protocol (HTTP) request; and generating a message to be sent according to the data to be sent, and sending the message to be sent to a target terminal.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the message forwarding method of the embodiment of the present invention.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program implementing the message forwarding method of the embodiments of the present invention when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: because the first gateway analyzes the HTTP request from the user to obtain the data to be sent, and then sends the data to be sent to the second gateway, and the second gateway generates the message to be sent according to the data to be sent and sends the message to be sent to the target terminal, the user can send the message to the target terminal under the environment of various programming languages, the restriction of official languages is broken through, and the user does not need to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a user producing a message using a native Kafka client;
fig. 2 is a schematic structural diagram of a message forwarding gateway system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a message forwarding gateway system according to another embodiment of the present invention;
fig. 4 is a schematic flow chart of sending a message to a target terminal by a second gateway in the embodiment of the present invention;
fig. 5 is a schematic diagram of a main flow of a message forwarding method according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 2 is a schematic structural diagram of a message forwarding gateway system 200 according to an embodiment of the present invention, and as shown in fig. 2, the system 200 includes:
the first gateway 210 is configured to receive a hypertext transfer protocol HTTP request, analyze the HTTP request, and obtain data to be sent;
the second gateway 220 is configured to receive data to be sent from the first gateway, generate a message to be sent according to the data to be sent, and send the message to be sent to a target terminal.
The hypertext Transfer protocol http (hypertext Transfer protocol) is the most widely used network protocol on the internet, and is used as a Transfer protocol for transferring hypertext from a web server to a local browser. The HTTP protocol works on a client-server architecture.
In this embodiment, the HTTP request is initiated by the user, and the request to be sent includes content to be sent by the user, that is, data to be sent. The user can write the request to be sent by using any programming language supporting the HTTP, so that the user can send a message to a target terminal (such as a Kafka server cluster) under the environment of more programming languages, the limitation of the official language of the target terminal is avoided, and the convenience and the practicability are improved.
After receiving the HTTP request, the first gateway 210 parses the request to be sent, obtains data to be sent, and sends the data to be sent to the second gateway 220. Then, the second gateway 220 generates a message to be sent according to the data to be sent, and sends the message to be sent to the target terminal.
In this embodiment, a Kafka client is deployed in the second gateway 220, and serves as a message sending module of the second gateway 220. The second gateway 220 invokes an interface supported by the Kafka client to generate a message to be sent from data to be sent, and then asynchronously sends the message to be sent to Topic specified by the Kafka server cluster through the interface.
As a specific example, the first gateway and the second gateway in this embodiment may both be composed of servers (e.g., a Nginx server and a Tomcat server) supporting an HTTP protocol, and the number of the servers may be flexibly set according to an application scenario, which is not limited herein.
As a preferred embodiment, the first gateway 210 includes a plurality of first servers, the plurality of first servers share a first domain name, each first server has an IP address, so the first domain name includes a plurality of IP addresses, when a user initiates a request to the first gateway, the plurality of first servers receive the request to be sent in turn, so that the request to be sent is received uniformly; similarly, the second gateway 220 includes a plurality of second servers, the plurality of second servers share the second domain name, and the plurality of second servers receive the message to be sent in turn.
Therefore, the layered architecture formed by the first gateway and the second gateway in the embodiment of the invention enables the data processing to be more flexible, and has stronger maintainability and expandability. With the increasing of the data volume, the linear increase of the capability of processing the message can be realized only by appropriately increasing the server resources of the first gateway and the second gateway.
According to the message forwarding gateway system provided by the embodiment of the invention, the HTTP request from a user is received through the first gateway, the HTTP request is analyzed to obtain data to be sent, then the data to be sent is sent to the second gateway, the second gateway generates the message to be sent according to the data to be sent and sends the message to be sent to the target terminal, so that the user can send the message to the target terminal under the environment of multiple programming languages, the limitation of official languages is broken through, and the user does not need to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.
In an alternative embodiment, the first gateway 210 is further configured to check whether the HTTP request is expired and to check the right. Specifically, the first gateway 210 determines, by parsing the HTTP request, a time when the HTTP request is initiated, that is, obtains a timestamp, where the timestamp is a time when the user initiates the request, and the first gateway 210 compares the timestamp with a current time, and determines whether the HTTP request is expired according to a time difference.
In an alternative embodiment, the first gateway 210 may further obtain identity information of the user, such as an identifier (client id) and a token (token), by parsing the HTTP request, and determine the authority of the user according to the identity information of the user.
The first gateway 210 is further configured to limit a current, where the current limit refers to limiting a requested amount of a user in a unit time, and specifically includes: setting a time window request threshold; when receiving an HTTP request, counting the times of initiating the HTTP request by a user initiating the HTTP request in a time window, and if the times are greater than a time window request threshold value, discarding the HTTP request. The time window request threshold value can be flexibly set according to actual conditions, for example, 1000 times per minute. If a user requests 1100 times in a minute, the gateway processes only the first 1000 requests in a minute and discards the remaining 100 requests.
In other alternative embodiments, the first gateway 210 is further configured to: setting a black list and a white list; determining whether a user initiating the HTTP request is in the blacklist or the whitelist according to the identity information; if the user initiating the HTTP request is in the blacklist, discarding the HTTP request; and if the user initiating the HTTP request is in the white list, analyzing the HTTP request.
The embodiment may implement restriction on the visitor of the first gateway through the blacklist, for example, the first gateway encounters a malicious large-scale request, finds the IP address of the requester through the access log, then puts the IP address in the blacklist, and then discards the request sent by the IP address to avoid that the first gateway is in a busy state or even a paralyzed state. Similarly, the white list serves to restrict visitors to the white list.
In an optional embodiment, as shown in fig. 3, the message forwarding gateway system 300 further includes a monitoring module 330, configured to obtain a monitoring index, determine whether a message sending state in the current stage is normal according to the monitoring index, and if not, output alarm information. The monitoring module 330 is used for monitoring the sending process of the message, and can alarm in time when an abnormality occurs, thereby ensuring the stability of message sending.
In a preferred embodiment, the monitoring module 300 as shown in FIG. 3 includes: a first monitoring module 331, a second monitoring module 332, and a third monitoring module 333.
The first monitoring module 331 is configured to monitor the first gateway 310, and record information of the HTTP request, such as an IP address of the user, an access time, and a response status of the first gateway to the HTTP request, so as to generate a first monitoring log. The first monitoring module 331 may obtain a monitoring index, such as the number of calls of the server in a unit time, the average response time, and the like, through the first monitoring log. When the monitoring index is out of the threshold value, the first gateway can determine that the message sending state at the current stage is abnormal, and alarm information can be sent out in the forms of short messages, mails and the like so as to assist in maintaining the system in time.
The second monitoring module 332 is configured to monitor the second gateway 320 and generate a second monitoring log. The second monitoring module 332 may obtain the monitoring index through the second monitoring log, and further may determine whether the message sending status at the current stage is normal.
The third monitoring module 333 is configured to monitor the second gateway 320, and is configured to analyze the monitoring data in the specified format and visually display various items of monitoring data. When sending a message to the Kafka server cluster, the message sending module of the second gateway generates monitoring data, such as the size of the sent message, the number of times the user sent the message, and the like, and the monitoring data is submitted to the third monitoring module 333 after being parsed by the program in a specified format.
In this embodiment, monitor first gateway and second gateway respectively through independent monitoring module, can fix a position abnormal state when receiving alarm information fast, convenient maintenance.
In an alternative embodiment, the second gateway 320 is further configured to:
determining whether the message to be sent is successfully sent;
and if not, retransmitting the message to be transmitted according to a retransmission mechanism.
Specifically, as shown in fig. 4, the retransmitting, by the second gateway 320, the message to be sent according to the retransmission mechanism includes:
determining whether the total number of times of sending the message to be sent reaches a sending threshold value;
if yes, writing the message to be sent into an offline log;
and sending the message to be sent in the offline log at regular time through the timing task until the message to be sent is successfully sent.
The embodiment of the invention can ensure that the message which fails to be sent is finally sent to the target terminal through the retransmission mechanism, and can ensure that the message which fails to be sent can not block the sending of other messages through setting the sending threshold value, thereby ensuring the efficiency of message sending.
Fig. 5 is a schematic diagram of a main flow of a message forwarding method according to an embodiment of the present invention; as shown in fig. 5, the method includes:
step S501: a first gateway receives a hypertext transfer protocol (HTTP) request;
step S502: the first gateway analyzes the HTTP request to obtain data to be sent;
step S503: and the second gateway receives the data to be sent from the first gateway, generates a message to be sent according to the data to be sent, and sends the message to be sent to a target terminal.
Optionally, the method further comprises: and acquiring a monitoring index, determining whether the message sending state at the current stage is normal or not according to the monitoring index, and outputting alarm information if the message sending state at the current stage is not normal.
Optionally, sending the message to be sent to a target terminal includes: determining whether the message to be sent is successfully sent; and if not, retransmitting the message to be transmitted according to a retransmission mechanism.
Optionally, the retransmitting the message to be sent according to a retransmission mechanism includes: determining whether the total number of times of sending the message to be sent reaches a sending threshold value; if yes, writing the message to be sent into an offline log; and sending the message to be sent in the offline log at regular time through the timing task until the message to be sent is successfully sent.
According to the message forwarding method, the first gateway receives the HTTP request from the user, analyzes the HTTP request, obtains the data to be sent, and sends the data to be sent to the second gateway, the second gateway generates the message to be sent according to the data to be sent and sends the message to be sent to the target terminal, so that the user can send the message to the target terminal under the environment of various programming languages, the limitation of official languages is broken through, and the user does not need to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.
In an optional embodiment, the present invention further provides a message forwarding method, where the method may be applied to a first gateway of a message forwarding system, and the method includes: receiving a hypertext transfer protocol (HTTP) request; and analyzing the HTTP request to obtain data to be sent, wherein the data to be sent is used for being sent to a second gateway, so that the second gateway generates a message to be sent according to the data to be sent, and the message to be sent is used for being sent to a target terminal.
Optionally, the method further comprises: analyzing the HTTP request, and determining the time for initiating the HTTP request; determining whether the HTTP request is expired according to the time for initiating the HTTP request and the current time; and if so, discarding the HTTP request.
Optionally, the method further comprises: analyzing the HTTP request, and determining the identity information of the user who initiates the HTTP request; and determining the authority of the user initiating the HTTP request according to the identity information.
Optionally, the method further comprises: setting a time window request threshold; when receiving an HTTP request, counting the times of initiating the HTTP request by a user initiating the HTTP request in a time window, and if the times are greater than a time window request threshold value, discarding the HTTP request.
Optionally, the method further comprises: setting a black list and a white list; determining whether a user initiating the HTTP request is in the blacklist or the whitelist according to the identity information; if the user initiating the HTTP request is in the blacklist, discarding the HTTP request; and if the user initiating the HTTP request is in the white list, analyzing the HTTP request.
In an optional embodiment, the present invention further provides a message forwarding method, where the method may be applied to a second gateway of a message forwarding system, and the method includes: receiving data to be sent from a first gateway, wherein the data to be sent is obtained by analyzing a received hypertext transfer protocol (HTTP) request; and generating a message to be sent according to the data to be sent, and sending the message to be sent to a target terminal.
Fig. 6 illustrates an exemplary system architecture 600 in which the message forwarding method or message forwarding gateway system of embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the message forwarding method provided by the embodiment of the present invention is generally executed by the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases constitute a limitation on the unit itself, and for example, the sending module may also be described as a "module that sends a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
the first gateway receives a hypertext transfer protocol (HTTP) request, analyzes the request to be sent and obtains data to be sent;
and the second gateway receives the data to be sent from the first gateway, generates a message to be sent according to the data to be sent, and sends the message to be sent to a target terminal.
According to the technical scheme of the embodiment of the invention, a first gateway receives a request to be sent from a user in an HTTP protocol, analyzes the request to be sent to obtain data to be sent, and then sends the data to be sent to a second gateway, the second gateway generates a message to be sent according to the data to be sent and sends the message to be sent to a target terminal, so that the user can send the message to the target terminal in a plurality of programming language environments, the limitation of official languages is broken through, and the user does not need to care about the problem of version compatibility; and the first gateway and the second gateway are respectively responsible for different parts of the message forwarding gateway system, so that a layered architecture is formed, the purpose of decoupling the layered service of the system is achieved, the data processing is more flexible, the maintainability and the expandability are stronger, and the maintenance cost is reduced.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A message forwarding gateway system, the system comprising:
the first gateway is used for receiving a hypertext transfer protocol (HTTP) request, analyzing the HTTP request and acquiring data to be sent;
and the second gateway is used for receiving the data to be sent from the first gateway, generating a message to be sent according to the data to be sent and sending the message to be sent to the target terminal.
2. The system of claim 1, wherein the first gateway is further configured to:
analyzing the HTTP request, and determining the time for initiating the HTTP request;
determining whether the HTTP request is expired according to the time for initiating the HTTP request and the current time;
and if so, discarding the HTTP request.
3. The system of claim 1, wherein the first gateway is further configured to:
analyzing the HTTP request, and determining the identity information of the user who initiates the HTTP request;
and determining the authority of the user initiating the HTTP request according to the identity information.
4. The system of claim 1, further comprising a monitoring module, configured to obtain a monitoring index, determine whether a message sending status in the current stage is normal according to the monitoring index, and if not, output alarm information.
5. The system of claim 1, wherein the first gateway comprises a plurality of first servers, the plurality of first servers sharing a first domain name, the plurality of first servers receiving the request to be sent in turn;
the second gateway comprises a plurality of second servers, the second servers share a second domain name, and the second servers receive the message to be sent in turn.
6. A message forwarding method is characterized in that a gateway for message forwarding comprises a first gateway and a second gateway, and the message forwarding method comprises the following steps;
the first gateway receives a hypertext transfer protocol (HTTP) request, analyzes the request to be sent and obtains data to be sent;
and the second gateway receives the data to be sent from the first gateway, generates a message to be sent according to the data to be sent, and sends the message to be sent to a target terminal.
7. A message forwarding method, comprising:
receiving a hypertext transfer protocol (HTTP) request;
and analyzing the HTTP request to obtain data to be sent, wherein the data to be sent is used for being sent to a second gateway, so that the second gateway generates a message to be sent according to the data to be sent, and the message to be sent is used for being sent to a target terminal.
8. A message forwarding method, comprising:
receiving data to be sent from a first gateway, wherein the data to be sent is obtained by analyzing a received hypertext transfer protocol (HTTP) request;
and generating a message to be sent according to the data to be sent, and sending the message to be sent to a target terminal.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of claim 6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of claim 6.
CN201910576943.1A 2019-06-28 2019-06-28 Message forwarding network system and message forwarding method Pending CN112152915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910576943.1A CN112152915A (en) 2019-06-28 2019-06-28 Message forwarding network system and message forwarding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910576943.1A CN112152915A (en) 2019-06-28 2019-06-28 Message forwarding network system and message forwarding method

Publications (1)

Publication Number Publication Date
CN112152915A true CN112152915A (en) 2020-12-29

Family

ID=73869546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910576943.1A Pending CN112152915A (en) 2019-06-28 2019-06-28 Message forwarding network system and message forwarding method

Country Status (1)

Country Link
CN (1) CN112152915A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055437A (en) * 2023-04-03 2023-05-02 四川汉科计算机信息技术有限公司 Message forwarding method, device, computer and medium for local multi-object

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100218248A1 (en) * 2009-02-26 2010-08-26 Microsoft Corporation Redirection of secure data connection requests
CN103001860A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Achieving system for converged communication Web instant messages
CN104767742A (en) * 2015-03-25 2015-07-08 中兴通讯股份有限公司 Safe communication method, gateway, network side server and system
CN106330869A (en) * 2016-08-15 2017-01-11 江苏敏捷科技股份有限公司 Data security protection system and method based on cloud application
CN106997298A (en) * 2016-01-22 2017-08-01 阿里巴巴集团控股有限公司 A kind of application resource acquisition methods and device
CN108200158A (en) * 2017-12-29 2018-06-22 广东欧珀移动通信有限公司 Ask Transmission system, method, apparatus and storage medium
CN109639782A (en) * 2018-11-30 2019-04-16 中体彩科技发展有限公司 Message sends platform, method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100218248A1 (en) * 2009-02-26 2010-08-26 Microsoft Corporation Redirection of secure data connection requests
CN103001860A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Achieving system for converged communication Web instant messages
CN104767742A (en) * 2015-03-25 2015-07-08 中兴通讯股份有限公司 Safe communication method, gateway, network side server and system
CN106997298A (en) * 2016-01-22 2017-08-01 阿里巴巴集团控股有限公司 A kind of application resource acquisition methods and device
CN106330869A (en) * 2016-08-15 2017-01-11 江苏敏捷科技股份有限公司 Data security protection system and method based on cloud application
CN108200158A (en) * 2017-12-29 2018-06-22 广东欧珀移动通信有限公司 Ask Transmission system, method, apparatus and storage medium
CN109639782A (en) * 2018-11-30 2019-04-16 中体彩科技发展有限公司 Message sends platform, method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈建华;何彬彬;崔莹;: "一种安全隧道网关的设计与实现", 微电子学与计算机, no. 04, 5 April 2011 (2011-04-05) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055437A (en) * 2023-04-03 2023-05-02 四川汉科计算机信息技术有限公司 Message forwarding method, device, computer and medium for local multi-object

Similar Documents

Publication Publication Date Title
CN111124819B (en) Method and device for full link monitoring
US8266630B2 (en) High-performance XML processing in a common event infrastructure
US9674127B2 (en) Selective message republishing to subscriber subsets in a publish-subscribe model
US9736088B1 (en) Structured communication framework
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN106789413B (en) Method and device for detecting proxy internet surfing
CN113438256B (en) Data transmission method, system and proxy server based on double-layer SSL
US20180343216A1 (en) Context driven modification of attachments in a messaging session
CN112152915A (en) Message forwarding network system and message forwarding method
CN111427899A (en) Method, device, equipment and computer readable medium for storing file
CN112994934B (en) Data interaction method, device and system
US20150134747A1 (en) Managing a messaging queue in an asynchronous messaging system
CN114064803A (en) Data synchronization method and device
CN110019671B (en) Method and system for processing real-time message
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
CN111917835A (en) System, method and device for monitoring network data
CN108471375B (en) Message processing method, device and terminal
CN113347052A (en) Method and device for counting user access data through access log
CN112799903A (en) Method and device for evaluating health state of business system
CN111949472A (en) Method and device for recording application logs
CN113766437B (en) Short message sending method and device
CN114064314A (en) Service message processing method, system, electronic device and computer readable medium
CN113132480B (en) Data transmission method, device and system
CN109889590B (en) Message processing method, device, client and computer readable medium
CN109218270B (en) Method and device for processing hijacked request

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