Method and device for detecting cloned web pages

By adding detection code to the source code of the target web page and comparing the detection features to identify cloned web pages, the problems of high false negative rate, low success rate and high cost in the detection of cloned web pages in the existing technology are solved, and a low-cost, high-performance method is achieved. Accurate identification of cloned web pages.

CN115378695BActive Publication Date: 2024-10-11HARBIN ANTIY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210998378.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2024-10-11
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

Existing cloned webpage detection methods have problems such as high false negative rate, low detection success rate, and high cost, making it difficult to effectively identify cloned webpages.

Method used

By adding detection code to the source code of the target web page, the client executes the detection code when reading the source code before loading the web page, compares the detection features of the current source code with the target detection features, and determines whether the web page is a cloned web page.

Benefits of technology

It achieves low-cost, high-accuracy cloned webpage detection, which can effectively identify cloned webpages, protect user data, and improve user judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115378695B_ABST
    Figure CN115378695B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for detecting cloned web pages, wherein the method includes: determining a target detection feature corresponding to the source code of a target web page; generating a detection code according to the target detection feature; adding the detection code to the source code of the target web page, so that when a user terminal reads the source code of the web page before loading the web page, if the source code read contains the detection code, the detection code is executed; wherein when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the web page is a cloned web page according to the comparison result. In this solution, it is only necessary to add the detection code to the source code of the original web page, which is not only low in cost but also high in detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of network security, and in particular to a method and device for detecting cloned web pages. Background Art

[0002] A common method of Internet fraud is to imitate and copy other people's website pages to create cloned web pages, tricking users into logging into the cloned web pages when visiting the target website. After performing operations on the cloned web pages, user-related information is leaked.

[0003] In the prior art, detection methods for cloned web pages include URL feature detection, blacklist matching, machine learning, etc. However, there are disadvantages such as high false negative rate, low detection success rate, and high cost. Summary of the invention

[0004] Based on the above problems, an embodiment of the present invention provides a method and device for detecting cloned web pages.

[0005] In a first aspect, an embodiment of the present invention provides a method for detecting cloned web pages, comprising:

[0006] Determine a target detection feature corresponding to the source code of the target webpage;

[0007] Generate a detection code according to the target detection feature;

[0008] Adding the detection code to the source code of the target webpage, so that when the user terminal reads the source code of the webpage before loading the webpage, if the source code read contains the detection code, the detection code is executed;

[0009] Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result.

[0010] In a possible implementation, determining the target detection feature corresponding to the source code of the target webpage includes:

[0011] A hash value of the source code of the target webpage is determined as the target detection feature.

[0012] In a possible implementation, determining the target detection feature corresponding to the source code of the target webpage includes:

[0013] Determine the code portion of the source code that will be modified when cloning the web page based on the source code of the web page;

[0014] The target detection feature is determined according to the code portion to be modified.

[0015] In a possible implementation, the code portion to be modified includes a loading address of the page content;

[0016] The determining the target detection feature according to the code portion to be modified includes: determining the loading address of the page content included in the source code of the target webpage as the target detection feature.

[0017] In a possible implementation, the generating a detection code according to the target detection feature includes:

[0018] The target detection feature is added to a specified position of a preset function code to obtain a detection code.

[0019] In a possible implementation, it also includes:

[0020] The detection code is comprehensively encrypted so as to add the comprehensively encrypted detection code into the source code corresponding to the target webpage.

[0021] In a possible implementation, determining whether the webpage is a cloned webpage according to the comparison result includes: if the comparison result shows that the detection feature of the current source code is different from the target detection feature, determining that the webpage is a cloned webpage;

[0022] and / or,

[0023] The method also includes: when it is determined that the webpage is a cloned webpage, prompting the user.

[0024] In a second aspect, an embodiment of the present invention further provides a cloned web page detection device, comprising:

[0025] A feature determination unit, used to determine a target detection feature corresponding to the source code of the target webpage;

[0026] A code generating unit, used to generate a detection code according to the target detection feature;

[0027] A code updating unit, configured to add the detection code to the source code of the target web page, so that when the user terminal reads the source code of the web page before loading the web page, if the source code read contains the detection code, the detection code is executed;

[0028] Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result.

[0029] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0030] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0031] The embodiment of the present invention provides a cloned web page detection method and device, which generates a detection code based on the target detection feature corresponding to the source code of the target web page, and adds the detection code to the source code of the target web page. Before loading the web page, the user terminal needs to read the source code of the web page. If the read source code contains the detection code, the detection code will be executed, and the detection code is used to compare the detection feature of the current source code with the target detection feature. According to the comparison result, it can be determined whether the web page loaded by the user terminal is a cloned web page. In this solution, it is only necessary to add the detection code to the source code of the original web page, which is not only low in cost but also high in detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is a flow chart of a cloned web page detection method provided by an embodiment of the present invention;

