CN111431767A - Multi-browser resource synchronization method and device, computer equipment and storage medium - Google Patents

Multi-browser resource synchronization method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111431767A
CN111431767A CN202010225019.1A CN202010225019A CN111431767A CN 111431767 A CN111431767 A CN 111431767A CN 202010225019 A CN202010225019 A CN 202010225019A CN 111431767 A CN111431767 A CN 111431767A
Authority
CN
China
Prior art keywords
browser
request
tested
access request
webpage access
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.)
Granted
Application number
CN202010225019.1A
Other languages
Chinese (zh)
Other versions
CN111431767B (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010225019.1A priority Critical patent/CN111431767B/en
Publication of CN111431767A publication Critical patent/CN111431767A/en
Application granted granted Critical
Publication of CN111431767B publication Critical patent/CN111431767B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • 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]

Abstract

The application relates to a method and a device for synchronizing resources of multiple browsers, computer equipment and a storage medium. Based on a testing technology, when a webpage compatibility test is carried out, by intercepting the access content of a webpage access request when the webpage access request sent to a browser server by a browser to be tested is received, determining the request type of the webpage access request and the type of the browser to be tested according to the access content of the webpage access request, and when the request type of the webpage access request is a dynamic resource request and the type of the browser to be tested is a slave browser, acquiring a corresponding dynamic resource from an associated container according to a uniform resource locator of the webpage access request; and feeding back the dynamic resources to the browser to be tested. When the slave browser acquires the dynamic resources, the corresponding dynamic resources are directly acquired from the associated container and fed back to the slave browser, so that the effects of synchronous display and synchronous operation of the browsers to be tested are achieved, and the testing efficiency is improved.

Description

Multi-browser resource synchronization method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for synchronizing multiple browser resources, a computer device, and a storage medium.
Background
With the rapid development of internet technology, various information of the internet is basically displayed to users in the form of web pages. Such as: html 5(html 5 is a language description way of constructing Web content) page.
Taking html5 page as an example, after html5 page is made, developers need to perform compatibility tests on mobile devices of different browsers, different resolutions, different kernels and different systems, and issue html5 page after the compatibility tests pass. In order to improve the efficiency of the compatibility test, a main browser and a plurality of auxiliary browsers can be preset, and a tester can test the compatibility of a plurality of browsers or a plurality of mobile devices to the html5 page at one time by operating the main browser.
In the current test mode, the operation of the master browser is monitored through a script inserted in the master browser, and according to the monitored operation, a self webdriver (test framework of a Web automation test tool) of the slave browser drives and controls a Web page element, so that the slave browser and the master browser perform the same operation. While the resources loaded by the browser or webview (Web automated testing tool) are usually other than static resources, such as: such as js, html, css, etc.; there are also dynamically loaded content, such as: and displaying the front-section webpage according to the data acquired from the background request, such as xml, json and the like. When the current webpage compatibility test mode is used for webpage compatibility test, the dynamic data acquired by each browser cannot be guaranteed to be completely the same, and finally the contents displayed on the equipment are different, so that each browser cannot achieve a synchronization effect, the effects of synchronous display and synchronous operation cannot be achieved in the webpage compatibility test process, and the efficiency of webpage compatibility test is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for synchronizing resources of multiple browsers, which improve efficiency of testing compatibility of web pages.
A method of multi-browser resource synchronization, the method comprising:
when a webpage access request sent to a browser server by a browser to be tested is received, intercepting request content of the webpage access request;
extracting keywords from the request content of the webpage access request, and determining the request type of the webpage access request;
when the request type of the webpage access request is a dynamic resource request, acquiring identification information of the browser to be tested from the request content;
determining the type of the browser to be tested according to the identification information;
when the type of the browser to be tested is a slave browser, acquiring dynamic resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resources acquired from a browser server by a master browser based on the uniform resource locator;
and feeding back the dynamic resources to the browser to be tested.
In one embodiment, the method further comprises:
when the type of the browser to be tested is a main browser, forwarding the webpage access request to the browser server;
receiving dynamic resources fed back by the browser server based on the webpage access request;
forwarding the dynamic resource to the browser to be tested;
and storing the uniform resource locator and the dynamic resource in the request content into an associated container in a key value pair mode.
In one embodiment, the method further comprises:
when the request type of the webpage access request is a static resource request, forwarding the webpage access request to a browser server;
receiving static resources fed back by the browser server based on the webpage access request;
and forwarding the static resource to the browser to be tested.
In one embodiment, the method further comprises:
when the request type of the webpage access request is a static resource request, acquiring the identification information of the browser to be tested;
determining the type of the browser to be tested according to the identification information;
when the type of the browser to be tested is a slave browser, obtaining static resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the static resources obtained by a master browser to a browser server based on the uniform resource locator;
and feeding back the static resources to the browser to be tested.
In one embodiment, the method further comprises:
when the type of the browser to be tested is a main browser, forwarding the webpage access request to the browser server;
receiving static resources fed back by the browser server based on the webpage access request;
forwarding the static resource to the browser to be tested;
and storing the uniform resource locator in the request content and the static resource into an associated container in a key value pair mode.
In one embodiment, after the step of intercepting the request content of the web page access request when receiving the web page access request sent by the browser to be tested to the browser server, the method further includes:
analyzing according to a uniform resource locator in the request content, and determining whether the uniform resource locator is accessed for the first time;
when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content;
and taking the identification information of the browser to be tested as a main browser verification identification.
In one embodiment, the step of determining the type of the browser to be tested according to the identification information includes:
comparing the identification information with a main browser verification identification;
when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser;
and when the identification information is different from the verification identification of the main browser, the type of the browser to be tested is the auxiliary browser.
A multi-browser resource synchronization apparatus, the apparatus comprising:
the request content intercepting module is used for intercepting the request content of the webpage access request when receiving the webpage access request sent to a browser server by a browser to be tested;
the request content analysis module is used for extracting keywords from the request content of the webpage access request and determining the request type of the webpage access request;
the identification information acquisition module is used for acquiring the identification information of the browser to be tested from the request content when the request type of the webpage access request is a dynamic resource request;
the browser type determining module is used for determining the type of the browser to be tested according to the identification information;
a first dynamic resource obtaining module, configured to, when the type of the browser to be tested is a slave browser, obtain, according to a uniform resource locator in the request content, a dynamic resource corresponding to the web page access request from an associated container, where the associated container is used to store the dynamic resource obtained by a master browser to the browser server based on the uniform resource locator;
and the dynamic resource feedback module is used for feeding back the dynamic resources to the browser to be tested.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
When a webpage compatibility test is carried out, intercepting the access content of a webpage access request when the webpage access request sent to a browser server by a browser to be tested is received, determining the request type of the webpage access request and the type of the browser to be tested according to the access content of the webpage access request, and when the request type of the webpage access request is a dynamic resource request and the type of the browser to be tested is a slave browser, acquiring corresponding dynamic resources from an associated container for storing the dynamic resources acquired from the browser server by a master browser according to a uniform resource locator of the webpage access request; and feeding back the dynamic resources to the browser to be tested. When the slave browser acquires the dynamic resources, the corresponding dynamic resources are directly acquired from the associated container and fed back to the slave browser, so that the dynamic resources acquired from the slave browser are consistent with the dynamic resources acquired from the master browser, the effects of synchronous display and synchronous operation of the browsers to be tested are achieved, and the testing efficiency is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a method for synchronizing resources of multiple browsers;
FIG. 2 is a flowchart illustrating a method for synchronizing resources of multiple browsers according to an embodiment;
FIG. 3 is an interaction diagram of a method for synchronizing resources of multiple browsers in an embodiment;
FIG. 4 is a block diagram of an embodiment of a multi-browser resource synchronization apparatus;
FIG. 5 is a block diagram of a multi-browser resource synchronization apparatus according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The multi-browser resource synchronization method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 communicates with the proxy server 104 via a network, and the proxy server 104 communicates with the browser server 106 via a network.
The proxy server 104 intercepts the request content of the web page access request when receiving the web page access request sent to the browser server 106 by the browser to be tested on the terminal 102; the proxy server 104 extracts keywords from the request content of the web page access request and determines the request type of the web page access request; when the request type of the webpage access request is a dynamic resource request, acquiring identification information of a browser to be tested from request content; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring dynamic resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resources acquired by a master browser to a browser server 106 based on the uniform resource locator; and feeding back the dynamic resources to the browser to be tested. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the proxy server 104 or the browser server 106 may be implemented by an independent server or a server cluster composed of a plurality of servers, and the proxy server 104 is an intermediate proxy mechanism between a personal network and an Internet service provider and is responsible for forwarding legal network information and controlling and registering forwarding.
In one embodiment, as shown in fig. 2, a method for synchronizing resources of multiple browsers is provided, which is described by taking the method as an example applied to the proxy server in fig. 1, and includes the following steps:
step S220, when receiving a web page access request sent by the browser to be tested to the browser server, intercepting request content of the web page access request.
The browser server is a Web server, is a website server for providing online information browsing service, is a program of a certain type of computer residing on the Internet, can provide documents for the Web clients such as the browser and the like, can place website files for browsing all over the world, can place data files for downloading all over the world, and can make a webpage access request to the webpage to be tested, the webpage to be tested is a webpage which is completely made by a developer and does not pass a compatibility test, is a pure text file containing an HTM L label, is in a hypertext markup language format, and can be an html5 page and the like.
When a web page compatibility test is carried out, if a web page compatibility test is carried out on mobile devices of different resolutions, different kernels and different systems, web page access requests sent to a browser server by browsers of the mobile devices of different resolutions, different kernels and different systems can be respectively passed, the browsers of the mobile devices of different resolutions, different kernels and different systems are browsers to be tested, wherein the browsers of the mobile devices of different resolutions, different kernels and different systems can be the same type of browser (such as an IE browser which is used all) or different types of browsers (such as some mobile devices are IE browsers and some mobile devices are QQ browsers); if the compatibility test of different types of browsers to webpages is performed, webpage access requests sent to the browser server through different types of browsers can be respectively transmitted, the browsers of the different types are to-be-tested browsers, the browsers of the different types can be installed on the same terminal, and the browsers of the different types can also be installed on different terminals respectively.
Step S240, performing keyword extraction on the request content of the web page access request, and determining the request type of the web page access request.
Wherein, the request content is information contained in the web page access request, and the information contains keywords for identifying the request type of the web page access request, such as: static resources html or html and the like, dynamic resources jsp, asp/. aspx, php and the like, and the request type of the webpage access request is determined by extracting the keyword identification. The request types include a static resource request and a dynamic resource request, the static resource request refers to a resource request that the resource content does not change whenever the resource content is acquired, such as: static resource contents such as javascript files, html files, css files and the like. The dynamic resource request refers to a resource request in which the resource content changes regularly or randomly when the resource content is acquired, for example, dynamic resource content such as an xml file, a json file, and the like, and also refers to an advertisement in a page and the same website. The resource content may be determined according to resource information in the request content of the web page access request, such as: if the resource content is only html files, the request type is a static resource request; and if the resource content comprises a json file, the request type is a dynamic resource request.
Step S260, when the request type of the web page access request is a dynamic resource request, obtaining the identification information of the browser to be tested from the request content.
The identification information includes an IP address and a Protocol port, where the IP address refers to an abbreviation of Internet Protocol (Internet Protocol) and is a network layer Protocol in a TCP/IP system. The protocol port is a port (protocol port, which is a port that we often say) that a terminal local operating system allocates a protocol port to a process having a demand, and each protocol port is identified by a positive integer, such as: 80, 139, 445, etc.
Step S280, determining the type of the browser to be tested according to the identification information.
The identification information comprises an IP address and a protocol port, and whether the browser sending the webpage access request is a master browser or a slave browser to be tested can be distinguished through the IP address and the protocol port. The types of the browsers to be tested comprise a main browser and a slave browser, the main browser is a browser operated by a tester in the browsers to be tested, and the slave browser is a browser which is associated with the main browser in the browsers to be tested and can automatically operate synchronously with the main browser according to the operation of the main browser.
And step S300, when the type of the browser to be tested is the slave browser, acquiring the dynamic resource corresponding to the webpage access request from the associated container according to the uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resource acquired by the master browser to the browser server based on the uniform resource locator.
When a webpage access request of a main browser is received, the webpage access request is forwarded to a browser server, when a dynamic resource fed back by the browser server according to the webpage access request is obtained, the dynamic resource and the uniform resource locator are stored in the associated container in an associated mode according to the uniform resource locator in the webpage access request, and when the dynamic resource is also the uniform resource locator in the webpage access request of the browser, the dynamic resource corresponding to the uniform resource locator is directly obtained from the associated container.
Step S320, feeding back the dynamic resource to the browser to be tested.
Dynamic resource refers to response data containing dynamic resource content. When the webpage access request is sent from the browser, the dynamic resource corresponding to the webpage access request is directly obtained from the associated container and fed back to the browser to be tested for display, the dynamic resource is not required to be obtained from the browser server, but the dynamic resource obtained from the main browser is sent to the auxiliary browser, so that the same resource is obtained from the auxiliary browser and the main browser.
When a webpage compatibility test is carried out, intercepting the access content of a webpage access request when the webpage access request sent to a browser server by a browser to be tested is received, determining the request type of the webpage access request and the type of the browser to be tested according to the access content of the webpage access request, and when the request type of the webpage access request is a dynamic resource request and the type of the browser to be tested is a slave browser, acquiring a corresponding dynamic resource from an associated container for storing the dynamic resource acquired from the browser server by a master browser according to a uniform resource locator of the webpage access request; and feeding back the dynamic resources to the browser to be tested. When the slave browser acquires the dynamic resources, the corresponding dynamic resources are directly acquired from the associated container and fed back to the slave browser, so that the dynamic resources acquired from the slave browser are consistent with the dynamic resources acquired from the master browser, the effects of synchronous display and synchronous operation of the browsers to be tested are achieved, and the testing efficiency is improved.
In one embodiment, the multi-browser resource synchronization method further comprises: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving dynamic resources fed back by a browser server based on a webpage access request; forwarding the dynamic resource to a browser to be tested; and storing the uniform resource locator and the dynamic resource in the request content into the associated container in a key value pair mode.
Wherein a key-value pair is each key followed by a corresponding value. The value is a dynamic resource and the key is a uniform resource locator. The unique dynamic resource may be determined by a uniform resource locator. When the main browser sends the webpage access request of the same uniform resource locator again, the values in the corresponding key value pairs are updated, such as: the method comprises the steps that a main browser sends a webpage access request carrying a uniform resource locator A for the first time, the webpage access request is forwarded to a browser server to obtain a dynamic resource a, the uniform resource locator A and the dynamic resource a are stored in an associated container in a key value pair mode, when the main browser sends the webpage access request carrying the uniform resource locator A for the second time, the webpage access request is forwarded to the browser server to obtain a dynamic resource b, and the dynamic resource a corresponding to the uniform resource locator A in the associated container is replaced by the dynamic resource b. The dynamic resources are obtained from the browser server through the webpage access request of the main browser, and the dynamic resources obtained from the main browser are directly obtained from the associated container of the proxy server from the webpage access request of the browser, so that the resources obtained from all the browsers are ensured to be the same, the page content displayed by each browser is enabled, and the problem that the displayed page content of the slave browser cannot be synchronized due to different displayed page contents of the slave browser when a user operates the main browser is solved.
In one embodiment, the multi-browser resource synchronization method further comprises: when the request type of the webpage access request is a static resource request, forwarding the webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; and forwarding the static resource to the browser to be tested.
The static resource request refers to a resource request that resource content does not change whenever the resource content is acquired, such as: the webpage access request only comprises static resource content of any one of javascript files, html files and css files. Static resources refer to response data that contains static resource content. Forwarding the webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; and forwarding the static resource to the browser to be tested. When the webpage access request is a static resource request, because the static resources obtained are the same no matter where and where the dynamic resources are accessed, the webpage access request can be forwarded to the browser server without distinguishing a master browser and a slave browser, the static resources fed back by the browser server based on the webpage access request are received, the static resources are forwarded to the browser to be tested, the operation intensity of the proxy server can be reduced, and the operation efficiency is improved.
In one embodiment, the multi-browser resource synchronization method further comprises: when the request type of the webpage access request is a static resource request, acquiring identification information of a browser to be tested; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring static resources corresponding to a webpage access request from an associated container according to a uniform resource locator in request content, wherein the associated container is used for storing the static resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the static resources to the browser to be tested.
Wherein the identification information comprises an IP address and a protocol port. When the request type of the webpage access request is a static resource request, acquiring identification information of the browser to be tested to determine that the type of the browser to be tested is a slave browser, acquiring a static resource corresponding to the webpage access request from an associated container storing the static resource acquired by the browser server based on the uniform resource locator according to the uniform resource locator in the request content, and feeding back the static resource to the browser to be tested. When the request type of the webpage access request is a static resource request, the static resource is obtained from the browser server through the webpage access request of the main browser, and the static resource obtained by the main browser is directly obtained from the associated container of the proxy server from the webpage access request of the browser, so that the resource obtaining efficiency can be improved, and the cost of data transmission can be saved.
In one embodiment, the multi-browser resource synchronization method further comprises: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; forwarding the static resource to a browser to be tested; and storing the uniform resource locator and the static resource in the request content into the associated container in a key value pair mode.
Wherein a key-value pair is each key followed by a corresponding value. The value is a static resource and the key is a uniform resource locator. Unique static resources may be determined by a uniform resource locator. When the main browser sends the webpage access request of the same uniform resource locator again, the values in the corresponding key value pairs are updated, such as: the method comprises the steps that a main browser sends a webpage access request carrying a uniform resource locator C for the first time, the webpage access request is forwarded to a browser server to obtain a static resource C from the browser server, the uniform resource locator C and the static resource C are stored into an associated container in a key value pair mode, when the main browser sends the webpage access request carrying the uniform resource locator C for the second time, the webpage access request is forwarded to the browser server to obtain a static resource d from the browser server, and the static resource C corresponding to the uniform resource locator C in the associated container is replaced by the static resource d. When the request type of the webpage access request is a static resource request, the static resource is obtained from the browser server through the webpage access request of the main browser, and the static resource obtained by the main browser is directly obtained from the associated container of the proxy server from the webpage access request of the browser, so that the resource obtaining efficiency can be improved, and the cost of data transmission can be saved.
In one embodiment, after the step of intercepting the request content of the web page access request when receiving the web page access request sent by the browser to be tested to the browser server, the method further comprises the following steps:
analyzing according to the uniform resource locator in the request content, and determining whether the uniform resource locator is accessed for the first time; when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content; and taking the identification information of the browser to be tested as a main browser verification identification.
In the process of performing the webpage compatibility test, analyzing according to the uniform resource locator in the request content, judging whether the webpage access request containing the uniform resource locator is received for the first time, if the webpage access request containing the uniform resource locator is received for the first time, determining that the webpage access request is sent by a tester operating a browser, and using the browser sending the webpage access request as a main browser. And extracting the IP address and the protocol port of the browser to be tested from the request content of the webpage access request, storing the IP address and the protocol port, and setting the browser to be tested corresponding to the IP address and the protocol port as a main browser. And judging whether the browser is the main browser identification or not by using the stored IP address and the protocol port.
In one embodiment, the step of determining the type of the browser to be tested according to the identification information includes: comparing the identification information with the main browser verification identification; when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser; and when the identification information is not the same as the verification identification of the main browser, the type of the browser to be tested is the slave browser.
The identification information is an IP address and a protocol port in the currently received webpage access request. The main browser verifies that the url is the IP address and protocol port that was obtained from the requested content when it was first accessed. And comparing the identification information with the main browser verification identification, wherein when the identification information is the same as the main browser verification identification, the type of the browser to be tested is the main browser, and when the identification information is different from the main browser verification identification, the type of the browser to be tested is the slave browser. Through the judgment of the main browser and the slave browser, different resource obtaining modes can be provided for different types of browsers, so that the resources obtained from the browsers are consistent with the resources obtained from the main browser.
In one embodiment, as shown in fig. 3, the embodiment relates to a browser to be tested, a proxy server, a container server and a browser server, where the browser to be tested includes one master browser and more than one slave browsers, the proxy server and the container server are deployed together and are equivalent to an auxiliary device of the proxy server, the browser to be tested is installed on a terminal, and data sent or received by the browser to be tested is sent or received by the terminal. This is exemplified in connection with a specific multi-browser resource synchronization process.
The proxy server is used for distinguishing a static resource request and a dynamic resource request sent by the browser to be tested according to the request content in the webpage access request when the webpage access request sent by the browser to be tested is received, and setting the proxy server to directly forward the static resource request to the browser server and return a response to the browser.
When the proxy server receives a dynamic resource request for the first time, the IP address and the protocol port of the request are recorded, the browser requested by the IP address and the protocol port is set as a main browser, then the proxy server records UR L (uniform resource locator) and corresponding response data (dynamic resources) of each dynamic resource request of the main browser, the UR L and the corresponding response data are stored in a container server in a key-value pair mode (key is UR L and value is response data), the data are returned to the browser to be tested which is requested by the dynamic resource request for the first time, the proxy server compares the recorded response data of the main browser, namely the value, with the UR L of the main browser, and returns the recorded response data of the main browser to the slave browser (directly obtains the response data from the proxy server according to UR L and returns the response data to a requester), the response data obtained by all browsers are guaranteed to be the same as the return data received by the main browser, and if the main browser sends the same response data to the proxy server again, the corresponding response data are guaranteed to be updated when the response data of the corresponding UR L are updated.
The dynamic requests are from the same IP address, UR L records the same, different IP addresses are replaced, finally, the data obtained when multiple IP addresses request the same UR L are the same, and meanwhile, the data are guaranteed to be updated in real time when different IP addresses repeatedly request the same UR L, so that static and dynamic resources accessed by a main browser and a slave browser are the same, and the displayed page content is the same.
According to the multi-browser resource synchronization method, when the webpage compatibility test is carried out, the corresponding dynamic resources are directly obtained from the associated container and fed back to the slave browser when the slave browser obtains the dynamic resources, so that the dynamic resources obtained from the slave browser are consistent with the dynamic resources obtained from the master browser, the effects of synchronous display and synchronous operation of the browsers to be tested are achieved, and the test efficiency is improved. When the request type of the webpage access request is a static resource request, the static resource is obtained from the browser server through the webpage access request of the main browser, and the static resource obtained by the main browser is directly obtained from the associated container of the proxy server from the webpage access request of the browser, so that the resource obtaining efficiency can be improved, and the cost of data transmission can be saved.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a multi-browser resource synchronization apparatus, including: a request content intercepting module 310, a request content analyzing module 320, an identification information obtaining module 330, a browser type determining module 340, a first dynamic resource obtaining module 350 and a dynamic resource feedback module 360, wherein:
a request content intercepting module 310, configured to intercept request content of a web page access request sent by a browser to be tested to a browser server when the web page access request is received;
a request content analysis module 320, configured to perform keyword extraction on the request content of the web page access request, and determine a request type of the web page access request;
an identification information obtaining module 330, configured to obtain, when a request type of the web page access request is a dynamic resource request, identification information of the browser to be tested from the request content;
the browser type determining module 340 is configured to determine the type of the browser to be tested according to the identification information;
a first dynamic resource obtaining module 350, configured to, when the type of the browser to be tested is a slave browser, obtain, according to a uniform resource locator in the request content, a dynamic resource corresponding to the web page access request from an associated container, where the associated container is used to store the dynamic resource obtained by a master browser to the browser server based on the uniform resource locator;
and the dynamic resource feedback module 360 is configured to feed back the dynamic resource to the browser to be tested.
In one embodiment, referring to fig. 5, the multi-browser resource synchronization apparatus further includes a second dynamic resource obtaining module 370: the browser server is used for forwarding a webpage access request to the browser server when the type of the browser to be tested is a main browser; receiving dynamic resources fed back by a browser server based on a webpage access request; forwarding the dynamic resource to a browser to be tested; and storing the uniform resource locator and the dynamic resource in the request content into the associated container in a key value pair mode.
In one embodiment, the multi-browser resource synchronization apparatus further includes a first static resource obtaining module 380: the browser server is used for forwarding the webpage access request to the browser server when the request type of the webpage access request is a static resource request; receiving static resources fed back by a browser server based on a webpage access request; and forwarding the static resource to the browser to be tested.
In one embodiment, the multi-browser resource synchronization apparatus further comprises a second static resource obtaining module 390: the method comprises the steps of obtaining identification information of a browser to be tested when the request type of a webpage access request is a static resource request; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring static resources corresponding to a webpage access request from an associated container according to a uniform resource locator in request content, wherein the associated container is used for storing the static resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the static resources to the browser to be tested.
In one embodiment, the multi-browser resource synchronization apparatus further includes a third static resource obtaining module 400: the browser server is used for forwarding a webpage access request to the browser server when the type of the browser to be tested is a main browser; receiving static resources fed back by a browser server based on a webpage access request; forwarding the static resource to a browser to be tested; and storing the uniform resource locator and the static resource in the request content into the associated container in a key value pair mode.
In one embodiment, the multi-browser resource synchronization apparatus further comprises a main browser determining module 410: the system comprises a request content server, a request server and a server, wherein the request content server is used for receiving a request for a uniform resource locator; when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content; and taking the identification information of the browser to be tested as a main browser verification identification.
In one embodiment, the browser type determination module 340 is further configured to: comparing the identification information with the main browser verification identification; when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser; and when the identification information is not the same as the verification identification of the main browser, the type of the browser to be tested is the slave browser.
When the multi-browser resource synchronization device performs a webpage compatibility test, the proxy server intercepts the access content of a webpage access request when receiving the webpage access request sent to the browser server by a browser to be tested, determines the request type of the webpage access request and the type of the browser to be tested according to the access content of the webpage access request, and acquires corresponding dynamic resources from an associated container for storing the dynamic resources acquired from the browser server by a main browser according to a uniform resource locator of the webpage access request when the request type of the webpage access request is a dynamic resource request and the type of the browser to be tested is a slave browser; and feeding back the dynamic resources to the browser to be tested. When the slave browser acquires the dynamic resources, the corresponding dynamic resources are directly acquired from the associated container and fed back to the slave browser, so that the dynamic resources acquired from the slave browser are consistent with the dynamic resources acquired from the master browser, the effects of synchronous display and synchronous operation of the browsers to be tested are achieved, and the testing efficiency is improved.
For specific limitations of the multi-browser resource synchronization apparatus, reference may be made to the above limitations of the multi-browser resource synchronization method, which is not described herein again. The modules in the multi-browser resource synchronization device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for multi-browser resource synchronization.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program:
when a webpage access request sent to a browser server by a browser to be tested is received, intercepting request content of the webpage access request; extracting keywords from the request content of the webpage access request, and determining the request type of the webpage access request; when the request type of the webpage access request is a dynamic resource request, acquiring identification information of a browser to be tested from request content; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring dynamic resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the dynamic resources to the browser to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving dynamic resources fed back by a browser server based on a webpage access request; forwarding the dynamic resource to a browser to be tested; and storing the uniform resource locator and the dynamic resource in the request content into the associated container in a key value pair mode.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the request type of the webpage access request is a static resource request, forwarding the webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; and forwarding the static resource to the browser to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the request type of the webpage access request is a static resource request, acquiring identification information of a browser to be tested; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring static resources corresponding to a webpage access request from an associated container according to a uniform resource locator in request content, wherein the associated container is used for storing the static resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the static resources to the browser to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; forwarding the static resource to a browser to be tested; and storing the uniform resource locator and the static resource in the request content into the associated container in a key value pair mode.
In one embodiment, the processor, when executing the computer program, further performs the steps of: analyzing according to the uniform resource locator in the request content, and determining whether the uniform resource locator is accessed for the first time; when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content; and taking the identification information of the browser to be tested as a main browser verification identification.
In one embodiment, the processor, when executing the computer program, further performs the steps of: comparing the identification information with the main browser verification identification; when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser; and when the identification information is not the same as the verification identification of the main browser, the type of the browser to be tested is the slave browser.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
when a webpage access request sent to a browser server by a browser to be tested is received, intercepting request content of the webpage access request; extracting keywords from the request content of the webpage access request, and determining the request type of the webpage access request; when the request type of the webpage access request is a dynamic resource request, acquiring identification information of a browser to be tested from request content; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring dynamic resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the dynamic resources to the browser to be tested.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving dynamic resources fed back by a browser server based on a webpage access request; forwarding the dynamic resource to a browser to be tested; and storing the uniform resource locator and the dynamic resource in the request content into the associated container in a key value pair mode.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the request type of the webpage access request is a static resource request, forwarding the webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; and forwarding the static resource to the browser to be tested.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the request type of the webpage access request is a static resource request, acquiring identification information of a browser to be tested; determining the type of the browser to be tested according to the identification information; when the type of the browser to be tested is a slave browser, acquiring static resources corresponding to a webpage access request from an associated container according to a uniform resource locator in request content, wherein the associated container is used for storing the static resources acquired by a master browser to a browser server based on the uniform resource locator; and feeding back the static resources to the browser to be tested.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the type of the browser to be tested is a main browser, forwarding a webpage access request to a browser server; receiving static resources fed back by a browser server based on a webpage access request; forwarding the static resource to a browser to be tested; and storing the uniform resource locator and the static resource in the request content into the associated container in a key value pair mode.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing according to the uniform resource locator in the request content, and determining whether the uniform resource locator is accessed for the first time; when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content; and taking the identification information of the browser to be tested as a main browser verification identification.
In one embodiment, the computer program when executed by the processor further performs the steps of: comparing the identification information with the main browser verification identification; when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser; and when the identification information is not the same as the verification identification of the main browser, the type of the browser to be tested is the slave browser.
It will be understood by those of ordinary skill in the art that all or a portion of the processes of the methods of the embodiments described above may be implemented by a computer program that may be stored on a non-volatile computer-readable storage medium, which when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of multi-browser resource synchronization, the method comprising:
when a webpage access request sent to a browser server by a browser to be tested is received, intercepting request content of the webpage access request;
extracting keywords from the request content of the webpage access request, and determining the request type of the webpage access request;
when the request type of the webpage access request is a dynamic resource request, acquiring identification information of the browser to be tested from the request content;
determining the type of the browser to be tested according to the identification information;
when the type of the browser to be tested is a slave browser, acquiring dynamic resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the dynamic resources acquired from a browser server by a master browser based on the uniform resource locator;
and feeding back the dynamic resources to the browser to be tested.
2. The method of claim 1, further comprising:
when the type of the browser to be tested is a main browser, forwarding the webpage access request to the browser server;
receiving dynamic resources fed back by the browser server based on the webpage access request;
forwarding the dynamic resource to the browser to be tested;
and storing the uniform resource locator and the dynamic resource in the request content into an associated container in a key value pair mode.
3. The method of claim 1, further comprising:
when the request type of the webpage access request is a static resource request, forwarding the webpage access request to a browser server;
receiving static resources fed back by the browser server based on the webpage access request;
and forwarding the static resource to the browser to be tested.
4. The method of claim 1, further comprising:
when the request type of the webpage access request is a static resource request, acquiring the identification information of the browser to be tested;
determining the type of the browser to be tested according to the identification information;
when the type of the browser to be tested is a slave browser, obtaining static resources corresponding to the webpage access request from an associated container according to a uniform resource locator in the request content, wherein the associated container is used for storing the static resources obtained by a master browser to a browser server based on the uniform resource locator;
and feeding back the static resources to the browser to be tested.
5. The method of claim 4, further comprising:
when the type of the browser to be tested is a main browser, forwarding the webpage access request to the browser server;
receiving static resources fed back by the browser server based on the webpage access request;
forwarding the static resource to the browser to be tested;
and storing the uniform resource locator in the request content and the static resource into an associated container in a key value pair mode.
6. The method of claim 1, after the step of intercepting the requested content of the web page access request when receiving the web page access request sent by the browser to be tested to the browser server, further comprising:
analyzing according to a uniform resource locator in the request content, and determining whether the uniform resource locator is accessed for the first time;
when the uniform resource locator is accessed for the first time, acquiring the identification information of the browser to be tested from the request content;
and taking the identification information of the browser to be tested as a main browser verification identification.
7. The method of claim 6, wherein the step of determining the type of the browser to be tested according to the identification information comprises:
comparing the identification information with the main browser verification identification;
when the identification information is the same as the verification identification of the main browser, the type of the browser to be tested is the main browser;
and when the identification information is different from the verification identification of the main browser, the type of the browser to be tested is a slave browser.
8. An apparatus for synchronizing multiple browser resources, the apparatus comprising:
the request content intercepting module is used for intercepting the request content of the webpage access request when receiving the webpage access request sent to a browser server by a browser to be tested;
the request content analysis module is used for extracting keywords from the request content of the webpage access request and determining the request type of the webpage access request;
the identification information acquisition module is used for acquiring the identification information of the browser to be tested from the request content when the request type of the webpage access request is a dynamic resource request;
the browser type determining module is used for determining the type of the browser to be tested according to the identification information;
a first dynamic resource obtaining module, configured to, when the type of the browser to be tested is a slave browser, obtain, according to a uniform resource locator in the request content, a dynamic resource corresponding to the web page access request from an associated container, where the associated container is used to store the dynamic resource obtained by a master browser to the browser server based on the uniform resource locator;
and the dynamic resource feedback module is used for feeding back the dynamic resources to the browser to be tested.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010225019.1A 2020-03-26 2020-03-26 Multi-browser resource synchronization method and device, computer equipment and storage medium Active CN111431767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010225019.1A CN111431767B (en) 2020-03-26 2020-03-26 Multi-browser resource synchronization method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010225019.1A CN111431767B (en) 2020-03-26 2020-03-26 Multi-browser resource synchronization method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111431767A true CN111431767A (en) 2020-07-17
CN111431767B CN111431767B (en) 2023-03-07

Family

ID=71548951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010225019.1A Active CN111431767B (en) 2020-03-26 2020-03-26 Multi-browser resource synchronization method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111431767B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016014A (en) * 2020-08-18 2020-12-01 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation method, webpage display device, webpage resource generation device, electronic equipment and medium
CN112261090A (en) * 2020-09-28 2021-01-22 成都长虹网络科技有限责任公司 Web data processing method and device, computer equipment and readable storage medium
CN113448835A (en) * 2020-09-25 2021-09-28 北京新氧科技有限公司 Static resource testing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078663A1 (en) * 2009-09-29 2011-03-31 International Business Machines Corporation Method and Apparatus for Cross-Browser Testing of a Web Application
CN104735112A (en) * 2013-12-23 2015-06-24 阿里巴巴集团控股有限公司 Resource file sending method and resource file caching method and device
CN109947637A (en) * 2017-12-21 2019-06-28 中国移动通信集团重庆有限公司 Webpage compatibility automated test method, device, equipment and medium
CN110287432A (en) * 2019-06-28 2019-09-27 北京金山安全软件有限公司 Network information processing method and device and electronic equipment
CN110737853A (en) * 2019-09-06 2020-01-31 中山市八喜电脑网络有限公司 method for synchronizing data of multi-platform display static pages and B2B system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078663A1 (en) * 2009-09-29 2011-03-31 International Business Machines Corporation Method and Apparatus for Cross-Browser Testing of a Web Application
CN104735112A (en) * 2013-12-23 2015-06-24 阿里巴巴集团控股有限公司 Resource file sending method and resource file caching method and device
CN109947637A (en) * 2017-12-21 2019-06-28 中国移动通信集团重庆有限公司 Webpage compatibility automated test method, device, equipment and medium
CN110287432A (en) * 2019-06-28 2019-09-27 北京金山安全软件有限公司 Network information processing method and device and electronic equipment
CN110737853A (en) * 2019-09-06 2020-01-31 中山市八喜电脑网络有限公司 method for synchronizing data of multi-platform display static pages and B2B system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016014A (en) * 2020-08-18 2020-12-01 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation method, webpage display device, webpage resource generation device, electronic equipment and medium
CN112016014B (en) * 2020-08-18 2023-12-26 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation device, electronic equipment and medium
CN113448835A (en) * 2020-09-25 2021-09-28 北京新氧科技有限公司 Static resource testing method and device, electronic equipment and storage medium
CN113448835B (en) * 2020-09-25 2023-10-20 北京新氧科技有限公司 Static resource testing method and device, electronic equipment and storage medium
CN112261090A (en) * 2020-09-28 2021-01-22 成都长虹网络科技有限责任公司 Web data processing method and device, computer equipment and readable storage medium
CN112261090B (en) * 2020-09-28 2022-06-17 成都长虹网络科技有限责任公司 Web data processing method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN111431767B (en) 2023-03-07

Similar Documents

Publication Publication Date Title
CN108304498B (en) Webpage data acquisition method and device, computer equipment and storage medium
US10523784B2 (en) Capturing and replaying application sessions using resource files
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
US9275018B2 (en) Techniques for analyzing web pages to determine font subsets
CN107528718B (en) Method, device and system for acquiring resources
US10877825B2 (en) System for offline object based storage and mocking of rest responses
CN110928767A (en) Webpage analysis method, device, equipment and storage medium
CN109190067B (en) Browser input box display method and device, computer equipment and storage medium
US10574773B2 (en) Method, device, terminal, server and storage medium of processing network request and response
CN111079048A (en) Page loading method and device
CN114237651A (en) Installation method and device of cloud native application, electronic equipment and medium
CN113742551A (en) Dynamic data capture method based on script and puppeteer
CN111597102A (en) Page performance testing method, terminal and storage medium
CN111783005B (en) Method, device and system for displaying web page, computer system and medium
CN111552643A (en) Multi-browser webpage access synchronization method and system
CN116126808A (en) Behavior log recording method, device, computer equipment and storage medium
CN114915565A (en) Method and system for debugging network
US8402367B1 (en) Smart reload pages
CN113704648A (en) Page data processing method, device, equipment and storage medium
US20150154182A1 (en) Data localization service made available by a web browser
CN109756393B (en) Information processing method, system, medium, and computing device
CN113297515A (en) Resource information processing method and device, computer storage medium and electronic equipment
CN112035339A (en) Page testing method, device and equipment

Legal Events

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