Front-end input verification method and device, storage medium and computer equipment

By detecting user location and equipment environmental information, determine the target area and formatting rules, and input components in the target input component according to regional characteristics, solve the problem of poor cross -platform compatibility and localized services when entering information input information. Realize better compatibility and localization services.

CN119376845APending Publication Date: 2025-01-28创优数字科技(广东)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411599390.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The cross-platform compatibility and localization services of globalized applications when entering information are poor, mainly due to the complexity and diversity of the user groups that are oriented.

Method used

By detecting the user's location information and equipment environmental information, determine the target area and formatting rules, and input the component in the target input component in accordance with the regional characteristics, obtain the information entered by the user for formatting and checking.

Benefits of technology

It improves cross -platform compatibility of front -end input, ensures that applications provide good experience and accurate information input processing on different platforms, while improving localized services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376845A_ABST
    Figure CN119376845A_ABST
Patent Text Reader

Abstract

The invention provides a front-end input verification method and device, a storage medium and computer equipment, and the method comprises the steps: determining a target region where a user is located when it is detected that the user enters a front-end page with input components, determining target input components with regional features, obtaining the input information of each target input component, and verifying the input information of each target input component; and then detecting equipment environment information of a user to determine a formatting rule, and formatting each piece of input information according to the formatting rule after determining a corresponding verification rule according to the target region. The target input component with the regional features is formatted based on the formatting rule matched with the equipment environment information so as to adapt to input modes of multiple platforms, and cross-platform compatibility of front-end input is improved. And finally, each piece of formatted input information is verified according to the verification rule, so that the formatted information can be verified according to the verification rule matched with the target region, and the localization service of front-end input is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a front-end input verification method, device, storage medium and computer equipment. Background Art

[0002] Currently, many applications can use input plug-ins or libraries to implement various information input functions, and these tools can also provide certain format specifications and verification logic. With the advancement of global economy, many applications face not only domestic users, but also many foreign users, so global applications have been launched.

[0003] However, in the process of inputting information in globalized applications, due to the complexity and diversity of the user groups they target, the cross-platform compatibility and localization services of globalized applications when inputting information are poor. Summary of the invention

