WO2019010734A1 - 一种业务应用流量的引导方法和*** - Google Patents

一种业务应用流量的引导方法和*** Download PDF

Info

Publication number
WO2019010734A1
WO2019010734A1 PCT/CN2017/095533 CN2017095533W WO2019010734A1 WO 2019010734 A1 WO2019010734 A1 WO 2019010734A1 CN 2017095533 W CN2017095533 W CN 2017095533W WO 2019010734 A1 WO2019010734 A1 WO 2019010734A1
Authority
WO
WIPO (PCT)
Prior art keywords
traffic
function
module
destination
service module
Prior art date
Application number
PCT/CN2017/095533
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 US16/330,510 priority Critical patent/US11012359B2/en
Priority to EP17917570.8A priority patent/EP3547748B1/en
Publication of WO2019010734A1 publication Critical patent/WO2019010734A1/zh

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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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/19Flow control; Congestion control at layers above the network layer
    • H04L47/193Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
    • 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/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0884Network architectures or network communication protocols for network security for authentication of entities by delegation of authentication, e.g. a proxy authenticates an entity to be authenticated on behalf of this entity vis-à-vis an authentication entity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • H04W28/14Flow control between communication endpoints using intermediate storage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints

Definitions

  • the present invention relates to the field of mobile Internet mobile data, and in particular, to a method and system for guiding service application traffic.
  • the CP implements directed traffic by reporting domain names. Specifically, the operator performs traffic reduction on the communication of the subscription user to access certain addresses.
  • the operator performs traffic reduction on the communication of the subscription user to access certain addresses.
  • the CP is connected to multiple operators, it is necessary to match the interfaces of the respective operators and perform different traffic scheduling policies according to different subscriptions, so that there is a problem that the service access modes are not unified. It is difficult to connect the platform.
  • the user's mobile phone does not have a unified access interface, and even there is a problem that the success rate of the acquisition is low.
  • an embodiment of the present invention provides a method and system for guiding service application traffic.
  • the technical solution is as follows:
  • a method for guiding traffic of a service application includes:
  • the mydlopen function includes loading a new dynamic library, and mounting the new dynamic
  • the dlopen function and the connect function in the library are replaced with the mydlopen function and the myconnect function, respectively;
  • the function of the myconnect function includes directing non-local traffic of the service application module to a proxy service module;
  • the proxy service module receives the non-local traffic and boots.
  • the function of the myconnect function includes receiving the traffic sent by the service application module, obtaining the destination IP address and the destination port of the traffic, and determining whether the destination IP address is a local IP address, and if yes, the traffic is Sending to the destination port, if not, sending the traffic to the port monitored by the proxy service module.
  • the function of the myconnect function includes establishing the destination IP address, the destination port, and the connection port of the non-local traffic, and establishing a mapping relationship between the destination IP address, the destination port, and the connection port. And save as a mapping relationship record.
  • the method for the proxy service module to boot the non-local traffic includes:
  • the proxy service module sends the resource to the service application module.
  • the obtaining traffic guiding rules include:
  • the proxy server sends the corresponding traffic guidance rule to the proxy service module according to the user information, and the proxy service module receives the traffic guidance rule delivered by the proxy server.
  • the returning source processing to the non-local traffic includes: obtaining a destination IP and a destination port of the non-local traffic from the mapping relationship record, and sending the non-local traffic to the destination IP address The source server corresponding to the destination port.
  • the method for establishing the transmission channel of the proxy service module and the boot node and the source server includes:
  • the proxy service module initiates a connection request to a boot node specified in the traffic guidance rule
  • the packet containing the non-local traffic destination IP address and the destination port information is sent to the guiding node, and the guiding node selects according to the destination IP and destination port parsed from the packet.
  • the source server establishes a connection with the source server. After the connection is successful, the proxy service module sends the non-local traffic to the boot node through the transmission channel, and reaches the source server to obtain the requested resource.
  • the message further includes a check value, wherein the guiding node confirms whether the current connection is legal through the check value, and if it is legal, performs selection and connection of the source server.
  • the method for the proxy service module to send the resource to the service application module includes: after receiving the resource, the proxy service module records the connection port of the service application module according to the mapping relationship, and The resource is sent to the connection port.
  • the source server includes a content server and a cache server.
  • the service application traffic is TCP traffic.
  • a guidance system for service application traffic wherein the guidance system includes:
  • the function setting module traverses the dlopen function and the connect function in all dynamic libraries initially loaded by the business application module, and the mount function Describe the dlopen function and the connect function, and replace them with a custom mydlopen function and a custom myconnect function respectively; wherein the function of the mydlopen function includes loading a new dynamic library, and mounting the new dynamic library The dlopen function and the connect function are replaced with the mydlopen function and the myconnect function, respectively; the function of the myconnect function includes directing non-local traffic of the service application module to the proxy service module ;
  • the proxy service module receives the non-local traffic and boots.
  • the function of the myconnect function includes receiving the traffic sent by the service application module, obtaining the destination IP address and the destination port of the traffic, and determining whether the destination IP address is a local IP address. The address, if yes, sends the traffic to the destination port, and if not, sends the traffic to a port that the proxy service module listens to.
  • the function of the myconnect function includes establishing the destination IP address, the destination port, and the connection port of the non-local traffic, and establishing a mapping relationship between the destination IP address, the destination port, and the connection port. And save as a mapping relationship record.
  • the booting system further includes a boot node and a source server, and the method for the proxy service module to boot the non-local traffic includes:
  • the guiding system further includes a rights management server, and the agent service module acquiring the traffic guiding rule includes:
  • the proxy server sends the corresponding traffic guidance rule to the proxy service module according to the user information, and the proxy service module receives the traffic guidance rule delivered by the proxy server.
  • the proxy service module performs source return processing on the non-local traffic, and obtains a destination IP and a destination port of the non-local traffic from the mapping relationship record, and sends the non-local traffic to the The source server corresponding to the destination IP and destination port.
  • the method for establishing the transmission channel of the proxy service module and the boot node and the source server includes:
  • the proxy service module initiates a connection request to a boot node specified in the traffic guidance rule
  • the packet containing the non-local traffic destination IP address and the destination port information is sent to the guiding node, and the guiding node selects according to the destination IP and destination port parsed from the packet.
  • the source server establishes a connection with the source server. After the connection is successful, the proxy service module sends the non-local traffic to the boot node through the transmission channel, and reaches the source server to obtain the requested resource.
  • the message further includes a check value, wherein the guiding node confirms whether the current connection is legal according to the check value, and if it is legal, performs selection and connection of the source server.
  • the method for the proxy service module to send the resource to the service application module includes: after receiving the resource, the proxy service module records the connection port of the service application module according to the mapping relationship, and The resource is sent to the connection port.
  • the source server includes a content server and a cache server.
  • the service application traffic is TCP traffic.
  • proxy service module and the function setting module are software development kits embedded in the business application module.
  • the electronic device is a mobile communication device.
  • the technical solution provided by the embodiment of the present invention has the beneficial effects of solving the traffic guidance problem through the local proxy and the function replacement manner, thereby greatly improving the smoothness of the traffic guidance in the directed traffic, so that the user can obtain a better experience. And, by verifying the user information, different traffic guiding rules are issued for different users to meet the service requirements.
  • FIG. 1 is a flowchart of a method for guiding service application traffic according to an embodiment of the present invention
  • step S3 is a specific flowchart of step S3 shown in FIG. 1 according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a guiding system 10 for service application traffic according to an embodiment of the present invention.
  • Embodiments of the present invention describe a method and system for guiding traffic of a business application.
  • a mobile app includes, but is not limited to, an Android running on, for example, Google Inc. (Android) operating system, Apple's IOS operating system, Microsoft's Windows Phone operating system, Nokia's Symbian operating system and other mobile apps on mobile platforms. It should be noted that the mobile platform is merely an example, and is not limited to the apps on these platforms. Mobile apps on other unlisted mobile platforms can also be applied to the scope of the present invention.
  • FIG. 1 is a flowchart of a method for guiding service application traffic according to an embodiment of the present invention.
  • step S1 the dlopen function and the connect function in all the dynamic libraries initially loaded by the business application module are traversed.
  • step S2 the dlopen function and the connect function are mounted and replaced with a custom mydlopen function and a custom myconnect function, respectively.
  • the dlopen function is a powerful library function
  • the commonly used function of this function will open a new library and load it into memory.
  • the connect function is also a commonly used function, mainly used to create connections.
  • the mydlopen function is a custom function created by the user. It retains the dlopen function to load the new dynamic library function. At the same time, it adds the dlopen function and the connect function in the new dynamic library, and replaces them with the mydlopen function. And the myconnect function. In this way, when the business application module loads the new dynamic library through the mydlopen function, the dlopen function and the connect function in the new dynamic library are replaced by the mydlopen function and the myconnect function, and finally recursively through the method, the business application module The dlopen function and the connect function in all loaded dynamic libraries are replaced with the mydlopen function and the myconnect function.
  • the myconnect function is also a user-created custom function whose function involves directing non-local traffic from the business application module to the proxy service module.
  • the function of the myconnect function includes receiving the traffic sent by the service application module, obtaining the destination IP address and the destination port of the traffic, determining whether the destination IP address is a local IP address, and if yes, sending the traffic to the The destination port, if not, sends the traffic to a port that the proxy service module listens to.
  • the function of the myconnect function further includes establishing the destination IP address, the destination port, and the connection port of the non-local traffic, and establishing a mapping relationship between the destination IP address, the destination port, and the connection port. And save as a mapping relationship record. This mapping relationship is mainly used for subsequent The source is used when the business application module is used, which will be described in detail below.
  • the mobile app, the service application module is initialized by means of the boot service when the program is started, that is, traversing the dlopen function and the connect in all the dynamic libraries initially loaded by the business application module of the current mobile app. Function, and replace all dlopen and connect functions associated with the dynamic library with the custom mydlopen and myconnect functions, respectively.
  • the required new dynamic library is loaded by the mydlopen function, and the dlopen function and the connect function in the new library are replaced with the mydlopen function and the myconnect function, respectively, while the new library is loaded.
  • the new dynamic library will trigger the mydlopen function when loading other libraries, and use the mydlopen function to determine whether there is a dlopen function and a connect function in the newly loaded dynamic library. If the newly loaded dynamic library has a dlopen function and a connect function, Then replace the dlopen function and the connect function in the newly loaded dynamic library with the mydlopen function and the myconnect function, respectively.
  • the connect function in the dynamic library loaded by the business application module is replaced by the myconnect function, and the local traffic is sent to the local through the myconnect function, and the non-local traffic is sent to the proxy service module, thereby avoiding The traffic leaked.
  • step S3 the proxy service module receives the non-local traffic and performs booting.
  • the service application module when the service application module is started, the user information is requested from the user, and after receiving the user information, the user information is sent to the remote authentication server, and the remote authentication server determines the subscription status of the user according to the user information.
  • the corresponding traffic guidance rule is sent to the proxy service module, where the traffic guidance configuration includes whether to perform traffic guidance, specified boot node information, and a data encryption key, etc., after the proxy service module receives the delivered traffic guidance configuration. , save the traffic guidance configuration and traffic guidance based on the traffic guidance configuration.
  • the traffic guidance rule in the cache is loaded while the proxy service module is enabled, and if the traffic cannot be loaded from the cache. Boot rules that use the default traffic steering rules to direct current traffic to respond quickly to user requests.
  • the method by which the proxy service module boots the non-local traffic includes sub-steps S31-S32.
  • step S3 shown in FIG. 1 in an embodiment of the present invention is shown.
  • step S31 a traffic guidance rule is acquired.
  • obtaining traffic guidance rules includes:
  • the proxy server sends the corresponding traffic guidance rule to the proxy service module according to the user information
  • the proxy service module receives the traffic guidance rule delivered by the proxy server and loads and uses the traffic guidance rule. That is, when the traffic guidance rule delivered by the rights authentication server has not reached the proxy service module, in order to respond quickly to the user request, the proxy service module first loads the traffic guidance rule in the local cache or processes the traffic according to the default traffic guidance rule. After the proxy service module receives the traffic guidance rule delivered by the proxy server, the non-local traffic received from the service application module will be processed according to the newly delivered traffic guidance rule.
  • step S32 the non-local traffic is returned to the source according to the traffic guidance rule; or the transmission channel of the proxy service module and the boot node and the source server is established, and the non-transmission is sent through the transmission channel.
  • the local traffic is sent to the source server, and after the corresponding resource is obtained, the resource is returned to the proxy service module by using the transport channel, and the proxy service module sends the resource to the service application module.
  • the returning source processing to the non-local traffic includes: acquiring a destination IP and a destination port of the non-local traffic from the mapping relationship record, and sending the non-local traffic to the The source server corresponding to the destination IP and destination port.
  • the method for establishing the transmission channel of the proxy service module and the boot node and the source server in step S32 includes: the proxy service module initiating a connection request to the boot node specified in the traffic guidance rule, After the connection succeeds, the packet containing the non-local traffic destination IP address and the destination port information is sent to the guiding node, and the guiding node selects according to the destination IP and destination port parsed from the packet.
  • the source server establishes a connection with the source server. After the connection is successful, the transmission channel is established.
  • the proxy service module sends the non-local traffic to the boot node through the transmission channel, and reaches the source server to obtain the requested resource.
  • the packet further includes a check value, and when the receiving node receives the packet, the guiding node determines whether the current connection is legal according to the check value in the packet, and if it is legal, performs the Describe the source server selection and connection. If it is not legal, it is judged that the user information has expired or expired, then refuses to connect with the source server, and returns connection failure information to the proxy service module.
  • the method for the proxy service module to send the resource to the service application module in step S32 includes: the proxy service module receives a resource through the transmission channel and then performs mapping A connection port of the service application module that issues the request is obtained in the relationship record, and the resource is sent to the connection port.
  • the source server may be a content server, or a cache server in a CDN network.
  • the service application traffic is TCP traffic.
  • the invention provides a method for guiding service application traffic, which guides the traffic of the service application module through a function replacement manner and a local agent, improves the traffic transmission rate by establishing a transmission channel, and verifies the user information through the remote authentication server.
  • a method for guiding service application traffic which guides the traffic of the service application module through a function replacement manner and a local agent, improves the traffic transmission rate by establishing a transmission channel, and verifies the user information through the remote authentication server.
  • a guidance system for service application traffic provided by the present invention will be described in detail below.
  • FIG. 3 it is a schematic structural diagram of a guiding system for service application traffic according to an embodiment of the present invention.
  • the guiding system 10 for business application traffic specifically includes a business application module 101, a function setting module 102, a proxy service module 103, a source server 104, a boot node 105, and an authentication server 106 that are installed on the same electronic device.
  • the proxy service module 103 and the function setting module 102 are software development kits embedded in the business application module 101
  • the electronic devices are mobile communication devices, such as mobile phones and tablet computers.
  • the function setting module 102 traverses the dlopen function and the connect function in all the dynamic libraries initially loaded by the business application module 101, mounts the dlopen function and the connect function, and replaces them with a custom mydlopen function and a custom one, respectively. Myconnect function.
  • the dlopen function is a powerful library function
  • the commonly used function of this function will open a new library and load it into memory.
  • the connect function is also a commonly used function, mainly used to create connections.
  • the mydlopen function is a custom function created by the user. It retains the dlopen function to load the new dynamic library function. At the same time, it adds the dlopen function and the connect function in the new dynamic library, and replaces them with the mydlopen function. And the myconnect function. In this way, when the business application module loads the new dynamic library through the mydlopen function, the dlopen function and the connect function in the new dynamic library. The number is replaced by the mydlopen function and the myconnect function, and finally recursively in this way, the dlopen function and the connect function in all dynamic libraries loaded by the business application module are replaced with the mydlopen function and the myconnect function.
  • the myconnect function is also a user-created custom function whose function involves directing non-local traffic from the business application module to the proxy service module.
  • the function of the myconnect function includes receiving the traffic sent by the service application module, obtaining the destination IP address and the destination port of the traffic, determining whether the destination IP address is a local IP address, and if yes, sending the traffic to the The destination port, if not, sends the traffic to a port that the proxy service module listens to.
  • the function of the myconnect function further includes establishing the destination IP address, the destination port, and the connection port of the non-local traffic, and establishing a mapping relationship between the destination IP address, the destination port, and the connection port. And save as a mapping relationship record. This mapping relationship is mainly used when the subsequent source is returned to the service application module, which will be described in detail below.
  • the mobile app, the service application module is initialized by means of the boot service when the program is started, that is, traversing the dlopen function and the connect in all the dynamic libraries initially loaded by the business application module of the current mobile app. Function, and replace all dlopen and connect functions associated with the dynamic library with the custom mydlopen and myconnect functions, respectively.
  • the required new dynamic library is loaded by the mydlopen function, and the dlopen function and the connect function in the new library are replaced with the mydlopen function and the myconnect function, respectively, while the new library is loaded.
  • the new dynamic library will trigger the mydlopen function when loading other libraries, and use the mydlopen function to determine whether there is a dlopen function and a connect function in the newly loaded dynamic library. If the newly loaded dynamic library has a dlopen function and a connect function, Then replace the dlopen function and the connect function in the newly loaded dynamic library with the mydlopen function and the myconnect function, respectively.
  • the connect function in the dynamic library loaded by the business application module is replaced by the myconnect function, and the local traffic is sent to the local through the myconnect function, and the non-local traffic is sent to the proxy service module, thereby avoiding The traffic leaked.
  • the proxy service module 103 receives the non-local traffic from the service application module 101 sent by the myconnect function connection and boots.
  • the user information is requested from the user. After receiving the user information, the user information is sent to the remote authentication server 106, and the remote authentication server 106 determines the user according to the user information. Order status and issue corresponding traffic guidance rules to the proxy service module 103, wherein the traffic guidance configuration includes whether to perform traffic guidance, specified boot node information, and a data encryption key, etc., after the proxy service module 103 receives the delivered traffic guidance configuration, save the traffic guidance configuration and according to the Traffic guidance configuration for traffic guidance.
  • the process of sending the traffic guidance rule by the remote authentication server 106 takes a certain time.
  • the traffic guidance rule in the cache is loaded while the proxy service module 103 is enabled, and if the traffic cannot be loaded from the cache.
  • the method for the proxy service module 103 to boot non-local traffic includes:
  • obtaining the traffic guidance rule includes: loading the traffic guidance rule in the cache while enabling the proxy service module 103, and if the traffic guidance rule cannot be loaded from the cache, using the default traffic guidance rule; the rights server 106 is based on The user information is delivered to the proxy service module 103, and the proxy service module 103 receives the traffic guidance rules issued by the proxy server 106 and loads and uses the traffic guidance rules. That is, when the traffic guidance rule delivered by the rights server 106 has not reached the proxy service module 103, in order to respond quickly to the user request, the proxy service module 103 first loads the traffic guidance rule in the local cache or the traffic according to the default traffic guidance rule. The process is performed, and after the proxy service module 103 receives the traffic guidance rule delivered by the rights server 106, the received non-local traffic from the service application module 101 will be processed according to the newly delivered traffic guidance rule.
  • the proxy service module 103 processes the non-local traffic according to the traffic guidance rule, and the processing manner includes: directly returning the source, or establishing the transmission of the proxy service module 103, the boot node 105, and the source server 104. Channels, and sending the non-local traffic to the source server 104 through the transmission channel, after acquiring the corresponding resources, transmitting the resources back to the proxy service module 103 through the transmission channel, and then sending the resources to the proxy service module 103.
  • Business application module 101 is performed by the proxy service module 103.
  • the non-local traffic is directly returned to the source, and the proxy service module 103 obtains the destination IP and the destination port of the non-local traffic from the mapping relationship record, and sends the non-local traffic to the destination.
  • the source server 104 corresponding to the IP and destination port.
  • the method for establishing the transmission channel of the proxy service module 103 and the boot node 105 and the source server 104 includes: the proxy service module 103 initiates a connection request to the boot node 104 specified in the traffic guidance rule, and after the connection is successful, Sending a packet containing the destination IP and destination port information of the non-local traffic to the guiding node 104, and the guiding node 104 according to the destination IP parsed from the packet And the destination port, select the source server 105 and establish a connection with the source server 105.
  • the transmission channel is established, and the proxy service module 103 sends the non-local traffic to the boot node 104 through the transmission channel, and reaches the source server 105 to obtain the requested resource.
  • the message includes a check value
  • the guiding node 104 when receiving the message, the guiding node 104 is used to confirm whether the current connection is legal according to the check value in the message, and if it is legal, perform the check with the source server. Select and connect. If it is not legal, it is judged that the user information has expired or expired, then the connection with the source station server is refused, and the connection failure information is returned to the proxy service module 103.
  • the proxy service module 103 sends the requested resource to the service application module 101.
  • the proxy service module 103 obtains the connection port of the requesting service application module 101 from the mapping relationship record after receiving the resource through the transmission channel, and The resource is sent to the connection port, and the service module 101 receives the access resource through the connection port.
  • the source server 105 can be a content server, or a cache server in a CDN network.
  • the service application traffic is TCP traffic.
  • the guiding system for the service application traffic provided by the present invention guides the traffic of the service application module through the function replacement mode and the local agent, improves the traffic transmission rate by establishing the transmission channel, and verifies the user information through the remote authentication server, according to
  • the current user's subscription status and content delivery corresponding traffic guidance rules can not only greatly improve the smoothness of traffic guidance in directed traffic, but also enable users to obtain a better experience, and meet the service provider to provide different services for different users. Experience the business needs.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种业务应用流量的引导方法和***,所述方法包括以下步骤:遍历业务应用模块初始加载的所有动态库中的dlopen函数和connect函数;挂载dlopen函数和connect函数,并分别替换为自定义的mydlopen函数和自定义的myconnect函数;代理服务模块接收非本地流量并进行引导。本发明通过本地代理以及函数替换方式解决流量引导问题,进而极大提高了在定向流量中流量引导的顺畅程度,使用户能获得较好的体验。

