WO2020001110A1 - 一种信息的处理方法、装置、设备及系统 - Google Patents

一种信息的处理方法、装置、设备及系统 Download PDF

Info

Publication number
WO2020001110A1
WO2020001110A1 PCT/CN2019/080071 CN2019080071W WO2020001110A1 WO 2020001110 A1 WO2020001110 A1 WO 2020001110A1 CN 2019080071 W CN2019080071 W CN 2019080071W WO 2020001110 A1 WO2020001110 A1 WO 2020001110A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
network access
access layer
terminal device
session identifier
Prior art date
Application number
PCT/CN2019/080071
Other languages
English (en)
French (fr)
Inventor
寇冠楠
张洪全
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to SG11202006195UA priority Critical patent/SG11202006195UA/en
Priority to EP19824895.7A priority patent/EP3720094B1/en
Publication of WO2020001110A1 publication Critical patent/WO2020001110A1/zh
Priority to US16/888,582 priority patent/US11005947B2/en

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • This specification relates to the field of computer technology, and in particular, to a method, a device, a device, and a system for processing information.
  • the current Internet of Things service solutions are that the network long connection is maintained between the terminal and the IoT HUB (Internet Things HUB, Internet of Things forwarding device), and maintaining a long connection will cause a large resource overhead on the server, such as heartbeat processing, Memory overhead, etc. will lead to low performance of the IoT HUB system responsible for message processing, which will lead to excessive memory overhead and heartbeat maintenance overhead of IoT HUB, especially in hundreds of millions of IoT scenarios. Therefore, in the IoT service field , Need a more stable, server-side resource consumption less equipment connection solution.
  • the purpose of the embodiments of the present specification is to provide an information processing method, device, device, and system, so as to provide a device connection solution that is more stable and consumes less resources on the server side.
  • a method for processing information provided in the embodiments of the present specification is applied to a network access layer device, the network access layer device and a terminal device are long-term connections, and the network access layer device and message forwarding There are short connections between devices, including:
  • the method further includes:
  • the method further includes:
  • a method for processing information provided in the embodiments of the present specification is applied to a terminal device, and the terminal device and the network access layer device are long-term connections, including:
  • a target message sending the target message to a message forwarding device, receiving a downlink message sent by the message forwarding device, the downlink message including the session identifier, and determining a receiving device of the downlink message according to the session identifier ;
  • the method further includes:
  • the sending a heartbeat request to the network access layer device includes:
  • a heartbeat request is sent to the network access layer device.
  • a method for processing information provided in the embodiments of the present specification is applied to a message forwarding device, and the message forwarding device is a short connection with a network access layer device, including
  • Target message is a short connection of an uplink message sent by a terminal device and a session identifier of a long connection established between the network access layer device and the terminal device Get after the package;
  • the apparatus and the terminal device are long-term connections, and the apparatus and the message forwarding device are short-term connections, including:
  • a message receiving module configured to receive an uplink message sent by the terminal device
  • An encapsulation module configured to encapsulate the uplink message and a session identifier of a long connection maintained with the terminal device into a target message in the case of a short connection;
  • a transceiver module configured to send the target message to the message forwarding device, and receive a downlink message corresponding to the target message sent by the message forwarding device, where the downlink message includes the session identifier;
  • a device determining module configured to determine a receiving device of the downlink message according to the session identifier
  • a message sending module is configured to send the downlink message to the terminal device corresponding to the session identifier.
  • the apparatus further includes:
  • a request receiving module configured to receive a heartbeat request sent by the terminal device
  • a response acquisition module configured to acquire heartbeat response information corresponding to the heartbeat request
  • a response information sending module configured to send the heartbeat response information to the terminal device.
  • the apparatus further includes:
  • a heartbeat acquisition module configured to acquire heartbeat information of the terminal device when a predetermined heartbeat reporting period is reached;
  • a heartbeat sending module configured to send the heartbeat information to the terminal device.
  • An information processing apparatus provided in an embodiment of the present specification.
  • the apparatus and the network access layer device are connected for a long time, and include:
  • a message sending module is configured to send an uplink message to a network access layer device, so that the network access layer device encapsulates the uplink message and a session identifier of a long connection maintained with the network access layer device.
  • the target message in the case of a short connection, sending the target message to a message forwarding device, receiving a downlink message sent by the message forwarding device, the downlink message including the session identifier, and determining the destination message according to the session identifier
  • the message receiving module is configured to receive a downlink message corresponding to the uplink message sent by the network access layer device.
  • the apparatus further includes:
  • a request sending module configured to send a heartbeat request to the network access layer device
  • the response information receiving module is configured to receive heartbeat response information corresponding to the heartbeat request sent by the network access layer device.
  • the request sending module is configured to send a heartbeat request to the network access layer device when a predetermined heartbeat detection period is reached.
  • An information processing apparatus provided in an embodiment of the present specification.
  • the apparatus is applied to a message forwarding device, and the message forwarding device is a short connection with a network access layer device, and includes:
  • a message receiving module is configured to receive a target message sent by a network access layer device, where the target message is an uplink message sent by a terminal device and a long connection established between the network access layer device and the terminal device
  • the session identifier is obtained after encapsulation in the case of a short connection
  • the message sending module is configured to send a downlink message corresponding to the target message to the network access layer device, where the downlink message includes the session identifier.
  • An embodiment of this specification provides a network access layer device.
  • the network access layer device and a terminal device are long-term connections, and the network access layer device and a message forwarding device are short-term connections.
  • the network The access layer equipment includes:
  • a memory arranged to store computer-executable instructions which, when executed, cause the processor to:
  • a terminal device provided in an embodiment of this specification is a long connection between the terminal device and a network access layer device.
  • the terminal device includes:
  • a memory arranged to store computer-executable instructions which, when executed, cause the processor to:
  • a target message sending the target message to a message forwarding device, receiving a downlink message sent by the message forwarding device, the downlink message including the session identifier, and determining a receiving device of the downlink message according to the session identifier ;
  • the message forwarding device is a short connection with a network access layer device.
  • the message forwarding device includes:
  • a memory arranged to store computer-executable instructions which, when executed, cause the processor to:
  • Target message is a short connection of an uplink message sent by a terminal device and a session identifier of a long connection established between the network access layer device and the terminal device Get after the package;
  • the system includes a network access layer device, a terminal device, and a message forwarding device, wherein:
  • the network access layer device encapsulates the uplink message and a session identifier of a long connection maintained with the terminal device into a target message in the case of a short connection, and sends the target message to the message forwarding device;
  • the network access layer device determines a receiving device of the downlink message according to the session identifier, and sends the downlink message to the terminal device corresponding to the session identifier.
  • the network access layer device is an independent device.
  • the system includes a plurality of the network access layer devices, each of the network access layer devices and the message forwarding device are short-connected, and at least one of the network access layer devices and There is a long connection between the terminal devices.
  • the embodiments of the present specification include a network access layer device, a terminal device, and a message forwarding device.
  • the network access layer device and the terminal device are long-term connections
  • the network access Layer device and message forwarding device is a short connection.
  • the network access layer device receives the uplink message sent by the terminal device, and then encapsulates the uplink message and the session identifier of the long connection maintained with the terminal device into a short connection.
  • Send the target message to the message forwarding device and receive the downlink message corresponding to the target message sent by the message forwarding device.
  • the downlink message includes the session identifier.
  • the session identifier Based on the session identifier, determine the receiving device of the downstream message, and send the downstream message. Sent to the terminal device corresponding to the session identifier. In this way, the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long network connection is performed by a more efficient network access layer device To decouple the message forwarding device from the processing of network packets, thereby High message forwarding device system performance, reducing the resource consumption of the message forwarding device. In addition, the network access layer device saves the long connection state. When the message forwarding device performs downlink message push, the network access layer device can correctly find the corresponding terminal. Device and push.
  • FIG. 1 is an embodiment of a method for processing information in this specification
  • FIG. 2 is an embodiment of an information processing system of this specification
  • FIG. 3 is another embodiment of a method for processing information in this specification
  • FIG. 6 is an embodiment of an information processing apparatus of the present specification
  • FIG. 7 is another embodiment of an information processing apparatus of the present specification.
  • FIG. 8 is another embodiment of an information processing apparatus of the present specification.
  • FIG. 9 is an embodiment of a network access layer device of this specification.
  • FIG. 10 is an embodiment of a terminal device of this specification.
  • FIG. 11 is an embodiment of a message forwarding device of this specification.
  • FIG. 12 is an embodiment of an information processing system of the present specification.
  • FIG. 13 is another embodiment of an information processing system of the present specification.
  • the embodiments of the present specification provide a method, a device, a device, and a system for processing information.
  • an embodiment of the present specification provides a method for processing information.
  • the execution subject of the method may be a network access layer device.
  • the network access layer device may be a terminal device or a server.
  • the terminal device may A device such as a personal computer may also be a mobile terminal device such as a mobile phone or a tablet computer, and the terminal device may be a terminal device used by a user.
  • the server can be an independent server or a server cluster composed of multiple servers.
  • the server can be a background server for a certain business, or a server in the Internet of Things, etc.
  • the server can provide information transmission and reception, and information. Processing and other functions.
  • This method can be used to solve the problem that terminal devices in a network such as the Internet of Things need to maintain a long-term connection with a message forwarding device and the like, which causes a large resource consumption of the message forwarding device.
  • the information processing system corresponding to the information processing method in the embodiment of the present specification may include a terminal device, a network access layer device, and a message forwarding device (such as IoT HUB, etc.), among which the network access layer device There is a long connection with the terminal device, and a short connection between the network access layer device and the message forwarding device.
  • the long connection can be a TCP (Transmission Control Protocol) connection between the two devices.
  • the connection can perform duplex communication (that is, two-way data transmission can be allowed between two devices), and the short connection can be a connection that requires a new TCP connection for communication between each request between the devices.
  • the method may specifically include the following steps:
  • step S102 an uplink message sent by the terminal device is received.
  • the terminal device may be a terminal device used by a user, and the terminal device may be a device such as a personal computer or a mobile terminal device such as a mobile phone or a tablet computer.
  • the uplink message can be any information sent by the terminal device, and the content of the uplink message can be different according to the purpose of the information, such as request information for a certain service, certain instruction information, or some message.
  • the embodiment of the present description proposes a two-layer IoT gateway architecture.
  • a high-performance network access layer is used to maintain the long-term connection of the terminal device, and at the same time, the uplink message of the terminal device is converted into a short connection.
  • Target message and send it to IoT HUB, so that IoT HUB's message processing and network connection processing are decoupled, thereby improving the performance of the IoT HUB system, which can specifically include the following:
  • An application can be installed in the terminal device, such as an instant messaging application, a music player application, and a data storage application.
  • an application corresponding to a service can start the application.
  • the application can provide users with the above-mentioned business-related services. Different services can be triggered by corresponding buttons or links in the application. For example, when the user clicks When a button is pressed in the application, the terminal device performs the function corresponding to the button. For example, if the user clicks the download button in the application, the terminal device can obtain the selected file to be downloaded, and can download the file to be downloaded. .
  • the terminal device can obtain the related content of the button or link, and can generate an uplink message based on the obtained related content. Then, based on the long connection between the network access layer device and the terminal device, the terminal device sends the above uplink message to the network access layer device, and the network access layer device can receive the uplink message.
  • step S104 the above uplink message and the session identifier of the long connection maintained with the terminal device are encapsulated into a target message in the case of a short connection.
  • the target message may be information in the case of a short connection, and the main content of the target message and the uplink message may be the same.
  • the uplink message is a request message for obtaining information A
  • the target message may also be used to obtain the information in the case of a short connection.
  • Request message for information A etc.
  • the session identifier may be an identifier of a long connection between two devices, or may be referred to as a connection identifier, etc.
  • the session identifier may be a unique identifier of a long connection established between the devices.
  • the uplink message sent by the terminal device to the network access layer device should also be a message in the case of a long connection.
  • the above uplink message needs to be encapsulated into a target message in the case of a short connection, so that the message forwarding device can identify and process the target message.
  • the network access layer device may encapsulate the uplink message into a target message in the case of a short connection based on a preset message conversion rule or message encapsulation rule.
  • the message conversion rule or the message encapsulation rule can be set according to the actual situation, which is not limited in the embodiments of the present specification.
  • a unique identifier (ie, session identifier) can be set for the long connection established between the terminal device and the network access layer device.
  • session identifier It is easy to find a terminal device that has a long connection with the network access layer device.
  • the session identifier of the long connection between the terminal device and the network access layer device is also encapsulated in the target message.
  • the target message may include a session identifier of a long connection between the terminal device and the network connection layer device.
  • step S106 the target message is sent to a message forwarding device, and a downlink message corresponding to the target message sent by the message forwarding device is received, where the downlink message includes the session identifier.
  • the downlink message may be a message for an uplink message, and may specifically be a corresponding message of the uplink message, or may be a notification message obtained after the uplink message is executed.
  • the message forwarding device may be a message forwarding device of a certain service, etc.
  • the message forwarding device may include an Internet of Things forwarding device, that is, IoT HUB, etc.
  • the network access layer device can base the target on the short connection between the network access layer device and the message forwarding device.
  • the message is sent to the message forwarding device.
  • the message forwarding device may analyze and process the target information.
  • a downlink message may be generated from the processed related information.
  • the session identifier of the long connection between the terminal device and the network connection layer device may be written into the downlink message.
  • the downlink message may be sent to the network access layer device based on the short connection between the network access layer device and the message forwarding device.
  • the network access layer device can receive the downlink message sent by the message forwarding device.
  • step S108 the receiving device of the downlink message is determined according to the session identifier.
  • the network access layer device may analyze the downlink message and extract a session identifier from the downlink message.
  • the network access layer device stores in advance the session identifier currently establishing a long connection with the terminal device.
  • the extracted session identifier can be matched with the session identifier stored in the network access layer device to determine whether the pre-stored session identifier is The extracted session identifier exists. If it exists, the corresponding long connection can be determined through the session identifier, and then the corresponding terminal device can be obtained through the determined long connection, and the obtained terminal device can be determined as the receiving device of the downstream message.
  • step S110 the downlink message is sent to a terminal device corresponding to the session identifier.
  • the network access layer device after the network access layer device determines the receiving device of the downlink message, it can send the downlink message to the determined receiving device, that is, the network access layer device can send the downlink message to the terminal device corresponding to the session identifier.
  • an embodiment of the present specification provides a method for processing information.
  • the method may be executed by a terminal device.
  • the terminal device may be a device such as a personal computer or a mobile terminal such as a mobile phone or a tablet computer.
  • the terminal device may be a terminal device used by a user.
  • This method can be used to solve the problems that terminal devices in a network such as the Internet of Things need to maintain a long-term connection with business message forwarding devices and the like, which causes a large resource consumption of business message forwarding devices.
  • the information processing system corresponding to the information processing method in the embodiment of the present specification may include a terminal device, a network access layer device, and a message forwarding device.
  • the network access layer device and the terminal device are: Long connection.
  • the network access layer device and the message forwarding device are short connections.
  • the long connection can be a TCP (Transmission Control Protocol) connection between the two devices.
  • the connection is kept open, and duplex can be performed. Communication (that is, two-way data transmission can be allowed between two devices).
  • a short connection can be a connection that requires a new TCP connection for each request between the devices.
  • the method may specifically include the following steps:
  • an uplink message is sent to the network access layer device, so that the network access layer device encapsulates the uplink message and the session identifier of the long connection maintained with the network access layer device as a target in the case of a short connection.
  • a message sending a target message to a message forwarding device, and receiving a downlink message sent by the message forwarding device.
  • the downlink message includes a session identifier, and the receiving device of the downlink message is determined according to the session identifier.
  • step S304 a downlink message corresponding to the uplink message sent by the network access layer device is received.
  • an embodiment of the present specification provides a method for processing information.
  • the execution subject of the method may be a message forwarding device.
  • the message forwarding device may be an independent server or may be composed of multiple servers.
  • a server cluster, and the message forwarding device may be a message forwarding device in the Internet of Things, etc.
  • the message forwarding device may have functions such as information sending and receiving, and information processing. This method can be used to solve the problem that terminal devices in a network such as the Internet of Things need to maintain a long-term connection with a message forwarding device and the like, which causes a large resource consumption of the message forwarding device.
  • the information processing system corresponding to the information processing method in the embodiment of the present specification may include a terminal device, a network access layer device, and a message forwarding device (such as a message forwarding device such as IoT HUB).
  • a message forwarding device such as a message forwarding device such as IoT HUB.
  • the long connection can be a TCP (Transmission Control Protocol) connection between the two devices.
  • An unbroken connection can perform duplex communication (that is, two-way data transmission can be allowed between two devices), and a short connection can be a connection that requires a new TCP connection for communication between each request between the devices.
  • the method may specifically include the following steps:
  • step S402 a target message sent by a network access layer device is received, where the target message is a short connection of an uplink message sent by the terminal device and a session identifier of a long connection established between the network access layer device and the terminal device. Get after the package.
  • step S404 a downlink message corresponding to the target message is sent to a network access layer device, and the downlink message includes the foregoing session identifier.
  • the embodiment of the present specification provides a method for processing information, which is applied to a network access layer device, where the network access layer device and the terminal device are a long connection, and the network access layer device and the message forwarding device are a short connection.
  • Receive the uplink message sent by the terminal device through the network access layer device and then encapsulate the uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection, and send the target message to the message
  • the forwarding device receives the downlink message corresponding to the target message sent by the message forwarding device.
  • the downlink message includes a session identifier.
  • the receiving device of the downlink message is determined, and the downlink message is sent to the terminal device corresponding to the session identifier.
  • the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long-term network connection is handled by the more efficient network access layer device, which will forward the message forwarding device from the network packet processing. Decoupling, thereby improving the performance of the message forwarding equipment system and reducing message forwarding Preparation of resource consumption, Further, the network access layer device is connected to the long preservation status, message forwarding device during a push downlink message, the network access layer device can find the right and push the appropriate terminal.
  • an embodiment of the present specification provides a method for processing information.
  • the method may be jointly performed by a network access layer device, a terminal device, and a message forwarding device.
  • the network access layer device may be a terminal device or a server.
  • the terminal device may be a device such as a personal computer or a mobile terminal device such as a mobile phone or a tablet computer.
  • the terminal device may be a terminal device used by a user.
  • the server may be an independent server or a server cluster composed of multiple servers.
  • the message forwarding device may be a forwarding device in the Internet of Things, etc.
  • the message forwarding device may have functions such as information sending and receiving, and information processing. This method can be used to solve the problem that terminal devices in a network such as the Internet of Things need to maintain a long-term connection with a message forwarding device and the like, which causes a large resource consumption of the message forwarding device.
  • the information processing system corresponding to the information processing method in the embodiment of the present specification may include a terminal device, a network access layer device, and a message forwarding device.
  • the network access layer device and the terminal device are long-term connections
  • the network access Layer devices and message forwarding devices are short connections.
  • the long connection can be a TCP (Transmission Control Protocol) connection between the two devices.
  • the connection is kept open, and duplex communication can be performed (that is, two devices). Two-way data transmission can be allowed between), and a short connection can be a connection that requires a new TCP connection for communication between each request between devices.
  • the method may specifically include the following steps:
  • step S502 the terminal device sends an uplink message to the network access layer device.
  • the network access layer device can be set with a domain session mechanism.
  • the session mechanism can refer to the time interval between the communication between a terminal device and the interactive system. It can usually refer to the time between entering the interactive system and logging out of the interactive system.
  • the elapsed time for example, when a user browses a website, the time from entering the website to closing the browser, that is, the time the user spends browsing this website is the Session mechanism.
  • the Session mechanism in the embodiment of the present specification may be a mechanism associated with a network protocol. In this case, the Session mechanism may imply the meaning of connection-oriented and / or maintaining state. Among them, connection-oriented may be the two parties that need to communicate before communicating. Establishing a communication channel, maintaining state can mean that the communicating party can associate a series of messages, so that the messages can depend on each other.
  • the network access layer device can first detect whether the request from the terminal device already contains a Session ID, which can be called a Session ID (that is, a session ID) ), If it already contains a Session ID, it can be said that a Session has been created for this terminal device before, at this time, the network access layer device can retrieve this Session for use according to the Session ID (if the Session ID cannot be retrieved, then You can re-create a Session ID).
  • a Session ID that is, a session ID
  • a Session is created for this terminal device, and a Session ID associated with the Session is generated.
  • the value of the Session ID can be a character string that is neither duplicated nor easily found to be regular.
  • the Session in the network access layer device can store information such as the status of each TCP connection.
  • each Session For a long connection between each terminal device and the network access layer device, there is a Session corresponding to it in the network access layer device.
  • Each Session will be assigned a unique Session ID (that is, a session ID) for unique Determine the corresponding long connection.
  • step S504 the network access layer device encapsulates the above uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection.
  • step S506 the network access layer device sends the target message to the message forwarding device.
  • step S508 the message forwarding device sends a downlink message corresponding to the target message to the network access layer device, and the downlink message includes the foregoing session identifier.
  • step S510 the network access layer device determines a receiving device of the downlink message according to the foregoing session identifier.
  • step S512 the network access layer device sends the downlink message to the terminal device corresponding to the session identifier.
  • the terminal device and the network access layer device can maintain a long-term connection through a heartbeat. For details, refer to the following steps S514 to S518.
  • step S514 the terminal device sends a heartbeat request to the network access layer device.
  • the heartbeat request can be implemented in multiple ways, such as PINGREQ (PING Request).
  • the terminal device in order to quickly sense the long connection status between the terminal device and the network access layer device, can send a heartbeat request to the network access layer device to determine whether the terminal device and the network access layer device are Still connected.
  • step S514 may be performed in a periodic form.
  • the processing of step S514 may be: when a predetermined heartbeat detection period is reached, sending to the network access layer device Heartbeat request.
  • the heartbeat detection period can be set according to the actual situation, such as 30 seconds or 1 minute.
  • step S5166 the network access layer device obtains the heartbeat response information corresponding to the heartbeat request.
  • the heartbeat response information can be implemented in multiple ways, such as PINGRSP (PING Response).
  • PINGRSP PING Response
  • the heartbeat response information may include information about whether the terminal device and the network access layer device are still in a long connection state.
  • step S5128 the network access layer device sends the above-mentioned heartbeat response information to the terminal device.
  • the network access layer device can also actively report the heartbeat situation of the terminal device.
  • the corresponding processing can include: obtaining the heartbeat information of the terminal device, and reporting the heartbeat information Send to the terminal device, or, when the predetermined heartbeat reporting period is reached, obtain the heartbeat information of the terminal device and send the heartbeat information to the terminal device.
  • the heartbeat reporting period can be set according to the actual situation, such as 30 seconds. Or 10 seconds, etc.
  • the network access layer device is responsible for uninstalling the encryption request initiated by the terminal device, and maintaining the long-term connection with the terminal device. At the same time, it is responsible for keeping the long-term connection alive. management. Since the heartbeat processing of the terminal device is implemented at the network access layer device, the message forwarding device can save a large amount of heartbeat processing consumption, and the network access layer device as the network packet processing device itself has a high performance, which also makes long The connection is maintained more efficiently.
  • processing in steps S502 to S512 and the processing in steps S514 to S518 may not have a sequential relationship, that is, the processing in steps S514 to S518 may be performed first, and then the processing in steps S502 to S512 may be performed, or The processes of steps S514 to S518 and the processes of steps S502 to S512 may be performed simultaneously.
  • This embodiment of the present specification provides a method for processing information, in which a long connection is established between the network access layer device and the terminal device, and a short connection is established between the network access layer device and the message forwarding device, which is received by the network access layer device
  • the uplink message sent by the terminal device then, encapsulates the uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection, sends the target message to the message forwarding device, and receives the message forwarding device
  • the downlink message corresponding to the sent target message includes the session identifier in the downlink message.
  • the receiving device of the downlink message is determined, and the downlink message is sent to the terminal device corresponding to the session identifier.
  • the network manager of the terminal device The connection is only maintained between the terminal device and the network access layer device, so that the management of the long network connection is performed by a more efficient network access layer device, which decouples the message forwarding device from the processing of network packets, thereby improving message forwarding
  • the performance of the equipment system reduces the resource consumption of the message forwarding equipment.
  • the network access layer device can find the right and push the appropriate terminal.
  • the embodiment of the present specification also provides an information processing device, as shown in FIG. 6.
  • the information processing device and the terminal device are long-term connections, and the device and the message forwarding device are short-term connections, including: a message receiving module 601, an encapsulation module 602, a transceiving module 603, a device determination module 604, and a message sending module. 605, of which:
  • a message receiving module 601, configured to receive an uplink message sent by the terminal device
  • An encapsulation module 602 configured to encapsulate the uplink message and a session identifier of a long connection maintained with the terminal device into a target message in the case of a short connection;
  • the transceiver module 603 is configured to send the target message to the message forwarding device, and receive a downlink message corresponding to the target message sent by the message forwarding device, where the downlink message includes the session identifier;
  • a device determining module 604 configured to determine a receiving device of the downlink message according to the session identifier
  • a message sending module 605 is configured to send the downlink message to the terminal device corresponding to the session identifier.
  • the device further includes:
  • a request receiving module configured to receive a heartbeat request sent by the terminal device
  • a response acquisition module configured to acquire heartbeat response information corresponding to the heartbeat request
  • a response information sending module configured to send the heartbeat response information to the terminal device.
  • the device further includes:
  • a heartbeat acquisition module configured to acquire heartbeat information of the terminal device when a predetermined heartbeat reporting period is reached;
  • a heartbeat sending module configured to send the heartbeat information to the terminal device.
  • the information processing apparatus may be a network access layer device, the network access layer device and the terminal device are long-term connections, and the network access layer device and the message forwarding device are For a short connection, the uplink message sent by the terminal device is received through the network access layer device, and then the uplink message and the session identifier of the long connection maintained with the terminal device are encapsulated into a target message in the case of a short connection, and the target message is Send to the message forwarding device and receive the downlink message corresponding to the target message sent by the message forwarding device.
  • the downlink message includes the session identifier.
  • the terminal device Based on the session identifier, determine the receiving device of the downlink message, and send the downstream message to the corresponding node corresponding to the session identifier.
  • the terminal device is described above. In this way, the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long-term network connection is performed by a more efficient network access layer device, which transfers the message forwarding device from the network packet. Decoupling in the processing, thereby improving the performance of the message forwarding equipment system, reducing Reduce the resource consumption of the message forwarding device.
  • the network access layer device saves the long connection state. When the message forwarding device performs downlink message push, the network access layer device can correctly find the corresponding terminal device and push it.
  • the embodiment of the present specification also provides an information processing device, as shown in FIG. 7.
  • the information processing device and the network access layer device are connected for a long time and include: a message sending module 701 and a message receiving module 702, where:
  • a message sending module 701 is configured to send an uplink message to a network access layer device, so that the network access layer device sends the uplink message and a session identifier of a long connection maintained with the network access layer device. Encapsulated into a target message in the case of a short connection, send the target message to a message forwarding device, and receive a downlink message sent by the message forwarding device, where the downlink message includes the session identifier, and is determined according to the session identifier A receiving device for the downlink message;
  • the message receiving module 702 is configured to receive a downlink message corresponding to the uplink message sent by the network access layer device.
  • the device further includes:
  • a request sending module configured to send a heartbeat request to the network access layer device
  • the response information receiving module is configured to receive heartbeat response information corresponding to the heartbeat request sent by the network access layer device.
  • the request sending module is configured to send a heartbeat request to the network access layer device when a predetermined heartbeat detection period is reached.
  • the information processing apparatus may be a terminal device.
  • the network access layer device and the terminal device are long-term connections, and the network access layer device and the message forwarding device are: For a short connection, the uplink message sent by the terminal device is received through the network access layer device, and then the uplink message and the session identifier of the long connection maintained with the terminal device are encapsulated into a target message in the case of a short connection, and the target message is sent To the message forwarding device, and receive the downlink message corresponding to the target message sent by the message forwarding device, the downlink message includes a session identifier, and according to the session identifier, determine the receiving device of the downlink message, and send the downlink message to the corresponding session identifier Terminal devices.
  • the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long-term network connection is performed by a more efficient network access layer device, which forwards the message forwarding device from the network packet. Decoupling during processing, thereby improving the performance of the message forwarding equipment system, reducing Reduce the resource consumption of the message forwarding device.
  • the network access layer device saves the long connection state. When the message forwarding device performs downlink message push, the network access layer device can correctly find the corresponding terminal device and push it.
  • the embodiment of the present specification also provides an information processing device, as shown in FIG. 8.
  • the information processing device and the network access layer device are short-connected and include: a message receiving module 801 and a message sending module 802, where:
  • the message receiving module 801 is configured to receive a target message sent by a network access layer device, where the target message is an uplink message sent to a terminal device, and a long connection established between the network access layer device and the terminal device. Is obtained after encapsulation of the session ID in the case of a short connection;
  • the message sending module 802 is configured to send a downlink message corresponding to the target message to the network access layer device, where the downlink message includes the session identifier.
  • the information processing apparatus may be a message forwarding device, where a long connection is established between a network access layer device and a terminal device, and between the network access layer device and a message forwarding device.
  • a long connection is established between a network access layer device and a terminal device, and between the network access layer device and a message forwarding device.
  • the uplink message sent by the terminal device is received through the network access layer device, and then the uplink message and the session identifier of the long connection maintained with the terminal device are encapsulated into a target message in the case of a short connection, and the target message is Send to the message forwarding device and receive the downlink message corresponding to the target message sent by the message forwarding device.
  • the downlink message includes the session identifier.
  • the terminal device Based on the session identifier, determine the receiving device of the downlink message, and send the downstream message to the corresponding node corresponding to the session identifier.
  • the terminal device is described above. In this way, the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long-term network connection is performed by a more efficient network access layer device, which transfers the message forwarding device from the network packet. Decoupling in the processing, thereby improving the performance of the message forwarding equipment system Message forwarding device resource consumption, Further, the network access layer device is connected to the long preservation status, message forwarding device during a push to reduce the downlink message, the network access layer device can find the right and push the appropriate terminal.
  • the embodiment of the present specification also provides a network access layer device, as shown in FIG. 9.
  • the network access layer device may be a terminal device or a server provided in the foregoing embodiment. There is a long connection between the network access layer device and the terminal device, and a short connection between the network access layer device and the message forwarding device.
  • the network access layer device may have a relatively large difference due to different configurations or performance, and may include one or more processors 901 and a memory 902.
  • the memory 902 may store one or more storage applications or data.
  • the memory 902 may be transient storage or persistent storage.
  • the application program stored in the memory 902 may include one or more modules (not shown), and each module may include a series of computer-executable instructions in a network access layer device.
  • the processor 901 may be configured to communicate with the memory 902 and execute a series of computer-executable instructions in the memory 902 on a network access layer device.
  • the network access layer device may further include one or more power sources 903, one or more wired or wireless network interfaces 904, one or more input / output interfaces 905, and one or more keyboards 906.
  • the network access layer device includes a memory and one or more programs.
  • One or more programs are stored in the memory, and one or more programs may include one or more modules.
  • Each module may include a series of computer-executable instructions in a network access layer device, and configured to be executed by one or more processors.
  • the one or more programs include instructions for performing the following computer-executable instructions:
  • the embodiments of the present specification provide a network access layer device, where the network access layer device and the terminal device are a long connection, the network access layer device and the message forwarding device are a short connection, and the network access layer device is Receive the uplink message sent by the terminal device, and then encapsulate the uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection, send the target message to the message forwarding device, and receive the message forwarding
  • the downlink message corresponding to the target message sent by the device.
  • the downlink message includes a session identifier. Based on the session identifier, the receiving device of the downlink message is determined, and the downlink message is sent to the terminal device corresponding to the session identifier.
  • the network of the terminal device The long connection is only maintained between the terminal device and the network access layer device, so that the management of the long network connection is performed by a more efficient network access layer device, which decouples the message forwarding device from the processing of the network packet, thereby improving the message.
  • the performance of the forwarding device system reduces the resource consumption of the message forwarding device.
  • the network access layer device When the network access layer device is connected to the long preservation status, message forwarding device during a push downlink message, the network access layer device can find the right and push the appropriate terminal.
  • the embodiment of the present specification also provides a terminal device, as shown in FIG. 10.
  • Terminal devices may have relatively large differences due to different configurations or performance, and may include one or more processors 1001 and memory 1002.
  • the memory 1002 may store one or more storage applications or data.
  • the memory 1002 may be a temporary storage or a persistent storage.
  • the application program stored in the memory 1002 may include one or more modules (not shown), and each module may include a series of computer-executable instructions in the terminal device.
  • the processor 1001 may be configured to communicate with the memory 1002 and execute a series of computer-executable instructions in the memory 1002 on a terminal device.
  • the terminal device may further include one or more power sources 1003, one or more wired or wireless network interfaces 1004, one or more input / output interfaces 1005, and one or more keyboards 1006.
  • the terminal device includes a memory and one or more programs, one or more programs of which are stored in the memory, and one or more programs may include one or more modules, and each module It may include a series of computer-executable instructions in a terminal device, and the one or more programs configured to be executed by one or more processors include the following computer-executable instructions:
  • a target message sending the target message to a message forwarding device, receiving a downlink message sent by the message forwarding device, the downlink message including the session identifier, and determining a receiving device of the downlink message according to the session identifier ;
  • the sending a heartbeat request to the network access layer device includes:
  • a heartbeat request is sent to the network access layer device.
  • the embodiments of the present specification provide a terminal device, where a long connection is established between the network access layer device and the terminal device, a short connection is established between the network access layer device and the message forwarding device, and the terminal device is received through the network access layer device
  • the uplink message sent and then encapsulate the uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection, send the target message to the message forwarding device, and receive the message sent by the message forwarding device
  • the downlink message corresponding to the target message.
  • the downlink message includes the session identifier. According to the session identifier, the receiving device of the downlink message is determined, and the downlink message is sent to the terminal device corresponding to the session identifier.
  • the long-term network connection of the terminal device is only It is maintained between the terminal equipment and the network access layer equipment, so that the management of the long-term network connection is performed by a more efficient network access layer equipment, which decouples the message forwarding equipment from the processing of network packets, thereby improving the message forwarding equipment system Performance, reduce the resource consumption of message forwarding equipment, and
  • the network access layer device can find the right and push the appropriate terminal.
  • the embodiment of the present specification also provides a message forwarding device, as shown in FIG. 11.
  • the message forwarding device may have a large difference due to different configurations or performance, and may include one or more processors 1101 and a memory 1102.
  • the memory 1102 may store one or more storage applications or data.
  • the memory 1102 may be a temporary storage or a persistent storage.
  • the application program stored in the memory 1102 may include one or more modules (not shown), and each module may include a series of computer-executable instructions in a message forwarding device.
  • the processor 1101 may be configured to communicate with the memory 1102 and execute a series of computer-executable instructions in the memory 1102 on the message forwarding device.
  • the message forwarding device may further include one or more power sources 1103, one or more wired or wireless network interfaces 1104, one or more input / output interfaces 1105, and one or more keyboards 1106.
  • the message forwarding device includes a memory and one or more programs, where one or more programs are stored in the memory, and one or more programs may include one or more modules, and each A module may include a series of computer-executable instructions in a message forwarding device, and the one or more programs configured to be executed by one or more processors include the following computer-executable instructions:
  • Target message is a short connection of an uplink message sent by a terminal device and a session identifier of a long connection established between the network access layer device and the terminal device Get after the package;
  • the embodiment of the present specification provides a message forwarding device, wherein a long connection is established between the network access layer device and the terminal device, and a short connection is established between the network access layer device and the message forwarding device, and the terminal is received through the network access layer device
  • the uplink message sent by the device then, encapsulates the uplink message and the session identifier of the long connection maintained with the terminal device into a target message in the case of a short connection, sends the target message to the message forwarding device, and receives the message from the message forwarding device.
  • the downlink message corresponding to the target message includes the session identifier. According to the session identifier, the receiving device of the downlink message is determined, and the downlink message is sent to the terminal device corresponding to the session identifier.
  • the terminal device has a long network connection. It is only maintained between the terminal device and the network access layer device, so that the management of the long network connection is performed by a more efficient network access layer device, which decouples the message forwarding device from the processing of network packets, thereby improving the message forwarding device.
  • the performance of the system reduces the resource consumption of message forwarding equipment.
  • the embodiment of the present specification also provides an information processing system, as shown in FIG. 12.
  • the system includes a network access layer device 1201, a terminal device 1202, and a message forwarding device 1203, where:
  • the network access layer device 1201 encapsulates the uplink message and a session identifier of a long connection maintained with the terminal device into a target message in the case of a short connection, and sends the target message to the message.
  • the network access layer device 1201 determines a receiving device of the downlink message according to the session identifier, and sends the downlink message to the terminal device 1202 corresponding to the session identifier.
  • the network access layer device 1201 receives a heartbeat request sent by the terminal device 1202.
  • the network access layer device 1201 obtains heartbeat response information corresponding to the heartbeat request
  • the network access layer device 1201 sends the heartbeat response information to the terminal device 1202.
  • the network access layer device 1201 when a predetermined heartbeat reporting period is reached, the network access layer device 1201 obtains heartbeat information of the terminal device 1202;
  • the network access layer device 1201 sends the heartbeat information to the terminal device 1202.
  • the terminal device 1202 when a predetermined heartbeat detection period is reached, the terminal device 1202 sends a heartbeat request to the network access layer device 1201.
  • the network access layer device 1201 is an independent device.
  • both the terminal device 1202 and the message forwarding device 1203 may include multiple devices.
  • Each terminal device 1202 and the network access layer device 1201 are long-term connections. 1201 is a short connection.
  • 1201 is a short connection.
  • the system includes multiple network access layer devices 1201, and each network access layer device 1201 and the message forwarding device 1203 are short-connected, and at least one network access layer device There is a long connection between 1201 and the terminal device 1202.
  • the terminal device 1202 and the message forwarding device 1203 may also include multiple devices.
  • Each terminal device 1203 and the network access layer device 1201 are long-term connections.
  • Each layer device 1201 includes a corresponding session identifier. Therefore, the network access layer device 1201 can easily find the corresponding terminal device 1202 through the session identifier.
  • An embodiment of the present specification provides an information processing system including a network access layer device, a terminal device, and a message forwarding device.
  • the network access layer device and the terminal device are long-term connections, and the network access layer device and the message forwarding device.
  • the uplink message sent by the terminal device is received by the network access layer device, and then the uplink message and the session identifier of the long connection maintained with the terminal device are encapsulated into a target message in the case of a short connection.
  • Send the target message to the message forwarding device and receive the downlink message corresponding to the target message sent by the message forwarding device.
  • the downlink message includes the session identifier.
  • the session identifier determine the receiving device of the downstream message, and send the downstream message to the session identifier.
  • the long-term network connection of the terminal device is only maintained between the terminal device and the network access layer device, so that the management of the long-term network connection is performed by a more efficient network access layer device, which forwards the message to the device Decoupling from network packet processing to improve message forwarding equipment
  • the network access layer device is connected to the long preservation status, message forwarding device during a push downlink message, the network access layer device can find the right and push the appropriate terminal.
  • a programmable logic device Programmable Logic Device (PLD)
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller may be implemented in any suitable way, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, With the Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited
  • controller logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded controllers by logically programming the method steps.
  • Microcontrollers and the like to achieve the same function. Therefore, such a controller can be regarded as a hardware component, and a device included in the controller for implementing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions may be regarded as a structure that can be both a software module implementing the method and a hardware component.
  • the system, device, module, or unit described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or a product with a certain function.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • one or more embodiments of the present specification may be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present specification may adopt a computer program implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code therein. The form of the product.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present specification are described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present specification. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts 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 device to produce a machine, so that instructions generated by the processor of the computer or other programmable data processing device may be used to Means for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, the instructions
  • the device implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of steps can be performed on the computer or other programmable device to produce a computer-implemented process, which can be executed on the computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
  • processors CPUs
  • input / output interfaces output interfaces
  • network interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-persistent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media includes permanent and non-persistent, removable and non-removable media.
  • Information storage can be accomplished by any method or technology.
  • 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), and read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transmitting medium may be used to store information that can be accessed by a computing device.
  • computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves.
  • embodiments of the present specification may be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present specification may adopt a computer program implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code therein. The form of the product.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • One or more embodiments of the specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • One or more embodiments of the present specification may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network.
  • program modules may be located in local and remote computer storage media, including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本说明书实施例公开了一种信息的处理方法、装置、设备及系统,所述方法应用于网络接入层设备,所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接,包括:接收所述终端设备发送的上行消息;将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;根据所述会话标识,确定所述下行消息的接收设备;将所述下行消息发送给所述会话标识对应的所述终端设备。

Description

一种信息的处理方法、装置、设备及系统 技术领域
本说明书涉及计算机技术领域,尤其涉及一种信息的处理方法、装置、设备及系统。
背景技术
在物联网服务系统中,由于推送消息等服务的要求,物联网中大量的终端设备需要同服务端保持网络长连接。
目前的物联网服务方案都是网络长连接保持在终端和IoT HUB(Internet Of Things HUB,物联网转发设备)之间,而保持长连接会使得服务端的资源开销较大,例如心跳处理,服务端的内存开销等会导致负责消息处理的IoT HUB系统性能低下,这样会导致IoT HUB的内存开销以及心跳维持开销过大,尤其是在数以亿计的物联网场景下,因此,在物联网服务领域,需要一种更稳定、服务端的资源消耗更少的设备连接方案。
发明内容
本说明书实施例的目的是提供一种信息的处理方法、装置、设备及系统,以提供一种更稳定、服务端的资源消耗更少的设备连接方案。
为解决上述技术问题,本说明书实施例是这样实现的:
本说明书实施例提供的一种信息的处理方法,所述方法应用于网络接入层设备,所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接,包括:
接收所述终端设备发送的上行;
将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
根据所述会话标识,确定所述下行消息的接收设备;
将所述下行消息发送给所述会话标识对应的所述终端设备。
可选地,所述方法还包括:
接收所述终端设备发送的心跳请求;
获取所述心跳请求对应的心跳响应信息;
将所述心跳响应信息发送给所述终端设备。
可选地,所述方法还包括:
当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
将所述心跳信息发送给所述终端设备。
本说明书实施例提供的一种信息的处理方法,所述方法应用于终端设备,所述终端设备与网络接入层设备之间为长连接,包括:
向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
接收所述网络接入层设备发送的所述上行消息对应的下行消息。
可选地,所述方法还包括:
向所述网络接入层设备发送心跳请求;
接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
可选地,所述向所述网络接入层设备发送心跳请求,包括:
当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
本说明书实施例提供的一种信息的处理方法,所述方法应用于消息转发设备,所述消息转发设备与网络接入层设备之间为短连接,包括:
接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括 所述会话标识。
本说明书实施例提供的一种信息的处理装置,所述装置与终端设备之间为长连接,所述装置与消息转发设备之间为短连接,包括:
消息接收模块,用于接收所述终端设备发送的上行消息;
封装模块,用于将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
收发模块,用于将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
设备确定模块,用于根据所述会话标识,确定所述下行消息的接收设备;
消息发送模块,用于将所述下行消息发送给所述会话标识对应的所述终端设备。
可选地,所述装置还包括:
请求接收模块,用于接收所述终端设备发送的心跳请求;
响应获取模块,用于获取所述心跳请求对应的心跳响应信息;
响应信息发送模块,用于将所述心跳响应信息发送给所述终端设备。
可选地,所述装置还包括:
心跳获取模块,用于当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
心跳发送模块,用于将所述心跳信息发送给所述终端设备。
本说明书实施例提供的一种信息的处理装置,所述装置与网络接入层设备之间为长连接,包括:
消息发送模块,用于向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
消息接收模块,用于接收所述网络接入层设备发送的所述上行消息对应的下行消息。
可选地,所述装置还包括:
请求发送模块,用于向所述网络接入层设备发送心跳请求;
响应信息接收模块,用于接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
可选地,所述请求发送模块,用于当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
本说明书实施例提供的一种信息的处理装置,所述装置应用于消息转发设备,所述消息转发设备与网络接入层设备之间为短连接,包括:
消息接收模块,用于接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
消息发送模块,用于将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
本说明书实施例提供的一种网络接入层设备,所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接,所述网络接入层设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
接收所述终端设备发送的上行消息;
将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
根据所述会话标识,确定所述下行消息的接收设备;
将所述下行消息发送给所述会话标识对应的所述终端设备。
本说明书实施例提供的一种终端设备,所述终端设备与网络接入层设备之间为长连接,所述终端设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
接收所述网络接入层设备发送的所述上行消息对应的下行消息。
本说明书实施例提供的一种消息转发设备,所述消息转发设备与网络接入层设备之间为短连接,所述消息转发设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
本说明书实施例提供的一种信息的处理系统,所述系统包括网络接入层设备、终端设备和消息转发设备,其中:
所述网络接入层设备与所述终端设备之间为长连接,所述网络接入层设备与所述消息转发设备之间为短连接;
所述网络接入层设备接收所述终端设备发送的上行消息;
所述网络接入层设备将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,并将所述目标消息发送给所述消息转发设备;
所述网络接入层设备接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
所述网络接入层设备根据所述会话标识,确定所述下行消息的接收设备,并将所述下行消息发送给所述会话标识对应的所述终端设备。
可选地,所述网络接入层设备为一个独立的设备。
可选地,所述系统中包括多个所述网络接入层设备,每个所述网络接入层设备与所述消息转发设备之间为短连接,至少一个所述网络接入层设备与所述终端设备之间为长连接。
由以上本说明书实施例提供的技术方案可见,本说明书实施例中包括网络接入层设备、终端设备和消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本说明书一种信息的处理方法实施例;
图2为本说明书一种信息的处理系统实施例;
图3为本说明书另一种信息的处理方法实施例;
图4为本说明书又一种信息的处理方法实施例;
图5为本说明书又一种信息的处理方法实施例;
图6为本说明书一种信息的处理装置实施例;
图7为本说明书另一种信息的处理装置实施例;
图8为本说明书又一种信息的处理装置实施例;
图9为本说明书一种网络接入层设备实施例;
图10为本说明书一种终端设备实施例;
图11为本说明书一种消息转发设备实施例;
图12为本说明书一种信息的处理系统实施例;
图13为本说明书另一种信息的处理系统实施例。
具体实施方式
本说明书实施例提供一种信息的处理方法、装置、设备及系统。
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
实施例一
如图1所示,本说明书实施例提供一种信息的处理方法,该方法的执行主体可以为网络接入层设备,该网络接入层设备可以是终端设备或服务器,其中,该终端设备可以如个人计算机等设备,也可以如手机、平板电脑等移动终端设备,该终端设备可以为用户使用的终端设备。该服务器可以是独立的服务器,也可以是由多个服务器组成的服务器集群,而且,该服务器可以是某项业务的后台服务器,可以是物联网中的服务器等,该服务器可以具备信息收发、信息处理等功能。该方法可以用于解决物联网等网络中终端设备需要与消息转发设备等保持长连接,而使得消息转发设备资源消耗较大等问题。
如图2所示,本说明书实施例的信息的处理方法对应的信息的处理系统中可以包括终端设备、网络接入层设备和消息转发设备(如IoT HUB等),其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,长连接可以是在两个设备之间的TCP(Transmission Control Protocol,传输控制协议)连接保持 不断开的连接,可以进行双工通信(即两个设备之间可以允许有双向的数据传输),短连接可以是设备之间的每次请求都需要新建TCP连接进行通信的连接。该方法具体可以包括以下步骤:
在步骤S102中,接收终端设备发送的上行消息。
其中,终端设备可以是用户使用的终端设备,该终端设备可以如个人计算机等设备,也可以如手机、平板电脑等移动终端设备等。上行消息可以是终端设备发送的任意信息,可以根据信息用途的不同,上行消息的内容可以不同,例如某一项业务的请求信息、某一指令信息或者某一消息等。
在实施中,随着终端设备和网络技术的不断发展,将所有设备接入网络,从而实现设备互联、远程控制等功能,成为当前发展的趋势。在物联网服务系统中,由于推送消息等服务的要求,物联网中大量的终端设备需要同服务端保持网络长连接,目前的物联网服务方案都是网络长连接保持在终端和IoT HUB之间,而保持长连接会使得服务端的资源开销较大,例如心跳处理,服务端的内存开销等会导致负责消息处理的IoT HUB系统性能低下,这样会导致IoT HUB的内存开销以及心跳维持开销过大,尤其是在数以亿计的物联网场景下。为了解决这个问题,本说明实施例提出了一种双层物联网网关的架构,借助高性能的网络接入层保持终端设备的长连接,同时,将终端设备的上行消息转成短连接情况下的目标消息,并将其发送给IoT HUB,使得IoT HUB的消息处理和网络连接处理解耦,从而提高IoT HUB系统的性能,具体可以包括以下内容:
终端设备中可以安装有某应用程序,例如即时通讯应用程序、音乐播放应用程序和数据存储应用程序等,当用户需要进行某项业务时,可以在终端设备中安装的应用程序中查找到与该项业务相对应的应用程序,可以启动该应用程序,该应用程序可以为用户提供上述业务相关的服务,不同的服务可以由该应用程序中的相应的按键或链接等触发,例如,当用户点击该应用程序中某一个按键时,终端设备执行该按键所对应的功能,如,用户点击应用程序中的下载按键,则终端设备可以获取选择的待下载的文件,并可以下载待下载的文件等。当用户触发应用程序中的按键或链接,并需要向消息转发设备发送上行消息时,终端设备可以获取该按键或链接的相关内容,并可以基于获取的相关内容生成上行消息。然后,可以基于网络接入层设备与终端设备之间的长连接,终端设备将上述上行消息发送给网络接入层设备,网络接入层设备可以接收到该上行消息。
在步骤S104中,将上述上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息。
其中,目标消息可以是短连接情况下的信息,目标消息与上行消息的主要内容可以相同,例如,上行消息是获取信息A的请求消息,则目标消息也可以是短连接情况下,用于获取信息A的请求消息等。会话标识可以是两设备之间的长连接的标识,或者,也可以称为连接标识等,会话标识可以是设备之间建立的长连接的唯一标识。
在实施中,由于终端设备与网络接入层设备之间为长连接,因此,终端设备发送给网络接入层设备的上行消息也应该是长连接情况下的消息,又由于长连接情况下的消息与短连接情况下的消息存在一定的差异,因此,需要将上述上行消息封装成短连接情况下的目标消息,这样,消息转发设备才能够识别和处理目标消息。具体的,网络接入层设备接收到终端设备发送的上行消息后,可以基于预先设定的消息转换规则或消息封装规则,将上述上行消息封装成短连接情况下的目标消息。其中,消息转换规则或消息封装规则可以根据实际情况设定,本说明书实施例对此不做限定。
另外,由于与网络接入层设备长连接的终端设备可能包括多个,为了区分各个长连接,可以为终端设备与网络接入层设备建立的长连接设置一个唯一标识(即会话标识),这样,可以很容易查找到与网络接入层设备进行长连接的终端设备,为了标记上述上行消息是发自于哪一个终端设备,可以在将上述上行消息封装成短连接情况下的目标消息时,将该终端设备与网络接入层设备之间的长连接的会话标识也封装到目标消息中。这样,目标消息中可以包括终端设备与网络连接层设备之间的长连接的会话标识等。
在步骤S106中,将上述目标消息发送给消息转发设备,并接收消息转发设备发送的该目标消息对应的下行消息,该下行消息中包括上述会话标识。
其中,下行消息可以是针对上行消息的一种消息,具体可以是上行消息的相应消息,或者,可以是执行上行消息后得到的一种通知消息等。消息转发设备可以是某项业务的消息转发设备等,该消息转发设备中可以包括物联网转发设备,即IoT HUB等。
在实施中,网络接入层设备接收到上行消息,并将上行消息封装成目标消息后,可以基于网络接入层设备与消息转发设备之间的短连接,网络接入层设备可以将该目标消息发送给消息转发设备。消息转发设备可以对该目标信息进行分析和处理,处理完成后,可以通过处理后的相关信息生成下行消息。为了便于确定下行消息发送给哪个终端设备,可以将终端设备与网络连接层设备之间的长连接的会话标识写入到下行消息中。可以基于网络接入层设备与消息转发设备之间的短连接,将该下行消息发送给网络接入层设备。网络接入层设备可以接收消息转发设备发送的下行消息。
在步骤S108中,根据上述会话标识,确定上述下行消息的接收设备。
在实施中,网络接入层设备接收到下行消息后,可以对该下行消息进行分析,从中可以提取会话标识。网络接入层设备中预先存储有当前与终端设备建立长连接的会话标识,可以将提取的会话标识与网络接入层设备中预先存储的会话标识进行匹配对比,确定预先存储的会话标识中是否存在提取的会话标识,如果存在,则可以通过会话标识确定相应的长连接,进而可以通过确定的长连接,得到相应的终端设备,可以将得到的终端设备确定为下行消息的接收设备。
在步骤S110中,将上述下行消息发送给上述会话标识对应的终端设备。
在实施中,网络接入层设备确定下行消息的接收设备后,可以将下行消息发送给确定的接收设备,即网络接入层设备可以将下行消息发送给上述会话标识对应的终端设备。
如图3所示,本说明书实施例提供一种信息的处理方法,该方法的执行主体可以为终端设备,其中,该终端设备可以如个人计算机等设备,也可以如手机、平板电脑等移动终端设备,该终端设备可以为用户使用的终端设备。该方法可以用于解决物联网等网络中终端设备需要与业务消息转发设备等保持长连接,而使得业务消息转发设备资源消耗较大等问题。
如图2所示,本说明书实施例的信息的处理方法对应的信息的处理系统中可以包括终端设备、网络接入层设备和消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,长连接可以是在两个设备之间的TCP(Transmission Control Protocol,传输控制协议)连接保持不断开的连接,可以进行双工通信(即两个设备之间可以允许有双向的数据传输),短连接可以是设备之间的每次请求都需要新建TCP连接进行通信的连接。该方法具体可以包括以下步骤:
在步骤S302中,向网络接入层设备发送上行消息,以使网络接入层设备将上行消息,以及与网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,接收消息转发设备发送的下行消息,该下行消息中包括会话标识,根据会话标识,确定下行消息的接收设备。
在步骤S304中,接收网络接入层设备发送的上行消息对应的下行消息。
上述步骤S302和步骤S304的具体处理过程可以参见上述步骤S102~步骤S110的相关内容,在此不再赘述。
如图4所示,本说明书实施例提供一种信息的处理方法,该方法的执行主体可以为消息转发设备,其中,该消息转发设备可以是独立的服务器,也可以是由多个服务器组成的服务器集群,而且,该消息转发设备可以是物联网中的消息转发设备等,该消息转发设备可以具备信息收发、信息处理等功能。该方法可以用于解决物联网等网络中终端设备需要与消息转发设备等保持长连接,而使得消息转发设备资源消耗较大等问题。
如图2所示,本说明书实施例的信息的处理方法对应的信息的处理系统中可以包括终端设备、网络接入层设备和消息转发设备(如IoT HUB等消息转发设备),其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,长连接可以是在两个设备之间的TCP(Transmission Control Protocol,传输控制协议)连接保持不断开的连接,可以进行双工通信(即两个设备之间可以允许有双向的数据传输),短连接可以是设备之间的每次请求都需要新建TCP连接进行通信的连接。该方法具体可以包括以下步骤:
在步骤S402中,接收网络接入层设备发送的目标消息,该目标消息是对终端设备发送的上行消息,以及网络接入层设备与终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到。
在步骤S404中,将目标消息对应的下行消息发送给网络接入层设备,下行消息中包括上述会话标识。
上述步骤S402和步骤S404的具体处理过程可以参见上述步骤S102~步骤S110的相关内容,在此不再赘述。
本说明书实施例提供一种信息的处理方法,应用于网络接入层设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例二
如图5所示,本说明书实施例提供一种信息的处理方法,该方法可以由网络接入层设备、终端设备和消息转发设备共同执行,该网络接入层设备可以是终端设备或服务器,其中,该终端设备可以如个人计算机等设备,也可以如手机、平板电脑等移动终端设备,该终端设备可以为用户使用的终端设备。该服务器可以是独立的服务器,也可以是由多个服务器组成的服务器集群,而且,该消息转发设备可以是物联网中的转发设备等,该消息转发设备可以具备信息收发、信息处理等功能。该方法可以用于解决物联网等网络中终端设备需要与消息转发设备等保持长连接,而使得消息转发设备资源消耗较大等问题。
本说明书实施例的信息的处理方法对应的信息的处理系统中可以包括终端设备、网络接入层设备和消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,长连接可以是在两个设备之间的TCP(Transmission Control Protocol,传输控制协议)连接保持不断开的连接,可以进行双工通信(即两个设备之间可以允许有双向的数据传输),短连接可以是设备之间的每次请求都需要新建TCP连接进行通信的连接。该方法具体可以包括以下步骤:
在步骤S502中,终端设备向网络接入层设备发送上行消息。
其中,网络接入层设备中可以设置有时域Session机制,Session机制可以是指一个终端设备与交互系统进行通信的时间间隔的机制,通常可以是指从进入交互系统到注销退出交互系统之间所经过的时间,例如,用户在浏览某个网站时,从进入该网站到关闭浏览器所经过的这段时间,也就是用户浏览这个网站所花费的时间即为Session机制。本说明书实施例中的Session机制可以是与网络协议相关联的机制,此情况下,Session机制可以隐含面向连接和/或保持状态的含义,其中,面向连接可以是通信双方在通信之前需要先建立一个通信的渠道,保持状态可以是指通信的一方能够把一系列的消息关联起来,使得消息之间可以互相依赖等。
当网络接入层设备需要为某个终端设备的请求创建一个Session时,网络接入层设备可以首先检测该终端设备的请求里是否已包含了一个Session标识,可称为Session ID(即会话标识),如果已包含一个Session ID,则可以说明之前已经为此终端设备创建过Session,此时,网络接入层设备可以按照Session ID把这个Session检索出来使用(如果检索不到该Session ID,则可以重新创建一个Session ID),如果终端设备的请求中不包含Session ID,则为此终端设备创建一个Session,并且生成一个与该Session相 关联的Session ID。Session ID的值可以是一个既不会重复,又不容易被找到规律以仿造的字符串,网络接入层设备中的Session可以存储每个TCP连接的状态等信息。
每一个终端设备与网络接入层设备之间的长连接,在网络接入层设备中都有一个Session与其相对应,每个Session会分配一个唯一的Session ID(即会话标识),用于唯一的确定相应的长连接。
在步骤S504中,网络接入层设备将上述上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息。
在步骤S506中,网络接入层设备将目标消息发送给消息转发设备。
在步骤S508中,消息转发设备将目标消息对应的下行消息发送给网络接入层设备,下行消息中包括上述会话标识。
在步骤S510中,网络接入层设备根据上述会话标识,确定下行消息的接收设备。
在步骤S512中,网络接入层设备将上述下行消息发送给上述会话标识对应的终端设备。
上述步骤S502~步骤S512的具体处理过程可以参见上述实施例一中步骤S102~步骤S110的相关内容,在此不再赘述。
此外,终端设备与网络接入层设备之间可以通过心跳维持长连接,具体可以参见下述步骤S514~步骤S518的相关内容。
在步骤S514中,终端设备向网络接入层设备发送心跳请求。
其中,心跳请求可以通过多种方式实现,例如PINGREQ(PING Request)等。
在实施中,为了快速感知终端设备与网络接入层设备之间的长连接状态,终端设备可以向网络接入层设备发送心跳请求,以此来判断终端设备与网络接入层设备之间是否仍然处于长连接状态。
需要说明的是,在实际应用中,上述步骤S514的处理可以是以周期的形式执行,相应的,上述步骤S514的处理可以为:当到达预定的心跳检测周期时,向网络接入层设备发送心跳请求。其中,心跳检测周期可以根据实际情况设定,具体如30秒钟或1分钟等。
在步骤S516中,网络接入层设备获取上述心跳请求对应的心跳响应信息。
其中,心跳响应信息可以通过多种方式实现,例如PINGRSP(PING Response)等。心跳响应信息中可以包括终端设备与网络接入层设备之间是否仍然处于长连接状态的相关信息。
在步骤S518中,网络接入层设备将上述心跳响应信息发送给终端设备。
另外,除了可以通过上述终端设备主动获取心跳信息的处理外,还可以由网络接入层设备主动上报终端设备的心跳情况,相应的处理可以包括:获取终端设备的心跳信息,并将该心跳信息发送给终端设备,或者,当到达预定的心跳上报周期时,获取终端设备的心跳信息,并将该心跳信息发送给终端设备,其中,心跳上报周期可以根据实际情况设定,具体如30秒钟或10秒钟等。
需要说明的是,通过上述步骤S514~步骤S518的处理,网络接入层设备负责对终端设备发起的加密请求进行卸载,并维护与终端设备之间的长连接,同时,负责长连接的保活管理。由于终端设备的心跳处理在网络接入层设备实现,这样,消息转发设备可以节省大量的心跳处理消耗,而网络接入层设备作为网络包处理设备,本身具有较高的性能,这样也使得长连接的维持更高效。
此外,上述步骤S502~步骤S512的处理与步骤S514~步骤S518的处理可以不存在先后顺序关系,即可以先执行步骤S514~步骤S518的处理,然后执行步骤S502~步骤S512的处理,或者,也可以同时执行步骤S514~步骤S518的处理和步骤S502~步骤S512的处理。
本说明书实施例提供一种信息的处理方法,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例三
以上为本说明书实施例提供的信息的处理方法,基于同样的思路,本说明书实施例还提供一种信息的处理装置,如图6所示。
该信息的处理装置与终端设备之间为长连接,所述装置与消息转发设备之间为短连接,包括:消息接收模块601、封装模块602、收发模块603、设备确定模块604和消息发送模块605,其中:
消息接收模块601,用于接收所述终端设备发送的上行消息;
封装模块602,用于将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
收发模块603,用于将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
设备确定模块604,用于根据所述会话标识,确定所述下行消息的接收设备;
消息发送模块605,用于将所述下行消息发送给所述会话标识对应的所述终端设备。
本说明书实施例中,所述装置还包括:
请求接收模块,用于接收所述终端设备发送的心跳请求;
响应获取模块,用于获取所述心跳请求对应的心跳响应信息;
响应信息发送模块,用于将所述心跳响应信息发送给所述终端设备。
本说明书实施例中,所述装置还包括:
心跳获取模块,用于当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
心跳发送模块,用于将所述心跳信息发送给所述终端设备。
本说明书实施例提供一种信息的处理装置,该信息的处理装置可以为网络接入层设备,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行 消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例四
基于同样的思路,本说明书实施例还提供一种信息的处理装置,如图7所示。
该信息的处理装置与网络接入层设备之间为长连接,包括:消息发送模块701和消息接收模块702,其中:
消息发送模块701,用于向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
消息接收模块702,用于接收所述网络接入层设备发送的所述上行消息对应的下行消息。
本说明书实施例中,所述装置还包括:
请求发送模块,用于向所述网络接入层设备发送心跳请求;
响应信息接收模块,用于接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
本说明书实施例中,所述请求发送模块,用于当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
本说明书实施例提供一种信息的处理装置,该信息的处理装置可以为终端设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消 息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例五
基于同样的思路,本说明书实施例还提供一种信息的处理装置,如图8所示。
该信息的处理装置与网络接入层设备之间为短连接,包括:消息接收模块801和消息发送模块802,其中:
消息接收模块801,用于接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
消息发送模块802,用于将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
本说明书实施例提供一种信息的处理装置,该信息的处理装置可以为消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例六
以上为本说明书实施例提供的信息的处理装置,基于同样的思路,本说明书实施例还提供一种网络接入层设备,如图9所示。
所述网络接入层设备可以为上述实施例提供的终端设备或服务器。所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接。
网络接入层设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器901和存储器902,存储器902中可以存储有一个或一个以上存储应用程序或数据。其中,存储器902可以是短暂存储或持久存储。存储在存储器902的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对网络接入层设备中的一系列计算机可执行指令。更进一步地,处理器901可以设置为与存储器902通信,在网络接入层设备上执行存储器902中的一系列计算机可执行指令。网络接入层设备还可以包括一个或一个以上电源903,一个或一个以上有线或无线网络接口904,一个或一个以上输入输出接口905,一个或一个以上键盘906。
具体在本实施例中,网络接入层设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对网络接入层设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
接收所述终端设备发送的上行消息;
将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
根据所述会话标识,确定所述下行消息的接收设备;
将所述下行消息发送给所述会话标识对应的所述终端设备。
本说明书实施例中,还包括:
接收所述终端设备发送的心跳请求;
获取所述心跳请求对应的心跳响应信息;
将所述心跳响应信息发送给所述终端设备。
本说明书实施例中,还包括:
当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
将所述心跳信息发送给所述终端设备。
本说明书实施例提供一种网络接入层设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例七
基于同样的思路,本说明书实施例还提供一种终端设备,如图10所示。
所述终端设备与网络接入层设备之间为长连接。
终端设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器1001和存储器1002,存储器1002中可以存储有一个或一个以上存储应用程序或数据。其中,存储器1002可以是短暂存储或持久存储。存储在存储器1002的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对终端设备中的一系列计算机可执行指令。更进一步地,处理器1001可以设置为与存储器1002通信,在终端设备上执行存储器1002中的一系列计算机可执行指令。终端设备还可以包括一个或一个以上电源1003,一个或一个以上有线或无线网络接口1004,一个或一个以上输入输出接口1005,一个或一个以上键盘1006。
具体在本实施例中,终端设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对终端设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息, 以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
接收所述网络接入层设备发送的所述上行消息对应的下行消息。
本说明书实施例中,还包括:
向所述网络接入层设备发送心跳请求;
接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
本说明书实施例中,所述向所述网络接入层设备发送心跳请求,包括:
当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
本说明书实施例提供一种终端设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例八
基于同样的思路,本说明书实施例还提供一种消息转发设备,如图11所示。
所述消息转发设备与网络接入层设备之间为短连接。
消息转发设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器1101和存储器1102,存储器1102中可以存储有一个或一个以上存储应用程序或数据。其中,存储器1102可以是短暂存储或持久存储。存储在存储器1102的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对消息转发设备中的一系列计算机可执行指令。更进一步地,处理器1101可以设置为与存储器1102 通信,在消息转发设备上执行存储器1102中的一系列计算机可执行指令。消息转发设备还可以包括一个或一个以上电源1103,一个或一个以上有线或无线网络接口1104,一个或一个以上输入输出接口1105,一个或一个以上键盘1106。
具体在本实施例中,消息转发设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对消息转发设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
本说明书实施例提供一种消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
实施例九
基于同样的思路,本说明书实施例还提供一种信息的处理系统,如图12所示。所述系统包括网络接入层设备1201、终端设备1202和消息转发设备1203,其中:
所述网络接入层设备1201与所述终端设备1202之间为长连接,所述网络接入层设备1201与所述消息转发设备1203之间为短连接;
所述网络接入层设备1201接收所述终端设备1202发送的上行消息;
所述网络接入层设备1201将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,并将所述目标消息发送给所述消息转发设备1203;
所述网络接入层设备1201接收所述消息转发设备1203发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
所述网络接入层设备1201根据所述会话标识,确定所述下行消息的接收设备,并将所述下行消息发送给所述会话标识对应的所述终端设备1202。
本说明书实施例中,所述网络接入层设备1201接收所述终端设备1202发送的心跳请求;
所述网络接入层设备1201获取所述心跳请求对应的心跳响应信息;
所述网络接入层设备1201将所述心跳响应信息发送给所述终端设备1202。
本说明书实施例中,当到达预定的心跳上报周期时,所述网络接入层设备1201获取所述终端设备1202的心跳信息;
所述网络接入层设备1201将所述心跳信息发送给所述终端设备1202。
本说明书实施例中,当到达预定的心跳检测周期时,所述终端设备1202向所述网络接入层设备1201发送心跳请求。
本说明书实施例中,如图12所示,网络接入层设备1201为一个独立的设备。在此情况下,终端设备1202和消息转发设备1203都可以是包括多个,每个终端设备1202与网络接入层设备1201之间为长连接,每个消息转发设备1203与网络接入层设备1201之间为短连接,具体处理过程可以参见上述实施例一和实施例二中的相关内容,在此不再赘述。
本说明书实施例中,如图13所示,系统中包括多个网络接入层设备1201,每个网络接入层设备1201与消息转发设备1203之间为短连接,至少一个网络接入层设备1201与终端设备1202之间为长连接。在此情况下,终端设备1202和消息转发设备1203也都可以是包括多个,每个终端设备1203与网络接入层设备1201之间为长连接,又由于每个长连接,在网络接入层设备1201中均包含相应的会话标识,因此,通过会话标识,网络接入层设备1201可以很容易查找到相应的终端设备1202。每个消息转发设备 1203与每个网络接入层设备1201之间为短连接,具体处理过程可以参见上述实施例一和实施例二中的相关内容,在此不再赘述。
本说明书实施例提供一种信息的处理系统,包括网络接入层设备、终端设备和消息转发设备,其中,网络接入层设备与终端设备之间为长连接,网络接入层设备与消息转发设备之间为短连接,通过网络接入层设备接收终端设备发送的上行消息,然后,将上行消息,以及与终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将目标消息发送给消息转发设备,并接收消息转发设备发送的目标消息对应的下行消息,下行消息中包括会话标识,根据该会话标识,确定下行消息的接收设备,将下行消息发送给该会话标识对应的所述终端设备,这样,终端设备的网络长连接只保持在终端设备与网络接入层设备之间,使得网络长连接的管理由更高效的网络接入层设备负责,将消息转发设备从网络包的处理中解耦出来,从而提高消息转发设备系统的性能,减少消息转发设备的资源消耗,另外,网络接入层设备将长连接状态保存,消息转发设备在进行下行消息推送时,网络接入层设备可以正确找到相应的终端设备并推送。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也 并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书一个或多个实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本说明书的实施例可提供为方法、系统、或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用 在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书的实施例是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于 存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本说明书的实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书的权利要求范围之内。