[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects in the prior art of inputting information in globalized applications, which leads to poor cross-platform compatibility and localized services when inputting information due to the complexity and diversity of the user groups it targets.

[0005] In a first aspect, the present application provides a front-end input verification method, the method comprising:

[0006] When it is detected that a user enters a front-end page with an input component, the user's location information is obtained, and the target area where the user is located is determined according to the location information;

[0007] Determine the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, and obtain the input information input by the user in each target input component;

[0008] Detecting the user's device environment information, and determining a formatting rule according to the device environment information, and determining a corresponding verification rule according to the target region;

[0009] The input information of each target input component is formatted according to the formatting rules to obtain the target input information of each target input component, and then the target input information of each target input component is verified according to the verification rules to obtain the verification result corresponding to each target input component.

[0010] In one embodiment, determining the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page includes:

[0011] Extracting features from parameter information of each input component in the front-end page to obtain a component feature set of each input component;

[0012] For each input component in the front-end page, matching the component features in the component feature set of the input component with a preset regional feature library;

[0013] If there is a component feature in the component feature set of the input component that successfully matches the feature in the regional feature library, the input component is determined as the target input component.

[0014] In one embodiment, the detecting of the user's device environment information, determining the formatting rule according to the device environment information, and determining the corresponding verification rule according to the target region include:

[0015] Collecting operating system information and device type of the device used by the user, and generating device environment information according to the operating system information and the device type;

[0016] Determine a preset rule table, search the rule table for a rule corresponding to the device environment information, and determine the searched rule as a formatting rule;

[0017] And, searching the rule table for a rule corresponding to the target area, and determining the searched rule as the verification rule corresponding to the target area.

[0018] In one embodiment, formatting the input information of each target input component according to the formatting rule to obtain the target input information of each target input component includes:

[0019] For each target input component, each sub-rule in the formatting rule is used to constrain the format of the input information of the target input component. When the input information of the target input component finally obtained satisfies each sub-rule in the formatting rule, the input information of the target input component finally obtained is determined as the target input information of the target input component.

[0020] In one embodiment, the target input information of each target input component is verified according to the verification rule to obtain the verification result corresponding to each target input component, including:

[0021] For each target input component, use each sub-rule in the verification rule to verify the target input information of the target input component, and obtain a verification sub-result of the target input information of the target input component relative to each sub-rule in the verification rule;

[0022] If the target input information of the target input component passes the verification with respect to the verification sub-results of each sub-rule in the verification rule, a verification result indicating that the verification passes is generated, and the verification result is determined as the verification result corresponding to the target input component;

[0023] If the target input information of the target input component has a verification failure result in the verification sub-result of each sub-rule in the verification rule, the verification sub-result is determined to be the sub-rule that failed the verification, and the verification result corresponding to the target input component is generated according to the determined sub-rule.

[0024] In one embodiment, after determining the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, the method further includes:

[0025] The region information of the target area is obtained, and the region information is filled in each target input component according to the region information.

[0026] In one embodiment, the method further comprises:

[0027] When the verification result corresponding to each target input component is obtained, for each target input component, the verification result of the target input component is displayed at the position of the target input component in the front-end page.

[0028] In a second aspect, the present application provides a front-end input verification device, the device comprising:

[0029] A region determination module, for obtaining the user's location information when detecting that the user enters a front-end page with an input component, and determining the target region where the user is located based on the location information;

[0030] A component determination module, used to determine a target input component with regional characteristics in the front-end page according to parameter information of each input component in the front-end page, and obtain input information input by the user in each target input component;

[0031] A rule determination module, used to detect the user's device environment information, and determine the formatting rules according to the device environment information, and determine the corresponding verification rules according to the target area;

[0032] The information verification module is used to format the input information of each target input component according to the formatting rules, and after obtaining the target input information of each target input component, verify the target input information of each target input component according to the verification rules to obtain the verification result corresponding to each target input component.

[0033] In a third aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the front-end input verification method described in any of the above embodiments.

[0034] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;

[0035] The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, the steps of the front-end input verification method described in any of the above embodiments are performed.

[0036] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0037] The front-end input verification method, device, storage medium and computer equipment provided by the present application include: when it is detected that a user enters a front-end page where an input component exists, the user's location information is obtained to determine the target area where the user is located, and then the target input component with regional characteristics is determined according to the parameter information of the input component in the front-end page, and the input information of each target input component is obtained, and then the user's device environment information is detected to determine the formatting rules, and after the corresponding verification rules are determined according to the target area, each input information is formatted according to the formatting rules. By identifying the target input component with regional characteristics, the target input component is formatted based on the formatting rules that match the device environment information to adapt to the input methods of multiple platforms, the cross-platform compatibility of the front-end input is improved, and it can be ensured that the application can provide users with a good user experience and accurate information input processing on different platforms. Finally, the formatted input information is verified according to the verification rules to determine the verification results of each target input component. In this way, the formatted information can be verified according to the verification rules that match the target area to improve the localization service of the front-end input. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 A schematic diagram of a flow chart of a front-end input verification method provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of a process for determining a target input component with regional characteristics in a front-end page provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of a process for detecting the user's device environment information, determining a formatting rule according to the device environment information, and determining a corresponding verification rule according to a target region provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of the structure of a front-end input verification device provided in an embodiment of the present application;

[0043] Figure 5 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] In one embodiment, the present application provides a front-end input verification method, and the following embodiment is described by applying the method to a server. It can be understood that the front-end input verification method can be executed by a single server or a server cluster composed of multiple servers, and the present application does not make specific restrictions on this.

[0046] like Figure 1 As shown, the present application provides a front-end input verification method, the method comprising:

[0047] S101: When it is detected that a user enters a front-end page where an input component exists, the user's location information is obtained, and a target area where the user is located is determined according to the location information.

[0048] The input component refers to a component in the front-end page that is used to provide input functions, and the location information includes but is not limited to one or more of site information, IP address information, and the like.

[0049] In this step, when the user visually interacts with the client's UI page to implement certain functions, the server will detect whether there is an input component in the front-end page entered by the user. If so, the server will obtain the user's location information to determine the location information used by the user when accessing the client, and then determine the user's target area based on the location information.

