Method, device and computer-readable storage medium for calling front-end verification mode
By storing the front-end verification method by preset verification library, the problems of large workload and functional impact of web page modification are solved, and flexible front-end verification method management is realized.
Patent Information
- Application Number
- CN202210751046.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In the prior art, when setting up front-end verification methods on web pages, changes in grammar rules require modifications to all web pages, which is a lot of work and may affect other functions.
The preset verification library stores the front-end verification methods required by each web page. After receiving user instructions, the corresponding verification methods are obtained from the library and sent to the web page to avoid writing the web page code directly.
Reduce the modification workload, avoid the impact on other functions of the web page, and improve the flexibility and efficiency of front-end verification methods.
Smart Images

Figure CN115080034B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of front-end verification, and in particular to a method, device and computer-readable storage medium for calling a front-end verification mode. Background Art
[0002] The front-end verification method includes a variety of verifications, such as length verification, regularization verification, and numerical verification. When a user operates on the front-end web page, it is necessary to use the preset front-end verification method to implement the function corresponding to the user operation. For example, when a user enters an account and password in the front-end web page, it is necessary to use front-end verification methods such as regularization verification and length verification to determine whether the account and password entered by the user are correct. When setting the front-end verification method for a web page, the existing technology usually writes the various front-end verification methods required by the web page into the front-end code of the web page. However, when multiple web pages need to be set, if the grammatical rules of the front-end verification method change, the front-end verification methods in all web pages need to be modified. Not only is the workload large, but also because the front-end verification method is written into the front-end code, the modification may affect other functions of the web page. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, device and computer-readable storage medium for calling a front-end verification method, which does not require the front-end verification method to be written into the front-end code of the web page. When the grammatical rules of the front-end verification method change, there is no need to modify each web page, which reduces the workload and avoids affecting other functions of the web page.
[0004] To solve the above technical problems, the present invention provides a method for calling a front-end verification mode, comprising:
[0005] When a user instruction is received from any web page, determining a first identifier corresponding to the user instruction;
[0006] Obtaining a front-end verification method corresponding to the first identifier stored in a preset verification library;
[0007] The front-end verification method corresponding to the first identifier is sent to the webpage corresponding to the user instruction, so that the webpage performs front-end verification.
[0008] Preferably, sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction includes:
[0009] Sending the front-end verification method corresponding to the first identifier to the cache module;
[0010] The cache module is controlled to send the front-end verification method corresponding to the first identifier to the web page corresponding to the user instruction.
[0011] Preferably, before sending the front-end verification method corresponding to the first identifier to the cache module, the method further includes:
[0012] Determine whether there is a front-end verification method corresponding to the first identifier in the cache module;
[0013] If so, the front-end verification method corresponding to the first identifier is not sent to the cache module;
[0014] If not, the step of sending the front-end verification method corresponding to the first identifier to the cache module is entered.
[0015] Preferably, determining the unique identifier corresponding to the user instruction includes:
[0016] Determining the form name of the webpage corresponding to the user instruction;
[0017] A first identifier corresponding to the user instruction in the webpage is determined according to the form name.
[0018] Preferably, after sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction, the method further includes:
[0019] When a closing instruction of the webpage is received, the front-end verification mode in the webpage is cleared.
[0020] Preferably, before determining the first identifier corresponding to the user instruction, the method further includes:
[0021] Determine all the front-end verification methods required for each of the web pages;
[0022] Generate a second identifier corresponding to each of the front-end verification methods;
[0023] Writing the second identifiers corresponding to all front-end verification methods required by each of the web pages into the front-end code of each of the corresponding web pages, and using the second identifiers as the first identifiers;
[0024] All front-end verification methods required by each of the web pages are sent to the preset verification library.
[0025] Preferably, after sending all front-end verification methods required by each web page to the preset verification library, the method further includes:
[0026] Determine whether there are multiple front-end verification methods that are consistent with each other in the preset verification library;
[0027] If there are multiple front-end verification methods that are consistent with each other, then any one of the multiple front-end verification methods that are consistent with each other is determined as a reserved method;
[0028] Using the second identifiers corresponding to all other front-end verification methods that are consistent with the reservation method as the second identifier of the reservation method;
[0029] All other front-end verification methods that are consistent with the reserved method are removed from the preset verification library.
[0030] Preferably, after removing all other front-end verification methods that are consistent with the reserved method from the preset verification library, the method further includes:
[0031] Determining the number of mappings of the second identifier corresponding to each of the front-end verification modes;
[0032] Using the front-end verification method in which the mapping number is greater than the preset number as a public verification method;
[0033] Using the front-end verification method in which the mapping quantity is not greater than the preset quantity as a private verification method;
[0034] When a verification rule modification instruction corresponding to the public verification method is obtained, a copy method of the public verification method is generated;
[0035] Modify the verification rule of the copy mode according to the verification rule modification instruction;
[0036] The modified copy method is used as a private verification method.
[0037] The present invention also provides a front-end verification method calling device, comprising:
[0038] memory for storing computer programs;
[0039] The processor is used to implement the steps of the calling method of the front-end verification mode as described above when executing the computer program.
[0040] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the calling method of the front-end verification mode described above are implemented.
[0041] The present invention provides a method, device and computer-readable storage medium for calling a front-end verification method, which relates to the field of front-end verification. When a user instruction is received from any web page, a first identifier corresponding to the user instruction is determined, and then the front-end verification method corresponding to the first identifier is obtained from a preset verification library. Finally, the front-end verification method corresponding to the first identifier is sent to the web page corresponding to the user instruction, so that the web page performs front-end verification. By pre-storing the front-end verification methods required by the web page in the preset verification library, when the web page needs to use certain front-end verification methods, they are taken out from the preset verification library for use. There is no need to write the front-end verification method into the front-end code of the web page. When the grammatical rules of the front-end verification method change, there is no need to modify each web page, which reduces the workload and avoids affecting other functions of the web page. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A flowchart of a method for calling a front-end verification mode provided in this application;
[0044] Figure 2 A schematic diagram of selecting a front-end verification method provided by this application;
[0045] Figure 3 A schematic diagram of the structure of a calling device for a front-end verification method provided in this application. DETAILED DESCRIPTION
[0046] The core of the present invention is to provide a method, device and computer-readable storage medium for calling a front-end verification method. There is no need to write the front-end verification method into the front-end code of the web page. When the grammatical rules of the front-end verification method change, there is no need to modify each web page, which reduces the workload and avoids affecting other functions of the web page.
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 efforts shall fall within the scope of protection of the present invention.
[0048] Please refer to Figure 1, Figure 1 A flowchart of a method for calling a front-end verification method provided in this application includes:
[0049] S1: When a user instruction is received from any web page, determining a first identifier corresponding to the user instruction;
[0050] Nowadays, many management software write the front-end verification rules into the front-end html (Hypertext Markup Language) code, for example, writing the front-end verification such as size verification, length verification and regular expression verification directly into the html code of the web page, or writing the front-end verification and the identifier corresponding to the front-end verification itself into the controller corresponding to the web page. This method will cause the front-end verification to be highly coupled with the code of the web page itself, making it difficult to maintain the web page itself or the front-end verification. In addition, on the other hand, the web page itself may have injection problems, such as Linux command injection attacks, SQL (Structured Query Language) injection attacks, etc. Due to the difficulty in maintaining the front-end verification, it will be impossible to accurately determine the specific impact of the discrepancy problem on the web page, which will affect web page development.
[0051] To address the above technical issues, in this application, the front-end verification function is not built into the web page, decoupling the front-end verification function from the web page itself, allowing the front-end verification function and the web page itself to exist independently of each other. When a user instruction is received from any web page, i.e., when the web page needs to use the front-end verification function to process and verify the user instruction, a first identifier corresponding to the user instruction is first determined. Specifically, the first identifier can be pre-set based on the type of web page and the user instruction. For example, if the web page receiving the user instruction is a user login web page, and the user enters their account number and password and clicks "Login" on the web page, the user instruction is a login instruction. Based on the user instruction and the web page type, the first identifier is the identifier required to verify whether the user's entered account number and password are correct. Based on this, a first identifier corresponding to each user instruction can be pre-set based on the user instruction, and then a link is established between each first identifier and a front-end verification method based on the user instruction, so that the user instruction and the front-end verification method required by the user instruction correspond to the same first identifier.
[0052] S2: Obtain a front-end verification method corresponding to the first identifier stored in a preset verification library;
[0053] In order to enable the web page to process and verify the user instructions, in this application, since the type of each web page and the functions implemented by each web page can be determined in advance, all front-end verification methods required for each web page can be stored in a preset verification library in advance, and the correspondence between each front-end verification method and the first identifier is also stored in the preset verification library. After the first identifier corresponding to the user instruction is determined, the front-end verification method corresponding to the first identifier can be obtained from the preset verification library based on the correspondence between the first identifier and the front-end verification method.
[0054] S3: Send the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction, so that the webpage performs the front-end verification.
[0055] After obtaining the front-end verification method corresponding to the first identifier, that is, after obtaining the front-end verification method that can process and verify the user instruction, the front-end verification method is sent to the web page that receives the user instruction, and the web page can process and verify the user instruction. For example, if the web page that receives the user instruction is a user login web page, and the user enters the account and password and clicks "Login" on the web page, the user instruction is a login instruction. According to the user instruction and the web page type, in order to verify the user account and password, at least length check and regular check are required. Please refer to Figure 2 , Figure 2 A schematic diagram of a front-end verification method selected for this application, wherein first, a required check is needed to verify whether the user has entered the account and password, and then a length check is needed to verify whether the character length of the account and password entered by the user meets the requirements. For example, when the web page requires the password to be between 6 and 22 digits, a length check is used to determine whether the password entered by the user is greater than 6 digits and less than 22 digits, while a regular check is used to verify whether the account entered by the user is a registered account and whether the password entered by the user is the password corresponding to the account, and a numerical check is used to verify whether the personal information entered by the user, such as age and height, is reasonable. Based on this, after obtaining the two front-end verification methods of length check and regular check, these two front-end verification methods are sent to the web page, and the web page can then verify the user's account and password so that the user can log in.
[0056] In addition, the first identifier used in this application can be a regular expression, or a user-defined string or other identifier that can reflect the function of the first identifier, and this application does not limit this.
[0057] To sum up, when a user instruction is received from any web page, the first identifier corresponding to the user instruction is determined, and then the front-end verification method corresponding to the first identifier is obtained from the preset verification library, and finally the front-end verification method corresponding to the first identifier is sent to the web page corresponding to the user instruction, so that the web page performs front-end verification. By storing the front-end verification methods required by the web page in the preset verification library in advance, when the web page needs to use certain front-end verification methods, they are taken out from the preset verification library for use. There is no need to write the front-end verification method into the front-end code of the web page. When the grammatical rules of the front-end verification method change, there is no need to modify each web page, which reduces the workload and avoids affecting other functions of the web page.
[0058] Based on the above embodiment:
[0059] As a preferred embodiment, sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction includes:
[0060] Sending the front-end verification method corresponding to the first identifier to the cache module;
[0061] The control cache module sends the front-end verification method corresponding to the first identifier to the web page corresponding to the user instruction
[0062] In order to enable multiple web pages to achieve front-end verification at the same time, in this application, considering that users may open multiple web pages at the same time during use, it is necessary to ensure that all opened web pages can achieve front-end verification. At this time, considering that a cache module is usually provided in the device, and the cache module is a data storage and processing module that can be used by any application or web page, it is a component that can perform data interaction at high speed, and the data interaction priority between the cache module and the processor is higher than the data interaction priority between the memory module or the storage unit and the processor, that is, when the processor reads a certain data, it will first obtain it from the cache module. If the cache module does not have the data required by the processor, the processor will obtain it from other modules. It can be seen that if the front-end verification method is stored in the cache module, the speed of the web page calling the front-end verification method will be significantly improved; secondly, since the data stored in the cache module can be accessed by multiple applications at the same time, storing the front-end verification method in the cache module can not only enable multiple web pages to achieve front-end verification at the same time, but also enable multiple web pages to use the same front-end verification method at the same time, and also improve the speed of the web page calling the front-end verification method.
[0063] As a preferred embodiment, before sending the front-end verification method corresponding to the first identifier to the cache module, the method further includes:
[0064] Determine whether there is a front-end verification method corresponding to the first identifier in the cache module;
[0065] If it exists, the front-end verification method corresponding to the first identifier is not sent to the cache module;
[0066] If not, the step of sending the front-end verification method corresponding to the first identifier to the cache module is entered.
[0067] In order to save the storage space inside the cache module, in this application, considering that a certain front-end verification method in the cache module can be called by multiple web pages at the same time, it can be seen that for some front-end verification methods commonly needed by multiple web pages, there is no need to store multiple repeated front-end verification methods in the cache module, and the front-end verification method can also be called by multiple web pages at the same time. Based on this, before sending the front-end verification method to the cache module, it is first determined whether the front-end verification method to be sent exists in the cache module. If it exists, the front-end verification method is not sent to avoid storing repeated front-end verification methods in the cache module to save the storage space inside the cache module. If it does not exist, the front-end verification method is sent so that the corresponding web page can call the front-end verification method for use. It can be seen that by first determining whether the same front-end verification method exists in the cache module before sending the front-end verification method, the storage space inside the cache module can be effectively saved.
[0068] As a preferred embodiment, determining the unique identifier corresponding to the user instruction includes:
[0069] Determine the form name of the web page corresponding to the user instruction;
[0070] A first identifier corresponding to the user instruction in the webpage is determined according to the form name.
[0071] In order to accurately determine the front-end verification method required by the web page, in this application, taking into account that the functions corresponding to the same user instruction may be different in different web pages, before calling the front-end verification method, it is necessary to determine the form name of the web page that received the user instruction, that is, to determine the characteristic information of the web page, and determine the first identifier corresponding to the user instruction based on the characteristic information of the web page. For example, when the user instruction is the Enter key, the characteristic corresponding to the Enter key in web page A is that the user is logging in to an account, while the characteristic corresponding to the Enter key in web page B may be that the user is entering web page C. Therefore, when the web page that receives the user instruction is web page A, it is first necessary to determine that the characteristic corresponding to the user instruction in web page A is that the user is logging in to an account, and then it can be determined that the first identifier corresponding to the user instruction in the web page is the identifier corresponding to the account login, so that the front-end verification method related to the account login can be called for the web page later. Based on this, the front-end verification method required by the web page can be accurately determined.
[0072] As a preferred embodiment, after sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction, the method further includes:
[0073] When a closing instruction of a web page is received, the front-end verification mode in the web page is cleared.
[0074] In order to save storage space, in this application, since the front-end verification method used by the web page is not written into the front-end code of the web page, the purpose of completing the front-end verification is achieved by calling the front-end verification method in the preset verification library. When a closing instruction of a web page is received, it means that the user no longer needs to use the web page. It can be seen that after the web page is closed, the front-end verification method of the web page is no longer needed. Based on this, in order to reduce the amount of resources used by the web page and release space for use by other web pages or programs, after receiving the closing instruction of the web page, the front-end verification method obtained by calling in the web page is cleared, which is equivalent to restoring the web page to the state before the user opened the web page, so as to save storage space.
[0075] As a preferred embodiment, before determining the first identifier corresponding to the user instruction, the method further includes:
[0076] Determine all front-end validation methods required for each web page;
[0077] Generate a second identifier corresponding to each front-end verification method;
[0078] Write the second identifiers corresponding to all front-end verification methods required by each webpage into the front-end code of each corresponding webpage, and use the second identifiers as the first identifiers;
[0079] Send all front-end verification methods required by each web page to the preset verification library.
[0080] In order to accurately determine the first identifier corresponding to the user instruction, in this application, since the front-end verification method used by each web page is not written into the front-end code of the web page, and when the web page receives the user instruction, it is necessary to call the corresponding front-end verification method according to the user instruction, so in order to establish the correspondence between the user instruction and the front-end verification method, it is necessary to first determine all the front-end verification methods required by each web page, and then set multiple second identifiers. When the front-end verification methods required by each web page are different, each second identifier corresponds to each front-end verification method one by one. When the front-end verification methods required by each web page have the same front-end verification method, the same front-end verification method can correspond to a second identifier together. Then, for each web page, the second identifiers corresponding to all the front-end verification methods required by the web page are written into the front-end code of the web page, and then the user instructions corresponding to each second identifier are determined in the web page, which is equivalent to using the second identifier to replace the front-end verification method that should exist in the web page. Since all front-end verification methods required by each web page are stored in the preset verification library, and the second identifier corresponding to the front-end verification method will not change as the rules of the front-end verification method change, when the rules of the front-end verification method change, in addition to modifying the front-end verification method itself according to the rules, it is only necessary to determine the correspondence between the second identifier and the modified front-end verification method. By using the second identifier as the first identifier, not only can the first identifier corresponding to the user instruction be accurately determined, but also the impact of modifying the front-end verification method on other functions of the web page can be avoided.
[0081] As a preferred embodiment, after sending all front-end verification methods required by each web page to the preset verification library, the following is also included:
[0082] Determine whether there are multiple front-end verification methods that are consistent with each other in the preset verification library;
[0083] If there are multiple front-end verification methods that are consistent with each other, then any one of the multiple consistent front-end verification methods is determined as a reserved method;
[0084] The second identifiers corresponding to all other front-end verification methods that are consistent with the reserved method are used as the second identifiers of the reserved method;
[0085] Remove all other front-end verification methods that are consistent with the reserved method from the default verification library.
[0086] In order to save the storage space of the preset verification library, in this application, taking into account that among the front-end verification methods required by each web page, there are some front-end verification methods that are required by multiple web pages. These front-end verification methods can be called public verification methods. If all the front-end verification methods required by each web page are simply stored in the preset verification library, it will cause multiple duplicate public verification methods to be stored in the preset verification library. Moreover, in actual use, since the front-end verification methods required by these web pages are all the public verification methods, only one public verification method needs to be sent to these web pages at the same time. Therefore, only one front-end verification method needs to be stored in the preset verification library, even if the front-end verification methods finally stored in the preset verification library are different, so as to save the storage space of the preset verification library.
[0087] As a preferred embodiment, after removing all other front-end verification methods that are consistent with the reserved method from the preset verification library, the method further includes:
[0088] Determine the number of mappings of the second identifier corresponding to each front-end verification method;
[0089] The front-end verification method where the number of mappings is greater than the preset number is used as the public verification method;
[0090] The front-end verification method that the mapping amount is not greater than the preset amount is used as the private verification method;
[0091] When the verification rule modification instruction corresponding to the public verification method is obtained, a copy method of the public verification method is generated;
[0092] Modify the verification rules of the copy mode according to the verification rule modification instruction;
[0093] Use the modified copy mode as the private verification mode.
[0094] In order to ensure the normal use of the front-end verification method, in this application, considering that when the rules of the front-end verification method change, the rules of different web pages change differently, the modification methods of the front-end verification method are also different, and the front-end verification methods obtained after the modification are also different. Even when the rules of some web pages change, the rules of other web pages do not change. It can be seen that the public front-end method before modification can be used normally by all web pages, but when the rules of certain web pages change, if the public verification method is directly modified, it may result in the public verification method obtained after the modification being able to be used normally by some web pages, but other web pages cannot use this public verification method. Based on this, in the preset verification library, the number of mappings of the second identifier corresponding to each front-end verification method is first determined. If the mapping number is greater than the preset number, it means that multiple web pages require this front-end verification method. In this case, the front-end verification method with a mapping number greater than the preset number can be defined as a public verification method. The mapping number is less than the preset number, which means that the front-end verification method may be a method unique to a certain web page. These front-end verification methods can be defined as private verification methods. When modifying the public verification method, in order to avoid the problem that the modified front-end verification method can only be used by some web pages, a copy of the public verification method can be created first, and then the copy can be modified according to the rules. The modified part can then be used as the private verification method for all web pages corresponding to the original public verification method, so that these web pages can call the original public verification method and the modified copy method, to avoid the situation where some web pages can be used normally while others cannot be used.
[0095] In order to further avoid this situation, when making modifications, you can first determine which web pages’ rules have changed among the web pages corresponding to the public verification method, and then determine which web pages’ rule changes are the same among the web pages whose rules have changed. Then, generate multiple copies of the public verification method, and these copies correspond one-to-one to the rule change types of the web pages. Modifications are made according to the rules corresponding to these copies, and the modified copies are used as the private verification method for the web pages corresponding to the corresponding rule change types. For example, if web pages A, B, C, and D all require the X public verification method, but only the rules of web pages A, B, and C have changed, and the rule change types of A and B are the same, then two copies of the X public verification method are generated, namely X-1 and X-2. X-1 corresponds to the rule change type of A and B, and X-2 corresponds to the rule change type of C. X-1 and X-2 are modified according to their corresponding rules, and then the modified X-1 is used as the private verification method for web pages A and B, and the modified X-2 is used as the private verification method for web page C. D continues to use the original X public verification method. Based on this, the normal use of the front-end verification method can be effectively guaranteed.
[0096] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of a calling device for a front-end verification method provided in this application includes:
[0097] Memory 21, for storing computer programs;
[0098] The processor 22 is configured to implement the steps of the above-mentioned calling method of the front-end verification mode when executing a computer program.
[0099] For a detailed introduction to a calling device of a front-end verification method provided in this application, please refer to the embodiment of the calling method of the above-mentioned front-end verification method, and this application will not go into details here.
[0100] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the calling method of the front-end verification method as described above are implemented.
[0101] For a detailed introduction to a computer-readable storage medium provided in this application, please refer to the embodiment of the calling method of the above-mentioned front-end verification method, and this application will not go into details here.
[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0103] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for calling a front-end verification mode, characterized in that: include: When a user instruction is received from any web page, determining a first identifier corresponding to the user instruction; Obtaining a front-end verification method corresponding to the first identifier stored in a preset verification library; Sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction, so that the webpage performs the front-end verification; Before determining the first identifier corresponding to the user instruction, the method further includes: Determine all the front-end verification methods required for each of the web pages; Generate a second identifier corresponding to each of the front-end verification methods; Writing the second identifiers corresponding to all front-end verification methods required by each of the web pages into the front-end code of each of the corresponding web pages, and using the second identifiers as the first identifiers; All front-end verification methods required by each of the web pages are sent to the preset verification library.
2. The method for calling the front-end verification mode according to claim 1, characterized in that: Sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction includes: Sending the front-end verification method corresponding to the first identifier to the cache module; The cache module is controlled to send the front-end verification method corresponding to the first identifier to the web page corresponding to the user instruction.
3. The calling method of the front-end verification mode according to claim 2, characterized in that: Before sending the front-end verification method corresponding to the first identifier to the cache module, the method further includes: Determine whether there is a front-end verification method corresponding to the first identifier in the cache module; If so, the front-end verification method corresponding to the first identifier is not sent to the cache module; If not, the step of sending the front-end verification method corresponding to the first identifier to the cache module is entered.
4. The method for calling the front-end verification mode according to claim 1, wherein: Determining a unique identifier corresponding to the user instruction includes: Determining the form name of the webpage corresponding to the user instruction; A first identifier corresponding to the user instruction in the webpage is determined according to the form name.
5. The method for calling the front-end verification mode according to claim 1, wherein: After sending the front-end verification method corresponding to the first identifier to the webpage corresponding to the user instruction, the method further includes: When a closing instruction of the webpage is received, the front-end verification mode in the webpage is cleared.
6. The method for calling the front-end verification mode according to claim 1, wherein: After sending all front-end verification methods required by each web page to the preset verification library, the method further includes: Determine whether there are multiple front-end verification methods that are consistent with each other in the preset verification library; If there are multiple front-end verification methods that are consistent with each other, then any one of the multiple front-end verification methods that are consistent with each other is determined as a reserved method; Using the second identifiers corresponding to all other front-end verification methods that are consistent with the reservation method as the second identifier of the reservation method; All other front-end verification methods that are consistent with the reserved method are removed from the preset verification library.
7. The method for calling the front-end verification mode according to claim 6, characterized in that: After removing all other front-end verification methods that are consistent with the reserved method from the preset verification library, the method further includes: Determining the number of mappings of the second identifier corresponding to each of the front-end verification modes; Using the front-end verification method in which the mapping number is greater than the preset number as a public verification method; Using the front-end verification method in which the mapping quantity is not greater than the preset quantity as a private verification method; When a verification rule modification instruction corresponding to the public verification method is obtained, a copy method of the public verification method is generated; Modify the verification rule of the copy mode according to the verification rule modification instruction; The modified copy method is used as a private verification method.
8. A front-end verification method calling device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the calling method of the front-end verification mode as described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the calling method of the front-end verification method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Information checking method and device and electronic equipment
CN108809896A
Form verification method, related device and equipment
CN110096496A