Form data processing method and device, computer readable storage medium and processor

By maintaining form detection sets on the front end and intercepting data when repetitive submissions are identified, the problem of repeated submissions is solved, the system response speed and user experience are improved, and the resource consumption of back-end servers is reduced.

CN120373271APending Publication Date: 2025-07-25ZHONGJINKE INFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510859699.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing technology cannot effectively prevent the duplicate submission of form data, resulting in waste of back-end server resources and a decline in user experience, and existing solutions increase the back-end burden or affect the user experience.

Method used

Maintain a form detection set on the front end. By comparing newly submitted form data with the data in the set, identifying duplicate submissions, intercepting duplicate data on the front end, ending its life cycle, and generating alarm information to avoid sending to the back end.

Benefits of technology

Without affecting user operations, it effectively prevents repeated submissions of forms, reduces front-end interactions, improves system response speed and user experience, and reduces the burden on back-end servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373271A_ABST
    Figure CN120373271A_ABST
Patent Text Reader

Abstract

The invention discloses a form data processing method and device, a computer readable storage medium and a processor. The method is applied to a front end, and comprises the following steps: in response to a submission operation of target form data, obtaining the target form data; the target form data is compared with a form detection set, a comparison result is obtained, the form detection set comprises form data in processing in a back-end server corresponding to the front end, and the comparison result is used for representing whether form data consistent with the target form data exists in the form detection set or not; and in response to the comparison result, indicating that form data consistent with the target form data exists in the form detection set, intercepting the target form data, and ending the life cycle of the target form data. The technical problem that repeated submission of form data cannot be effectively prevented is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a method, an apparatus, a computer-readable storage medium, and a processor for processing form data. Background Art

[0002] At present, the Asynchronous JavaScript and XML (AJAX) technology has become the basis for asynchronous interaction between web pages and back-end servers. Since the AJAX technology allows data to be exchanged with the server without reloading the entire page, it provides a smooth user experience for users. However, the asynchronous feature of AJAX also brings the problem of repeated form submissions. Especially when the user clicks quickly or the network latency is large, the user may submit the form again before the first request is completed, resulting in multiple requests being sent to the back-end server, causing waste of resources on the back-end server.

[0003] In the related art, in order to avoid repeated form submissions, a duplicate checking mechanism is usually added to the back-end server. For example, the back-end server checks the submitted form data for duplicates to avoid the problem of repeated form submissions, or adds a unique identifier (Token) to each submitted form and sends it to the back-end server together with the form. The back-end server prevents repeated submissions by verifying the identifier corresponding to the form. However, both of these methods require frequent interaction between the front end and the back end, which will increase the burden on the back-end server and affect the user experience.

[0004] In view of the above technical problem that form data cannot be effectively prevented from being repeatedly submitted, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of the present invention provide a method, an apparatus, a computer-readable storage medium, and a processor for processing form data, so as to at least solve the technical problem that form data cannot be effectively prevented from being repeatedly submitted.

[0006] According to one aspect of the embodiments of the present invention, a method for processing form data is provided, which is applied to the front end. The method may include: in response to a submission operation of target form data, obtaining the target form data; comparing the target form data with a form detection set to obtain a comparison result, where the form detection set includes form data being processed in the back-end server corresponding to the front end, and the comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data; in response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data, intercepting the target form data and at the same time ending the life cycle of the target form data.

[0007] Optionally, the method for processing the form data further includes: in response to the comparison result indicating that there is no form data in the form detection set that is the same as the target form data, storing the target form data in the form detection set and sending the target form data to the backend server.

[0008] Optionally, before comparing the target form data with the form detection set, the method for processing the form data further includes: extracting the sending time of the target form data from the target form data; removing the sending time from the target form data.

[0009] Optionally, after intercepting the target form data, the method for processing the form data further includes: generating an alarm message, where the alarm message is used to indicate that there is a duplicate of the target form data in the form data in the form detection set; displaying the alarm message on the display page of the front end.

[0010] Optionally, the method for processing the form data further includes: in response to receiving feedback information from the backend server for any form data in the form detection set, deleting any form data from the form detection set, where the feedback information is used to indicate that any form data has been processed in the backend server.

[0011] Optionally, the method for processing the form data further includes: storing the intercepted target form data in a duplicate form queue; in response to the form data in the form detection set that is duplicate with the target form data being processed in the backend server, sending the target form data to the backend server.

[0012] According to another aspect of the embodiments of the present invention, there is also provided an apparatus for processing form data. The apparatus may include: a receiving unit, configured to obtain target form data in response to a submission operation of the target form data; a comparison unit, configured to compare the target form data with a form detection set to obtain a comparison result, where the form detection set includes form data being processed in the backend server corresponding to the front end, and the comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data; an interception unit, configured to intercept the target form data in response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data, and at the same time end the life cycle of the target form data.

[0013] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium includes a stored program, where when the program is run by a processor, it controls the device where the storage medium is located to execute the method for processing form data in the embodiments of the present invention.

[0014] According to another aspect of the embodiments of the present invention, a processor is further provided. The processor is used to run a program, and when the program runs, it executes the method for processing form data in the embodiments of the present invention.

[0015] According to another aspect of the embodiments of the present invention, a computer program product is further provided. The program product includes computer instructions, and when the computer instructions are executed by a processor, the method for processing form data in the embodiments of the present invention is implemented.

[0016] In the embodiments of the present invention, after the front end obtains the newly submitted target form data, it can directly perform duplicate detection on the target form data and the form data in the form detection set maintained by the front end. When it is detected that there is a duplicate between the target form data and the form data in the form detection set, the target form data can be directly intercepted at the front end to prevent it from being sent to the back-end server, and the life cycle of the target form data is ended. That is to say, in the embodiments of the present invention, the front end can independently identify and process the problem of duplicate submissions without frequently interacting with the back end or relying on the response of the back end, thereby improving the response speed of the system, reducing the coupling degree between the front and back ends, enhancing the user experience, preventing duplicate forms from entering the back-end server, reducing the resource consumption of the back-end server, and thus solving the technical problem of being unable to effectively prevent duplicate submissions of form data. Description of the Drawings

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0018] Figure 1 is a flowchart of a method for processing form data according to an embodiment of the present invention;

[0019] Figure 2 is a flowchart of a method for preventing duplicate form submissions based on the front end according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a device for processing form data according to an embodiment of the present invention. Detailed Embodiments

[0021] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, functional component or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, functional components or devices.

[0023] According to an embodiment of the present invention, an embodiment of a method for processing form data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0024] Figure 1 is a flowchart of a method for processing form data according to an embodiment of the present invention, as Figure 1 shown, the method may include the following steps:

[0025] Step S101, in response to a submission operation of target form data, obtain the target form data.

[0026] In the technical solution provided in step S101 of the present invention above, the target form data is form data filled in by a user on a front-end display page.

[0027] In this embodiment, after the user fills in the target form data, when the user can click the submission button on the display page, after the front end responds to the click operation of the submission button, that is, in response to the submission operation of the target form data, in this case, to avoid duplicate submission of the form data to the back-end server corresponding to the front end, the front end can first obtain the target form data and determine whether there is a problem of duplicate submission of the target form data.

[0028] Step S102, compare the target form data with a form detection set to obtain a comparison result.

[0029] In the technical solution provided in step S102 of the present invention above, the form detection set is a data structure maintained by the front end. The form detection set includes form data being processed in the back-end server corresponding to the front end. That is to say, the form detection set is used for the form data currently being processed by the back-end server. The comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data.

[0030] In this embodiment, after the front end obtains the target form data, the target form data can be compared with each form data stored in the form detection set to obtain a comparison result, which is used to indicate whether there is form data in the form detection set that is the same as the target form data. If the comparison result indicates that there is form data in the form detection set that is the same as the target form data, it means that the target form data is duplicate-submitted form data. If the comparison result indicates that there is no form data in the form detection set that is the same as the target form data, it means that the target form data is not duplicate-submitted form data.