[0050] Furthermore, the process of the server detecting whether there is an input component in the front-end page entered by the user can be implemented through a plug-in script with corresponding functions, or by traversing the DOM structure, or by a method based on JavaScript code detection, and this application does not impose specific restrictions on this.

[0051] S102: Determine the target input components with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, and obtain the input information input by the user in each target input component.

[0052] The parameter information refers to the parameters related to configuring the input component, including but not limited to text attributes, description information, id, component type, etc. The regional feature refers to the component features with regional relevance.

[0053] In this step, the server can identify the input component in the front-end page entered by the user, and then obtain the parameter information of the identified input component, and then analyze the parameter information of each input component to determine the target input component with regional characteristics in each input component. When the target input component with regional characteristics in the front-end page is determined, the server can obtain the input information entered by the user in each target input component.

[0054] Furthermore, the analysis of the parameter information of each input component can be achieved through a preset algorithm or a pre-trained deep learning model, and this application does not impose any specific restrictions on this.

[0055] It is understandable that the rules of certain aspects of the target input component with regional characteristics may be different in different countries or regions. Therefore, the server will first determine the target input component with regional characteristics in the front-end page, and then adopt different rules to process the input information entered by the user on the target input component accordingly.

[0056] S103: Detecting the user's device environment information, and determining a formatting rule according to the device environment information, and determining a corresponding verification rule according to the target region.

[0057] Among them, device environment information refers to various information related to the operating status, physical characteristics, software configuration and surrounding conditions of the device. The device environment information includes but is not limited to operating system information, device type and hardware information, etc. Formatting rules are used to standardize the format of input information entered by the user. Verification rules are used to verify whether the input information entered by the user is required. For example, when the target input component is used to enter a mobile phone number, the length of the input information can be limited to 11 as one of the verification rules.

[0058] In this step, due to the different devices of different users, there will be differences in operating systems, device types, etc., that is, different device environment information, and different devices may also have different logics in processing user input. For example, iOS devices and Android devices have inconsistent behaviors in calling up soft keyboards and different input processing for Chinese, etc. Therefore, in order to unify the user's input experience and ensure the accuracy of input information, corresponding formatting rules can be determined for different device environment information. After determining the formatting rules, the server can also determine the verification rules corresponding to the target area based on the target area where the user is located.

[0059] S104: formatting the input information of each target input component according to the formatting rules, and after obtaining the target input information of each target input component, verifying the target input information of each target input component according to the verification rules to obtain the verification result corresponding to each target input component.

[0060] The verification result is used to describe whether the verification of the target input information is passed. For example, when the verification is passed, the verification result is expressed as verification passed, and when the verification is not passed, the verification result is expressed as verification not passed and the reason for failure.

[0061] In this step, after the formatting rules are determined according to the device environment information and the verification rules are determined according to the target area, the input information of each target input component is formatted according to the formatting rules to obtain the formatted input information of each target input component, that is, the target input information, and then the target input information of each target input component is verified according to the verification rules to obtain the verification result of each target input component.

[0062] In an example, the above steps can be applied to a scenario of mobile phone number input. In this scenario, the above steps can be performed by taking the mobile phone number input component as the target input component.

[0063] The front-end input verification method, device, storage medium and computer equipment provided by the present application include: when it is detected that a user enters a front-end page where an input component exists, the user's location information is obtained to determine the target area where the user is located, and then the target input component with regional characteristics is determined according to the parameter information of the input component in the front-end page, and the input information of each target input component is obtained, and then the user's device environment information is detected to determine the formatting rules, and after the corresponding verification rules are determined according to the target area, each input information is formatted according to the formatting rules. By identifying the target input component with regional characteristics, the target input component is formatted based on the formatting rules that match the device environment information to adapt to the input methods of multiple platforms, the cross-platform compatibility of the front-end input is improved, and it can be ensured that the application can provide users with a good user experience and accurate information input processing on different platforms. Finally, the formatted input information is verified according to the verification rules to determine the verification results of each target input component. In this way, the formatted information can be verified according to the verification rules that match the target area to improve the localization service of the front-end input.

[0064] like Figure 2 As shown, in one embodiment, according to the parameter information of each input component in the front-end page, determining the target input component with regional characteristics in the front-end page includes:

[0065] S201: Extracting features from parameter information of each input component in the front-end page to obtain a component feature set of each input component.

[0066] In this step, feature extraction is performed on the parameter information of each input component in the front-end page to analyze the input description, intent information, semantic information, etc. of each input component. Then, at least one component feature corresponding to each input component is obtained, and a component feature set corresponding to each input component is generated according to the at least one component feature corresponding to each input component.

[0067] S202: For each input component in the front-end page, the component features in the component feature set of the input component are matched with a preset regional feature library.

[0068] Among them, the regional feature library is used to store some features affected by the region, such as: mobile phone number input, address input, currency amount input, etc.

[0069] S203: If there is a component feature in the component feature set of the input component that successfully matches the feature in the regional feature library, the input component is determined as a target input component.

[0070] In this step, when the feature matching is successful, it means that there is a component feature in the component feature set of the input component that is consistent with the feature in the regional feature library. At this time, the input component can be determined as the target input component.

[0071] It is understandable that the above S201 to S203 can be implemented using a pre-trained component determination model, which includes an input module, a feature extraction module, a feature matching module and an output module. In addition, the component determination model of the present application can be obtained by using the parameter information samples of the input components in the page as training samples, the target input components corresponding to the training samples as sample labels, and training the preset pre-trained model using a loss function. During the training process, the server can input the training samples and their corresponding sample labels into the pre-trained model for forward propagation, and use the loss function in the back propagation of the pre-trained model to adjust the parameters of the pre-trained model until the pre-trained model meets certain iteration conditions, and the trained pre-trained model can be used as the component determination model.

[0072] In this embodiment, feature extraction is used to determine the target input components with regional characteristics in the front-end page, and then corresponding verification measures can be taken for the input information of these target input components according to the target area where the user is located. This can ensure that the user's input information complies with regional standards and can improve the localization service level of the front-end input.

[0073] like Figure 3 As shown, in one embodiment, detecting the user's device environment information, determining the formatting rule according to the device environment information, and determining the corresponding verification rule according to the target region include:

[0074] S301: Collect operating system information and device type of the device used by the user, and generate device environment information according to the operating system information and device type.

[0075] The device type refers to the basic type of the device, such as mobile phone, tablet, notebook, etc.

[0076] In this step, when determining the formatting rule, the operating system information and the device type of the device used by the user are collected, and then the device environment information is generated according to the operating system information and the device type.

[0077] S302: Determine a preset rule table, search the rule table for a rule corresponding to the device environment information, and determine the searched rule as a formatting rule.

[0078] The rule table includes multiple formatting rules and multiple verification rules.

[0079] In this step, the rule table to be used is first determined, then the rule table is obtained, and a traversal query is performed in the rule table to determine the rule corresponding to the device environment information, and then the queried rule is determined as the formatting rule matching the device environment information.

[0080] S303: Searching for a rule corresponding to the target region in the rule table, and determining the searched rule as the verification rule corresponding to the target region.

[0081] In this step, when determining the rule table, a traversal query is performed in the rule table to determine the rule corresponding to the target area, and the queried rule is determined as the verification rule corresponding to the target area.

[0082] Specifically, when querying, S302 and S303 can search for formatting rules matching the device environment information and verification rules corresponding to the target region in one traversal query. In addition, in the rule table, the device environment information and the target region are two types of data, the formatting rules corresponding to the device environment information and the verification rules corresponding to the target region. Therefore, formatting rules and verification rules will not be confused in one traversal query.

[0083] In this embodiment, the formatting rules and the verification rules are determined respectively by the detected device environment information and the determined user target region. On the one hand, this can be compatible with different devices, unify the user's input experience, ensure the accuracy of input information, and improve the compatibility and adaptability of the front-end input. On the other hand, the corresponding verification rules can be determined by different target regions, and the rules of different regions can be adapted to ensure the accuracy of user input, and the localization service level of the front-end input can also be improved.

[0084] In one embodiment, the input information of each target input component is formatted according to the formatting rule to obtain the target input information of each target input component, including:

[0085] For each target input component, each sub-rule in the formatting rule is used to constrain the format of the input information of the target input component. When the input information of the target input component finally obtained satisfies each sub-rule in the formatting rule, the input information of the target input component finally obtained is determined as the target input information of the target input component.

