WO2015018243A1 - 一种基于iOS设备的网页拦截方法和设备 - Google Patents

一种基于iOS设备的网页拦截方法和设备 Download PDF

Info

Publication number
WO2015018243A1
WO2015018243A1 PCT/CN2014/080931 CN2014080931W WO2015018243A1 WO 2015018243 A1 WO2015018243 A1 WO 2015018243A1 CN 2014080931 W CN2014080931 W CN 2014080931W WO 2015018243 A1 WO2015018243 A1 WO 2015018243A1
Authority
WO
WIPO (PCT)
Prior art keywords
string
application
system component
resource locator
uniform resource
Prior art date
Application number
PCT/CN2014/080931
Other languages
English (en)
French (fr)
Inventor
陆舟
于华章
Original Assignee
飞天诚信科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 飞天诚信科技股份有限公司 filed Critical 飞天诚信科技股份有限公司
Priority to US14/902,864 priority Critical patent/US9967314B2/en
Publication of WO2015018243A1 publication Critical patent/WO2015018243A1/zh

Links

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]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4553Object oriented directories, e.g. common object request broker architecture [CORBA] name server
    • 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/561Adding application-functional data or data for application control, e.g. adding metadata
    • 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/568Storing data temporarily at an intermediate stage, e.g. caching
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a webpage interception method and device based on an iOS device.
  • iOS Apple R&D operating system
  • iOS devices are devices that use iOS as their operating system, including iPhone, iPad, iPod Touch, and Apple TV and other products.
  • the preset webpage advertisement or malicious webpage is usually triggered without knowing it.
  • web advertisements transmit advertisement information to Internet users through the network by using advertisement banners, text links, and multimedia on the website.
  • webpage advertisement or malicious webpage preset on the website After the webpage advertisement or malicious webpage preset on the website is triggered, it will occupy system resources and network resources, reduce the running speed of the system and the speed and smoothness of the user's access to the network; for mobile devices, webpage advertisements and malicious webpages will also Consume the power of the device.
  • a virus is implanted into the client to monitor the client, steal the privacy information such as the address book and the user's personal information from the client, and even perform the client and the user who uses the client. Positioning brings huge security risks.
  • An object of the present invention is to provide a webpage interception method and device based on an iOS device, so as to solve the problem that resources are occupied due to triggering a webpage advertisement or a malicious webpage in the prior art.
  • an iOS device-based webpage interception method for use in an iOS device including an application and a system component, the method comprising the following steps:
  • the application starts, creates a subclass object of the uniform resource locator cache class, and specifies the subclass object as a uniform resource locator cache object, where the uniform resource locator cache object is a network request when the system component initiates a network request Accessed object;
  • the application acquires a hypertext transfer protocol address input by the user, generates a first request message according to the hypertext transfer protocol address, and sends the first request message to the system component;
  • step S5 The application uses the link string to match the parsed uniform resource locator string, if the match is successful, step S6 is performed; if the match fails, step S7 is performed;
  • the application generates masquerading response data, returns the masqueraded response data to the system component, performs display processing on the masqueraded response data by the system component, and returns to step S3;
  • the application sends the second request message to the website server, receives the response message returned by the website server, sends the response message to the system component, and returns to step S3.
  • an iOS device including an application and a system component, the application comprising:
  • An initialization module configured to create a subclass object of the uniform resource locator cache class when the application is started, and designate the subclass object as a uniform resource locator cache object, where the uniform resource locator cache object is An object that is accessed when a system component initiates a network request;
  • a requesting module configured to acquire a hypertext transfer protocol address input by the user, generate a first request message according to the hypertext transfer protocol address, and send the first request message to the system component;
  • a monitoring module configured to listen to the network request initiated by the system component by using the subclass object created by the initialization module
  • a parsing module configured to: when the intercepting module listens to the network request initiated by the system component, acquire a second request message from the system component, parse the second request message, and obtain the second request message The uniform resource locator string included;
  • a matching module configured to match, by using a link string, a uniform resource locator string parsed by the parsing module
  • a masquerading module configured to: when the matching module is successfully matched, generate masquerading response data, return the masqueraded response data to the system component, and perform display processing on the masqueraded response data by the system component;
  • the first response module is configured to send the second request message to the website server when the matching module fails to match, receive the response message returned by the website server, and send the response message to the system component.
  • the beneficial effects of the present invention by default URL to the system (Uniform/Universal Resource Locator, Uniform Resource Locator)
  • the cache object is subclassed to transfer control of the network request from the iOS system to the application; the application uses the link string to match the URL string parsed from the request message. And when the matching is successful, the masquerading response data is generated, and the masquerading response data is displayed, which can intercept the webpage advertisement or the malicious webpage, reduce the occupation of system resources and network resources, improve the running speed of the system, and access the network by the user. Speed and fluency reduce the consumption of power to the device.
  • the problem that resources are occupied due to triggering a webpage advertisement or a malicious webpage in the prior art is solved.
  • FIG. 1 is a schematic structural diagram of an iOS device according to the present invention.
  • FIG. 2 is a flow chart of a method for intercepting a webpage based on an iOS device according to the present invention
  • FIG. 3 is a flow chart of an application using a link string for matching in accordance with the present invention.
  • FIG. 4 is a schematic structural diagram of an iOS device according to the present invention.
  • the invention provides a webpage interception method based on an iOS device, which is applied to an iOS device including an application program and a system component.
  • the application creates a subclass object of the URL cache class in the initialization phase, and the subclass object
  • the class object is specified as a URL cache object, which is the system default object for caching data and is accessed when the network request is initiated.
  • the URL cache class is the NSURLCache class
  • SDK Software Development The network request in Kit, Software Development Kit usually accesses the system default NSURLCache object.
  • the network request in the SDK will access the cache object, so that the cache object can listen and process. Network request.
  • the application After the application is launched, it can be based on HTTP input by the user (HyperText Transfer The Protocol (Hypertext Transfer Protocol) address generates a first request message, and sends the first request message to the system component to initiate a network request through the system component; the system component accesses a subclass object of the URL cache class created by the application, such as a cache. The object; the above subclass object obtains the second request message from the system component, and returns a response message to the system component; the system component displays according to the response message.
  • the control of the network request can be transferred from the iOS system to the application, and the request message and the webpage data are processed by the application to realize the interception of the webpage advertisement and the malicious webpage.
  • the webpage interception method in the embodiment of the present invention includes the following steps:
  • step 201 the application starts and performs an initialization operation.
  • system components typically store cached data to the system default NSURLCache object.
  • the NSURLCache object is a globally shared object.
  • the network request in the SDK basically accesses the NSURLCache object, and the NSURLCache object
  • the cachedResponseForReques method maps the NSURLRequest object to the NSCachedURLResponse object and returns NSCachedURLResponse object.
  • the system component can be a UIWebView component.
  • this embodiment may define a subclass of the NSURLCache class, that is, the FTURLCache class, and override the cachedResponseForRequest method in the FTURLCache class, and enter the following method at the AppDelegate entry when the application starts:
  • the setSharedURLCache method specifies the created cache object as the system default NSURLCache object and adds it to the system.
  • the network request in the SDK usually accesses the system default NSURLCache object, after the cache object is specified as the system default cache object, the network request in the SDK accesses the cache object, thereby making The cache object can listen to and process network requests.
  • Step 202 The application acquires an HTTP address input by the user, generates a first request message according to the HTTP address, and sends the first request message to the system component, and sends a network request to the website server by using the system component.
  • the application may obtain an HTTP address input by the user, use the HTTP address as a URL string in the first request message, generate a first request message, and invoke a method in the system component according to the first request message to the website server. Initiate a network request.
  • the system component is a UIWebView component
  • the first request message is an instance of the NSURLRequest object, and may include a URL string, a cache mode information, and a timeout period.
  • the HTTP address obtained by the application is "www.aaa.com.cn"
  • the first request message generated is:
  • the URL string is "http://www.aaa.com.cn/"
  • the cache mode information is 0, and the timeout period is 10000.
  • the application calls the loadRequest method in the UIWebView component, and uses the first request message as a parameter of the loadRequest method to initiate a network request to the website server.
  • step 203 the application listens for network requests initiated by the system component.
  • the application can listen to network requests initiated by system components through the cache object. Since the application specifies the cache object as the default NSURLCache object in the initialization phase, and the network request usually accesses the system default NSURLCache object, when the system component initiates the network request, the network request accesses the cache object and is applied. The program listens.
  • the loadRequest method in the network component is called, according to the request message
  • Step 204 When the application listens to the network request initiated by the system component, the application acquires the second request message from the system component, and parses the second request message to obtain a URL string included in the second request message.
  • the second request message may be the same as the first request message, or may be different from the first request message; the system component is a UIWebView component, and when the loadRequest method in the UIWebView component accesses the cache object, the application listens to the network initiated by the UIWebView component. Request, can receive from The second request message of the UIWebView component calls the cachedResponseForRequest method in the cache object to parse the URL string from the second request message.
  • the second request message obtained by the application from the UIWebView component is:
  • Step 205 The application opens the preset link matching file, and uses the starting position of the link matching file as the current location.
  • the application can open the preset link matching file by calling the open method, and the starting position of the link matching file is taken as the current position.
  • the link matching file may include one or more lines of link strings, and the link string may be a string conforming to a preset format.
  • the application can call the open method to open the preset link matching file filter.txt.
  • Step 206 The application starts from the current position, reads a line of the link string from the link matching file, and updates the current position to the end of the link string.
  • the application can read the one-line link string from the link matching file by calling the read method from the current position, and update the current position to the end of the link string.
  • the application reads a line of link strings from the link match file filter.txt as "http://*.ad.*/*".
  • Step 207 The application matches the read link string and the parsed URL string. If the match is successful, step 208 is performed; if the match fails, step 209 is performed.
  • the application can call the MatchUrl method to match the read link string with the parsed URL string.
  • Step 208 The application generates the masquerading response data, returns the masqueraded response data to the system component, performs display processing on the masqueraded response data by the system component, and returns to step 203.
  • the application can encapsulate a masqueraded Response (Response) handle as a masquerading response data to the system component according to the local resource file, and the Response handle is used to disguise the response data returned by the web server.
  • the Response handle is an instance of the NSURLResponse object, and may include a header field, content, and cache mode information, the system component is a UIWebView component, and the content in the Response handle is a data content corresponding to the local resource file.
  • the application may obtain a resource file type corresponding to the parsed URL string, select a corresponding local resource file according to the resource file type, and generate a disguised Response handle according to the selected local resource file.
  • the masquerading corresponding data generated and returned by the application is a masquerading Response handle:
  • the header field is (NSDictionary) 0x00128003 and the content is (NSData). *) data, the cache mode information is 0.
  • the application can display the local resource file corresponding to the received masquerading response data by loading the system component.
  • the application program may display a transparent picture with a pixel of 1*1 by loading the system component, or may prompt the user to filter the advertisement or a malicious webpage by popping up the window, and may also replace the network request with the static image.
  • Corresponding dynamic picture, video resource or audio resource may replace the application may replace the source image corresponding to the network request with the local image, replace the remote video resource corresponding to the network request with the local video resource, and replace the remote audio resource corresponding to the network request with the local audio resource.
  • Step 209 The application determines whether the current location is the end position of the link matching file, and if yes, performs step 210; otherwise, returns to step 206.
  • Step 210 The application determines whether a resource file corresponding to the parsed URL string is stored in the local cache. If yes, step 211 is performed; otherwise, step 212 is performed.
  • the application can call the cachedResponseForRequest method in the parent class of the cache object, that is, the cachedResponseForRequest method in the NSURLCache class, to determine whether the resource file corresponding to the URL string is stored in the local cache.
  • the application searches the local cache for a png image with the name logo.
  • Step 211 The application sends the resource file corresponding to the parsed URL string in the local cache to the system component, displays the resource file by using the system component, and returns to step 203.
  • the system component is the UIWebView component.
  • the application sends the png image stored in the local cache with the name logo to the UIWebView component, and the UIWebView component displays the image.
  • Step 212 The application sends a second request message to the website server, receives the response message returned by the website server, sends the response message to the system component, and returns to step 203.
  • the application can call the cachedResponseForRequest method in the parent class of the cache object, that is, the cachedResponseForRequest method in the NSURLCache class, to obtain the The NSCachedURLResponse object returned by the cachedResponseForRequest method, that is, the response message.
  • the application returns the response message to the system component.
  • the response message returned by the website server may be response data, and the response data may include a resource type, a resource size, a resource name, and resource data, and the resource data may be binary data.
  • the corresponding resource file can be displayed by the system component, and the system component is a UIWebView component.
  • response message returned by the web server may also be webpage data, and the webpage data may include one or more resource file addresses.
  • the system component can parse the received webpage data, obtain a resource file address in the webpage data, and generate a corresponding request message according to the resource file address. And use the request message to initiate a network request.
  • the loadHTMLString method that can be used by the system component parses the received webpage data to obtain a resource file address in the webpage data. Further, the system component generates a corresponding request message according to the parsed resource file address, and uses the request message to initiate a network request, and accesses the system default NSURLCache object, that is, the cache object created in step 201.
  • the request message generated by the system component is an instance of the NSURLRequest object, and may include a URL string, a cache mode information, and a timeout period, and the system component is a UIWebView component.
  • the system component parses the resource file address from the received webpage data. "http://gongyi.qq.com/logo.png/", the generated request message is:
  • the application acquires a second request message from the system component, that is, the request message generated by the system component according to the resource file address, and processes the second request message. That is, the operations from step 204 to step 212 in the embodiment of the present invention are performed.
  • step 207 in the embodiment of the present invention the step of the application using the read link string to match the parsed URL string respectively may be refined into the flow shown in FIG. 3, including The following steps:
  • step 301 the application parses the read link string to obtain a valid string.
  • the application can remove the placeholders in the link string and parse the valid string in the link string.
  • the read link string is "http://*.ad.*/*", and after removing the placeholder in the link string, the valid string "ad" is obtained.
  • step 302 the application extracts the first character of the valid string.
  • step 303 the application initializes the current traversal subscript.
  • the application may initialize the current traversal subscript to 0.
  • Step 304 The application extracts the corresponding character from the URL string according to the current traversal subscript.
  • the URL string can be a URL string parsed by the application.
  • the current traversal subscript is 0
  • the extracted character corresponding to the current traversal subscript is "h”.
  • Step 305 The application determines whether the extracted character is a terminator. If yes, it determines that the read link string matches the URL string fails; otherwise, step 306 is performed.
  • the application determines that the extracted character is not a terminator.
  • Step 306 the application determines whether the extracted character is the same as the first character of the valid string. If they are the same, step 308 is performed; otherwise, step 307 is performed.
  • the application determines that the extracted character is different from the first character of the valid string.
  • step 307 the application updates the current traversal subscript and returns to step 304.
  • the application may add 1 to the current traversal subscript.
  • Step 308 The application starts from the character currently traversing the subscript, and intercepts a string equal to the length of the valid string from the URL string.
  • the URL string is "http://www.aaa.com.cn/"
  • the extracted character is the first "a”
  • the first character of the valid string is "a”
  • the length of the valid string is At 2 o'clock
  • the string intercepted by the application from the URL string is "aa”.
  • step 309 the application determines whether the intercepted string is the same as the valid string. If yes, it determines that the read link string matches the URL string successfully; otherwise, returns to step 307.
  • the application determines that the intercepted string is different from the valid string.
  • the application may further split the read link string into multiple substrings according to the wildcard in the read link string, and obtain the split string. Selecting an unprocessed substring from the substring, determining whether the selected substring is included in the parsed URL string, and if so, determining the read link string and parsing out The URL string matches successfully; otherwise, the selected substring is marked as processed, and it is determined whether the substring obtained by the splitting has been processed, and if so, the read link is determined.
  • the string fails to match the parsed URL string; otherwise, it continues to select an unprocessed string and determines whether the selected substring is included in the parsed URL string until the match is confirmed to be successful or Confirm that the substrings obtained by splitting from the read link string are processed.
  • the application can also obtain a regular expression corresponding to the read link string, called The NSPredicate class matches the regular expression and the parsed URL string, and the matching result is used as a matching result between the read link string and the parsed URL string.
  • the NSPredicate class matches the regular expression and the parsed URL string, and the matching result is used as a matching result between the read link string and the parsed URL string.
  • the control of the network request is transferred from the iOS system to the application by subclassing the default URL cache object of the system; the application uses the link string to parse the URL parsed from the request message.
  • the string is matched, and when the matching is successful, the masquerading response data is generated, and the masquerading response data is displayed, which can intercept the webpage advertisement or the malicious webpage, reduce the occupation of system resources and network resources, and improve the system operation. Speed and the speed and fluency of users accessing the network, reducing the consumption of power to the device.
  • FIG. 4 it is a schematic structural diagram of an iOS device according to the present invention, which includes an application 400 and a system component 500.
  • the application 400 includes:
  • the initialization module 410 is configured to: when the application 400 starts, create a subclass object of the uniform resource locator cache class, and specify the subclass object as a uniform resource locator cache object, where the uniform resource locator cache object is An object that is accessed when a system component initiates a network request;
  • the requesting module 420 is configured to obtain a hypertext transfer protocol address input by the user, generate a first request message according to the hypertext transfer protocol address, and send the first request message to the system component;
  • the requesting module 420 is specifically configured to obtain a hypertext transfer protocol address input by the user, and use the hypertext transfer protocol address as a uniform resource locator character in the first request message. Generating the first request message, invoking a method in the system component according to the first request message, and initiating a network request to the website server, where the first request message includes a uniform resource locator string and a cache Mode information and timeout.
  • the monitoring module 430 is configured to listen to the network request initiated by the system component by using the subclass object created by the initialization module 410.
  • the parsing module 440 is configured to: when the listening module 430 listens to the network request initiated by the system component, obtain a second request message from the system component, parse the second request message, and obtain the second request message.
  • the matching module 450 is configured to match the uniform resource locator string parsed by the parsing module 440 by using a link string;
  • the masquerading module 460 is configured to generate masquerading response data when the matching module 450 is successfully matched, return the masqueraded response data to the system component, and perform display processing on the masqueraded response data by using the system component;
  • the first response module 470 is configured to send the second request message to the website server when the matching module 450 fails to match, receive the response message returned by the website server, and send the response message to the system component.
  • the response message returned by the website server may be response data, where the response data includes a resource type, a resource size, a resource name, and resource data;
  • the first response module 470 is further configured to display, by using the system component, a resource file corresponding to the response data.
  • the iOS device may further include:
  • the determining module 480 is configured to determine, when the matching module 450 fails to match, whether the resource file corresponding to the uniform resource locator string parsed by the parsing module 440 is stored in the local cache;
  • the second response module 490 is configured to: when the determining module 480 determines that the resource file corresponding to the parsed uniform resource locator string is stored in the local cache, parse the local cache with the The resource file corresponding to the uniform resource locator string is sent to the system component, and the resource file is displayed by the system component;
  • the first response module 470 is specifically configured to send, to the website server, when the determining module 480 determines that the resource file corresponding to the parsed uniform resource locator string is not stored in the local cache.
  • the second request message receives a response message returned by the website server, and sends the response message to the system component.
  • the masquerading module 460 may include:
  • the generating sub-module 461 is configured to generate a spoofed response handle according to the local resource file when the matching module 450 matches successfully, the response handle is used to masquerade the response data returned by the website server, where the response handle includes a header field, Content and cache mode information;
  • the generating sub-module 461 is specifically configured to acquire a resource file type corresponding to the parsed uniform resource locator string, and select a corresponding local resource file according to the resource file type, according to the local resource.
  • the file generates a masqueraded response handle;
  • a sending submodule 462 configured to return the response handle generated by the generating submodule 461 to the system component as the masquerading response data
  • the display submodule 463 is configured to display a local resource file corresponding to the masqueraded response data by loading the system component.
  • the matching module 450 may specifically include a reading submodule 451, a matching submodule 452, and a judging submodule 453, where
  • the reading sub-module 451 is configured to read a line of the link string from the start position of the preset link matching file, set the current position to the end of the read link string, and trigger on the determined sub-module 453. At the beginning, starting from the current position, reading a line of the link string from the link matching file, and updating the current position to the end of the read link string;
  • a matching sub-module 452 configured to match the link string read by the reading sub-module 451 with the uniform resource locator string parsed by the parsing module, if the read link string and the If the parsed uniform resource locator string is successfully matched, the masquerading module 460 is triggered; if the read link string and the parsed uniform resource locator string match fail, the determining sub-module 453 is triggered;
  • the determining sub-module 453 is configured to determine whether the current location is the end position of the link matching file, and if so, trigger the first response module 470; otherwise, the reading sub-module 451 is triggered.
  • the matching submodule 452 can be specifically configured to perform the following operations:
  • step B3 Determining whether the extracted character is the same as the first character of the valid string, if yes, executing step B5; otherwise, performing step B4;
  • step B5) And starting from the character corresponding to the current traversal subscript, intercepting a string equal to the length of the valid string from the parsed uniform resource locator string, and determining whether the intercepted string and the valid string are If yes, the process returns to step B4. If they are the same, it is determined that the read link string matches the parsed uniform resource locator string successfully, and the masquerading module 460 is triggered.
  • the matching sub-module 452 initializes the current traversal subscript, specifically: the matching sub-module 452 initializes the current traversal subscript to 0;
  • the matching sub-module 452 updates the current traversal subscript, specifically: the matching sub-module 452 adds 1 to the current traversal subscript.
  • matching submodule 452 may be specifically configured to perform the following operations:
  • the matching submodule 452 may be specifically configured to acquire a regular expression corresponding to the read link string, and use the regular expression to match the parsed uniform resource locator string. .
  • the control of the network request is transferred from the iOS system to the application by subclassing the default URL cache object of the system; the application uses the link string to parse the URL string from the request message.
  • Matching and when the matching is successful, generating masquerading response data, and displaying according to the masquerading response data, can realize interception of webpage advertisements or malicious webpages, reduce occupation of system resources and network resources, and improve system running speed and The speed and fluency of users accessing the network reduces the consumption of power to the device.
  • the steps in the methods described in connection with the embodiments disclosed herein may be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种基于iOS设备的网页拦截方法,应用于包括应用程序和***组件的iOS设备中,应用程序通过对***默认的统一资源定位符缓存对象进行子类化处理,得到对网络请求的控制权,使用链接字符串,对从请求消息中解析出的统一资源定位符字符串进行匹配,并在匹配成功时,生成伪装响应数据,并根据该伪装响应数据进行显示,能够实现对网页广告或恶意网页的拦截,降低对***资源和网络资源的占用,提高***的运行速度以及用户访问网络的速度和流畅度,减少对设备电量的消耗。解决了现有技术中由于触发网页广告或恶意网页而导致资源被占用的问题。