[0031] For example, the front end can call a predefined "pre-request aspect interface" to check whether the target form data is duplicate with the form data in the form detection set. This is only an exemplary form duplication determination method and does not limit the form duplication determination method of the front end.

[0032] Optionally, since the sending time of the form data is different each time it is submitted, but this does not affect the consistency judgment of the form content. Therefore, to avoid the influence of the sending time on the accuracy of the form duplication determination result. When performing the duplication detection on the target form data and the form data in the form detection set, elements related to the sending time in the target form data can be removed. Then, the duplication detection is performed on the target form data and the form data in the form detection set to check whether there is form data in the form detection set that is exactly the same as the target form data in content.

[0033] Step S103, in response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data, intercept the target form data and at the same time end the life cycle of the target form data.

[0034] In the technical solution provided in step S103 of the present invention above, after obtaining the comparison result of the target form data and the form data in the form detection set through the above step S102, if the comparison result indicates that there is form data in the form detection set that is the same as the target form data, to avoid duplicate form data being sent to the back-end server and causing waste of resources of the back-end server, the front end can directly intercept the target form data to prevent the target form data from being transmitted to the back-end server. At the same time, end the life cycle of the target form data.

[0035] In this embodiment, when the front-end determines that the target form data duplicates the form data in the form detection set, the front-end can intercept the target form data, that is, the front-end will prevent the target form data from being sent to the back-end server, preventing the back-end server from processing duplicate requests, saving server resources, and avoiding possible business logic errors.

[0036] Optionally, after the front-end intercepts the target form data, the life cycle of the target form data can be directly ended, that is, the intercepted target form data will be regarded as processed, and its life cycle is marked as ended at the front-end level.

[0037] Optionally, after the front-end intercepts the target form data, an alarm message can be generated and displayed on the display interface of the front-end to remind the user that the currently submitted target form data duplicates the previously submitted form data, preventing the user from making multiple unnecessary attempts due to network latency or submission confirmation latency, and also improving the user experience and enabling the user to understand the work being done by the system.

[0038] Through this step, duplicate submission of forms is effectively prevented at the front-end level. Moreover, without interfering with the user's normal single submission, the response speed and efficiency of the system are ensured, while reducing the interaction with the back-end server, reducing the coupling of the system, and improving the overall performance.

[0039] In the above steps S101 to S103, after the front-end obtains the newly submitted target form data, it can directly perform duplicate detection on the target form data and the form data in the form detection set maintained by the front-end. When it is detected that the target form data duplicates the form data in the form detection set, the front-end can directly intercept the target form data at the front-end, prevent it from being sent to the back-end server, and end the life cycle of the target form data. That is to say, in the embodiment of the present application, the front-end can independently identify and process the problem of duplicate submission without frequently interacting with the back-end or relying on the back-end response, thereby improving the response speed of the system, reducing the coupling degree between the front-end and the back-end, enhancing the user experience, preventing duplicate forms from entering the back-end server, reducing the resource consumption of the back-end server, and thus solving the technical problem of being unable to effectively prevent duplicate submission of form data.

[0040] The above method of this embodiment will be further introduced below.

[0041] As an optional implementation manner, the method for processing the form data further includes: in response to the comparison result indicating that there is no form data in the form detection set that is the same as the target form data, storing the target form data in the form detection set and sending the target form data to the back-end server.

[0042] In this embodiment, if the comparison result between the target form data and the form data in the form detection set indicates that there is no form data in the form detection set that is consistent with the target form data, it means that the target form data is not a repeatedly submitted form data. In this case, the target form data can be stored in the form detection set, and the target form data can be sent to the backend server.

[0043] For example, storing the target form data in the form detection set can prevent receiving form data that is repeated with the target form data when the backend server processes the target form data.

[0044] In this step, when the target form data passes the duplication check, the front end will initiate communication with the backend server and send the target form data to the backend server for processing, ensuring the efficiency of single submission and the overall stability and user experience of the system.

[0045] As an alternative implementation, before comparing the target form data with the form detection set, the method for processing the form data further includes: extracting the sending time of the target form data from the target form data; removing the sending time from the target form data.

[0046] In this embodiment, in order to avoid misjudgment that the form data seems different but actually has the same content due to the variable of the sending time, before comparing the target form data with the form detection set, the sending time can be extracted and removed from the target form data.

[0047] For example, when a user submits a form, the front end can encapsulate the form data to make it a target form data. During this encapsulation process, a timestamp, that is, the sending time, will be recorded as part of the form data. The recording of the sending time can facilitate tracking the submission time of the form. Before the target form data is ready to be compared with the form detection set, the element of the sending time can be removed from the target form data. This is because the sending time will be different for each form submission, and the key point of comparison is the actual content of the form, that is, all fields and values except the sending time. After removing the sending time, it can be more accurately determined whether the currently submitted target form data is a duplicate in content with the form data that already exists and is being processed in the form detection set.

[0048] Optionally, after removing the sending time, the front end compares the target form data with the form data in the form detection set after removing the sending time to determine whether the target form data is a duplicate submission. If it is found that there is form data in the form detection set that is consistent with the target form data, it means that there is a duplicate submission. The front end will immediately intercept and end the life cycle of the form, and issue a warning to the user. Otherwise, the form data will be added to the form detection set and sent to the back-end server for processing.

[0049] In this step, extracting and removing the sending time from the target form data solves the comparison deviation that may be caused by this dynamic variable of the sending time. By removing the sending time, it can be ensured that only the static content of the form is concerned during the comparison, and true duplicate submissions can be identified more accurately, effectively avoiding false positives and false negatives, and improving the accuracy and efficiency of the entire anti-duplicate submission mechanism.

[0050] As an optional implementation manner, after intercepting the target form data, the processing method of the form data further includes: generating an alarm message, where the alarm message is used to indicate that the target form data is duplicate with the form data in the form detection set; and displaying the alarm message on the display page of the front end.

[0051] In this embodiment, when the front end detects that the target form data is duplicate with a certain form data in the form detection set, in order to ensure that the user can timely understand this situation and avoid unnecessary repeated attempts to submit, the front end can generate an alarm message to remind the user.

[0052] For example, when the comparison result shows that the target form data is duplicate with the data in the form detection set, the front end will immediately generate an alarm message. The alarm message is used to remind the user that the currently attempted to submit target form data has been identified as duplicate and has been intercepted by the system and will not be sent to the back-end server for processing. Among them, the specific content of the alarm message may include brief explanatory text, such as "Your request is already being processed. Please do not submit it repeatedly", and possible further guidance, such as suggesting that the user wait or check the network status, etc. This is only an exemplary example here and does not limit the specific content of the alarm message.

[0053] Optionally, after generating the alarm message, the generated alarm message can be displayed on the display page of the front end. Usually, the alarm message will be presented in the form of a pop-up window, a prompt box or a temporary notification bar at the top / bottom of the page. This is only an exemplary example here and does not limit the display method of the alarm message.

[0054] In this step, by generating and displaying an alarm message immediately after intercepting the target form data, not only is the duplicate submission of form data prevented, but the user experience is also enhanced, enabling the user to clearly know their own operation status and avoiding confusion or anxiety that may arise from duplicate submissions. At the same time, this also avoids the increase in backend load caused by the user's repeated operations, improving the overall efficiency and stability of the system.

[0055] As an optional implementation, the method for processing the form data further includes: in response to receiving feedback information from the backend server for any one of the form data in the form detection set, deleting any one of the form data from the form detection set, where the feedback information is used to indicate that any one of the form data has been processed and completed in the backend server.

[0056] In this embodiment, after the backend server finishes processing a form data, regardless of whether the processing result is successful or failed, it will send a feedback information to the frontend. The feedback information can be returned to the frontend through an asynchronous communication mechanism.

[0057] Optionally, after the frontend receives the feedback information of any one of the form data from the backend server, it will immediately update the status of the relevant form data in the form detection set. Mark the form data corresponding to the feedback information as processed and completed. Since the purpose of the form detection set is to store all the form data that is currently being processed, based on this, the form data marked as processed and completed can be deleted from the form detection set.

[0058] Optionally, the life cycle of each form data starts from the user's submission and ends when the backend server finishes processing and returns the result to the frontend. By deleting the form that has been processed and completed by the backend server from the form detection set, the frontend can better maintain the form detection set, thereby avoiding unnecessary repeated checks or incorrect duplicate submission judgments.

[0059] Optionally, after the frontend deletes the form data that has been processed and completed by the backend from the form detection set, it can also provide feedback to the user to inform the user of the processing result of the form data, so that the user can immediately know whether the form data they submitted has been correctly processed by the backend server, thereby enhancing the user experience and the interactivity of the interface.

[0060] In this step, deleting the form data that has been processed and completed from the form detection set not only helps the frontend maintain an accurate list of form statuses, but also releases related resources and memory, avoiding unnecessary resource occupation and improving the processing efficiency and response speed of the frontend.

[0061] As an alternative implementation, the method for processing form data further includes: storing the intercepted target form data in a duplicate form queue; and sending the target form data to the backend server in response to the fact that the form data in the form detection set that duplicates the target form data has been processed in the backend server.

[0062] In this embodiment, when the target form data is recognized by the front end as a duplicate submission and intercepted, the target form data is not immediately discarded, but is stored in a special data structure - the duplicate form queue. Then, after the backend finishes processing the currently being processed duplicate form data, there is an opportunity to re-evaluate whether the intercepted form data still needs to be submitted.

[0063] For example, when the front end detects that the target form data duplicates a certain form data in the form detection set, it does not directly discard the target form data, but stores it in the duplicate form queue. This queue is used to temporarily store all intercepted and suspected duplicate form data, providing a "waiting area" for the intercepted form data. This ensures that even if the user makes a duplicate submission within a short period of time, their data will not be completely ignored, but a record of their submission intention will be retained in the system.

[0064] Optionally, the front end can monitor the processing status of the form data in the form detection set by the backend server. When the backend server finishes processing a certain form data (whether successfully or failed) and feeds back the processing result to the front end, the front end can recognize and record this event, which marks the end of the life cycle of this form data at the backend level. Once the front end monitors that the processing of the form data in the form detection set that duplicates the target form data in the backend server has been completed, it will re-evaluate the status of the target form data from the duplicate form queue. If, after the target form data is intercepted, the user has not made any changes or operations, and the previous duplicate submission failed for some reason (such as network failure, server error), then the front end may regard this form data as new valid submission data and re-attempt to send it to the backend server.

[0065] Optionally, if the target form data is not successfully received by the backend server due to network problems, when the front end re-attempts to submit, it should provide the user with a clear notification, informing the user that it is attempting to re-send the form data. This ensures the user's understanding of the system's behavior and improves the transparency and trust of the operation.

[0066] Optionally, by storing the intercepted duplicate form data in a duplicate form queue and conditionally resubmitting it after the current duplicate form data is processed at the backend, a higher-level data processing mechanism can be provided without sacrificing the user experience. This approach not only avoids data loss but also ensures that there is a mechanism to resume or complete the user's submission operation in case of network anomalies or backend processing issues, thereby enhancing the robustness of the system and the user experience. Additionally, this mechanism reduces unnecessary backend load and resource consumption, improving the overall performance and efficiency of the system.

[0067] The technical solutions of the embodiments of the present invention will be illustrated below in conjunction with preferred embodiments.