[0034] Figure 2 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;

[0035] Figure 3 It is a structural diagram of a cloned web page detection device provided by an embodiment of the present invention;

[0036] Figure 4 is a structural diagram of another cloned web page detection device provided by an embodiment of the present invention;

[0037] Figure 5 It is a structural diagram of another cloned web page detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0039] Based on the above-mentioned shortcomings of the existing cloned web page detection methods, it is urgent to provide a new approach to detect cloned web pages.

[0040] When a web page is cloned to imitate and copy the web page of another website, it is generally implemented based on the source code of the cloned web page. The source code is copied and the URL of the server where the page content is loaded in the source code is replaced with the URL of the server built by the cloned website, so that the page content of the cloned web page is the same or similar to that of the cloned web page.

[0041] Based on this, the inventive concept of the present invention is: considering that when a user terminal visits a web page, the source code of the web page will be read before the page content of the web page is loaded, therefore, a detection code can be added to the source code of the cloned web page, and the detection code includes the detection features of the corresponding source code. When the user reads the source code of the web page, the detection code can be read and executed, and the detection of the cloned web page can be realized by using the detection code.

[0042] The specific implementation of the above concept is described below.

[0043] Please refer to Figure 1 The embodiment of the present invention provides a method for detecting cloned web pages, the method comprising:

[0044] Step 100, determining a target detection feature of a source code corresponding to a target web page;

[0045] Step 102, generating a detection code according to the target detection feature;

[0046] Step 104, adding the detection code to the source code corresponding to the target webpage, so that when the user terminal reads the source code corresponding to the webpage before loading the webpage, if the source code read contains the detection code, the detection code is executed;

[0047] Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result.

[0048] This method can be executed by the source code generation end of the web page, or by other service ends generating detection codes for each client web page providing service, sending the detection codes to the clients, and the clients adding the detection codes to the source code one by one.

[0049] In the embodiment of the present invention, a detection code is generated based on the target detection feature of the source code corresponding to the target web page, and the detection code is added to the source code corresponding to the target web page. Before loading the web page, the user terminal needs to read the source code corresponding to the web page. If the read source code contains the detection code, the detection code will be executed, and the detection code is used to compare the detection feature of the current source code with the target detection feature. According to the comparison result, it can be determined whether the web page loaded by the user terminal is a cloned web page. In this solution, it is only necessary to add the detection code to the source code of the original web page, which is not only low in cost, but also high in detection accuracy.

[0050] Described below Figure 1 How the various steps are performed.

[0051] First, with respect to step 100 , a target detection feature corresponding to the source code of the target webpage is determined.

[0052] The source code of a web page refers to the uncompiled text code or the entire source code file of a website. It is a series of readable computer language instructions that are translated by a browser or server to present the page content of the web page. Different web pages have different source codes, so the detection features of the source codes of different web pages are different.

[0053] In one implementation, this step may include: determining a hash value of a source code corresponding to the target webpage as the target detection feature.

[0054] When the source code is different, the calculated hash value is also different, which shows that the hash value is unique. If the target web page is cloned, then when the cloned web page is generated based on the source code of the target web page, part of the source code will be modified, and the hash value of the modified source code will also change. Therefore, using the hash value as a detection feature can accurately determine whether the source code has been modified, thereby determining whether the web page is a cloned web page.

[0055] In another implementation, this step may include: determining a code portion in the source code that will be modified when cloning the web page based on the source code of the web page; and determining the target detection feature according to the code portion that will be modified.

[0056] Based on the above description, it can be known that when a cloned webpage is generated based on the source code of the target webpage, part of the source code content will be modified, so the modified part of the content can be used as a detection feature to determine whether the webpage is cloned.

[0057] In the embodiment of the present invention, if the clone webpage maker generates the clone webpage using a clone webpage generation tool, corresponding features may be collected for several generation tools to determine the code portion modified by the generation tool on the source code of the cloned webpage.

[0058] Generally speaking, the principle of the generation tool is to input the source code of the cloned web page, and at least replace the loading address of the page content in the source code with the server address of the cloned website. Therefore, it can be determined that the code part that will be modified includes the loading address of the page content.

[0059] Accordingly, determining the target detection feature according to the code portion to be modified includes: determining the loading address of the page content included in the source code of the target webpage as the target detection feature.

[0060] In the embodiment of the present invention, if the source code of the target webpage includes multiple loading addresses of page contents, any one or more loading addresses of page contents may be determined as target detection features.

[0061] It can be seen that if the target web page is cloned into a cloned web page, the loading address of the page content in the source code will be modified. Therefore, using the loading address of the page content as a detection feature can detect whether the web page is a cloned web page.

[0062] Then, with respect to step 102, a detection code is generated according to the target detection feature.

[0063] In the embodiment of the present invention, the target detection feature needs to be compared as a comparison threshold, so after the detection code is generated, the target detection feature is located in the detection code. For example, the target detection feature is located at a specified position of the detection code.

[0064] In one implementation, this step may include: adding the target detection feature to a specified position of a preset function code to obtain a detection code.

[0065] The preset function code is a framework code for realizing the detection function. The specified position of the preset function code is set as a code blank or a variable parameter. After the target detection feature is determined, the target detection feature can be added to the code blank or the variable parameter can be replaced to obtain the detection code. When generating corresponding detection codes for different web pages, the preset function code can be used to improve the efficiency of generating detection codes.

[0066] In one embodiment of the present invention, the detection code can be implemented using a scripting language to better adapt to the source code. The scripting language can preferably be JavaScript.

[0067] Finally, for step 104, the detection code is added to the source code of the target webpage, so that when the user terminal reads the source code of the webpage before loading the webpage, if the read source code contains the detection code, the detection code is executed.

[0068] Since the detection code is added to the source code, it is necessary to ensure that the detection code is not modified when cloning is performed based on the source code. In particular, when the target detection feature is the loading address of the page content, it is necessary to ensure that the target detection feature in the detection code is not modified. Based on this purpose, in one embodiment of the present invention, before this step, it also includes: comprehensively encrypting the detection code. Then when executing this step, the comprehensively encrypted detection code is added to the source code of the target web page.

[0069] Comprehensive encryption refers to mixed encryption of multiple methods, such as compressing multiple lines of JS code into short codes, irregularly naming variables in JS code, converting Chinese in JS code into unicode or hexadecimal code, converting JS code into eval mode, etc.

[0070] When the detection code is comprehensively encrypted, only the target detection feature may be comprehensively encrypted, or part of the code including the target detection feature may be comprehensively encrypted, or the entire detection code may be comprehensively encrypted.

[0071] After the detection code is comprehensively encrypted, the target detection feature in the detection code can be hidden so that the target detection feature is not modified after cloning. In addition, after the detection code is comprehensively encrypted, the function of the detection code can also be hidden so that the cloned web page maker cannot determine the execution meaning of this part of the code.

[0072] In the embodiment of the present invention, the detection code can be used to implement a detection function when executed. Specifically, the detection function includes: comparing the detection feature of the current source code with the target detection feature, and determining whether the web page is a cloned web page based on the comparison result.

[0073] The detection feature of the current source code can be determined by the determination method of step 100, first obtaining the current source code, then determining the detection feature corresponding to the source code other than the detection code, and finally comparing it with the target detection feature.

[0074] If the target detection feature is the loading address of the page content, the detection feature of the current source code can be determined in another way: receive the page content sent by the loading server for the current web page, determine the loading address of the loading server, and compare the address with the loading address in the target detection feature.

[0075] In this step, when determining whether the webpage is a cloned webpage according to the comparison result, specifically, if the comparison result is that the detection feature of the current source code is different from the target detection feature, then the webpage is determined to be a cloned webpage.

[0076] Further, when it is determined that the webpage is a cloned webpage, the user is prompted, and the prompt may be "This webpage is a cloned webpage, please confirm whether to continue accessing" or the like.

[0077] By adding the detection code to the source code of the web page, it is equivalent to adding a lock to the original web page. When the user accesses the cloned web page generated based on the source code of the original web page, it can effectively improve the user's judgment ability on the cloned web page, thereby protecting the user's important data.

[0078] This solution can at least be applied to website anti-tampering, website security detection, and network business security systems to prevent tampering and data leakage caused by malicious attackers.

[0079] like Figure 2 , Figure 3 As shown, an embodiment of the present invention provides a cloned web page detection device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 FIG. 1 is a hardware architecture diagram of an electronic device where a cloned webpage detection device provided by an embodiment of the present invention is located. Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a device in a logical sense, the CPU of the electronic device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it. This embodiment provides a cloned web page detection device, including:

[0080] A feature determination unit 301 is used to determine a target detection feature corresponding to the source code of a target web page;

[0081] A code generating unit 302, configured to generate a detection code according to the target detection feature;

[0082] A code updating unit 303 is used to add the detection code to the source code of the target webpage, so that when the user terminal reads the source code of the webpage before loading the webpage, if the source code read contains the detection code, the detection code is executed;

[0083] Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result.

[0084] In one embodiment of the present invention, when determining the target detection feature corresponding to the source code of the target webpage, the feature determination unit is specifically configured to: determine a hash value of the source code of the target webpage as the target detection feature.

[0085] In one embodiment of the present invention, when determining the target detection feature corresponding to the source code of the target web page, the feature determination unit is specifically used to: determine the code portion in the source code that will be modified when the web page is cloned based on the source code of the web page; and determine the target detection feature based on the code portion that will be modified.

[0086] In one embodiment of the present invention, the code portion to be modified includes a loading address of the page content;

[0087] When determining the target detection feature according to the code portion to be modified, the feature determination unit is specifically configured to: determine the loading address of the page content included in the source code of the target web page as the target detection feature.

[0088] In one embodiment of the present invention, when generating the detection code according to the target detection feature, the code generating unit is specifically used to: add the target detection feature to a specified position of a preset function code to obtain the detection code.

[0089] In one embodiment of the present invention, please refer to Figure 4 , the cloned web page detection device also includes:

[0090] The encryption unit 304 is used to perform comprehensive encryption on the detection code to trigger the code update unit to add the comprehensive encrypted detection code to the source code corresponding to the target webpage.

[0091] In one embodiment of the present invention, determining whether the webpage is a cloned webpage according to the comparison result includes: if the comparison result is that the detection feature of the current source code is different from the target detection feature, determining that the webpage is a cloned webpage.

[0092] In one embodiment of the present invention, please refer to Figure 5 , the cloned web page detection device also includes:

[0093] The prompting unit 305 prompts the user when it is determined that the webpage is a cloned webpage.

[0094] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a cloned web page detection device. In other embodiments of the present invention, a cloned web page detection device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0095] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0096] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a cloned web page detection method in any embodiment of the present invention is implemented.

[0097] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a cloned web page detection method in any embodiment of the present invention.

[0098] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0099] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0100] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0101] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0102] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0103] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0104] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting cloned web pages, It is characterized in that include: Determine a target detection feature corresponding to the source code of the target webpage; Generate a detection code according to the target detection feature; Adding the detection code to the source code of the target webpage, so that when the user terminal reads the source code of the webpage before loading the webpage, if the source code read contains the detection code, the detection code is executed; Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result; The generating of the detection code according to the target detection feature comprises: Add the target detection feature to the specified position of the preset function code to obtain the detection code; the preset function code is a framework code for realizing the detection function, the specified position of the preset function code is set as a code blank or a variable parameter, and the preset function code is also used to generate a corresponding detection code according to the web page type to improve the generation efficiency of the detection code; The detection code is comprehensively encrypted so as to add the comprehensively encrypted detection code to the source code corresponding to the target web page; the comprehensive encryption includes one or more of the following: compressing multiple lines of JS code into short codes, irregularly naming variables in the JS code, converting Chinese in the JS code into unicode or hexadecimal code, and converting the JS code into eval.

2. The method according to claim 1, It is characterized in that The step of determining the target detection feature corresponding to the source code of the target webpage includes: A hash value of the source code of the target webpage is determined as the target detection feature.

3. The method according to claim 1, It is characterized in that The step of determining the target detection feature corresponding to the source code of the target webpage includes: Determine the code portion of the source code that will be modified when cloning the web page based on the source code of the web page; The target detection feature is determined according to the code portion to be modified.

4. The method according to claim 3, It is characterized in that The code portion to be modified includes the loading address of the page content; The determining the target detection feature according to the code portion to be modified includes: determining the loading address of the page content included in the source code of the target webpage as the target detection feature.

5. The method according to any one of claims 1 to 4, It is characterized in that The determining whether the webpage is a cloned webpage according to the comparison result includes: if the comparison result shows that the detection feature of the current source code is different from the target detection feature, determining that the webpage is a cloned webpage; and / or, The method also includes: when it is determined that the webpage is a cloned webpage, prompting the user.

6. A cloned web page detection device, It is characterized in that include: A feature determination unit, used to determine a target detection feature corresponding to the source code of the target webpage; A code generating unit, used to generate a detection code according to the target detection feature; A code updating unit, configured to add the detection code to the source code of the target web page, so that when the user terminal reads the source code of the web page before loading the web page, if the source code read contains the detection code, the detection code is executed; Wherein, when the detection code is executed, it is used to: compare the detection feature of the current source code with the target detection feature, and determine whether the webpage is a cloned webpage according to the comparison result; The generating of the detection code according to the target detection feature comprises: Add the target detection feature to the specified position of the preset function code to obtain the detection code; the preset function code is a framework code for realizing the detection function, the specified position of the preset function code is set as a code blank or a variable parameter, and the preset function code is also used to generate a corresponding detection code according to the web page type to improve the generation efficiency of the detection code; The detection code is comprehensively encrypted so as to add the comprehensively encrypted detection code to the source code corresponding to the target web page; the comprehensive encryption includes one or more of the following: compressing multiple lines of JS code into short codes, irregularly naming variables in the JS code, converting Chinese in the JS code into unicode or hexadecimal code, and converting the JS code into eval.

7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 5.