Page parameter verification method, device, electronic equipment, medium and program product
By checking and recording abnormal results on page parameters, the display problem caused by the page parameters not complying with the rules is solved, timely discovery and correction are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202210138863.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-02-15
AI Technical Summary
When the page parameters do not comply with the rules, they are often discovered only after the page exception occurs, resulting in page display failure or errors, affecting the user experience.
Provides a page parameter verification method, which can check by obtaining the target page parameters and pre-configured parameter rules, record abnormal verification results, and output alarm information when the threshold is reached, and promptly discover and correct parameter errors.
Timely discover and correct page parameter errors to ensure that the page is displayed correctly and improve user experience.
Smart Images

Figure CN114579433B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data verification, and in particular to a page parameter verification method, device, electronic device, medium and program product. Background Art
[0002] When displaying pages of websites, applications, etc., the page parameters may not meet the requirements, resulting in page display failure, page error display, or business process errors in the displayed page. However, it is often only after the abnormal situation of the page occurs that we will realize that the page parameters do not meet the parameter rules.
[0003] Therefore, how to promptly discover that page parameters do not meet the rules will help to repair the page to be displayed as soon as possible, so as to obtain and display the correct page, thereby improving the user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a page parameter verification method, device, electronic device, medium and program product. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a page parameter verification method is provided, comprising:
[0006] In response to a display request for a target page to be displayed, obtaining at least one parameter of the target page;
[0007] Obtaining pre-configured parameter rules of the target page;
[0008] Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result;
[0009] When the verification result is an abnormal verification result in which at least one acquired parameter does not satisfy the parameter rule, the abnormal verification result of the target page is recorded.
[0010] Optionally, obtaining a pre-configured parameter rule of the target page includes:
[0011] Obtaining a pre-configured parameter detection script, wherein the parameter detection script is used to obtain pre-configured parameter rules of the target page;
[0012] Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes:
[0013] The parameter detection script is called, and at least one acquired parameter is verified according to the parameter rule to obtain a verification result.
[0014] Optionally, obtaining a pre-configured parameter rule of the target page includes:
[0015] Obtaining pre-configured parameters with a necessity identifier required for displaying the target page;
[0016] Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes:
[0017] It is checked whether the at least one acquired parameter includes a parameter having a necessity identifier, and a necessity check sub-result is obtained.
[0018] Optionally, obtaining a pre-configured parameter rule of the target page includes:
[0019] Obtaining the pre-configured parameter types of various parameters required for displaying the target page, the parameter types including: number, string, integer, decimal;
[0020] Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes:
[0021] Check whether the type of at least one parameter obtained is consistent with the parameter type pre-configured for the parameter, and obtain a type check subresult.
[0022] Optionally, obtaining a pre-configured parameter rule of the target page includes:
[0023] Obtaining a pre-configured association relationship between parameters required for displaying the target page;
[0024] Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes:
[0025] Check whether the at least one acquired parameter satisfies the pre-configured association relationship between the parameters, and obtain an association relationship check sub-result.
[0026] Optionally, recording the abnormality check result of the target page includes:
[0027] According to the number of each type of check sub-results in the abnormal check result of the target page, a statistical chart is generated and displayed, where one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: a necessity identifier, a parameter type, and an association relationship between parameters.
[0028] Optionally, recording the abnormality check result of the target page includes:
[0029] When the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of syndrome sub-results in the abnormal verification results of the target page reaches a second threshold, an alarm message is output.
[0030] Optionally, the method further comprises:
[0031] According to the pre-configured format of the parameter rules of the target page, configure the parameter rules of other pages based on the same technology stack as the target page;
[0032] In response to a display request for other pages, obtaining and verifying whether at least one parameter of the other pages meets the configured parameter rule of the other pages, and obtaining an abnormality verification result of the other pages;
[0033] Generating and displaying a statistical chart according to the number of each type of syndrome sub-results in the abnormal syndrome verification result of the target page, further comprising:
[0034] A statistical chart is generated and displayed according to the number of each type of syndrome sub-results in the abnormality verification result of the target page and the abnormality verification results of the other pages.
[0035] Optionally, when the number of abnormal verification results of the target page reaches a first threshold, or when the number of any type of syndrome sub-results in the abnormal verification results of the target page reaches a second threshold, outputting an alarm message further includes:
[0036] When the sum of the number of abnormal verification results of the target page and the number of abnormal verification results of the other pages reaches the first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and the abnormal verification results of the other pages reaches the second threshold, an alarm message is output.
[0037] According to a second aspect of an embodiment of the present disclosure, a page parameter verification device is provided, including:
[0038] A parameter acquisition module, configured to acquire at least one parameter of a target page in response to a display request for the target page to be displayed;
[0039] A rule acquisition module is configured to acquire pre-configured parameter rules of the target page;
[0040] A verification module is configured to verify the at least one parameter obtained according to the parameter rule to obtain a verification result;
[0041] The abnormality recording module is configured to record the abnormality verification result of the target page when the verification result is an abnormality verification result in which at least one acquired parameter does not satisfy the parameter rule.
[0042] Optionally, the rule acquisition module includes:
[0043] A script acquisition unit is configured to acquire a pre-configured parameter detection script, wherein the parameter detection script is used to acquire the pre-configured parameter rules of the target page;
[0044] The verification module comprises:
[0045] The calling unit is configured to call the parameter detection script, verify the at least one acquired parameter according to the parameter rule, and obtain a verification result.
[0046] Optionally, the rule acquisition module includes:
[0047] A first acquisition unit is configured to acquire pre-configured parameters with a necessity identifier required for displaying the target page;
[0048] The verification module comprises:
[0049] The first verification unit is configured to verify whether the at least one acquired parameter includes a parameter with a necessity identifier, and obtain a necessity verification sub-result.
[0050] Optionally, the rule acquisition module includes:
[0051] A second acquisition unit is configured to acquire a parameter type of each parameter required for displaying the target page, the parameter type including: a number, a string, an integer, and a decimal;
[0052] The verification module comprises:
[0053] The second verification unit is configured to verify whether the type of the at least one parameter obtained is consistent with the parameter type pre-configured for the parameter, and obtain a type verification sub-result.
[0054] Optionally, the rule acquisition module includes:
[0055] A third acquisition unit is configured to acquire an association relationship between pre-configured parameters required for displaying the target page;
[0056] The verification module comprises:
[0057] The third verification unit is configured to verify whether the at least one acquired parameter satisfies a pre-configured association relationship between the parameters, and obtain an association relationship verification sub-result.
[0058] Optionally, the exception recording module includes:
[0059] A chart generating unit is configured to generate and display a statistical chart according to the number of each type of check sub-results in the abnormal check result of the target page, wherein one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: a necessity identifier, a parameter type, and an association relationship between parameters.
[0060] Optionally, the exception recording module includes:
[0061] The alarm information output unit is configured to output an alarm message when the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page reaches a second threshold.
[0062] Optionally, the device further comprises:
[0063] The other page configuration module is configured to configure the parameter rules of other pages based on the same technology stack as the target page according to the format of the parameter rules of the target page pre-configured;
[0064] The other page verification module is configured to, in response to a display request for other pages, obtain and verify whether at least one parameter of the other pages satisfies the configured parameter rule of the other pages, and obtain an abnormality verification result of the other pages;
[0065] The chart generating unit comprises:
[0066] The chart generating subunit is configured to generate and display a statistical chart according to the number of each type of verification sub-results in the abnormal verification result of the target page and the abnormal verification results of the other pages.
[0067] Optionally, the alarm information output unit includes:
[0068] The alarm information output sub-unit is configured to output an alarm message when the sum of the number of abnormal verification results of the target page and the abnormal verification results of the other pages reaches the first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and the abnormal verification results of the other pages reaches the second threshold.
[0069] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0070] processor;
[0071] a memory for storing instructions executable by the processor;
[0072] The processor is configured to execute the instructions to implement the page parameter verification method as described in the first aspect.
[0073] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the page parameter verification method as described in the first aspect.
[0074] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program or a computer instruction, wherein when the computer program or the computer instruction is executed by a processor, the page parameter verification method as described in the first aspect is implemented.
[0075] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0076] In the present disclosure, in response to a display request for a target page to be displayed, when the target page is to be displayed, at least one parameter of the target page is obtained, and a pre-configured parameter rule of the target page is obtained; by verifying whether the obtained parameters of the target page satisfy the pre-configured parameter rules, abnormal verification results that the parameters do not satisfy the pre-configured parameter rules can be discovered in time, and the abnormal verification results are recorded; in this way, according to the recorded abnormal verification results, the parameters can be corrected in time to repair the target page, so that the target page can be displayed correctly.
[0077] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0079] Figure 1 is a flow chart of a page parameter verification method according to an exemplary embodiment;
[0080] Figure 2 is a statistical histogram of the abnormality check results in the present disclosure;
[0081] Figure 3 is a block diagram of a page parameter checking device according to an exemplary embodiment;
[0082] Figure 4 The figure is a block diagram of a device for verifying page parameters according to an exemplary embodiment. DETAILED DESCRIPTION
[0083] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0084] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0085] Figure 1 is a flow chart of a page parameter verification method according to an exemplary embodiment. Figure 1 As shown, the page parameter verification method can be used in electronic devices such as computers, mobile phones, and tablet computers, and includes the following steps.
[0086] In step S11, in response to a display request for a target page to be displayed, at least one parameter of the target page is obtained.
[0087] The target page can be a page of an application, a website, a network platform, etc. In response to a display request for a target page to be displayed, vue-router (a routing manager) controls the page display, sends the URL (Uniform Resource Locator) of the target page and multiple parameters of the target page; and obtains at least one parameter of the sent target page.
[0088] In step S12, the pre-configured parameter rules of the target page are obtained.
[0089] According to different business needs, the parameters required for different pages may be different. The multiple parameters required to correctly display the target page and the pre-configured parameter rules of the multiple parameters can be determined through the URL of the target page. Among them, the pre-configured parameter rules of the target page can be obtained through the URL of the target page, or the pre-configured parameter rules of the target page can be stored in a preset location, and the pre-configured parameter rules of the target page can be obtained from the preset location. The parameters required for the target page need to meet the parameter rules corresponding to the pre-configured parameters in order to correctly display the target page. The parameter rules for the parameters required to correctly display the target page are pre-configured. The parameter rules of a parameter include whether the parameter is a necessary parameter, the parameter type, the association relationship with other parameters, etc. Among them, the necessary parameters refer to parameters with a necessity mark. The absence of necessary parameters will have a more serious adverse effect on the normal display of the page.
[0090] It is understandable that when only one or some parameters do not satisfy the corresponding parameter rules, the page displayed may be no different from the correctly displayed page in terms of appearance or some functions, but it is not a correct display.
[0091] In step S13, at least one acquired parameter is verified according to the parameter rule to obtain a verification result.
[0092] Verify at least one parameter of the acquired target page to see whether it satisfies the parameter rule required for correctly displaying the target page, and obtain verification results, including normal verification results in which the acquired parameters satisfy the pre-configured parameter rules, and abnormal verification results in which the acquired parameters do not satisfy the pre-configured parameter rules.
[0093] In step S14, when the verification result is an abnormal verification result in which at least one acquired parameter does not satisfy the parameter rule, the abnormal verification result of the target page is recorded.
[0094] Because when one or part of the parameters of the target page do not meet the corresponding parameter rules, it may not affect the normal use of the target page, so it is only necessary to record the abnormal verification results so that relevant personnel can check the recorded abnormal verification results in time and correct the parameters that do not meet the corresponding parameter rules. The recorded abnormal verification results may include the verification time, the target page, the type of parameter rules that are not met, etc.
[0095] In the present disclosure, in response to a display request for a target page to be displayed, when the target page is to be displayed, at least one parameter of the target page is obtained, and a pre-configured parameter rule of the target page is obtained; by verifying whether the obtained parameters of the target page satisfy the pre-configured parameter rules, abnormal verification results that the parameters do not satisfy the pre-configured parameter rules can be discovered in time, and the abnormal verification results are recorded; in this way, according to the recorded abnormal verification results, the parameters can be corrected in time to repair the target page, so that the target page can be displayed correctly.
[0096] On the basis of the above technical solution, the parameter rules of the pre-configured target page may be obtained through a parameter detection script.
[0097] The parameter detection script can be injected into the beforeResolve (lifecycle) hook function of vue-router, where the beforeResolve hook is to implement the logic executed by the page display. The parameter detection script can obtain the pre-configured parameter rules of the target page. Optionally, the parameter detection script can also verify whether at least one parameter obtained satisfies the pre-configured parameter rules based on the obtained parameter rules to obtain a verification result.
[0098] When the vue-router controls the page display and sends the page parameters, the beforeResolve hook function in vue-router is executed to call the parameter detection script. The parameter detection script obtains at least one parameter of the target page and obtains the pre-configured parameter rules of the target page, and verifies whether the at least one parameter obtained satisfies the pre-configured parameter rules to obtain the verification result.
[0099] Using the parameter detection script can automatically check the parameters of the target page, and it is convenient to transplant the parameter detection script to the vue-router corresponding to other pages to realize automatic parameter verification of other pages.
[0100] On the basis of the above technical solution, obtaining the parameter rules corresponding to the parameters required for the correct display of the target page that are pre-configured may include: obtaining the parameters with necessity marks required for the pre-configured display of the target page. The target page has multiple parameters, some of which are not passed, which may seriously affect the correct display of the target page. These parameters can be called necessary parameters, which carry necessity marks; other parameters other than necessary parameters are not passed, which may not seriously affect the display of the target page. These parameters can be called non-essential parameters, which do not carry necessity marks.
[0101] In order to avoid the situation where the target page fails to be displayed, it is possible to check whether the parameters of the target page sent include all the necessary parameters of the target page, thereby obtaining the necessity check sub-result. The necessity check sub-result includes a normal necessity check sub-result and an abnormal necessity check sub-result, and the abnormal necessity check sub-result is recorded.
[0102] When the pre-configured necessary parameters for correctly displaying the target page include the A parameter, and the obtained parameters of the delivered target page do not include the A parameter, the abnormal necessity check sub-result can be obtained and recorded.
[0103] It is understandable that the range of the parameters of the target page that are obtained and sent will only be less than or equal to the range of the parameters required to correctly display the target page. For example, if the parameters required to correctly display the target page include three parameters A, B, and C, then the parameters of the target page that are sent will only be three parameters A, B, and C at most.
[0104] Based on the above technical solution, obtaining the pre-configured parameter rules corresponding to the parameters required to correctly display the target page may include: obtaining the parameter types corresponding to the pre-configured parameters required to display the target page, and the parameter types include but are not limited to: numbers, strings, integers, and decimals.
[0105] Verify whether the type of each parameter of the delivered target page is consistent with the parameter type of the pre-configured target page, thereby obtaining a type check sub-result. The type check sub-result includes a normal type check sub-result and an abnormal type check sub-result, and the abnormal type check sub-result is recorded.
[0106] When the parameter type corresponding to a pre-configured parameter required for correctly displaying the target page is an integer, and the parameter type corresponding to the obtained parameter is a decimal, the type of the obtained parameter does not meet the pre-configured parameter type, and an abnormal type check sub-result is obtained and recorded.
[0107] Based on the above technical solution, obtaining the parameter rules corresponding to the pre-configured parameters required for correctly displaying the target page may include: obtaining the association relationship between the pre-configured parameters required for displaying the target page, wherein some parameters may have an association relationship, while some parameters may not have an association relationship.
[0108] There are many types of associations between parameters, for example: when the parameter value of parameter A is 1, the parameter value of parameter B must be 2, when the parameter value of parameter A is not 1, the parameter value of parameter B must be 3; or when parameter A is an integer, the parameter value of parameter B is 1. The associations between parameters can be configured according to actual needs.
[0109] Verify whether the parameters of the delivered target page satisfy the association relationship between the pre-configured parameters, thereby obtaining the association relationship verification sub-result. The association relationship verification sub-result includes a normal association relationship verification sub-result and an abnormal association relationship verification sub-result, and the abnormal association relationship verification sub-result is recorded.
[0110] When the pre-configured association relationship between the A parameter and the B parameter required for correctly displaying the target page is that the parameter values of the two must be equal, and the obtained parameter value of the A parameter is 1, and the obtained parameter value of the B parameter is 2, then the A parameter and the B parameter do not satisfy the pre-configured association relationship between the A parameter and the B parameter, and the abnormal association relationship check sub-result is obtained and recorded.
[0111] It can be understood that it is possible to simultaneously verify whether the acquired parameters include parameters with necessity identifiers, whether the types are consistent with the pre-configured parameter types, and whether the association relationship between the pre-configured parameters is satisfied, thereby respectively obtaining and recording the necessity check sub-result, type check sub-result and association check sub-result.
[0112] Based on the above technical solution, according to the recorded abnormality check results, statistical charts can be generated and displayed to realize the visualization of abnormality check results. The statistical charts can be histograms, line graphs, pie charts, tables, etc., which are not limited in the present disclosure.
[0113] Optionally, a statistical chart can be generated based on the number of each type of check sub-result in the abnormal check result of the target page, wherein one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: necessity identification, parameter type, and association relationship between parameters. Based on the necessity identification check factor, a necessity check sub-result can be generated; based on the parameter type check factor, a type check sub-result can be generated; based on the association relationship check factor between parameters, an association relationship check sub-result can be generated;
[0114] The statistical chart may include the number of abnormal check results in each time period, the number of abnormal check sub-results of each type in each time period, the total number of abnormal check sub-results of each type, the trend of abnormal check results, etc. Figure 2 It is a statistical histogram of the abnormal check results in the present disclosure, and the number of abnormal check sub-results of each type in each time period is recorded in the statistical histogram.
[0115] Based on the generated statistical charts, relevant personnel can intuitively see the abnormal verification results and correct the parameters accordingly.
[0116] On the basis of the above technical solution, statistical charts can also be generated by combining the abnormality check results of the target page and other pages.
[0117] The parameter rule configurations of multiple pages based on the same vue (a progressive framework for building data-driven web interfaces) technology stack can be in the same format, but the parameter values of the parameters of different pages may be different. Therefore, according to the format of the parameter rules of the pre-configured target page, the parameter rules of other pages based on the same technology stack as the target page can be pre-configured.
[0118] In response to a display request for other pages, various parameters of other pages are obtained, as well as pre-configured parameter rules for other pages; various parameters of other pages are checked to see whether they meet the configured parameter rules for other pages, and abnormality verification results of other pages are obtained. The technical means for obtaining abnormality verification results of other pages can refer to the technical means for obtaining abnormality verification results of target pages described above, and will not be repeated here.
[0119] A statistical chart can be generated and displayed based on the number of abnormal verification results of the target page and other pages. A statistical chart can be generated and displayed based on the number of each type of verification sub-result in the abnormal verification results of the target page and other pages. The abnormal verification results of the target page and other pages can be displayed in the same statistical chart, or the abnormal verification results of each page can be displayed in different statistical charts.
[0120] On the basis of the above technical solution, when the number of abnormal verification results of the target page reaches a first threshold, or the number of any type of verification sub-results in the abnormal verification results of the target page reaches a second threshold, an alarm message is output so that relevant personnel can correct the parameters in time. The first threshold and the second threshold are respectively preset values; an alarm message can be sent to relevant personnel in a preset manner, such as reminding developers through text messages that the number of abnormal verification results reaches the first threshold. Different thresholds can be set for the number of each type of abnormal verification sub-results, and an alarm message is output when the number of an abnormal verification sub-result reaches the corresponding threshold.
[0121] If an alarm message is output for each abnormal verification result, there may be false alarms and the relevant personnel will be frequently disturbed. Considering that one or part of the abnormal verification results usually do not affect the normal display of the page, the alarm message is output only when the number of abnormal verification results of the target page reaches the threshold.
[0122] On the basis of the above technical solution, the sum of the number of abnormal verification results of the target page and other pages can also be combined to determine whether to output an alarm message. When the sum of the number of abnormal verification results of the target page and other pages reaches a first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and other pages reaches a second threshold, an alarm message is output.
[0123] In the present disclosure, automatic verification of page parameters is realized, and the correlation between parameters can also be verified; even if the page is displayed and the relevant personnel are unaware of it, abnormal verification results can still be discovered and recorded, so that the relevant personnel can correct the parameters in time according to the recorded abnormal verification results; in addition, when the number of abnormal verification results reaches a threshold, an alarm can be issued to remind the relevant personnel to correct the parameters; an overall solution of automatic parameter verification, reporting, and alarm is realized, so that the relevant personnel can promptly perceive the page abnormalities caused by the parameters not meeting the parameter rules, thereby improving the user experience.
[0124] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0125] Figure 3 is a block diagram of a page parameter verification device according to an exemplary embodiment. Figure 3 The device includes a parameter acquisition module 31, a rule acquisition module 32, a verification module 33 and an abnormality recording module 34.
[0126] The parameter acquisition module is configured to acquire at least one parameter of the target page in response to a display request for the target page to be displayed;
[0127] The rule acquisition module 32 is configured to acquire the pre-configured parameter rules of the target page;
[0128] The verification module 33 is configured to verify the at least one parameter obtained according to the parameter rule to obtain a verification result;
[0129] The exception recording module 34 is configured to record the abnormal verification result of the target page when the verification result is an abnormal verification result that at least one acquired parameter does not satisfy the parameter rule.
[0130] Optionally, the rule acquisition module 32 includes:
[0131] A script acquisition unit is configured to acquire a pre-configured parameter detection script, wherein the parameter detection script is used to acquire the pre-configured parameter rules of the target page;
[0132] The verification module 33 includes:
[0133] The calling unit is configured to call the parameter detection script, verify the at least one acquired parameter according to the parameter rule, and obtain a verification result.
[0134] Optionally, the rule acquisition module 32 includes:
[0135] A first acquisition unit is configured to acquire pre-configured parameters with a necessity identifier required for displaying the target page;
[0136] The verification module 33 includes:
[0137] The first verification unit is configured to verify whether the at least one acquired parameter includes a parameter with a necessity identifier, and obtain a necessity verification sub-result.
[0138] Optionally, the rule acquisition module 32 includes:
[0139] A second acquisition unit is configured to acquire a parameter type of each parameter required for displaying the target page, the parameter type including: a number, a string, an integer, and a decimal;
[0140] The verification module 33 includes:
[0141] The second verification unit is configured to verify whether the type of the at least one parameter obtained is consistent with the parameter type pre-configured for the parameter, and obtain a type verification sub-result.
[0142] Optionally, the rule acquisition module 32 includes:
[0143] A third acquisition unit is configured to acquire an association relationship between pre-configured parameters required for displaying the target page;
[0144] The verification module 33 includes:
[0145] The third verification unit is configured to verify whether the at least one acquired parameter satisfies a pre-configured association relationship between the parameters, and obtain an association relationship verification sub-result.
[0146] Optionally, the abnormality recording module 34 includes:
[0147] A chart generating unit is configured to generate and display a statistical chart according to the number of each type of check sub-results in the abnormal check result of the target page, wherein one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: a necessity identifier, a parameter type, and an association relationship between parameters.
[0148] Optionally, the abnormality recording module 34 includes:
[0149] The alarm information output unit is configured to output an alarm message when the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page reaches a second threshold.
[0150] Optionally, the device further comprises:
[0151] The other page configuration module is configured to configure the parameter rules of other pages based on the same technology stack as the target page according to the format of the parameter rules of the target page pre-configured;
[0152] The other page verification module is configured to, in response to a display request for other pages, obtain and verify whether at least one parameter of the other pages satisfies the configured parameter rule of the other pages, and obtain an abnormality verification result of the other pages;
[0153] The chart generating unit comprises:
[0154] The chart generating subunit is configured to generate and display a statistical chart according to the number of each type of verification sub-results in the abnormal verification result of the target page and the abnormal verification results of the other pages.
[0155] Optionally, the alarm information output unit includes:
[0156] The alarm information output sub-unit is configured to output an alarm message when the sum of the number of abnormal verification results of the target page and the abnormal verification results of the other pages reaches the first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and the abnormal verification results of the other pages reaches the second threshold.
[0157] Figure 4 4 is a block diagram of an apparatus 400 for page parameter verification according to an exemplary embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0158] Reference Figure 4 , the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0159] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0160] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0161] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.
[0162] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0163] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0164] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0165] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, and the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0166] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0167] In an exemplary embodiment, the electronic device 400 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned page parameter verification method.
[0168] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0169] In an exemplary embodiment, a computer program product is also provided, the computer program product includes a readable program code, the readable program code can be executed by the processor 420 of the electronic device 400 to complete the above-mentioned page parameter verification method. Optionally, the program code can be stored in a storage medium of the electronic device 400, and the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0170] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0171] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A page parameter verification method, characterized in that: The method comprises: In response to a display request for a target page to be displayed, obtaining at least one parameter of the target page; Obtaining the pre-configured parameter rules of the target page; the pre-configured parameter rules of the target page include: multiple parameters required for correctly displaying the target page determined by the URL of the target page and parameter rules of the pre-configured multiple parameters, and different pages require different parameters according to different business requirements; the parameters include parameters with necessity marks required for displaying the target page; Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result; When the verification result is an abnormal verification result in which at least one of the acquired parameters does not satisfy the parameter rule, recording the abnormal verification result of the target page; The step of obtaining the pre-configured parameter rules of the target page includes: Obtaining a pre-configured association relationship between parameters required for displaying the target page; Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes: Check whether the at least one acquired parameter satisfies the pre-configured association relationship between the parameters, and obtain an association relationship check sub-result.
2. The method according to claim 1, characterized in that Obtaining the pre-configured parameter rules of the target page, including: Obtaining a pre-configured parameter detection script, wherein the parameter detection script is used to obtain pre-configured parameter rules of the target page; Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes: The parameter detection script is called, and at least one acquired parameter is verified according to the parameter rule to obtain a verification result.
3. The method according to claim 1, characterized in that Obtaining the pre-configured parameter rules of the target page, including: Obtaining pre-configured parameters with a necessity identifier required for displaying the target page; Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes: It is checked whether the at least one acquired parameter includes a parameter having a necessity identifier, and a necessity check sub-result is obtained.
4. The method according to claim 1, characterized in that: Obtaining the pre-configured parameter rules of the target page, including: Obtaining the pre-configured parameter types of various parameters required for displaying the target page, the parameter types including: number, string, integer, decimal; Verifying at least one of the acquired parameters according to the parameter rule to obtain a verification result includes: Check whether the type of at least one parameter obtained is consistent with the parameter type pre-configured for the parameter, and obtain a type check subresult.
5. The method according to any one of claims 3-4, characterized in that: Recording the abnormality check result of the target page includes: According to the number of each type of check sub-results in the abnormal check result of the target page, a statistical chart is generated and displayed, where one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: a necessity identifier, a parameter type, and an association relationship between parameters.
6. The method according to claim 5, characterized in that Recording the abnormality check result of the target page includes: When the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of syndrome sub-results in the abnormal verification results of the target page reaches a second threshold, an alarm message is output.
7. The method according to claim 6, characterized in that The method further comprises: According to the pre-configured format of the parameter rules of the target page, configure the parameter rules of other pages based on the same technology stack as the target page; In response to a display request for other pages, obtaining and verifying whether at least one parameter of the other pages meets the configured parameter rule of the other pages, and obtaining an abnormality verification result of the other pages; Generating and displaying a statistical chart according to the number of each type of syndrome sub-results in the abnormal syndrome verification result of the target page, further comprising: A statistical chart is generated and displayed according to the number of each type of syndrome sub-results in the abnormality verification result of the target page and the abnormality verification results of the other pages.
8. The method according to claim 7, characterized in that When the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of syndrome sub-results in the abnormal verification results of the target page reaches a second threshold, outputting an alarm message, further comprising: When the sum of the number of abnormal verification results of the target page and the number of abnormal verification results of the other pages reaches the first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and the abnormal verification results of the other pages reaches the second threshold, an alarm message is output.
9. A page parameter verification device, characterized in that: The device comprises: A parameter acquisition module, configured to acquire at least one parameter of a target page in response to a display request for the target page to be displayed; A rule acquisition module is configured to acquire pre-configured parameter rules of the target page; the pre-configured parameter rules of the target page include: multiple parameters required for correctly displaying the target page determined by the URL of the target page and parameter rules of the pre-configured multiple parameters, and different parameters required for different pages are different according to different business requirements; the parameters include parameters with necessity marks required for displaying the target page; A verification module is configured to verify the at least one parameter obtained according to the parameter rule to obtain a verification result; an abnormality recording module, configured to record the abnormality verification result of the target page when the verification result is an abnormality verification result that at least one parameter obtained does not satisfy the parameter rule; Wherein, the rule acquisition module includes: A third acquisition unit is configured to acquire an association relationship between pre-configured parameters required for displaying the target page; The verification module comprises: The third verification unit is configured to verify whether the at least one acquired parameter satisfies a pre-configured association relationship between the parameters, and obtain an association relationship verification sub-result.
10. The device according to claim 9, characterized in that The rule acquisition module includes: A script acquisition unit is configured to acquire a pre-configured parameter detection script, wherein the parameter detection script is used to acquire the pre-configured parameter rules of the target page; The verification module comprises: The calling unit is configured to call the parameter detection script, verify the at least one acquired parameter according to the parameter rule, and obtain a verification result.
11. The device according to claim 9, characterized in that The rule acquisition module includes: A first acquisition unit is configured to acquire pre-configured parameters with a necessity identifier required for displaying the target page; The verification module comprises: The first verification unit is configured to verify whether the at least one acquired parameter includes a parameter with a necessity identifier, and obtain a necessity verification sub-result.
12. The device according to claim 9, characterized in that The rule acquisition module includes: A second acquisition unit is configured to acquire a parameter type of each parameter required for displaying the target page, the parameter type including: a number, a string, an integer, and a decimal; The verification module comprises: The second verification unit is configured to verify whether the type of the at least one parameter obtained is consistent with the parameter type pre-configured for the parameter, and obtain a type verification sub-result.
13. The device according to any one of claims 11-12, characterized in that: The abnormality recording module comprises: A chart generating unit is configured to generate and display a statistical chart according to the number of each type of check sub-results in the abnormal check result of the target page, wherein one type of check sub-result is generated based on a check factor, and the check factor includes at least one of the following: a necessity identifier, a parameter type, and an association relationship between parameters.
14. The device according to claim 13, characterized in that The abnormality recording module comprises: The alarm information output unit is configured to output an alarm message when the number of the abnormal verification results of the target page reaches a first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page reaches a second threshold.
15. The device according to claim 14, characterized in that The device also includes: The other page configuration module is configured to configure the parameter rules of other pages based on the same technology stack as the target page according to the format of the parameter rules of the target page pre-configured; The other page verification module is configured to, in response to a display request for other pages, obtain and verify whether at least one parameter of the other pages satisfies the configured parameter rule of the other pages, and obtain an abnormality verification result of the other pages; The chart generating unit comprises: The chart generating subunit is configured to generate and display a statistical chart according to the number of each type of verification sub-results in the abnormal verification result of the target page and the abnormal verification results of the other pages.
16. The device according to claim 15, characterized in that The alarm information output unit comprises: The alarm information output sub-unit is configured to output an alarm message when the sum of the number of abnormal verification results of the target page and the abnormal verification results of the other pages reaches the first threshold, or when the number of any type of verification sub-results in the abnormal verification results of the target page and the abnormal verification results of the other pages reaches the second threshold.
17. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instruction to implement the page parameter verification method as described in any one of claims 1 to 8.
18. A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page parameter verification method as claimed in any one of claims 1 to 8.
19. A computer program product comprising a computer program or computer instructions, characterized in that When the computer program or computer instruction is executed by a processor, the page parameter verification method according to any one of claims 1 to 8 is implemented.