Description

一种基于iOS设备的网页拦截方法和设备 技术领域
本发明涉及计算机技术领域,特别涉及一种基于iOS设备的网页拦截方法和设备。
背景技术
随着互联网的迅猛发展,iOS(苹果研发操作***)设备的普及率也日益提高。 iOS设备是使用iOS作为其操作***的设备,包括iPhone、iPad、iPod Touch 以及Apple TV等产品。用户在使用iOS设备中的网页浏览器访问网页时,通常会在不知情的情况下触发预置的网页广告或者恶意网页。其中,网页广告通过使用网站上的广告横幅、文本链接和多媒体等方法,将广告信息通过网络传递到互联网用户。
发明人在实现本发明的过程中,发现现有技术至少存在以下缺陷:
网站上预置的网页广告或者恶意网页被触发后,会占用***资源和网络资源,降低***的运行速度以及用户访问网络的速度和流畅度;对于移动设备而言,网页广告和恶意网页还会消耗设备的电量。此外,恶意网页被触发后,还会向客户端植入病毒,实现对客户端的监听,从客户端中盗取通信录、用户个人信息等隐私信息,甚至对客户端以及使用该客户端的用户进行定位,带来巨大的安全隐患。
发明内容
本发明的目的是提供一种基于iOS设备的网页拦截方法和设备,以解决现有技术中由于触发网页广告或恶意网页而导致资源被占用的问题。
为此,根据本发明的一个方面,提供了一种基于iOS设备的网页拦截方法,应用于包括应用程序和***组件的iOS设备中,所述方法包括以下步骤:
S1) 所述应用程序启动,创建统一资源定位符缓存类的子类对象,将所述子类对象指定为统一资源定位符缓存对象,所述统一资源定位符缓存对象为所述***组件发起网络请求时访问的对象;
S2) 所述应用程序获取用户输入的超文本传输协议地址,根据所述超文本传输协议地址生成第一请求消息,将所述第一请求消息发送给所述***组件;
S3) 所述应用程序通过所述子类对象,监听所述***组件发起的网络请求;
S4) 当所述应用程序监听到所述***组件发起的网络请求时,所述应用程序从所述***组件获取第二请求消息,对所述第二请求消息进行解析,得到所述第二请求消息所包含的统一资源定位符字符串;
S5) 所述应用程序使用链接字符串对解析出的统一资源定位符字符串进行匹配,如果匹配成功,则执行步骤S6;如果匹配失败,则执行步骤S7;
S6) 所述应用程序生成伪装响应数据,将所述伪装响应数据返回给所述***组件,通过所述***组件对所述伪装响应数据进行显示处理,并返回步骤S3;以及
S7) 所述应用程序向网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件,并返回步骤S3。
根据本发明的另外一个方面,还提供了一种iOS设备,包括应用程序和***组件,所述应用程序包括:
初始化模块,用于在所述应用程序启动时,创建统一资源定位符缓存类的子类对象,将所述子类对象指定为统一资源定位符缓存对象,所述统一资源定位符缓存对象为所述***组件发起网络请求时访问的对象;
请求模块,用于获取用户输入的超文本传输协议地址,根据所述超文本传输协议地址生成第一请求消息,将所述第一请求消息发送给所述***组件;
监听模块,用于通过所述初始化模块创建的所述子类对象,监听所述***组件发起的网络请求;
解析模块,用于在所述监听模块监听到所述***组件发起的网络请求时,从所述***组件获取第二请求消息,对所述第二请求消息进行解析,得到所述第二请求消息所包含的统一资源定位符字符串;
匹配模块,用于使用链接字符串对所述解析模块解析出的统一资源定位符字符串进行匹配;
伪装模块,用于在所述匹配模块匹配成功时,生成伪装响应数据,将所述伪装响应数据返回给所述***组件,通过所述***组件对所述伪装响应数据进行显示处理;以及
第一响应模块,用于在所述匹配模块匹配失败时,向网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件。
本发明的有益效果:通过对***默认的URL(Uniform/Universal Resource Locator,统一资源定位符)缓存对象进行子类化处理,将网络请求的控制权从iOS***转移到应用程序;应用程序使用链接字符串,对从请求消息中解析出的URL字符串进行匹配,并在匹配成功时,生成伪装响应数据,并根据该伪装响应数据进行显示,能够实现对网页广告或恶意网页的拦截,降低对***资源和网络资源的占用,提高***的运行速度以及用户访问网络的速度和流畅度,减少对设备电量的消耗。
根据本发明,解决了现有技术中由于触发网页广告或恶意网页而导致资源被占用的问题。
附图说明
图1为根据本发明的iOS设备的结构示意图;
图2为根据本发明的一种基于iOS设备的网页拦截方法的流程图;
图3为根据本发明的应用程序使用链接字符串进行匹配的流程图;
图4为根据本发明的一种iOS设备的结构示意图。
具体实施方式
下面将结合附图,对本发明的实施例进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域的技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明提供了一种基于iOS设备的网页拦截方法,应用于包括应用程序和***组件的iOS设备中,如图1所示,应用程序在初始化阶段创建URL缓存类的子类对象,将该子类对象指定为URL缓存对象,该URL缓存对象为***默认的用于缓存数据的对象,在网络请求发起时被访问。
例如,URL缓存类为NSURLCache类时,可以创建NSURLCache类的子类,即, FTURLCache类,并创建FTURLCache类的对象cache,将cache对象指定为***默认的NSURLCache对象。由于SDK(Software Development Kit,软件开发工具包)中的网络请求通常会访问***默认的NSURLCache对象,将cache对象指定为***默认的NSURLCache对象后,SDK中的网络请求会访问cache对象,从而使得cache对象能够监听和处理网络请求。
应用程序启动后,可以根据用户输入的HTTP(HyperText Transfer Protocol,超文本传输协议)地址生成第一请求消息,将该第一请求消息发送给***组件,通过该***组件发起网络请求;***组件访问应用程序创建的URL缓存类的子类对象,例如cache对象;上述子类对象从***组件获取第二请求消息,并向***组件返回响应消息;***组件根据该响应消息进行显示。通过创建和指定URL缓存类的子类对象,能够将网络请求的控制权从iOS***转移到应用程序,通过应用程序对请求消息和网页数据进行处理,实现对网页广告和恶意网页的拦截。
基于上述iOS设备,本发明实施例中的网页拦截方法,如图2所示,包括以下步骤:
步骤201,应用程序启动,并执行初始化操作。
具体地,在iOS***中,***组件通常将缓存的数据存储到***默认的 NSURLCache对象。NSURLCache对象为全局共享的对象,SDK中的网络请求基本上都会访问NSURLCache对象,NSURLCache对象中的 cachedResponseForReques方法将NSURLRequest对象映射到 NSCachedURLResponse对象,并返回 NSCachedURLResponse对象。其中,***组件可以为UIWebView组件。
基于上述机制,本实施例可以定义NSURLCache类的子类,即,FTURLCache类,在FTURLCache类中重写cachedResponseForRequest方法,并在应用程序启动时,在AppDelegate入口处进入以下方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
在上述方法中,可以创建FTURLCache类的对象cache,通过调用 setSharedURLCache方法,将创建的cache对象指定为***默认的NSURLCache对象,添加到***中。
由于SDK中的网络请求通常会访问***默认的NSURLCache对象,将cache对象指定为***默认的缓存对象后,SDK中的网络请求会访问cache对象,从而使得 cache对象能够监听和处理网络请求。
步骤202,应用程序获取用户输入的HTTP地址,根据该HTTP地址生成第一请求消息,将该第一请求消息发送给***组件,通过该***组件向网站服务器发起网络请求。
具体地,应用程序可以获取用户输入的HTTP地址,将该HTTP地址作为第一请求消息中的URL字符串,生成第一请求消息,根据该第一请求消息调用***组件中的方法,向网站服务器发起网络请求。
其中,***组件为UIWebView组件,第一请求消息为NSURLRequest对象的实例,可以包括URL字符串、缓存方式信息和超时时间。
例如,应用程序获取到的HTTP地址为“www.aaa.com.cn”时,生成的第一请求消息为:
“<NSURLRequest url:http://www.aaa.com.cn/ cachePolicy:0 NSTimeInterval:10000>”
其中,URL字符串为“http://www.aaa.com.cn/”,缓存方式信息为0,超时时间为10000。
应用程序调用UIWebView组件中的loadRequest方法,将上述第一请求消息作为loadRequest方法的参数,向网站服务器发起网络请求。
步骤203,应用程序监听***组件发起的网络请求。
具体地,应用程序可以通过cache对象监听***组件发起的网络请求。由于应用程序在初始化阶段将cache对象指定为***默认的NSURLCache对象,且网络请求通常会访问***默认的NSURLCache对象,因此,当***组件发起网络请求时,该网络请求会访问cache对象,从而被应用程序监听到。
例如,网络组件中的loadRequest方法被调用,根据请求消息
“<NSURLRequest url:http://www.aaa.com.cn/ cachePolicy:0 NSTimeInterval:10000>”,发起网络请求,访问***默认的NSURLCache对象,即步骤201中创建的cache对象,应用程序监听到该网络请求。
步骤204,当应用程序监听到***组件发起的网络请求时,应用程序从***组件获取第二请求消息,对该第二请求消息进行解析,得到该第二请求消息所包含的URL字符串。
其中,第二请求消息可以与第一请求消息相同,也可以与第一请求消息不同;***组件为UIWebView组件,当UIWebView组件中的loadRequest方法访问cache对象时,应用程序监听到UIWebView组件发起的网络请求,可以接收来自 UIWebView组件的第二请求消息,调用cache对象中的cachedResponseForRequest方法,从该第二请求消息中解析出URL字符串。
例如,当应用程序从UIWebView组件获取到的第二请求消息为:
“<NSURLRequest url:http://www.aaa.com.cn/ cachePolicy:0 NSTimeInterval:10000>”时,应用程序从该第二请求消息中解析出URL字符串 “http://www.aaa.com.cn/”;
当应用程序从UIWebView组件获取到的第二请求消息为:
“<NSURLRequest url:http://gongyi.qq.com/logo.png/ cachePolicy:0 NSTimeInterval:10000>”时,应用程序从该第二请求消息中解析出URL字符串 “http://gongyi.qq.com/logo.png/”。
步骤205,应用程序打开预置的链接匹配文件,将该链接匹配文件的起始位置作为当前位置。
具体地,应用程序可以通过调用open方法,打开预置的链接匹配文件,将该链接匹配文件的起始位置作为当前位置。其中,链接匹配文件可以包含一行或多行链接字符串,链接字符串可以为符合预设格式的字符串。
例如,应用程序可以调用open方法,打开预置的链接匹配文件filter.txt。
步骤206,应用程序自当前位置开始,从链接匹配文件中读取一行链接字符串,将当前位置更新为该链接字符串的末尾。
具体地,应用程序可以通过调用read方法,自当前位置开始,从链接匹配文件中读取一行链接字符串,将当前位置更新为该链接字符串的末尾。
例如,应用程序从链接匹配文件filter.txt中读取到的一行链接字符串为 “http://*.ad.*/*”。
步骤207,应用程序对读取到的链接字符串和解析出的URL字符串进行匹配,如果匹配成功,则执行步骤208;如果匹配失败,则执行步骤209。
具体地,应用程序可以调用MatchUrl方法,对读取到的链接字符串和解析出的URL字符串进行匹配。
例如,当应用程序解析出的URL字符串为“http://www.aaa.com.cn/”时,应用程序对读取到的链接字符串“http://*.ad.*/*”和 “http://www.aaa.com.cn/”进行匹配;
当应用程序解析出的URL字符串为“http://gongyi.qq.com/logo.png/”时,应用程序对读取到的链接字符串“http://*.ad.*/*”和 “http://gongyi.qq.com/logo.png/”进行匹配。
步骤208,应用程序生成伪装响应数据,将该伪装响应数据返回给***组件,通过***组件对该伪装响应数据进行显示处理,并返回步骤203。
具体他,应用程序可以根据本地资源文件封装一个伪装的Response(响应)句柄作为伪装响应数据返回给***组件,该Response句柄用于伪装网站服务器返回的响应数据。其中,Response句柄为NSURLResponse对象的实例,可以包括头域、内容和缓存方式信息,***组件为UIWebView组件,Response句柄中的内容为本地资源文件对应的数据内容。进一步地,应用程序可以获取与解析出的URL字符串对应的资源文件类型,根据该资源文件类型选择对应的本地资源文件,根据选择的本地资源文件生成伪装的Response句柄。
例如:应用程序生成并返回的伪装相应数据为伪装Response句柄:
“<NSURLResponse headerField:(NSDictionary)0x00128003 data:(NSData *)data cacheStoragePolicy:0>”
其中,头域为(NSDictionary)0x00128003,内容为(NSData *)data,缓存方式信息为0。
相应地,应用程序可以通过加载***组件,显示与接收到的伪装响应数据对应的本地资源文件。
本实施例中,应用程序通过加载所述***组件,可以显示像素为1*1的透明图片,也可以通过弹出窗口的方式,提示用户已过滤广告或恶意网页,还可以使用静态图片替换网络请求对应的动态图片、视频资源或音频资源。此外,应用程序还可以使用本地图片替换网络请求对应的源图片,使用本地视频资源替换网络请求对应的远程视频资源,使用本地音频资源替换网络请求对应的远程音频资源。
步骤209,应用程序判断当前位置是否为链接匹配文件的结束位置,如果是,则执行步骤210;否则,返回步骤206。
步骤210,应用程序判断本地缓存中是否存储有与解析出的URL字符串对应的资源文件,如果是,则执行步骤211;否则,执行步骤212。
具体地,应用程序可以调用cache对象的父类中的cachedResponseForRequest方法,即NSURLCache类中的cachedResponseForRequest方法,判断本地缓存中是否存储有与URL字符串对应的资源文件。
例如,解析出的URL字符串为“http://gongyi.qq.com/logo.png/”时,应用程序从本地缓存中搜索名称为logo的png图片。
步骤211,应用程序将本地缓存中与解析出的URL字符串对应的资源文件发送给***组件,通过该***组件显示该资源文件,并返回步骤203。
其中,***组件为UIWebView组件。
例如,URL字符串为“http://gongyi.qq.com/logo.png/”时,应用程序将本地缓存中存储的名称为logo的png图片发送给UIWebView组件,UIWebView组件显示该图片。
步骤212,应用程序向网站服务器发送第二请求消息,接收网站服务器返回的响应消息,将该响应消息发送给***组件,并返回步骤203。
具体地,应用程序可以调用cache对象的父类中的cachedResponseForRequest方法,即NSURLCache类中的cachedResponseForRequest方法,得到该 cachedResponseForRequest方法返回的NSCachedURLResponse对象,即响应消息。应用程序将该响应消息返回给***组件。
其中,网站服务器返回的响应消息可以为响应数据,响应数据可以包含资源类型、资源大小、资源名称和资源数据,该资源数据可以为二进制数据。
相应地,应用程序将接收到的响应数据返回给***组件后,可以通过该***组件显示相应的资源文件,***组件为UIWebView组件。
例如,网站服务器返回的响应数据为“资源类型=png图片,资源大小=20KB,资源名称= logo,资源数据=1011110110001111010”时,应用程序通过 UIWebView组件显示名称为logo的png图片。
此外,网站服务器返回的响应消息还可以为网页数据,该网页数据中可以包含一个或多个资源文件地址。
相应地,应用程序将接收到的网页数据返回给***组件后,***组件可以对接收到的网页数据进行解析,得到该网页数据中的资源文件地址,根据该资源文件地址生成相应的请求消息,并使用该请求消息发起网络请求。
具体地,***组件可以使用的loadHTMLString方法,对接收到的网页数据进行解析,得到该网页数据中的资源文件地址。进一步地,***组件根据解析得到的资源文件地址生成相应的请求消息,并使用该请求消息发起网络请求,访问***默认的NSURLCache对象,即步骤201中创建的cache对象。
其中,***组件生成的请求消息为NSURLRequest对象的实例,可以包括URL字符串、缓存方式信息和超时时间,***组件为UIWebView组件。
例如,***组件从接收到的网页数据中解析得到资源文件地址 “http://gongyi.qq.com/logo.png/”,生成的请求消息为:
“<NSURLRequest url:http://gongyi.qq.com/logo.png/ cachePolicy:0 NSTimeInterval:10000>”。
相应地,应用程序通过cache对象监听到***组件发起的网络请求后,获取来自该***组件的第二请求消息,即***组件根据资源文件地址生成的请求消息,并对该第二请求消息进行处理,即执行本发明实施例中的步骤204至步骤212的操作。
需要说明的是,本发明实施例中的步骤207中,应用程序使用读取到的链接字符串分别与解析出的URL字符串进行匹配的步骤,可细化为图3所示的流程,包括以下步骤:
步骤301,应用程序对读取到的链接字符串进行解析,得到有效字符串。
具体地,应用程序可以将链接字符串中的占位符去除,解析得到链接字符串中的有效字符串。
例如,读取到的链接字符串为“http://*.ad.*/*”,去除该链接字符串中的占位符后,得到有效字符串“ad”。
步骤302,应用程序提取有效字符串的首字符。
例如,有效字符串为“ad”时,提取有效字符串的首字符“a”。
步骤303,应用程序对当前遍历下标进行初始化。
本发明实施例中,应用程序可以将当前遍历下标初始化为0。
步骤304,应用程序根据当前遍历下标,从URL字符串中提取对应的字符。
其中,URL字符串中,不同的字符分别对应不同的遍历下标,第一个字符串对应的遍历下标可以为0。URL字符串可以为应用程序解析出的URL字符串。
例如:URL字符串为“http://www.aaa.com.cn/”,当前遍历下标为0时,提取到的与当前遍历下标对应的字符为“h”。
步骤305,应用程序判断提取到的字符是否为结束符,如果是,则确定读取到的链接字符串与URL字符串匹配失败;否则,执行步骤306。
例如,提取到的字符为“h”时,应用程序判断提取到的字符不是结束符。
步骤306,应用程序判断提取到的字符是否与有效字符串的首字符相同,如果相同,则执行步骤308;否则,执行步骤307。
例如,提取到的字符为“h”,有效字符串的首字符为“a”时,应用程序判断提取到的字符与有效字符串的首字符不同。
步骤307,应用程序对当前遍历下标进行更新,并返回步骤304。
本发明实施例中,应用程序可以将当前遍历下标加1。
步骤308,应用程序从当前遍历下标对应的字符开始,从URL字符串中截取与有效字符串长度相等的字符串。
例如,URL字符串为“http://www.aaa.com.cn/”,提取到的字符为第一个“a”,有效字符串的首字符为“a”,有效字符串的长度为2时,应用程序从URL字符串中截取的字符串为“aa”。
步骤309,应用程序判断截取的字符串是否与有效字符串相同,如果是,则确定读取到的链接字符串与URL字符串匹配成功;否则,返回步骤307。
例如,当截取的字符串为“aa”,有效字符串为“ad”时,应用程序判断截取的字符串与有效字符串不同。
需要说明的是,在本发明的其他实施方式中,应用程序还可以按照读取到的链接字符串中的通配符,将读取到的链接字符串拆分为多个子字符串,从拆分得到的子字符串中选取一个未被处理过的子字符串,判断选取的子字符串是否包含在解析出的URL字符串中,如果是,则确定所述读取到的链接字符串与解析出的URL字符串匹配成功;否则,将选取的子字符串标记为已被处理过,并判断上述拆分得到的子字符串是否均被处理过,如果是,则确定所述读取到的链接字符串与所述解析出的URL字符串匹配失败;否则,继续选取一个未被处理过的字符串,并判断选取的子字符串是否包含在解析出的URL字符串中,直到确认匹配成功或者确认根据读取到的链接字符串拆分得到的子字符串均被处理过。
此外,应用程序还可以获取与读取到的链接字符串对应的正则表达式,调用 NSPredicate类,对该正则表达式和解析出的URL字符串进行匹配,将匹配结果作为读取到的链接字符串与解析出的URL字符串之间的匹配结果。
本发明实施例中,通过对***默认的URL缓存对象进行子类化处理,将网络请求的控制权从iOS***转移到应用程序;应用程序使用链接字符串,对从请求消息中解析出的URL字符串进行匹配,并在匹配成功时,生成伪装响应数据,并根据该伪装响应数据进行显示,能够实现对网页广告或恶意网页的拦截,降低对***资源和网络资源的占用,提高***的运行速度以及用户访问网络的速度和流畅度,减少对设备电量的消耗。
如图4所示,为本发明的一种iOS设备的结构示意图,包括应用程序400和***组件500,其中,应用程序400包括:
初始化模块410,用于在应用程序400启动时,创建统一资源定位符缓存类的子类对象,将所述子类对象指定为统一资源定位符缓存对象,所述统一资源定位符缓存对象为所述***组件发起网络请求时访问的对象;
请求模块420,用于获取用户输入的超文本传输协议地址,根据所述超文本传输协议地址生成第一请求消息,将所述第一请求消息发送给所述***组件;
具体地,上述请求模块420,具体用于获取用户输入的超文本传输协议地址,将所述超文本传输协议地址作为所述第一请求消息中的统一资源定位符字符 串,生成所述第一请求消息,根据所述第一请求消息调用所述***组件中的方法,向所述网站服务器发起网络请求,所述第一请求消息包括统一资源定位符字符串、缓存方式信息和超时时间。
监听模块430,用于通过初始化模块410创建的所述子类对象,监听所述***组件发起的网络请求;
解析模块440,用于在监听模块430监听到所述***组件发起的网络请求时,从所述***组件获取第二请求消息,对所述第二请求消息进行解析,得到所述第二请求消息所包含的统一资源定位符字符串;
匹配模块450,用于使用链接字符串对解析模块440解析出的统一资源定位符字符串进行匹配;
伪装模块460,用于在匹配模块450匹配成功时,生成伪装响应数据,将所述伪装响应数据返回给所述***组件,通过所述***组件对所述伪装响应数据进行显示处理;
第一响应模块470,用于在匹配模块450匹配失败时,向网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件。
其中,网站服务器返回的响应消息可以为响应数据,该响应数据包含资源类型、资源大小、资源名称和资源数据;
相应地,第一响应模块470,还用于通过所述***组件,显示与所述响应数据对应的资源文件。
进一步地,上述iOS设备,还可以包括:
判断模块480,用于在匹配模块450匹配失败时,判断本地缓存中是否存储有与解析模块440解析出的统一资源定位符字符串对应的资源文件;
第二响应模块490,用于在判断模块480判断出所述本地缓存中存储有与所述解析出的统一资源定位符字符串对应的资源文件时,将所述本地缓存中与所述解析出的统一资源定位符字符串对应的资源文件发送给所述***组件,通过所述***组件显示所述资源文件;
相应地,上述第一响应模块470,具体用于在判断模块480判断出所述本地缓存中没有存储与所述解析出的统一资源定位符字符串对应的资源文件时,向所述网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件。
在上述iOS设备中,伪装模块460,可以包括:
生成子模块461,用于在匹配模块450匹配成功时,根据本地资源文件生成一个伪装的响应句柄,所述响应句柄用于伪装所述网站服务器返回的响应数据,所述响应句柄包括头域、内容和缓存方式信息;
具体地,上述生成子模块461,具体用于获取与所述解析出的统一资源定位符字符串对应的资源文件类型,根据所述资源文件类型,选择对应的本地资源文件,根据所述本地资源文件生成一个伪装的响应句柄;
发送子模块462,用于将生成子模块461生成的所述响应句柄作为所述伪装响应数据返回给所述***组件;
显示子模块463,用于通过加载所述***组件,显示与所述伪装响应数据对应的本地资源文件。
进一步地,匹配模块450,可以具体包括读取子模块451、匹配子模块452和判断子模块453,其中,
读取子模块451,用于从预置的链接匹配文件的起始位置开始,读取一行链接字符串,将当前位置设置为读取到的链接字符串的末尾;在被判断子模块453触发时,自当前位置开始,从所述链接匹配文件中读取一行链接字符串,将当前位置更新为读取到的链接字符串的末尾;
匹配子模块452,用于对读取子模块451读取到的链接字符串和所述解析模块解析出的统一资源定位符字符串进行匹配,如果所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,则触发伪装模块460;如果所述读取到的链接字符串和所述解析出的统一资源定位符字符串匹配失败,则触发判断子模块453;
判断子模块453,用于判断当前位置是否为所述链接匹配文件的结束位置,如果是,则触发第一响应模块470;否则,触发读取子模块451。
具体地,匹配子模块452,可以具体用于执行以下操作:
B1) 对所述读取到的链接字符串进行解析,得到有效字符串,提取所述有效字符串的首字符,并对当前遍历下标进行初始化;
B2) 根据所述当前遍历下标,从所述解析出的统一资源定位符字符串中提取对应的字符,判断提取到的字符是否为结束符,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,触发判断子模块453;否则,执行步骤B3;
B3) 判断所述提取到的字符是否与所述有效字符串的首字符相同,如果是,则执行步骤B5;否则,执行步骤B4;
B4) 对所述当前遍历下标进行更新,并返回步骤B2;
B5) 从所述当前遍历下标对应的字符开始,从所述解析出的统一资源定位符字符串中截取与所述有效字符串长度相等的字符串,判断截取的字符串是否与所述有效字符串相同,如果不同,则返回步骤B4;如果相同,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,触发所述伪装模块460。
其中,匹配子模块452对当前遍历下标进行初始化,具体为:匹配子模块452将所述当前遍历下标初始化为0;
匹配子模块452对所述当前遍历下标进行更新,具体为:匹配子模块452将所述当前遍历下标加1。
另外,上述匹配子模块452,还可以具体用于执行以下操作:
C1) 按照所述读取到的链接字符串中的通配符,将所述读取到的链接字符串拆分为多个子字符串;
C2) 从拆分得到的子字符串中选取一个未被处理过的子字符串;
C3) 判断选取的子字符串是否包含在所述解析出的统一资源定位符字符串中,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,触发所述伪装模块460;否则,将所述选取的子字符串标记为已被处理过,并执行步骤C4;
C4) 判断上述拆分得到的子字符串是否均被处理过,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,触发判断子模块453;否则,返回步骤C2。
此外,上述匹配子模块452,还可以具体用于获取与所述读取到的链接字符串对应的正则表达式,使用所述正则表达式与所述解析出的统一资源定位符字符串进行匹配。
根据本发明,通过对***默认的URL缓存对象进行子类化处理,将网络请求的控制权从iOS***转移到应用程序;应用程序使用链接字符串,对从请求消息中解析出的URL字符串进行匹配,并在匹配成功时,生成伪装响应数据,并根据该伪装响应数据进行显示,能够实现对网页广告或恶意网页的拦截,降低对***资源和网络资源的占用,提高***的运行速度以及用户访问网络的速度和流畅度,减少对设备电量的消耗。
结合本文中所公开的实施例描述的方法中的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何本领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求书的保护范围为准。

Claims (20)

  1. 一种基于iOS设备的网页拦截方法,应用于包括应用程序和***组件的iOS设备中,其特征在于,所述方法包括以下步骤:
    S1) 所述应用程序启动,创建统一资源定位符缓存类的子类对象,将所述子类对象指定为统一资源定位符缓存对象,所述统一资源定位符缓存对象为所述***组件发起网络请求时访问的对象;
    S2) 所述应用程序获取用户输入的超文本传输协议地址,根据所述超文本传输协议地址生成第一请求消息,将所述第一请求消息发送给所述***组件;
    S3) 所述应用程序通过所述子类对象,监听所述***组件发起的网络请求;
    S4) 当所述应用程序监听到所述***组件发起的网络请求时,所述应用程序从所述***组件获取第二请求消息,对所述第二请求消息进行解析,得到所述第二请求消息所包含的统一资源定位符字符串;
    S5) 所述应用程序使用链接字符串对解析出的统一资源定位符字符串进行匹配,如果匹配成功,则执行步骤S6;如果匹配失败,则执行步骤S7;
    S6) 所述应用程序生成伪装响应数据,将所述伪装响应数据返回给所述***组件,通过所述***组件对所述伪装响应数据进行显示处理,并返回步骤S3;以及
    S7) 所述应用程序向网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件,并返回步骤S3。
  2. 如权利要求1所述的方法,其特征在于,所述步骤S2具体为:
    所述应用程序获取用户输入的超文本传输协议地址,将所述超文本传输协议地址作为所述第一请求消息中的统一资源定位符字符串,生成所述第一请求消息,根据所述第一请求消息调用所述***组件中的方法,向所述网站服务器发起网络请求,所述第一请求消息包括统一资源定位符字符串、缓存方式信息和超时时间。
  3. 如权利要求1所述的方法,其特征在于,所述步骤S5具体包括:
    A1) 所述应用程序从预置的链接匹配文件的起始位置开始,读取一行链接字符串,将当前位置设置为读取到的链接字符串的末尾;
    A2) 所述应用程序对所述读取到的链接字符串和解析出的统一资源定位符字符串进行匹配,如果所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,则执行步骤S6;如果所述读取到的链接字符串和所述解析出的统一资源定位符字符串匹配失败,则执行步骤 A3;
    A3) 所述应用程序判断当前位置是否为所述链接匹配文件的结束位置,如果是,则执行步骤S7;否则,执行步骤A4;以及
    A4) 所述应用程序自当前位置开始,从所述链接匹配文件中读取一行链接字符串,将当前位置更新为读取到的链接字符串的末尾,并返回步骤A2。
  4. 如权利要求3所述的方法,其特征在于,所述步骤A2具体包括:
    B1) 所述应用程序对所述读取到的链接字符串进行解析,得到有效字符串,提取所述有效字符串的首字符,并对当前遍历下标进行初始化;
    B2) 所述应用程序根据所述当前遍历下标,从所述解析出的统一资源定位符字符串中提取对应的字符,判断提取到的字符是否为结束符,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,执行步骤A3;否则,执行步骤B3;
    B3) 所述应用程序判断所述提取到的字符是否与所述有效字符串的首字符相同,如果是,则执行步骤B5;否则,执行步骤B4;
    B4) 所述应用程序对所述当前遍历下标进行更新,并返回步骤B2;以及
    B5) 所述应用程序从所述当前遍历下标对应的字符开始,从所述解析出的统一资源定位符字符串中截取与所述有效字符串长度相等的字符串,判断截取的字符串是否与所述有效字符串相同,如果不同,则返回步骤B4;如果相同,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,执行步骤S6。
  5. 如权利要求3所述的方法,其特征在于,所述步骤A2具体包括:
    C1) 所述应用程序按照所述读取到的链接字符串中的通配符,将所述读取到的链接字符串拆分为多个子字符串;
    C2) 所述应用程序从拆分得到的子字符串中选取一个未被处理过的子字符串;
    C3) 所述应用程序判断选取的子字符串是否包含在所述解析出的统一资源定位符字符串中,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,执行步骤S6;否则,将所述选取的子字符串标记为已被处理过,并执行步骤 C4;以及
    C4) 所述应用程序判断所述拆分得到的子字符串是否均被处理过,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,执行步骤A3;否则,返回步骤C2。
  6. 如权利要求1所述的方法,其特征在于,所述应用程序生成伪装响应数据,将所述伪装响应数据返回给所述***组件,具体为:
    所述应用程序根据本地资源文件生成一个伪装的响应句柄,将所述响应句柄作为所述伪装响应数据返回给所述***组件,所述响应句柄用于伪装所述网站服务器返回的响应数据,所述响应句柄包括头域、内容和缓存方式信息;
    所述应用程序通过所述***组件对所述伪装响应数据进行显示处理,具体为:
    所述应用程序通过加载所述***组件,显示与所述伪装响应数据对应的本地资源文件。
  7. 如权利要求6所述的方法,其特征在于,所述应用程序根据本地资源文件生成一个伪装的响应句柄,具体为:
    所述应用程序获取与所述解析出的统一资源定位符字符串对应的资源文件类型,根据所述资源文件类型,选择对应的本地资源文件,根据所述本地资源文件生成一个伪装的响应句柄。
  8. 如权利要求1所述的方法,其特征在于,所述步骤S7具体包括:
    当所述应用程序判断出本地缓存中没有存储与所述解析出的统一资源定位符字符串对应的资源文件时,所述应用程序向所述网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件;
    所述步骤S7之前,还包括:
    所述应用程序判断所述本地缓存中是否存储有与所述解析出的统一资源定位符字符串对应的资源文件。
  9. 如权利要求8所述的方法,其特征在于,所述应用程序判断所述本地缓存中是否存储有与所述解析出的统一资源定位符字符串对应的资源文件之后,还包括:当所述应用程序判断出本地缓存中存储有与所述解析出的统一资源定位符字符串对应的资源文件时,所述应用程序将所述本地缓存中与所述解析出的统一资源定位符字符串对应的资源文件发送给所述***组件,通过所述***组件显示所述资源文件,并返回步骤S3。
  10. 如权利要求1所述的方法,其特征在于,所述网站服务器返回的响应消息为响应数据,所述响应数据包含资源类型、资源大小、资源名称和资源数据;
    所述应用程序接收所述网站服务器返回的响应数据,将所述响应数据发送给所述***组件之后,还包括:
    所述应用程序通过所述***组件,显示与所述响应数据对应的资源文件。
  11. 一种iOS设备,包括应用程序和***组件,其特征在于,所述应用程序包括:
    初始化模块,用于在所述应用程序启动时,创建统一资源定位符缓存类的子类对象,将所述子类对象指定为统一资源定位符缓存对象,所述统一资源定位符缓存对象为所述***组件发起网络请求时访问的对象;
    请求模块,用于获取用户输入的超文本传输协议地址,根据所述超文本传输协议地址生成第一请求消息,将所述第一请求消息发送给所述***组件;
    监听模块,用于通过所述初始化模块创建的所述子类对象,监听所述***组件发起的网络请求;
    解析模块,用于在所述监听模块监听到所述***组件发起的网络请求时,从所述***组件获取第二请求消息,对所述第二请求消息进行解析,得到所述第二请求消息所包含的统一资源定位符字符串;
    匹配模块,用于使用链接字符串对所述解析模块解析出的统一资源定位符字符串进行匹配;
    伪装模块,用于在所述匹配模块匹配成功时,生成伪装响应数据,将所述伪装响应数据返回给所述***组件,通过所述***组件对所述伪装响应数据进行显示处理;以及
    第一响应模块,用于在所述匹配模块匹配失败时,向网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件。
  12. 如权利要求11所述的iOS设备,其特征在于,所述请求模块,具体用于获取用户输入的超文本传输协议地址,将所述超文本传输协议地址作为所述第一请求消息中的统一资源定位符字符串,生成所述第一请求消息,根据所述第一请求消息调用所述***组件中的方法,向所述网站服务器发起网络请求,所述第一请求消息包括统一资源定位符字符串、缓存方式信息和超时时间。
  13. 如权利要求11所述的iOS设备,其特征在于,所述匹配模块,具体包括读取子模块、匹配子模块和判断子模块,其中,
    所述读取子模块,用于从预置的链接匹配文件的起始位置开始,读取一行链接字符串,将当前位置设置为读取到的链接字符串的末尾;在被所述判断子模块触发时,自当前位置开始,从所述链接匹配文件中读取一行链接字符串,将当前位置更新为读取到的链接字符串的末尾;
    所述匹配子模块,用于对所述读取子模块读取到的链接字符串和所述解析模块解析出的统一资源定位符字符串进行匹配,如果所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,则触发所述伪装模块;如果所述读取到的链接字符串和所述解析出的统一资源定位符字符串匹配失败,则触发所述判断子模块;以及
    所述判断子模块,用于判断当前位置是否为所述链接匹配文件的结束位置,如果是,则触发所述第一响应模块;否则,触发所述读取子模块。
  14. 如权利要求13所述的iOS设备,其特征在于,所述匹配子模块,具体用于执行以下操作:
    B1) 对所述读取到的链接字符串进行解析,得到有效字符串,提取所述有效字符串的首字符,并对当前遍历下标进行初始化;
    B2) 根据所述当前遍历下标,从所述解析出的统一资源定位符字符串中提取对应的字符,判断提取到的字符是否为结束符,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,触发所述判断子模块;否则,执行步骤B3;
    B3) 判断所述提取到的字符是否与所述有效字符串的首字符相同,如果是,则执行步骤B5;否则,执行步骤B4;
    B4) 对所述当前遍历下标进行更新,并返回步骤B2;以及
    B5) 从所述当前遍历下标对应的字符开始,从所述解析出的统一资源定位符字符串中截取与所述有效字符串长度相等的字符串,判断截取的字符串是否与所述有效字符串相同,如果不同,则返回步骤B4;如果相同,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,触发所述伪装模块。
  15. 如权利要求13所述的iOS设备,其特征在于,所述匹配子模块,具体用于执行以下操作:
    C1) 按照所述读取到的链接字符串中的通配符,将所述读取到的链接字符串拆分为多个子字符串;
    C2) 从拆分得到的子字符串中选取一个未被处理过的子字符串;
    C3) 判断选取的子字符串是否包含在所述解析出的统一资源定位符字符串中,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配成功,触发所述伪装模块;否则,将所述选取的子字符串标记为已被处理过,并执行步骤C4;以及
    C4) 判断根据所述拆分得到的子字符串是否均被处理过,如果是,则确定所述读取到的链接字符串与所述解析出的统一资源定位符字符串匹配失败,触发所述判断子模块;否则,返回步骤C2。
  16. 如权利要求11所述的iOS设备,其特征在于,所述伪装模块包括:
    生成子模块,用于在所述匹配模块匹配成功时,根据本地资源文件生成一个伪装的响应句柄,所述响应句柄用于伪装所述网站服务器返回的响应数据,所述响应句柄包括头域、内容和缓存方式信息;
    发送子模块,用于将所述生成子模块生成的所述响应句柄作为所述伪装响应数据返回给所述***组件;
    显示子模块,用于通过加载所述***组件,显示与所述伪装响应数据对应的本地资源文件。
  17. 如权利要求16所述的iOS设备,其特征在于,所述生成子模块,具体用于获取与所述解析出的统一资源定位符字符串对应的资源文件类型,根据所述资源文件类型,选择对应的本地资源文件,根据所述本地资源文件生成一个伪装的响应句柄。
  18. 如权利要求11所述的iOS设备,其特征在于,还包括:
    判断模块,用于在所述匹配模块匹配失败时,判断本地缓存中是否存储有与所述解析出的统一资源定位符字符串对应的资源文件;
    所述第一响应模块,具体用于在所述判断模块判断出所述本地缓存中没有存储与所述解析出的统一资源定位符字符串对应的资源文件时,向所述网站服务器发送所述第二请求消息,接收所述网站服务器返回的响应消息,将所述响应消息发送给所述***组件。
  19. 如权利要求18所述的iOS设备,其特征在于,还包括:
    第二响应模块,用于在所述判断模块判断出所述本地缓存中存储有与所述解析出的统一资源定位符字符串对应的资源文件时,将所述本地缓存中与所述解析出的统一资源定位符字符串对应的资源文件发送给所述***组件,通过所述***组件显示所述资源文件。
  20. 如权利要求11所述的iOS设备,其特征在于,所述网站服务器返回的响应消息为响应数据,所述响应数据包含资源类型、资源大小、资源名称和资源数据;所述第一响应模块,还用于通过所述***组件,显示与所述响应数据对应的资源文件。
PCT/CN2014/080931 2013-08-06 2014-06-27 一种基于iOS设备的网页拦截方法和设备 WO2015018243A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/902,864 US9967314B2 (en) 2013-08-06 2014-06-27 IOS device based webpage blocking method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310338264.3A CN103366019B (zh) 2013-08-06 2013-08-06 一种基于iOS设备的网页拦截方法和设备
CN201310338264.3 2013-08-06

Publications (1)

Publication Number Publication Date
WO2015018243A1 true WO2015018243A1 (zh) 2015-02-12

Family

ID=49367360

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080931 WO2015018243A1 (zh) 2013-08-06 2014-06-27 一种基于iOS设备的网页拦截方法和设备

Country Status (3)

Country Link
US (1) US9967314B2 (zh)
CN (1) CN103366019B (zh)
WO (1) WO2015018243A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684114A (zh) * 2019-01-02 2019-04-26 深圳乐信软件技术有限公司 基于iOS***的消息分发方法、装置、终端和介质
CN112000313A (zh) * 2020-08-03 2020-11-27 北京达佳互联信息技术有限公司 请求响应方法、装置、设备及存储介质

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103366019B (zh) * 2013-08-06 2016-09-28 飞天诚信科技股份有限公司 一种基于iOS设备的网页拦截方法和设备
CN104572777B (zh) * 2013-10-28 2019-05-14 腾讯科技(深圳)有限公司 基于UIWebView组件的网页加载方法及装置
CN103605690A (zh) * 2013-11-04 2014-02-26 北京奇虎科技有限公司 一种即时通信中识别广告消息的装置和方法
CN103593466B (zh) * 2013-11-26 2017-08-04 优视科技有限公司 网页加载方法及客户端和服务器
CN104113780A (zh) * 2014-06-25 2014-10-22 小米科技有限责任公司 广告处理方法及装置
CN105808990B (zh) * 2016-02-23 2019-01-18 平安科技(深圳)有限公司 基于ios***控制url访问的方法和装置
CN106528148A (zh) * 2016-11-04 2017-03-22 广东欧珀移动通信有限公司 界面跳转方法、界面跳转***、及终端设备
CN109446449B (zh) * 2018-10-09 2022-05-10 南京尚网网络科技有限公司 一种预先刷新资讯页面内容的方法及设备
CN110347949A (zh) * 2019-06-20 2019-10-18 中信百信银行股份有限公司 网页加载方法、装置、电子设备及计算机可读存储介质
CN110417919B (zh) * 2019-08-29 2021-10-29 网宿科技股份有限公司 一种流量劫持方法及装置
CN110716963B (zh) * 2019-09-09 2023-09-01 平安证券股份有限公司 提供自适应配置的用户数据的方法及相关设备
CN112948727B (zh) * 2021-03-30 2024-05-14 平安科技(深圳)有限公司 基于WebView的数据注入方法、装置、设备及存储介质
CN114845168B (zh) * 2022-05-07 2024-01-19 北斗星通智联科技有限责任公司 一种多媒体资源播放方法、装置、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470731A (zh) * 2007-12-26 2009-07-01 中国科学院自动化研究所 一种可个性化定制的网页过滤方法
US20100262904A1 (en) * 2009-04-14 2010-10-14 Chih-Hung Chou Method for Displaying a Plug-In Frame in a Web Browser, a Computer Readable Medium, and a Computer Program Product for Executing the Same
CN102789557A (zh) * 2011-05-18 2012-11-21 腾讯科技(深圳)有限公司 在网页中实现网页安全功能的数据处理***及方法
CN102982169A (zh) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 用于隔离网页插件的浏览器和方法
CN103366019A (zh) * 2013-08-06 2013-10-23 飞天诚信科技股份有限公司 一种基于iOS设备的网页拦截方法和设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983250A (zh) * 2005-12-14 2007-06-20 王凤仙 过滤和/或者区别显示网络搜索结果中的恶意网页链接
CN100565523C (zh) * 2007-04-05 2009-12-02 中国科学院自动化研究所 一种基于多分类器融合的敏感网页过滤方法及***
CN101561803A (zh) * 2008-04-14 2009-10-21 双扬科技股份有限公司 以手持通讯装置浏览网络信息的方法
CN101854335A (zh) * 2009-03-30 2010-10-06 华为技术有限公司 一种过滤的方法、***及网络设备
CN102331985B (zh) * 2010-07-12 2013-09-25 阿里巴巴集团控股有限公司 网页页面的分片嵌套缓存的处理方法和装置
CN102624703B (zh) * 2011-12-31 2015-01-21 华为数字技术(成都)有限公司 统一资源定位符url的过滤方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470731A (zh) * 2007-12-26 2009-07-01 中国科学院自动化研究所 一种可个性化定制的网页过滤方法
US20100262904A1 (en) * 2009-04-14 2010-10-14 Chih-Hung Chou Method for Displaying a Plug-In Frame in a Web Browser, a Computer Readable Medium, and a Computer Program Product for Executing the Same
CN102789557A (zh) * 2011-05-18 2012-11-21 腾讯科技(深圳)有限公司 在网页中实现网页安全功能的数据处理***及方法
CN102982169A (zh) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 用于隔离网页插件的浏览器和方法
CN103366019A (zh) * 2013-08-06 2013-10-23 飞天诚信科技股份有限公司 一种基于iOS设备的网页拦截方法和设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684114A (zh) * 2019-01-02 2019-04-26 深圳乐信软件技术有限公司 基于iOS***的消息分发方法、装置、终端和介质
CN112000313A (zh) * 2020-08-03 2020-11-27 北京达佳互联信息技术有限公司 请求响应方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US20160191606A1 (en) 2016-06-30
CN103366019B (zh) 2016-09-28
CN103366019A (zh) 2013-10-23
US9967314B2 (en) 2018-05-08

Similar Documents

Publication Publication Date Title
WO2015018243A1 (zh) 一种基于iOS设备的网页拦截方法和设备
WO2018076865A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2018076841A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2013159639A1 (zh) 显示微博话题的方法、终端、服务器、***及存储介质
WO2014008858A1 (zh) 实现跨域跳转的方法以及浏览器、域名服务器
WO2014051367A1 (en) User terminal apparatus, electronic device, and method for controlling the same
WO2015066995A1 (zh) 一种智能收藏与分享的方法及移动终端
WO2015103954A1 (en) Information sharing method, information sharing apparatus, and electronic device
WO2017067375A1 (zh) 一种视频背景设置方法及终端设备
WO2016101441A1 (zh) 一种进行文件同步的方法及***
WO2019019350A1 (zh) 开户页面的生成方法、装置、设备及计算机可读存储介质
WO2012124985A2 (en) Method and apparatus for synchronizing personal inforamtion
WO2016045160A1 (zh) 网页数据处理方法和装置
WO2018201774A1 (zh) 数据审批方法、装置、设备和计算机可读存储介质
WO2017148142A1 (zh) 桌面图标文件夹的名称切换方法、装置及电子设备
WO2018076863A1 (zh) 数据存储的方法、装置、存储介质、服务器及***
WO2020186775A1 (zh) 业务数据提供方法、装置、设备及计算机可读存储介质
WO2020052247A1 (zh) 网络资源批量加载方法、智能电视、存储介质及装置
WO2017185647A1 (zh) 基于SoftSIM的IMSI号码管理及呼叫方法、服务器及网络侧设备
WO2020062644A1 (zh) Json劫持漏洞的检测方法、装置、设备及存储介质
WO2018076873A1 (zh) 数据分享方法、装置、介质、电子设备及***
WO2020073615A1 (zh) 设备软件的升级方法、数据转化器及可读存储介质
WO2020114333A1 (zh) 基于视频的ar教育方法、智能电视、存储介质及设备
WO2018014594A1 (zh) 网络请求及响应的处理方法、装置、终端、服务器及存储介质
WO2017023049A1 (en) Electronic device and server related to rendering of web content and controlling method thereof

Legal Events

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

Ref document number: 14833938

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14902864

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14833938

Country of ref document: EP

Kind code of ref document: A1