CN114095561A - Message processing system and method, device and storage medium - Google Patents

Message processing system and method, device and storage medium Download PDF

Info

Publication number
CN114095561A
CN114095561A CN202210068462.1A CN202210068462A CN114095561A CN 114095561 A CN114095561 A CN 114095561A CN 202210068462 A CN202210068462 A CN 202210068462A CN 114095561 A CN114095561 A CN 114095561A
Authority
CN
China
Prior art keywords
gateway
message channel
message
virtualization
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210068462.1A
Other languages
Chinese (zh)
Other versions
CN114095561B (en
Inventor
张松然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210068462.1A priority Critical patent/CN114095561B/en
Publication of CN114095561A publication Critical patent/CN114095561A/en
Application granted granted Critical
Publication of CN114095561B publication Critical patent/CN114095561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/18Service support devices; Network management devices
    • H04W88/184Messaging devices, e.g. message centre

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a message processing system, a message processing method, message processing equipment and a storage medium. In this embodiment of the present application, when a certain message channel interfaces a certain gateway packet, a binding relationship may be dynamically established between the certain message channel and a gateway device in the gateway packet that interfaces the certain message channel, when the binding relationship changes, routing information of the message channel is synchronized to a message service device, the message service device provides target information to the message channel via a target gateway device based on the routing information, and the message channel sends the target message to a target terminal. In the whole process, the routing information can be updated in time along with the change of the binding relationship, the routing information based on the dynamic update can be directly addressed to the gateway equipment, and under the condition that the number of connections supported by the message channel is less than the number of the gateway equipment in the gateway grouping, disconnection and reconnection operations of the message channel among different gateway equipment are not needed, so that the message sending delay can be greatly reduced.

Description

Message processing system and method, device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a message processing system, a message processing method, a message processing device, and a storage medium.
Background
In practical applications, some application systems often send reminding messages, promotion activities and other information to users in short messages. In order to meet the differentiated short message service requirements of large and complex application systems, the application systems are allowed to provide or customize special short message service platforms, the short message service platforms are in butt joint with short message channels provided by operators or agents through short message gateways, the operators and the agents are commonly called as suppliers of the short message channels, and then short messages are sent to the outside through the short message channels of the suppliers.
In the prior art, a short message gateway adopts a cluster deployment mode, the gateway cluster comprises a plurality of gateway servers, a plurality of gateway groups can be obtained by grouping the gateway servers, and each gateway group comprises N gateway servers. In actual use, each short message channel of each provider is connected with one gateway group in a butt joint mode, and in addition, considering that TCP long connection needs to be established between the short message channel and the gateway server, the short message channel is required to support the number of connections which is not less than the number N of the gateway servers in the gateway groups, so that each gateway server in the gateway groups can be ensured to be connected with the short message channel in a TCP long mode, and the connection non-differentiation is realized. That is, from the perspective of the short message service platform, the short message can be sent to the short message channel through any gateway server in the gateway group, so as to improve the short message sending efficiency.
However, with the development of applications, more and more application systems need short message gateways to be able to access short message channels whose number of connections is less than N of gateway servers in a gateway packet, and if the number of connections supported by the short message channels is not less than N, waste of connection resources is caused. For the requirement, the access mode of the existing short message gateway is obviously not suitable any more, because when the short message service platform schedules each gateway server indiscriminately, if the gateway server is currently scheduled and is not connected with the short message channel, the short message channel needs to be switched from the established gateway server to the currently scheduled gateway server, so that the communication channel needs to be established and disconnected among different gateway servers, and further, the short message sending delay and the resource waste are caused.
Disclosure of Invention
Aspects of the present application provide a message processing system, method, device and storage medium to save connection resources and reduce message transmission delay.
An embodiment of the present application provides a message processing system, including: the gateway cluster comprises at least one gateway group, and each gateway group is used for being in butt joint with at least one message channel; the management and control device is used for dynamically establishing a binding relationship between the first message channel and the gateway device in the first gateway group under the condition that the first message channel is in butt joint with the first gateway group, determining that the first message channel and the gateway device which is currently in the binding relationship successfully establish long connection under the condition that the binding relationship is changed, and synchronizing routing information corresponding to the first message channel to the message service device, wherein the routing information comprises address information of the gateway device which is currently in the long connection with the first message channel, and the first gateway group is any gateway group; the message service equipment is used for carrying out routing addressing on the gateway equipment corresponding to the long connection according to the routing information and the first address list to obtain the address information of the target gateway equipment, and sending the target message to the first message channel through the target gateway equipment according to the address information of the target gateway equipment so as to send the target message to the target terminal through the first message channel; the first address list stores address information of each gateway device in the first gateway group.
An embodiment of the present application further provides a message processing method, including: under the condition that a first message channel is in butt joint with a first gateway group in a gateway cluster, dynamically establishing a binding relationship between the first message channel and gateway equipment in the first gateway group; the first gateway packet is any gateway packet in the gateway cluster; under the condition that the binding relationship is changed, determining that the first message channel and the gateway equipment which is currently in the binding relationship successfully establish long connection; and synchronizing the routing information corresponding to the first message channel to the message service equipment, wherein the routing information comprises address information of the gateway equipment which establishes long connection with the first message channel at present, so that the message service equipment can address the target gateway equipment from the gateway equipment which establishes long connection with the first message channel at present and send the target message to the first message channel through the target gateway equipment.
An embodiment of the present application further provides a message processing method, including: acquiring routing information corresponding to a first message channel sent by a control device, wherein the first message channel is in butt joint with a first gateway group, the routing information comprises address information of gateway devices which establish long connection with the first message channel currently in the first gateway group, and the routing information changes along with the dynamic change of the binding relationship between the first message channel and the gateway devices in the first gateway group; according to the routing information and a first address list maintained in advance, routing addressing is carried out on gateway equipment corresponding to the long connection, address information of target gateway equipment is obtained, according to the address information of the target gateway equipment, a target message is sent to a first message channel through the target gateway equipment, the target message is sent to a target terminal through the first message channel, and the address information of each gateway equipment in a first gateway group is stored in the first address list.
An embodiment of the present application further provides a message processing device, including: a memory and a processor; a memory for storing a computer program; and the processor is coupled with the memory and used for executing the computer program so as to realize the steps in the message processing method provided by the embodiment of the application.
An embodiment of the present application further provides a message processing device, including: a memory and a processor; a memory for storing a computer program; and the processor is coupled with the memory and used for executing the computer program so as to realize the steps in the message processing method provided by the embodiment of the application.
Embodiments of the present application further provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the message processing method provided by the embodiments of the present application.
Embodiments of the present application further provide a computer program product, which includes a computer program/instruction, and when the computer program/instruction is executed by a processor, the processor is caused to implement the steps in the message processing method provided by the embodiments of the present application.
In this embodiment of the present application, for any message channel, in a case where the message channel is docked with a certain gateway packet, a binding relationship may be dynamically established between the message channel and a gateway device in the docked gateway packet, in a case where the binding relationship of the message channel changes, routing information of the message channel is synchronized to a message service device, the message service device provides target information to the message channel via a target gateway device based on the routing information, and the message channel sends the target message to a target terminal. In the whole process, the binding relationship can be dynamically changed, connection can be established between the message channel and the gateway equipment as required, connection resources are saved, the problem of connection resource waste under the condition that the number of connections supported by the message channel is greater than the number of gateway equipment in the gateway grouping is solved, the routing information can be updated in time along with the change of the binding relationship, the message service equipment can be directly addressed to the gateway equipment based on the dynamically updated routing information, and disconnection and reconnection operations of the message channel among different gateway equipment are not needed under the condition that the number of connections supported by the message channel is less than the number of gateway equipment in the gateway grouping, so that message sending delay can be greatly reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic structural diagram of a message processing system according to an exemplary embodiment of the present application;
FIG. 2 is a block diagram of another message processing system according to an exemplary embodiment of the present application;
FIG. 3 is a schematic structural diagram of another message processing system provided in an exemplary embodiment of the present application;
FIG. 4 is a schematic structural diagram of another message processing system provided in an exemplary embodiment of the present application;
fig. 5 is a flowchart illustrating a message processing method according to an exemplary embodiment of the present application;
fig. 6 is a flowchart illustrating another message processing method according to an exemplary embodiment of the present application;
fig. 7a is a schematic structural diagram of a message processing apparatus according to an exemplary embodiment of the present application;
fig. 7b is a schematic structural diagram of a message processing device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the present application, for any message channel, in the case that the message channel is connected to a gateway packet, a binding relationship may be dynamically established between the message channel and a gateway device in the gateway packet connected to the message channel, and in the case that the binding relationship of the message channel changes, the message service device synchronizes routing information of the message channel to the message service device, and based on the routing information, the message service device provides target information to the message channel through a target gateway device, and the message channel sends the target message to a target terminal. In the whole process, the binding relationship can be dynamically changed, connection can be established between the message channel and the gateway equipment as required, connection resources are saved, the problem of connection resource waste under the condition that the number of connections supported by the message channel is greater than the number of gateway equipment in the gateway grouping is solved, the routing information can be updated in time along with the change of the binding relationship, the message service equipment can be directly addressed to the gateway equipment based on the dynamically updated routing information, and disconnection and reconnection operations of the message channel among different gateway equipment are not needed under the condition that the number of connections supported by the message channel is less than the number of gateway equipment in the gateway grouping, so that message sending delay can be greatly reduced.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a message processing system according to an exemplary embodiment of the present application. As shown in fig. 1, the system includes: a policing device 101 (also referred to as a policing center), a gateway cluster 102, and a message service device 103 (also referred to as a message service platform). Optionally, the scheduling between the gateway cluster 102 and the message service device 103 is performed through a Remote Procedure Call (RPC) framework, as shown in fig. 1. The address registration center of the RPC frame returns an RPC server address list registered by the gateway equipment in the gateway cluster to the message service equipment, so that the message service equipment can establish connection with the gateway equipment based on the RPC server address list and send various messages outwards through the gateway equipment. In this embodiment, the gateway devices in the gateway cluster establish a binding relationship with message channels provided by a provider, and different message channels may be responsible for transmitting messages of different types or different applications. The message service equipment sends the message to be sent to the corresponding message channel through the gateway equipment, and the message channel finally sends the message to the target terminal. The binding relationship between the message channel of the provider and the gateway device can be dynamically changed as required, and when the binding relationship is dynamically changed, the routing information of the message service device addressing the gateway device can be instantly changed.
In this embodiment, the gateway cluster includes at least one gateway packet, and in fig. 1, an example in which the gateway cluster includes one network management packet (e.g., a first gateway packet) is illustrated, but the invention is not limited thereto. Each gateway group includes at least one gateway device, and optionally, the gateway device may be implemented in any device form having a gateway function, such as a physical server, a cloud server, a virtual machine, or a container. Each gateway packet interfaces with at least one message channel 104, each message channel interfaces with one gateway packet, i.e., each message channel establishes a long connection (e.g., a TCP connection) with a gateway device in one gateway packet, each message channel can establish a long connection with one or more gateway devices in the gateway packet in the same gateway packet, and this relationship can change dynamically. The message channel is a transmission channel that is formed by a message processing server, a gateway device, a base station, and a message transmission link among these devices, which are provided by an operator or an agent, and can transmit a message to a user terminal. The message service equipment is responsible for being connected with each application system, receiving messages generated by each application system, providing the messages to corresponding message channels through gateway equipment in gateway grouping, and sending the messages to corresponding terminal equipment through the message channels. According to different application systems, the message of this embodiment may include but is not limited to: text messages, voice messages, rich text messages, and the like.
In this embodiment, the management and control device is configured to schedule and allocate gateway devices in the gateway cluster to implement connection with the message channel. For convenience of description and distinction, any one gateway packet in the gateway cluster is referred to as a first gateway packet, a message channel that needs to be interfaced with the first gateway packet is referred to as a first message channel, and in a case that the first message channel interfaces the first gateway packet, a binding relationship may be dynamically established between the first message channel and a gateway device in the first gateway packet as needed, where the binding relationship indicates that the first message channel may establish a long connection with the gateway device in the first gateway packet, and the binding relationship between the first message channel and the gateway device in the first gateway packet may be dynamically changed as needed, for example, the binding relationship may be established as needed or may be released as needed. The management and control device may determine whether the first message channel and the gateway device currently establishing a binding relationship therewith successfully establish the long connection or not when the binding relationship between the first message channel and the gateway device in the first gateway group changes, and synchronize routing information corresponding to the first message channel to the message service device when it is determined that the first message channel and the gateway device currently establishing a binding relationship therewith successfully establish the long connection. The number of gateway devices currently establishing long connection with the first message channel may be one or multiple, which is not limited herein.
The routing information corresponding to the first message channel may be referred to as channel-side routing information for short, and the routing information corresponding to the first message channel includes address information of a gateway device currently establishing a long connection with the first message channel, for example, IP address information of the gateway device. In addition, the routing information corresponding to the first message channel may also reflect a connection relationship between the first message channel and the gateway device. When the binding relationship between the first message channel and the gateway device in the first gateway packet changes, the gateway device that establishes a long connection with the first message channel also changes, and then the routing information corresponding to the first message channel also changes. The routing information corresponding to different message channels is different, and the same gateway grouping can correspond to one message channel or a plurality of message channels. The binding relationship between different message channels and the gateway device in the first gateway group is different, and correspondingly, the routing information corresponding to different message channels is also different.
The embodiment of synchronizing the routing information corresponding to the first message channel to the message service device is not limited. For example, there are 10 gateway devices currently in the first gateway packet that establish a binding relationship with the first message channel, where the gateway device a is disconnected from the first message channel, and then the binding relationship between the first message channel and the gateway device in the first gateway packet changes, the management and control device may send notification information to the message service device, where the notification information includes address information of the gateway device a and information that the gateway device a is disconnected from the first message channel, and based on this, the message service device may delete the address information of the gateway device a in the routing information corresponding to the first message channel that is stored before, and implement the purpose of synchronizing new routing information corresponding to the first message channel to the message service device by using an incremental routing notification manner. Or the management and control device may also directly provide new routing information to the message service device when the routing information corresponding to the first message channel changes, where the new routing information includes address information of each gateway device currently establishing a binding relationship with the first message channel, but does not include address information of the gateway device a that has been disconnected from the first message channel.
In this embodiment, the message service device may directly perform routing addressing on the gateway device with long connection established with the first message channel according to the routing information corresponding to the first message channel, and obtain address information of the target gateway device therefrom; and subsequently, according to the address information of the target gateway device, the target message is sent to the first message channel through the target gateway device, so that the target message is sent to the target terminal through the first message channel. Or, in another optional embodiment, the message service device and the management and control device both maintain a first address list, where address information of each gateway device in the first gateway group is stored in the first address list, and the gateway devices are gateway devices in an effective or available state in the first gateway group; based on this, the message service device can perform routing addressing on the gateway device with long connection established with the first message channel according to the routing information corresponding to the first message channel and the first address list, and obtain the address information of the target gateway device; for example, the routing information includes address information of each gateway device currently establishing long connection with the first message channel, the address information of each gateway device is matched with the first address list to obtain address information of the gateway device located in the first address list, the address information located in the first address list indicates the gateway device currently establishing long connection with the first message channel and being in an effective or available state in the first gateway packet, and then address information of a target gateway device required for sending the message is selected from the address information of the gateway device located in the first address list, and subsequently, according to the address information of the target gateway device, the target message is sent to the first message channel through the target gateway device, so that the target message is sent to the target terminal through the first message channel.
In this embodiment of the present application, for any message channel, in a case where the message channel is docked with a certain gateway packet, a binding relationship may be dynamically established between the message channel and a gateway device in the docked gateway packet, in a case where the binding relationship of the message channel changes, routing information of the message channel is synchronized to a message service device, the message service device provides target information to the message channel via a target gateway device based on the routing information, and the message channel sends the target message to a target terminal. In the whole process, the binding relationship can be dynamically changed, connection can be established between the message channel and the gateway equipment as required, connection resources are saved, the problem that the connection resources are wasted under the condition that the number of the connections supported by the message channel is greater than the number of the gateway equipment in the gateway grouping is solved, the routing information can be updated in time along with the change of the binding relationship, the message service equipment can be directly addressed to the gateway equipment based on the dynamically updated routing information, and particularly, under the condition that the number of the connections supported by the message channel is less than the number of the gateway equipment in the gateway grouping, disconnection and reconnection operations of the message channel among different gateway equipment are not needed, and message sending delay can be greatly reduced.
In an alternative embodiment, the gateway device in the first gateway packet may be pre-assigned to the first message channel before dynamically establishing a binding relationship between the first message channel and the gateway device in the first gateway packet. Specifically, the first message channel may send an online request to the management and control device, where the online request includes a maximum connection number M of the connection gateway device supported by the first message channel, where M is a positive integer; the management and control device can respond to an online request of the first message channel, and judge whether the maximum connection number M supported by the first message channel is smaller than the total number N of the gateway devices contained in the initial state of the first gateway group, wherein N is a positive integer; under the condition that the maximum connection number M supported by the first message channel is greater than or equal to the total number N of the gateway devices currently contained in the first gateway grouping, establishing a binding relationship between all N gateway devices in the first gateway grouping and the first message channel; under the condition that the maximum connection number M supported by the first message channel is smaller than the total number N of the gateway devices currently contained in the first gateway group, after M gateway devices in the first gateway group are connected with the first message channel, the M +1 th to N th gateway devices want to establish a connection relationship with the first message channel and need to establish a preemptive connection relationship with the first message channel, so that the first message channel is frequently preempted, and the gateway devices in the first gateway group are frequently on-line or off-line, which affects the system stability. Based on this, in the initial stage, under the condition that the maximum connection number M supported by the first message channel is less than the total number N of the gateway devices currently included in the first gateway group, a pre-allocation mode may be adopted to select M gateway devices from the N gateway devices in the first gateway group, and a binding relationship is established between the first message channel and the M gateway devices, so as to avoid that the first message channel is frequently preempted and the connection established with the first message channel is frequently disconnected, thereby reducing the time delay of sending messages.
In an optional embodiment, an implementation manner in which the policing device establishes a binding relationship between the first message channel and M gateway devices in the first gateway group in a pre-allocation manner is not limited. The following examples are given.
Embodiment B1:m gateway devices may be randomly selected from the N gateway devices in the first gateway packet, and a binding relationship may be established between the first message channel and the M gateway devices.
Embodiment B2:presetting a first address list, wherein the address information of each gateway device currently contained in a first gateway group is stored in the first address list, forming a list ring by the address information in the first address list, and determining the list ring by adopting a cyclic distribution mode, a Hash distribution mode or a random distribution modeM address information in the ring; and establishing a binding relationship between the first message channel and M gateway devices corresponding to the M pieces of address information. The method comprises the steps that a cyclic allocation mode is used for selecting initial address information from a list ring, and M pieces of address information are sequentially selected from the list ring in a counterclockwise or clockwise direction according to the initial address information; the Hash distribution mode is that a Hash function is adopted to select M pieces of address information from a list ring; the random allocation mode is to randomly select M pieces of address information from the list ring.
In an alternative embodiment, after the pre-allocation operation is performed in the initial stage, a binding relationship may be dynamically established between the first message channel and the gateway device in the first gateway packet according to the state change information of the gateway device, and for convenience of description, the process of dynamically establishing a binding relationship between the first message channel and the gateway device in the first gateway packet, which is mentioned in the foregoing embodiment, is referred to as a reallocation process for short. On one hand, the state change information may represent connection state change information of a gateway device that establishes a binding relationship with the first message channel in the first gateway packet, and the connection state information may include but is not limited to: establishing connection, disconnecting connection, reestablishing connection or abnormal connection and the like; on the other hand, the state change information may represent load information, Quality of Service (QoS) data, Query Per Second (QPS) and the like of the gateway device that establishes the binding relationship with the first message channel in the first gateway packet. The following describes the reallocation procedure performed by the gateway device in the first gateway packet from the dimension of the first message channel: the management and control equipment can determine the number of gateway equipment which currently establishes long connection with the first message channel according to the state change information of each gateway equipment in the first gateway group; dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the number of the gateway equipment which currently establishes long connection with the first message channel; or determining load information of the gateway equipment which establishes long connection with the first message channel at present according to the state change information of each gateway equipment in the first gateway grouping; and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the load information of the gateway equipment which currently establishes long connection with the first message channel. Specifically, the following four cases can be classified for explanation.
Case C1:a first number threshold of gateway devices establishing a long connection with the first message channel is preset, and the first number threshold may be any value less than or equal to the maximum number M of connections supported by the first message channel. Under the condition that the number of gateway devices which establish long connection with the first message channel is smaller than a set first number threshold, determining the first number according to the difference value between the first number threshold and the number of the gateway devices which establish long connection with the first message channel, so that the number of the gateway devices which establish long connection with the first message channel is the first number threshold; and according to the first quantity, selecting the first gateway equipment from the gateway equipment which does not establish the binding relationship with the first message channel in the first gateway grouping, and establishing the binding relationship between the first message channel and the first gateway equipment. For example, the first gateway packet includes 20 gateway devices, where the number of gateway devices that establish long connections with the first message channel is 10, and the first number threshold is 15, the first number is 15-10=5, and 5 gateway devices are selected as the first gateway device from 10 gateway devices that have not established a binding relationship with the first message channel in the first gateway packet, and a binding relationship between the first message channel and the first gateway device is newly established.
Optionally, if the third gateway device in the first gateway group has a device failure or a network failure, the third gateway device may be destroyed from the first gateway group. If a third gateway device which is destroyed appears in the gateway devices which establish long connection with the first message channel at present, the ratio of the number of the third gateway devices to the number of the gateway devices which establish binding relationship with the first message channel at present can be determined; when the ratio is greater than a first ratio threshold, determining that the number of gateway devices currently establishing long connection with the first message channel is smaller than a set first number threshold, determining the first number, selecting the first gateway device from the gateway devices which do not establish the binding relationship with the first message channel in the first gateway group according to the first number, and establishing the binding relationship between the first message channel and the first gateway device. Wherein the first proportional threshold may be 70%, 80% or 90%. Further, when the ratio is greater than the second ratio threshold and smaller than the first ratio threshold, early warning information can be sent out to the outside so that a worker of the control device can repair the third network device. Wherein the second ratio threshold may be 40% or 50%, etc.
Case C2:a second number threshold of gateway devices establishing a long connection with the first message channel is preset, which may be any value less than the first packet or equal to the maximum number of connections M supported by the first message channel. And under the condition that the number of the gateway devices which establish long connection with the first message channel is larger than a set second number threshold, determining the second number according to the difference value between the number of the gateway devices which establish long connection with the first message channel and the second number threshold, selecting the second gateway device from the gateway devices which establish the binding relationship with the first message channel in the first gateway grouping according to the second number, disconnecting the long connection between the first message channel and the second gateway device, and deleting the binding relationship between the first message channel and the second gateway device. For example, if the number of gateway devices currently establishing long connections with the first message channel is 10 and the second number threshold is 8, the second number is 10-8=2, 2 gateway devices are selected from 10 gateway devices that have already established a binding relationship with the first message channel in the first gateway packet as the second gateway device, the long connection between the first message channel and the second gateway device is disconnected, and the binding relationship between the first message channel and the second gateway device is deleted.
Case C3:presetting a first load threshold of the gateway device, and when the load information of the gateway device currently establishing long connection with the first message channel is greater than the set first load threshold, indicating that the load of the gateway device is greater, and more gateway devices are needed to establish long connection with the first message channel to reduce the load information of the gateway device which has established connection, then according to the current load information and the first load threshold, the first load threshold of the gateway device can be preset, and the load information of the gateway device which has established connection can be eliminatedDetermining a first quantity according to a difference value between load information of gateway equipment for establishing long connection by an information channel and a first load threshold, selecting first gateway equipment from the gateway equipment which does not establish a binding relationship with the first information channel in a first gateway group according to the first quantity, and establishing a binding relationship between the first information channel and the first gateway equipment. The embodiment of selecting the first gateway device from the gateway devices that have not established a binding relationship with the first message channel in the first gateway packet is not limited. For example, a gateway device with a lower load may be selected as the first gateway device from gateway devices that have not established a binding relationship with the first message channel according to load information of gateway devices that have not established a binding relationship with the first message channel in the first gateway packet, or a gateway device with a higher QoS data may be selected as the first gateway device from gateway devices that have not established a binding relationship with the first message channel according to QoS data of gateway devices that have not established a binding relationship with the first message channel in the first gateway packet.
Case C4:the second load threshold of the gateway device is preset, and when the load information of the gateway device currently establishing long connection with the first message channel is smaller than the set second load threshold, it indicates that the load of the gateway device is smaller, and the long connection between the gateway device and the first message channel can be disconnected, so as to save resources, then a second number corresponding to the gateway device to be deleted can be determined according to the difference value between the first load threshold and the load information of the gateway device currently establishing long connection with the first message channel, and according to the second number, a second gateway device is selected from the gateway devices already establishing binding relationship with the first message channel in the first gateway group, the long connection between the first message channel and the second gateway device is disconnected, and the binding relationship between the first message channel and the second gateway device is deleted. The manner of selecting the second gateway device from the gateway devices that have established the binding relationship with the first message channel in the first gateway group is not limited, and a gateway device with a smaller load may be selected as the second gateway device from the gateway devices that have established the binding relationship with the first message channel according to the load information of the gateway devicesAnd the second gateway device or selecting the gateway device with poor service quality from the gateway devices which establish the binding relationship with the first message channel according to the service quality of the gateway device as the second gateway device.
In the above embodiments, the reassignment procedure is exemplified from the dimension of the first message channel. In an optional embodiment, the first gateway packet may also be subjected to scalability. Specifically, load information of the first gateway packet may be obtained, and the gateway device in the first gateway packet may be scaled according to the load information of the first gateway packet. The load information of the first gateway packet refers to the sum of the load information of each gateway device in the first gateway packet, and besides, the first gateway packet may correspond to a plurality of message channels, and the load information of the first gateway packet may be considered to be the sum of the load information generated by each message channel interfacing with the first gateway packet from the dimension of the message channels. For the load information of the first gateway packet, if the load information of the first gateway packet is greater than the third load threshold, it indicates that the number of gateway devices in the first gateway packet is insufficient, the number of gateway devices may be expanded for the first gateway packet, a fourth gateway device may be selected from other gateway packets or a gateway resource pool, address information of the fourth gateway device is added to the first address list, and the fourth gateway device is a gateway device in the first gateway packet that has not yet established a binding relationship with the first message channel. The message channel causing the capacity expansion of the first gateway packet needs to be determined, and if the message channel causing the capacity expansion of the first gateway packet is the first message channel, the fourth gateway device is selected from other gateway packets or a gateway resource pool, and a binding relationship between the first message channel and the fourth gateway device is created. And under the condition that the load information of the first gateway group is smaller than the fourth load threshold, the gateway devices in the first gateway group are in a low-load state, and the number of the gateway devices is sufficient, selecting a fifth gateway device from the first gateway group, disconnecting the long connection established by the fifth gateway device, deleting the binding relationship established by the fifth gateway device, and deleting the address information of the fifth gateway device from the first address list. When the fifth gateway device is selected from the first gateway group, the message channel with the smaller load is selected according to the load information corresponding to each message channel, if the message channel with the smaller load is the first message channel, the fifth gateway device is selected from the gateway devices which are in butt joint with the first message channel, the long connection between the fifth gateway device and the first message channel is disconnected, and the binding relationship between the first message channel and the fifth gateway device is deleted.
In this embodiment, the first gateway packet may interface messages of different message service types, for example, the different message service types may include, but are not limited to: in order to realize the isolation scheduling of the message service, a first gateway group is divided into a plurality of virtualization groups, each virtualization group comprises at least one gateway device, each virtualization group corresponds to at least one message service type, a first message channel can correspond to one or more message service types, the first message channel can correspond to one or more virtualization groups, the first virtualization group corresponding to the first message service type is determined according to the first message service type corresponding to the first message channel, a binding relation is dynamically established between the first message channel and the gateway device in the first virtualization group, the message service is isolated and scheduled through the virtualization groups, the maximization of the gateway cluster capacity is realized, and the information safety is guaranteed. In fig. 4, the first gateway packet is divided into 3 virtualization packets as an example, but the present invention is not limited thereto.
Before performing virtualization grouping, information of each gateway device included in the first gateway grouping, for example, IP address information, load information, QPS, QoS, and the like of the gateway device may be acquired, each gateway device included in the first gateway grouping may be virtualized and grouped based on the information of each gateway device included in the first gateway grouping, and information of an identifier of the virtualization grouping, an external interface, a message service type to be served, and the like may be configured. The external interfaces include an external interface for a virtualized packet (e.g., a version of the virtualized packet) and an external routing interface for a dynamic route. When a message channel requests to be online, a binding relationship between the message channel and a virtualization group is established, information configured for the virtualization group is sent to a management module of the virtualization group, identification information of the virtualization group to which each gateway device belongs is sent to each gateway device, information such as an external routing interface, a corresponding message service type and gateway devices included in the virtualization group of the virtualization group is provided for the message service device, so that the message service device establishes a first address list according to the information, and address information of each gateway device included in each virtualization group of the first gateway group is stored in the first address list.
In an optional embodiment, the first virtualized packet in the first gateway packet may be subjected to scaling, specifically: performing capacity expansion on the first virtualization grouping according to the load information and/or the service quality data of the plurality of virtualization groupings; and dynamically adjusting the binding relationship between the first message channel and the gateway equipment in the first virtualization packet according to the expansion and contraction capacity result. The load information of the virtualization packet may be the sum of the load information of each gateway device in the virtualization packet, that is, the global load information of the virtualization packet, or may be the load information of each gateway device in the virtualization packet; the qos data of the plurality of virtualization packets may be global qos data of the virtualization packet or qos data of each gateway device in the virtualization packet.
Optionally, the implementation manner of performing scaling on the first virtualization packet according to the load information and/or the quality of service data of the plurality of virtualization packets mainly includes the following three types:
embodiment D1:selecting a second virtualization packet from the plurality of virtualization packets according to the global load information of the plurality of virtualization packets, for example, regarding the virtualization packet with the smallest global load as the second virtualization packet; according to the load information of each gateway device in the second virtualization grouping, selecting a sixth gateway device from the second virtualization grouping, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and connecting the sixth networkThe gateway device is assigned to the first virtualization group to enable the first virtualization group to be expanded.
Embodiment D2:selecting a second virtualization packet from the plurality of virtualization packets according to the quality of service data of the plurality of virtualization packets, for example, regarding a virtualization packet with a better global quality of service as the second virtualization packet; and selecting a sixth gateway device from the second virtualization group according to the service quality data of each gateway device in the second virtualization group, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and distributing the sixth gateway device to the first virtualization group so as to realize the expansion of the first virtualization group.
Embodiment D3:selecting a second virtualization group from the plurality of virtualization groups according to the load information and the service quality data of the plurality of virtualization groups, for example, screening out candidate virtualization groups of which the global load information is smaller than a set global load threshold according to the global load information of the plurality of virtualization groups, and selecting a virtualization group of which the global service quality data is larger than the set global service quality data threshold from the candidate virtualization groups as the second virtualization group according to the global service quality data of the candidate virtualization groups; selecting a sixth gateway device from the second virtualization group according to the load information and the service quality data of each gateway device in the second virtualization group, for example, selecting a gateway device with load information smaller than a set fifth load threshold value as a candidate gateway device according to the load information of each gateway device in the second virtualization group, and selecting a gateway device with service quality data exceeding the set service quality data threshold value from the candidate gateway devices as the sixth gateway device according to the service quality data of the candidate gateway device; and disconnecting the established long connection of the sixth gateway device, deleting the established binding relationship of the sixth gateway device, and distributing the sixth gateway device to the first virtualization packet to realize the expansion of the first virtualization packet.
In the above embodiments D1-D3, when a storage resource can be shared among some or all of a plurality of virtualization groups, an embodiment of performing a capacity expansion on a first virtualization group based on load information and/or quality of service data of the plurality of virtualization groups includes: selecting a third virtualization group which shares the storage resource with the first virtualization group and corresponds to the first message service type from the plurality of virtualization groups according to the load information and/or the service quality data of the plurality of virtualization groups and by combining the sharing condition of the plurality of virtualization groups to the storage resource; and disconnecting the long connection between the first message channel and the gateway equipment in the first virtualization packet, migrating the first message channel to a third virtualization packet, and dynamically establishing the binding relationship between the first message channel and the gateway equipment in the third virtualization packet.
In the following embodiments of the present application, an implementation of pre-allocating and re-allocating gateway devices in virtualized packets is described.
In an optional embodiment, the implementation of reassigning the gateway device in the first virtualization packet includes: under the condition that the first gateway grouping comprises at least one virtualization grouping, aiming at the first virtualization grouping, determining the number or load information of gateway equipment which currently establishes long connection with a first message channel according to the state change information of each gateway equipment in the first virtualization grouping; and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first virtualization grouping according to the number or load information of the gateway equipment which currently establishes long connection with the first message channel. Specifically, several embodiments are included as follows.
Embodiment F1:presetting a third quantity threshold, wherein the third quantity threshold is less than or equal to the quantity of gateway devices included in the first virtualization grouping in the initial state, determining the third quantity according to the difference value between the third quantity threshold and the quantity of the gateway devices currently establishing long connection with the first message channel under the condition that the quantity of the gateway devices currently establishing long connection with the first message channel in the first virtualization grouping is less than the set third quantity threshold, and determining the third quantity according to the third quantityAnd selecting a seventh gateway device from the gateway devices which do not establish the binding relationship with the first message channel, and establishing the binding relationship between the first message channel and the seventh gateway device.
Optionally, in the first virtualization grouping, if a destroyed ninth gateway device appears in the gateway devices currently establishing long connection with the first message channel, determining a ratio of the number of the ninth gateway devices to the number of the gateway devices currently establishing a binding relationship with the first message channel; and when the ratio is greater than a first ratio threshold, determining that the number of gateway devices which establish long connection with the first message channel at present is smaller than a set third number threshold, determining the third number, selecting a seventh gateway device from the gateway devices which do not establish the binding relationship with the first message channel in the first gateway group according to the third number, and establishing the binding relationship between the first message channel and the seventh gateway device. Wherein the first proportional threshold may be 70%, 80% or 90%. Further, when the ratio is greater than the second ratio threshold and smaller than the first ratio threshold, early warning information can be sent out to the outside so that a worker of the control device can repair the third network device. Wherein the second ratio threshold may be 40% or 50%, etc.
Embodiment F2:in the first virtualization grouping, when the number of gateway devices currently establishing long connection with the first message channel is larger than a set fourth number threshold, determining the fourth number according to the difference between the number of gateway devices currently establishing long connection with the first message channel and the fourth number threshold, selecting an eighth gateway device from the gateway devices in the first gateway grouping, which have established a binding relationship with the first message channel, according to the fourth number, disconnecting the long connection between the first message channel and the eighth gateway device, and deleting the binding relationship between the first message channel and the eighth gateway device.
Embodiment F3:in the first virtualization packet, when the load information of the gateway device currently establishing long connection with the first message channel is greater than a set sixth load threshold, according to the load information and the sixth load of the gateway device currently establishing long connection with the first message channelDetermining a third quantity according to the difference value of the threshold values, selecting a seventh gateway device from the gateway devices which do not establish the binding relationship with the first message channel in the first gateway group according to the third quantity, and establishing the binding relationship between the first message channel and the seventh gateway device;
embodiment F4:in the first virtualization packet, when the load information of the gateway device currently establishing long connection with the first message channel is smaller than a set seventh load threshold, determining a fourth quantity according to a difference value between the seventh load threshold and the load information of the gateway device currently establishing long connection with the first message channel, selecting an eighth gateway device from the gateway devices already establishing binding relationship with the first message channel in the first gateway packet according to the fourth quantity, disconnecting the long connection between the first message channel and the eighth gateway device, and deleting the binding relationship between the first message channel and the eighth gateway device.
In an optional embodiment, the policing device may dynamically establish a binding relationship between the first message channel and the gateway devices in the first virtualization group according to the state change information of each gateway device in the first gateway group, and in addition, the policing device may pre-allocate gateway devices in multiple virtualization groups in the first gateway group for the first message channel before dynamically establishing a binding relationship between the first message channel and the gateway devices in the first virtualization group. Specifically, the method comprises the following steps: and responding to an online request of the first message channel, and determining the maximum connection number M supported by the first message channel and the maximum connection number S between the first message channel and the first virtualization grouping, wherein S is a positive integer and is less than M. The embodiment of determining the maximum connection number S between the first message channel and the first virtualization packet is not limited, and for example, the connection number between the first message channel and each virtualization packet may be determined according to the number of the plurality of virtualization packets included in the first packet, or the maximum connection number S between the first message channel and the first virtualization packet may be determined according to the load information and/or the quality of service data of the plurality of virtualization packets included in the first packet. Besides the first time, the total number T of gateway devices included in the first virtualization packet in the initial state may be preset, where T is a positive integer and is less than N. Whether the maximum connection number S between the first message channel and the first virtualization packet is smaller than the total number T of gateway devices included in the first virtualization packet in the initial state can be judged; if S is larger than or equal to T, establishing a binding relationship between all gateway devices in the first virtualization grouping and the first message channel; if S is less than T, a binding relationship is established between the first message channel and S gateway equipment in the first virtualization grouping by adopting a pre-distribution mode in the initial stage.
Optionally, the method for establishing, by the management and control device, a binding relationship between the first message channel and the S-station gateway device in the first virtualization group includes: the first virtualization grouping corresponds to a second address list, and address information of each gateway device currently contained in the first virtualization grouping is stored in the second address list; forming a list ring by the address information in the second address list, and determining S pieces of address information in the list ring by adopting a circular distribution mode, a Hash distribution mode or a random distribution mode; and establishing a binding relationship between the first message channel and S pieces of gateway equipment corresponding to the S pieces of address information.
In an alternative embodiment, the pre-allocation of the gateway device in the virtualized packet from the dimension of the first message channel is illustrated in the above embodiment. The load information of the first virtualization packet refers to the sum of the load information of each gateway device in the first virtualization packet, and besides, the first virtualization packet may correspond to a plurality of message channels, and the load information of the first virtualization packet can be considered from the dimension of the message channels as the sum of the load information generated by each message channel connected with the first virtualization packet. When the load information of the first virtualization packet is larger than the eighth load threshold, selecting a ninth gateway device from other virtualization packets, and adding the address information of the ninth gateway device to a second address list corresponding to the first virtualization packet; and if the message channel for expanding the first virtualization packet is the first message channel, selecting a ninth gateway device from other virtualization packets, and establishing a binding relationship between the first message channel and the ninth gateway device. And under the condition that the load information of the first virtualization packet is smaller than a ninth load threshold value, selecting a tenth gateway device from the first virtualization packet, disconnecting the long connection established by the tenth gateway device, deleting the binding relationship established by the tenth gateway device, and deleting the address information of the tenth gateway device from the second address list. When the tenth gateway device is selected from the first virtualization packet, the message channel with a smaller load is selected according to the load information corresponding to each message channel, if the message channel with the smaller load is the first message channel, the tenth gateway device is selected from the gateway devices butted with the first message channel, the long connection between the tenth gateway device and the first message channel is disconnected, and the binding relationship between the first message channel and the tenth gateway device is deleted.
Fig. 2 is a schematic structural diagram of another message processing system according to an exemplary embodiment of the present application, and fig. 2 mainly illustrates an internal implementation structure of the management and control device 101, which is merely an example and is not limited thereto. The management and control device 101 comprises a channel allocation module and a connection management module; the channel allocation module further comprises a pre-allocation module, a re-allocation module, a health detection module and a state machine module; the connection management module includes: an address information base (IP address base), a configuration center, a subscription center and a task engine. In addition to the internal implementation structure of the management and control device 101, the implementation structure of fig. 2 further includes: message service device 103, gateway cluster 102, and a vendor or operator. Wherein the message service device 103 comprises a routing scheduling module.
In the internal implementation structure of the management and control device shown in fig. 2, the pre-allocation module is configured to establish a binding relationship between the first message channel and M gateway devices in the first gateway group in a pre-allocation manner at an initial stage, which may specifically refer to a specific implementation of "implementation B1-B2", and is not described herein again. After the pre-allocation module obtains the binding relationship between the first message channel and the M gateway devices in the first gateway group, the re-allocation module can dynamically establish the binding relationship between the first message channel and the gateway devices in the first gateway group as required. The health detection module is used for monitoring the management and control equipment and establishing heartbeat connection with the gateway equipment in the first gateway grouping, and receiving heartbeat messages reported by each gateway equipment in the first gateway grouping based on the heartbeat connection, wherein the heartbeat messages comprise state change information corresponding to the gateway equipment, and the state change information at least comprises: at least one of connection state information, load information, QoS, QPS data. The state machine module is used for realizing event management of each long connection and can realize real-time monitoring and control of the running state of the long connection.
The gateway equipment is distributed for the first message channel in a pre-distribution mode, the binding relationship between the first message channel and the gateway equipment in the first gateway grouping is established, the complexity of distributing the gateway equipment is reduced, the high availability of connection is improved through the relatively fixed binding relationship, dynamic change of the binding relationship can be realized through a relatively light-weight strategy (such as redistribution), and the stability of the system is improved. The method and the system realize connection discovery and subscription management based on the configuration center, solve the problem of management of connection states, realize event management of each connection by defining a connected state machine and a task engine, and realize real-time monitoring and control of operation states of the connection. The routing scheduling strategy is realized based on the connection management module, the problem of connection addressing when the gateway equipment is scheduled at the upstream is solved through the routing scheduling strategy, and the routing scheduling strategies such as real-time change, retry and the like of routing information are realized based on connection discovery.
In fig. 2, the configuration center in the connection management module is mainly used to discover the state change information between the message channel and the gateway device, for example, to detect the long connection between the message channel and the gateway device through heartbeat detection. For different state change information, the configuration center will perform different processing operations, which will be described in detail below:
embodiment G1:if the state change information indicates that the first message channel is connected with the gateway device in the first virtualization group, the configuration center does not add the connection record, and the routing scheduling module in the message service device cannot identify the gateway deviceWhen the connection is successfully established, the configuration center will add the connection record formally, and inform the route scheduling module to identify the address information and add the address information to the route information.
Embodiment G2:if the state change information indicates that the first message channel is disconnected from the gateway device in the first virtualized packet, the configuration center deletes the connection record and notifies the routing scheduling module to remove the address information from the routing information.
Embodiment G3:if the state change information indicates that the first message channel is reestablished connection with the gateway device in the first virtualization group, the configuration center performs logical processing according to disconnection and reconnection, and the corresponding routing scheduling module also updates the routing information in real time.
Embodiment G4:if the state change information indicates that the first message channel and the gateway device in the first virtualization grouping have abnormal connection, the configuration center cannot detect the activity through heartbeat detection, the configuration center can delete the connection without heartbeat immediately, and inform the routing scheduling module to remove the address information without heartbeat from the routing information.
Wherein, fig. 2 further includes: and a session detection module connected between the message service device and each gateway device in the gateway cluster, wherein in fig. 2, the session detection module is connected between the routing scheduling module and the gateway device in the gateway cluster. The session detection module is configured to update a session state of a long connection between the first message channel and the gateway device that is currently in a binding relationship with the first message channel according to the routing information currently corresponding to the first message channel sent by the management and control device (e.g., the configuration center), and synchronize the updated session state to the routing scheduling module in the message service device, so that the routing scheduling module obtains the routing information currently corresponding to the first message channel. The session detection module is used as an intermediate agent between the routing scheduling module and the gateway device, and after all connections of each message channel are successfully established, the management and control device issues the routing information of the message channel to the routing scheduling module through the session detection module, so that updating and synchronization of the routing information are realized, and timeliness is guaranteed.
In fig. 2, after the message service device 103 is started, the routing scheduling module may be loaded and started, the target message is issued through the routing scheduling module, the routing scheduling module performs routing addressing on the gateway device corresponding to the long connection according to the routing information to obtain address information of the target gateway device, and according to the address information of the target gateway device, the target message is sent to the first message channel through the target gateway device, so as to send the target message to the target terminal through the first message channel.
When the message service device is started, the message service device may obtain a routing channel used by an upper line of the loading gateway device, and if the routing channel is a routing channel with a customized connection number, the message service device may also call a configuration center to obtain routing address information (such as an IP address) of the routing channel, and perform routing analysis of a routing scheduling policy, as shown in fig. 2. The routing scheduling module performs intersection calculation on routing information corresponding to the message channel and the first address list to generate a schedulable IP address base of the routing scheduling module, and when one message is subjected to routing scheduling, the scheduling strategy depends on the schedulable IP address base for scheduling.
Fig. 3 is a schematic structural diagram of another message processing system according to an exemplary embodiment of the present application, and fig. 3 mainly shows an internal implementation structure of the policing device 101 and the gateway cluster 102, where the internal implementation structure is merely an example and is not limited thereto. As shown in fig. 3, the gateway cluster 102 includes two virtualized packets of the first gateway packet as an example, but is not limited to this. As shown in fig. 3, the management and control device 101 includes a group management module and a data center module, where the group management module is used to implement virtualization configuration, channel mapping, resource management, isolation management, and the like, and the data center module is used to implement health detection, container information base, elastic management, container deletion (e.g., container driving), and the like.
In the process of implementing the virtualization grouping of the gateway device in the first gateway grouping, the method mainly comprises the following steps:
(1) in the initial stage, a binding relationship is established between the first message channel and the gateway equipment in the virtualization grouping through pre-allocation, and in the subsequent stage, the binding relationship is dynamically established between the first message channel and the gateway equipment in the first gateway grouping in a redistribution mode according to needs. Further, the gateway device in the virtualization group reports state change information to the management and control device, where the state change information includes: IP address information, load information, QoS, or the like, dynamically establishes a binding relationship between the first message channel and the gateway devices in the first gateway packet according to the state change information of each gateway device in the first gateway packet.
(2) The virtualization packet supports configuration of an external interface (such as a virtualization packet version), configuration of a dynamic route, configuration of an external route interface, and the like, and may further perform resource management and control on the virtualization packet, for example, specify storage resources such as middleware, a database, or a cache of the virtualization packet.
(3) Based on the container information base of the data center, a binding relationship (e.g., a channel map in fig. 3) is established for the gateway device and the message channel in the virtualized group, where the binding relationship represents a corresponding relationship between the gateway device and the message channel, and the method for establishing the binding relationship may be referred to as embodiment B1 and embodiment B2.
(4) When the gateway device in the virtualization group is started, the binding relationship between the gateway device and the message channel is obtained from the control device, the message channel pointed by the binding relationship establishes a connection relationship, and when the binding relationship of the message channel changes, the gateway device in the virtualization group is newly added or changed.
(5) The packet management module supports isolation scheduling among the virtualization packets, supports compensation logic under abnormal conditions such as retry, abnormity and timeout in the message sending process, and isolates mutual influence among different virtualization packets.
Fig. 5 is a message processing method according to an exemplary embodiment of the present application, and as shown in fig. 5, the method includes:
501. under the condition that a first message channel is in butt joint with a first gateway group in a gateway cluster, dynamically establishing a binding relationship between the first message channel and gateway equipment in the first gateway group; the first gateway packet is any gateway packet in the gateway cluster;
502. under the condition that the binding relationship is changed, determining that the first message channel and the gateway equipment which is currently in the binding relationship successfully establish long connection;
503. and synchronizing the routing information corresponding to the first message channel to the message service equipment, wherein the routing information comprises address information of the gateway equipment which establishes long connection with the first message channel at present, so that the message service equipment can address the target gateway equipment from the gateway equipment which establishes long connection with the first message channel at present and send the target message to the first message channel through the target gateway equipment.
In an optional embodiment, before dynamically establishing the binding relationship between the first message channel and the gateway device in the first gateway packet, the method further includes: responding to an online request of a first message channel, and determining that the maximum connection number M supported by the first message channel is less than the total number N of gateway equipment contained in the initial state of a first gateway group; in the initial stage, a pre-distribution mode is adopted to establish a binding relationship between a first message channel and M gateway devices in a first gateway group; m, N is a positive integer, and M < N.
In an optional embodiment, the establishing, in a pre-distribution manner, a binding relationship between the first message channel and M gateway devices in the first gateway packet includes: forming a list ring by the address information in the first address list, and determining M pieces of address information in the list ring by adopting a circular distribution mode, a Hash distribution mode or a random distribution mode; establishing a binding relationship between the first message channel and M pieces of gateway equipment corresponding to the M pieces of address information; the first address list stores address information of each gateway device currently included in the first gateway packet.
In an optional embodiment, dynamically establishing a binding relationship between the first message channel and the gateway device in the first gateway packet includes: determining the number or load information of gateway equipment which currently establishes long connection with a first message channel according to the state change information of each gateway equipment in a first gateway group; and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the number or load information of the gateway equipment which currently establishes long connection with the first message channel.
In an optional embodiment, further comprising: if a third gateway device which is destroyed appears in the gateway devices which establish long connection with the first message channel at present, determining the ratio of the number of the third gateway devices to the number of the gateway devices which establish binding relationship with the first message channel at present; and when the ratio is greater than a first ratio threshold, determining that the number of gateway devices currently establishing long connection with the first message channel is less than a set first number threshold.
In an optional embodiment, further comprising: under the condition that the load information of the first gateway grouping is larger than a third load threshold value, selecting a fourth gateway device from other gateway groupings or gateway resource pools, and adding the address information of the fourth gateway device to the first address list; and under the condition that the load information of the first gateway grouping is smaller than the fourth load threshold value, selecting a fifth gateway device from the first gateway grouping, disconnecting the long connection established by the fifth gateway device, deleting the binding relationship established by the fifth gateway device, and deleting the address information of the fifth gateway device from the first address list.
In an optional embodiment, dynamically establishing a binding relationship between the first message channel and the gateway device in the first gateway packet includes: dividing a first gateway packet into a plurality of virtualization packets, wherein each virtualization packet comprises at least one gateway device, and each virtualization packet corresponds to at least one message service type; according to a first message service type corresponding to the first message channel, a first virtualization packet corresponding to the first message service type is determined, and a binding relationship is dynamically established between the first message channel and gateway equipment in the first virtualization packet.
In an optional embodiment, further comprising: performing capacity expansion on the first virtualization grouping according to the load information and/or the service quality data of the plurality of virtualization groupings; and dynamically adjusting the binding relationship between the first message channel and the gateway equipment in the first virtualization packet according to the expansion and contraction capacity result.
In an optional embodiment, the scaling the first virtualization packet according to the load information and/or the quality of service data of the plurality of virtualization packets includes: selecting a second virtualized packet from the plurality of virtualized packets according to the load information and/or quality of service data of the plurality of virtualized packets; and selecting a sixth gateway device from the second virtualization group, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and distributing the sixth gateway device to the first virtualization group, so as to realize the expansion of the first virtualization group.
In an optional embodiment, the scaling the first virtualization packet according to the load information and/or the quality of service data of the plurality of virtualization packets includes: according to load information and/or service quality data of the multiple virtualization groups, selecting a third virtualization group which shares the storage resource with the first virtualization group and corresponds to the first message service type by combining sharing conditions of the multiple virtualization groups on the storage resource; and disconnecting the long connection between the first message channel and the gateway equipment in the first virtualization packet, migrating the first message channel to a third virtualization packet, and dynamically establishing the binding relationship between the first message channel and the gateway equipment in the third virtualization packet.
Fig. 6 is a flowchart illustrating another message processing method according to an exemplary embodiment of the present application, where as shown in fig. 6, the method includes:
601. acquiring routing information corresponding to a first message channel sent by a control device, wherein the first message channel is in butt joint with a first gateway group, the routing information comprises address information of gateway devices which establish long connection with the first message channel currently in the first gateway group, and the routing information changes along with the dynamic change of the binding relationship between the first message channel and the gateway devices in the first gateway group;
602. according to the routing information and a first address list maintained in advance, routing addressing is carried out on gateway equipment corresponding to the long connection, address information of target gateway equipment is obtained, according to the address information of the target gateway equipment, a target message is sent to a first message channel through the target gateway equipment, the target message is sent to a target terminal through the first message channel, and the address information of each gateway equipment in a first gateway group is stored in the first address list.
In the message processing method provided in the embodiment of the present application, for any message channel, in a case where the message channel is in a gateway packet, a binding relationship may be dynamically established between the message channel and a gateway device in the gateway packet to which the message channel is in a docking state, and in a case where the binding relationship of the message channel changes, routing information of the message channel is synchronized to a message service device, the message service device provides, based on the routing information, target information to the message channel via a target gateway device, and the message channel sends the target message to a target terminal. In the whole process, the binding relationship can be dynamically changed, connection can be established between the message channel and the gateway equipment as required, connection resources are saved, the problem of connection resource waste under the condition that the number of connections supported by the message channel is greater than the number of gateway equipment in the gateway grouping is solved, the routing information can be updated in time along with the change of the binding relationship, the message service equipment can be directly addressed to the gateway equipment based on the dynamically updated routing information, and disconnection and reconnection operations of the message channel among different gateway equipment are not needed under the condition that the number of connections supported by the message channel is less than the number of gateway equipment in the gateway grouping, so that message sending delay can be greatly reduced.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 501 to 503 may be device a; for another example, the execution subjects of steps 501 and 502 may be device a, and the execution subject of step 503 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 501, 502, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Fig. 7a is a schematic structural diagram of a message processing apparatus according to an exemplary embodiment of the present application. The message processing apparatus may be applied to the management and control device in the above embodiments, but is not limited thereto. As shown in fig. 7a, the apparatus comprises: a relationship establishing module 71, a connection discovery module 72 and a route synchronization module 73.
A relationship establishing module 71, configured to dynamically establish a binding relationship between a first message channel and a gateway device in a first gateway packet when the first message channel is docked with the first gateway packet in the gateway cluster; the first gateway packet is any gateway packet in the gateway cluster; for the definitions of the gateway cluster, the message channel, the gateway packet and the corresponding relationship between the message channel and the gateway packet, reference may be made to the foregoing embodiments, which are not described herein again.
And the connection discovery module 72 is connected to the relationship establishing module 71, and is configured to determine that the first message channel and the gateway device currently establishing a binding relationship therewith successfully establish a long connection when the binding relationship changes.
The routing synchronization module 73 is configured to synchronize routing information corresponding to the first message channel to the message service device, where the routing information includes address information of a gateway device currently in long connection with the first message channel, so that the message service device addresses a target gateway device from the gateway device currently in long connection with the first message channel and sends a target message to the first message channel through the target gateway device, so that the first message channel sends the target message to the target terminal.
In an alternative embodiment, the relationship establishing module 71, before dynamically establishing the binding relationship between the first message channel and the gateway device in the first gateway packet, is further configured to: responding to an online request of a first message channel, and determining that the maximum connection number M supported by the first message channel is less than the total number N of gateway equipment contained in the initial state of a first gateway group; in the initial stage, a pre-distribution mode is adopted to establish a binding relationship between a first message channel and M gateway devices in a first gateway group; m, N is a positive integer, and M < N.
In an optional embodiment, when the relationship establishing module 71 adopts a pre-allocation manner to establish a binding relationship between the first message channel and M gateway devices in the first gateway packet, the relationship establishing module is specifically configured to: forming a list ring by the address information in the first address list, and determining M pieces of address information in the list ring by adopting a circular distribution mode, a Hash distribution mode or a random distribution mode; establishing a binding relationship between the first message channel and M pieces of gateway equipment corresponding to the M pieces of address information; the first address list stores address information of each gateway device currently included in the first gateway packet.
In an optional embodiment, when the relationship establishing module 71 dynamically establishes a binding relationship between the first message channel and the gateway device in the first gateway packet, specifically, the relationship establishing module is configured to: determining the number or load information of gateway equipment which currently establishes long connection with a first message channel according to the state change information of each gateway equipment in a first gateway group; and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the number or load information of the gateway equipment which currently establishes long connection with the first message channel.
In an alternative embodiment, the relationship establishing module 71 is further configured to: if a third gateway device which is destroyed appears in the gateway devices which establish long connection with the first message channel at present, determining the ratio of the number of the third gateway devices to the number of the gateway devices which establish binding relationship with the first message channel at present; and when the ratio is greater than a first ratio threshold, determining that the number of gateway devices currently establishing long connection with the first message channel is less than a set first number threshold.
In an alternative embodiment, the relationship establishing module 71 is further configured to: under the condition that the load information of the first gateway grouping is larger than a third load threshold value, selecting a fourth gateway device from other gateway groupings or gateway resource pools, and adding the address information of the fourth gateway device to the first address list; and under the condition that the load information of the first gateway grouping is smaller than the fourth load threshold value, selecting a fifth gateway device from the first gateway grouping, disconnecting the long connection established by the fifth gateway device, deleting the binding relationship established by the fifth gateway device, and deleting the address information of the fifth gateway device from the first address list.
In an optional embodiment, when the relationship establishing module 71 dynamically establishes a binding relationship between the first message channel and the gateway device in the first gateway packet, specifically, the relationship establishing module is configured to: dividing a first gateway packet into a plurality of virtualization packets, wherein each virtualization packet comprises at least one gateway device, and each virtualization packet corresponds to at least one message service type; according to a first message service type corresponding to the first message channel, a first virtualization packet corresponding to the first message service type is determined, and a binding relationship is dynamically established between the first message channel and gateway equipment in the first virtualization packet.
In an alternative embodiment, the relationship establishing module 71 is further configured to: performing capacity expansion on the first virtualization grouping according to the load information and/or the service quality data of the plurality of virtualization groupings; and dynamically adjusting the binding relationship between the first message channel and the gateway equipment in the first virtualization packet according to the expansion and contraction capacity result.
In an optional embodiment, when performing scaling on the first virtualization packet according to the load information and/or the quality of service data of the multiple virtualization packets, the relationship establishing module 71 is specifically configured to: selecting a second virtualized packet from the plurality of virtualized packets according to the load information and/or quality of service data of the plurality of virtualized packets; and selecting a sixth gateway device from the second virtualization group, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and distributing the sixth gateway device to the first virtualization group, so as to realize the expansion of the first virtualization group.
In an optional embodiment, when performing scaling on the first virtualization packet according to the load information and/or the quality of service data of the multiple virtualization packets, the relationship establishing module 71 is specifically configured to: according to load information and/or service quality data of the multiple virtualization groups, selecting a third virtualization group which shares the storage resource with the first virtualization group and corresponds to the first message service type by combining sharing conditions of the multiple virtualization groups on the storage resource; and disconnecting the long connection between the first message channel and the gateway equipment in the first virtualization packet, migrating the first message channel to a third virtualization packet, and dynamically establishing the binding relationship between the first message channel and the gateway equipment in the third virtualization packet.
Fig. 7b is a schematic structural diagram of a message processing device according to an exemplary embodiment of the present application. The message processing apparatus of this embodiment may be implemented as the policing apparatus in the foregoing embodiments, but is not limited thereto. As shown in fig. 7b, the apparatus comprises: a memory 74 and a processor 75.
A memory 74 for storing computer programs and may be configured to store other various data to support operations on the message processing apparatus. Examples of such data include instructions for any application or method operating on the message processing device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 74 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 75, coupled to the memory 74, for executing computer programs in the memory 74 for: under the condition that a first message channel is in butt joint with a first gateway group in a gateway cluster, dynamically establishing a binding relationship between the first message channel and gateway equipment in the first gateway group; the first gateway packet is any gateway packet in the gateway cluster; under the condition that the binding relationship is changed, determining that the first message channel and the gateway equipment which is currently in the binding relationship successfully establish long connection; and synchronizing routing information corresponding to the first message channel to the message service equipment, wherein the routing information comprises address information of gateway equipment which establishes long connection with the first message channel at present, so that the message service equipment can address target gateway equipment from the gateway equipment which establishes long connection with the first message channel at present and send the target message to the first message channel through the target gateway equipment, and further the first message channel sends the target message to a target terminal. For the definitions of the gateway cluster, the message channel, the gateway packet and the corresponding relationship between the message channel and the gateway packet, reference may be made to the foregoing embodiments, which are not described herein again.
In an alternative embodiment, the processor 75, before dynamically establishing the binding relationship between the first message channel and the gateway device in the first gateway packet, is further configured to: responding to an online request of a first message channel, and determining that the maximum connection number M supported by the first message channel is less than the total number N of gateway equipment contained in the initial state of a first gateway group; in the initial stage, a pre-distribution mode is adopted to establish a binding relationship between a first message channel and M gateway devices in a first gateway group; m, N is a positive integer, and M < N.
In an optional embodiment, when the processor 75 adopts a pre-allocation manner to establish a binding relationship between the first message channel and M gateway devices in the first gateway packet, the processor is specifically configured to: forming a list ring by the address information in the first address list, and determining M pieces of address information in the list ring by adopting a circular distribution mode, a Hash distribution mode or a random distribution mode; establishing a binding relationship between the first message channel and M pieces of gateway equipment corresponding to the M pieces of address information; the first address list stores address information of each gateway device currently included in the first gateway packet.
In an optional embodiment, when dynamically establishing the binding relationship between the first message channel and the gateway device in the first gateway packet, the processor 75 is specifically configured to: determining the number or load information of gateway equipment which currently establishes long connection with a first message channel according to the state change information of each gateway equipment in a first gateway group; and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the number or load information of the gateway equipment which currently establishes long connection with the first message channel.
In an alternative embodiment, the processor 75 is further configured to: if a third gateway device which is destroyed appears in the gateway devices which establish long connection with the first message channel at present, determining the ratio of the number of the third gateway devices to the number of the gateway devices which establish binding relationship with the first message channel at present; and when the ratio is greater than a first ratio threshold, determining that the number of gateway devices currently establishing long connection with the first message channel is less than a set first number threshold.
In an alternative embodiment, the processor 75 is further configured to: under the condition that the load information of the first gateway grouping is larger than a third load threshold value, selecting a fourth gateway device from other gateway groupings or gateway resource pools, and adding the address information of the fourth gateway device to the first address list; and under the condition that the load information of the first gateway grouping is smaller than the fourth load threshold value, selecting a fifth gateway device from the first gateway grouping, disconnecting the long connection established by the fifth gateway device, deleting the binding relationship established by the fifth gateway device, and deleting the address information of the fifth gateway device from the first address list.
In an optional embodiment, when dynamically establishing the binding relationship between the first message channel and the gateway device in the first gateway packet, the processor 75 is specifically configured to: dividing a first gateway packet into a plurality of virtualization packets, wherein each virtualization packet comprises at least one gateway device, and each virtualization packet corresponds to at least one message service type; according to a first message service type corresponding to the first message channel, a first virtualization packet corresponding to the first message service type is determined, and a binding relationship is dynamically established between the first message channel and gateway equipment in the first virtualization packet.
In an alternative embodiment, the processor 75 is further configured to: performing capacity expansion on the first virtualization grouping according to the load information and/or the service quality data of the plurality of virtualization groupings; and dynamically adjusting the binding relationship between the first message channel and the gateway equipment in the first virtualization packet according to the expansion and contraction capacity result.
In an optional embodiment, when performing scaling on the first virtualization packet according to the load information and/or the quality of service data of the plurality of virtualization packets, the processor 75 is specifically configured to: selecting a second virtualized packet from the plurality of virtualized packets according to the load information and/or quality of service data of the plurality of virtualized packets; and selecting a sixth gateway device from the second virtualization group, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and distributing the sixth gateway device to the first virtualization group, so as to realize the expansion of the first virtualization group.
In an optional embodiment, when performing scaling on the first virtualization packet according to the load information and/or the quality of service data of the plurality of virtualization packets, the processor 75 is specifically configured to: according to load information and/or service quality data of the multiple virtualization groups, selecting a third virtualization group which shares the storage resource with the first virtualization group and corresponds to the first message service type by combining sharing conditions of the multiple virtualization groups on the storage resource; and disconnecting the long connection between the first message channel and the gateway equipment in the first virtualization packet, migrating the first message channel to a third virtualization packet, and dynamically establishing the binding relationship between the first message channel and the gateway equipment in the third virtualization packet.
The message processing device provided in the embodiment of the present application may dynamically establish a binding relationship between any message channel and a gateway device in a gateway packet that the message channel is docked with, when the message channel is docked with a certain gateway packet, synchronize routing information of the message channel to a message service device when the binding relationship of the message channel changes, and provide, by the message service device, target information to the message channel via a target gateway device based on the routing information, and send, by the message channel, a target message to a target terminal. In the whole process, the binding relationship can be dynamically changed, connection can be established between the message channel and the gateway equipment as required, connection resources are saved, the problem of connection resource waste under the condition that the number of connections supported by the message channel is greater than the number of gateway equipment in the gateway grouping is solved, the routing information can be updated in time along with the change of the binding relationship, the message service equipment can be directly addressed to the gateway equipment based on the dynamically updated routing information, and disconnection and reconnection operations of the message channel among different gateway equipment are not needed under the condition that the number of connections supported by the message channel is less than the number of gateway equipment in the gateway grouping, so that message sending delay can be greatly reduced.
Further, as shown in fig. 7b, the message processing apparatus further includes: communication components 76, display 77, power components 78, audio components 79, and the like. Only some of the components are schematically shown in fig. 7b and it is not meant that the message processing apparatus comprises only the components shown in fig. 7 b.
Accordingly, the present application also provides a computer readable storage medium storing a computer program, which when executed, causes a processor to implement the steps in the method embodiment shown in fig. 5.
Accordingly, the present application also provides a computer program product, which includes a computer program/instruction, when executed by a processor, causes the processor to implement the steps in the method embodiment shown in fig. 5.
An embodiment of the present application further provides a message processing device, where an implementation structure of the message processing device is the same as or similar to that of the message processing device shown in fig. 7b, and may be implemented by referring to the structure of the message processing device shown in fig. 7 b. The message processing apparatus of the present embodiment may be implemented as the message service apparatus in the foregoing embodiments, but is not limited thereto. The difference between the message processing apparatus provided in this embodiment and the message processing apparatus in the embodiment shown in fig. 7b mainly lies in: the functions performed by the processor to execute the computer programs stored in the memory are different. For the message processing apparatus provided in this embodiment, the processor executes the computer program stored in the memory, and is operable to: acquiring routing information corresponding to a first message channel sent by a control device, wherein the first message channel is in butt joint with a first gateway group, the routing information comprises address information of gateway devices which establish long connection with the first message channel currently in the first gateway group, and the routing information changes along with the dynamic change of the binding relationship between the first message channel and the gateway devices in the first gateway group; according to the routing information and a first address list maintained in advance, routing addressing is carried out on gateway equipment corresponding to the long connection, address information of target gateway equipment is obtained, according to the address information of the target gateway equipment, a target message is sent to a first message channel through the target gateway equipment, the target message is sent to a target terminal through the first message channel, and the address information of each gateway equipment in a first gateway group is stored in the first address list.
Accordingly, the present application also provides a computer readable storage medium storing a computer program, which when executed, causes a processor to implement the steps in the method embodiment shown in fig. 6.
Accordingly, the present application also provides a computer program product, which includes a computer program/instruction, when executed by a processor, causes the processor to implement the steps in the method embodiment shown in fig. 6.
The communication component of fig. 7b described above is configured to facilitate communication between the device in which the communication component is located and other devices in a wired or wireless manner. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The display in fig. 7b described above includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The power supply module of fig. 7b provides power to the various components of the device in which the power supply module is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The audio component of fig. 7b described above may be configured to output and/or input an audio signal. For example, the audio component includes a Microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A message processing system, comprising: the gateway cluster comprises at least one gateway group, and each gateway group is used for being in butt joint with at least one message channel;
the management and control device is configured to dynamically establish a binding relationship between a first message channel and gateway devices in a first gateway group when the first message channel is in a first gateway group interface, determine that the first message channel and the gateway device currently establishing the binding relationship successfully establish a long connection when the binding relationship changes, and synchronize routing information corresponding to the first message channel to the message service device, where the routing information includes address information of the gateway device currently establishing the long connection with the first message channel, and the first gateway group is any gateway group;
the message service equipment is used for carrying out routing addressing on the gateway equipment corresponding to the long connection according to the routing information and the first address list to obtain address information of target gateway equipment, and sending a target message to the first message channel through the target gateway equipment according to the address information of the target gateway equipment so as to send the target message to a target terminal through the first message channel; the first address list stores address information of each gateway device in the first gateway group.
2. A message processing method, comprising:
under the condition that a first message channel is butted with a first gateway packet in a gateway cluster, dynamically establishing a binding relationship between the first message channel and gateway equipment in the first gateway packet; the first gateway packet is any gateway packet in a gateway cluster;
under the condition that the binding relationship is changed, determining that the first message channel and the gateway equipment which is currently in the binding relationship successfully establish long connection;
and synchronizing routing information corresponding to the first message channel to message service equipment, wherein the routing information comprises address information of gateway equipment which currently establishes long connection with the first message channel, so that the message service equipment can address target gateway equipment from the gateway equipment which currently establishes long connection with the first message channel and send target messages to the first message channel through the target gateway equipment.
3. The method of claim 2, further comprising, prior to dynamically establishing a binding between the first message channel and a gateway device in the first gateway packet:
responding to an online request of the first message channel, and determining that the maximum connection number M supported by the first message channel is smaller than the total number N of gateway equipment contained in the first gateway grouping in an initial state;
in the initial stage, a pre-distribution mode is adopted to establish a binding relationship between the first message channel and M gateway devices in the first gateway grouping; m, N is a positive integer, and M < N.
4. The method of claim 3, wherein establishing a binding relationship between the first message channel and M gateway devices in the first gateway packet in a pre-distribution manner comprises:
forming a list ring of address information in a first address list, and determining M pieces of address information in the list ring by adopting a circular distribution mode, a Hash distribution mode or a random distribution mode;
establishing a binding relationship between the first message channel and M pieces of gateway equipment corresponding to the M pieces of address information; the first address list stores address information of each gateway device currently included in the first gateway packet.
5. The method of claim 2, wherein dynamically establishing a binding relationship between the first message channel and a gateway device in the first gateway packet comprises:
determining the number or load information of gateway devices which establish long connection with the first message channel at present according to the state change information of each gateway device in the first gateway grouping;
and dynamically establishing a binding relationship between the first message channel and the gateway equipment in the first gateway grouping according to the number or load information of the gateway equipment which currently establishes long connection with the first message channel.
6. The method of claim 2, further comprising:
if a third gateway device which is destroyed appears in the gateway devices which establish long connection with the first message channel at present, determining the ratio of the number of the third gateway devices to the number of the gateway devices which establish binding relationship with the first message channel at present;
and when the ratio is greater than a first ratio threshold, determining that the number of gateway devices currently establishing long connection with the first message channel is less than a set first number threshold.
7. The method of claim 2, further comprising:
under the condition that the load information of the first gateway grouping is larger than a third load threshold value, selecting a fourth gateway device from other gateway groupings or a gateway resource pool, and adding the address information of the fourth gateway device to a first address list;
and under the condition that the load information of the first gateway group is smaller than a fourth load threshold, selecting a fifth gateway device from the first gateway group, disconnecting the long connection established by the fifth gateway device, deleting the binding relationship established by the fifth gateway device, and deleting the address information of the fifth gateway device from the first address list.
8. The method of any of claims 2-7, wherein dynamically establishing a binding relationship between the first message channel and a gateway device in the first gateway packet comprises:
dividing the first gateway packet into a plurality of virtualization packets, wherein each virtualization packet comprises at least one gateway device, and each virtualization packet corresponds to at least one message service type;
according to a first message service type corresponding to the first message channel, determining a first virtualization packet corresponding to the first message service type, and dynamically establishing a binding relationship between the first message channel and gateway equipment in the first virtualization packet.
9. The method of claim 8, further comprising:
performing capacity expansion on the first virtualization packet according to load information and/or service quality data of the plurality of virtualization packets;
and dynamically adjusting the binding relationship between the first message channel and the gateway equipment in the first virtualization packet according to the expansion and contraction capacity result.
10. The method of claim 9, wherein scaling the first virtualization packet according to the load information and/or quality of service data of the plurality of virtualization packets comprises:
selecting a second virtualized packet from the plurality of virtualized packets according to the load information and/or quality of service data of the plurality of virtualized packets;
selecting a sixth gateway device from the second virtualization group, disconnecting the long connection established by the sixth gateway device, deleting the binding relationship established by the sixth gateway device, and allocating the sixth gateway device to the first virtualization group, so as to realize the expansion of the first virtualization group.
11. The method of claim 9, wherein scaling the first virtualization packet according to the load information and/or quality of service data of the plurality of virtualization packets comprises:
according to the load information and/or the service quality data of the plurality of virtualization groups, selecting a third virtualization group which shares the storage resource with the first virtualization group and corresponds to the first message service type by combining the sharing condition of the plurality of virtualization groups to the storage resource;
and disconnecting the long connection between the first message channel and the gateway equipment in the first virtualization group, migrating the first message channel to the third virtualization group, and dynamically establishing the binding relationship between the first message channel and the gateway equipment in the third virtualization group.
12. A message processing method, comprising:
acquiring routing information corresponding to a first message channel sent by a control device, wherein the first message channel is in butt joint with a first gateway group, the routing information comprises address information of gateway devices which establish long connection with the first message channel currently in the first gateway group, and the routing information changes along with the dynamic change of the binding relationship between the first message channel and the gateway devices in the first gateway group;
and according to the routing information and a first address list which is maintained in advance, carrying out routing addressing on the gateway equipment corresponding to the long connection to obtain the address information of target gateway equipment, and according to the address information of the target gateway equipment, sending a target message to the first message channel through the target gateway equipment so as to send the target message to a target terminal through the first message channel, wherein the address information of each gateway equipment in the first gateway group is stored in the first address list.
13. A message processing device, comprising: a memory and a processor; the memory for storing a computer program; the processor, coupled to the memory, is configured to execute the computer program to implement the steps of the method of any of claims 2-12.
14. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 2-12.
CN202210068462.1A 2022-01-20 2022-01-20 Message processing system and method, device and storage medium Active CN114095561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210068462.1A CN114095561B (en) 2022-01-20 2022-01-20 Message processing system and method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210068462.1A CN114095561B (en) 2022-01-20 2022-01-20 Message processing system and method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114095561A true CN114095561A (en) 2022-02-25
CN114095561B CN114095561B (en) 2022-07-08

Family

ID=80309090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210068462.1A Active CN114095561B (en) 2022-01-20 2022-01-20 Message processing system and method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114095561B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008154874A1 (en) * 2007-06-19 2008-12-24 Huawei Technologies Co., Ltd. Method and system for establishing tunnel in the evolution network
CN101483928A (en) * 2008-01-11 2009-07-15 华为技术有限公司 Establishing method, mobile network and policy control entity for data connection of mobile network
US20090252133A1 (en) * 2008-04-07 2009-10-08 Hitachi Communication Technologies, Ltd. Mobile communication system and access gateway having plural user plane agws
US8108554B1 (en) * 2002-05-16 2012-01-31 F5 Networks, Inc. Method and system for automatically mapping secure network address translations
US20120086581A1 (en) * 2010-10-04 2012-04-12 Measurement Specialties Inc. Water monitoring system
CN102761864A (en) * 2011-04-29 2012-10-31 中国移动通信集团公司 Data transmission method, system and device
CN104702602A (en) * 2015-03-04 2015-06-10 南京邮电大学 System and method of realizing dynamically creating channel and expansion of gateway cluster based on SIP (System in Package)
CN106686091A (en) * 2016-12-30 2017-05-17 广州尚融网络科技有限公司 Virtual channel control method and system
CN111565229A (en) * 2020-04-29 2020-08-21 创盛视联数码科技(北京)有限公司 Communication system distributed method based on Redis
US20210021671A1 (en) * 2018-04-28 2021-01-21 Beijing Jingdong Shangke Information Technology Co., Ltd. Fault handling method and device for gateway server
US11140020B1 (en) * 2018-03-01 2021-10-05 Amazon Technologies, Inc. Availability-enhancing gateways for network traffic in virtualized computing environments

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8108554B1 (en) * 2002-05-16 2012-01-31 F5 Networks, Inc. Method and system for automatically mapping secure network address translations
WO2008154874A1 (en) * 2007-06-19 2008-12-24 Huawei Technologies Co., Ltd. Method and system for establishing tunnel in the evolution network
CN101483928A (en) * 2008-01-11 2009-07-15 华为技术有限公司 Establishing method, mobile network and policy control entity for data connection of mobile network
US20090252133A1 (en) * 2008-04-07 2009-10-08 Hitachi Communication Technologies, Ltd. Mobile communication system and access gateway having plural user plane agws
US20120086581A1 (en) * 2010-10-04 2012-04-12 Measurement Specialties Inc. Water monitoring system
CN102761864A (en) * 2011-04-29 2012-10-31 中国移动通信集团公司 Data transmission method, system and device
CN104702602A (en) * 2015-03-04 2015-06-10 南京邮电大学 System and method of realizing dynamically creating channel and expansion of gateway cluster based on SIP (System in Package)
CN106686091A (en) * 2016-12-30 2017-05-17 广州尚融网络科技有限公司 Virtual channel control method and system
US11140020B1 (en) * 2018-03-01 2021-10-05 Amazon Technologies, Inc. Availability-enhancing gateways for network traffic in virtualized computing environments
US20210021671A1 (en) * 2018-04-28 2021-01-21 Beijing Jingdong Shangke Information Technology Co., Ltd. Fault handling method and device for gateway server
CN111565229A (en) * 2020-04-29 2020-08-21 创盛视联数码科技(北京)有限公司 Communication system distributed method based on Redis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨溢; 王志良; 王鲁; 张富深: "面向智能空间的异构网络同构化通信框架", 《计算机科学》 *
陈文艺; 高婧; 杨辉: "物联网网关实时双向通信模块化设计", 《计算机工程与设计》 *

Also Published As

Publication number Publication date
CN114095561B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN113726846B (en) Edge cloud system, resource scheduling method, equipment and storage medium
CN113301078B (en) Network system, service deployment and network division method, device and storage medium
KR102140636B1 (en) Building a pool-based M2M service layer through NFV
CN111638935B (en) Mirror image management method, network system, device, and storage medium
CN113301077B (en) Cloud computing service deployment and distribution method, system, equipment and storage medium
CN113300899B (en) Network capability opening method, network system, device and storage medium
CN113783922A (en) Load balancing method, system and device
CN111800285B (en) Instance migration method and device and electronic equipment
CN113301102A (en) Resource scheduling method, device, edge cloud network, program product and storage medium
EP3091712B1 (en) Smart device for realizing multiple-device collaboration and working method for multiple-device collaboration
CN113301079B (en) Data acquisition method, system, computing device and storage medium
CN113300865B (en) Management and control method, network system, equipment and storage medium
CN113301587B (en) Node control method, network system, device and storage medium
CN113300866B (en) Node capacity control method, device, system and storage medium
CN112905338B (en) Automatic computing resource allocation method and device
CN112953992B (en) Network system, communication and networking method, device and storage medium
CN114095561B (en) Message processing system and method, device and storage medium
CN114301909B (en) Edge distributed management and control system, method, equipment and storage medium
CN103442257A (en) Method, device and system for achieving flow resource management
CN112104789B (en) Cross-center seat automatic switching method, device, equipment and storage medium
CN113783963B (en) Data transmission method, server node, gateway equipment and network system
CN112616143B (en) Method and device for distributing communication numbers, electronic equipment and storage medium
CN105681262A (en) Interaction message allocating method and system
CN115617540A (en) Method, device and system for realizing cloud clipboard and storage medium
KR20140097717A (en) Resource Dependency Service Method for M2M Resource Management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40070775

Country of ref document: HK