Claims (20)

  1. 一种信息的处理方法,所述方法应用于网络接入层设备,所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接,包括:
    接收所述终端设备发送的上行消息;
    将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
    将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
    根据所述会话标识,确定所述下行消息的接收设备;
    将所述下行消息发送给所述会话标识对应的所述终端设备。
  2. 根据权利要求1所述的方法,所述方法还包括:
    接收所述终端设备发送的心跳请求;
    获取所述心跳请求对应的心跳响应信息;
    将所述心跳响应信息发送给所述终端设备。
  3. 根据权利要求1所述的方法,所述方法还包括:
    当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
    将所述心跳信息发送给所述终端设备。
  4. 一种信息的处理方法,所述方法应用于终端设备,所述终端设备与网络接入层设备之间为长连接,包括:
    向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
    接收所述网络接入层设备发送的所述上行消息对应的下行消息。
  5. 根据权利要求4所述的方法,所述方法还包括:
    向所述网络接入层设备发送心跳请求;
    接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
  6. 根据权利要求5所述的方法,所述向所述网络接入层设备发送心跳请求,包括:
    当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
  7. 一种信息的处理方法,所述方法应用于消息转发设备,所述消息转发设备与网络接入层设备之间为短连接,包括:
    接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
    将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
  8. 一种信息的处理装置,所述装置与终端设备之间为长连接,所述装置与消息转发设备之间为短连接,包括:
    消息接收模块,用于接收所述终端设备发送的上行消息;
    封装模块,用于将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
    收发模块,用于将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
    设备确定模块,用于根据所述会话标识,确定所述下行消息的接收设备;
    消息发送模块,用于将所述下行消息发送给所述会话标识对应的所述终端设备。
  9. 根据权利要求8所述的装置,所述装置还包括:
    请求接收模块,用于接收所述终端设备发送的心跳请求;
    响应获取模块,用于获取所述心跳请求对应的心跳响应信息;
    响应信息发送模块,用于将所述心跳响应信息发送给所述终端设备。
  10. 根据权利要求8所述的装置,所述装置还包括:
    心跳获取模块,用于当到达预定的心跳上报周期时,获取所述终端设备的心跳信息;
    心跳发送模块,用于将所述心跳信息发送给所述终端设备。
  11. 一种信息的处理装置,所述装置与网络接入层设备之间为长连接,包括:
    消息发送模块,用于向网络接入层设备发送上行消息,以使所述网络接入层设备将 所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
    消息接收模块,用于接收所述网络接入层设备发送的所述上行消息对应的下行消息。
  12. 根据权利要求11所述的装置,所述装置还包括:
    请求发送模块,用于向所述网络接入层设备发送心跳请求;
    响应信息接收模块,用于接收所述网络接入层设备发送的所述心跳请求对应的心跳响应信息。
  13. 根据权利要求12所述的装置,所述请求发送模块,用于当到达预定的心跳检测周期时,向所述网络接入层设备发送心跳请求。
  14. 一种信息的处理装置,所述装置与网络接入层设备之间为短连接,包括:
    消息接收模块,用于接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
    消息发送模块,用于将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
  15. 一种网络接入层设备,所述网络接入层设备与终端设备之间为长连接,所述网络接入层设备与消息转发设备之间为短连接,所述网络接入层设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    接收所述终端设备发送的上行消息;
    将所述上行消息,以及与所述终端设备之间保持的长连接的会话标识封装成短连接情况下的目标消息;
    将所述目标消息发送给所述消息转发设备,并接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
    根据所述会话标识,确定所述下行消息的接收设备;
    将所述下行消息发送给所述会话标识对应的所述终端设备。
  16. 一种终端设备,所述终端设备与网络接入层设备之间为长连接,所述终端设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    向网络接入层设备发送上行消息,以使所述网络接入层设备将所述上行消息,以及与所述网络接入层设备之间保持的长连接的会话标识封装成短连接情况下的目标消息,将所述目标消息发送给消息转发设备,接收所述消息转发设备发送的下行消息,所述下行消息中包括所述会话标识,根据所述会话标识,确定所述下行消息的接收设备;
    接收所述网络接入层设备发送的所述上行消息对应的下行消息。
  17. 一种消息转发设备,所述消息转发设备与网络接入层设备之间为短连接,所述消息转发设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    接收网络接入层设备发送的目标消息,所述目标消息是对终端设备发送的上行消息,以及所述网络接入层设备与所述终端设备之间建立的长连接的会话标识进行短连接情况下的封装后得到;
    将所述目标消息对应的下行消息发送给所述网络接入层设备,所述下行消息中包括所述会话标识。
  18. 一种信息的处理系统,所述系统包括网络接入层设备、终端设备和消息转发设备,其中:
    所述网络接入层设备与所述终端设备之间为长连接,所述网络接入层设备与所述消息转发设备之间为短连接;
    所述网络接入层设备接收所述终端设备发送的上行消息;
    所述网络接入层设备将所述上行消息,以及与所述终端设备之间保持的长连接的会 话标识封装成短连接情况下的目标消息,并将所述目标消息发送给所述消息转发设备;
    所述网络接入层设备接收所述消息转发设备发送的所述目标消息对应的下行消息,所述下行消息中包括所述会话标识;
    所述网络接入层设备根据所述会话标识,确定所述下行消息的接收设备,并将所述下行消息发送给所述会话标识对应的所述终端设备。
  19. 根据权利要求18所述的系统,所述网络接入层设备为一个独立的设备。
  20. 根据权利要求18所述的系统,所述系统中包括多个所述网络接入层设备,每个所述网络接入层设备与所述消息转发设备之间为短连接,至少一个所述网络接入层设备与所述终端设备之间为长连接。
