Form filling method and system, computer equipment and storage medium
By listening and recording changes in form information in the H5 page, the problem of user loss of information due to abnormal logout is solved, and the automatic filling of forms is realized, improving user experience and filling efficiency.
Patent Information
- Application Number
- CN202411166155.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
In the H5 page, the user has lost the information filled in due to abnormal logout when filling out the form, and needs to be refilled, which increases the user burden and reduces the user experience. The existing technology cannot effectively solve this problem.
By listening to the user's form information in the H5 page, dynamically record the field change information to the cache, and automatically fill the form based on this information when the user re-enteres the page, ensuring real-time monitoring and recovery of information.
It realizes automatic filling of forms when reconnecting the H5 page, avoids duplicate filling caused by abnormal logout, and improves form filling efficiency and user experience.
Smart Images

Figure CN119047440A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology and financial technology, and is applied to the scenario of filling in a form in an H5 page, and in particular to a form filling method, system, computer device and storage medium. Background Art
[0002] With the rapid development of the financial technology industry, more and more financial services are provided to users through the mobile Internet, especially in the fields of leasing, payment, credit, etc. In such business scenarios, H5 pages have become an important service channel due to their flexibility and cross-platform characteristics.
[0003] However, in H5 pages, users often need to fill in more complex form information, such as personal information, order details, etc. These form information usually contain multiple fields and are rich in content, which makes the user's filling process more cumbersome and takes a long time. As a result, once the user encounters a login credential expiration or other abnormal situation that causes the page to be closed due to a long time in the form filling process, the information that has been filled in will be cleared and it will be necessary to fill it in again. This situation not only increases the user burden and reduces the user experience, but may also lead to a certain degree of customer churn and business loss.
[0004] At present, conventional solutions include automatically filling in forms by building a user history form library, and automatically filling in forms using the last submitted form data. Although these solutions can alleviate the problem of users filling in forms repeatedly, they still cannot properly handle the situation where users are abnormally logged out before submitting the form. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a form filling method, system, computer device and storage medium, the main purpose of which is to handle the situation where the user is abnormally logged out before submitting the form, so as to improve the efficiency of the user filling out the form.
[0006] In order to solve the above technical problems, the present application embodiment provides a form filling method, which adopts the following technical solution:
[0007] A form filling method comprises the following steps:
[0008] When the user enters the H5 page to be filled in, monitor the form information filled in by the user in the H5 page;
[0009] Determine whether there is any field change in the form information;
[0010] If there are field changes in the form information, the field change information is dynamically recorded in the cache;
[0011] Real-time monitoring of whether abnormal logout occurs on the H5 page;
[0012] If an abnormal logout occurs on the H5 page, when the user re-enters the H5 page, the form information is filled in according to the field change information;
[0013] When the user submits the completed form, the field change information is cleared from the cache.
[0014] Furthermore, if there is a field change in the form information, the step of dynamically recording the field change information in the cache specifically includes:
[0015] If there is a field change in the form information, then obtaining the field value variable in the form information, the field ID corresponding to the field value variable, and the timestamps before and after the change;
[0016] Generate a unique identifier based on the field ID and the timestamp;
[0017] The unique identifier and the field value variable are associated as the field change information in the form of a key-value pair, and the field change information is stored in the cache.
[0018] Furthermore, if an abnormal logout occurs on the H5 page, when the user re-enters the H5 page, the step of filling in the form information according to the field change information specifically includes:
[0019] If an abnormal logout of the H5 page is detected, when the user re-enters the H5 page, it is detected whether the field change information exists in the cache;
[0020] If the field change information exists, the corresponding target unique identifier is retrieved in the cache according to the inherent field ID in the form information;
[0021] The target field value variable associated with the target unique identifier is read, and the field filling area corresponding to the inherent field ID is filled according to the target field value variable.
[0022] Furthermore, after the step of dynamically recording the field change information into the cache if there is a field change in the form information, the method further includes:
[0023] Providing a preview interface corresponding to the field change information on the H5 page;
[0024] receiving, according to the preview interface, an update instruction sent by the user and carrying a target timestamp;
[0025] Determining target field change information in the cache according to the target timestamp;
[0026] The form information is updated according to the target field change information.
[0027] Furthermore, when the user enters the H5 page to be filled in, the step of monitoring the form information filled in by the user in the H5 page specifically includes:
[0028] When the user enters the H5 page, a proxy object corresponding to the form object in the H5 page is created;
[0029] The form information is monitored in real time according to the proxy object to determine whether there is any field change in the form information.
[0030] Furthermore, the cache is a localStorage cache of a Web browser, and the step of dynamically recording the field change information into the cache further includes:
[0031] Convert the field change information into a string in a key-value pair format in real time;
[0032] Store the string in the localStorage cache.
[0033] Furthermore, when the user submits the completed form, the step of clearing the field change information in the cache specifically includes:
[0034] After the user submits the completed form, the field change information is removed through the cached API interface, and the cached state and the user's session state are updated.
[0035] In order to solve the above technical problems, the embodiment of the present application also provides a form filling system, which adopts the following technical solution:
[0036] A form filling system, comprising:
[0037] A monitoring module, used for monitoring the form information filled in by the user in the H5 page when the user enters the H5 page to be filled in;
[0038] A judgment module, used to judge whether there is any field change in the form information;
[0039] A recording module, used for dynamically recording field change information into a cache if there is a field change in the form information;
[0040] A monitoring module is used to monitor in real time whether an abnormal logout occurs on the H5 page;
[0041] A filling module, used for filling the form information according to the field change information when the user re-enters the H5 page if an abnormal logout occurs on the H5 page;
[0042] The clearing module is used to clear the field change information in the cache after the user submits the completed form.
[0043] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0044] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the form filling method as described above when executing the computer-readable instructions.
[0045] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0046] A computer-readable storage medium stores computer-readable instructions, which implement the steps of the form filling method described above when executed by a processor.
[0047] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0048] The form filling method disclosed in the present application monitors the form information filled in by the user in the H5 page when the user enters the H5 page to be filled in; determines whether there are field changes in the form information; if there are field changes in the form information, dynamically records the field change information in the cache; monitors in real time whether the H5 page has an abnormal logout; if the H5 page has an abnormal logout, fills in the form information according to the field change information when the user re-enters the H5 page; after the user submits the completed form, clears the field change information in the cache. The present application can realize automatic filling of the form when the H5 page is reconnected by real-time caching of form changes, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0051] Figure 2 is a flow chart of an embodiment of a form filling method according to the present application;
[0052] Figure 3 is a structural schematic diagram of an embodiment of a form filling system according to the present application;
[0053] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0058] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0059] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0060] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0061] It should be noted that the form filling method provided in the embodiment of the present application is generally executed by a terminal device, and accordingly, the form filling system is generally set in the terminal device.
[0062] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0063] Continue to refer Figure 2 , shows a flow chart of an embodiment of a form filling method according to the present application. The form filling method comprises the following steps:
[0064] Step S201, when a user enters an H5 page to be filled in, monitor the form information filled in by the user in the H5 page.
[0065] In this embodiment, the form filling method is executed on the electronic device (eg Figure 1 The terminal device shown in the figure can send or receive data through a wired connection or a wireless connection. It should be noted that the above wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0066] It should be noted that H5 pages are mobile web pages developed based on HTML5 technology, and are also a type of web application in a broad sense. They have high interactivity and multimedia support capabilities. H5 pages can be embedded in mobile applications as part of the function, or they can exist as a separate web application. Therefore, in financial technology-related fields such as leasing, payment, and credit, H5 pages can serve as an important service channel.
[0067] Specifically, when a user enters an H5 page that needs to fill in form information through an application, the form filling system (hereinafter referred to as the "system") that runs the form filling method of this embodiment will enable the monitoring mechanism. Specifically, the system can create a proxy object corresponding to the form object in the H5 page through the Proxy function, and monitor each field in the form, including but not limited to text boxes, drop-down menus, check boxes, etc., through the proxy object to determine whether there is a change. Once any change in the form field is monitored (for example, the user enters new characters in the text box or selects a different option), it can be recorded in the cache.
[0068] It should be noted that in JavaScript, Proxy is a constructor used to create a proxy object that can intercept and customize basic operations and is generally used to observe and control access to and operations on the target object.
[0069] Step S202, determining whether there is any field change in the form information.
[0070] Specifically, since the system has started the monitoring mechanism, it can monitor the changes of each field in the form in real time through the proxy object (Proxy). When the user enters new content in the input box or selects different options, the system can immediately capture the change and determine whether there is a field change in the form information, thereby recording the current value of the field (field value variable), the name of the field (field ID) and the specific time when the change occurred (timestamp).
[0071] Step S203: If there is a field change in the form information, the field change information is dynamically recorded in the cache.
[0072] It should be noted that Web caching is an information technology that is mainly used to temporarily store Web documents (such as HTML pages, images, JavaScript, CSS, etc.) to reduce the time delay of server response. When the client requests these resources, if there is a copy of these resources in the cache and certain conditions are met, such as the resources are not expired or not marked as updated, then the resources can be obtained directly from the cache instead of re-downloading from the original server. This mechanism can significantly increase the speed of web page loading, reduce the use of network bandwidth, and improve user experience. H5 cache can exist at different levels, including browser cache (such as localStorage, sessionStorage, cookies, etc.) and HTTP cache (implemented by configuring HTTP request headers), and browser cache and HTTP cache work together to achieve more efficient content delivery.
[0073] Specifically, the cache is a browser cache. When the user starts to fill in the form on the H5 page to be filled in, the system can determine whether there are changes in the fields in the form based on the above-mentioned monitoring mechanism. When any field change is detected, for example, the user enters new content in the input box, the system immediately captures the change as a field value variable, and generates a key-value pair based on the field value variable. Since the changed field generally has its corresponding field ID (i.e., field name) and the timestamps before and after the change is sent, a unique identifier of the field value variable can be generated based on the field ID and timestamp, and then the unique identifier is associated with the field value variable in the form of a key-value pair and stored in the browser cache as field change information, as shown in Table 1 below:
[0074] Table 1 Field change information in the form of key-value pairs
[0075] key1 key2 ... keyN values1 values2 ... valuesN
[0076] Among them, key1 represents the first unique identifier, values1 represents the first field value variable, and so on, keyN represents the latest unique identifier, and valuesN represents the latest field value variable. In this way, when an abnormal logout occurs in the subsequent H5 page, the form information in the H5 page can be restored according to the field change information in the cache.
[0077] Step S204, real-time monitoring of whether an abnormal logout occurs on the H5 page.
[0078] Specifically, the system monitors in real time whether an abnormal logout occurs on the H5 page, such as when the network connection is interrupted or the user accidentally closes the browser window. For example, the system detects whether the user leaves the H5 page actively or passively by listening to specific events of the browser (such as beforeunload or unload events). Once a specific event is detected to be triggered, it can be confirmed that an abnormal logout occurs on the H5 page.
[0079] Step S205, if it is detected that an abnormal logout occurs on the H5 page, then when the user re-enters the H5 page, the form information is filled in according to the field change information.
[0080] Specifically, if the system detects an abnormal logout of the H5 page (for example, due to network interruption or the user closing the browser window), then when the user re-enters the H5 page, the system first needs to detect whether there is field change information corresponding to the form information filled in by the user in the browser cache. If there is field change information, the corresponding target unique identifier can be retrieved in the cache based on the inherent field ID in the form information, and the target field value variable associated with the target unique identifier can be read, and the field filling area corresponding to the inherent field ID can be filled one by one according to the target field value variable.
[0081] Step S206: After the user submits the completed form, the field change information is cleared from the cache.
[0082] Specifically, when the user completes filling in the form information, he can click the Submit button to submit it or submit it through other operations. At this time, the system first verifies the validity of the form information to determine whether there are any errors or omissions. If the verification passes, the system sends the form information to the server for further processing, and then removes the recorded field change information corresponding to the form information through the browser cache API interface, and updates the cache status and the user's session status to reflect that the form information has been submitted, and releases the browser's memory space, avoiding performance problems caused by cache accumulation.
[0083] This application can realize automatic filling of the form when the H5 page is reconnected by real-time caching of form changes, avoiding the situation where users need to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0084] In some optional implementations of this embodiment, if there is a field change in the form information, the step of dynamically recording the field change information into the cache includes:
[0085] If there is a field change in the form information, then obtaining the field value variable in the form information, the field ID corresponding to the field value variable, and the timestamps before and after the change;
[0086] Generate a unique identifier based on the field ID and the timestamp;
[0087] The unique identifier and the field value variable are associated as the field change information in the form of a key-value pair, and the field change information is stored in the cache.
[0088] In this embodiment, when the user starts to fill out the form, the system starts to monitor each field in the form. Whenever a change is detected in a field in the form, the system records the current value of the field (field value variable), the name of the field (field ID), and the specific time when the change occurred (timestamp). Subsequently, the system generates a unique identifier based on the field ID and timestamp to distinguish different field change events. Finally, the system stores this information in the form of a key-value pair in the browser cache as field change information, where the key is the generated unique identifier and the body of the value is the field value variable.
[0089] This application stores field change information in the browser cache in the form of key-value pairs, so that when the H5 page is reconnected later, the form can be automatically filled in according to the field change information, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0090] In some optional implementations of this embodiment, if an abnormal logout occurs on the H5 page, when the user re-enters the H5 page, the step of filling in the form information according to the field change information includes:
[0091] If an abnormal logout of the H5 page is detected, when the user re-enters the H5 page, it is detected whether the field change information exists in the cache;
[0092] If the field change information exists, the corresponding target unique identifier is retrieved in the cache according to the inherent field ID in the form information;
[0093] The target field value variable associated with the target unique identifier is read, and the field filling area corresponding to the inherent field ID is filled according to the target field value variable.
[0094] In this embodiment, abnormal logout situations may include a network connection terminal or a user closing a browser window. Once an abnormal logout of an H5 page is detected, when the user re-enters the H5 page, the system first checks whether there is field change information related to the user in the browser cache. If so, the system retrieves the corresponding target unique identifier in the browser cache based on the inherent field ID (field name) of the field to be filled in the form. Then, the system reads the target field value variable associated with the target unique identifier, obtains the field content corresponding to the target field value variable, and automatically fills the field content into the corresponding field filling area in the form, thereby restoring the form information filled in by the user before the abnormal logout.
[0095] This application automatically fills in the form when the H5 page is reconnected through the cached field change information, thereby avoiding the situation where users need to fill in the form again due to abnormal logout, improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0096] In some optional implementations of this embodiment, after the above step of dynamically recording the field change information into the cache if there is a field change in the form information, the following is further included:
[0097] Providing a preview interface corresponding to the field change information on the H5 page;
[0098] receiving, according to the preview interface, an update instruction sent by the user and carrying a target timestamp;
[0099] Determining target field change information in the cache according to the target timestamp;
[0100] The form information is updated according to the target field change information.
[0101] In this embodiment, since the user fills out the form in the H5 page, each time a field in the form changes, the system will dynamically record the field change information into the browser cache. Therefore, the system provides a preview interface corresponding to the recorded field change information on the H5 page, which is used to display all field change information of the current form. The user can view the field change information in the preview interface, select the target timestamp, and send an update instruction carrying the target timestamp. The system can determine all the field change information before the target timestamp in the cache based on the target timestamp as the target field change information, and update the form information based on the target field change information, thereby ensuring that the user can preview the filled-in form information in real time and perform backtracking.
[0102] This application can receive users' adjustment requests for form information by providing a preview interface for field change information, and realize the backtracking of form information during the form filling process, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0103] In some optional implementations of this embodiment, when the user enters the H5 page to be filled in, the step of monitoring the form information filled in by the user in the H5 page includes:
[0104] When the user enters the H5 page, a proxy object corresponding to the form object in the H5 page is created;
[0105] The form information is monitored in real time according to the proxy object to determine whether there is any field change in the form information.
[0106] In this embodiment, when the user enters the H5 page for the first time and starts filling out the form, the system first creates a proxy object (Proxy) to wrap the form object. This proxy object can be responsible for monitoring each field in the form. In the subsequent filling process, once any field change is detected, the proxy object will record the field values before and after the change and the timestamp of the change, and dynamically record this information in the browser cache.
[0107] This application can dynamically record the field change information corresponding to the form information filled in by the user through a monitoring mechanism for form changes, so as to realize automatic filling of the form when the H5 page is reconnected later, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0108] In some optional implementations of this embodiment, the cache is a localStorage cache of a Web browser, and the step of dynamically recording the field change information into the cache further includes:
[0109] Convert the field change information into a string in a key-value pair format in real time;
[0110] Store the string in the localStorage cache.
[0111] It should be noted that in Web development, session storage technology (sessionStorage), local storage technology (localStorage) and Cookies are three commonly used client storage technologies. Among them, sessionStorage is a Web storage API that allows websites to store key-value data in the user's browser. This data is only available during a browser session. When the user closes the browser window or tab, the data will be automatically cleared; localStorage is also a Web storage API, similar to sessionStorage, but its data will not be cleared when the browser session ends. Unless it is manually deleted or the user clears the browser data, the data will be permanently stored in the user's browser; Cookies are an earlier Web storage technology that allows websites to store a small amount of data (up to about 4KB) in the user's browser. Unlike the first two, Cookie data will be sent to the server with the HTTP header at each request.
[0112] In this embodiment, since sessionStorage technology will automatically clear data when the browser window or tab is closed, and Cookie technology can only store a small amount of data, the browser cache selects localStorage technology, which is suitable for scenarios where data needs to be saved during a user session, such as form filling, shopping cart information, etc. According to the format of Table 1 above, the field change information can be converted into a string in the key-value pair format in real time and stored in the browser cache, so as to restore the form information when the H5 page is reconnected later.
[0113] By selecting an appropriate browser cache, this application can record form changes in real time, so that the form can be automatically filled in when the H5 page is reconnected later, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0114] In some optional implementations of this embodiment, after the user submits the completed form, the step of clearing the field change information in the cache includes:
[0115] After the user submits the completed form, the field change information is removed through the cached API interface, and the cached state and the user's session state are updated.
[0116] In this embodiment, when the user completes the form filling and submits the form, the system triggers a submission event. At this time, the system uses the sessionStorage API interface (such as the removeItem method) to remove the field change information related to the form information, thereby freeing up cache space. After removing the field change information, the system also updates the cache status and the user's session status, which helps to keep the form status up to date and prevent old data from being mistakenly filled in when the user logs in again.
[0117] It should be noted that the removetem method is an important method used in web browsers to operate local storage (localStorage and sessionStorage), which can be used to remove a key-value pair from the storage.
[0118] This application removes the cache after the form is submitted, which can prevent the old data from being mistakenly filled in when the user logs in again, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0119] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0120] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0122] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0123] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a form filling system, which is similar to Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0124] like Figure 3 As shown, the form filling system 300 described in this embodiment includes: a monitoring module 301, a judgment module 302, a recording module 303, a monitoring module 304, a filling module 305 and a clearing module 306. Among them:
[0125] The monitoring module 301 is used to monitor the form information filled in by the user in the H5 page when the user enters the H5 page to be filled in;
[0126] A determination module 302 is used to determine whether there is any field change in the form information;
[0127] The recording module 303 is used to dynamically record the field change information into the cache if there is a field change in the form information;
[0128] Monitoring module 304, used to monitor in real time whether abnormal logout occurs on the H5 page;
[0129] A filling module 305 is used to fill in the form information according to the field change information when the user re-enters the H5 page if an abnormal logout occurs on the H5 page;
[0130] The clearing module 306 is used to clear the field change information in the cache after the user submits the completed form.
[0131] The form filling system provided in this application can realize automatic filling of the form when the H5 page is reconnected by real-time caching of form changes, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0132] In some optional implementations of this embodiment, the recording module 303 is further configured to:
[0133] If there is a field change in the form information, obtaining the field value variable in the form information, the field ID corresponding to the field value variable, and the timestamps before and after the change;
[0134] Generate a unique identifier based on the field ID and the timestamp;
[0135] The unique identifier and the field value variable are associated as the field change information in the form of a key-value pair, and the field change information is stored in the cache.
[0136] The form filling system provided by the present application stores field change information in the browser cache in the form of key-value pairs, so that the form can be automatically filled in according to the field change information when the H5 page is reconnected later, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0137] In some optional implementations of this embodiment, the filling module 305 is further used to:
[0138] If an abnormal logout of the H5 page is detected, when the user re-enters the H5 page, it is detected whether the field change information exists in the cache;
[0139] If the field change information exists, the corresponding target unique identifier is retrieved in the cache according to the inherent field ID in the form information;
[0140] The target field value variable associated with the target unique identifier is read, and the field filling area corresponding to the inherent field ID is filled according to the target field value variable.
[0141] The form filling system provided in this application automatically fills the form when the H5 page is reconnected through the cached field change information, thereby avoiding the situation where users need to fill in the form again due to abnormal logout, improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0142] In some optional implementations of this embodiment, the form filling system 300 is further used to:
[0143] Providing a preview interface corresponding to the field change information on the H5 page;
[0144] receiving, according to the preview interface, an update instruction sent by the user and carrying a target timestamp;
[0145] Determining target field change information in the cache according to the target timestamp;
[0146] The form information is updated according to the target field change information.
[0147] The form filling system provided in the present application can receive users' adjustment requirements for form information by providing a preview interface for field change information, and realize the backtracking of form information during the form filling process, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0148] In some optional implementations of this embodiment, the monitoring module 301 is further configured to:
[0149] When the user enters the H5 page, a proxy object corresponding to the form object in the H5 page is created;
[0150] The form information is monitored in real time according to the proxy object to determine whether there is any field change in the form information.
[0151] The form filling system provided in the present application can dynamically record the field change information corresponding to the form information filled in by the user through a monitoring mechanism for form changes, thereby realizing automatic filling of the form when the H5 page is reconnected subsequently, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0152] In some optional implementations of this embodiment, the cache is a localStorage cache of a web browser, and the recording module 303 is further used to:
[0153] Convert the field change information into a string in a key-value pair format in real time;
[0154] Store the string in the localStorage cache.
[0155] The form filling system provided by the present application can record form changes in real time by selecting a suitable browser cache, so that the form can be automatically filled in when the H5 page is reconnected later, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0156] In some optional implementations of this embodiment, the clearing module 306 is further configured to:
[0157] After the user submits the completed form, the field change information is removed through the cached API interface, and the cached state and the user's session state are updated.
[0158] The form filling system provided in this application can prevent the situation where old data is mistakenly filled in when the user logs in again by removing the cache after the form is submitted, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0159] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0160] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0161] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0162] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the form filling method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0163] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the form filling method.
[0164] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0165] The computer device provided by the present application can realize automatic filling of the form when the H5 page is reconnected by real-time caching of form changes, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0166] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the form filling method as described above.
[0167] The computer-readable storage medium provided by the present application can realize automatic filling of the form when the H5 page is reconnected by real-time caching of form changes, avoiding the situation where the user needs to fill in the form again due to abnormal logout, thereby improving the efficiency of form filling, enhancing the user experience, and increasing user satisfaction.
[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0169] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A form filling method, It is characterized in that The steps include: When the user enters the H5 page to be filled in, monitor the form information filled in by the user in the H5 page; Determine whether there is any field change in the form information; If there are field changes in the form information, the field change information is dynamically recorded in the cache; Real-time monitoring of whether abnormal logout occurs on the H5 page; If an abnormal logout occurs on the H5 page, when the user re-enters the H5 page, the form information is filled in according to the field change information; When the user submits the completed form, the field change information is cleared from the cache.
2. The form filling method according to claim 1, It is characterized in that If there is a field change in the form information, the step of dynamically recording the field change information in the cache specifically includes: If there is a field change in the form information, then obtaining the field value variable in the form information, the field ID corresponding to the field value variable, and the timestamps before and after the change; Generate a unique identifier based on the field ID and the timestamp; The unique identifier and the field value variable are associated as the field change information in the form of a key-value pair, and the field change information is stored in the cache.
3. The form filling method according to claim 2, It is characterized in that If an abnormal logout occurs on the H5 page, when the user re-enters the H5 page, the step of filling in the form information according to the field change information specifically includes: If an abnormal logout of the H5 page is detected, when the user re-enters the H5 page, it is detected whether the field change information exists in the cache; If the field change information exists, the corresponding target unique identifier is retrieved in the cache according to the inherent field ID in the form information; The target field value variable associated with the target unique identifier is read, and the field filling area corresponding to the inherent field ID is filled according to the target field value variable.
4. The form filling method according to claim 2, It is characterized in that After the step of dynamically recording the field change information into the cache if there is a field change in the form information, the method further includes: Providing a preview interface corresponding to the field change information on the H5 page; receiving, according to the preview interface, an update instruction sent by the user and carrying a target timestamp; Determining target field change information in the cache according to the target timestamp; The form information is updated according to the target field change information.
5. The form filling method according to claim 1, It is characterized in that When the user enters the H5 page to be filled in, the step of monitoring the form information filled in by the user in the H5 page specifically includes: When the user enters the H5 page, a proxy object corresponding to the form object in the H5 page is created; The form information is monitored in real time according to the proxy object to determine whether there is any field change in the form information.
6. The form filling method according to claim 1, It is characterized in that The cache is a localStorage cache of a Web browser, and the step of dynamically recording the field change information into the cache further includes: Convert the field change information into a string in a key-value pair format in real time; Store the string in the localStorage cache.
7. A form filling method according to any one of claims 1 to 6, It is characterized in that The step of clearing the field change information in the cache after the user submits the completed form specifically includes: After the user submits the completed form, the field change information is removed through the cached API interface, and the cached state and the user's session state are updated.
8. A form filling system, It is characterized in that include: A monitoring module, used for monitoring the form information filled in by the user in the H5 page when the user enters the H5 page to be filled in; A judgment module, used to judge whether there is any field change in the form information; A recording module, used for dynamically recording field change information into a cache if there is a field change in the form information; A monitoring module is used to monitor in real time whether an abnormal logout occurs on the H5 page; A filling module, used for filling the form information according to the field change information when the user re-enters the H5 page if an abnormal logout occurs on the H5 page; The clearing module is used to clear the field change information in the cache after the user submits the completed form.
9. A computer device, It is characterized in that The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the form filling method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the form filling method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Automatic filling method based on browser
CN119623435A
