CN108282511B - Network data access method, device, system, storage medium and user terminal - Google Patents

Network data access method, device, system, storage medium and user terminal Download PDF

Info

Publication number
CN108282511B
CN108282511B CN201710837895.8A CN201710837895A CN108282511B CN 108282511 B CN108282511 B CN 108282511B CN 201710837895 A CN201710837895 A CN 201710837895A CN 108282511 B CN108282511 B CN 108282511B
Authority
CN
China
Prior art keywords
network
request
view component
hosting
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710837895.8A
Other languages
Chinese (zh)
Other versions
CN108282511A (en
Inventor
林宇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201710837895.8A priority Critical patent/CN108282511B/en
Publication of CN108282511A publication Critical patent/CN108282511A/en
Application granted granted Critical
Publication of CN108282511B publication Critical patent/CN108282511B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/565Conversion or adaptation of application format or content
    • 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
    • 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
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a network data access method, a device, a system, a storage medium and a user terminal, and relates to the technical field of Internet. The method comprises the steps that firstly, a first network request generated by a network view component based on public protocol encapsulation is obtained, the first network request is encapsulated based on a self-defined protocol to obtain a second network request, and then the second network request is sent to a server; after receiving the network data returned by the server, sending the network data returned by the server to the network view component, thereby realizing network access without depending on the network view component, and simultaneously realizing customization and extension of a network protocol during network access.

Description

Network data access method, device, system, storage medium and user terminal
Technical Field
The invention relates to the technical field of internet, in particular to a network data access method, a device, a system, a storage medium and a user terminal.
Background
With the rapid development of the internet and the popularization of smart phones, more and more manufacturers present content in the form of html5 web pages, and access to the content through apps at mobile terminals. At present, network access of a user terminal to a server is accessed based on a public protocol, and the user terminal cannot customize and expand the network protocol.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, a system, a storage medium, and a user terminal for accessing network data, so as to improve the above problem. In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, an embodiment of the present invention provides a network data access method, where the method includes a network data access device encapsulating an acquired first network request based on a self-defined protocol to obtain a second network request, where the first network request is generated by a network view component based on a public protocol encapsulation; sending the second network request to a server; and after receiving the network data returned by the server, sending the network data returned by the server to the network view component.
In a second aspect, an embodiment of the present invention provides a network data access method, where the method includes that a network view component sends a first network request, which is encapsulated based on a public protocol, to a network data access device; the network data access device encapsulates the acquired first network request based on a self-defined protocol to acquire a second network request; the network data access device sends the second network request to a server; and after receiving the network data returned by the server, the network data access device sends the network data returned by the server to the network view component.
In a third aspect, an embodiment of the present invention provides a network data access apparatus, where the apparatus includes an encapsulation unit, a first sending unit, and a second sending unit. And the packaging unit is used for packaging the acquired first network request based on a self-defined protocol to acquire a second network request, wherein the first network request is generated by the network view component based on public protocol packaging. And the first sending unit is used for sending the second network request to a server. And the second sending unit is used for sending the network data returned by the server to the network view component after receiving the network data returned by the server.
In a fourth aspect, an embodiment of the present invention provides a network data access system, where the system includes a network view component and a network data access device. And the network view component is used for sending the first network request encapsulated based on the public protocol to the network data access device. And the network data access device is used for encapsulating the acquired first network request based on a self-defined protocol to acquire a second network request. The network data access device is further configured to send the second network request to a server. The network data access device is also used for sending the network data returned by the server to the network view component after receiving the network data returned by the server.
In a fifth aspect, the present invention provides a storage medium storing program code executable by a processor, the program code configured to cause the processor to perform the above-mentioned method.
In a sixth aspect, an embodiment of the present invention provides a user terminal, where the user terminal includes a processor and a memory. The processor and the memory are electrically connected by a bus. The memory is used for storing programs. The processor is used for calling the program stored in the memory through the bus and executing: the network data access device encapsulates the acquired first network request based on a self-defined protocol to acquire a second network request, wherein the first network request is generated by a network view component based on public protocol encapsulation; sending the second network request to a server; and after receiving the network data returned by the server, sending the network data returned by the server to the network view component.
According to the network data access method, the device, the system, the storage medium and the user terminal provided by the embodiment of the invention, the first network request generated by the network view component based on the common protocol package is firstly obtained and packaged based on the self-defined protocol to obtain the second network request, and then the second network request is sent to the server; after receiving the network data returned by the server, sending the network data returned by the server to the network view component, thereby realizing network access without depending on the network view component, and simultaneously realizing customization and extension of a network protocol during network access.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is an environment in which embodiments of the present invention may be used;
fig. 2 is a block diagram of a user terminal applicable to the embodiment of the present application;
fig. 3 is a flowchart of a network data access method according to a first embodiment of the present invention;
fig. 4 is a timing diagram of a network data access system and a server according to a second embodiment of the present invention;
fig. 5 is a block diagram of a network data access device according to a third embodiment of the present invention;
fig. 6 is a block diagram of a network data access system according to a fourth embodiment of the present invention.
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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The embodiments of the present invention described below can be applied to the environment shown in fig. 1, in which the user terminal 100 is connected to the server 130 through the network 120 as shown in fig. 1. The network 120 may be a wired or wireless network. In the embodiment of the present invention, the user terminal 100 and the server 130 can be directly connected through a communication network. The user terminal 100, the server 130 may establish a communication connection in a Wi-Fi (wireless fidelity) network, a 2G/3G/4G network or a local area network. The user terminal 100 may be a terminal device such as a pc (personal computer), a tablet computer, a mobile phone, a notebook computer, a smart television, a set-top box, and a vehicle-mounted terminal.
In this embodiment, the user terminal 100, which may preferably be a mobile terminal such as a mobile phone, may be installed with a web browser or an application client such as a mobile app.
Referring to fig. 2, fig. 2 is a block diagram illustrating a structure of a user terminal 100 applicable to the embodiment of the present application. The user terminal 100 may include a memory 110, a memory controller 111, a processor 112, a peripheral interface 113, an input output unit 115, an audio unit 116, a display unit 117, and a network data access device, system.
The memory 110, the memory controller 111, the processor 112, the input/output unit 115, the audio unit 116, and the display unit 117 are electrically connected to each other directly or indirectly, so as to implement data transmission or interaction. For example, electrical connections between these components may be made through one or more communication or signal buses. The network data access method includes at least one software functional module which can be stored in the memory 110 in the form of software or firmware (firmware), for example, the network data access device, the software functional module included in the system, or the computer program.
The memory 110 may store various software programs and modules, such as program instructions/modules corresponding to the network data access methods, apparatuses, and systems provided in the embodiments of the present application. The processor 112 executes various functional applications and data processing by executing software programs and modules stored in the memory 110, that is, implements the network data access method in the embodiment of the present application. The Memory 110 may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
The processor 112 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. Which may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The peripheral interface 113 couples various input/output devices to the processor 112 and to the memory 110. In some embodiments, peripheral interface 113, processor 112, and memory controller 111 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The input and output unit 115 is used for providing input data to the user to realize the interaction of the user with the user terminal 100. The input/output unit 115 may be, but is not limited to, a mouse, a keyboard, and the like.
Audio unit 116 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry.
The display unit 117 provides an interactive interface (e.g., a user operation interface) between the user terminal 100 and the user or is used to display image data to the user reference. In this embodiment, the display unit 117 may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations from one or more locations on the touch display at the same time, and the sensed touch operations are sent to the processor 112 for calculation and processing.
It is to be understood that the structure shown in fig. 2 is merely illustrative, and the user terminal 100 may also include more or fewer components than shown in fig. 2, or have a different configuration than shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
In the embodiment of the present invention, the user terminal 100 is installed with a client, which may be a browser or a third-party application, and corresponds to a Server (Server) end.
First embodiment
Referring to fig. 3, an embodiment of the present invention provides a method for accessing network data, where the method includes: step S200, step S210, and step S220.
Step S200: the network data access device encapsulates the acquired first network request based on a self-defined protocol to acquire a second network request, wherein the first network request is generated by a network view component based on public protocol encapsulation.
Step S210: and sending the second network request to a server.
As an implementation manner, the customized protocol is a spdy protocol or an https protocol, and the public protocol is an http protocol.
In the embodiment of the invention, the network view component is WebView SDK. The WebView provides a system component for the intelligent operating system, the function of loading and displaying the webpage can be completed, and the specific interface and the function depend on the version of the intelligent operating system.
And the WebView SDK provides a server component for the WebView in an SDK form, has similar functions to the WebView of a system, but can provide normalized services without depending on an intelligent operating system. The mobile client (APP) is based on a WebView component and runs in application programs of the mobile terminal, such as WeChat APP and Tianmao APP.
Specifically, when the user terminal accesses network data through the app, the WebView SDK generates a first network request based on a public protocol such as http packaging, and sends the first network request to a network data access device in the user terminal, and the network data access device packages the acquired first network request based on a custom protocol such as https to obtain a second network request.
Further, according to the requirement and the service scene of the app, the request of the WebView SDK kernel is an http request based on a URL, and a network data access device in the user terminal can package the acquired first network request by using a protocol of the network data access device to acquire a second network request; and then sending the second network request to a server through https, udp or a socket interface based on a system bottom layer. Therefore, the encrypted transmission of files, the conversion from https to http protocol, the expansion of a network request header to customize new requirements and the like are realized between the server and the user terminal on the premise of not depending on WebView; meanwhile, the Webview SDK can customize a network protocol through network hosting, and supports a network protocol such as spdy of a higher version without depending on Webview.
Step S220: and after receiving the network data returned by the server, sending the network data returned by the server to the network view component.
In one embodiment, the network data returned by the server is sent to the network view component by calling back through an SDK interface.
Before step S200, the network data access method provided in this embodiment may further include: acquiring a URL corresponding to the first network request; when the URL is determined to satisfy the preset hosting condition, step S200 is executed: and packaging the acquired first network request based on a self-defined protocol to acquire a second network request. And when the URL is judged not to meet the preset hosting condition, feeding back hosting failure prompt information to the network view component so that the network view component can send the first network request to the server.
Specifically, the mobile app in which the network data access device is located sets its own network decision instance through an external interface of the SDK; the mobile app sets a hosting implementation instance of the mobile app through an interface externally provided by the SDK. The WebView SDK interface layer provides two abstract interface classes Inetwork and InetworkDecider externally. SDKNetwork is a network class inside the SDK. The setThiirdnetwork and setThiirdWorkDecider methods provide for the mobile app to make specific instance settings. The mobile app sets a network hosting class and a decision class thereof through Thindnetwork and Thindnetwork decider respectively. The INetworkCallback is a callback class for data transceiving.
The network data access method provided by the embodiment of the invention comprises the steps of firstly, packaging a first network request which is generated by packaging a network view component based on a public protocol and is packaged based on a self-defined protocol to obtain a second network request, and then sending the second network request to a server; after receiving the network data returned by the server, sending the network data returned by the server to the network view component, thereby realizing network access without depending on the network view component, and simultaneously realizing customization and extension of a network protocol during network access.
Second embodiment
Referring to fig. 3, an embodiment of the present invention provides a method for accessing network data, where the method includes:
step S300: after a network view component generates a first network request packaged based on a public protocol, acquiring a URL in the first network request;
step S310: the network view component initiates a decision request carrying the URL to a network data access device;
step S320: the network data access device acquires the URL in the decision request;
step S330: when the network data access device judges that the URL meets a preset hosting condition, feeding back hosting success prompt information to the network view component so that the network view component can send a first network request based on public protocol encapsulation to the network data access device;
step S340: the network view component sends a first network request encapsulated based on a public protocol to a network data access device;
step S350: the network data access device encapsulates the acquired first network request based on a self-defined protocol to acquire a second network request;
step S360: the network data access device sends the second network request to a server;
step S370: and after receiving the network data returned by the server, the network data access device sends the network data returned by the server to the network view component.
The embodiment of the invention provides a network data access method, which comprises the steps of firstly, packaging a first network request which is generated by a network view component based on public protocol packaging and is packaged based on a self-defined protocol to obtain a second network request, and then sending the second network request to a server; after receiving the network data returned by the server, sending the network data returned by the server to the network view component, thereby realizing network access without depending on the network view component, and simultaneously realizing customization and extension of a network protocol during network access.
Third embodiment
Referring to fig. 5, an embodiment of the present invention provides a network data access apparatus 400, where the apparatus 400 includes: an encapsulation unit 430, a first transmission unit 440 and a second transmission unit 450.
An encapsulating unit 430, configured to encapsulate the obtained first network request based on a custom protocol to obtain a second network request, where the first network request is generated by a network view component based on a common protocol encapsulation.
A first sending unit 440, configured to send the second network request to a server.
The second sending unit 450 is configured to send the network data returned by the server to the network view component after receiving the network data returned by the server.
As an embodiment, the second sending unit 450 includes a second sending sub-unit 451.
The second sending subunit 451 is configured to send the network data returned by the server to the network view component in a callback manner through an SDK interface.
The apparatus 400 may further include: an acquisition unit 410 and a judgment unit 420.
An obtaining unit 410, configured to obtain a URL corresponding to the first network request.
A determining unit 420, configured to, when it is determined that the URL meets a preset hosting condition, perform the encapsulation on the acquired first network request based on the customized protocol by using an encapsulating unit 430, to obtain a second network request.
The determining unit 420 is further configured to, when it is determined that the URL does not satisfy the preset hosting condition, feed back hosting failure prompt information to the web view component, so that the web view component sends the first network request to the server.
The above units may be implemented by software codes, and in this case, the above units may be stored in the memory 110. The above units may also be implemented by hardware, for example, an integrated circuit chip.
The network data access device 400 according to the embodiment of the present invention has the same implementation principle and the same technical effect as the foregoing first embodiment of the method, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing second embodiment of the method where no part of the embodiment of the device is mentioned.
Fourth embodiment
Referring to fig. 6, an embodiment of the invention provides a network data access system 500, where the system 500 includes a network view component 510 and a network data access device 400.
A network view component 510 for sending a first network request encapsulated based on a common protocol to a network data access device.
The network data access device 400 is configured to encapsulate the obtained first network request based on a customized protocol, and obtain a second network request.
The network data access device 400 is further configured to send the second network request to a server.
The network data access device 400 is further configured to send the network data returned by the server to the network view group 510 after receiving the network data returned by the server.
The network view component 510 is further configured to, after generating a first network request encapsulated based on a public protocol, obtain a URL in the first network request, and initiate a decision request carrying the URL to the network data access apparatus 400.
The network data access device 400 is further configured to obtain a URL in the decision request, and when it is determined that the URL meets a preset hosting condition, feed back a hosting success prompt message to the network view component 510, so that the network view component sends a first network request encapsulated based on a public protocol to the network data access device.
The above units may be implemented by software codes, and in this case, the above units may be stored in the memory 110. The above units may also be implemented by hardware, for example, an integrated circuit chip.
The network data access system 500 according to the embodiment of the present invention has the same implementation principle and the same technical effect as the second embodiment of the foregoing method, and for the sake of brief description, reference may be made to the corresponding contents in the second embodiment of the foregoing method where no part of the embodiment of the apparatus is mentioned.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (11)

1. A method for network data access, the method comprising:
acquiring a URL corresponding to the first network request;
when the URL meets preset hosting conditions, the network data access device packages an acquired first network request based on a self-defined protocol to acquire a second network request, wherein the first network request is generated by a network view component based on a public protocol package, the preset hosting conditions are conditions for executing network hosting, and network protocol customization can be performed through the network hosting, so that network access and network protocol customization and expansion can be performed without depending on the network view component, and a network hosting implementation example can be set through an SDK interface;
sending the second network request to a server;
and after receiving the network data returned by the server, sending the network data returned by the server to the network view component.
2. The method of claim 1, further comprising:
and when the URL is judged not to meet the preset hosting condition, feeding back hosting failure prompt information to the network view component so that the network view component can send the first network request to the server.
3. The method of claim 1, wherein sending the network data returned by the server to the network view component comprises:
and sending the network data returned by the server to the network view component in a callback mode through an SDK interface.
4. The method of claim 1, wherein the customized protocol is a spdy protocol or an https protocol, and the public protocol is an http protocol.
5. A method for network data access, the method comprising:
after a network view component generates a first network request packaged based on a public protocol, acquiring a URL in the first network request;
the network view component initiates a decision request carrying the URL to a network data access device;
the network data access device acquires the URL in the decision request;
when the network data access device judges that the URL meets a preset hosting condition, feeding back hosting success prompt information to the network view component, and sending a first network request packaged by the network view component based on a public protocol to the network data access device, wherein the preset hosting condition is a condition for executing network hosting, and network protocol customization can be performed through the network hosting, so that network access and network protocol customization and expansion can be performed without depending on the network view component, and a network hosting implementation example can be set through an SDK interface;
the network data access device encapsulates the acquired first network request based on a self-defined protocol to acquire a second network request;
the network data access device sends the second network request to a server;
and after receiving the network data returned by the server, the network data access device sends the network data returned by the server to the network view component.
6. A network data access apparatus, the apparatus comprising:
the acquisition unit is used for acquiring a URL corresponding to the first network request;
the judging unit is used for judging whether the URL meets a preset hosting condition, wherein the preset hosting condition is a condition for executing network hosting, network protocol customization can be carried out through the network hosting, so that network access and network protocol customization and expansion can be carried out under the condition of not depending on a network view component, and a network hosting implementation example can be set through an SDK interface;
the packaging unit is used for packaging the acquired first network request based on a self-defined protocol to acquire a second network request when the judging unit judges that the URL meets the preset hosting condition, wherein the first network request is generated by a network view component based on public protocol packaging;
a first sending unit, configured to send the second network request to a server;
and the second sending unit is used for sending the network data returned by the server to the network view component after receiving the network data returned by the server.
7. The apparatus according to claim 6, wherein the determining unit is further configured to, when it is determined that the URL does not satisfy a preset hosting condition, feed back hosting failure prompt information to the web view component, so that the web view component sends the first network request to the server.
8. The apparatus of claim 6, wherein the second sending unit further comprises:
and the second sending subunit is used for sending the network data returned by the server to the network view component in a callback mode through an SDK interface.
9. A network data access system, the system comprising a network view component and a network data access device;
the network view component is used for acquiring a URL in a first network request after the first network request is generated and encapsulated based on a public protocol, and initiating a decision request carrying the URL to a network data access device;
the network view component is also used for sending a first network request which is encapsulated based on a public protocol to the network data access device;
the network data access device is used for acquiring the URL in the decision request;
the network data access device is further used for packaging the acquired first network request based on a self-defined protocol to acquire a second network request when the URL is judged to meet a preset hosting condition, wherein the preset hosting condition is a condition for executing network hosting, and network protocol customization can be performed through the network hosting, so that network access and customization and expansion of the network protocol can be performed without depending on a network view component, and a network hosting implementation example can be set through an SDK interface;
the network data access device is also used for sending the second network request to a server;
and the network data access device is also used for sending the network data returned by the server to the network view component after receiving the network data returned by the server.
10. A computer-readable storage medium having stored thereon non-volatile program code executable by a processor, the program code configured to cause the processor to perform the method of any of claims 1-5.
11. A user terminal, characterized in that the user terminal comprises a processor and a memory, the processor and the memory being electrically connected by a bus; the memory is used for storing programs; the processor is used for calling the program stored in the memory through the bus and executing:
acquiring a URL corresponding to the first network request;
when the URL meets preset hosting conditions, the network data access device packages an acquired first network request based on a self-defined protocol to acquire a second network request, wherein the first network request is generated by a network view component based on a public protocol package, the preset hosting conditions are conditions for executing network hosting, and network protocol customization can be performed through the network hosting, so that network access and network protocol customization and expansion can be performed without depending on the network view component, and a network hosting implementation example can be set through an SDK interface;
sending the second network request to a server;
and after receiving the network data returned by the server, sending the network data returned by the server to the network view component.
CN201710837895.8A 2017-09-15 2017-09-15 Network data access method, device, system, storage medium and user terminal Active CN108282511B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710837895.8A CN108282511B (en) 2017-09-15 2017-09-15 Network data access method, device, system, storage medium and user terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710837895.8A CN108282511B (en) 2017-09-15 2017-09-15 Network data access method, device, system, storage medium and user terminal

Publications (2)

Publication Number Publication Date
CN108282511A CN108282511A (en) 2018-07-13
CN108282511B true CN108282511B (en) 2021-08-13

Family

ID=62801252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710837895.8A Active CN108282511B (en) 2017-09-15 2017-09-15 Network data access method, device, system, storage medium and user terminal

Country Status (1)

Country Link
CN (1) CN108282511B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104798355A (en) * 2012-09-18 2015-07-22 思杰系统有限公司 Mobile device management and security
CN105052078A (en) * 2013-03-15 2015-11-11 思科技术公司 Extending routing rules from external services

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139258A (en) * 2011-11-30 2013-06-05 百度在线网络技术(北京)有限公司 Method and device and system for processing page access requests of mobile terminal
US8918712B2 (en) * 2011-12-13 2014-12-23 Fmr Llc Dynamically generating a mobile application
CN103746990B (en) * 2013-12-31 2018-02-27 梵飞(厦门)信息科技有限公司 Browser and the data interaction system and method for client in a kind of mobile terminal
CN105407068B (en) * 2014-06-30 2019-02-15 优视科技有限公司 Network Data Capture methods, devices and systems
CN107040609B (en) * 2017-05-25 2020-09-04 腾讯科技(深圳)有限公司 Network request processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104798355A (en) * 2012-09-18 2015-07-22 思杰系统有限公司 Mobile device management and security
CN105052078A (en) * 2013-03-15 2015-11-11 思科技术公司 Extending routing rules from external services

Also Published As

Publication number Publication date
CN108282511A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
US10924917B2 (en) Profile download method and system, and related device
JP6740373B2 (en) Page component dynamic layout
CN107070870B (en) Data acquisition method and device
TWI651651B (en) Method and system for launching an application
TWI686702B (en) File transmission method and device
WO2017193864A1 (en) Method and system for starting application
CN106302103B (en) Information processing method and system and application server
CN105472694B (en) Method, device, terminal and storage medium for accessing WiFi through scanning two-dimensional code
US10498801B2 (en) Transmitting and displaying screen content
WO2015070816A1 (en) Application program push method, apparatus, device and system
CN111240768A (en) Configuration parameter configuration method and device and computer storage medium
WO2015154666A1 (en) Method for displaying webpage fragment on desktop and system for capturing webpage fragment to desktop for display
WO2018049933A1 (en) Data migration method and related product
CN108282511B (en) Network data access method, device, system, storage medium and user terminal
CN106095886B (en) Data processing method and device
CN110943827B (en) Data acquisition method and device based on network protocol
CN107390966B (en) Method and device for updating application upgrading prompt information
CN112887362B (en) Equipment access method, equipment access device and server
TW201918855A (en) Page data processing method and device, client terminal, and server
CN112115392B (en) Image display method, device, electronic equipment and readable storage medium
CN111078654B (en) Method and device for sharing information
CN106909466A (en) A kind of application call method and apparatus
CN106357718B (en) Information processing method and device, electronic terminal, network terminal equipment and system
CN105207827A (en) Communication gateway adding method and device as well as data communication method, system and device
CN107592373B (en) Information request method and device for multi-domain name page and user terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20200624

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510000 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio square 14 storey tower

Applicant before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant