Web page batch processing method and system for browser upgrade from IE to Edge
By automatically detecting and batch correcting IE exclusive code, the inefficiency problem of checking one by one and manually correcting during the browser upgrade process is solved, efficient web page error correction is achieved, and upgrade efficiency is improved.
Patent Information
- Application Number
- CN202211171348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-25
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-09-25
AI Technical Summary
In the prior art, when a browser upgrades from IE to Edge, it is necessary to check the errors in the web page one by one and correct them manually, which is inefficient and cannot be processed in batches.
It provides a batch processing method and system for web pages to upgrade from IE to Edge. By reading code files in a specified folder, it automatically detects and filters out IE-specific codes, generates error reports, parses error types and applies corresponding correction rules to batch corrections.
It realizes automated error checking and batch correction during the browser upgrade from IE to Edge, improves the efficiency of web page error correction, and reduces manual intervention and time consumption.
Smart Images

Figure CN115509575B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of browser updates, and more specifically, to a method and system for batch processing web pages when a browser is upgraded from IE to Edge. Background Art
[0002] Official support for Internet Explorer has ended. Web pages that relied heavily on IE will no longer receive security updates. While a temporary workaround using IE mode in Edge is available, we recommend upgrading to Edge as soon as possible.
[0003] The current upgrade solution can only check the code that cannot be displayed correctly in the web page one by one in Edge, and then manually correct the errors one by one, but there are many IE versions, and they are very different from the Edge versions. Summary of the Invention
[0004] The present invention aims to solve the technical problems existing in the prior art and provides a method and system for batch processing web pages when a browser is upgraded from IE to Edge.
[0005] According to a first aspect of the present invention, a method for batch processing web pages when a browser is upgraded from IE to Edge is provided, comprising:
[0006] After the project is started, read the Java code files, JS code files and HTML code files in the specified folder;
[0007] Detect and filter out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code, and other error codes from the Java code file, JS code file, and HTML code file;
[0008] Generates error report data of corresponding types based on the detected showModalDialog / showModelessDialog, VB language code, applet code and other error codes;
[0009] Parsing the error report data and determining corresponding correction rules based on different types of error codes;
[0010] Correct the corresponding type of error code based on the correction rule and obtain the corrected code.
[0011] On the basis of the above technical solution, the present invention can also make the following improvements.
[0012] Optionally, the detecting and filtering out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code, and other error codes from the Java code file, JS code file, and HTML code file respectively includes:
[0013] Detect and filter the showModalDialog / showModelessDialog in the Java code file, JS code file, and HTML code file according to the showModalDialog / showModelessDialog modal box or dialog box opening method in IE;
[0014] Filter out VB language codes based on VBScript's special expression search;
[0015] Filter out applet codes based on Applet word detection;
[0016] Detect and filter JS code files based on ESLint default rules and detect and filter HTML code files based on HTML5 specifications to obtain error codes in JS code files and HTML code files. Among them, detecting and filtering HTML code files includes element compatibility checking, standard writing checking, attribute detection and CSS compatibility checking.
[0017] Optionally, the generation of corresponding error report data based on the detected and filtered showModalDialog / showModelessDialog, VB language code, applet code, and other error codes includes:
[0018] The showModalDialog / showModelessDialog, VB language code, applet code and other error codes are divided into four types, namely type 1, type 2, type 3 and type 4, and corresponding error report data is generated according to different types.
[0019] Optionally, parsing the error report data and determining corresponding correction rules based on different types of error codes may include:
[0020] For the first type of error code, use the system default correction rule, that is, use the native H5 Dialog tag to encapsulate it into the same calling method as IE;
[0021] For the second type of error code, customize the correction rules;
[0022] For the third type of error code, a risk warning is issued, and the Edge client is set to allow applet execution. In addition, the applet code in the HTML is replaced with Edge-recognizable code.
[0023] For the fourth type of error code, customize the correction rules or use the system default correction rules.
[0024] Optionally, correcting the corresponding type of error code based on the correction rule to obtain the corrected code includes:
[0025] Rescan all code files in the specified folder, correct the erroneous code based on the corresponding correction rules determined by the error type, generate the corrected code file, and generate a data correction report based on the code file before and after correction for verification.
[0026] Optionally, the step of correcting the corresponding type of error code based on the correction rule to obtain the corrected code further includes:
[0027] The corrected code file is run in the new version of the Edge kernel to generate a new error record, and error detection and error correction are performed again on the corrected code file based on the error record.
[0028] According to a second aspect of the present invention, a webpage batch processing system for upgrading a browser from IE to Edge is provided, comprising:
[0029] The reading module is used to read the Java code files, JS code files and HTML code files in the specified folder after the project is started;
[0030] A detection module is used to detect and filter out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code and other error codes from the Java code file, JS code file and HTML code file respectively;
[0031] A generation module is used to generate corresponding error report data based on the showModalDialog / showModelessDialog, VB language code, applet code and other error codes detected and filtered;
[0032] A parsing module, configured to parse the error report data and determine corresponding correction rules based on different types of error codes;
[0033] The correction module is used to correct the corresponding type of error code based on the correction rules and obtain the corrected code.
[0034] According to a third aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the processor is configured to implement the steps of a method for batch processing web pages when upgrading a browser from IE to Edge when executing a computer management program stored in the memory.
[0035] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored. When the computer management program is executed by a processor, the steps of a method for batch processing web pages when the browser is upgraded from IE to Edge are implemented.
[0036] The present invention provides a method and system for batch processing web pages when a browser is upgraded from IE to Edge, which can realize automatic batch error checking and error correction for code files in the IE browser, realize batch checking and correction of code files during the browser upgrade from IE to Edge, and improve the efficiency of web page error correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flow chart of a method for batch processing web pages when upgrading a browser from IE to Edge provided by the present invention;
[0038] Figure 2 A schematic diagram of the structure of a web page batch processing system for upgrading a browser from IE to Edge provided by the present invention;
[0039] Figure 3 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0040] Figure 4 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0041] 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, not all of the embodiments. Based on the embodiments of 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. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not restricted by the sequence of steps and / or structural composition mode, but must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0042] In order to solve the shortcomings of the traditional manual one-by-one inspection method, the present invention adopts a complete solution that formulates inspection rules, automatically checks for errors and dynamically corrects them, and generates reports to assist manual improvement of the inspection function.
[0043] Figure 1 The present invention provides a flow chart of a method for upgrading a web page batch from IE to Edge, as shown in FIG. Figure 1 As shown, the web page batch processing method mainly includes the following steps:
[0044] S1, after the project is started, read the Java code files, JS code files and HTML code files in the specified folder.
[0045] It is understandable that after the project is started, the original code files in the specified folder are read, including Java code files, JS code files and HTML code files. These code files are the code files that need to be detected and corrected later.
[0046] S2, detecting and filtering out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code and other error codes from the Java code file, JS code file and HTML code file respectively.
[0047] As an embodiment, the method of detecting and filtering out showModalDialog / showModelessDialog, VB language code, applet code and other error codes from the Java code file, JS code file and HTML code file respectively includes: detecting and filtering out showModalDialog / showModelessDialog in the Java code file, JS code file and HTML code file according to the showModalDialog / showModelessDialog modal box or dialog box opening method in IE; filtering out VB language code based on special expression retrieval of VBScript; filtering out applet code based on Applet word detection; detecting and filtering JS code files based on ESLint default rules and detecting and filtering HTML code files based on HTML5 specifications, and obtaining error codes in JS code files and HTML code files, wherein detecting and filtering HTML code files includes element compatibility checking, standard writing checking, attribute checking and CSS compatibility checking.
[0048] It is understandable that after obtaining the Java code file, JS code file and HTML code file, it is necessary to detect the error code in the code file. Specifically, the showModalDialog / showModelessDialog in the code file is retrieved and filtered based on the showModalDialog / showModelessDialog modal box or dialog box opening method in the IE browser. Among them, showModalDialog / showModelessDialog is only compatible in the IE browser. The VB language code in the code file is retrieved and filtered based on the special expression of VBScript, and the possible small programs are retrieved based on the word Applet. The existing ESLint default rules are used to filter the code JS code files and the HTML5 specification is checked for HTML code files. The specification check of the HTMLdiam file mainly focuses on element compatibility, standard writing, attributes, and CSS compatibility.
[0049] S3, based on the detected and filtered showModalDialog / showModelessDialog, VB language code, applet code and other error codes, generates corresponding types of error report data.
[0050] As an embodiment, based on the detection and filtering of showModalDialog / showModelessDialog, VB language code, applet code and other error codes, corresponding types of error report data are generated, including: dividing showModalDialog / showModelessDialog, VB language code, applet code and other error codes into four types, namely the first type, the second type, the third type and the fourth type, and generating corresponding error report data according to different types.
[0051] It is understandable that the different error codes detected and filtered are classified and error report data is generated according to different types.
[0052] S4, parsing the error report data, and determining corresponding correction rules based on different types of error codes.
[0053] As an embodiment, the error report data is parsed and corresponding correction rules are determined based on different types of error codes, including: for the first type of error code, the system default correction rules are used, that is, the H5 native Dialog tag is encapsulated into the same calling method as IE; for the second type of error code, the correction rules are customized; for the third type of error code, a risk warning is issued, and the Edge client is set to allow the applet to run, and the Applet code is replaced with Edge-recognizable code in HTML; for the fourth type of error code, the correction rules are customized or the system default correction rules are used.
[0054] It is understandable that for different types of error codes, different correction rules are used to correct the error codes. For showModalDialog / showModelessDialog, the system default correction rules are used. Custom correction rules are provided for VB language codes detected by VBScript special expressions. For small program codes detected by Applet, risk warnings are first given. It is necessary to set up the Edge client separately to allow Applet small program codes, and replace the code that starts Applet in html with Edge recognizable code. In general, for various error codes, users are provided with the option of customizing correction rules or using default inspection rules to generate correction rule reports.
[0055] S5, correct the corresponding type of error code based on the correction rule and obtain the corrected code.
[0056] As an embodiment, the correction of the corresponding type of error code based on the correction rules to obtain the corrected code includes: rescanning all code files in the specified folder, correcting the error code based on the corresponding correction rules determined by the error type, generating a corrected code file, and generating a data correction report based on the code file before correction and the corrected code file for verification.
[0057] It is understandable that the output error report data is analyzed to analyze the error type, and the corresponding correction rule is selected based on the error type. Among them, the user can customize the correction rule or use the default check rule correction scheme to generate a correction rule report. Based on the error code, all code files in the specified folder are rescanned, the error code is corrected based on the correction rule, and the corrected code file is generated. A data report is generated for the code files before and after the correction for subsequent verification and inspection, so that the error code can be corrected.
[0058] As an embodiment, the corresponding type of error code is corrected based on the correction rules to obtain the corrected code, which then includes: running the corrected code file in the new version of the Edge kernel to generate a new error record, and performing error detection and error correction on the corrected code file again based on the error record.
[0059] It is understandable that the above steps can detect and correct the error code in the web page and generate a corrected code file. In this step, the corrected code file is run in the new version of the Edge kernel to generate a new error record. Based on the error record, the corrected code file is again error-detected and corrected. This allows for multiple error detection and correction of the code file, and finally batch output of the code files after multiple error detections and corrections. This enables automatic error detection and correction during the browser upgrade from IE to Edge, improving upgrade efficiency.
[0060] Figure 2 The structure diagram of a web page batch processing system for upgrading a browser from IE to Edge provided by an embodiment of the present invention is as follows: Figure 2 As shown, a webpage batch processing system for upgrading a browser from IE to Edge includes a reading module 201, a detection module 202, a generation module 203, a parsing module 204, and a correction module 205, wherein:
[0061] The reading module 201 is used to read the Java code files, JS code files and HTML code files in the specified folder after the project is started;
[0062] A detection module 202 is configured to detect and filter out showModalDialog / showModelessDialog, VB language code, applet code, and other error codes from the Java code file, the JS code file, and the HTML code file, respectively;
[0063] A generating module 203 is configured to generate error report data of corresponding types based on the detected and filtered showModalDialog / showModelessDialog, VB language code, applet code and other error codes;
[0064] The parsing module 204 is used to parse the error report data and determine corresponding correction rules based on different types of error codes;
[0065] The correction module 205 is used to correct the corresponding type of error code based on the correction rule and obtain the corrected code.
[0066] It can be understood that the web page batch processing system for upgrading a browser from IE to Edge provided by the present invention corresponds to the web page batch processing method for upgrading a browser from IE to Edge provided in the aforementioned embodiments. The relevant technical features of the web page batch processing system for upgrading a browser from IE to Edge can refer to the relevant technical features of the web page batch processing method for upgrading a browser from IE to Edge, which will not be repeated here.
[0067] See also Figure 3 , Figure 3 Schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, the steps of the method for batch processing web pages when the browser is upgraded from IE to Edge are implemented.
[0068] See also Figure 4 , Figure 4 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 411 is stored. When the computer program 411 is executed by a processor, the steps of the method for batch processing web pages when the browser is upgraded from IE to Edge are implemented.
[0069] The embodiments of the present invention provide a method and system for batch processing web pages when upgrading a browser from IE to Edge, which has the following beneficial effects:
[0070] (1) Code checking is replaced by manual code checking, reducing errors and time.
[0071] (2) Reduce the waste of manpower caused by repetitive tasks due to repetitive errors.
[0072] (3) Providing rule import and export functions can increase the reusability of rule code and improve scalability.
[0073] (4) Standard and consistent solutions can be provided for the same problems in different projects.
[0074] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0075] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0077] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0079] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0080] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for batch processing web pages when the browser is upgraded from IE to Edge, characterized in that: include: After the project is started, read the Java code files, JS code files and HTML code files in the specified folder; Detect and filter out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code, and other error codes from the Java code file, JS code file, and HTML code file; Generates error report data of corresponding types based on the detected showModalDialog / showModelessDialog, VB language code, applet code and other error codes; Parsing the error report data and determining corresponding correction rules based on different types of error codes; Correct the corresponding type of error code based on the correction rule and obtain the corrected code; Detect and filter out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code, and other error codes from the Java code file, JS code file, and HTML code file, including: Detect and filter the showModalDialog / showModelessDialog in the Java code file, JS code file, and HTML code file according to the showModalDialog / showModelessDialog modal box or dialog box opening method in IE; Filter out VB language codes based on VBScript's special expression search; Filter out applet codes based on Applet word detection; Detect and filter JS code files based on ESLint default rules and detect and filter HTML code files based on HTML5 specifications to obtain error codes in JS code files and HTML code files. Among them, detecting and filtering HTML code files includes element compatibility checking, standard writing checking, attribute detection and CSS compatibility checking.
2. The web page batch processing method according to claim 1, characterized in that: The error report data of the corresponding type is generated based on the detected and filtered showModalDialog / showModelessDialog, VB language code, applet code and other error codes, including: The showModalDialog / showModelessDialog, VB language code, applet code and other error codes are divided into four types, namely type 1, type 2, type 3 and type 4, and corresponding error report data is generated according to different types.
3. The web page batch processing method according to claim 2, characterized in that: The parsing of the error report data and determining corresponding correction rules based on different types of error codes include: For the first type of error code, use the system default correction rule, that is, use the native H5 Dialog tag to encapsulate it into the same calling method as IE; For the second type of error code, customize the correction rules; For the third type of error code, a risk warning is issued, and the Edge client is set to allow applet execution. In addition, the applet code in the HTML is replaced with Edge-recognizable code. For the fourth type of error code, customize the correction rules or use the system default correction rules.
4. The web page batch processing method according to claim 3, characterized in that: Correcting the corresponding type of error code based on the correction rule to obtain the corrected code includes: Rescan all code files in the specified folder, correct the erroneous code based on the corresponding correction rules determined by the error type, generate the corrected code file, and generate a data correction report based on the code file before and after correction for verification.
5. The web page batch processing method according to any one of claims 1 to 4, characterized in that: The method further includes correcting the corresponding type of error code based on the correction rule to obtain the corrected code, and then further including: The corrected code file is run in the new version of the Edge kernel to generate a new error record, and error detection and error correction are performed again on the corrected code file based on the error record.
6. A webpage batch processing system for upgrading the browser from IE to Edge, characterized by: include: The reading module is used to read the Java code files, JS code files and HTML code files in the specified folder after the project is started; A detection module is used to detect and filter out only IE-compatible showModalDialog / showModelessDialog, VB language code, applet code and other error codes from the Java code file, JS code file and HTML code file respectively; A generation module is used to generate corresponding error report data based on the showModalDialog / showModelessDialog, VB language code, applet code and other error codes detected and filtered; A parsing module, configured to parse the error report data and determine corresponding correction rules based on different types of error codes; A correction module is used to correct the corresponding type of error code based on the correction rules and obtain the corrected code; The detection module is specifically used to: Detect and filter the showModalDialog / showModelessDialog in the Java code file, JS code file, and HTML code file according to the showModalDialog / showModelessDialog modal box or dialog box opening method in IE; Filter out VB language codes based on VBScript's special expression search; Filter out applet codes based on Applet word detection; Detect and filter JS code files based on ESLint default rules and detect and filter HTML code files based on HTML5 specifications to obtain error codes in JS code files and HTML code files. Among them, detecting and filtering HTML code files includes element compatibility checking, standard writing checking, attribute detection and CSS compatibility checking.
7. An electronic device, characterized in that: It includes a memory and a processor, and the processor is used to implement the steps of the web page batch processing method for upgrading the browser from IE to Edge as described in any one of claims 1 to 5 when executing the computer management program stored in the memory.
8. A computer-readable storage medium, characterized in that A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of the web page batch processing method for upgrading the browser from IE to Edge as described in any one of claims 1 to 5 are implemented.