[0086] In one example, taking Safari as an example, assuming that in the scenario of inputting a mobile phone number, when processing an input method (such as a Chinese input method), Safari will split the input content into multiple composition events, which may affect real-time formatting and cause the input box to have input that does not meet expectations (such as the Chinese input method being interrupted before completing confirmation, resulting in a string such as s'h'u' being entered in the input box). Therefore, you can listen to the compositionstart and compositionend events to ensure that formatting is performed after the user completes input as one of the sub-rules in the formatting rule to avoid formatting interrupting input.

[0087] In another example, take Safari as an example. Assuming that in the scenario of inputting a mobile phone number, when the mobile phone number is formatted as (123) 456-7890, the value of the input box will be frequently updated on the controlled component. When a character is inserted somewhere in the middle, the cursor position on the Safari browser will default back to the end after formatting, which is inconsistent with user common sense. Therefore, a custom hook function useResetCursorPosition can be written. This function can record the cursor position and restore it after the component is rendered. At this time, the function can be called at the appropriate time as one of the sub-rules in the formatting rule to ensure a smooth input experience.

[0088] In this embodiment, the formatting rules are determined based on the device environment information, and then each sub-rule in the formatting rules is used to constrain the format of the input information of the target input component to obtain the target input information. This can be compatible with different devices, unify the user's input experience, ensure the accuracy of the input information, and improve the compatibility and adaptability of the front-end input.

[0089] In one embodiment, the target input information of each target input component is verified according to the verification rule to obtain the verification result corresponding to each target input component, including:

[0090] S1: For each target input component, use each sub-rule in the verification rule to verify the target input information of the target input component, and obtain the verification sub-result of the target input information of the target input component relative to each sub-rule in the verification rule.

[0091] The check result includes pass and fail.

[0092] In this step, when the target input information of the target input component satisfies a certain sub-rule in the verification rule, the verification sub-result of the target input information of the target input component relative to the sub-rule is passed. When the target input information of the target input component does not satisfy a certain sub-rule in the verification rule, the verification sub-result of the target input information of the target input component relative to the sub-rule is failed.

[0093] In one example, in the scenario of mobile phone number input, the length of the mobile phone number can be used as one of the sub-rules in the verification rule, and the mobile phone number can only be composed of numbers as one of the sub-rules in the verification rule. Developers can adjust according to actual needs. This application does not make specific restrictions on this.

[0094] S2: If the target input information of the target input component passes the verification with respect to the verification sub-results of each sub-rule in the verification rule, a verification result indicating that the verification passed is generated, and the verification result is determined as the verification result corresponding to the target input component.

[0095] S3: If the target input information of the target input component has a verification failure result in the verification sub-result of each sub-rule in the verification rule, the verification sub-result is determined to be the sub-rule that failed the verification, and the verification result corresponding to the target input component is generated according to the determined sub-rule.

[0096] In this step, when there is a verification failure result in the verification sub-result, the verification sub-result is determined to be a sub-rule that failed the verification, and the failure reason is generated according to the determined sub-rule, and combined with the verification failure result, the verification result corresponding to the target input component is obtained.

[0097] In this embodiment, multiple sub-rules are set to verify the target input component in sequence to ensure that the user input content can be correctly processed by the system, and the verification rules of the corresponding region can be determined to verify the target input component, thereby improving the localization service level of the front-end input.

[0098] In one embodiment, after determining the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, the front-end input verification method further includes:

[0099] Get the regional information of the target area, and fill the regional information of each target input component according to the regional information.

[0100] In one example, in a scenario of mobile phone number input, after the target region is determined, the area code in the target input component can be automatically filled in, and the region identifier can also be displayed in the target input component.

[0101] In this embodiment, by filling the area information of the target area into the corresponding position in the target input component, this can save the user's time in filling in the information, and on the other hand, it can also improve the localization service level of the front-end input and improve the user experience.

[0102] In one embodiment, the front-end input verification method further includes:

[0103] When the verification result corresponding to each target input component is obtained, for each target input component, the verification result of the target input component is displayed at the position of the target input component in the front-end page.

[0104] In this embodiment, when the verification is passed, the verification result can be marked above, below or at other adjacent positions of the target input component, so that the user can quickly and visually understand whether the content they input meets the requirements. When the verification fails, the verification result can be marked above, below or at other adjacent positions of the target input component to prompt the user the reason why the verification failed.

[0105] Furthermore, in order to quickly distinguish the two verification results, different colors may be used when displaying the verification results.

[0106] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0107] The front-end input verification device provided in an embodiment of the present application is described below. The front-end input verification device described below and the front-end input verification method described above can be referenced to each other.

[0108] like Figure 4 As shown, the present application provides a front-end input verification device 400, the device comprising:

[0109] The region determination module 401 is used to obtain the user's location information when it is detected that the user enters the front-end page where the input component exists, and determine the target region where the user is located according to the location information;

[0110] The component determination module 402 is used to determine the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, and obtain the input information input by the user in each target input component;

[0111] A rule determination module 403 is used to detect the user's device environment information, determine the formatting rules according to the device environment information, and determine the corresponding verification rules according to the target region;

[0112] The information verification module 404 is used to format the input information of each target input component according to the formatting rules, and after obtaining the target input information of each target input component, verify the target input information of each target input component according to the verification rules to obtain the verification result corresponding to each target input component.

[0113] In one embodiment, the component determination module includes:

[0114] The feature extraction submodule is used to extract the feature information of each input component in the front-end page to obtain the component feature set of each input component;

[0115] The feature matching submodule is used to match the component features in the component feature set of each input component in the front-end page with the preset regional feature library;

[0116] The component determination submodule is used to determine the input component as a target input component if there is a component feature in the component feature set of the input component that successfully matches the feature in the regional feature library.

[0117] In one embodiment, the rule determination module includes:

[0118] The information generation submodule is used to collect the operating system information and device type of the device used by the user, and generate device environment information according to the operating system information and device type;

[0119] The rule determination submodule is used to determine a preset rule table, query the rule table for rules corresponding to the device environment information, and determine the queried rules as formatting rules, and query the rule table for rules corresponding to the target area, and determine the queried rules as verification rules corresponding to the target area.

[0120] In one embodiment, the information verification module includes:

[0121] The formatting submodule is used to constrain the format of the input information of each target input component using each sub-rule in the formatting rule. When the input information of the target input component finally obtained satisfies each sub-rule in the formatting rule, the input information of the target input component finally obtained is determined as the target input information of the target input component.

[0122] In one embodiment, the information verification module includes:

[0123] A verification submodule, for verifying the target input information of each target input component using each sub-rule in the verification rule, and obtaining a verification sub-result of the target input information of the target input component relative to each sub-rule in the verification rule;

[0124] A first determination submodule is used to generate a verification result indicating that the verification has passed if the target input information of the target input component has passed the verification sub-result relative to each sub-rule in the verification rule, and determine the verification result as the verification result corresponding to the target input component;

[0125] The second determination submodule is used to determine that the verification subresult is a sub-rule that fails the verification if the target input information of the target input component has a verification failure result in the verification subresult of each sub-rule in the verification rule, and generate a verification result corresponding to the target input component based on the determined sub-rule.

[0126] In one embodiment, after the step of determining the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page in the execution component determination module, the front-end input verification device further includes:

[0127] The information filling module is used to obtain the regional information of the target area and fill the regional information of each target input component according to the regional information.

[0128] In one embodiment, the front-end input verification device further includes:

[0129] The result display module is used to display the verification result of each target input component at the position of the target input component in the front-end page for each target input component when the verification result corresponding to the target input component is obtained.

[0130] The division of each module in the above-mentioned front-end input verification device is only used for illustration. In other embodiments, the front-end input verification device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned front-end input verification device. Each module in the above-mentioned front-end input verification device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0131] In one embodiment, the present application also provides a storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the front-end input verification method described in any of the above embodiments.

[0132] In one embodiment, the present application also provides a computer device, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the front-end input verification method described in any of the above embodiments.

[0133] Indicatively, Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 500 may be provided as a server. Figure 5 The computer device 500 includes a processing component 502, which further includes one or more processors, and a memory resource represented by a memory 501, for storing instructions executable by the processing component 502, such as an application. The application stored in the memory 501 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 502 is configured to execute instructions to perform the front-end input verification method of any of the above embodiments.

