Business request submission anti-shake method and device, equipment and storage medium
By implementing preset and target user permissions related to anti-shake strategies on the client, the problem of repeated submission of business requests is solved, significantly reducing server pressure and improving system stability and performance.
Patent Information
- Application Number
- CN202310583100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2024-11-22
AI Technical Summary
In network application systems, due to client jitter, user quick operation, network communication abnormalities or server slow response speed, business requests are repeatedly submitted, affecting server performance and causing abnormalities in business processing.
Implement the status management of the anti-shake policy corresponding to the preset anti-shake policy and the target user permissions on the client. By disabling or intercepting the policy, preventing the repeated submission of the same business requests and reducing the server's processing pressure.
It effectively avoids duplicate submission of business requests, significantly alleviates the processing pressure of the server, and does not require server-side transformation. It is suitable for complex and diverse business scenarios, improving the stability and performance of the system.
Smart Images

Figure CN119003198A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to, but is not limited to, the field of computer application technology, and specifically relates to a method, device, electronic device, and storage medium for anti-shake submission of a service request. Background Art
[0002] With the development and popularization of computer technology, people's production and life are inseparable from various network-based application systems. At the same time, the business logic and data involved in various application systems are becoming increasingly complex. In actual application scenarios, client jitter, user rapid operation, network communication anomalies or slow server response may occur, resulting in the same business request being repeatedly submitted to the server, affecting server performance and causing business processing anomalies.
[0003] How to more effectively de-jitter business requests and avoid repeated submission or processing of business requests is an aspect of continuous improvement and optimization of various network application systems. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for anti-shake submission of a business request. Anti-shake processing is implemented on the client by utilizing the state management of the preset anti-shake strategy loaded by the client and the anti-shake strategy corresponding to the target user authority. This can effectively prevent repeated submission of the same business request to the server and reduce the processing pressure on the server.
[0005] The embodiment of the present disclosure provides a service request submission anti-shake method, which is applied to a client and includes:
[0006] Providing a client interface that matches the user's permissions, wherein the client interface includes interactive controls that have a corresponding relationship with the user's permissions;
[0007] When a target interactive control is triggered, an anti-shake strategy corresponding to the target user authority is enabled according to the target user authority corresponding to the target interactive control to prevent repeated submission of a service request corresponding to the target user authority.
[0008] The embodiment of the present disclosure also provides a service request submission anti-shake device, which is applied to a client and includes:
[0009] A user interaction module, configured to provide a client interface that matches the user's authority, wherein the client interface includes interactive controls that have a corresponding relationship with the user's authority;
[0010] The anti-shake module is configured to enable an anti-shake strategy corresponding to the target user authority according to the target user authority corresponding to the target interactive control when the target interactive control is triggered, so as to prevent repeated submission of the business request corresponding to the target user authority.
[0011] The present disclosure also provides an electronic device, including:
[0012] one or more processors;
[0013] a storage device for storing one or more programs,
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the service request submission anti-shake method described in any embodiment of the present disclosure.
[0015] An embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the service request submission anti-jitter method described in any embodiment of the present disclosure is implemented.
[0016] Other aspects will be apparent upon reading and understanding the drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0018] Figure 1 This is a flow chart of a method for anti-shake submission of a service request in an embodiment of the present disclosure;
[0019] Figure 2 This is a flow chart of another service request submission anti-shake method in an embodiment of the present disclosure;
[0020] Figure 3 This is a flow chart of another service request submission anti-shake method in an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of the structure of a device for anti-shake submission of a service request in an embodiment of the present disclosure;
[0022] Figure 5 A schematic diagram of the structure of a service request submission anti-shake system in an embodiment of the present disclosure;
[0023] Figure 6 A schematic diagram of another anti-shake method for submitting a service request in an embodiment of the present disclosure;
[0024] Figure 7 A schematic diagram of another anti-shake method for submitting a service request in an embodiment of the present disclosure;
[0025] Figure 8 A schematic diagram of another service request submission anti-jitter method in an embodiment of the present disclosure.
[0026] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] It should be noted that in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0029] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0030] In network-based business and application systems, due to client jitter, user rapid operation, network communication anomalies, or slow server response, preventing repeated submission of business requests is a problem that all business and application systems need to solve. In related solutions, the server can cache business requests (requests) from the client by using database indexes, Redis counters, etc. to achieve server idempotence, so as to ensure that only one of multiple repeated submissions takes effect. The client timer can also be used to submit the last business request after the timer times out. Analysis shows that for the server idempotence solution, the server performance requirements are high. Due to the complexity and diversity of business access, the implementation of this function requires a large amount of server modification; and for the client timer solution, it is difficult to dynamically and flexibly determine a reasonable timeout time, which has some adverse effects on the use of the client.
[0031] In the relevant records of the embodiments of the present disclosure, the client includes various forms of clients, such as a client in the form of a web page (browser), a traditional application client, a mobile terminal APP, a mini-program, etc., and is not limited to a specific form. The page\form recorded in the embodiments of the present disclosure takes a client in the form of a web as an example to describe the business operation functions and interfaces of the client. For different types of clients, those skilled in the art can know their corresponding aspects, which are not listed one by one here.
[0032] The present disclosure provides a service request submission anti-shake method, which is applied to a client, such as Figure 1 ,include,
[0033] Step 110, providing a client interface that matches the user authority, wherein the client interface includes interactive controls that have a corresponding relationship with the user authority;
[0034] Step 140: when the target interactive control is triggered, according to the target user authority corresponding to the target interactive control, an anti-shake strategy corresponding to the target user authority is enabled to prevent repeated submission of a service request corresponding to the target user authority.
[0035] In some exemplary embodiments, the anti-shake strategy includes:
[0036] The target user's rights are disabled, and / or the interactive controls corresponding to the target user's rights are disabled.
[0037] This anti-shake strategy is also called a disable strategy.
[0038] In some exemplary embodiments, the client further includes a permission control module;
[0039] The enabling of the anti-shake strategy corresponding to the target user authority includes:
[0040] The state of the anti-shake policy corresponding to the target user authority is set to enabled in a global file or a global variable, so that the authority control module disables the target user authority and / or disables the interactive control corresponding to the target user authority by reading the global file or the global variable.
[0041] In some exemplary embodiments, the method is applied to the anti-shake module of the client, that is, by introducing the anti-shake module in the client, the state of the anti-shake policy corresponding to the target user's rights is written into the global file, and then the existing permission control module in the client implements the corresponding disabling processing according to the state therein. It should be noted that the specific details of the permission control module implementing the disabling of the target user's rights and / or disabling the interactive controls corresponding to the target user's rights are not discussed in detail in this application.
[0042] In some exemplary embodiments, the global file is in the global context Context of the client, that is, in the global Context, the state of the anti-shake policy corresponding to the target user authority is recorded according to the target user authority (identification); the state includes enabled or disabled. The enabled state indicates that the anti-shake policy corresponding to the target user authority is effective and the corresponding anti-shake processing will be performed, and the disabled state indicates that the anti-shake policy corresponding to the target user authority is not effective and the corresponding anti-shake processing will not be performed. It can be understood that the global file includes the state of the anti-shake policy corresponding to one or more user permissions.
[0043] It can be understood that the status of the anti-shake policy corresponding to one or more target user permissions saved / set in the client's global file or global variable is read by the client's permission control module, and the status of the anti-shake policy corresponding to the target user permission triggered by the current user can be known. When the anti-shake policy corresponding to the target user permission triggered by the current user is enabled, the permission control module executes the relevant control function to disable the target user permission and / or disable the interactive control corresponding to the target user permission.
[0044] For example, after disabling the target user's rights, when the target interactive control is triggered, a prompt of "no permission to operate" is given. For example, after disabling the interactive control corresponding to the target user's rights, the interactive control is in an inoperable state on the user operation interface. In this way, the business request corresponding to the target interactive control can be prevented from being submitted again. The specific method and / or prompt information for disabling the target user's rights or interactive controls are not limited to the specific aspects recorded in this disclosure.
[0045] In some exemplary embodiments, the global variable includes a global variable of a client application or APP. According to the above examples, those skilled in the art may know the specific aspects of recording or determining the state of the anti-shake strategy, which will not be described in detail here.
[0046] In some exemplary embodiments, the anti-shake strategy includes:
[0047] Intercepting the action of responding to the triggering of the target interactive control to avoid generating a business request corresponding to the target user's authority; and / or intercepting the business request corresponding to the target user's authority submitted externally.
[0048] This anti-shake strategy is also called an interception strategy.
[0049] In some exemplary embodiments, the enabling of the anti-shake strategy corresponding to the target user authority includes:
[0050] Setting the state of the anti-shake policy corresponding to the target user authority to enabled;
[0051] The enabled state of the anti-shake strategy is used to instruct the client to intercept an action in response to the triggering of the target interactive control, and / or to intercept a business request submitted externally corresponding to the target user's authority.
[0052] In some exemplary embodiments, the state of the anti-shake strategy corresponding to the target user authority is saved in a global file or a global variable.
[0053] In some exemplary embodiments, the method is applied to the anti-shake module of the client, that is, the anti-shake module intercepts according to the enabled state of the anti-shake strategy. Among them, intercepting the action of responding to the triggering of the target interactive control can avoid the generation and submission of the corresponding business request triggered by the relevant action; intercepting the external submission of the business request corresponding to the target user's authority, that is, discarding the generated business request or not generating the business request after the response. The anti-shake module is selected according to the specific implementation scheme of the client, for example, a client plug-in, etc., and is not limited to a specific aspect.
[0054] Compared with the disabling strategy, which is to disable the functional authority or operability of the interactive control, the interception strategy is to intercept the triggering action or business request of the interactive control. Those skilled in the art can know the specific implementation method, which is not limited to a specific aspect. Both can achieve the purpose of avoiding repeated submission of business requests corresponding to the same target user authority on the client, so as to avoid abnormal business processing of the server or avoid increasing the processing load of the server.
[0055] It can be understood that the anti-shake method provided by the implementation of the present disclosure is applied to the client, and a related anti-shake module is introduced to implement anti-shake processing locally on the client, which can significantly alleviate the processing pressure of the server.
[0056] In some exemplary embodiments, Figure 2 As shown, the method also includes:
[0057] Step 120, when the target interactive control is triggered, obtaining the state of the anti-shake strategy corresponding to the target user authority;
[0058] Step 130, when the state of the anti-shake strategy is disabled, causing the client to generate and submit a service request corresponding to the target user authority, and executing the step of enabling the anti-shake strategy corresponding to the target user authority (i.e., step 140);
[0059] Step 150: when the state of the anti-shake strategy is enabled, enable the client to execute the anti-shake strategy.
[0060] Enabling the anti-shake strategy means that the client will execute the anti-shake strategy, and executing the anti-shake strategy means implementing disabling and intercepting. Specifically, the authority control module may execute the disabling strategy according to the enabled state of the anti-shake strategy, or the anti-shake module may execute the intercepting strategy according to the enabled state of the anti-shake strategy, which is not limited to a specific aspect.
[0061] It can be understood that in some exemplary embodiments, when the anti-shake policy corresponding to the target user's authority is enabled, the client executes relevant steps according to the specific anti-shake policy to achieve anti-shake, and at this time, repeated business requests will not be submitted to the server. When the anti-shake policy corresponding to the target user's authority is disabled, the client submits a normal business request and then enables the anti-shake policy. After enabling, the relevant anti-shake processing will be executed, which can avoid the corresponding business request from being submitted repeatedly when the target interactive control is triggered again.
[0062] In some exemplary embodiments, Figure 3 As shown, the method also includes:
[0063] Step 160: when a response to the service request is obtained, deactivate the anti-shake strategy corresponding to the target user authority.
[0064] In some exemplary embodiments, the response includes at least one of the following: a success response, a failure response, or a timeout response.
[0065] In some exemplary embodiments, disabling the anti-shake strategy corresponding to the target user authority includes:
[0066] The state of the anti-shake policy corresponding to the target user permission is changed to disabled.
[0067] In some exemplary embodiments, the initial state of the anti-shake policy corresponding to the target user authority is disabled. It can be understood that after the client obtains the response to the service request corresponding to the target interactive control, it stops executing the anti-shake policy, that is, the state of the anti-shake policy changes to disabled and returns to the initial state. As a result, the user can trigger the target interactive control normally again.
[0068] It should be noted that after the client receives the response returned by the server, whether the service request is executed successfully, failed (server error), or the server times out, the client can disable the corresponding anti-shake strategy according to the response, for example, modify the status of the anti-shake strategy corresponding to the target user authority to be disabled. The client receives these responses, indicating that the processing cycle of the service request corresponding to the target user authority submitted to the server last time has ended, and there is no need to continue anti-shake. If the target interactive control is triggered again, it indicates that it is a new valid trigger, allowing the submission of related service requests.
[0069] It can be understood that when the target interactive control is triggered for the first time, based on the status of its initial anti-shake policy being disabled, according to step 130 the client can submit the corresponding business request normally, and according to step 140 the anti-shake policy corresponding to the target user authority is enabled; when the target interactive control is not triggered for the first time, based on the status of the changed anti-shake policy being enabled, according to step 150 the relevant modules of the client execute the corresponding anti-shake policy, thereby achieving the technical goal of preventing repeated submission of business requests; when the client receives a response corresponding to the business request, step 160 is executed to disable the corresponding anti-shake policy, and the target interactive control and related business functions are restored to the initial state.
[0070] It should be noted that the first trigger and non-first trigger in this disclosure refer to the different triggers of the same interactive control from being triggered to obtaining a trigger response from the server. For example, after the first trigger (first time), a response is obtained, and then the second trigger is performed, which is also called the first trigger; when the first trigger (first time) does not obtain a response, the second trigger is performed, which is not the first trigger.
[0071] In some exemplary embodiments, taking a web application as an example, after the web client logs in, the permission control module of the web client obtains the user permissions of the currently logged-in user from the server, and produces or renders the function menu visible to the current user and the display content and / or operable buttons (interactive controls) on the operation page based on these user permissions. By operating these interactive controls, the current user can submit corresponding business requests. Therefore, based on the existing permission control module, the relevant pages can be regenerated or rendered, and the current user can be controlled to have no permission to operate one or more interactive controls in the web page, or one or more interactive controls cannot be operated, ultimately avoiding the repeated submission of corresponding business requests. Based on the above examples, those skilled in the art can know similar implementations corresponding to other types of clients. The specific scheme for the permission control module to implement the relevant disabling strategy does not fall within the scope of protection and limitation of the embodiments of the present disclosure.
[0072] In some exemplary embodiments, when a response to the service request is obtained, deactivating the anti-shake strategy corresponding to the target user authority includes:
[0073] The state of the anti-shake policy corresponding to the target user authority is set to disabled in the global file or the global variable, so that the authority control module restores the target user authority by reading the global file or the global variable, and / or restores the operability of the interactive control corresponding to the target user authority.
[0074] Corresponding to the permission control module disabling related control operations according to the enabled state of the anti-shake strategy corresponding to the target user's permission, the permission control module implements the related operations of canceling the disabled operation according to the disabled state of the anti-shake strategy corresponding to the target user's permission. The specific implementation scheme of the permission control module is not described in detail in this application.
[0075] It can be understood that in some exemplary embodiments, the existing permission control module of the client itself is used to implement anti-shake processing under the disabled policy, without the need for server-side modification. The disabled requirement is conveyed by setting the status of the anti-shake policy, and the client changes are not major.
[0076] In some exemplary embodiments, before executing the above steps, the method further includes:
[0077] Step 100: Obtain the permission information of the logged-in user and the preset anti-shake strategy for each user's permission.
[0078] In some exemplary embodiments, the user authority information includes all user authority identifiers of the currently logged-in user.
[0079] In some exemplary embodiments, in the absence of conflict, the anti-shake policy corresponding to one user right includes: a disabling policy or an intercepting policy.
[0080] In some exemplary embodiments, the first type of user rights does not set an anti-shake policy; wherein the interactive controls corresponding to the first type of user rights need to be triggered multiple times, for example, for operations that require dragging, touching and / or continuous clicking, no anti-shake processing is set, and multiple triggering is allowed. Accordingly, these target user rights do not need to set an anti-shake policy. Therefore, in some exemplary embodiments, the anti-shake policy corresponding to this type of user rights is empty. That is, the anti-shake policy corresponding to each user right in the client includes: a disabled policy, an interception policy, or an empty policy.
[0081] For example, when dragging an image, a related business request needs to be submitted each time it is dragged. It can be seen that continuous dragging requires corresponding continuous and timely submission of business requests to the server. The user permission setting anti-shake policy corresponding to this type of function is empty to avoid the related anti-shake mechanism affecting the user experience.
[0082] In some exemplary embodiments, the method further comprises:
[0083] Step 101 : when the anti-shake policy corresponding to the user authority is empty, the state of the anti-shake policy corresponding to the target user authority is initialized to be disabled.
[0084] It can be seen that the business request submission anti-shake solution provided by the embodiment of the present disclosure adds an anti-shake device (module) in the client of the original business system, records the status of the anti-shake policy corresponding to the target user's authority, and uses the existing authority control module in the client of the business system to temporarily disable user authority or interactive controls, or uses the newly added anti-shake device (module) to intercept interactive control responses or business request submissions, so as to avoid the same business request being submitted repeatedly to the server, thereby realizing anti-shake of business request submission.
[0085] The embodiment of the present disclosure also provides a service request submission anti-shake device, which is applied to a client, such as Figure 4 As shown, including,
[0086] A user interaction module 410, configured to provide a client interface that matches the user's authority, wherein the client interface includes interactive controls that have a corresponding relationship with the user's authority;
[0087] The anti-shake module 420 is configured to enable an anti-shake strategy corresponding to the target user authority according to the target user authority corresponding to the target interactive control when the target interactive control is triggered, so as to prevent repeated submission of business requests corresponding to the target user authority.
[0088] In some exemplary embodiments, the user interaction module 410 is further configured to configure a preset anti-shake strategy for each user authority.
[0089] In some exemplary embodiments, the user interaction module 410 is further configured to load the preset anti-shake strategy for each user authority.
[0090] In some exemplary embodiments, the anti-shake strategy includes: a disable strategy, an intercept strategy or null.
[0091] Wherein, when the disabling policy is executed, the client disables the target user's rights and / or disables the interactive controls corresponding to the target user's rights.
[0092] Among them, when the interception strategy is executed, the client intercepts the action of responding to the triggering of the target interactive control to avoid generating a business request corresponding to the target user's authority; and / or intercepts the business request corresponding to the target user's authority submitted externally.
[0093] In some exemplary embodiments, the interception policy corresponding to the first type of user rights is empty.
[0094] In some exemplary embodiments, the user interaction module 410 is further configured to initialize the state of the anti-shake policy corresponding to the user authority to be disabled when the anti-shake policy corresponding to the user authority is not empty.
[0095] In some exemplary embodiments, the anti-shake module 420 is further configured to: when the target interactive control is triggered, set the state of the anti-shake policy corresponding to the target user authority to enabled.
[0096] In some exemplary embodiments, the anti-shake module 420 is also configured to: when the target interactive control is triggered, obtain the status of the anti-shake policy corresponding to the target user authority; when the status of the anti-shake policy is disabled, enable the client to generate and submit a business request corresponding to the target user authority, and execute the step of enabling the anti-shake policy corresponding to the target user authority; when the status of the anti-shake policy is enabled, enable the client to execute the anti-shake policy.
[0097] In some exemplary embodiments, the anti-shake module 420 is further configured to: in a case where a response to the service request is obtained, deactivate the anti-shake strategy corresponding to the target user authority.
[0098] In some exemplary embodiments, the anti-shake module 420 is further configured to: when a response to the service request is obtained, set the state of the anti-shake policy corresponding to the target user authority to disabled.
[0099] The disclosed embodiment also provides a service request submission anti-shake system, such as Figure 5 Shown, including
[0100] The service request submission anti-shake device 510 and the authority control module 520 as described in any of the above embodiments.
[0101] The service request submission anti-shake device 510, also called the service anti-shake module 510, is configured to provide a client interface that matches the user authority, wherein the client interface includes an interactive control that has a corresponding relationship with the user authority; when a target interactive control is triggered, according to the target user authority corresponding to the target interactive control, an anti-shake strategy corresponding to the target user authority is enabled to prevent repeated submission of service requests corresponding to the target user authority;
[0102] The authority control module 520 is configured to implement user authority control for logged-in users.
[0103] In some exemplary embodiments, the anti-shake strategy includes: disabling the target user's permission, and / or disabling the interactive controls corresponding to the target user's permission;
[0104] The service request submission anti-shake device 510 is further configured to set the state of the anti-shake policy corresponding to the target user authority to be enabled in a global file or a global variable;
[0105] The permission control module 520 is further configured to disable the target user permission and / or disable the interactive control corresponding to the target user permission by reading the global file or the global variable.
[0106] The disclosed embodiment also provides a service request submission anti-shake method, such as Figure 6 As shown, including:
[0107] 1. The service anti-shake module (device) obtains the status of the anti-shake policy corresponding to the target user authority, and when the status of the anti-shake policy is disabled, enables the anti-shake policy corresponding to the target user authority, and submits the corresponding service request to the server;
[0108] 2. The permission control module sets the target user permission to be disabled and / or sets the interactive control to be disabled according to the enabled state of its anti-shake strategy;
[0109] 3. The service anti-shake module (device) obtains the service request response from the server and disables the anti-shake strategy corresponding to the target user authority;
[0110] 4. The permission control module sets the target user permissions to be available and / or sets the interactive controls to be available according to the deactivation status of its anti-shake strategy.
[0111] It can be seen that according to the solution provided by the embodiment of the present disclosure, there is no need for a timer to control the state of the client's corresponding user permissions and / or interactive controls, and the corresponding control can be performed according to the server's response. When the server service response is fast, the client can timely control the availability of the corresponding function according to the server response time, which can not only avoid repeated submission when the first trigger submission of the service request has not yet responded, but also ensure that the submission of normal service requests is not affected in functions that require intensive operations; avoiding the adverse effects on normal service operations caused by setting a fixed timer in the relevant solution.
[0112] It can be seen that when the anti-shake policy corresponding to the target user authority is enabled, according to the control result of the authority control module, the corresponding target user authority in the client is disabled or the interactive control is disabled and is in a disabled state. The user can no longer submit repeated business requests through the client (including submission by erroneous operation), thereby achieving an anti-shake effect.
[0113] In some exemplary embodiments, before executing the relevant anti-shake solution, such as Figure 7 As shown, it also includes:
[0114] The user logs in, the permission control module obtains the user's permissions, and renders the user operation interface according to the user's permissions;
[0115] The business anti-shake module obtains the anti-shake policy corresponding to each user's permission, and saves the user permission information and the corresponding anti-shake policy to the global Context.
[0116] In some exemplary embodiments, the service anti-shake module further saves the state of the anti-shake policy corresponding to each user authority of the current user into the global Context, wherein the initial state of the anti-shake policy corresponding to each user authority is a disabled state.
[0117] Accordingly, in the above step 1, the anti-shake policy corresponding to the target user authority is enabled, that is, the corresponding anti-shake policy state in the global Context is set to enabled; in the above step 3, the anti-shake policy corresponding to the target user authority is disabled, that is, the corresponding anti-shake policy state in the global Context is set to disabled.
[0118] The disclosed embodiment also provides a service request submission anti-shake method, such as Figure 8 As shown, including:
[0119] When the interactive control is triggered for the first time, the service anti-shake module (device) obtains the state of the anti-shake policy corresponding to the target user authority, and when the state of the anti-shake policy is disabled, enables the anti-shake policy corresponding to the target user authority, and submits the corresponding service request A1 to the server;
[0120] When the interactive control is triggered for the second time, the business anti-shake module (device) again obtains the state of the anti-shake policy corresponding to the target user authority, and when the state of the anti-shake policy is enabled, executes the interception strategy, that is, intercepts the action responding to the triggering of the target interactive control to avoid generating the business request A2 corresponding to the target user authority; and / or intercepts the business request A2 corresponding to the target user authority submitted externally;
[0121] The service anti-shake module (device) disables the anti-shake strategy corresponding to the target user authority.
[0122] When the interactive control is triggered for the third time, the business anti-shake module (device) obtains the status of the anti-shake strategy corresponding to the target user authority. When the status of the anti-shake strategy is disabled, the anti-shake strategy corresponding to the target user authority is enabled, and the corresponding business request A3 is submitted to the server.
[0123] The present disclosure also provides an electronic device, including:
[0124] one or more processors;
[0125] a storage device for storing one or more programs,
[0126] When the one or more programs are executed by the one or more processors, the one or more processors implement the service request submission anti-shake method as described in any of the above embodiments.
[0127] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. The program is used by a processor to implement the service request submission anti-jitter method as described in any of the above embodiments.
[0128] According to the anti-shake solution for business request submission provided by the embodiment of the present disclosure, the control of jitter submission is completed by the client, and the anti-shake effect is significant, which greatly reduces the anti-shake processing pressure on the server side. No server-side modification is required, and the solution is suitable for existing systems that are difficult to modify on the server side to improve the anti-shake effect. In some implementation schemes, the existing permission control module of the client is fully utilized, and only the anti-shake module (device) with related functions needs to be introduced, so that the comprehensive modification cost of the client is also low, and the modification of the existing system can be completed quickly. Provide the function of setting the function corresponding to the anti-shake strategy to meet the anti-shake needs of different business characteristics, ensure the anti-shake effect, and avoid adverse effects on normal business functions.
[0129] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0130] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A service request submission anti-shake method, applied to a client, characterized in that: include, Providing a client interface that matches the user's permissions, wherein the client interface includes interactive controls that have a corresponding relationship with the user's permissions; When a target interactive control is triggered, an anti-shake strategy corresponding to the target user authority is enabled according to the target user authority corresponding to the target interactive control to prevent repeated submission of a service request corresponding to the target user authority.
2. The method according to claim 1, characterized in that The anti-shake strategy includes: The target user's rights are disabled, and / or the interactive controls corresponding to the target user's rights are disabled.
3. The method according to claim 2, characterized in that The client also includes a permission control module; The enabling of the anti-shake strategy corresponding to the target user authority includes: The state of the anti-shake policy corresponding to the target user authority is set to enabled in a global file or a global variable, so that the authority control module disables the target user authority and / or disables the interactive control corresponding to the target user authority by reading the global file or the global variable.
4. The method according to claim 1, characterized in that The anti-shake strategy includes: Intercepting the action of responding to the triggering of the target interactive control to avoid generating a business request corresponding to the target user's authority; and / or intercepting the business request corresponding to the target user's authority submitted externally.
5. The method according to claim 4, characterized in that The enabling of the anti-shake strategy corresponding to the target user authority includes: Setting the state of the anti-shake policy corresponding to the target user authority to enabled; The enabled state of the anti-shake strategy is used to instruct the client to intercept an action in response to the triggering of the target interactive control, and / or to intercept a business request submitted externally corresponding to the target user's authority.
6. The method according to claim 3 or 5, characterized in that Also includes: When the target interactive control is triggered, obtaining a state of an anti-shake strategy corresponding to the target user authority; When the state of the anti-shake policy is disabled, causing the client to generate and submit a service request corresponding to the target user authority, and executing the step of enabling the anti-shake policy corresponding to the target user authority; When the state of the anti-shake strategy is enabled, the client is enabled to execute the anti-shake strategy.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When a response to the service request is obtained, an anti-shake strategy corresponding to the target user authority is disabled.
8. A service request submission anti-shake device, applied to a client, characterized in that: include, A user interaction module, configured to provide a client interface that matches the user's authority, wherein the client interface includes interactive controls that have a corresponding relationship with the user's authority; The anti-shake module is configured to enable an anti-shake strategy corresponding to the target user authority according to the target user authority corresponding to the target interactive control when the target interactive control is triggered, so as to prevent repeated submission of the business request corresponding to the target user authority.
9. An electronic device, characterized in that: include, one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the service request submission anti-shake method as described in any one of claims 1-7.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.