Description

一种业务应用流量的引导方法和*** 技术领域
本发明涉及移动互联网移动数据领域,特别涉及一种业务应用流量的引导方法和***。
背景技术
随着移动互联网迅速发展,安装在移动智能终端(例如手机、平板电脑、PDA等等)上的应用程序(即APP)的功能也越来越依赖于网络。很多移动APP的功能都必须通过连接到互联网上才能实现。这使得流量已经成为移动互联网用户非常关注的点。例如,很多用户喜欢在外出的空闲时间,例如等人、等车、乘坐公共交通、点餐空闲时,都会拿出手机浏览网上感兴趣的视频、音乐、图片、文字等等。这些操作都会导致大量的流量消费的产生。给用户造成一定的经济负担。
为了解决上述问题,有人已经提出了一种“定向流量”的概念,即一些内容提供商(CP)会与某些移动营运商开展合作,对于用户通过特定移动APP来访问这些CP所提供的内容而产生的流量在计费上给予优惠(例如半价甚至免费)。通过支持所述“定向流量”的移动APP(例如手机视频),用户可以尽情浏览其提供的内容(例如电影、电视剧、综艺等等),而无需担心流量问题。
在传统推出的定向流量应用中,CP通过上报域名的方式实现定向流量,具体而言,运营商对订购用户访问某些特定地址的通信进行流量减免。但是,在实际应用过程中,CP如果对接多个运营商,则需要匹配各个运营商的接口并根据不同的订购进行不同的流量调度策略,这样一来就存在业务接入方式不统一的问题,导致平台对接较为困难,而且,由于运营商不同,用户的手机没有统一的获取接口,甚至存在取号成功率较低的问题,这些问题集中起来就导致了目前在“定向流量”中出现了流量引导不顺畅的现象,进而严重影响了用户的体验。
发明内容
为了解决现有技术的问题,本发明实施例提供了一种业务应用流量的引导方法和***。所述技术方案如下:
一方面,一种业务应用流量的引导方法,其中,所述方法包括:
遍历业务应用模块初始加载的所有动态库中的dlopen函数和connect函数;
挂载所述dlopen函数和所述connect函数,并分别替换为自定义的mydlopen函数和自定义的myconnect函数;其中,所述mydlopen函数的功能包含加载新的动态库,挂载所述新的动态库中的所述dlopen函数和所述connect函数,并分别替换为所述mydlopen函数和所述myconnect函数;所述myconnect函数的功能包含将所述业务应用模块的非本地流量引导至代理服务模块;
所述代理服务模块接收所述非本地流量,并进行引导。
进一步的,所述myconnect函数的功能包含接收所述业务应用模块发出的流量,获取所述流量目的ip地址和目的端口,判断所述目的IP地址是否为本地IP地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
进一步的,所述myconnect函数的功能包含建立所述获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。
进一步的,所述代理服务模块引导所述非本地流量的方法包含:
获取流量引导规则;
根据所述流量引导规则,对所述非本地流量进行回源处理;或建立所述代理服务模块与引导节点、源服务器的传输通道,并通过所述传输通道发送所述非本地流量至所述源服务器,获取相应资源后,并将所述资源通过所述传输通道回传给所述代理服务模块,所述代理服务模块发送所述资源给所述业务应用模块。
进一步的,所述获取流量引导规则包括:
在启用所述代理服务模块的同时加载缓存中的所述流量引导规则,如果无法从所述缓存中加载所述流量引导规则,则使用默认流量引导规则;
权鉴服务器根据用户信息,下发相应所述流量引导规则给所述代理服务模块,所述代理服务模块接收所述权鉴服务器下发的所述流量引导规则。
进一步的,所述对所述非本地流量进行回源处理包含,从所述映射关系记录中获取所述非本地流量的目的IP和目的端口,并将所述非本地流量发送至所述目的IP和目的端口对应的源服务器。
进一步的,所述建立所述代理服务模块与引导节点、源服务器的传输通道的方法包含:
所述代理服务模块对所述流量引导规则中指定的引导节点发起连接请求,
连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给所述引导节点,所述引导节点根据从所述报文中解析出的所述目的IP和目的端口,选择源服务器并与其建立连接,连接成功后,所述代理服务模块通过所述传输通道发送所述非本地流量给所述引导节点,并到达所述源服务器,获取请求资源。
进一步的,所述报文中更包含校验值,其中所述引导节点通过所述校验值确认当前连接是否合法,若合法,则进行所述源服务器的选择和连接。
进一步的,所述代理服务模块发送所述资源给所述业务应用模块的方法包含:所述代理服务模块接收所述资源后根据所述映射关系记录获取所述业务应用模块的连接端口,并将所述资源发送至所述连接端口。
进一步的,所述源服务器包含内容服务器,缓存服务器。
进一步的,所述业务应用流量为TCP流量。
另一方面,一种业务应用流量的引导***,其中,所述引导***包括:
安装运行在同一电子设备上的业务应用模块、函数设置模块和代理服务模块,其中,所述函数设置模块遍历所述业务应用模块初始加载的所有动态库中的dlopen函数和connect函数,挂载所述dlopen函数和所述connect函数,并将其分别替换为自定义的mydlopen函数和自定义的myconnect函数;其中,所述mydlopen函数的功能包含加载新的动态库,挂载所述新的动态库中的所述dlopen函数和所述connect函数,并分别替换为所述mydlopen函数和所述myconnect函数;所述myconnect函数的功能包含将所述业务应用模块的非本地流量引导至所述代理服务模块;
所述代理服务模块接收所述非本地流量,并进行引导。
进一步的,所述myconnect函数的功能包含接收所述业务应用模块发出的流量,获取所述流量目的ip地址和目的端口,判断所述目的IP地址是否为本地IP 地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
进一步的,所述myconnect函数的功能包含建立所述获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。
进一步的,所述引导***更包含引导节点和源服务器,所述代理服务模块引导所述非本地流量的方法包含:
获取流量引导规则;
根据所述流量引导规则,对所述非本地流量进行回源处理;或建立所述代理服务模块与所述引导节点、所述源服务器的传输通道,并通过所述传输通道发送所述非本地流量至所述源服务器,获取相应资源后,并将所述资源通过所述传输通道回传给所述代理服务模块,所述代理服务模块发送所述资源给所述业务应用模块。
进一步的,所述引导***中更包含权鉴服务器,所述代理服务模块获取流量引导规则包括:
在启用所述代理服务模块的同时加载缓存中的所述流量引导规则,如果无法从所述缓存中加载所述流量引导规则,则使用默认流量引导规则;
所述权鉴服务器根据用户信息,下发相应所述流量引导规则给所述代理服务模块,所述代理服务模块接收所述权鉴服务器下发的所述流量引导规则。
进一步的,所述代理服务模块对所述非本地流量进行回源处理包含,从所述映射关系记录中获取所述非本地流量的目的IP和目的端口,并将所述非本地流量发送至所述目的IP和目的端口对应的源服务器。
进一步的,所述建立所述代理服务模块与引导节点、源服务器的传输通道的方法包含:
所述代理服务模块对所述流量引导规则中指定的引导节点发起连接请求,
连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给所述引导节点,所述引导节点根据从所述报文中解析出的所述目的IP和目的端口,选择源服务器并与其建立连接,连接成功后,所述代理服务模块通过所述传输通道发送所述非本地流量给所述引导节点,并到达所述源服务器,获取请求资源。
进一步的,所述报文中更包含校验值,其中所述引导节点根据所述校验值确认当前连接是否合法,若合法,则进行所述源服务器的选择和连接。
进一步的,所述代理服务模块发送所述资源给所述业务应用模块的方法包含:所述代理服务模块接收所述资源后根据所述映射关系记录获取所述业务应用模块的连接端口,并将所述资源发送至所述连接端口。
进一步的,所述源服务器包含内容服务器,缓存服务器。
进一步的,所述业务应用流量为TCP流量。
进一步的,所述代理服务模块和所述函数设置模块为嵌入在所述业务应用模块中的软件开发工具包。
进一步的,所述电子设备为移动通讯设备。
本发明实施例提供的技术方案带来的有益效果是:通过本地代理以及函数替换方式解决流量引导问题,进而极大提高了在定向流量中流量引导的顺畅程度,使用户能获得较好的体验,并且可通过对用户信息的验证,为不同用户下发不同流量引导规则,以满足业务要求。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明一实施方式中业务应用流量的引导方法流程图;
图2为本发明一实施方式中图1所示的步骤S3的具体流程图;
图3为本发明一实施方式中业务应用流量的引导***10的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明的实施例描述一种业务应用流量的引导方法和***。本发明的实施例所涉及的移动app,包括但不局限于:运行于例如谷歌(Google)公司的安卓 (Android)操作***、苹果公司的IOS操作***、微软公司的Windows Phone操作***、诺基亚公司的Symbian操作***等等移动平台上的移动app。需要说明的是移动平台仅仅是示例说明,而并非局限于这些平台上的app,其它未列出的移动平台上的移动app也能应用于本发明的范畴。
实施例一
以下将对本发明所提供的实施一中的一种业务应用流量的引导方法进行详细说明。
请参阅图1,为本发明一实施方式中业务应用流量的引导方法流程图。
在步骤S1中,遍历业务应用模块初始加载的所有动态库中的dlopen函数和connect函数。
在步骤S2中,挂载所述dlopen函数和所述connect函数,并分别替换为自定义的mydlopen函数和自定义的myconnect函数。
其中,dlopen函数是一个强大的库函数,该函数常用的功能包含将打开一个新库,并把它装入内存。
connect函数也是一个常用的函数,主要用于创建连接。
mydlopen函数为用户创建的自定义函数,其保留了dlopen函数的加载新的动态库功能的同时,新增了挂载所述新的动态库中的dlopen函数和connect函数,并分别替换为mydlopen函数和myconnect函数。如此一来,当业务应用模块通过mydlopen函数加载新的动态库时,该新动态库中的dlopen函数和connect函数会被替换成mydlopen函数和myconnect函数,并最终通过该方式递归,业务应用模块所加载的所有动态库中的dlopen函数和connect函数均被替换成mydlopen函数和myconnect函数。
myconnect函数也是用户创建的自定义函数,其功能包含将所述业务应用模块的非本地流量引导至代理服务模块。具体而言,myconnect函数的功能包含接收业务应用模块发出的流量,获取所述流量的目的IP地址和目的端口,判断所述目的IP地址是否为本地IP地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
更进一步的,myconnect函数的功能还包含建立所述获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。该映射关系主要用于后续 回源给业务应用模块时使用,将在下文进行详细说明。
在本实施方式中,移动app,即务应用模块在程序启动时,采用引导服务挂载的方式进行初始化,即:遍历当前移动app的业务应用模块初始加载的所有动态库中的dlopen函数和connect函数,并将所有与动态库相关联的dlopen函数和connect函数分别替换为自定义的mydlopen函数和myconnect函数。
在移动app的使用过程中,通过mydlopen函数加载所需的新的动态库,并在加载完该新库的同时,其新库中的dlopen函数和connect函数分别替换为mydlopen函数和myconnect函数,同样的,该些新动态库在加载其它库时,会触发mydlopen函数,利用mydlopen函数判断新加载的动态库中是否有dlopen函数和connect函数,如果新加载的动态库中有dlopen函数和connect函数,则将新加载的动态库中的dlopen函数和connect函数分别替换为mydlopen函数和myconnect函数。如此一拉,通过上述递归方式,业务应用模块所加载的动态库中的connect函数均被替换成myconnect函数,并通过myconnect函数将本地流量发往本地,非本地流量发往代理服务模块,从而避免了流量泄漏。
在步骤S3中,所述代理服务模块接收所述非本地流量,并进行引导。
在本实施方式中,在业务应用模块启动时,会向用户请求用户信息,接收到用户信息之后,发送至远端鉴权服务器,由远端鉴权服务器根据用户信息判断该用户的订购状态并下发相应的流量引导规则给代理服务模块,其中,流量引导配置包括是否进行流量引导、指定的引导节点信息以及数据加密秘钥等,当代理服务模块收到下发的所述流量引导配置后,保存该流量引导配置并根据该流量引导配置进行流量引导。
由于远端鉴权服务器下发流量引导规则的过程需要一定的时间,为了保证用户的体验,在启用所述代理服务模块的同时加载缓存中的流量引导规则,如果无法从所述缓存中加载流量引导规则,则使用默认流量引导规则对当前流量进行引导,从而对用户的请求进行快速响应。
如图2所示,在本实施方式中,代理服务模块引导所述非本地流量的方法包含子步骤S31-S32。
请参阅图2,所示为本发明一实施方式中图1所示的步骤S3的具体流程图。
在步骤S31中,获取流量引导规则。
根据上文所述,获取流量引导规则包括:
在启用所述代理服务模块的同时加载缓存中的所述流量引导规则,如果无法从所述缓存中加载所述流量引导规则,则使用默认流量引导规则;
权鉴服务器根据用户信息,下发相应所述流量引导规则给所述代理服务模块,所述代理服务模块接收所述权鉴服务器下发的所述流量引导规则并加载使用。也就是说,当权鉴服务器下发的流量引导规则还未达到代理服务模块时,为了快速响应用户请求,代理服务模块先加载本地缓存中的流量引导规则或根据默认流量引导规则对流量进行处理,而当代理服务模块接收到权鉴服务器下发的流量引导规则之后,接收到的来自业务应用模块的非本地流量将根据新下发的流量引导规则进行处理。
在步骤S32中,根据所述流量引导规则,对所述非本地流量进行回源处理;或建立所述代理服务模块与引导节点、源服务器的传输通道,并通过所述传输通道发送所述非本地流量至所述源服务器,获取相应资源后,并将所述资源通过所述传输通道回传给所述代理服务模块,所述代理服务模块发送所述资源给所述业务应用模块。
在本实施方式中,所述对所述非本地流量进行回源处理包含,从所述映射关系记录中获取所述非本地流量的目的IP和目的端口,并将所述非本地流量发送至所述目的IP和目的端口对应的源服务器。
在本实施方式中,步骤S32中所述建立所述代理服务模块与引导节点、源服务器的传输通道的方法包含:所述代理服务模块对所述流量引导规则中指定的引导节点发起连接请求,连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给所述引导节点,所述引导节点根据从所述报文中解析出的所述目的IP和目的端口,选择源服务器并与其建立连接,连接成功后,传输通道建立完成,所述代理服务模块通过所述传输通道发送所述非本地流量给所述引导节点,并到达所述源服务器,获取请求资源。
在本实施方式中,所述报文中更包含校验值,引导节点在接收到所述报文时,根据报文中的校验值用于确认当前连接是否合法,若合法,则进行所述源服务器的选择和连接。若不合法,则判断该用户信息已过期或失效,则拒绝与源站服务器进行连接,并返回连接失败信息至代理服务模块。
在本实施方式中,步骤S32中所述代理服务模块发送所述资源给所述业务应用模块的方法包含:所述代理服务模块通过所述传输通道接收资源后从映射 关系记录中获取发出请求的业务应用模块的连接端口,并将所述资源发送至所述连接端口。
在本实施方式中,源服务器可以为内容服务器,或CDN网络中的缓存服务器。
在本实施方式中,业务应用流量为TCP流量。
本发明提供的一种业务应用流量的引导方法,通过函数替换方式及本地代理对业务应用模块的流量进行引导,借助建立传输通道提升流量传输速率,并通过远端鉴权服务器对用户信息的验证,根据当前用户的订购状态和内容下发相应的流量引导规则,不仅可极大提高在定向流量中流量引导的顺畅程度,使用户能获得较好的体验,而且满足服务提供商针对不同用户提供不同服务体验的业务需求。
实施例二
以下将对本发明所提供的一种业务应用流量的引导***进行详细说明。
请参阅图3,所示为本发明一实施方式中业务应用流量的引导***结构示意图。
业务应用流量的引导***10具体包括安装运行在同一电子设备上的业务应用模块101、函数设置模块102、代理服务模块103、源服务器104、引导节点105以及鉴权服务器106。在本实施方式中,代理服务模块103和函数设置模块102为嵌入在业务应用模块101中的软件开发工具包,所述电子设备为移动通讯设备,例如手机、平板电脑。
函数设置模块102遍历业务应用模块101初始加载的所有动态库中的dlopen函数和connect函数,挂载所述dlopen函数和所述connect函数,并将其分别替换为自定义的mydlopen函数和自定义的myconnect函数。
其中,dlopen函数是一个强大的库函数,该函数常用的功能包含将打开一个新库,并把它装入内存。
connect函数也是一个常用的函数,主要用于创建连接。
mydlopen函数为用户创建的自定义函数,其保留了dlopen函数的加载新的动态库功能的同时,新增了挂载所述新的动态库中的dlopen函数和connect函数,并分别替换为mydlopen函数和myconnect函数。如此一来,当业务应用模块通过mydlopen函数加载新的动态库时,该新动态库中的dlopen函数和connect函 数会被替换成mydlopen函数和myconnect函数,并最终通过该方式递归,业务应用模块所加载的所有动态库中的dlopen函数和connect函数均被替换成mydlopen函数和myconnect函数。
myconnect函数也是用户创建的自定义函数,其功能包含将所述业务应用模块的非本地流量引导至代理服务模块。具体而言,myconnect函数的功能包含接收业务应用模块发出的流量,获取所述流量的目的IP地址和目的端口,判断所述目的IP地址是否为本地IP地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
更进一步的,myconnect函数的功能还包含建立所述获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。该映射关系主要用于后续回源给业务应用模块时使用,将在下文进行详细说明。
在本实施方式中,移动app,即务应用模块在程序启动时,采用引导服务挂载的方式进行初始化,即:遍历当前移动app的业务应用模块初始加载的所有动态库中的dlopen函数和connect函数,并将所有与动态库相关联的dlopen函数和connect函数分别替换为自定义的mydlopen函数和myconnect函数。
在移动app的使用过程中,通过mydlopen函数加载所需的新的动态库,并在加载完该新库的同时,其新库中的dlopen函数和connect函数分别替换为mydlopen函数和myconnect函数,同样的,该些新动态库在加载其它库时,会触发mydlopen函数,利用mydlopen函数判断新加载的动态库中是否有dlopen函数和connect函数,如果新加载的动态库中有dlopen函数和connect函数,则将新加载的动态库中的dlopen函数和connect函数分别替换为mydlopen函数和myconnect函数。如此一拉,通过上述递归方式,业务应用模块所加载的动态库中的connect函数均被替换成myconnect函数,并通过myconnect函数将本地流量发往本地,非本地流量发往代理服务模块,从而避免了流量泄漏。
代理服务模块103接收由myconnect函数连接发送而来的,来自业务应用模块101的非本地流量,并进行引导。
在本实施方式中,在业务应用模块101启动时,会向用户请求用户信息,接收到用户信息之后,发送至远端鉴权服务器106,由远端鉴权服务器106根据用户信息判断该用户的订购状态并下发相应的流量引导规则给代理服务模块 103,其中,流量引导配置包括是否进行流量引导、指定的引导节点信息以及数据加密秘钥等,当代理服务模块103收到下发的所述流量引导配置后,保存该流量引导配置并根据该流量引导配置进行流量引导。
由于远端鉴权服务器106下发流量引导规则的过程需要一定的时间,为了保证用户的体验,在启用代理服务模块103的同时加载缓存中的流量引导规则,如果无法从所述缓存中加载流量引导规则,则使用默认流量引导规则对当前流量进行引导,从而对用户的请求进行快速响应。
在本实施方式中,代理服务模块103引导非本地流量的方法包含:
获取流量引导规则。根据上文所述,获取流量引导规则包括:在启用代理服务模块103的同时加载缓存中的流量引导规则,如果无法从缓存中加载流量引导规则,则使用默认流量引导规则;权鉴服务器106根据用户信息,下发相应流量引导规则给代理服务模块103,代理服务模块103接收权鉴服务器106下发的流量引导规则并加载使用。也就是说,当权鉴服务器106下发的流量引导规则还未达到代理服务模块103时,为了快速响应用户请求,代理服务模块103先加载本地缓存中的流量引导规则或根据默认流量引导规则对流量进行处理,而当代理服务模块103接收到权鉴服务器106下发的流量引导规则之后,接收到的来自业务应用模块101的非本地流量将根据新下发的流量引导规则进行处理。
获取到流量引导规则之后,代理服务模块103根据流量引导规则,对所述非本地流量进行处理,处理的方式包含:直接回源、或建立代理服务模块103与引导节点105、源服务器104的传输通道,并通过传输通道发送所述非本地流量至源服务器104,获取相应资源后,将所述资源通过所述传输通道回传给代理服务模块103,再由代理服务模块103发送所述资源给业务应用模块101。
在本实施方式中,对所述非本地流量进行直接回源包含,代理服务模块103从映射关系记录中获取该非本地流量的目的IP和目的端口,并将该非本地流量发送至所述目的IP和目的端口对应的源服务器104。
在本实施方式中,建立代理服务模块103与引导节点105、源服务器104的传输通道的方法包含:代理服务模块103对所述流量引导规则中指定的引导节点104发起连接请求,连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给引导节点104,引导节点104根据从报文中解析出的目的IP 和目的端口,选择源服务器105并与其建立连接,连接成功后,传输通道建立完成,代理服务模块103通过该传输通道发送非本地流量给引导节点104,并到达源服务器105,获取请求资源。
在本实施方式中,上述报文中包含校验值,引导节点104在接收到报文时,根据报文中的校验值用于确认当前连接是否合法,若合法,则进行与源服务器的选择和连接。若不合法,则判断该用户信息已过期或失效,则拒绝与源站服务器进行连接,并返回连接失败信息至代理服务模块103。
在本实施方式中,代理服务模块103发送请求到的资源给业务应用模块101包含:代理服务模块103通过传输通道接收资源后从映射关系记录中获取发出请求的业务应用模块101的连接端口,并将所资源发送至所述连接端口,业务模块101通过该连接端口接收访问资源。
在本实施方式中,源服务器105可以为内容服务器,或CDN网络中的缓存服务器。
在本实施方式中,业务应用流量为TCP流量。
本发明提供的业务应用流量的引导***,通过函数替换方式及本地代理对业务应用模块的流量进行引导,借助建立传输通道提升流量传输速率,并通过远端鉴权服务器对用户信息的验证,根据当前用户的订购状态和内容下发相应的流量引导规则,不仅可极大提高在定向流量中流量引导的顺畅程度,使用户能获得较好的体验,而且满足服务提供商针对不同用户提供不同服务体验的业务需求。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备 (可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (24)

  1. 一种业务应用流量的引导方法,其特征在于,所述方法包括:
    遍历业务应用模块初始加载的所有动态库中的dlopen函数和connect函数;
    挂载所述dlopen函数和所述connect函数,并分别替换为自定义的mydlopen函数和自定义的myconnect函数;其中,所述mydlopen函数的功能包含加载新的动态库,挂载所述新的动态库中的所述dlopen函数和所述connect函数,并分别替换为所述mydlopen函数和所述myconnect函数;所述myconnect函数的功能包含将所述业务应用模块的非本地流量引导至代理服务模块;
    所述代理服务模块接收所述非本地流量,并进行引导。
  2. 如权利要求1所述的业务应用流量的引导方法,其特征在于,所述myconnect函数的功能包含接收所述业务应用模块发出的流量,获取所述流量目的ip地址和目的端口,判断所述目的IP地址是否为本地IP地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
  3. 如权利要求1所述的业务应用流量引导方法,其特征在于,所述myconnect函数的功能包含获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。
  4. 如权利要求3所述的业务应用流量的引导方法,其特征在于,所述代理服务模块引导所述非本地流量的方法包含:
    获取流量引导规则;
    根据所述流量引导规则,对所述非本地流量进行回源处理;或建立所述代理服务模块与引导节点、源服务器的传输通道,并通过所述传输通道发送所述非本地流量至所述源服务器,获取相应资源后,并将所述资源通过所述传输通道回传给所述代理服务模块,所述代理服务模块发送所述资源给所述业务应用模块。
  5. 如权利要求4所述的业务应用流量的引导方法,其特征在于,所述获取流量引导规则包括:
    在启用所述代理服务模块的同时加载缓存中的所述流量引导规则,如果无法从所述缓存中加载所述流量引导规则,则使用默认流量引导规则;
    权鉴服务器根据用户信息,下发相应所述流量引导规则给所述代理服务模块,所述代理服务模块接收所述权鉴服务器下发的所述流量引导规则。
  6. 如权利要求4所述的业务应用流量的引导方法,其特征在于,所述对所述非本地流量进行回源处理包含,从所述映射关系记录中获取所述非本地流量的目的IP和目的端口,并将所述非本地流量发送至所述目的IP和目的端口对应的源服务器。
  7. 如权利要求4所述的业务应用流量的引导方法,其特征在于,所述建立所述代理服务模块与引导节点、源服务器的传输通道的方法包含:
    所述代理服务模块对所述流量引导规则中指定的引导节点发起连接请求,
    连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给所述引导节点,所述引导节点根据从所述报文中解析出的所述目的IP和目的端口,选择源服务器并与其建立连接,连接成功后,所述代理服务模块通过所述传输通道发送所述非本地流量给所述引导节点,并到达所述源服务器,获取请求资源。
  8. 如权利要求7所述的业务应用流量的引导方法,其特征在于,所述报文中更包含校验值,其中所述引导节点通过所述校验值确认当前连接是否合法,若合法,则进行所述源服务器的选择和连接。
  9. 如权利要求4所述的业务应用流量的引导方法,其特征在于,所述代理服务模块发送所述资源给所述业务应用模块的方法包含:
    所述代理服务模块接收所述资源后根据所述映射关系记录获取所述业务应用模块的连接端口,并将所述资源发送至所述连接端口。
  10. 如权利要求4或6所述的业务应用流量的引导方法,其特征在于,所述源服务器包含内容服务器,缓存服务器。
  11. 如权利要求1所述的业务应用流量的引导方法,其特征在于,所述业务应用流量为TCP流量。
  12. 一种业务应用流量的引导***,其特征在于,所述引导***包括:
    安装运行在同一电子设备上的业务应用模块、函数设置模块和代理服务模块,其中,所述函数设置模块遍历所述业务应用模块初始加载的所有动态库中的dlopen函数和connect函数,挂载所述dlopen函数和所述connect函数,并将其分别替换为自定义的mydlopen函数和自定义的myconnect函数;其中,所述mydlopen函数的功能包含加载新的动态库,挂载所述新的动态库中的所述dlopen函数和所述connect函数,并分别替换为所述mydlopen函数和所述myconnect函数;所述myconnect函数的功能包含将所述业务应用模块的非本地流量引导至所述代理服务模块;
    所述代理服务模块接收所述非本地流量,并进行引导。
  13. 如权利要求12所述的业务应用流量的引导***,其特征在于,所述myconnect函数的功能包含接收所述业务应用模块发出的流量,获取所述流量目的ip地址和目的端口,判断所述目的IP地址是否为本地IP地址,若是,则将所述流量发送到所述目的端口,若不是,将所述流量发送到所述代理服务模块监听的端口。
  14. 如权利要求12所述的业务应用流量的引导***,其特征在于,所述myconnect函数的功能包含建立所述获取所述非本地流量的目的IP地址、目的端口和连接端口,并建立所述目的IP地址、所述目的端口与所述连接端口的映射关系,并保存为映射关系记录。
  15. 如权利要求14所述的业务应用流量的引导***,其特征在于,所述引 导***更包含引导节点和源服务器,所述代理服务模块引导所述非本地流量的方法包含:
    获取流量引导规则;
    根据所述流量引导规则,对所述非本地流量进行回源处理;或建立所述代理服务模块与所述引导节点、所述源服务器的传输通道,并通过所述传输通道发送所述非本地流量至所述源服务器,获取相应资源后,并将所述资源通过所述传输通道回传给所述代理服务模块,所述代理服务模块发送所述资源给所述业务应用模块。
  16. 如权利要求15所述的业务应用流量的引导方法,其特征在于,所述引导***中更包含权鉴服务器,所述代理服务模块获取流量引导规则包括:
    在启用所述代理服务模块的同时加载缓存中的所述流量引导规则,如果无法从所述缓存中加载所述流量引导规则,则使用默认流量引导规则;
    所述权鉴服务器根据用户信息,下发相应所述流量引导规则给所述代理服务模块,所述代理服务模块接收所述权鉴服务器下发的所述流量引导规则。
  17. 如权利要求15所述的业务应用流量的引导***,其特征在于,所述代理服务模块对所述非本地流量进行回源处理包含,从所述映射关系记录中获取所述非本地流量的目的IP和目的端口,并将所述非本地流量发送至所述目的IP和目的端口对应的源服务器。
  18. 如权利要求15所述的业务应用流量的引导***,其特征在于,所述建立所述代理服务模块与引导节点、源服务器的传输通道的方法包含:
    所述代理服务模块对所述流量引导规则中指定的引导节点发起连接请求,
    连接成功后,将包含所述非本地流量目的IP和目的端口信息的报文发送给所述引导节点,所述引导节点根据从所述报文中解析出的所述目的IP和目的端口,选择源服务器并与其建立连接,连接成功后,所述代理服务模块通过所述传输通道发送所述非本地流量给所述引导节点,并到达所述源服务器,获取请求资源。
  19. 如权利要求18所述的业务应用流量的引导***,其特征在于,所述报文中更包含校验值,其中所述引导节点根据所述校验值确认当前连接是否合法,若合法,则进行所述源服务器的选择和连接。
  20. 如权利要求15所述的业务应用流量的引导***,其特征在于,所述代理服务模块发送所述资源给所述业务应用模块的方法包含:
    所述代理服务模块接收所述资源后根据所述映射关系记录获取所述业务应用模块的连接端口,并将所述资源发送至所述连接端口。
  21. 如权利要求15或17所述的业务应用流量的引导***,其特征在于,所述源服务器包含内容服务器,缓存服务器。
  22. 如权利要求12所述的业务应用流量的引导***,其特征在于,所述业务应用流量为TCP流量。
  23. 如权利要求12所述的业务应用流量的引导***,其特征在于,所述代理服务模块和所述函数设置模块为嵌入在所述业务应用模块中的软件开发工具包。
  24. 如权利要求12所述的业务应用流量的引导***,其特征在于,所述电子设备为移动通讯设备。
PCT/CN2017/095533 2017-07-12 2017-08-01 一种业务应用流量的引导方法和*** WO2019010734A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/330,510 US11012359B2 (en) 2017-07-12 2017-08-01 Method and system for redirecting service application traffic
EP17917570.8A EP3547748B1 (en) 2017-07-12 2017-08-01 Method and system for guiding service application traffic

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710566131.XA CN107295573B (zh) 2017-07-12 2017-07-12 一种业务应用流量的引导方法和***
CN201710566131.X 2017-07-12

Publications (1)

Publication Number Publication Date
WO2019010734A1 true WO2019010734A1 (zh) 2019-01-17

Family

ID=60101177

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095533 WO2019010734A1 (zh) 2017-07-12 2017-08-01 一种业务应用流量的引导方法和***

Country Status (4)

Country Link
US (1) US11012359B2 (zh)
EP (1) EP3547748B1 (zh)
CN (1) CN107295573B (zh)
WO (1) WO2019010734A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261660A (zh) * 2020-10-16 2021-01-22 深圳安软信创技术有限公司 安卓手机端应用代理接入安全控制方法
EP4243374A4 (en) * 2020-12-04 2024-04-10 Samsung Electronics Co., Ltd. METHOD AND APPARATUS FOR PERFORMING A RADIO ACCESS NETWORK FUNCTION

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595218B (zh) * 2018-04-17 2021-08-27 网宿科技股份有限公司 一种加载***动态库的方法和装置
CN109150725B (zh) * 2018-07-09 2021-07-16 网宿科技股份有限公司 流量疏导方法及服务器
CN109039898B (zh) * 2018-08-08 2021-12-07 网宿科技股份有限公司 一种引流信息的管理方法及装置
CN109710671B (zh) * 2018-12-14 2023-05-30 国云科技股份有限公司 实现数据库操作数据引流的方法及其数据库防火墙***
CN112714078A (zh) * 2019-10-24 2021-04-27 中兴通讯股份有限公司 网络流量的识别方法、装置、存储介质及服务器
CN111294399B (zh) * 2020-02-04 2023-06-23 网宿科技股份有限公司 一种数据传输方法和装置
CN114520995A (zh) * 2022-01-11 2022-05-20 宝宝巴士股份有限公司 一种无侵入监听应用网络流量使用的实现方法
CN115237506B (zh) * 2022-09-21 2022-12-09 暨南大学 Cps***中可靠性驱动的分层任务卸载方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916405A (zh) * 2014-04-25 2014-07-09 厦门享游网络科技有限公司 一种IOS上针对App的TCP/UDP流量引导的方法
CN103944906A (zh) * 2014-04-25 2014-07-23 厦门享游网络科技有限公司 一种iOS上针对APP的HTTP流量引导的方法
CN104484259A (zh) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 应用程序的流量监控方法、装置和移动终端
WO2016041322A1 (zh) * 2014-09-16 2016-03-24 网宿科技股份有限公司 移动智能终端下转发应用内流量的方法
CN105898775A (zh) * 2016-03-31 2016-08-24 网宿科技股份有限公司 一种实现移动app的定向UDP流量引导的方法和***

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7631084B2 (en) * 2001-11-02 2009-12-08 Juniper Networks, Inc. Method and system for providing secure access to private networks with client redirection
US20060056379A1 (en) * 2004-09-14 2006-03-16 Motorola, Inc. System and method for network-assisted connection in a wireless environment
US20060080682A1 (en) * 2004-10-12 2006-04-13 Picsel Research Ltd. Run time dynamic linking
US8516455B2 (en) * 2011-06-14 2013-08-20 International Business Machines Corporation Dynamic loading of kernel extensions
CN102647455B (zh) * 2012-03-23 2015-08-05 华为技术有限公司 移动广告的处理方法、代理服务器及终端
CN103516863A (zh) * 2012-06-18 2014-01-15 华为终端有限公司 设备能力管理方法及移动终端
US9047463B2 (en) * 2012-06-29 2015-06-02 Sri International Method and system for protecting data flow at a mobile device
US9830176B2 (en) * 2013-04-19 2017-11-28 The Trustees Of Columbia University In The City Of New York Methods, systems, and media for binary compatible graphics support in mobile operating systems
CN104023092B (zh) * 2014-04-29 2017-09-26 中国联合网络通信集团有限公司 一种实现定向流量包的方法及***
CN105208605B (zh) * 2014-06-20 2020-02-07 中兴通讯股份有限公司 链路信息的发送方法、装置和流量的控制方法、装置
CN104468269B (zh) * 2014-12-01 2018-02-13 郭丹 一种基于Android终端设备的定向流量监管方法
US10193994B2 (en) * 2015-06-18 2019-01-29 Qualcomm Incorporated Signaling cached segments for broadcast
KR102202258B1 (ko) * 2016-09-05 2021-01-13 후아웨이 테크놀러지 컴퍼니 리미티드 가상 머신을 위한 그래픽처리장치의 할당

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916405A (zh) * 2014-04-25 2014-07-09 厦门享游网络科技有限公司 一种IOS上针对App的TCP/UDP流量引导的方法
CN103944906A (zh) * 2014-04-25 2014-07-23 厦门享游网络科技有限公司 一种iOS上针对APP的HTTP流量引导的方法
WO2016041322A1 (zh) * 2014-09-16 2016-03-24 网宿科技股份有限公司 移动智能终端下转发应用内流量的方法
CN104484259A (zh) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 应用程序的流量监控方法、装置和移动终端
CN105898775A (zh) * 2016-03-31 2016-08-24 网宿科技股份有限公司 一种实现移动app的定向UDP流量引导的方法和***

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261660A (zh) * 2020-10-16 2021-01-22 深圳安软信创技术有限公司 安卓手机端应用代理接入安全控制方法
CN112261660B (zh) * 2020-10-16 2024-06-04 深圳安软信创技术有限公司 安卓手机端应用代理接入安全控制方法
EP4243374A4 (en) * 2020-12-04 2024-04-10 Samsung Electronics Co., Ltd. METHOD AND APPARATUS FOR PERFORMING A RADIO ACCESS NETWORK FUNCTION

Also Published As

Publication number Publication date
CN107295573A (zh) 2017-10-24
CN107295573B (zh) 2019-08-02
EP3547748B1 (en) 2021-12-01
EP3547748A4 (en) 2019-11-27
EP3547748A1 (en) 2019-10-02
US11012359B2 (en) 2021-05-18
US20190199635A1 (en) 2019-06-27

Similar Documents

Publication Publication Date Title
WO2019010734A1 (zh) 一种业务应用流量的引导方法和***
EP3467692B1 (en) Message permission management method and device, and storage medium
US8359638B2 (en) Application of dynamic profiles to the allocation and configuration of network resources
CN105577777B (zh) 一种消息处理方法、装置及***
US8050242B2 (en) Method and system for tailoring device provisioning based on device capability information communicated to network
US7191179B2 (en) Distributed profile storage and management in a telecommunication network
CN110300133B (zh) 跨域数据传输方法、装置、设备及存储介质
US20080020738A1 (en) Mobile device service authorization system and method
US9565635B2 (en) Activating a mobile terminal from mobile network side
US20210314156A1 (en) Authentication method, content delivery network cdn, and content server
US10104513B2 (en) Mobile machine
WO2017041562A1 (zh) 一种识别终端设备用户身份的方法和装置
KR20220080736A (ko) 온-디맨드 네트워크 연결
EP2974159B1 (en) Method, device and system for voice communication
CN105376734A (zh) 进行智能管道能力调用的方法与***
US7086051B2 (en) Method and apparatus for just-in-time provisioning application-related information at a communication device
US8923309B2 (en) Managing access gateways
US8392588B2 (en) Terminal and method for selecting secure device
US9860736B1 (en) Providing network resource access based on a purpose identifier
RU2596588C2 (ru) Система и способ для активации мобильного устройства для инициирования связи
US11556402B2 (en) Metadata plane for application programming interface
KR101042110B1 (ko) 이에스비를 이용하는 오픈 소스 중계 장치 및 이를구비하는 시스템과 방법, 상기 방법을 구현하는 프로그램이저장된 기록매체
CN113746909A (zh) 网络连接方法、装置、电子设备和计算机可读存储介质
US9609586B2 (en) Controlling access to a network
CN104980471A (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: 17917570

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017917570

Country of ref document: EP

Effective date: 20190626

NENP Non-entry into the national phase

Ref country code: DE