[0068] Currently, with the continuous development of front-end technologies, AJAX technology has become an indispensable part of front-end applications. AJAX technology allows certain parts of a web page to interact with the server without reloading the entire page, enabling partial refreshing. This feature greatly enhances the user experience, enabling users to obtain faster and smoother responses when interacting with web pages (such as submitting forms, searching for content, etc.).

[0069] However, the asynchronous nature of AJAX also brings the problem of duplicate submissions. That is, if the user accidentally operates or the feedback is not timely due to network latency before the first submission operation is completed, the user may click the submit button again, resulting in multiple requests being sent to the server, thereby causing problems such as data redundancy, processing errors, and even database conflicts.

[0070] To solve this problem, the related technologies usually adopt back-end duplicate checking, front-end disabling of the submit button, using unique identifiers, and adding a debounce mechanism to avoid duplicate submission of forms. Among them, back-end duplicate checking means that when the form submitted by the user reaches the server side, the server will check whether there is the same submission record in the database. If so, it will reject the new request. Although this method is effective, it increases the processing burden on the server side, reduces the overall efficiency, and may be difficult to respond quickly in high-concurrency scenarios. Adding a disabled submit button on the front end can immediately disable the button after the user clicks the submit button for the first time and re-enable it until the AJAX request is completed and a response is received. Although this method can effectively prevent duplicate submission, the user experience is poor. Especially for cases with large network latency, users may feel that the operation is not smooth. Generate a unique identifier (Token) for each form submission and send it as a request parameter to the server. When the server receives the request, it will verify the uniqueness of the Token to ensure that each Token can only be used once, thus preventing duplicate submission. However, this method requires both the back end and the front end to support the Token mechanism, increasing the complexity and coupling degree of the system. Through the debounce mechanism, the frequency of multiple clicks of the submit button within a short period of time is restricted, thus reducing the chance of duplicate submission. Although this can reduce the risk of duplicate submission, it may cause operation delays in scenarios that require immediate response. That is to say, although the existing methods for preventing duplicate AJAX submission can achieve certain effects, they have deficiencies in terms of user experience, efficiency, and system coupling, and cannot effectively prevent duplicate submission of forms.

[0071] However, the embodiments of the present invention propose a method for processing form data. A form detection set is maintained on the front end to store all form data that has been sent but not yet processed. When new form data is received, it can be first compared with the form data in this set on the front end. If a duplicate is found, the submission is immediately terminated and user feedback is provided, thus realizing non-blocking duplicate submission interception. Otherwise, the form data is stored in the form detection set and then sent to the back-end server. When the back end finishes processing the form and returns a response, the front end will delete the corresponding form data record from the form detection set to ensure that the set only contains form data to be processed, leaving space for subsequent submission operations. That is to say, by implementing form storage and form duplicate checking on the front end, the interaction with the back-end server during the form duplicate checking process is avoided, reducing the front-back end coupling while accelerating the verification speed. Moreover, by caching the request in the form detection set, smooth operation on the user side is realized. While preventing duplicate submission by users, the efficiency of single submission is not affected, optimizing system resource consumption and improving development efficiency and the overall performance of the system.

[0072] Figure 2It is a flowchart of a front - end based method for preventing duplicate form submissions according to an embodiment of the present invention. The method includes the following steps:

[0073] Step S201, submit the front - end form.

[0074] In this embodiment, after the user fills in the form information on the front - end display page, the form is submitted by clicking the submit button.

[0075] Step S202, remove the elements related to the sending time from the front - end form.

[0076] In this embodiment, in order to accurately compare form data, any information related to the sending time, such as timestamps, needs to be removed before sending the data. This is because even if the form content is exactly the same, different sending times will cause the data to appear different on the surface, which may wrongly consider the form data as new rather than duplicate.

[0077] Step S203, determine whether the front - end form after removing the sending time is duplicate with the forms in the form detection set.

[0078] In this embodiment, when the form data is ready to be sent, the front - end will compare it with a form detection set that stores the form data to be processed. The form detection set stores the form data that has been sent but has not yet received the server processing result. If the same data is found, it indicates that the user attempts to submit duplicates, and at this time, the interception logic for duplicate submissions will be triggered.

[0079] Optionally, if the form data is duplicate with the form data stored in the form detection set, it means that the form data the user attempts to submit is the same as the existing form data in the form detection set, which means that this form data has been sent once. Therefore, the front - end will terminate this submission to avoid duplicate data being sent to the server. In this case, step S204 can be executed. If the form data is not duplicate with the form data stored in the form detection set, it is considered a new form submission. In this case, step S205 can be executed.

[0080] Step S204, intercept the form data and end the life cycle of the form data.

[0081] In this embodiment, to avoid duplicate form data being sent to the back - end server, the front - end can intercept the form data of duplicate submissions and end the life cycle of the form data.

[0082] Step S205, insert the form data into the form detection set.

[0083] In this embodiment, if the duplicate checking result indicates that the form data is the form data submitted for the first time, the form data can be inserted into the form detection set and sent to the back-end server.

[0084] Step S206: The back-end server processes the form data.

[0085] In this embodiment, after receiving the form data, the back-end server can process the form data.

[0086] Step S207: The back-end server feeds back the processing result of the form data to the front-end.

[0087] In this embodiment, after completing the processing of the form data, the back-end server can feed back the processing result to the front-end, where the processing result can be successful processing or failed processing.

[0088] Step S208: Delete the form data from the form detection set.

[0089] In this embodiment, regardless of the processing result, once the processing on the server side is completed, the front-end will remove the form data from the form detection set. To ensure that the form detection set always stores the form data being processed by the back-end.

[0090] Step S209: The processing of the form data is completed, and the life cycle of the form data ends.

[0091] In this embodiment, after the processing of the form data is completed, the entire life cycle of the form data ends. That is, the front-end no longer needs to pay attention to the form data and can release relevant resources, such as releasing the form data in memory, to prepare for the next form submission operation.

[0092] In the above steps S201 to S209, by implementing duplicate submission detection at the front-end, unnecessary server load is avoided, the user's duplicate submission operation can be blocked without affecting single submission, and on the basis of not blocking the user operation, the technical effect of effectively preventing form duplicate submission is achieved, thus solving the technical problem of being unable to effectively prevent form duplicate submission.

[0093] According to an embodiment of the present invention, there is also provided a processing device for form data. It should be noted that the processing device for form data can be used to execute the form data processing method in the embodiment.

[0094] Figure 3 is a schematic diagram of a processing device for form data according to an embodiment of the present invention. As Figure 3 shown, the processing device 300 for form data may include: a receiving unit 301, a comparison unit 302, and an interception unit 303.

[0095] A receiving unit 301, configured to obtain target form data in response to a submission operation of the target form data.

[0096] A comparison unit 302, configured to compare the target form data with a form detection set to obtain a comparison result, where the form detection set includes form data being processed in the backend server corresponding to the front end, and the comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data.

[0097] An interception unit 303, configured to intercept the target form data and end the life cycle of the target form data simultaneously in response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data.

[0098] Optionally, the form data processing device 300 is further configured to: store the target form data in the form detection set and send the target form data to the backend server in response to the comparison result indicating that there is no form data in the form detection set that is the same as the target form data.

[0099] Optionally, before comparing the target form data with the form detection set, the form data processing device 300 is further configured to: extract the sending time of the target form data from the target form data; and remove the sending time from the target form data.

[0100] Optionally, after intercepting the target form data, the form data processing device 300 is further configured to: generate an alarm message, where the alarm message is used to indicate that the target form data is duplicate with the form data in the form detection set; and display the alarm message on a display page of the front end.

[0101] Optionally, the form data processing device is further configured to: delete any one of the form data from the form detection set in response to receiving feedback information from the backend server for any one of the form data in the form detection set, where the feedback information is used to indicate that any one of the form data has been processed in the backend server.

[0102] Optionally, the form data processing device is further configured to: store the intercepted target form data in a duplicate form queue; and send the target form data to the backend server in response to the form data in the form detection set that is duplicate with the target form data being processed in the backend server.

[0103] In this device, after the front end obtains the newly submitted target form data, it can directly perform duplicate detection on the target form data and the form data in the form detection set maintained by the front end. When it is detected that the target form data duplicates the form data in the form detection set, the front end can directly intercept the target form data at the front end, prevent it from being sent to the back-end server, and end the life cycle of the target form data. That is to say, in the embodiments of this application, the front end can independently identify and process the problem of duplicate submissions without frequently interacting with the back end or relying on the back-end response, thereby improving the system response speed, reducing the coupling degree between the front and back ends, enhancing the user experience, preventing duplicate forms from entering the back-end server, reducing the resource consumption of the back-end server, and thus solving the technical problem of being unable to effectively prevent duplicate submissions of form data.

[0104] According to an embodiment of the present invention, there is also provided a computer-readable storage medium, which includes a stored program, wherein the program executes the form data processing method in the embodiment.

[0105] According to an embodiment of the present invention, there is also provided a processor, which is used to run a program, wherein when the program runs, it executes the form data processing method in the embodiment.

[0106] On the other hand, according to an embodiment of the present invention, there is also provided a computer program product. The program product includes computer instructions, and when the computer instructions are executed by a processor, the form data processing method in the embodiment is implemented.

[0107] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0108] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0110] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0111] In addition, each functional unit in various embodiments of the present invention may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent functional component, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software functional component. This computer software functional component is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs and other various media that can store program codes.

[0113] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for processing form data, characterized in that Applied to the front end, including: In response to a submission operation of target form data, obtain the target form data; Compare the target form data with a form detection set to obtain a comparison result, where the form detection set includes form data being processed in the back-end server corresponding to the front end, and the comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data; In response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data, intercept the target form data and at the same time end the life cycle of the target form data.

2. The method according to claim 1, characterized in that The method further includes: In response to the comparison result indicating that there is no form data in the form detection set that is the same as the target form data, store the target form data in the form detection set and send the target form data to the back-end server.

3. The method according to claim 1, characterized in that, Before comparing the target form data with the form detection set, the method further includes: Extract the sending time of the target form data from the target form data; Remove the sending time from the target form data.

4. The method according to claim 1, characterized in that After intercepting the target form data, the method further includes: Generate an alarm message, where the alarm message is used to indicate that there is a duplicate between the target form data and the form data in the form detection set; Display the alarm message on the display page of the front end.

5. The method according to claim 1, wherein The method further includes: In response to receiving feedback information from the back-end server for any form data in the form detection set, delete the any form data from the form detection set, where the feedback information is used to indicate that the any form data has been processed in the back-end server.

6. The method according to claim 1, wherein The method further includes: Store the intercepted target form data in a duplicate form queue; In response to the form data in the form detection set that is duplicate with the target form data being processed in the back-end server, send the target form data to the back-end server.

7. A processing device for form data, characterized in that, Applied to the front end, including: A receiving unit, configured to obtain the target form data in response to a submission operation of the target form data; A comparing unit, configured to compare the target form data with a form detection set to obtain a comparison result, where the form detection set includes form data being processed in the back-end server corresponding to the front end, and the comparison result is used to indicate whether there is form data in the form detection set that is the same as the target form data; An intercepting unit, configured to intercept the target form data in response to the comparison result indicating that there is form data in the form detection set that is the same as the target form data, and at the same time end the life cycle of the target form data.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where when the program is run by a processor, it controls the device where the storage medium is located to execute the method according to any one of claims 1 to 6.

9. A processor, characterized in that, The processor is used to run a program, wherein when the program runs, it executes the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Form submitting method and device and storage medium

    CN110472173A

  • Method and device for controlling repeated submission of orders

    CN111339070A

  • Form repeated submission detection method and device, computer equipment and storage medium

    CN112256776A

  • Form processing method and device, electronic equipment and computer readable storage medium

    CN114003842A