CN109889468B - Network data transmission method, system, device, equipment and storage medium - Google Patents
Network data transmission method, system, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109889468B CN109889468B CN201711274759.9A CN201711274759A CN109889468B CN 109889468 B CN109889468 B CN 109889468B CN 201711274759 A CN201711274759 A CN 201711274759A CN 109889468 B CN109889468 B CN 109889468B
- Authority
- CN
- China
- Prior art keywords
- network request
- network
- module
- request
- interception
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000005540 biological transmission Effects 0.000 title claims abstract description 45
- 230000004044 response Effects 0.000 claims description 47
- 238000012545 processing Methods 0.000 claims description 26
- 230000008569 process Effects 0.000 claims description 16
- 230000006870 function Effects 0.000 claims description 15
- 230000003068 static effect Effects 0.000 claims description 8
- 238000012546 transfer Methods 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 230000001960 triggered effect Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 238000012790 confirmation Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The application provides a network data transmission method, which is applied to a network agent module in an application client, and comprises the following steps: registering information of the network agent module in an interception module provided by an operating system and used for intercepting network requests, so that the interception module sends the intercepted network requests from an application layer to the network agent module; receiving the network request from the interception module; when the network request is determined to be a network request of a specified type, establishing a transmission layer connection according to address information carried by the network request; and sending the network request of the specified type through the transport layer connection.
Description
Technical Field
The present application relates to the field of information technologies, and in particular, to a method, a system, a device, a computing device, and a storage medium for transmitting network data.
Background
Currently, some operating systems installed on terminal devices (such as mobile phones, tablets, PCs, etc.) provide secure transmission functions for applications, and the operating systems only allow transmission of encrypted network requests (such as HTTPS requests) based on a network secure transmission protocol, but intercept all unencrypted network requests (such as HTTP requests) and prohibit transmission of the unencrypted network requests. For Applications (APP), some network requests have low security requirements (such as requests for browsing news web pages, etc.), and do not need to be subjected to such encrypted security processing, and if all network requests are subjected to encryption processing, more system resources are occupied, and the overall performance is affected.
Disclosure of Invention
The technical scheme is provided, and the transmission of the network request of the specified type can be completed in time so as to improve the system performance.
The application example provides a network data transmission method, which is applied to a network agent module in an application client, and the method comprises the following steps: registering information of the network agent module in an interception module provided by an operating system and used for intercepting network requests so that the interception module sends the intercepted network requests from an application layer to the network agent module; receiving the network request from the interception module; when the network request is determined to be a network request of a specified type, establishing a transmission layer connection according to address information carried by the network request; and sending the network request of the specified type through the transport layer connection.
The present application further provides a system for transmitting network data, including: the system comprises an interception module and a network agent module; wherein the interception module is provided by an operating system, and the network agent module is positioned in an application client; the interception module sends the intercepted network request from the application layer to the network agent module according to the registration information of the network agent module in the interception module; the network agent module registers the information of the network agent module in the interception module, receives the network request from the interception module, establishes a transport layer connection according to address information carried by the network request when the network request is determined to be the network request of the designated type, and sends the network request of the designated type through the transport layer connection.
The present application also provides a device for transmitting network data, which is applied to a network proxy module in an application client, and the device includes: the registration module registers the information of the network agent module in an interception module provided by an operating system and used for intercepting the network request so as to enable the interception module to send the intercepted network request from the application layer to the network agent module; a request receiving module for receiving the network request from the intercepting module; the establishing module is used for establishing a transmission layer connection according to address information carried by the network request when the network request is determined to be the network request of the specified type; and the request sending module is used for sending the network request of the specified type through the transmission layer connection.
In some examples, the specified type of network request comprises a hypertext transfer protocol, HTTP, request.
In some examples, the establishing module calls a socket module provided by the operating system, so that the socket module establishes a TCP connection according to an IP address and a port number carried by the network request.
In some examples, the setup module determines whether the network request is an HTTP request by parsing a request line in the network request.
In some examples, the transmitting device further comprises: the first message receiving module is used for receiving inquiry messages which are sent by the intercepting module and carry the information of the network request; the confirmation module confirms whether to process the network request according to the information of the network request carried by the inquiry message; the first message sending module sends a response message to the intercepting module so that the intercepting module sends the network request to the network agent module when the response message indicates that the processing of the network request is confirmed.
In some examples, the confirmation module confirms whether the network request is initiated by itself in response to the invocation of the application client according to the information of the network request carried in the query message; and if the network request is initiated by the network request, confirming to process the network request.
In some examples, the transmission device further comprises a second message sending module, which sends a query message carrying information of the network request to the application client when the network request is determined to be a specified type of network request; and the second message receiving module executes the establishing module when receiving a response message which is sent by the application client in response to the query message and indicates that the processing of the network request is confirmed, and establishes the transport layer connection according to the address information carried by the network request.
In some examples, a request sending module that sends the specified type of network request to a target server via the transport layer connection; the transmission device further includes: and the third message receiving module is used for receiving a response message sent by the target server in response to the network request of the specified type through the transport layer connection.
The examples of this application also provide a computing device comprising a memory, a processor, and a computer program stored on the memory and run on the processor; the processor, when executing the computer program, implements the transmission method described above.
The present examples also provide a storage medium storing one or more programs, the one or more programs including instructions, which when executed by a computing device, cause the computing device to perform the transmission method described above.
By applying the technical scheme provided by the application example of the invention, under the condition that the operating system provides a safe transmission function for the APP to prohibit the APP from sending the non-encrypted network request (such as an HTTP request), the APP can still carry out normal network data transmission (such as HTTP request sending) aiming at some network requests, the network data transmission speed is improved, and the consumption of the system performance is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a system structure to which a transmission method according to an example of the present application is applied;
FIG. 2 is a flow chart of a transmission method according to an example of the present application;
FIG. 3 is a block diagram of an operating system according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an interaction structure between an interception module and a network agent module according to an example of the present application;
FIG. 5 is an interaction flow diagram of a transmission method according to an example of the present application;
FIG. 6 is a schematic diagram of a transmission system according to an example of the present application;
FIG. 7 is a schematic structural diagram of a transmission device according to an example of the present application; and
fig. 8 is a schematic diagram of a hardware of a computing device according to an example of the present application.
Detailed Description
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.
For simplicity and clarity of description, the invention will be described below by describing several representative embodiments. The numerous details of the examples are merely provided to assist in understanding the inventive arrangements. It will be apparent, however, that the invention may be practiced without these specific details. Some embodiments are not described in detail, but rather are merely provided as frameworks, in order to avoid unnecessarily obscuring aspects of the invention. Hereinafter, "comprising" means "including but not limited to", "according to … …" means "at least according to … …, but not limited to … … only". When the number of one component is not particularly specified hereinafter, it means that the component may be one or more, or may be understood as at least one.
In some technical scenarios, an operating system (e.g., an IPhone OS (iOS) operating system, an apple Mac OSX operating system, etc.) installed on some terminal devices (e.g., a mobile phone, a tablet, a PC, etc.) provides a secure Transport function (e.g., an ats (APP Transport security) mechanism) for an application, the operating system only allows sending of an encrypted network request (e.g., an HTTPS request) based on a network secure Transport protocol, and if the APP wants to disable the secure Transport function provided by the operating system, the APP needs to submit a special description and description to a service party (e.g., APP Store) providing the operating system to disable the secure Transport function so as to prevent the service party from agreeing to the behavior of the APP to disable the secure Transport function.
The invention provides a network data transmission method for solving the problem of timely completing the transmission of network requests of specified types.
Fig. 1 is a schematic diagram illustrating a system structure to which the network data transmission method according to the example of the present application is applied. The system 100 comprises at least a terminal device, a target server 103 and a network 104.
The terminal device may be a mobile terminal device 101 or a PC terminal device 102; the mobile device is provided with an application program (such as an APP client or a webpage version APP), and the application program is provided with a network agent module which comprises an application program for realizing a network data transmission method; the network proxy module sends the network data to the target server 103 corresponding to the network proxy module.
The mobile terminal device 101 is a terminal device having a data calculation processing function, and includes but is not limited to a smart phone (equipped with a communication module), a palm computer, a tablet computer, and the like, and an operating system is installed on the mobile terminal device 101, and may include an apple IPhone OS (iOS) operating system; the PC terminal device 102 is a terminal device having a data calculation processing function, and is installed with an operating system, which may include an apple Mac OSX operating system.
The network 104 may be a wired network or a wireless network. The network agent module exchanges information with the target server 103 through the network 104.
Based on the above system, the present application provides a network data transmission method, which is applied to a network proxy module (e.g., news SDK, advertisement SDK, etc.) in an application client (e.g., social application APP, video application APP, etc., where the APP is installed in mobile terminal device 101). The method 200 is described below with reference to fig. 2 and 5, and as shown in fig. 2, the method 200 includes the following steps:
step 201: registering the information of the network agent module in an interception module provided by an operating system and used for intercepting the network request, so that the interception module sends the intercepted network request from the application layer to the network agent module.
Wherein, the operating system may include: the apple iPhone OS operating system or the apple Mac OSX operating system, the interception module (e.g., URL loading system) provided by the operating system includes at least an interception interface (e.g., NSURL Protocol interface).
In some examples, fig. 3 shows a schematic structural diagram 300 of the above-mentioned operating system 301 and application APPs 302, where a plurality of applications APPs 302 (e.g., social APPs, search engines APPs, video APPs, etc.) are installed in the operating system 301, where each application APP302 is isolated by a sandbox provided by the operating system 301, and each application APP302 initiates a network request in a respective process, and the application APPs 302 (e.g., social APPs) may be provided with a plurality of network proxy modules (e.g., different types of SDKs, such as news SDKs, video SDKs, advertisement SDKs, music SDKs, etc.). The network agent module inherits the class of the interception interface (i.e. self-defined class, such as class name: My class), and the network agent module takes the class inheriting the interception interface as a calling parameter and transmits the calling parameter to the interception interface through a static interface (e.g. register class) of the interception interface, and when the operating system 301 loads an application program of the application APP302, the operating system loads information of the network agent module in the application APP302 to the interception module, thereby completing the step 501 executed in the interception module: registering information of the network proxy module.
In some examples, receiving a query message carrying information of the network request sent by the interception module; confirming whether to process the network request according to the information of the network request carried by the inquiry message; sending a response message to the interception module to cause the interception module to send the network request to the network agent module when the response message indicates confirmation of processing the network request.
The network agent module confirms whether the network request is initiated by the network agent module according to the network request information carried in the inquiry message in response to the application client call; and if the network request is initiated by the network request, confirming to process the network request.
When the APP302 initiates a network request (e.g., an APP client initiates a network request for opening a news webpage for browsing based on a trigger instruction of a USER), the APP302 invokes a corresponding network proxy module (e.g., a news SDK) which initiates the network request in a process of an application layer of the operating system 301, when the interception module detects the network request and loads the network request, a static method (e.g., a canInitWithRequest) which inherits the class of the interception interface is triggered due to the information of the network proxy module being registered in the interception interface, the network proxy module receives a query message (i.e., a callback notification indicating whether to confirm processing of the network request) which is sent from the interception module and carries the information of the network request (e.g., USER-AGENT information), the network proxy module confirms whether the network request is initiated by itself in response to the invocation of the APP client according to the USER-AGENT information, if the network request is initiated by the network proxy module, sending a response message to the interception module, so that the interception module sends the network request to the network proxy module when the response message indicates that the processing of the network request is confirmed, and then the interception module executes step 502: the network request is intercepted.
Fig. 4 shows an interaction structure diagram 400 of an interception module 401 and a network proxy module, wherein an interception interface is disposed in the interception module 401, and the interception module 401 is disposed in the operating system 301; it should be noted that, a plurality of network agent modules may be provided in the application APP302, and the plurality of network proxy modules may all register information of their own network proxy module (i.e. inherit the class of the above-mentioned interception interface) with the interception module 401, when the interception module 401 detects a network request initiated by the application APP302, it will send a query message to each class inheriting the above interception interface according to a traversal mode with reverse registration time order, when the last registered network proxy module sends a response message to the intercept module 401 indicating that the processing of the network request is not acknowledged, the interception module 401 will continue to query the next to last registered network agent module, and so on, until a network agent module is found that handles the network request, if no network agent module processes the network request, the interception module 401 processes the network request according to its default processing mode.
Step 202: receiving the network request from the intercept module.
In some examples, when the interception module 401 receives the response message indicating that the processing of the network request is confirmed, step 503 is executed to the network proxy module: a network request is sent. The network proxy module receives a network request from the intercept module 401.
Step 203: and when the network request is determined to be the network request of the designated type, establishing a transmission layer connection according to the address information carried by the network request.
Wherein the specified type of network request comprises a hypertext transfer protocol (HTTP) request; by parsing the request line in the network request (i.e., request-URL information in the request line in the network request message, e.g., http:// www.xxx.com), step 504 is performed: determining whether the network request is an HTTP request.
In some examples, when it is determined that the network request is a specified type of network request (e.g., an HTTP request), step 505 is performed to the application client: sending a query message carrying information (e.g., a URL) of the network request; when step 506 is executed: when a response message indicating that the application client side confirms to process the network request sent in response to the query message is received (for example, when the application APP302 detects that the APP does not submit a special description of the mechanism for disabling ATS to apple company or detects that apple company agrees to disable ATS by the APP, a response message indicating that the network request is confirmed to be processed is sent to the network proxy module), the network proxy module executes step 507: and establishing a transmission layer connection according to the address information carried by the network request.
The establishing a transport layer connection according to the address information carried by the network request includes: a socket interface (e.g., TCP socket interface) provided by the operating system 301 is called, so that the socket interface establishes a TCP connection according to the IP address and the port number (e.g., port number 80) carried by the network request.
Step 204: sending the specified type of network request over the transport layer connection.
In some examples, the network proxy module performs step 508, via the transport layer connection: sending the specified type of network request to the target server 103; the method further comprises: the network proxy module performs step 509 by connecting via the transport layer: and receiving a response message (e.g., presentation information of the news webpage) sent by the target server 103 (e.g., the news server corresponding to the network proxy module if the network proxy module is the news SDK) in response to the specified type of network request (e.g., an HTTP request initiated by the application client through the news SDK to open the news webpage for browsing based on a trigger instruction of the user). When the network agent module receives the response message, the response message is displayed to the user through the display interface of the application client (for example, news webpage content is displayed to the user).
It should be noted that the technical solution of the present invention can also be applied to a network agent module in a web application (the web application is installed in the PC terminal device 102), and the implementation manner of the network agent module is the same as the implementation manner of the network agent module applied in the application APP302 described above. Meanwhile, the technical scheme of the invention can further bring good experience to the user, improve the system performance of the user equipment, and increase the market competitiveness and market public praise of the application APP302 or the webpage version application program, thereby having higher market value.
Corresponding to the foregoing network data transmission method 200, the present application also proposes a media data processing system, as shown in fig. 6, where the processing system 600 includes: an interception module 601 and a network agent module 602; and the functions of each server are as follows:
wherein, the interception module 601 is provided by the operating system 301, and the network agent module 602 is located in the application client; the operating system may include: the operating system 301 provides an interception module 601 (e.g., URL loading system) including at least an interception interface (e.g., NSURL Protocol).
The interception module 601 registers the information of the network proxy module 602 in response to the registration request from the network proxy module 602, and sends the intercepted network request from the application layer to the network proxy module 602 according to the information of the network proxy module 602.
The network agent module 602 registers the information of the network agent module 602 in the interception module 601, receives the network request from the interception module 601, establishes a transport layer connection according to address information carried by the network request when determining that the network request is a network request of a specified type, and sends the network request of the specified type through the transport layer connection.
In some examples, the network proxy module 602 invokes a socket interface provided by the operating system 301, so that the socket interface establishes a TCP connection according to an IP address and a port number carried in the network request.
In some examples, when the network request is intercepted, the intercepting module 601 sends a query message carrying information of the network request to the network agent module 602 according to the information of the network agent module 602; the network agent module 602, when receiving the query message from the intercepting module 601, determining whether to process the network request and feeding back a corresponding response message according to the information of the network request carried in the query message; the interception module 601, upon receiving the response message indicating confirmation of processing the network request from the network proxy module 602, sends the network request to the network proxy module 602.
In some examples, the network agent module 602, when determining that the network request is a specified type of network request, further sends a query message carrying information of the network request to the application client; and when a response message which is sent by the application client end in response to the query message and indicates that the processing of the network request is confirmed is received, executing the step of establishing the transport layer connection according to the address information carried by the network request.
In some examples, the network proxy module 602 sends the specified type of network request to the target server 103 via the transport layer connection; the network proxy module 602 further receives, through the transport layer connection, a response message sent by the target server 103 in response to the network request of the specified type.
Corresponding to a method 200 for transmitting network data, the present application also provides a device for transmitting network data, which is applied to a network proxy module 602 in an application client, as shown in fig. 7, where the device 700 includes: a registration module 701, a request receiving module 702, a building module 703 and a request sending module 704; and the functions of the modules are as follows:
the registration module 701 registers information of the network proxy module 602 in an interception module 601 provided by the operating system 301 for intercepting a network request, so that the interception module 601 sends the intercepted network request from the application layer to the network proxy module 602.
A request receiving module 702, receiving the network request from the intercepting module 601.
The establishing module 703 is configured to, when it is determined that the network request is a network request of a specified type, establish a transport layer connection according to address information carried in the network request.
A request sending module 704, configured to send the network request of the specified type through the transport layer connection.
In some examples, the specified type of network request comprises a hypertext transfer protocol, HTTP, request.
In some examples, the establishing module 703 calls a socket module provided by the operating system 301, so that the socket module establishes a TCP connection according to an IP address and a port number carried in the network request.
In some examples, the establishing module 703 determines whether the network request is an HTTP request by parsing a request line in the network request.
In some examples, the transmitting device 700 further comprises: the first message receiving module receives an inquiry message which is sent by the intercepting module 601 and carries the information of the network request; the confirmation module confirms whether to process the network request according to the information of the network request carried by the inquiry message; a first message sending module, configured to send a response message to the intercepting module 601, so that the intercepting module 601 sends the network request to the network proxy module 602 when the response message indicates that the processing of the network request is confirmed.
In some examples, the confirmation module, the network proxy module 602, confirms whether the network request is initiated by itself in response to the invocation of the application client according to the information of the network request carried in the query message; and if the network request is initiated by the network request, confirming to process the network request.
In some examples, the transmission apparatus 700 further includes a second message sending module, configured to send a query message carrying information of the network request to the application client when the network request is determined to be a specified type of network request; and the second message receiving module executes the establishing module when receiving a response message which is sent by the application client in response to the query message and indicates that the processing of the network request is confirmed, and establishes the transport layer connection according to the address information carried by the network request.
In some examples, request sending module 704 sends the specified type of network request to target server 103 via the transport layer connection; the transmission apparatus 700 further comprises: a third message receiving module, configured to receive, through the transport layer connection, a response message sent by the target server 103 in response to the network request of the specified type.
Fig. 8 shows a block diagram of the computing device 800 in which the transmission apparatus 700 is located. This computing device 800 may be a terminal device. As shown in fig. 8, the computing device 800 includes one or more processors (CPUs) 802, a communications module 804, memory 806, a user interface 810, and a communications bus 808 for interconnecting these components.
The processor 802 may receive and transmit data via the communication module 804 to enable network communications and/or local communications.
User interface 810 includes one or more output devices 812 including one or more speakers and/or one or more visual displays. The user interface 810 also includes one or more input devices 814, including, for example, a keyboard, a mouse, a voice command input unit or microphone, a touch screen display, a touch sensitive tablet, a gesture capture camera or other input buttons or controls, and the like.
The memory 806 may be high-speed random access memory, such as DRAM, SRAM, DDR RAM, or other random access solid state memory devices; or non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
The memory 806 stores a set of instructions executable by the processor 802, including:
an operating system 816, including programs for handling various basic system services and for performing hardware-related tasks;
the application 818 includes various application programs, which can implement the processing flow in the above examples, for example, the application programs may include part or all of the modules in the transmission device 700 shown in fig. 7, at least one of the modules 701 and 704 may store machine executable instructions, and the processor 802 can implement the functions of at least one of the modules 701 and 704 by executing the machine executable instructions in at least one of the modules 701 and 704 in the memory 806.
The operating system 816 may further include the intercepting module 601 in the processing system 600, which can implement the processing procedures in the above examples, and implement the above interactions with the transmission device 700 in the application 818, so as to implement the timely sending of the network request of the specified type, improve the system performance of the user equipment, and improve the experience of the user in using the APP.
It should be noted that not all steps and modules in the above flows and structures are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The division of each module is only for convenience of describing adopted functional division, and in actual implementation, one module may be divided into multiple modules, and the functions of multiple modules may also be implemented by the same module, and these modules may be located in the same device or in different devices.
The hardware modules in the embodiments may be implemented in hardware or a hardware platform plus software. The software includes machine-readable instructions stored on a non-volatile storage medium. Thus, embodiments may also be embodied as software products.
In various examples, the hardware may be implemented by specialized hardware or hardware executing machine-readable instructions. For example, the hardware may be specially designed permanent circuits or logic devices (e.g., special purpose processors, such as FPGAs or ASICs) for performing the specified operations. Hardware may also include programmable logic devices or circuits temporarily configured by software (e.g., including a general purpose processor or other programmable processor) to perform certain operations.
In addition, each example of the present application can be realized by a data processing program executed by a data processing apparatus such as a computer. It is clear that a data processing program constitutes the present application. Further, the data processing program, which is generally stored in one storage medium, is executed by directly reading the program out of the storage medium or by installing or copying the program into a storage device (such as a hard disk and/or a memory) of the data processing device. Such a storage medium therefore also constitutes the present application, which also provides a non-volatile storage medium in which a data processing program is stored, which data processing program can be used to carry out any one of the above-mentioned method examples of the present application.
Machine-readable instructions corresponding to the modules in fig. 6 and/or 7 may cause an operating system or the like operating on the computer to perform some or all of the operations described herein. The nonvolatile computer-readable storage medium may be a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer. A CPU or the like mounted on the expansion board or the expansion unit may perform part or all of the actual operations according to the instructions.
In addition, the devices and modules in the examples of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more devices or modules may be 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 above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (16)
1. A transmission method of network data is applied to a network agent module in an application client, and an operating system provides a secure transfer function (ATS) mechanism for the application client, wherein the method comprises the following steps:
the method comprises the steps that a class inheriting an interception interface is used as a calling parameter and is transmitted into the interception interface through a static interface of the interception interface, wherein an interception module provided by an operating system comprises the interception interface, when a network request is initiated by an application client, the interception module detects the network request and loads the network request, a static method inheriting the class of the interception interface is triggered, and the network request is sent to a network agent module;
receiving the network request from the interception module;
when the network request is determined to be a network request of a specified type, sending a query message carrying information of the network request to the application client, so that the application client sends a response message indicating that the network request is confirmed to be processed to the network agent module when the application client does not detect the information that a service party agrees to the application client to disable ATS;
and establishing a transport layer connection according to the address information carried by the network request, and sending the network request of the specified type through the transport layer connection.
2. The method of claim 1, wherein the specified type of network request comprises a hypertext transfer protocol (HTTP) request.
3. The method according to claim 1, wherein said establishing a transport layer connection according to address information carried by the network request comprises:
and calling a socket interface provided by the operating system so that the socket interface establishes a Transmission Control Protocol (TCP) connection according to the IP address and the port number carried by the network request.
4. The method of claim 2, wherein determining whether the network request is an HTTP request is performed by parsing a request line in the network request.
5. The method of claim 1, further comprising:
receiving an inquiry message which is sent by the intercepting module and carries the information of the network request;
confirming whether to process the network request or not according to the information of the network request carried by the inquiry message;
and sending a response message to the interception module so that the interception module sends the network request to the network agent module when the response message indicates that the network request is confirmed to be processed.
6. The method of claim 5, wherein the confirming whether to process the network request according to the information of the network request carried by the query message comprises:
according to the information of the network request carried in the inquiry message, confirming whether the network request is initiated by the network request in response to the call of the application client;
and if the network request is initiated by the network request, confirming to process the network request.
7. The method of claim 1, wherein the web proxy module is a news Software Development Kit (SDK) and the interception module is a Uniform Resource Locator (URL) loading system.
8. The method of claim 1, wherein the network request of the specified type is sent to a target server via the transport layer connection;
the method further comprises the following steps:
receiving, over the transport layer connection, a response message sent by the target server in response to the network request of the specified type.
9. A system for transmitting network data, comprising: the system comprises an interception module and a network agent module; the intercepting module is provided by an operating system, the intercepting module comprises an intercepting interface, the network agent module is positioned in an application client, and the operating system provides a secure transport function (ATS) mechanism for the application client;
the interception module is used for triggering a static method inheriting the class of the interception interface when the application client side initiates a network request and detects the network request and loads the network request, and sending the network request to the network agent module;
the network agent module takes the class inheriting the interception interface as a calling parameter and transmits the calling parameter to the interception interface through a static interface of the interception interface; receiving the network request from the interception module, and when the network request is determined to be a network request of a specified type, sending a query message carrying information of the network request to the application client so that the application client sends a response message indicating that the network request is confirmed to be processed to the network agent module when the application client does not detect information that a service party agrees to the application client to disable ATS; and establishing a transport layer connection according to the address information carried by the network request, and sending the network request of the specified type through the transport layer connection.
10. The system of claim 9,
and the network agent module calls a socket interface provided by the operating system so that the socket interface establishes a Transmission Control Protocol (TCP) connection according to the IP address and the port number carried by the network request.
11. The system of claim 9,
the intercepting module is used for sending an inquiry message carrying the information of the network request to the network agent module according to the information of the network agent module when the network request is intercepted;
the network agent module confirms whether to process the network request or not according to the information of the network request carried in the inquiry message from the interception module when receiving the inquiry message;
the interception module sends the network request to the network agent module when receiving a response message from the network agent module indicating that the processing of the network request is confirmed.
12. The system of claim 9, wherein the web proxy module is a news Software Development Kit (SDK) and the interception module is a Uniform Resource Locator (URL) loading system.
13. The system of claim 9,
the network agent module sends the network request of the specified type to a target server through the transmission layer connection;
the network proxy module further receives, via the transport layer connection, a response message sent by the target server in response to the network request of the specified type.
14. A transmission device of network data is applied to a network agent module in an application client, and an operating system provides a secure transfer function ATS mechanism for the application client, and the device comprises:
the registration module is used for transmitting a class inheriting an interception interface into the interception interface through a static interface of the interception interface by taking the class inheriting the interception interface as a calling parameter, wherein the interception module provided by the operating system comprises the interception interface, and when the application client initiates a network request, the interception module detects the network request and loads the network request, and triggers a static method inheriting the class inheriting the interception interface, and sends the network request to the network agent module;
a request receiving module for receiving the network request from the intercepting module;
the establishing module is used for sending a query message carrying information of the network request to the application client when the network request is determined to be the network request of the specified type, so that the application client sends a response message representing that the processing of the network request is confirmed to the network agent module when the application client does not detect the information that the service party agrees that the application client forbids the ATS; establishing a transmission layer connection according to the address information carried by the network request;
and the request sending module is used for sending the network request of the specified type through the transmission layer connection.
15. A computing device comprising a memory, a processor, and a computer program stored on the memory and run on the processor; the processor, when executing the computer program, implements the method of any of claims 1-8.
16. A computer readable storage medium, storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711274759.9A CN109889468B (en) | 2017-12-06 | 2017-12-06 | Network data transmission method, system, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711274759.9A CN109889468B (en) | 2017-12-06 | 2017-12-06 | Network data transmission method, system, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109889468A CN109889468A (en) | 2019-06-14 |
CN109889468B true CN109889468B (en) | 2022-06-14 |
Family
ID=66923574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711274759.9A Active CN109889468B (en) | 2017-12-06 | 2017-12-06 | Network data transmission method, system, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109889468B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111314419B (en) * | 2020-01-16 | 2023-01-10 | 广州酷狗计算机科技有限公司 | Network request method and device |
CN112039852B (en) * | 2020-08-07 | 2022-08-05 | 武汉斗鱼鱼乐网络科技有限公司 | Method, storage medium, electronic device and system for protecting core interface |
CN112491927B (en) * | 2020-12-15 | 2022-12-02 | 厦门市美亚柏科信息股份有限公司 | Method and system for bypassing network port shielding |
CN112905160A (en) * | 2021-02-08 | 2021-06-04 | 中国工商银行股份有限公司 | Axios-based package registration global interception method and device |
CN116846991B (en) * | 2023-07-11 | 2024-09-27 | 中科驭数(北京)科技有限公司 | Network application data forwarding method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102257760A (en) * | 2008-12-17 | 2011-11-23 | 北方电讯网络有限公司 | Secure remote access public communication environment |
CN104639601A (en) * | 2013-11-14 | 2015-05-20 | 美国博通公司 | Proxy device for a network of devices |
WO2016041322A1 (en) * | 2014-09-16 | 2016-03-24 | 网宿科技股份有限公司 | Method of forwarding in-application traffic on smart mobile terminal |
CN105814931A (en) * | 2013-07-02 | 2016-07-27 | 七网络有限责任公司 | Network modeling based on mobile network signal |
CN105933159A (en) * | 2016-06-17 | 2016-09-07 | 广州云移信息科技有限公司 | Network request processing method and system |
CN106453309A (en) * | 2016-10-11 | 2017-02-22 | 北京天融信网络安全技术有限公司 | Safety audit method and PC (Personal Computer) terminal |
CN106789909A (en) * | 2016-11-22 | 2017-05-31 | 北京奇虎科技有限公司 | The network data transmission method of application program, apparatus and system |
-
2017
- 2017-12-06 CN CN201711274759.9A patent/CN109889468B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102257760A (en) * | 2008-12-17 | 2011-11-23 | 北方电讯网络有限公司 | Secure remote access public communication environment |
CN105814931A (en) * | 2013-07-02 | 2016-07-27 | 七网络有限责任公司 | Network modeling based on mobile network signal |
CN104639601A (en) * | 2013-11-14 | 2015-05-20 | 美国博通公司 | Proxy device for a network of devices |
WO2016041322A1 (en) * | 2014-09-16 | 2016-03-24 | 网宿科技股份有限公司 | Method of forwarding in-application traffic on smart mobile terminal |
CN105933159A (en) * | 2016-06-17 | 2016-09-07 | 广州云移信息科技有限公司 | Network request processing method and system |
CN106453309A (en) * | 2016-10-11 | 2017-02-22 | 北京天融信网络安全技术有限公司 | Safety audit method and PC (Personal Computer) terminal |
CN106789909A (en) * | 2016-11-22 | 2017-05-31 | 北京奇虎科技有限公司 | The network data transmission method of application program, apparatus and system |
Also Published As
Publication number | Publication date |
---|---|
CN109889468A (en) | 2019-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109889468B (en) | Network data transmission method, system, device, equipment and storage medium | |
US20190278908A1 (en) | Detection of malicious invocation of application program interface calls | |
KR20130142961A (en) | Automatic application updates | |
CN108833585B (en) | Information interaction method and device and storage medium | |
CN112866385B (en) | Interface calling method and device, electronic equipment and storage medium | |
US10135763B2 (en) | System and method for secure and efficient communication within an organization | |
CN109302437B (en) | Method and device for redirecting website | |
WO2020181814A1 (en) | Application program upgrading method and apparatus, terminal and computer readable storage medium | |
CN114124929A (en) | Cross-network data processing method and device | |
US20140258891A1 (en) | Electronic device, storage medium and method for processing information | |
KR20190069574A (en) | Wireless network type detection method and apparatus, and electronic device | |
CN110933075B (en) | Service calling method and device, electronic equipment and storage medium | |
CN107239308A (en) | Method and system for implementing browser calling function | |
WO2019047708A1 (en) | Resource configuration method and related product | |
WO2018076712A1 (en) | Terminal authentication method and device | |
CN110413420A (en) | Data transmission method, device, terminal and storage medium | |
CN111953718B (en) | Page debugging method and device | |
CN112565340B (en) | Service scheduling method, device, computer system and medium for distributed application | |
CN106951294B (en) | A method and device for providing services for cross-system applications | |
CN116633765A (en) | Service processing method, device, equipment and storage medium | |
US11163537B1 (en) | Tiered application pattern | |
CN112383904B (en) | Pair-free quick peripheral calling method and device | |
CN114866611B (en) | Message callback method, device, storage medium and computer equipment | |
CN115442089B (en) | Message interception method, device, equipment and readable storage medium | |
CN108897639A (en) | File processing 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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221116 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133 Patentee after: Shenzhen Yayue Technology Co.,Ltd. Address before: 430000, No.1, Yangguang fifth road, Miaoshan, Jiangxia Economic Development Zone, Wuhan City, Hubei Province Patentee before: Tencent Technology (Wuhan) Co.,Ltd. |
|
TR01 | Transfer of patent right |