PCT/CN2019/080071 2018-06-25 2019-03-28 一种信息的处理方法、装置、设备及系统 WO2020001110A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
SG11202006195UA SG11202006195UA (en) 2018-06-25 2019-03-28 Information processing methods, apparatuses, devices, and systems
EP19824895.7A EP3720094B1 (en) 2018-06-25 2019-03-28 Information processing method, apparatus, device and system
US16/888,582 US11005947B2 (en) 2018-06-25 2020-05-29 Network information processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810661510.1A CN108965400B (zh) 2018-06-25 2018-06-25 一种信息的处理方法、装置、设备及系统
CN201810661510.1 2018-06-25

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/888,582 Continuation US11005947B2 (en) 2018-06-25 2020-05-29 Network information processing

Publications (1)

Publication Number Publication Date
WO2020001110A1 true WO2020001110A1 (zh) 2020-01-02

Family

ID=64486513

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/080071 WO2020001110A1 (zh) 2018-06-25 2019-03-28 一种信息的处理方法、装置、设备及系统

Country Status (6)

Country Link
US (1) US11005947B2 (zh)
EP (1) EP3720094B1 (zh)
CN (1) CN108965400B (zh)
SG (1) SG11202006195UA (zh)
TW (1) TWI699988B (zh)
WO (1) WO2020001110A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965400B (zh) * 2018-06-25 2020-03-31 阿里巴巴集团控股有限公司 一种信息的处理方法、装置、设备及系统
CN112540540A (zh) * 2019-09-20 2021-03-23 京东方科技集团股份有限公司 动作资源的创建方法、执行方法、电子装置和存储介质
CN112804282A (zh) * 2019-11-14 2021-05-14 北京安云世纪科技有限公司 一种控制终端设备的方法及系统
US11410659B1 (en) * 2020-03-30 2022-08-09 Amazon Technologies, Inc. Dynamic skill endpoint
CN111862405B (zh) * 2020-05-20 2022-05-20 北京骑胜科技有限公司 智能锁的通信模式设置方法、装置、设备和存储介质
CN111866031B (zh) * 2020-09-23 2021-01-19 天津中新智冠信息技术有限公司 设备监测分析方法、装置、服务器及存储介质
CN112637344A (zh) * 2020-12-23 2021-04-09 苏州三六零智能安全科技有限公司 物联网设备的监控方法、设备、装置以及存储介质
CN113285994A (zh) * 2021-05-17 2021-08-20 深圳市欧瑞博科技股份有限公司 消息发送方法、装置、服务器及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761864A (zh) * 2011-04-29 2012-10-31 中国移动通信集团公司 一种数据传输的方法、系统及设备
CN103138961A (zh) * 2011-11-25 2013-06-05 阿里巴巴集团控股有限公司 服务器控制方法、被控服务器及中心控制服务器
WO2016197861A1 (zh) * 2015-06-11 2016-12-15 阿里巴巴集团控股有限公司 远程管理方法、被管理设备、管理设备和智能电视系统
CN107517227A (zh) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 用于分布式一致性系统的会话实现方法以及装置
CN108965400A (zh) * 2018-06-25 2018-12-07 阿里巴巴集团控股有限公司 一种信息的处理方法、装置、设备及系统

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100463405C (zh) * 2005-06-09 2009-02-18 腾讯科技(深圳)有限公司 基于群组的通信方法及系统
CN102209111B (zh) * 2011-05-20 2014-07-09 重庆广典网络信息技术有限公司 云计算移动网络终端设备开放性跨平台系统
CN103067215B (zh) * 2011-10-21 2018-02-13 广东智通人才连锁股份有限公司 实现心跳机制的方法、应用服务器、网络数据库及系统
CN103139731A (zh) * 2011-11-23 2013-06-05 华为软件技术有限公司 消息互联的方法、装置及系统
EP2930899B1 (en) * 2013-12-27 2020-04-22 Huawei Technologies Co., Ltd. Tcp link configuration method and apparatus
CN105933435A (zh) * 2015-06-20 2016-09-07 浙江网新合同能源管理有限公司 一种基于物联网的实时查询方法
CN105391776A (zh) * 2015-10-20 2016-03-09 上海斐讯数据通信技术有限公司 长连接消息的通信方法及系统
US9742740B2 (en) * 2015-11-18 2017-08-22 Adobe Systems Incorporated Internet of things datapoint engine
WO2017121485A1 (en) * 2016-01-15 2017-07-20 Nokia Solutions And Networks Oy Low activity state operation
EP3473027B1 (en) * 2016-06-15 2021-09-22 Apple Inc. Services provisioning for internet-of-things devices in cellular networks
US10849186B2 (en) * 2017-01-09 2020-11-24 Huawei Technologies Co., Ltd. System and methods for session management
US11039381B2 (en) * 2017-03-21 2021-06-15 Telefonaktiebolaget Lm Ericsson (Publ) SMF selection based on supported DNN

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761864A (zh) * 2011-04-29 2012-10-31 中国移动通信集团公司 一种数据传输的方法、系统及设备
CN103138961A (zh) * 2011-11-25 2013-06-05 阿里巴巴集团控股有限公司 服务器控制方法、被控服务器及中心控制服务器
WO2016197861A1 (zh) * 2015-06-11 2016-12-15 阿里巴巴集团控股有限公司 远程管理方法、被管理设备、管理设备和智能电视系统
CN107517227A (zh) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 用于分布式一致性系统的会话实现方法以及装置
CN108965400A (zh) * 2018-06-25 2018-12-07 阿里巴巴集团控股有限公司 一种信息的处理方法、装置、设备及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3720094A4 *