[0134] The computer device 500 may further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 may operate based on an operating system stored in the memory 501, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.

[0135] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0136] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, the singular "one", "one" and "described / the" may also include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "include / comprise" or "have" etc. specify the existence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the existence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0137] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0138] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be 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 application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A front-end input verification method, characterized in that: The method comprises: When it is detected that a user enters a front-end page with an input component, the user's location information is obtained, and the target area where the user is located is determined according to the location information; Determine the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, and obtain the input information input by the user in each target input component; Detecting the user's device environment information, and determining a formatting rule according to the device environment information, and determining a corresponding verification rule according to the target region; The input information of each target input component is formatted according to the formatting rules to obtain the target input information of each target input component, and then the target input information of each target input component is verified according to the verification rules to obtain the verification result corresponding to each target input component.

2. The front-end input verification method according to claim 1, characterized in that: The step of determining a target input component having regional characteristics in the front-end page according to parameter information of each input component in the front-end page includes: Extracting features from parameter information of each input component in the front-end page to obtain a component feature set of each input component; For each input component in the front-end page, matching the component features in the component feature set of the input component with a preset regional feature library; If there is a component feature in the component feature set of the input component that successfully matches the feature in the regional feature library, the input component is determined as the target input component.

3. The front-end input verification method according to claim 1, characterized in that: The detecting of the user's device environment information, determining a formatting rule according to the device environment information, and determining a corresponding verification rule according to the target region include: Collecting operating system information and device type of the device used by the user, and generating device environment information according to the operating system information and the device type; Determine a preset rule table, search the rule table for a rule corresponding to the device environment information, and determine the searched rule as a formatting rule; And, searching the rule table for a rule corresponding to the target area, and determining the searched rule as the verification rule corresponding to the target area.

4. The front-end input verification method according to claim 1, characterized in that: The step of formatting the input information of each target input component according to the formatting rule to obtain the target input information of each target input component includes: For each target input component, each sub-rule in the formatting rule is used to constrain the format of the input information of the target input component. When the input information of the target input component finally obtained satisfies each sub-rule in the formatting rule, the input information of the target input component finally obtained is determined as the target input information of the target input component.

5. The front-end input verification method according to claim 1, characterized in that: The target input information of each target input component is verified according to the verification rule to obtain the verification result corresponding to each target input component, including: For each target input component, use each sub-rule in the verification rule to verify the target input information of the target input component, and obtain a verification sub-result of the target input information of the target input component relative to each sub-rule in the verification rule; If the target input information of the target input component passes the verification with respect to the verification sub-results of each sub-rule in the verification rule, a verification result indicating that the verification passes is generated, and the verification result is determined as the verification result corresponding to the target input component; If the target input information of the target input component has a verification failure result in the verification sub-result of each sub-rule in the verification rule, the verification sub-result is determined to be the sub-rule that failed the verification, and the verification result corresponding to the target input component is generated based on the determined sub-rule.

6. The front-end input verification method according to claim 1, characterized in that: After determining the target input component with regional characteristics in the front-end page according to the parameter information of each input component in the front-end page, the method further includes: The region information of the target area is obtained, and the region information is filled in each target input component according to the region information.

7. The front-end input verification method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the verification result corresponding to each target input component is obtained, for each target input component, the verification result of the target input component is displayed at the position of the target input component in the front-end page.

8. A front-end input verification device, characterized in that: The device comprises: A region determination module, for obtaining the user's location information when detecting that the user enters a front-end page with an input component, and determining the target region where the user is located based on the location information; A component determination module, used to determine a target input component with regional characteristics in the front-end page according to parameter information of each input component in the front-end page, and obtain input information input by the user in each target input component; A rule determination module, used to detect the user's device environment information, and determine the formatting rules according to the device environment information, and determine the corresponding verification rules according to the target area; The information verification module is used to format the input information of each target input component according to the formatting rules, and after obtaining the target input information of each target input component, verify the target input information of each target input component according to the verification rules to obtain the verification result corresponding to each target input component.

9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the front-end input verification method as described in any one of claims 1 to 7.

10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the front-end input verification method as described in any one of claims 1 to 7 are performed.