[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115544417B - Method and device for verifying web form, electronic equipment and storage medium - Google Patents

Method and device for verifying web form, electronic equipment and storage medium Download PDF

Info

Publication number
CN115544417B
CN115544417B CN202211236599.XA CN202211236599A CN115544417B CN 115544417 B CN115544417 B CN 115544417B CN 202211236599 A CN202211236599 A CN 202211236599A CN 115544417 B CN115544417 B CN 115544417B
Authority
CN
China
Prior art keywords
webpage
user
verification
feedback information
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211236599.XA
Other languages
Chinese (zh)
Other versions
CN115544417A (en
Inventor
于建华
郭燕萍
杨晓龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211236599.XA priority Critical patent/CN115544417B/en
Publication of CN115544417A publication Critical patent/CN115544417A/en
Application granted granted Critical
Publication of CN115544417B publication Critical patent/CN115544417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/226Validation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a method, a device, electronic equipment and a storage medium for verifying a web form, wherein the method comprises the following steps: determining a page component corresponding to the target page form, and configuring corresponding component attributes for the page component to generate the target page form; acquiring webpage form data stored in a target format corresponding to a target webpage form, wherein the target webpage form comprises at least one form page; determining webpage basic information of a target webpage form based on webpage form data, and component attributes of page components in each form page; storing the basic information of the webpage and the component attribute of the webpage component in each form page in a basic information table of the webpage and a field mapping table of the webpage respectively; and verifying the user feedback information input by the user by using the webpage basic information table and the webpage field mapping table. By adopting the method, the device, the electronic equipment and the medium for verifying the form, the problem of low development efficiency of the form verification rule is solved.

Description

Method and device for verifying web form, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and apparatus for verifying a web form, an electronic device, and a storage medium.
Background
With the continuous development of internet technology, networks are becoming increasingly important to users. When a user browses web pages, the web pages in form of a form, namely web page forms, are increasingly used as a common way for each large application to acquire user data. In order to verify the information input by the user, a verification mechanism for each input box content is usually triggered when the form is submitted, so as to prevent the user from inputting wrong or incomplete information to collect useless data, thus, the verification of the form content is very frequent and necessary.
In the prior art, when a webpage form is created according to specific requirements, the created webpage form style is fixed, the verification rule of the webpage form is also fixed, and if a new webpage form is created, the verification rule of the webpage form needs to be re-developed, so that the problem of low development efficiency of the form verification rule is caused.
Disclosure of Invention
Accordingly, the present application is directed to a method, an apparatus, an electronic device, and a storage medium for verifying a form, so as to solve the problem of low development efficiency of a form verification rule.
In a first aspect, an embodiment of the present application provides a method for verifying a web form, including:
Determining a page component corresponding to the target page form, and configuring corresponding component attributes for the page component to generate the target page form;
acquiring webpage form data stored in a target format corresponding to a target webpage form, wherein the target webpage form comprises at least one form page;
Determining webpage basic information of a target webpage form based on webpage form data, and component attributes of page components in each form page;
Storing the basic information of the webpage and the component attribute of the webpage component in each form page in a basic information table of the webpage and a field mapping table of the webpage respectively;
And verifying the user feedback information input by the user by using the webpage basic information table and the webpage field mapping table.
Optionally, the verifying the user feedback information input by the user by using the webpage basic information table and the webpage field mapping table includes: acquiring user feedback information input by a user aiming at a target web form; acquiring target webpage basic information in a webpage basic information table corresponding to a target webpage form from a database, and performing first-level verification on user feedback information by using the target webpage basic information; if the user feedback information passes the first-level verification, acquiring a target webpage field mapping relation in a webpage field mapping table corresponding to the target webpage form from a database, and performing the second-level verification on the user feedback information by using the target webpage field mapping relation; if the user feedback information passes the second-level verification, determining that the user feedback information passes all the verification and storing the user feedback information.
Optionally, performing the first level verification on the user feedback information by using the target basic configuration information includes: determining whether to perform verification code verification based on the target basic configuration information; if verification of the verification code is determined, determining whether the verification code in the user feedback information is correct; if the verification code is correct, determining whether to carry out submission time verification or not based on the target basic configuration information; if the submission time verification is determined, determining whether the submission time corresponding to the user feedback information is in the allowable submission time interval; and if the user feedback information is in the allowable submission time interval, determining that the user feedback information passes the first-level verification.
Optionally, the user feedback information includes a plurality of field feedback information for different components; and performing second-level verification on the user feedback information by using the target webpage field mapping relation, wherein the second-level verification comprises the following steps: determining a first component identifier corresponding to each field feedback information aiming at each field feedback information, wherein the first component identifier is a display identifier of a page component in a page; determining a second component identifier corresponding to the first component identifier by using a target webpage field mapping relation, wherein the second component identifier is a unique identifier of the page component in a database; determining the component attribute corresponding to the field feedback information according to the second component identifier; and verifying the validity of the field feedback information by using the component attribute.
Optionally, after if the time interval is within the allowable commit time interval, the method further includes: determining whether to perform commit list verification based on the target basic configuration information; if the submitting list verification is determined, determining whether the user is a user allowed to submit feedback information or not according to the limiting list; if the user is a user allowed to submit feedback information, determining that the user feedback information passes the first level verification.
Optionally, determining whether the user is a user who is allowed to submit the feedback information according to the restriction list includes: determining a limit list corresponding to the target web page form; determining whether a user identifier of a user exists in the restriction list; if the user identification of the user exists, the user is determined to be the user allowed to submit feedback information.
Optionally, after the user is allowed to submit the feedback information, the method further includes: determining whether to perform commit quantity verification based on the target basic configuration information; if the number of submissions is determined to be verified, acquiring the number of submissions by using a distributed lock mechanism, and determining whether the ranking of the user submitting user feedback information is within the range of the allowed number of submissions by using the acquired number of submissions; if the user feedback information is within the range of the number of allowed submissions, the user feedback information is confirmed to pass through the first-level verification.
In a second aspect, an embodiment of the present application further provides a device for verifying a web form, where the device includes:
the form generation module is used for determining a page component corresponding to the target web form and generating the target web form by configuring corresponding component attributes for the page component;
The data acquisition module is used for acquiring webpage form data which corresponds to a target webpage form and is stored in a target format, wherein the target webpage form comprises at least one form page;
The information determining module is used for determining the basic information of the webpage of the target webpage form and the component attribute of the page component in each form page based on the webpage form data;
The information storage module is used for respectively storing the basic information of the webpage and the component attribute of the webpage component in each form page in the basic information table of the webpage and the mapping table of the webpage field;
And the form verification module is used for verifying the user feedback information input by the user by using the webpage basic information table and the webpage field mapping table.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate through the bus when the electronic device is running, and the machine-readable instructions are executed by the processor to perform the steps of the web form verification method as described above.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor performs the steps of the web form verification method as described above.
The embodiment of the application has the following beneficial effects:
The method, the device, the electronic equipment and the storage medium for verifying the webpage form can determine the webpage basic information and the component attribute of the page component in each form page according to the webpage form data of the target webpage form, respectively store the webpage basic information of the target webpage form and the component attribute of the page component in each form page in the webpage basic information table and the webpage field mapping table, verify the feedback information of the user by utilizing the webpage basic information table and the webpage field mapping table, avoid the problem that the verification rule of the webpage form needs to be re-developed when a new webpage form is created, and solve the problem that the development efficiency of the form verification rule is low when the webpage form verification is carried out compared with the webpage form verification method in the prior art.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart illustrating a method for verifying a web form according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a web form verification device according to an embodiment of the present application;
fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without making any inventive effort falls within the scope of protection of the present application.
It is noted that, before the present application is proposed, as the internet technology is continuously developed, the network is more and more important for users. When a user browses web pages, the web pages in form of a form, namely web page forms, are increasingly used as a common way for each large application to acquire user data. In order to verify the information input by the user, a verification mechanism for each input box content is usually triggered when the form is submitted, so as to prevent the user from inputting wrong or incomplete information to collect useless data, thus, the verification of the form content is very frequent and necessary. In the prior art, when a webpage form is created according to specific requirements, the created webpage form style is fixed, the verification rule of the webpage form is also fixed, and if a new webpage form is created, the verification rule of the webpage form needs to be re-developed, so that the problem of low development efficiency of the form verification rule is caused.
Based on the above, the embodiment of the application provides a web form verification method to improve the development efficiency of the form verification rule when verifying the web form.
Referring to fig. 1, fig. 1 is a flowchart of a method for verifying a web form according to an embodiment of the present application. As shown in fig. 1, the method for verifying the web form provided by the embodiment of the application includes:
Step S101, determining a page component corresponding to the target web page form, and configuring corresponding component attributes for the page component to generate the target web page form.
In this step, the web page form may refer to a web page capable of inputting feedback information, and the web page form is a form for collecting feedback information of a user.
By way of example, the web page form may be a questionnaire presented in web page form.
The target web form can refer to the web form which is being subjected to feedback information verification, and after a user inputs feedback information aiming at the target web form, the user feedback information input by the user needs to be verified so as to determine whether the user feedback information meets filling requirements.
In an alternative embodiment, the target web page form includes at least one form page.
At least one form field is displayed in one form page, and a user feeds back information by inputting contents into the form field.
Specifically, the target web form may be understood as a web page including one or more form pages, and the user may answer questions in the form page, where the questions may be a name, an age, a phone number, a hobbies, a purchase of a phone brand, an opinion & suggestion, etc., and the answer questions may be in the form of selecting an option from a plurality of answers, or inputting specific text.
It should be noted that, the conventional way to generate the web form is that the enterprise or the merchant subscribes to a specific web form to the web form producer, however, in the present application, the enterprise or the merchant may customize the web form, that is, customize the web form at the web form configuration end (web form customization platform). The web form configuration end is interface editing software, and comprises a plurality of developed page components, a web form creator can drag the page components to be used to an editing area, configure corresponding component attributes for the page components, and generate corresponding web forms after determining all the page components and the component attributes corresponding to each page component. Here, the page component may be an input box, a selection box, or a submit button.
After the user inputs the user feedback information, the user feedback information is submitted to the server through a submit button. Likewise, component properties may be set for the submit button, including, but not limited to: commit count limit, commit time limit, commit successful skip, commit failed skip.
Step S102, acquiring webpage form data which corresponds to the target webpage form and is stored in the target format.
In this step, the target format may refer to a storage format of web page form data corresponding to the target web page form.
The target format may be, for example, json format.
The web page form data may refer to data corresponding to the target web page form, and the web page form data is used to describe information of the target web page form.
Page components include, but are not limited to: input box, selection box, submit button.
Component attributes include, but are not limited to: the first component identification, the second component identification, whether unique, length limited, whether to fill.
The first component identification may refer to a name of the page component displayed in the page, and illustratively, the first component identification may be a Chinese identification.
The second component identifier may be an identifier used in storing the component attributes of the page component in the database, and illustratively, the second component identifier may be an english identifier.
The second component identity is a unique identity of the page component, but the first component identity is not a unique identity.
For example, the Chinese identification of the two input box components may both be names, but the second component identification must be different to distinguish the two input box components in the database.
It should be noted that, because the component attribute of the page component is self-defined, the same input box component may be used multiple times in the same page, and the component names may be different although they are all input box components, or the component names of the input fields of the "names" of the creators of different questionnaires under the same tenant may also be different, so that the first component identifier and the second component identifier need to be set to adapt to the self-definition requirement, and the first component identifier is used as the display on the page, and the second component identifier is used as the unique identifier of the stored data in the database.
If the unique pointer is for a certain form field, taking the case that the mobile phone number needs to be input in the form field as an example, if the component attribute of the form field is set to be yes, the mobile phone numbers in the user feedback information filled by two different users cannot be the same, namely the mobile phone numbers are unique.
The length limit may refer to a length limit of the input content in the user feedback information for a certain form field, taking the form field as "opinion & suggestion" as an example, if the component attribute of the "length limit" of the form field is set to 50, the number of words of the input content for the form field in the user feedback information cannot exceed 50 words.
Whether or not a pointer has to be filled for a certain form field, whether or not the input content in the user feedback information has to be replied for that form field.
In the embodiment of the application, after the web page form is generated, a stored web page data interface provided by java can be called, and the web page form data corresponding to the target web page form is stored according to json format through the stored web page data interface. The stored web page data interface may be an interface that converts the target web page form into web page form data.
Step S103, determining the basic information of the web page of the target web page form and the component attribute of the page component in each form page based on the web page form data.
In this step, the web page basic information may refer to basic information of a web page form, which is information describing the entire web page form.
The web page basic information includes, but is not limited to: webpage identification, page number type, page turning mode, webpage description, webpage size, creator information, restriction list identification, restriction list node type and webpage prompt text.
The web page identification may refer to an identification of the entire web page form, and by way of example, the web page identification may be a web page name.
The page number type may refer to a type of page number of a web page, and the page number type includes a plurality of pages and a single page.
The page turning mode may refer to a mode of turning a web page, and the page turning mode includes: turning pages left and right and turning pages up and down.
The web page size may refer to what the width and height of the web page are, respectively.
Creator information may refer to information of a user who created the web page form.
The restriction list identification may refer to a node identification of a restriction list, which is a list of users that are prohibited from submitting user feedback information.
The node type of the restriction list may refer to the type of the node in which the restriction list is located.
Component properties may refer to properties set by the page component when creating a web page form, such as: a first component identification and a second component identification.
In the embodiment of the application, the webpage form data is processed, so that the webpage basic information, the component attribute of the webpage component in each form page and the page information of each form page can be respectively acquired. The page information of each form page can refer to information for describing the form page, the form page can be displayed through the page information after the web page is released, and the page information comprises the page number, the frame color, the frame length and the like of the form page.
Step S104, the basic information of the web page and the component attribute of the page component in each form page are respectively stored in the basic information table of the web page and the mapping table of the web page field.
In this step, the web page basic information table is used to store basic configuration information of the entire web page.
Exemplary, web page basic information tables include, but are not limited to, the following fields: webpage identification, page number type, page turning mode, webpage description, webpage size, creator information, restriction list identification, restriction list node type and webpage prompt text.
The webpage field mapping table is used for storing the interface mapping relation of the front end and dynamically displaying user feedback information submitted by a user in a webpage at a webpage configuration end.
Exemplary web page field mapping tables include, but are not limited to, the following fields: the first component identification, the second component identification, the component type, the length limitation, whether unique, wherein the component type comprises txt, select, date, datetime.
In the embodiment of the application, in the webpage basic information table, the webpage identification is used as an index, and the basic configuration information of each webpage is stored in the form of one record in the webpage basic information table. In the webpage field mapping table, taking the component ID as an index, wherein the component ID corresponds to the second component identifier, the component attribute of each component is stored in the webpage field mapping table in the form of one record, and meanwhile, the components in different webpage tables are distinguished through the webpage identifier. In the webpage information table, page numbers are used as indexes, the page information of each form page is stored in the webpage information table in a record form, and meanwhile, form pages in different webpage forms are distinguished through webpage identification.
Step S105, the user feedback information input by the user is verified by using the webpage basic information table and the webpage field mapping table.
In this step, the user feedback information may refer to information input by the user for the web page form.
By way of example, the user feedback information may be the name, age, occupation, phone number, etc. of the surveyor. The user feedback information may be information input to the input field or may be an option selected by the user from a selection box.
The verification may refer to verifying whether the input user feedback information meets the requirements when the user inputs the user feedback information to the web page form, and allowing the data to be submitted to the server and stored in the database when the verification is passed. Authentication is used to ensure that the user submits user feedback information in the correct format.
In an alternative embodiment, verifying the user feedback information input by the user using the webpage basic information table and the webpage field mapping table includes: acquiring user feedback information input by a user aiming at a target web form; acquiring target webpage basic information in a webpage basic information table corresponding to a target webpage form from a database, and performing first-level verification on user feedback information by using the target webpage basic information; if the user feedback information passes the first-level verification, acquiring a target webpage field mapping relation in a webpage field mapping table corresponding to the target webpage form from a database, and performing the second-level verification on the user feedback information by using the target webpage field mapping relation; if the user feedback information passes the second-level verification, determining that the user feedback information passes all the verification and storing the user feedback information.
Here, the first-level authentication may refer to authentication of a web page level, which is authentication of user feedback information submitted by a user using a web page basic information table.
The second level verification may refer to verification of a form field level, where the second level verification is to verify field feedback information submitted by a user using a web page field mapping table.
Specifically, when the current user replies to the web page form a, the web page form a is a target web page form, basic configuration information in a web page basic information table corresponding to the web page identifier is obtained from a database according to the web page identifier of the web page form a, the basic configuration information is utilized to perform first-level verification on the user feedback information, and the first-level verification can perform integral verification on the user feedback information from the web page level.
When the feedback information of each field is verified, the number of form fields to be verified is more, and the verification dimension of each form field is also more, for example: the length is limited, whether the user is unique, and the like, so that the first-level verification is performed first, the second-level verification is performed only when the user feedback information passes the first-level verification, and the verification efficiency is improved. If the user feedback information passes the first-level verification, acquiring a webpage field mapping relation in a webpage field mapping table corresponding to the webpage identifier from a database, and performing the second-level verification on the user feedback information by using the webpage field mapping relation.
If the user feedback information passes the first-level verification and the second-level verification, the user feedback information is stored in a webpage data list, and the user is prompted to submit successfully. Meanwhile, the submitted user feedback information can be dynamically inquired at the webpage configuration end.
In an alternative embodiment, the first level verification of the user feedback information using the target basic configuration information includes: determining whether to perform verification code verification based on the target basic configuration information; if verification of the verification code is determined, determining whether the verification code in the user feedback information is correct; if the verification code is correct, determining whether to carry out submission time verification or not based on the target basic configuration information; if the submission time verification is determined, determining whether the submission time corresponding to the user feedback information is in the allowable submission time interval; and if the user feedback information is in the allowable submission time interval, determining that the user feedback information passes the first-level verification.
Here, the target basic configuration information includes a flag indicating whether verification of the verification code is performed, for example: the field of verification code verification is arranged in the basic information table of the webpage, if the verification code verification field corresponding to the webpage identifier is 1, verification code verification is performed when user feedback information is submitted, and the verification code verification belongs to the prior art and is not repeated here. In determining whether to perform verification in other dimensions, it may also be determined whether to perform corresponding verification by reading the verification mark.
If the user feedback information passes verification code verification, determining whether the target basic configuration information comprises the submitting time, if the submitting time exists, performing the submitting time verification, taking the example that the submitting time is 2022, 9, 0:00 to 24:00, if the submitting time of the user feedback information is within the submitting time range, determining that the user feedback information passes the submitting time verification, and if the user feedback information is not within the submitting time range, determining that the user feedback information does not pass the submitting time verification, and not allowing the user to submit and give out corresponding error prompt.
In an alternative embodiment, the user feedback information includes multiple field feedback information for different form fields; and performing second-level verification on the user feedback information by using the target webpage field mapping relation, wherein the second-level verification comprises the following steps: determining a first component identifier corresponding to each field feedback information aiming at each field feedback information, wherein the first component identifier is a display identifier of a page component in a page; determining a second component identifier corresponding to the first component identifier by using a target webpage field mapping relation, wherein the second component identifier is a unique identifier of the page component in a database; determining the component attribute corresponding to the field feedback information according to the second component identifier; and verifying the validity of the field feedback information by using the component attribute.
Here, the mapping relation of the target web page field refers to the mapping relation between the chinese identifier and the english identifier of the component.
And determining the component attribute corresponding to each form field by using the mapping relation, determining a validity verification rule according to the component attribute, and checking the user feedback information corresponding to the form field by using the validity verification rule.
Specifically, the user feedback information includes field feedback information a for a form field a, when the field feedback information a is verified, a first component identifier a corresponding to the form field a can be obtained, a second component identifier a corresponding to the first component identifier a can be determined by using a target webpage field mapping relationship, a component attribute a can be determined according to the second component identifier a, and validity verification is performed on the field feedback information a by using the component attribute a.
The validity verification comprises verification of length limitation, verification of uniqueness or not and the like, and is mainly performed for verifying whether field feedback information meets filling requirements or not. Taking the example that the field feedback information a is a mobile phone number, setting the length limit to 11 in the component attribute a corresponding to the field feedback information a, and whether the field feedback information a is uniquely set to 1 is taken as an example, sequentially judging whether the field feedback information accords with the length limit and whether the field feedback information is unique, if the number of characters of the field feedback information a exceeds 11 or is not unique, determining that the field feedback information a fails to pass the validity verification, and sending a corresponding error prompt to a user.
In an alternative embodiment, after if the time interval is within the allowable commit time interval, the method further includes: determining whether to perform commit list verification based on the target basic configuration information; if the submitting list verification is determined, determining whether the user is a user allowed to submit feedback information or not according to the limiting list; if the user is a user allowed to submit feedback information, determining that the user feedback information passes the first level verification.
Here, the submitting list verification may refer to verification of a user submitting feedback information of the user, and only the user in the submitting list can submit the feedback information.
Specifically, if the submitting list verification identifier is configured in the webpage basic information table, determining that submitting list verification is needed, and determining whether the current user is a user allowed to submit feedback information according to the limiting list.
In an alternative embodiment, determining whether the user is a user permitted to submit feedback information based on the restriction list includes: determining a limit list corresponding to the target web page form; determining whether a user identifier of a user exists in the restriction list; if the user identification of the user exists, the user is determined to be the user allowed to submit feedback information.
Specifically, if the list submitting verification is required, determining a limited list data table corresponding to the limited list identifier according to the limited list identifier, determining a target field in the corresponding limited list by using a table field mapping relation according to a user identifier submitted by a user, and if the user identifier matched with the current user exists in the target field, determining that the user is a user allowed to submit feedback information.
Taking a mobile phone number submitted by a user as an example, the mobile phone number is a user identifier, determining a target field in a limited list corresponding to the mobile phone number according to a table field mapping relation stored in a database, searching whether the content matched with the mobile phone number filled by the user exists in the target field, and determining the user as a user allowing to submit feedback information if the matched content exists. The table field mapping relationship includes, but is not limited to: mapping relation between form field and field in limited list, mapping relation between form field and field in external list, mapping relation between form field and field in list stored by web page itself.
In an alternative embodiment, after the user is allowed to submit the feedback information, the method further comprises: determining whether to perform commit quantity verification based on the target basic configuration information; if the number of submissions is determined to be verified, acquiring the number of submissions by using a distributed lock mechanism, and determining whether the ranking of the user submitting user feedback information is within the range of the allowed number of submissions by using the acquired number of submissions; if the user feedback information is within the range of the number of allowed submissions, the user feedback information is confirmed to pass through the first-level verification.
Specifically, if the number of submissions corresponding to the target web page form exists in the web page basic information table, determining that verification of the number of submissions is required. Taking the allowable number of submissions as 100 as an example when the number of submissions is verified, determining the number of users who have submitted user feedback information by using a distributed lock mechanism, if the ranking of the user feedback information submitted by the current user exceeds 100, determining that the current user fails the number of submissions verification, and sending a corresponding error prompt to the current user.
Compared with the webpage form verification method in the prior art, the webpage basic information and the component attribute of the webpage component in each form page can be determined according to the webpage form data of the target webpage form, the webpage basic information of the target webpage form and the component attribute of the webpage component in each form page are respectively stored in the webpage basic information table and the webpage field mapping table, the webpage basic information table and the webpage field mapping table are utilized for verifying the feedback information of the user, the problem that the verification rule of the webpage form needs to be re-developed when a new webpage form is created is avoided, and the problem that the development efficiency of the form verification rule is low when the webpage form verification is carried out is solved.
Based on the same inventive concept, the embodiment of the application also provides a webpage form verification device corresponding to the webpage form verification method, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the webpage form verification method in the embodiment of the application, the implementation of the device can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a web form verification device according to an embodiment of the application. As shown in fig. 2, the web form verification apparatus 200 includes:
The form generating module 201 is configured to determine a page component corresponding to the target web form, and configure a corresponding component attribute for the page component to generate the target web form;
the data obtaining module 202 is configured to obtain web page form data stored in a target format corresponding to a target web page form, where the target web page form includes at least one form page;
An information determining module 203, configured to determine, based on the web page form data, web page basic information of a target web page form and component attributes of page components in each form page;
The information storage module 204 is configured to store the basic information of the web page and the component attribute of the page component in each form page in the basic information table of the web page and the mapping table of the web page field, respectively;
the form verification module 205 is configured to verify user feedback information input by a user using the web page basic information table and the web page field mapping table.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in fig. 3, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.
The memory 320 stores machine-readable instructions executable by the processor 310, and when the electronic device 300 is running, the processor 310 communicates with the memory 320 through the bus 330, and when the machine-readable instructions are executed by the processor 310, the steps of the method for verifying a web form in the method embodiment shown in fig. 1 can be executed, and the specific implementation is referred to the method embodiment and will not be described herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor may perform the steps of the web form verification method in the method embodiment shown in fig. 1, and the specific implementation manner may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (9)

1. A web form verification method, comprising:
Determining a page component corresponding to the target page form, and configuring corresponding component attributes for the page component to generate the target page form;
acquiring webpage form data stored in a target format corresponding to a target webpage form, wherein the target webpage form comprises at least one form page;
Determining the basic information of the webpage of the target webpage form and the component attribute of the page component in each form page based on the webpage form data;
storing the basic information of the webpage and the component attribute of the webpage component in each form page in a basic information table of the webpage and a field mapping table of the webpage respectively;
verifying user feedback information input by a user by utilizing the webpage basic information table and the webpage field mapping table;
The verifying the user feedback information input by the user by using the webpage basic information table and the webpage field mapping table comprises the following steps:
acquiring user feedback information input by a user aiming at a target web form;
Acquiring target webpage basic information in a webpage basic information table corresponding to the target webpage form from a database, and performing first-level verification on user feedback information by using the target webpage basic information, wherein the first-level verification is verification of a webpage level by using the webpage basic information table;
If the user feedback information passes the first level verification, acquiring a target webpage field mapping relation in a webpage field mapping table corresponding to the target webpage form from a database, and performing second level verification on the user feedback information by using the target webpage field mapping relation, wherein the second level verification is verification of a field level by using the webpage field mapping table;
and if the user feedback information passes the second-level verification, determining that the user feedback information passes all the verification and storing the user feedback information.
2. The method of claim 1, wherein the first level of verification of user feedback information using the target web page base information comprises:
Determining whether to perform verification code verification based on the target basic configuration information;
If verification of the verification code is determined, determining whether the verification code in the user feedback information is correct;
If the verification code is correct, determining whether to carry out submission time verification or not based on the target basic configuration information;
If the submission time verification is determined, determining whether the submission time corresponding to the user feedback information is in the allowable submission time interval;
and if the user feedback information is in the allowable submission time interval, determining that the user feedback information passes the first-level verification.
3. The method of claim 1, wherein the user feedback information comprises a plurality of field feedback information for different form fields;
The second level verification of the user feedback information by using the target webpage field mapping relation comprises the following steps:
determining a first component identifier corresponding to each field feedback information according to each field feedback information, wherein the first component identifier is a display identifier of a page component in a page;
Determining a second component identifier corresponding to the first component identifier by using the target webpage field mapping relation, wherein the second component identifier is a unique identifier of a page component in a database;
Determining the component attribute corresponding to the field feedback information according to the second component identifier;
and verifying the validity of the field feedback information by using the component attribute.
4. The method of claim 2, further comprising, after the if is within the commit-allowed time interval:
determining whether to perform submitting list verification based on the target basic configuration information;
If the user is determined to be a user allowing to submit feedback information, determining whether the user is a user allowing to submit feedback information according to a limited list;
and if the user is a user allowed to submit feedback information, determining that the user feedback information passes the first-level verification.
5. The method of claim 4, wherein determining whether the user is a user permitted to submit feedback information based on the restriction list comprises:
Determining a limit list corresponding to the target web page form;
determining whether a user identifier of the user exists in the limit list;
and if the user identification of the user exists, determining the user as the user allowed to submit feedback information.
6. The method of claim 4, further comprising, after if the user is a user who is allowed to submit feedback information:
Determining whether to perform submission quantity verification based on the target basic configuration information;
If the verification of the number of submissions is determined, acquiring the number of submissions by using a distributed lock mechanism, and determining whether the ranking of the user submitting user feedback information is within the range of the allowed number of submissions by using the acquired number of submissions;
If the user feedback information is within the range of the number of allowed submissions, the user feedback information is confirmed to pass through the first-level verification.
7. A web form verification apparatus, comprising:
the form generation module is used for determining a page component corresponding to the target web form and generating the target web form by configuring corresponding component attributes for the page component;
The data acquisition module is used for acquiring webpage form data which corresponds to a target webpage form and is stored in a target format, wherein the target webpage form comprises at least one form page;
The information determining module is used for determining the basic information of the webpage of the target webpage form and the component attribute of the page component in each form page based on the webpage form data;
The information storage module is used for respectively storing the basic information of the webpage and the component attribute of the webpage component in each form page in a basic information table of the webpage and a field mapping table of the webpage;
the form verification module is used for verifying the user feedback information input by the user by utilizing the webpage basic information table and the webpage field mapping table;
the form verification module is specifically configured to:
acquiring user feedback information input by a user aiming at a target web form;
Acquiring target webpage basic information in a webpage basic information table corresponding to the target webpage form from a database, and performing first-level verification on user feedback information by using the target webpage basic information, wherein the first-level verification is verification of a webpage level by using the webpage basic information table;
If the user feedback information passes the first level verification, acquiring a target webpage field mapping relation in a webpage field mapping table corresponding to the target webpage form from a database, and performing second level verification on the user feedback information by using the target webpage field mapping relation, wherein the second level verification is verification of a field level by using the webpage field mapping table;
and if the user feedback information passes the second-level verification, determining that the user feedback information passes all the verification and storing the user feedback information.
8. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the web form verification method of any one of claims 1 to 6.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the web form verification method according to any of claims 1 to 6.
CN202211236599.XA 2022-10-10 2022-10-10 Method and device for verifying web form, electronic equipment and storage medium Active CN115544417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211236599.XA CN115544417B (en) 2022-10-10 2022-10-10 Method and device for verifying web form, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211236599.XA CN115544417B (en) 2022-10-10 2022-10-10 Method and device for verifying web form, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115544417A CN115544417A (en) 2022-12-30
CN115544417B true CN115544417B (en) 2024-05-31

Family

ID=84733473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211236599.XA Active CN115544417B (en) 2022-10-10 2022-10-10 Method and device for verifying web form, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115544417B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116361363B (en) * 2023-03-24 2023-09-12 上海雷昶科技有限公司 Audit tracking record generation method and related device for scientific process evaluation system

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576823A (en) * 2009-06-11 2009-11-11 阿里巴巴集团控股有限公司 Method for verifying form control and device
CN102324004A (en) * 2011-05-26 2012-01-18 重庆猪八戒网络有限公司 Verification method for webpage form input information and device
CN102469091A (en) * 2010-11-18 2012-05-23 金蝶软件(中国)有限公司 Method for processing verification codes of pages, device and terminal
CN102799690A (en) * 2012-08-13 2012-11-28 南京莱斯信息技术股份有限公司 Method for verifying page input by using database technology
KR20130077908A (en) * 2011-12-29 2013-07-09 엔에이치엔비즈니스플랫폼 주식회사 Method and device for verifying input values in the form by both client and server side
WO2016019791A1 (en) * 2014-08-06 2016-02-11 阿里巴巴集团控股有限公司 Method and device of collecting and processing user feedback on webpage
CN108509246A (en) * 2018-04-08 2018-09-07 重庆满惠网络科技有限公司 A kind of self-defined verification method of web form and system
CN108829882A (en) * 2018-06-27 2018-11-16 深圳乐信软件技术有限公司 Formation gathering method, device, terminal and medium
CN109783751A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 Form validation method and terminal device
CN109902459A (en) * 2017-12-11 2019-06-18 北京京东尚科信息技术有限公司 Man-machine identification verification method, system, equipment and the storage medium of WEB page
CN111736811A (en) * 2020-06-10 2020-10-02 苏宁云计算有限公司 Form data verification method, system, server and user terminal
CN112800751A (en) * 2021-02-19 2021-05-14 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for configuring and checking mobile terminal webpage form
CN114386037A (en) * 2022-01-14 2022-04-22 中国平安人寿保险股份有限公司 Malicious request defense method and related equipment based on Web front-end page
CA3139243A1 (en) * 2020-11-13 2022-05-13 10353744 Canada Ltd. Information collection method, device, computer equipment and storage medium
CN114780399A (en) * 2022-04-14 2022-07-22 江苏保旺达软件技术有限公司 Verification method, device, equipment and medium for page submitted data
CN114970476A (en) * 2022-06-07 2022-08-30 携程商旅信息服务(上海)有限公司 Data processing method, system, electronic device and storage medium
CN115016978A (en) * 2022-04-12 2022-09-06 京东科技控股股份有限公司 Data verification method and device, computer storage medium and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8589790B2 (en) * 2008-11-02 2013-11-19 Observepoint Llc Rule-based validation of websites
US10977433B2 (en) * 2018-10-09 2021-04-13 Oracle International Corporation System and method for input data validation and conversion

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576823A (en) * 2009-06-11 2009-11-11 阿里巴巴集团控股有限公司 Method for verifying form control and device
CN102469091A (en) * 2010-11-18 2012-05-23 金蝶软件(中国)有限公司 Method for processing verification codes of pages, device and terminal
CN102324004A (en) * 2011-05-26 2012-01-18 重庆猪八戒网络有限公司 Verification method for webpage form input information and device
KR20130077908A (en) * 2011-12-29 2013-07-09 엔에이치엔비즈니스플랫폼 주식회사 Method and device for verifying input values in the form by both client and server side
CN102799690A (en) * 2012-08-13 2012-11-28 南京莱斯信息技术股份有限公司 Method for verifying page input by using database technology
WO2016019791A1 (en) * 2014-08-06 2016-02-11 阿里巴巴集团控股有限公司 Method and device of collecting and processing user feedback on webpage
CN109902459A (en) * 2017-12-11 2019-06-18 北京京东尚科信息技术有限公司 Man-machine identification verification method, system, equipment and the storage medium of WEB page
CN108509246A (en) * 2018-04-08 2018-09-07 重庆满惠网络科技有限公司 A kind of self-defined verification method of web form and system
CN108829882A (en) * 2018-06-27 2018-11-16 深圳乐信软件技术有限公司 Formation gathering method, device, terminal and medium
CN109783751A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 Form validation method and terminal device
CN111736811A (en) * 2020-06-10 2020-10-02 苏宁云计算有限公司 Form data verification method, system, server and user terminal
WO2021249356A1 (en) * 2020-06-10 2021-12-16 苏宁易购集团股份有限公司 Form data verification method, system, server, and user terminal
CA3139243A1 (en) * 2020-11-13 2022-05-13 10353744 Canada Ltd. Information collection method, device, computer equipment and storage medium
CN112800751A (en) * 2021-02-19 2021-05-14 上海中通吉网络技术有限公司 Method, device, equipment and storage medium for configuring and checking mobile terminal webpage form
CN114386037A (en) * 2022-01-14 2022-04-22 中国平安人寿保险股份有限公司 Malicious request defense method and related equipment based on Web front-end page
CN115016978A (en) * 2022-04-12 2022-09-06 京东科技控股股份有限公司 Data verification method and device, computer storage medium and electronic equipment
CN114780399A (en) * 2022-04-14 2022-07-22 江苏保旺达软件技术有限公司 Verification method, device, equipment and medium for page submitted data
CN114970476A (en) * 2022-06-07 2022-08-30 携程商旅信息服务(上海)有限公司 Data processing method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN115544417A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
CN108156237B (en) Product information pushing method and device, storage medium and computer equipment
CN1754166B (en) Navigation of the content space of a document set
AU2010310744B2 (en) Computer form action zone summary system and method
CN110597511B (en) Page automatic generation method, system, terminal equipment and storage medium
US20100281355A1 (en) Dynamically generated web surveys for use with census activities, and associated methods
US20170109455A1 (en) Combining website characteristics in an automatically generated website
CN111475700B (en) A data extraction method and related equipment
US20240281901A1 (en) Information processing apparatus, information processing method, and program
US20160292143A1 (en) System and method for automated online wizard generation
CN115544417B (en) Method and device for verifying web form, electronic equipment and storage medium
CN111414739A (en) Excel data entry component, entry method and device
CN111597452B (en) Method and device for adding tag, electronic equipment and readable storage medium
JP2002259896A (en) Electronic document processing device and method
CN108804889B (en) Website registration method and device
CN117171185B (en) Logistics data changing method and related equipment based on industrial identification
CN112860722A (en) Data checking method and device, electronic equipment and readable storage medium
KR100863121B1 (en) Ontology search system
CN117609347A (en) Data importing method, device and equipment based on verification and correction
CN112579589A (en) Information importing method and device
CN115544132A (en) Data import method and system and electronic equipment
CN111291215B (en) Formula generation method and server
CN117032646A (en) Index configuration method, index execution method and system
CN115599818B (en) Data query method and device, electronic equipment and storage medium
CN108683504B (en) Certificate issuing method based on multi-identity
CN107168684B (en) Method and device for generating content editing form

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant