CN110166518B - Session information transmission method, device, storage medium and electronic device - Google Patents

Session information transmission method, device, storage medium and electronic device Download PDF

Info

Publication number
CN110166518B
CN110166518B CN201811354286.8A CN201811354286A CN110166518B CN 110166518 B CN110166518 B CN 110166518B CN 201811354286 A CN201811354286 A CN 201811354286A CN 110166518 B CN110166518 B CN 110166518B
Authority
CN
China
Prior art keywords
target
session
session information
router
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811354286.8A
Other languages
Chinese (zh)
Other versions
CN110166518A (en
Inventor
刘剑
余颖
金泗涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201811354286.8A priority Critical patent/CN110166518B/en
Publication of CN110166518A publication Critical patent/CN110166518A/en
Application granted granted Critical
Publication of CN110166518B publication Critical patent/CN110166518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

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

Abstract

The invention discloses a transmission method and device of session information, a storage medium and an electronic device. Wherein, the method comprises the following steps: detecting a target operation executed on a target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router; acquiring session information of a target session; and sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information. The invention solves the technical problem of lower identification accuracy of the service flow in the related technology.

Description

Session information transmission method, device, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for transmitting session information, a storage medium, and an electronic apparatus.
Background
Currently, a QOS implemented by a router identifies application layer traffic in a manner that a service is determined through a target port, such as a TCP 80 port, and is directly understood as web page traffic, that is, HTTP protocol traffic. That is, it is a common practice to use the application layer service type commonly operated by the target port, that is, the service type identified traffic. The current technology has the disadvantage of inaccurate identification, which can be done in this way if the target port is a common target port. While for some services belonging to the C/S architecture (e.g., hand-game services) a proprietary protocol is used, the generic port implemented in this way is an unconventional port number (i.e., > 1024). In this case, if the traffic type traffic is identified in a conventional manner, the traffic cannot be identified with accuracy basically.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a transmission method, a transmission device, a storage medium and an electronic device of session information, and at least solves the technical problem of low accuracy rate of identification of service flow in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a method for transmitting session information, including: detecting a target operation executed on a target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router; acquiring session information of the target session; and sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
According to another aspect of the embodiments of the present invention, there is also provided a transmission apparatus of session information, including: the system comprises a detection module, a processing module and a processing module, wherein the detection module is used for detecting a target operation executed on a target client, and the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router; the acquisition module is used for acquiring the session information of the target session; and the sending module is used for sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, characterized in that the storage medium stores therein a computer program, wherein the computer program is configured to execute the method described in any one of the above when executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, wherein the memory stores therein a computer program, and the processor is configured to execute the method described in any one of the above through the computer program.
In the embodiment of the invention, target operation executed on a target client is detected, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router; acquiring session information of a target session; the session information is sent to the target router, wherein the session information is used for indicating a mode that the target router preferentially forwards data carrying the session information, when target operation executed on a target client is detected, the obtained session information of the target session is sent to the target router, and the target router can precisely and preferentially forward the data carrying the session information, so that the accuracy of identifying the data transmitted between the target client and the target server by the target router can be improved, the technical effect of improving the accuracy of identifying the service traffic is achieved, and the technical problem that the accuracy of identifying the service traffic is low in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an alternative session information transmission method according to an embodiment of the present invention;
fig. 2 is a schematic application environment diagram of an alternative session information transmission method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an alternative session information transmission method according to an alternative embodiment of the present invention;
fig. 4 is a diagram illustrating another alternative session information transmission method according to an alternative embodiment of the present invention;
fig. 5 is a schematic diagram of an alternative session information transmission apparatus according to an embodiment of the present invention;
fig. 6 is a schematic application scenario diagram of an alternative session information transmission method according to an embodiment of the present invention; and
FIG. 7 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided a method for transmitting session information, as shown in fig. 1, the method includes:
s102, detecting a target operation executed on a target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router;
s104, acquiring session information of the target session;
and S106, sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
Alternatively, in this embodiment, the transmission method of the session information may be applied to a hardware environment formed by the target client 202, the target router 204, and the target server 206 shown in fig. 2. As shown in fig. 2, a target client 202 is connected to a target server 206 through a target router 204, the target client 202 detects a target operation performed on the target client 202, where the target operation is used to establish a target session between the target client 202 and the target server 206 through the target router 204, the target client 202 obtains session information of the target session, and the target client 202 sends the session information to the target router 204, where the session information is used to instruct the target router 204 to preferentially forward data carrying the session information.
Optionally, in this embodiment, the above-mentioned transmission method of the session information may be, but is not limited to, applied in a scenario where the client transmits the session information to the router. The client may be, but not limited to, various types of applications, such as an online education application, an instant messaging application, a community space application, a game application, a shopping application, a browser application, a financial application, a multimedia application, a live application, and the like. In particular, but not limited to, the method may be applied to a scenario in which the client of the game application transmits session information to the router, or may also be applied to a scenario in which the client of the multimedia application transmits session information to the router, so as to improve the accuracy of identifying traffic flow. The above is only an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the transmission method of the session information may be, but is not limited to, performed by an SDK embedded in the target client. The SDK communicates with the target router via a proprietary protocol negotiated with the target router.
Sdk (software Development kit) is a software Development kit, typically a collection of Development tools used by some software engineers to build application software for a particular software package, software framework, hardware platform, operating system, etc.
Optionally, in this embodiment, the SDK embedded in the target client obtains session information of the session connection each time the target client establishes a session connection with the target server, and sends the session information to the target router, so as to instruct the target router to perform QoS forwarding on data carrying the session information.
QoS (Quality of Service) refers to a network that can provide better Service capability for specified network communication by using various basic technologies, and is a security mechanism of the network, which is a technology for solving the problems of network delay and congestion. Under normal circumstances, if the network is only used for a specific application system without time limitation, no QoS is required, such as Web application, or E-mail settings, etc. But is essential for critical and multimedia applications. When the network is overloaded or congested, QoS can ensure that important traffic is not delayed or dropped while ensuring efficient operation of the network. In this embodiment, the session information is used to enable the router to perform QoS forwarding on data transmitted between the target client and the target server, so that the service of the target client is not affected by delay and is not discarded, and efficient operation of the target client is ensured.
Optionally, in this embodiment, the target operation is used to establish a target session between the target client and the target server through the target router. Such as: starting operation executed on the target client, triggering operation executed on information such as resources or icons in the target client, and the like.
Optionally, in this embodiment, the target router may include, but is not limited to, a home router, and the like.
In an optional implementation manner, taking a target client as a game client as an example, as shown in fig. 3, an SDK embedded in the game client detects a target operation performed on the game client, where the target operation is used to establish a target session between the game client and a game server corresponding to the game client through a target router, acquire session information of the target session, and send the session information to the target router, where the session information is used to instruct the target router to preferentially forward game data carrying the session information.
Therefore, through the steps, when the target operation executed on the target client is detected, the acquired session information of the target session is sent to the target router, and the target router can accurately and preferentially forward the data carrying the session information, so that the accuracy of the target router in identifying the data transmitted between the target client and the target server can be improved, the technical effect of improving the identification accuracy of the service traffic is realized, and the technical problem of low identification accuracy of the service traffic in the related technology is solved.
As an optional scheme, before obtaining the session information of the target session, the method further includes: establishing connection with a target router through an application program API (application programming interface) provided by the target router;
sending session information to the target router includes: and sending the session information to the target router through the API interface.
Optionally, in this embodiment, the target router may provide, but is not limited to, an API interface for the SDK embedded in the target client, and the SDK embedded in the target client communicates with the target router through the API interface.
As an optional scheme, the obtaining session information of the target session includes:
s1, acquiring the version information of the target router through the API;
s2, verifying the legality of the API interface under the condition that the version information is used for indicating that the target router supports the priority forwarding strategy;
and S3, acquiring the session information of the target session when the legality of the API is verified to be legal.
Optionally, in this embodiment, the SDK embedded in the target client may first verify version information of the target router, verify whether the target router supports the online forwarding policy, if so, continue to verify the validity of the API interface provided by the target router, and if so, obtain session information of the target session.
Optionally, in this embodiment, if the target router does not support the preferential forwarding policy, or the API provided by the target router is not legal, the data between the target client and the target server is transmitted in the original data transmission form, or the data between the target client and the target server is identified in the original data identification manner, without performing preferential forwarding conforming to the preferential forwarding policy on the data transmitted between the target client and the target server.
As an optional scheme, the obtaining session information of the target session includes:
s1, reading the network connection corresponding to the target session;
s2, acquiring quintuple information of the network connection, wherein the quintuple information comprises: a source IP address of the network connection, a source port number of the network connection, a destination IP address of the network connection, a destination port number of the network connection, and a transmission protocol used by the network connection;
s3, the quintuple information is determined as the session information.
Optionally, in this embodiment, five tuple information of the network connection established between the target client and the target server is sent to the target router as session information of the target session.
Quintuple is a communication term. Typically a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
Optionally, in this embodiment, the SDK embedded in the target client sends five-tuple information of the network connection to the target router, and the target router may regard the data carrying the five-tuple information as data transmitted between the target client and the target server, and identify the data of the target client from the received data, so as to forward the data of the target client preferentially.
In an alternative embodiment, taking the target client as the mobile client, the target router as the home router, and the session information as the quintuple information, as shown in fig. 4, the transmission process of the session information includes the following steps:
step 1, after a mobile client is started, initializing the mobile client, including an SDK;
step 2, connecting the SDK with the router API, directly reading the version information of the router, and judging whether the router supports the strategy of identifying the game flow based on the SDK to carry out QOS; if the version acquisition fails or the router version information does not support the QOS strategy, directly skipping QOS guarantee fails;
step 3, on the premise of successfully obtaining the version information and conforming to the QOS strategy, performing the legality verification of the SDK and the router through API authentication between the SDK and the router;
step 4, after the API authentication is successful, the mobile client is connected with the game server, and under the condition of performing service logic processing, the SDK reads the newly-built network connection of the current client and acquires the network connection of communication between the mobile client and the server; if the acquisition fails, the QoS guarantee of the router fails;
and step 5, if the network connection is successfully acquired, the SDK carries out private communication through an API (application program interface) of the router and reports the quintuple information to the router. And the router performs priority forwarding guarantee on the QOS strategy according to the acquired quintuple information.
As an optional scheme, after sending the session information to the target router, the method further includes:
s1, the target router receives the session information;
s2, the target router responds to the indication of the session information to detect whether the received data carries the session information;
and S3, the target router forwards the data carrying the session information with the highest priority.
Optionally, in this embodiment, after receiving the session information, the target router may consider that the data carrying the session information is the data transmitted between the target client and the target server, and detect the data carrying the session information from the received data, so as to forward the data carrying the session information with the highest priority, so as to ensure the forwarding efficiency of the data of the target client.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is also provided a session information transmission apparatus for implementing the above session information transmission method, as shown in fig. 5, the apparatus includes:
a detecting module 52, configured to detect a target operation performed on a target client, where the target operation is used to establish a target session between the target client and a target server corresponding to the target client through a target router;
an obtaining module 54, configured to obtain session information of the target session;
and a sending module 56, configured to send session information to the target router, where the session information is used to instruct the target router to preferentially forward the data carrying the session information.
Alternatively, in this embodiment, the above-mentioned transmission apparatus of session information may be applied in a hardware environment formed by the target client 202, the target router 204 and the target server 206 shown in fig. 2. As shown in fig. 2, a target client 202 is connected to a target server 206 through a target router 204, the target client 202 detects a target operation performed on the target client 202, where the target operation is used to establish a target session between the target client 202 and the target server 206 through the target router 204, the target client 202 obtains session information of the target session, and the target client 202 sends the session information to the target router 204, where the session information is used to instruct the target router 204 to preferentially forward data carrying the session information.
Optionally, in this embodiment, the above-mentioned transmission apparatus for session information may be, but is not limited to, applied in a scenario where a client transmits session information to a router. The client may be, but not limited to, various types of applications, such as an online education application, an instant messaging application, a community space application, a game application, a shopping application, a browser application, a financial application, a multimedia application, a live application, and the like. In particular, but not limited to, the method may be applied to a scenario in which the client of the game application transmits session information to the router, or may also be applied to a scenario in which the client of the multimedia application transmits session information to the router, so as to improve the accuracy of identifying traffic flow. The above is only an example, and this is not limited in this embodiment.
Alternatively, in this embodiment, the above-mentioned transmission means of the session information may be, but is not limited to, performed by an SDK embedded in the target client. The SDK communicates with the target router via a proprietary protocol negotiated with the target router.
Sdk (software Development kit) is a software Development kit, typically a collection of Development tools used by some software engineers to build application software for a particular software package, software framework, hardware platform, operating system, etc.
Optionally, in this embodiment, the SDK embedded in the target client obtains session information of the session connection each time the target client establishes a session connection with the target server, and sends the session information to the target router, so as to instruct the target router to perform QoS forwarding on data carrying the session information.
QoS (Quality of Service) refers to a network that can provide better Service capability for specified network communication by using various basic technologies, and is a security mechanism of the network, which is a technology for solving the problems of network delay and congestion. Under normal circumstances, if the network is only used for a specific application system without time limitation, no QoS is required, such as Web application, or E-mail settings, etc. But is essential for critical and multimedia applications. When the network is overloaded or congested, QoS can ensure that important traffic is not delayed or dropped while ensuring efficient operation of the network. In this embodiment, the session information is used to enable the router to perform QoS forwarding on data transmitted between the target client and the target server, so that the service of the target client is not affected by delay and is not discarded, and efficient operation of the target client is ensured.
Optionally, in this embodiment, the target operation is used to establish a target session between the target client and the target server through the target router. Such as: starting operation executed on the target client, triggering operation executed on information such as resources or icons in the target client, and the like.
Optionally, in this embodiment, the target router may include, but is not limited to, a home router, and the like.
In an optional implementation manner, taking a target client as a game client as an example, as shown in fig. 3, an SDK embedded in the game client detects a target operation performed on the game client, where the target operation is used to establish a target session between the game client and a game server corresponding to the game client through a target router, acquire session information of the target session, and send the session information to the target router, where the session information is used to instruct the target router to preferentially forward game data carrying the session information.
Therefore, by the device, when the target operation executed on the target client is detected, the acquired session information of the target session is sent to the target router, and the target router can accurately and preferentially forward the data carrying the session information, so that the accuracy of the target router in identifying the data transmitted between the target client and the target server can be improved, the technical effect of improving the identification accuracy of the service traffic is realized, and the technical problem of low identification accuracy of the service traffic in the related technology is solved.
As an optional solution, the apparatus further includes: the establishing module is used for establishing connection with the target router through an application program API (application program interface) provided by the target router;
the sending module is used for: and sending the session information to the target router through the API interface.
Optionally, in this embodiment, the target router may provide, but is not limited to, an API interface for the SDK embedded in the target client, and the SDK embedded in the target client communicates with the target router through the API interface.
As an optional scheme, the obtaining module includes:
the first obtaining unit is used for obtaining the version information of the target router through the API;
the verification unit is used for verifying the legality of the API interface under the condition that the version information is used for indicating that the target router supports the priority forwarding strategy;
and the second acquisition unit is used for acquiring the session information of the target session under the condition that the legality of the API is verified to be legal.
Optionally, in this embodiment, the SDK embedded in the target client may first verify version information of the target router, verify whether the target router supports the online forwarding policy, if so, continue to verify the validity of the API interface provided by the target router, and if so, obtain session information of the target session.
Optionally, in this embodiment, if the target router does not support the preferential forwarding policy, or the API provided by the target router is not legal, the data between the target client and the target server is transmitted in the original data transmission form, or the data between the target client and the target server is identified in the original data identification manner, without performing preferential forwarding conforming to the preferential forwarding policy on the data transmitted between the target client and the target server.
As an optional scheme, the obtaining module includes:
the reading unit is used for reading the network connection corresponding to the target session;
a third obtaining unit, configured to obtain quintuple information of the network connection, where the quintuple information includes: a source IP address of the network connection, a source port number of the network connection, a destination IP address of the network connection, a destination port number of the network connection, and a transmission protocol used by the network connection;
and a determining unit for determining the quintuple information as the session information.
Optionally, in this embodiment, five tuple information of the network connection established between the target client and the target server is sent to the target router as session information of the target session.
Quintuple is a communication term. Typically a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
Optionally, in this embodiment, the SDK embedded in the target client sends five-tuple information of the network connection to the target router, and the target router may regard the data carrying the five-tuple information as data transmitted between the target client and the target server, and identify the data of the target client from the received data, so as to forward the data of the target client preferentially.
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application example of the connection method for implementing the real-time communication.
As an alternative embodiment, the above-mentioned transmission method of session information can be applied, but not limited to, in the scenario of implementing router QOS based on SDK identification game traffic as shown in fig. 6. In this scenario, it is necessary to perform a priority forwarding process on the game traffic, that is, perform a QOS priority process on the game traffic on the router. If this requirement is to be fulfilled, the requirement to be solved first: that is, the flow of the hand trip needs to be identified in the router, and the priority forwarding process of the router QOS is carried out.
In this embodiment, the function of identifying the traffic of the hand trip is realized by the router in a manner based on the communication between the hand trip SDK and the router. By embedding a customized SDK into a game client and communicating the SDK with a router, the SDK identifies quintuple information (SrcIP + SrcPort + DstIP + DstPort + Protocol) of game flow when session connection is established each time, the quintuple information is transmitted to the router through a private Protocol negotiated by the SDK and the router, the router is enabled to carry out QOS through the quintuple information, and the router can identify the communication flow between the game client and a server.
In the embodiment, the private communication between the mobile client and the API on the home router is mainly involved. When the mobile client side is connected with the server, the SDK only needs to be initialized, and then the quintuple connection information of the current mobile client side and the server side is obtained. And reporting the quintuple information to the router through a client SDK and a router API communication interface. After the router acquires the quintuple information of the mobile client and the server, the router performs the highest priority forwarding according to the quintuple in the QOS strategy of the router. Therefore, the game flow of the hand game is optimally ensured to reach the server.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic apparatus for implementing the transmission of the session information, as shown in fig. 7, the electronic apparatus including: one or more processors 702 (only one of which is shown in the figure), in which a computer program is stored, a memory 704, in which a sensor 706, an encoder 708 and a transmission means 710 are arranged to carry out the steps of any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, detecting a target operation executed on the target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through the target router;
s2, acquiring the session information of the target session;
and S3, sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
The memory 702 may be used to store software programs and modules, such as program instructions/modules corresponding to the session information transmission method and apparatus in the embodiments of the present invention, and the processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, implementing the control method of the target component described above. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 702 can further include memory located remotely from the processor 704, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 710 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 710 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 710 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In particular, the memory 702 is used for storing application programs.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, detecting a target operation executed on the target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through the target router;
s2, acquiring the session information of the target session;
and S3, sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (11)

1. A method for transmitting session information, comprising:
detecting a target operation executed on a target client, wherein the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router;
acquiring session information of the target session, wherein the session information is quintuple information indicating network connection of the target session;
and sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
2. The method of claim 1,
before obtaining the session information of the target session, the method further includes: establishing connection with the target router through an application program API (application programming interface) provided by the target router;
sending the session information to the target router comprises: and sending the session information to the target router through the API.
3. The method of claim 2, wherein obtaining session information for the target session comprises:
acquiring version information of the target router through the API;
verifying the legality of the API interface under the condition that the version information is used for indicating that the target router supports a priority forwarding strategy;
and under the condition that the legality of the API is verified to be legal, acquiring the session information of the target session.
4. The method of claim 1, wherein obtaining the session information of the target session comprises:
reading the network connection corresponding to the target session;
acquiring quintuple information of the network connection, wherein the quintuple information comprises: a source IP address of the network connection, a source port number of the network connection, a destination IP address of the network connection, a destination port number of the network connection, a transport protocol used by the network connection;
and determining the five-tuple information as the session information.
5. The method of claim 1, wherein after sending the session information to the target router, the method further comprises:
the target router receives the session information;
the target router responds to the indication of the session information to detect whether the received data carries the session information;
and the target router forwards the data carrying the session information at the highest priority.
6. An apparatus for transmitting session information, comprising:
the system comprises a detection module, a processing module and a processing module, wherein the detection module is used for detecting a target operation executed on a target client, and the target operation is used for establishing a target session between the target client and a target server corresponding to the target client through a target router;
an obtaining module, configured to obtain session information of the target session, where the session information is quintuple information indicating a network connection of the target session;
and the sending module is used for sending the session information to the target router, wherein the session information is used for indicating the target router to preferentially forward the data carrying the session information.
7. The apparatus of claim 6,
the device further comprises: the establishing module is used for establishing connection with the target router through an application program API (application programming interface) provided by the target router;
the sending module is used for: and sending the session information to the target router through the API.
8. The apparatus of claim 7, wherein the obtaining module comprises:
a first obtaining unit, configured to obtain version information of the target router through the API interface;
a verification unit, configured to verify the validity of the API interface when the version information is used to indicate that the target router supports a priority forwarding policy;
and the second acquisition unit is used for acquiring the session information of the target session under the condition that the legality of the API is verified to be legal.
9. The apparatus of claim 6, wherein the obtaining module comprises:
a reading unit, configured to read a network connection corresponding to the target session;
a third obtaining unit, configured to obtain quintuple information of the network connection, where the quintuple information includes: a source IP address of the network connection, a source port number of the network connection, a destination IP address of the network connection, a destination port number of the network connection, a transport protocol used by the network connection;
a determining unit, configured to determine the quintuple information as the session information.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 5 when executed.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN201811354286.8A 2018-11-14 2018-11-14 Session information transmission method, device, storage medium and electronic device Active CN110166518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811354286.8A CN110166518B (en) 2018-11-14 2018-11-14 Session information transmission method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811354286.8A CN110166518B (en) 2018-11-14 2018-11-14 Session information transmission method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110166518A CN110166518A (en) 2019-08-23
CN110166518B true CN110166518B (en) 2021-11-19

Family

ID=67645253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811354286.8A Active CN110166518B (en) 2018-11-14 2018-11-14 Session information transmission method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110166518B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115776507B (en) * 2023-02-09 2023-05-26 广州三七极耀网络科技有限公司 Information distribution method, device, equipment and medium based on session link
CN116302618B (en) * 2023-05-17 2023-09-12 上海云脉芯联科技有限公司 Session information processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874217A (en) * 2005-09-27 2006-12-06 华为技术有限公司 Method for determining route
CN103023670A (en) * 2011-09-20 2013-04-03 中兴通讯股份有限公司 Message service type identifying method and message service type identifying device based on data processing installation (DPI)
CN103200152A (en) * 2012-01-04 2013-07-10 中国移动通信集团公司 Conversation processing method, server and client-side
CN106686676A (en) * 2015-11-06 2017-05-17 华为技术有限公司 Session switching method, equipment and system thereof

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102811471B (en) * 2011-05-31 2017-04-12 华为终端有限公司 Internetwork transferring method for priority session accessing and user equipment
CN104348638B (en) * 2013-07-29 2017-12-01 中国移动通信集团公司 Identify method, system and the equipment of the type of service of session traffic
CN104468384B (en) * 2014-12-22 2018-01-30 武汉绿色网络信息服务有限责任公司 A kind of system and method for realizing multi-priority services
US9954906B2 (en) * 2015-03-27 2018-04-24 At&T Intellectual Property I, L.P. Method and system for providing media services in a communication system
US10028128B2 (en) * 2016-04-29 2018-07-17 Motorola Mobility Llc Procedures to support network slicing in a wireless communication system
CN107734517A (en) * 2016-08-10 2018-02-23 中兴通讯股份有限公司 A kind of data transmission method, device and system
CN106572461A (en) * 2016-10-11 2017-04-19 乐视控股(北京)有限公司 Data transmission control method and related device
CN106254560B (en) * 2016-10-12 2020-09-04 腾讯科技(北京)有限公司 Information transmission method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874217A (en) * 2005-09-27 2006-12-06 华为技术有限公司 Method for determining route
CN103023670A (en) * 2011-09-20 2013-04-03 中兴通讯股份有限公司 Message service type identifying method and message service type identifying device based on data processing installation (DPI)
CN103200152A (en) * 2012-01-04 2013-07-10 中国移动通信集团公司 Conversation processing method, server and client-side
CN106686676A (en) * 2015-11-06 2017-05-17 华为技术有限公司 Session switching method, equipment and system thereof

Also Published As

Publication number Publication date
CN110166518A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
US10972967B2 (en) Wi-Fi hotspot recommendation method, terminal, and graphical user interface
US10027626B2 (en) Method for providing authoritative application-based routing and an improved application firewall
CN104811462B (en) A kind of access gateway reorientation method and access gateway
US10812421B2 (en) Conveying instant messages via HTTP
US20180091581A1 (en) Method of switching download mode, control method thereof and control system thereof
CN107360247B (en) The method and the network equipment of processing business
CN107800663B (en) Method and device for detecting flow offline file
CN105991600A (en) Identity authentication and apparatus, server and terminal
CN105474602A (en) Method, device and equipment of identifying attack flow in software defined network
WO2015081693A1 (en) Network sharing user identification method and apparatus
CN108418780A (en) Filter method and device, system, the dns server of IP address
EP3791689A1 (en) Methods and nodes for enabling management of traffic
CN110166518B (en) Session information transmission method, device, storage medium and electronic device
CN105208605B (en) Link information sending method and device and flow control method and device
TW201626759A (en) Method for detecting a number of the devices of a plurality of client terminals selected by a WEB server with additional non-specified domain name from the internet request traffics sharing the public IP address and system for detecting selectively
CN114143251B (en) Intelligent routing method, intelligent routing device, electronic equipment and computer readable storage medium
EP3414877B1 (en) Technique for transport protocol selection and setup of a connection between a client and a server
CN114125023B (en) Method and device for determining data connection, storage medium and electronic device
JP2014523671A (en) Assessing the overall performance of interactive application services
CN110337115B (en) Method for judging WeChat payment perception based on TCP (Transmission control protocol)
CN105359580B (en) Access point selection method and related device
CN115514799A (en) TCP connection method, system, network device and storage medium
CN105577464A (en) Dual stack user network detection method, apparatus and system thereof
WO2018112796A1 (en) Service data policy control method, operator device and server
CN112887354B (en) Performance information acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant