CN111159607A - Website compatibility setting method, device, equipment and medium - Google Patents

Website compatibility setting method, device, equipment and medium Download PDF

Info

Publication number
CN111159607A
CN111159607A CN201811318188.9A CN201811318188A CN111159607A CN 111159607 A CN111159607 A CN 111159607A CN 201811318188 A CN201811318188 A CN 201811318188A CN 111159607 A CN111159607 A CN 111159607A
Authority
CN
China
Prior art keywords
website
target
compatibility
display image
preset
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
CN201811318188.9A
Other languages
Chinese (zh)
Other versions
CN111159607B (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Chongqing Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811318188.9A priority Critical patent/CN111159607B/en
Publication of CN111159607A publication Critical patent/CN111159607A/en
Application granted granted Critical
Publication of CN111159607B publication Critical patent/CN111159607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for setting website compatibility. The method comprises the following steps: determining the acquired target website of the website to be accessed by the user as a website needing to analyze compatibility; acquiring a target source code of a target website and calling a browser of a user to enable the browser to respectively analyze the target source code in a compatible mode and a non-compatible mode to obtain a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode; and setting a compatibility view list of the user according to the first display image and the second display image. According to the method, the device, the equipment and the medium for setting the website compatibility, provided by the embodiment of the invention, the compatibility of the website is automatically set, and the problem of page confusion caused by misoperation of a user is avoided.

Description

Website compatibility setting method, device, equipment and medium
Technical Field
The present invention relates to the field of data services, and in particular, to a method, an apparatus, a device, and a medium for setting website compatibility.
Background
Current application systems are based on a browser/server architecture. A user browses information on a server through a browser, the browser downloads information such as HyperText markup language (HTML), scripts, animations (flash), pictures and the like from the server, and codes on the server are analyzed and rendered on the browser of the user according to certain standards so as to assemble an interface for the user to browse.
The current largest user amount is the IE browser, because the IE is the default browser of the windows operating system, the occupancy rate is over 70%. There are many versions of IE browsers currently in existence, of which the versions IE6 and IE7 do not support the World Wide Web Consortium (W3C) standard, and the versions IE8 and IE8 above support the W3C standard.
If the website backend is developed by adopting the non-W3C standard (namely, the terminal users supporting IE6 and IE 7), the user IE is upgraded to IE8 or above, and the user is required to configure and enable the compatibility view on the terminal and manually add the website to the compatibility view list, so that the website can be normally displayed.
At present, most users view website bulletin, operation manual, operation prompt and the like through using a website, and configure the operation according to the website prompt. However, information such as announcements and operation manuals is generally hidden in a position that is difficult to find. Or when the user logs in the website, the website calls the compatibility view list of the user through the JavaScript of the transliterated script language, and the website is added to the compatibility view list or deleted from the compatibility view list. However, this requires the user to first add the application to the trusted list in the IE.
That is, a user needs to have certain computer knowledge to correctly set the compatibility of a website, but most users do not know how to set the compatibility of the website, so that the user is easy to perform the following two kinds of misoperation on the setting of the compatibility:
a. for a system not developed according to the W3C standard, the terminal does not add a web address requiring setting of compatibility to the compatibility list in the IE8 version and above.
b. For a system developed according to the W3C standard, a terminal adds a web address, for which no compatibility needs to be set, to a compatibility list in the version of IE8 and above.
Due to misoperation of compatibility by the user, the display disorder of the user page occurs.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for setting website compatibility, which implement automatic setting of website compatibility and avoid a problem of page confusion caused by a user's misoperation.
According to an aspect of the embodiments of the present invention, a method for setting website compatibility is provided, including:
determining the acquired target website of the website to be accessed by the user as a website needing to analyze compatibility;
acquiring a target source code of a target website and calling a browser of a user to enable the browser to respectively analyze the target source code in a compatible mode and a non-compatible mode to obtain a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode;
and setting a compatibility view list of the user according to the first display image and the second display image.
According to an aspect of an embodiment of the present invention, there is provided a website compatibility setting apparatus, including:
the determining module is used for determining the acquired target website of the website to be accessed by the user as the website needing to analyze compatibility;
the image acquisition module is used for acquiring a target source code of a target website and calling a browser of a user so that the browser respectively analyzes the target source code in a compatible mode and a non-compatible mode to obtain a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode;
and the setting module is used for setting a compatibility view list of the user according to the first display image and the second display image.
According to an aspect of an embodiment of the present invention, there is provided a website compatibility setting apparatus, including: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the website compatibility setting method provided by embodiments of the present invention.
According to an aspect of an embodiment of the present invention, there is provided a computer storage medium having computer program instructions stored thereon, where the computer program instructions, when executed by a processor, implement the website compatibility setting method provided by the embodiment of the present invention.
According to the method, the device, the equipment and the medium for setting the website compatibility, firstly, a target website of a website to be accessed by a user is determined as a website needing to analyze compatibility, then, a target source code of the target website is obtained, a browser of the user is called, so that a first display image of the browser in a compatible mode and a second display image of the browser in an incompatible mode are obtained, and finally, a compatible view list of the user is set according to the first display image and the second display image, so that the compatibility of the target website is automatically set, and the problem of page confusion caused by misoperation of the user is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a website compatibility setting method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating a website compatibility setting apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating an exemplary hardware architecture of a website compatibility setting apparatus according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in 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 invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For a better understanding of the present invention, a website compatibility setting method, apparatus, device and medium according to embodiments of the present invention will be described in detail below with reference to the accompanying drawings, and it should be noted that these embodiments are not intended to limit the scope of the present disclosure.
Fig. 1 is a flowchart illustrating a website compatibility setting method according to an embodiment of the present invention. As shown in fig. 1, a website compatibility setting method 100 in the embodiment of the present invention includes the following steps:
s110, determining the acquired target website of the website to be accessed by the user as the website needing to analyze compatibility.
In the embodiment of the invention, after the user inputs the website address of the website to be accessed, the target website address of the website to be accessed by the user can be obtained from the website address access request of the user.
In the embodiment of the invention, the web addresses frequently visited by each user are different, so each user will decide the web address needing to analyze compatibility by himself. That is, for some websites, the user does not visit at all, and therefore the user does not analyze whether the website has compatibility problems or not and sets the compatibility of the website.
The website compatibility setting method provided by the embodiment of the invention can automatically judge whether a website is a website needing to analyze compatibility.
In an embodiment of the present invention, step S110 includes the steps of:
s1101, judging whether the extracted target website identification of the target website belongs to a preset website identification set.
In the embodiment of the invention, because the websites frequently visited by each user are different, in order to save resources, it is not necessary to perform compatibility analysis on all websites. Therefore, the website identification set which needs to analyze compatibility can be preset according to the requirements of the user. The website identification may be an IP of the website, a type of the website, or all the websites.
And after the target website is obtained, extracting a target website identification of the target website, and judging whether the target website identification belongs to a preset website identification set.
And S1102, if the target website identification belongs to a preset website identification set, determining the target website as a website needing to analyze compatibility.
As an example, all IP addresses in the range of "128.0.0.0-191.255.255.255" are included in the set of web site identifications. Assuming that the IP address of the extracted target website is "172.168.1.1", the target website belongs to the website identity set, i.e. the target website is a website that needs to analyze compatibility.
And if the target website identification does not belong to the preset website identification set, determining that the target website is a website which does not need to analyze compatibility, namely, processing a compatibility view list of the user is not needed. Wherein, the browser displays the website in the compatible view list of the user under the compatible view.
S120, acquiring a target source code of the target website and calling a browser of the user to enable the browser to respectively analyze the target source code in a compatible mode and a non-compatible mode to obtain a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode.
In the embodiment of the invention, when the target website input by the user is determined to be the website needing to analyze compatibility, the access of the user to the target website is simulated to obtain the source code of the target website. The method comprises the steps of firstly acquiring data which is stored on a local terminal of a user and used for identifying the identity of the user for a website which can be accessed only by identity information of the user, and simulating the access of the user to a target website by using the data to acquire a source code of the target website.
And after the target source code of the target website is obtained, calling the IE browser to enable the browser to respectively analyze the source code according to a compatible mode and an incompatible mode, and forming two complete IE browser display images in the two modes, namely a first display image of the IE browser in the compatible mode and a second display image of the IE browser in the incompatible mode.
After the first display image and the second display image are acquired, whether the website has compatibility problems can be analyzed according to the two display images. And if the target website has compatibility problems, automatically setting a compatibility view list of the user.
And S130, setting a compatibility view list of the user according to the first display image and the second display image.
In an embodiment of the present invention, step S130 includes the steps of:
and S1301, comparing the first display image with the second display image to obtain the image similarity of the first display image and the second display image.
In the embodiment of the invention, after the first display image and the second display image are obtained, the image similarity of the two display images is judged, so as to judge whether the website has the compatibility problem according to the image similarity, and further judge whether the compatibility of the website needs to be set.
S1302, determining that the image similarity is smaller than a preset similarity threshold, and performing dislocation analysis on the first display image and the second display image respectively to obtain a first dislocation amount of the first display image and a second dislocation amount of the first display image.
In the embodiment of the invention, whether the target website has the compatibility problem is judged according to the preset similarity threshold and the image similarity between the first display image and the second display image. If the image similarity is larger than or equal to the preset similarity threshold, the two pictures are considered to be the same, namely the target website is not enabled to be compatible, and the user can normally display the target website. That is, if the image similarity is greater than or equal to the preset similarity threshold, the user's compatibility view list is not processed.
If the image similarity is smaller than the preset similarity threshold, it is determined that the compatibility of the target website has a problem, and it is further determined whether the compatibility of the target website needs to be set. At this time, it is necessary to perform misalignment analysis on the single first display image and the single second display image, respectively, to determine whether there is an image misalignment in the first display image and the second display image.
The image dislocation is mainly analyzed whether the secondary module in the image has dislocation. When designing a website, the layout of the website needs to be laid out in a module. That is, a complete web page is composed of multiple secondary modules. The secondary module can be a news list, a navigation bar, a picture list, hot content, animation advertisements, picture links and other modules in a webpage.
Specifically, whether the first display image and the second display image have misalignment can be judged according to the frame of the secondary module and the color of the secondary module, and a first misalignment amount of the first display image and a second misalignment amount of the first display image are generated respectively.
And S1303, setting a compatible view list according to the first dislocation amount, the second dislocation amount and a preset dislocation threshold.
In the embodiment of the invention, after the first displacement amount of the first display image and the second displacement amount of the first display image are obtained, whether the compatibility of the target website needs to be set is further judged according to the size relationship among the first displacement amount, the second displacement amount and a preset displacement threshold value.
In an embodiment of the present invention, step S1303 includes the following steps:
and S210, if the first dislocation amount is greater than or equal to a preset dislocation threshold and the second dislocation amount is smaller than the dislocation threshold, deleting the target website or not processing the compatible view list from the compatible view list.
Specifically, if the first misalignment amount is greater than or equal to the preset misalignment threshold, it represents that there is misalignment in the first display image generated by the compatibility mode, indicating that the target website is developed by using the W3C standard. And if the user does not operate by mistake and adds the target website to the compatibility view list, not processing the compatibility list of the user. However, if the user mistakenly adds the target website to the compatibility view list, the target website should be deleted from the compatibility list at this time.
And S220, if the second dislocation amount is greater than or equal to the dislocation threshold and the first dislocation amount is smaller than the dislocation threshold, adding the target website in the compatible view list.
Specifically, if the second misalignment amount is greater than or equal to the misalignment threshold, it indicates that the second display image generated by the non-compatibility mode has misalignment, and indicates that the target website is developed by the non-W3C standard, and the website of the target website should be added to the compatibility view list of the user.
And S230, if the first dislocation amount and the second dislocation amount are both larger than or equal to the dislocation threshold, analyzing the target source code to obtain a target page element of the target source code and a target scripting language JS mark of the target source code.
In the embodiment of the present invention, if the first misalignment amount and the second misalignment amount are both greater than or equal to the misalignment threshold, it represents that both the first display image and the second display image have misalignment, and it is necessary to further determine whether it is necessary to set the compatibility of the target website.
And S240, setting a compatible view list according to the target page element, the target JS mark, a preset first feature library and a preset second feature library.
The first feature library comprises a page element and a JS mark of the source code under the first standard, and the second feature library comprises a page element and a JS mark of the source code under the second standard.
In an embodiment of the present invention, the first criterion is the W3C criterion, and the second criterion is the non-W3C criterion. Wherein the first feature library comprises a page element of source code under the W3C standard and a JS identification. The second feature library includes page elements and JS identifications of source code under the non-W3C standard.
Wherein the page elements of the source code include tags in the source code. The first library of features includes tags under the W3C standard, while the second library of features includes tags under the non-W3C standard.
For example, < Tr > </Tr > appears in pairs under the W3C standard, but not the W3C standard < Tr > appears in pairs. The page element < center > is typically the non-W3C standard, while the page element < output > is the W3C standard. Therefore, < Tr > </Tr > and < center > are included in the first feature library. The second feature library includes < Tr > and < output > that occur unpaired.
And the JS mark of the source code is the JS function in the source code. The JS mark of the source code under the W3C standard is a special JS function under the W3C standard. The JS mark of the source code under the non-W3C standard is a special JS function under the non-W3C standard.
In the embodiment of the invention, by analyzing the target source code of the target website word by word, the page elements of the web page source code except for the content, the occurrence times of the page elements, the JS mark and the JS mark can be obtained.
In an embodiment of the present invention, step S240 includes the steps of:
s2401, comparing the target page element and the target JS mark with the first feature library, determining a first JS mark meeting the first standard in the first page element and the target JS mark meeting the first standard in the target page element, comparing the target page element and the target JS mark with the second feature library, and determining a second JS mark meeting the second standard in the second page element and the target JS mark in the target page element.
In the embodiment of the invention, the analyzed target page elements and the analyzed target JS marks are compared with the first feature library one by one, so that the page elements which are the same as the page elements in the first feature library in the target page elements, namely the first page elements meeting the first standard can be obtained. And a JS mark in the target JS mark, which is the same as the JS mark in the first feature library, can be obtained, namely, a first JS mark which meets a first standard.
Similarly, the analyzed target page elements and the target JS identifier are compared with the second feature library one by one, and the page elements in the target page elements, which are the same as the page elements in the second feature library, can be obtained, that is, the second page elements meeting the second standard. And a JS identifier in the target JS identifier, which is the same as the JS identifier in the second feature library, that is, a second JS identifier meeting the second standard can be obtained.
S2402, obtaining a first matching value of the target source code and the first standard according to the obtained occurrence frequency and the first preset weight of the first page element and the occurrence frequency and the second preset weight of the first JS mark, and obtaining a second matching value of the target source code and the second standard according to the obtained occurrence frequency and the third preset weight of the second page element, the occurrence frequency and the fourth preset weight of the second JS mark.
As an example, first, each first page element is multiplied by a preset weight corresponding to the first page element, so as to obtain a product corresponding to each first page element. And then, multiplying each first JS mark by a preset weight corresponding to the first JS mark to obtain a product corresponding to each first JS mark. And finally, adding the product corresponding to each first page element and the product corresponding to each first JS mark to obtain a first matching value of the target source code and the W3C standard.
Similarly, a second matching value of the target source code and the non-W3C standard can be obtained according to the obtained number of occurrences of the second page element and the third preset weight, and the obtained number of occurrences of the second JS identifier and the fourth preset weight.
S2403, if the first matching value is greater than the second matching value, deleting the target website or not processing the compatibility view list from the compatibility view list.
In an embodiment of the present invention, if the first matching value is greater than the second matching value, the more the target website is matched with the W3C standard, and if the user does not perform any error operation to add the target website to the compatibility view list, the user's compatibility list is not processed. However, if the user mistakenly adds the target website to the compatibility view list, the target website should be deleted from the compatibility list at this time.
S2404, if the first matching value is less than or equal to the second matching value, adding a target website in the compatibility view list.
In an embodiment of the present invention, if the first matching value is less than or equal to the second matching value, the more the target website is matched with the non-W3C standard, the more the website of the target website should be added to the user's compatibility view list.
S250, if the first and second misalignment amounts are smaller than the misalignment threshold, it means that neither the first display image nor the second display image is misaligned, the target website is not enabled to be compatible, and the user can normally display the target website, that is, the user does not need to process the compatible view list of the user.
And after the compatibility view list of the user is set, sending prompt information to the user to prompt the user that the compatibility setting is effective after the browser is restarted.
The website compatibility setting method provided by the embodiment of the invention can automatically add the website to be set with compatibility to the compatibility view list of the user or delete the website which is added to the compatibility view list by mistake, thereby avoiding the problem of page confusion caused by misoperation of the user. In addition, manual processing of a user is not needed, the user experience is improved, and the workload of maintenance personnel is reduced.
Fig. 2 is a schematic structural diagram illustrating a website compatibility setting apparatus according to an embodiment of the present invention. As shown in fig. 2, the website compatibility setting apparatus 200 includes:
the determining module 210 is configured to determine that the obtained target website of the website to be accessed by the user is a website that needs to analyze compatibility.
The image obtaining module 220 is configured to obtain a target source code of a target website and call a browser of a user, so that the browser respectively analyzes the target source code in a compatible mode and in an incompatible mode, and a first display image of the browser in the compatible mode and a second display image of the browser in the incompatible mode are obtained.
A setting module 230, configured to set a compatibility view list of the user according to the first display image and the second display image.
In an embodiment of the present invention, the setting module 230 is specifically configured to:
comparing the first display image with the second display image to obtain the image similarity of the first display image and the second display image;
determining that the image similarity is smaller than a preset similarity threshold, and performing dislocation analysis on the first display image and the second display image respectively to obtain a first dislocation amount of the first display image and a second dislocation amount of the first display image;
and setting a compatible view list according to the first dislocation amount, the second dislocation amount and a preset dislocation threshold.
In an embodiment of the present invention, the setting module 230 is further specifically configured to:
and if the first dislocation amount is greater than or equal to a preset dislocation threshold value and the second dislocation amount is smaller than the dislocation threshold value, deleting the target website or not processing the compatible view list from the compatible view list.
And if the second dislocation amount is greater than or equal to the dislocation threshold and the first dislocation amount is smaller than the dislocation threshold, adding the target website in the compatible view list.
If the first dislocation amount and the second dislocation amount are both larger than or equal to a dislocation threshold value, analyzing the target source code to obtain a target page element of the target source code and a target scripting language JS mark of the target source code;
setting a compatible view list according to the target page element, the target JS mark, a preset first feature library and a preset second feature library;
the first feature library comprises a page element and a JS mark of the source code under the first standard, and the second feature library comprises a page element and a JS mark of the source code under the second standard.
In an embodiment of the present invention, the setting module 230 is further specifically configured to:
comparing the target page element and the target JS mark with the first feature library, determining a first page element in the target page element which meets a first standard and a first JS mark in the target JS mark which meets the first standard, comparing the target page element and the target JS mark with the second feature library, and determining a second page element in the target page element which meets a second standard and a second JS mark in the target JS mark which meets the second standard;
obtaining a first matching value of the target source code and a first standard according to the obtained occurrence frequency and a first preset weight of the first page element, and the occurrence frequency and a second preset weight of the first JS mark, and obtaining a second matching value of the target source code and a second standard according to the obtained occurrence frequency and a third preset weight of the second page element, the occurrence frequency and a fourth preset weight of the second JS mark;
if the first matching value is larger than the second matching value, deleting the target website or not processing the compatible view list from the compatible view list;
and if the first matching value is smaller than or equal to the second matching value, adding the target website in the compatibility view list.
In an embodiment of the present invention, the determining module 210 is specifically configured to:
judging whether the target website identification of the extracted target website belongs to a preset website identification set or not;
and if the target website identification belongs to a preset website identification set, determining the target website as a website needing to analyze compatibility.
In an embodiment of the present invention, the determining module 210 is further configured to:
and if the target website identification does not belong to the preset website identification set, determining the target website as a website which does not need to analyze compatibility.
The website compatibility setting device provided by the embodiment of the invention can automatically set the compatibility of the website, avoid the problem caused by misoperation of a user and improve the good experience of the user.
Other details of the website compatibility setting apparatus according to the embodiment of the present invention are similar to the method according to the embodiment of the present invention described above with reference to fig. 1, and are not repeated herein.
The website compatibility setting method and apparatus according to the embodiment of the present invention described in conjunction with fig. 1 to 2 may be implemented by a website compatibility setting device. Fig. 3 is a diagram showing a hardware configuration 300 of a website compatibility setting apparatus according to an embodiment of the present invention.
As shown in fig. 3, the website compatibility setting device 300 in this embodiment includes: the device comprises a processor 301, a memory 302, a communication interface 303 and a bus 310, wherein the processor 301, the memory 302 and the communication interface 303 are connected through the bus 310 and complete mutual communication.
In particular, the processor 301 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured as one or more integrated circuits implementing an embodiment of the present invention.
Memory 302 may include mass storage for data or instructions. By way of example, and not limitation, memory 302 may include an HDD, a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Memory 302 may include removable or non-removable (or fixed) media, where appropriate. The memory 302 may be internal or external to the website compatibility setting apparatus 300, where appropriate. In a particular embodiment, the memory 302 is a non-volatile solid-state memory. In a particular embodiment, the memory 302 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The communication interface 303 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiment of the present invention.
The bus 310 includes hardware, software, or both to couple the components of the website compatibility setting device 300 to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 310 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
That is, the website compatibility setting apparatus 300 shown in fig. 3 may be implemented to include: a processor 301, a memory 302, a communication interface 303, and a bus 310. The processor 301, memory 302 and communication interface 303 are coupled by a bus 310 and communicate with each other. The memory 302 is used to store program code; the processor 301 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 302 for executing the website compatibility setting method in any embodiment of the present invention, thereby implementing the website compatibility setting method and apparatus described in conjunction with fig. 1 to 2.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium is stored with computer program instructions; the computer program instructions, when executed by a processor, implement the website compatibility setting method provided by embodiments of the present invention.
The functional blocks shown in the above structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As will be apparent to those skilled in the art, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (11)

1. A website compatibility setting method comprises the following steps:
determining the acquired target website of the website to be accessed by the user as a website needing to analyze compatibility;
acquiring a target source code of the target website and calling a browser of the user to enable the browser to respectively analyze the target source code in a compatible mode and a non-compatible mode to obtain a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode;
and setting a compatibility view list of the user according to the first display image and the second display image.
2. The method of claim 1, wherein the setting the user's compatibility view list according to the first display image and the second display image comprises:
comparing the first display image with the second display image to obtain the image similarity of the first display image and the second display image;
determining that the image similarity is smaller than a preset similarity threshold, and performing dislocation analysis on the first display image and the second display image respectively to obtain a first dislocation amount of the first display image and a second dislocation amount of the first display image;
and setting the compatible view list according to the first dislocation quantity, the second dislocation quantity and a preset dislocation threshold.
3. The method according to claim 2, wherein the setting the list of compatibility views according to the first misalignment amount, the second misalignment amount and a preset misalignment threshold comprises:
and if the first dislocation amount is greater than or equal to the preset dislocation threshold value and the second dislocation amount is smaller than the dislocation threshold value, deleting the target website from the compatible view list or not processing the compatible view list.
4. The method according to claim 2, wherein the setting the list of compatibility views according to the first misalignment amount, the second misalignment amount and a preset misalignment threshold comprises:
and if the second dislocation amount is greater than or equal to the dislocation threshold value and the first dislocation amount is smaller than the dislocation threshold value, adding the target website in the compatible view list.
5. The method according to claim 2, wherein the setting the list of compatibility views according to the first misalignment amount, the second misalignment amount and a preset misalignment threshold comprises:
if the first dislocation amount and the second dislocation amount are both larger than or equal to the dislocation threshold, analyzing the target source code to obtain a target page element of the target source code and a target scripting language (JS) identifier of the target source code;
setting the compatible view list according to the target page element, the target JS mark, a preset first feature library and a preset second feature library;
the first feature library comprises a page element and a JS mark of the source code under the first standard, and the second feature library comprises a page element and a JS mark of the source code under the second standard.
6. The method of claim 5, wherein the setting the list of compatible views according to the target page element, the target JS identification, a preset first feature library and a preset second feature library comprises:
comparing the target page element and the target JS mark with the first feature library, determining a first page element meeting the first standard in the target page element and a first JS mark meeting the first standard in the target JS mark, comparing the target page element and the target JS mark with the second feature library, and determining a second page element meeting the second standard in the target page element and a second JS mark meeting the second standard in the target JS mark;
obtaining a first matching value of the target source code and the first standard according to the obtained occurrence number and first preset weight of the first page element and the occurrence number and second preset weight of the first JS mark, and obtaining a second matching value of the target source code and the second standard according to the obtained occurrence number and third preset weight of the second page element and the occurrence number and fourth preset weight of the second JS mark;
if the first matching value is greater than the second matching value, deleting the target website from the compatibility view list or not processing the compatibility view list;
and if the first matching value is smaller than or equal to the second matching value, adding the target website in the compatibility view list.
7. The method according to claim 1, wherein the determining that the obtained target website of the website to be accessed by the user is a website for which compatibility analysis is required comprises:
judging whether the extracted target website identification of the target website belongs to a preset website identification set or not;
and if the target website identification belongs to the preset website identification set, determining that the target website is a website needing to analyze compatibility.
8. The method of claim 7, further comprising:
and if the target website identification does not belong to the preset website identification set, determining the target website as a website without the need of analyzing compatibility.
9. A website compatibility setting apparatus, comprising:
the determining module is used for determining the acquired target website of the website to be accessed by the user as the website needing to analyze compatibility;
an image obtaining module, configured to obtain a target source code of the target website and call a browser of the user, so that the browser respectively parses the target source code in a compatible mode and a non-compatible mode, and a first display image of the browser in the compatible mode and a second display image of the browser in the non-compatible mode are obtained;
and the setting module is used for setting the compatibility view list of the user according to the first display image and the second display image.
10. A website compatibility setting apparatus, comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the website compatibility setting method of any of claims 1-8.
11. A computer storage medium having computer program instructions stored thereon, which when executed by a processor implement the website compatibility setting method of any one of claims 1-8.
CN201811318188.9A 2018-11-07 2018-11-07 Website compatibility setting method, device, equipment and medium Active CN111159607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811318188.9A CN111159607B (en) 2018-11-07 2018-11-07 Website compatibility setting method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811318188.9A CN111159607B (en) 2018-11-07 2018-11-07 Website compatibility setting method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111159607A true CN111159607A (en) 2020-05-15
CN111159607B CN111159607B (en) 2023-09-19

Family

ID=70555262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811318188.9A Active CN111159607B (en) 2018-11-07 2018-11-07 Website compatibility setting method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111159607B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110093773A1 (en) * 2009-10-19 2011-04-21 Browsera LLC Automated application compatibility testing
US20110289489A1 (en) * 2010-05-20 2011-11-24 Verizon Patent And Licensing Inc. Concurrent cross browser testing
US9053154B1 (en) * 2012-09-20 2015-06-09 Google Inc. System and method for generating a compatibility score for web content
CN105468779A (en) * 2015-12-16 2016-04-06 中国科学院软件研究所 Browser compatibility detection oriented client Web application capture and playback system and method
CN106055475A (en) * 2016-05-24 2016-10-26 广州视睿电子科技有限公司 Version compatibility detection method and apparatus
CN106776267A (en) * 2015-11-25 2017-05-31 富士通株式会社 Web application compatibility test method and web application compatibility test equipment
CN106886491A (en) * 2017-01-17 2017-06-23 博彦科技股份有限公司 Webpage compatibility test method and device
CN107315682A (en) * 2017-06-22 2017-11-03 北京凤凰理理它信息技术有限公司 Test browser-safe method, device, storage medium and electronic equipment
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN108121647A (en) * 2016-11-26 2018-06-05 上海亿账通互联网科技有限公司 The browser compatibility test method and device of the HTML5 pages
CN108334451A (en) * 2018-01-30 2018-07-27 无线生活(杭州)信息科技有限公司 page compatibility test method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110093773A1 (en) * 2009-10-19 2011-04-21 Browsera LLC Automated application compatibility testing
US20110289489A1 (en) * 2010-05-20 2011-11-24 Verizon Patent And Licensing Inc. Concurrent cross browser testing
US9053154B1 (en) * 2012-09-20 2015-06-09 Google Inc. System and method for generating a compatibility score for web content
CN106776267A (en) * 2015-11-25 2017-05-31 富士通株式会社 Web application compatibility test method and web application compatibility test equipment
CN105468779A (en) * 2015-12-16 2016-04-06 中国科学院软件研究所 Browser compatibility detection oriented client Web application capture and playback system and method
CN106055475A (en) * 2016-05-24 2016-10-26 广州视睿电子科技有限公司 Version compatibility detection method and apparatus
CN108121647A (en) * 2016-11-26 2018-06-05 上海亿账通互联网科技有限公司 The browser compatibility test method and device of the HTML5 pages
CN106886491A (en) * 2017-01-17 2017-06-23 博彦科技股份有限公司 Webpage compatibility test method and device
CN107315682A (en) * 2017-06-22 2017-11-03 北京凤凰理理它信息技术有限公司 Test browser-safe method, device, storage medium and electronic equipment
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN108334451A (en) * 2018-01-30 2018-07-27 无线生活(杭州)信息科技有限公司 page compatibility test method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴国全;何妹妹;魏峻;钟华;黄涛;: "基于捕获/重放的Web应用跨浏览器兼容性检测" *
陈智雨;汪明;巩少岩;王栋;史睿;葛冰玉;: "电力行业Web应用兼容性测试" *

Also Published As

Publication number Publication date
CN111159607B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN108366058B (en) Method, device, equipment and storage medium for preventing traffic hijacking of advertisement operator
CN107256232B (en) Information recommendation method and device
CN108268635B (en) Method and apparatus for acquiring data
CN110708346A (en) Information processing system and method
US9785710B2 (en) Automatic crawling of encoded dynamic URLs
CN103873918A (en) Picture processing method, device and terminal
EP2648388B1 (en) Method, system, and device for displaying page
CN113382083B (en) Webpage screenshot method and device
AU2018298640B2 (en) Determination device, determination method, and determination program
CN105704562B (en) Multi-version compatible method and device for network television cloud service platform
CN112685671A (en) Page display method, device, equipment and storage medium
CN110598135A (en) Network request processing method and device, computer readable medium and electronic equipment
CN110941779B (en) Page loading method and device, storage medium and electronic equipment
CN103530389A (en) Method and device for improving stopword searching effectiveness
CN113360106B (en) Webpage printing method and device
CN114385124A (en) Independent page jumping method, device and equipment based on Vue framework
US10931771B2 (en) Method and apparatus for pushing information
CN111159607B (en) Website compatibility setting method, device, equipment and medium
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
CN115113871A (en) Front-end code version information checking method, device and equipment based on data middlebox
CN110457632B (en) Webpage loading processing method and device
JP2021152939A (en) Portable terminal, control method, and program
CN113923190A (en) Method and device for identifying equipment identification jump, server and storage medium
CN112433752A (en) Page parsing method, device, medium and electronic equipment
CN111783006A (en) Page generation method and device, electronic equipment and computer readable medium

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