CN111092942B - Message processing method and device, electronic equipment and storage medium - Google Patents

Message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111092942B
CN111092942B CN201911281684.6A CN201911281684A CN111092942B CN 111092942 B CN111092942 B CN 111092942B CN 201911281684 A CN201911281684 A CN 201911281684A CN 111092942 B CN111092942 B CN 111092942B
Authority
CN
China
Prior art keywords
session
message
server
client
state information
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.)
Active
Application number
CN201911281684.6A
Other languages
Chinese (zh)
Other versions
CN111092942A (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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911281684.6A priority Critical patent/CN111092942B/en
Publication of CN111092942A publication Critical patent/CN111092942A/en
Application granted granted Critical
Publication of CN111092942B publication Critical patent/CN111092942B/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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
    • 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/141Setup of application sessions
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a message processing method and device, electronic equipment and a storage medium. In the method, when a received message is a discovery phase message, a new session is established with a client side which sends the message, a unique session index is generated, the state information of the session is stored in an external storage system after the unique session index is associated with the session, and when the received message is a session phase message, the session index is obtained from the message, the state information of the corresponding session is searched in the external storage system according to the session index, and the session with the client side is executed according to the state information of the session. The invention can solve the problem of session interruption caused by the downtime of the server and the switching between the main standby or the load.

Description

Message processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a PPPoE message, an electronic device, and a storage medium.
Background
At present, a relatively extensive method used by various manufacturers in the PPPoE load balancing technology is to perform load balancing with state records, and the method includes:
1. selection of a server: when a PPPoE client sends a PPPoE first control message (i.e. a PADI message) to a load balancing device, the load balancing device calculates which PPPoE server the message should be processed by according to a certain load balancing algorithm, once selected, records the PPPoE server corresponding to the PPPoE control session, and if the PPPoE message of the PPPoE control session is, subsequently forwards the PPPoE message to the selected PPPoE server.
2. And (3) processing at the server side: the PPPoE server receives the PADI message of PPPoE, creates a new session and records the state information of the session to the local server for subsequent message processing. When the message of the same session sent by the subsequent PPPoE client is forwarded to the previously selected server through the load balancing device, the server finds out the previously recorded session state information according to the session, and updates the session state information after performing corresponding PPPoE self-protocol processing.
For example, the PPPoE client 1 performs PPPoE message interaction with the PPPoE server 1 through load balancing device allocation, the PPPoE server 1 stores session state information of the PPPoE client 1, and all subsequent messages of the session can only communicate with the PPPoE server 1, such as completing related actions of identity authentication, address allocation and the like of PPPoE dial-up networking.
However, according to the current scheme, once the message of the client identifies the PPPoE server, the client can only establish a connection with the PPPoE server in the PPPoE session period, and if a subsequent client establishes communication with another PPPoE server, the previous PPPoE session is interrupted because the other PPPoE server does not locally store the previous session state information. The inventors have therefore found that the existing solutions cause the following problems: because the session state information is stored in the local server, if the server is down or the active/standby and load switching is performed, the new server does not have the previous session state information, the previous PPPoE session is interrupted, and the interruption of the user network is indirectly caused, so that the normal service of the user is influenced.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, and a storage medium for processing a message, which can solve the problem of PPPoE session interruption caused by a PPPoE server going down, performing active/standby or load switching.
In order to solve the above problem, the present invention provides a method for processing a packet, where the method is executed in a server, and includes:
receiving a message, establishing a new session with a client sending the message when the message is a discovery phase message, generating a unique session index, associating the unique session index with the session, storing state information of the session into an external storage system, acquiring the session index from the message when the message is a session phase message, searching the state information of the corresponding session in the external storage system according to the session index, and executing the session with the client according to the state information of the session.
Preferably, the session index includes a session ID of the session and a MAC address of the client.
Preferably, the external storage system includes a database or a file system.
Preferably, before receiving the message, the method further includes a server selection step executed in the load balancing device, where the server selection step includes:
and when receiving the message sent by the client, selecting a server to process the message by adopting a load balancing algorithm, and forwarding the message to the selected server.
Preferably, the messages sent by the client include discovery phase messages and session phase messages.
In order to solve the above problem, the present invention further provides a message processing apparatus, including:
the session module is used for receiving a message, establishing a new session with a client sending the message when the message is a discovery phase message, generating a unique session index, storing the state information of the session into an external storage system after associating the unique session index with the session, acquiring the session index from the message when the message is a session phase message, searching the state information of the corresponding session in the external storage system according to the session index, and executing the session with the client according to the state information of the session.
Preferably, the apparatus further comprises:
and the server selection module is used for selecting a server to process the message by adopting a load balancing algorithm when receiving the message sent by the client, and forwarding the message to the selected server.
Preferably, the messages sent by the client include discovery phase messages and session phase messages
In order to solve the above problem, the present invention further provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to perform the message processing method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, characterized in that: the computer readable storage medium has at least one instruction stored therein, and the at least one instruction is executed by a processor in the electronic device to implement the message processing method described above.
It can be seen from the foregoing technical solutions that, in the embodiments of the present invention, the session state information is stored in an external storage system, the session state information is not stored in the server, and the session state information is acquired from the external storage system through a unique session index, so that it is ensured that a part of servers in the service cluster are down, and interruption of the PPPoE service is not affected.
In addition, in the session phase, the embodiment of the present invention may also use a preset load balancing algorithm to find a server that is currently online and has a smaller load, and is not limited to the server selected in the discovery phase. Therefore, the load balance of the server is better realized.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic application environment diagram of a message processing method according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of a method for implementing a message load balancing method according to a preferred embodiment of the present invention.
Fig. 3 is a flowchart of a method for establishing a message session according to a preferred embodiment of the message processing method of the present invention.
Fig. 4 is a functional block diagram of a preferred embodiment of the message processing apparatus of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device implementing a message processing method according to a preferred embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The invention relates to a message processing method, which stores PPPoE session state information through an external storage system, wherein the PPPoE server does not locally store any session state information, and when any PPPoE server receives a PPPoE control message, the session state information of the current message is read from the external storage system to carry out corresponding session, therefore, any one or more servers in a service cluster are down, and the other surviving servers can still obtain the state information of the current session from the external storage system to continue the previous PPPoE session, thereby realizing the high availability of the PPPoE control message. The following describes the implementation details of the message processing in this embodiment in more detail, and the following is only provided for the convenience of understanding, and is not necessary to implement the present embodiment.
Fig. 1 is a schematic diagram of an application environment of a message processing method according to a preferred embodiment of the present invention. The message processing method is applied to a network architecture comprising at least one load balancing device 1, a plurality of servers 2, an external storage system 3 and a plurality of clients 4. The load balancing apparatus 1, the plurality of servers 2, the external storage system 3, and the plurality of clients 4 communicate with each other via a network.
Including, but not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), etc.
In the embodiment of the present invention, when receiving a PPPoE message sent by a client 4, the load balancing device 1 selects a server 2 to process the PPPoE message by using a load balancing algorithm, and forwards the PPPoE message to the selected server 2.
And the server 2 judges whether the current stage belongs to a discovery stage or a session stage according to the received PPPoE message.
If the discovery phase is present, the server 2 performs the following operations:
a unique session index composed of a unique identifier, such as a session ID, and a client MAC address is generated, and after the session index is associated with session state information, the state information of the session is saved in the external storage system 3.
If the session is in the session phase, the server 2 performs the following operations:
and acquiring state information of a corresponding session from an external storage system 3 according to a unique session index (such as a session ID + a client MAC address) carried in the received PPPoE message, and executing a continuous session with the client 4 according to the state information of the session.
Specifically, the detailed embodiment of the message processing method according to the present invention can refer to the following descriptions of fig. 2 and fig. 3.
Fig. 2 is a flowchart of a method for implementing a message load balancing method according to a preferred embodiment of the message processing method of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The preferred embodiment of the message load balancing method shown in fig. 2 is applied to one or more electronic devices, where the electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
Preferably, in the embodiment of the present invention, the electronic device executing the message load balancing method shown in fig. 2 may be the load balancing device 1 shown in fig. 1. In other embodiments of the present invention, the electronic device may further include a network device and/or a user equipment that integrates a load balancing function. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers.
The preferred embodiment of the message load balancing method of the present invention aims to select the server 2 for message interaction for the client 4, and specifically comprises the following steps:
and S10, receiving the message sent by the client.
Preferably, the packet in the present invention is a PPPoE (Point-to-Point Protocol Over Ethernet) packet. The PPPoE is a point-to-point protocol over Ethernet, which is a network tunneling protocol that encapsulates a point-to-point protocol (PPP) in an Ethernet (Ethernet) framework. The PPPoE messages are data units transmitted in ethernet frames using the PPP protocol.
S20, selecting a server to process the message by adopting a load balancing algorithm.
The load balancing algorithm can adopt any applicable load balancing algorithm, including but not limited to a polling method, a random method, a source address hashing method, a weighted polling method, a weighted random method, a minimum connection method and the like.
S30, forwarding the PPPoE message to the selected server.
In the preferred embodiment of the invention, when receiving the PPPoE message sent by the client, no matter whether the PPPoE message is in a discovery stage or a session stage, a preset load balancing algorithm can be adopted to find a server which is currently online and has a smaller load to process the PPPoE message.
In the existing solution, in a discovery phase, a server for processing the PPPoE message is determined by a load balancing algorithm, and the server needs to process the PPPoE message in a session phase. By utilizing the embodiment of the invention, a preset load balancing algorithm can be adopted to find a server which is on line currently and has smaller load in the session stage, and the server is not limited to the server selected in the discovery stage, so that the load balancing of the server is better realized.
Fig. 3 is a flowchart of a method for establishing a message session according to a preferred embodiment of the message processing method of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The preferred embodiment of the message session establishment method shown in fig. 3 is applied to one or more servers, and is intended to establish a session with a client to implement message interaction, and specifically includes the following steps:
and S20, receiving the message forwarded by the load balancing equipment.
S21, determine whether the message is a discovery phase message or a session phase message?
The workflow of the PPPoE messages comprises a discovery phase and a session phase, the purpose of the discovery phase being to obtain the ethernet MAC address of the server serving the client, thereby establishing a point-to-point connection between the client and the server. In the session stage, a PPP protocol is used to exchange data messages between the client and the server that have established the point-to-point connection, thereby completing a series of PPP processes.
The following introduces the four steps involved in the PPPoE discovery phase, with the user's computer as the client and the DSL access concentrator (DSL-AC) of the ISP as the server:
1. the client sends (PADI, PPPoE Active Discovery Initiation) message to the server.
If a user wants to access the Internet using DSL dial-up, the user's computer must first find a DSL access concentrator (DSL-AC) at the ISP's network service provider point (POP) and communicate over the ethernet network only through the MAC address. Since the computer does not know the MAC address of the DSL-AC, a PADI message is broadcast over the ethernet, which contains the MAC address of the sender, i.e. the client.
The PADI message may be received by more than one DSL-AC, and only DSL-AC devices that can provide a "Service-Name" should reply.
2. The server responds to the client with a PADO (PPPoE Active Discovery Offer) message.
Once the user computer sends the PADI message, the DSL-AC replies to a PADO message using the MAC address provided in the PADI. The MAC address, name and service name of the DSL-AC are contained in the PADO message.
3. The client sends PADR (PPPoE Active Discovery Request) message to the server.
When the user computer receives an acceptable PADO message from the DSL-AC, a PADR message is sent to the DSL-AC to confirm the PPPoE connection provided by the DSL-AC which receives the PADO message.
4. The server sends a PADS (PPPoE Active Discovery Session-configuration) message to the client.
The PADR message above is acknowledged by the PADS message of the DSL-AC and carries a Session ID therein, whereby the user computer creates a connection with this DSL-AC.
The session phase is a session using the connection created by the user computer and the DSL-AC, exchanging data.
S22, when the message is a discovery phase message, establishing a new session with the client, generating a unique session index, and associating the unique session index with the session.
As described above, the connection between the server and the client is realized through the PADI message, PADO message, PADR message, and PADS message, so as to establish a new Session and a unique Session (Session) ID for the Session.
Further, the present invention generates the unique session index using the SessionID and the MAC address of the client.
Other preferred embodiments of the present invention may also generate the session index according to other information, such as cookies.
And S23, storing the state information of the session into an external storage system.
The external storage system is not limited to a database, a file system and the like and is used for storing the state information of the PPPoE session, so that the condition that a part of server ends in the service cluster are down is ensured, and the interruption of the PPPoE service is not influenced.
S24, when the message is a session stage message, acquiring a session index from the PPPoE message, and searching the state information of the corresponding session in an external storage system according to the session index.
And S25, continuing the conversation with the client according to the state information of the conversation.
In the embodiment of the invention, the PPPoE session state is not stored in the server, the session stage is based on stateless operation in the discovery phase, but the state information of the PPPoE session is stored by an external storage system (not limited to a database, a file system and the like), and the state information of the session is acquired from the external storage system through a unique session index, such as a client MAC address + session ID or a client MAC address + cookie and the like, so that the downtime of a part of server terminals in a service cluster is ensured, and the interruption of the PPPoE service is not influenced.
Fig. 4 is a functional block diagram of a message processing apparatus according to a preferred embodiment of the present invention.
Depending on the implemented functions, the message processing apparatus 100 may include a server selection module 101 and a session module 102. The modules of the present invention, which may also be referred to as units, refer to a series of computer program segments that can be executed by a processor of the electronic device 10 and that can perform a fixed function, and are stored in a memory of the electronic device, such as a load balancing device, a server, etc. In the embodiment of the present invention, a part of modules in the message processing apparatus 100 may be installed in a load balancing device, and a part of modules may be installed in a server. Preferably, the server selection module 101 is installed in the load balancing apparatus 1, and the session module 102 is installed in the server 2.
In the present embodiment, the functions of the respective modules/units are as follows:
the server selection module 101 is configured to select a server to process a packet by using a load balancing algorithm when a load balancing device receives the packet sent by a client, and forward the packet to the selected server.
The load balancing algorithm can adopt any applicable load balancing algorithm, including but not limited to a polling method, a random method, a source address hashing method, a weighted polling method, a weighted random method, a minimum connection method and the like.
In the preferred embodiment of the present invention, each time a PPPoE message sent by a client is received, no matter whether the PPPoE message is in a discovery phase or a session phase, the server selection module 101 may use a preset load balancing algorithm to find a server that is currently online and has a smaller load to process the PPPoE message.
The session module 102 is configured to receive a PPPoE message forwarded by the load balancing device, establish a new session with the client when the message is a discovery-stage message, generate a unique session index, associate the unique session index with the session, and store state information of the session in an external storage system, or obtain a session index from the PPPoE message when the message is a session-stage message, and search for corresponding state information of the session in the external storage system according to the session index.
In this embodiment of the present invention, the session module 102 does not store the state information of the PPPoE session in the server, but stores the state information in an external storage system, and obtains the state information of the session from the external storage system through a unique session index, such as a client MAC address + session ID or a client MAC address + cookie, so as to ensure that a part of the servers in the service cluster are down and not affect the interruption of the PPPoE service.
Fig. 5 is a schematic structural diagram of an electronic device implementing a resource scheduling method according to a preferred embodiment of the present invention.
The electronic device 10 may be the load balancing device 1 and the server 2, and further, the electronic device 10 may include a processor 11, a memory 12 and a bus, and may further include a computer program, such as a message processing program 13, stored in the memory 12 and executable on the processor 11.
The memory 12 includes at least one type of readable storage medium, which includes flash memory, removable hard disks, multimedia cards, card-type memories (e.g., SD or DX memories, etc.), magnetic memories, magnetic disks, optical disks, etc. The memory 12 may in some embodiments be an internal storage unit of the electronic device 10, such as a removable hard disk of the electronic device 10. The memory 12 may also be an external storage device of the electronic device 10 in other embodiments, such as a plug-in removable hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so on, provided on the electronic device 10. Further, the memory 12 may also include both internal storage units and external storage devices of the electronic device 10. The memory 12 may be used not only to store application software installed in the electronic device 10 and various types of data, such as codes of a resource scheduler, etc., but also to temporarily store data that has been output or is to be output.
The processor 11 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 11 is a Control Unit (Control Unit) of the electronic device 10, connects various components of the electronic device 10 by using various interfaces and lines, and executes various functions and processes data of the electronic device 10 by running or executing programs or modules (e.g., executing resource scheduling programs, etc.) stored in the memory 12 and calling data stored in the memory 12.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 12 and at least one processor 11 or the like.
Fig. 5 shows only the electronic device 10 with components 10-11, and those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the electronic device 10, and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
For example, although not shown, the electronic device 10 may further include a power supply (such as a battery) for supplying power to various components, and preferably, the power supply may be logically connected to the at least one processor 11 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 10 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 10 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (e.g., a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device 10 and other electronic devices.
Optionally, the electronic device 10 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device 10 and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The message processing program 13 stored in the memory 12 of the electronic device 10 is a combination of instructions, which when executed in the processor 11, can implement:
when receiving a message sent by a client, load balancing equipment selects a server to process the message by adopting a load balancing algorithm and forwards the message to the selected server;
the selected server receives the message, establishes a new session with the client when the message is a discovery phase message, generates a unique session index, associates the unique session index with the session, and stores the state information of the session in an external storage system, or acquires the session index from the message when the message is a session phase message, searches the corresponding session state information in the external storage system according to the session index, and executes the session with the client according to the session state information.
Specifically, the processor 11 may refer to the description of the relevant steps in the embodiments corresponding to fig. 2 and fig. 3, which is not repeated herein.
Further, the integrated modules/units of the electronic device 10, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not to denote any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (6)

1. A method for processing a message, the method running in a server, comprising:
receiving a message, establishing a new session with a client sending the message when the message is a discovery phase message, generating a unique session index, associating the unique session index with the session, storing state information of the session into an external storage system, acquiring the session index from the message when the message is a session phase message, searching the state information of the corresponding session in the external storage system according to the session index, and executing the session with the client according to the state information of the session;
before receiving the message, the method further comprises a server selection step executed in the load balancing device, wherein the server selection step comprises the following steps:
when a message sent by the client is received, selecting a server to process the message by adopting a load balancing algorithm, and forwarding the message to the selected server; the messages sent by the client comprise discovery-stage messages and session-stage messages.
2. The message processing method according to claim 1, wherein the session index includes a session ID of the session and a MAC address of the client.
3. The message processing method according to claim 1, characterized in that the external storage system comprises a database and/or a file system.
4. A message processing apparatus, the apparatus comprising:
the session module is used for receiving a message, establishing a new session with a client side which sends the message when the message is a discovery phase message, generating a unique session index, storing the state information of the session into an external storage system after associating the unique session index with the session, acquiring the session index from the message when the message is a session phase message, searching the state information of the corresponding session in the external storage system according to the session index, and executing the session with the client side according to the state information of the session;
the device further comprises:
the server selection module is used for selecting a server to process the message by adopting a load balancing algorithm when receiving the message sent by the client and forwarding the message to the selected server; the messages sent by the client comprise discovery phase messages and session phase messages.
5. An electronic device, characterized in that the electronic device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the message processing method of any of claims 1 to 3.
6. A computer-readable storage medium characterized by: the computer-readable storage medium has stored therein at least one instruction that is executed by a processor in an electronic device to implement the message processing method of any of claims 1 to 3.
CN201911281684.6A 2019-12-13 2019-12-13 Message processing method and device, electronic equipment and storage medium Active CN111092942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911281684.6A CN111092942B (en) 2019-12-13 2019-12-13 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911281684.6A CN111092942B (en) 2019-12-13 2019-12-13 Message processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111092942A CN111092942A (en) 2020-05-01
CN111092942B true CN111092942B (en) 2023-04-07

Family

ID=70396042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911281684.6A Active CN111092942B (en) 2019-12-13 2019-12-13 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111092942B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301097A (en) * 2020-12-30 2021-08-24 阿里巴巴集团控股有限公司 Data transmission method and device
CN113596098B (en) * 2021-07-01 2023-04-25 杭州迪普科技股份有限公司 Session retrieval method, apparatus, device and computer readable storage medium
CN115150448B (en) * 2022-06-14 2023-08-25 北京车网科技发展有限公司 Session data processing method, system, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766373B1 (en) * 2000-05-31 2004-07-20 International Business Machines Corporation Dynamic, seamless switching of a network session from one connection route to another
CN1972238A (en) * 2005-11-24 2007-05-30 上海贝尔阿尔卡特股份有限公司 A PPPoE protocol message transfer method
CN102394857A (en) * 2011-06-29 2012-03-28 福建星网锐捷网络有限公司 Method, device and equipment for establishing point-to-point protocol session on Ethernet
CN104009961A (en) * 2013-02-25 2014-08-27 杭州华三通信技术有限公司 PPPoE session ID distribution method and equipment thereof
WO2016107458A1 (en) * 2014-12-29 2016-07-07 阿里巴巴集团控股有限公司 Method and server for recovering session, and method and apparatus for generating session certificate

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9014038B2 (en) * 2011-12-19 2015-04-21 Bandwidth.Com, Inc. Intelligent multi-streaming for enhancing or avoiding dropped and interrupted communication sessions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766373B1 (en) * 2000-05-31 2004-07-20 International Business Machines Corporation Dynamic, seamless switching of a network session from one connection route to another
CN1972238A (en) * 2005-11-24 2007-05-30 上海贝尔阿尔卡特股份有限公司 A PPPoE protocol message transfer method
CN102394857A (en) * 2011-06-29 2012-03-28 福建星网锐捷网络有限公司 Method, device and equipment for establishing point-to-point protocol session on Ethernet
CN104009961A (en) * 2013-02-25 2014-08-27 杭州华三通信技术有限公司 PPPoE session ID distribution method and equipment thereof
WO2016107458A1 (en) * 2014-12-29 2016-07-07 阿里巴巴集团控股有限公司 Method and server for recovering session, and method and apparatus for generating session certificate

Also Published As

Publication number Publication date
CN111092942A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN111092942B (en) Message processing method and device, electronic equipment and storage medium
CN107078969B (en) Realize computer equipment, the system and method for load balancing
US11392995B2 (en) Efficient translation and load balancing of OpenRTB and header bidding requests
CN110313163A (en) Load balance in distributed computing system
CN112015544A (en) Load balancing method, device and equipment of k8s cluster and storage medium
CN110442610A (en) The method, apparatus of load balancing calculates equipment and medium
CN110659109A (en) Openstack cluster virtual machine monitoring system and method
CN110808857B (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
CN107105013B (en) File processing method, server, terminal and system
CN110300070B (en) Selective modification of power states based on conditions
CN114124968B (en) Load balancing method, device, equipment and medium based on market data
CN110928637A (en) Load balancing method and system
CN112948723A (en) Interface calling method and device and related equipment
CN107070719B (en) Equipment management method and device
CN107249038A (en) Business datum retransmission method and system
CN114827161A (en) Service calling request sending method and device, electronic equipment and readable storage medium
CN108650337B (en) Server detection method, system and storage medium
CN113179295A (en) Message processing method and device
CN113242299A (en) Disaster recovery system, method, computer device and medium for multiple data centers
CN111010362B (en) Monitoring method and device for abnormal host
CN114513792B (en) Remote network control method and device based on eSIM card
CN104580098B (en) A kind of service sharing method and device
CN113206878A (en) Multi-terminal cluster networking communication control method and device, server and cluster networking
CN112631866A (en) Server hardware state monitoring method and device, electronic equipment and medium

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