Also Published As

Publication number Publication date
CN108965400A (zh) 2018-12-07
TW202002599A (zh) 2020-01-01
EP3720094B1 (en) 2022-11-30
TWI699988B (zh) 2020-07-21
EP3720094A4 (en) 2021-03-31
SG11202006195UA (en) 2020-07-29
US11005947B2 (en) 2021-05-11
CN108965400B (zh) 2020-03-31
US20200304580A1 (en) 2020-09-24
EP3720094A1 (en) 2020-10-07

Similar Documents

Publication Publication Date Title
WO2020001110A1 (zh) 一种信息的处理方法、装置、设备及系统
US9699625B2 (en) Push notification middleware
US11025724B2 (en) Transport of control data in proxy-based network communications
WO2015081786A1 (zh) 订阅通知的实现方法和装置
WO2017140216A1 (zh) 一种网络的负载均衡、控制及网络交互方法和装置
WO2022206229A1 (zh) 数据处理方法、装置、设备和存储介质
US20210400537A1 (en) Cross-layer and cross-access technology traffic splitting and retransmission mechanisms
US20230353455A1 (en) Multi-access management service frameworks for cloud and edge networks
WO2020119219A1 (zh) 消息发送方法和装置
Chen et al. Converging MQTT resources in ETSI standards based M2M platform
TW202038581A (zh) 管理用戶端、設備監控系統及方法
Da et al. Kalimucho: middleware for mobile applications
WO2020215837A1 (zh) 一种网卡、数据发送/接收方法及设备
WO2024021405A1 (zh) 一种数据传输系统和方法
Aijaz et al. Enabling high performance mobile web services provisioning
WO2016011885A1 (zh) 一种信息传输方法及装置
US20180295062A1 (en) System and method for efficient traffic shaping and quota enforcement in a cluster environment
US20150067066A1 (en) Provisioning Communication Services using Proxy Server in a Cloud
US9667691B2 (en) Method for retrieving service capability of a group of contacts
JP2022506447A (ja) クラウドインフラストラクチャ上のコアセルラネットワーキングスタックの実装
JP7453394B2 (ja) 通信方法、装置及びシステム
CN105763463A (zh) 一种链路探测报文的传输方法和装置
WO2019011144A1 (zh) 一种虚拟网络设备、路由设备及虚拟网络的连接方法
US9578529B1 (en) Cellular data testing system
CN109842498A (zh) 一种客户端配置方法、服务器、客户端及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19824895

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019824895

Country of ref document: EP

Effective date: 20200629

NENP Non-entry into the national phase

Ref country code: DE