Disaster recovery method and device for sliding character scheme, storage medium and program product
By setting a target and a backup sliding character scheme in the user terminal and switching to the backup scheme when the target scheme is unavailable, the vulnerability of the slider CAPTCHA service to single points of failure is solved, ensuring the continuity and availability of the service.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2026-03-10
AI Technical Summary
Existing slider CAPTCHA services rely on a single service provider, making them vulnerable to single points of failure and impacting the availability of online services.
By determining the target and backup sliding character schemes for user terminals, availability is monitored when responding to verification requests, and service continuity is ensured by switching to the backup scheme when the target scheme becomes unavailable.
The service continuity of the sliding character scheme is achieved, ensuring that the user terminal can switch to the backup scheme when the target scheme is unavailable, thus guaranteeing the normal operation of the verification process.
Smart Images

Figure CN121644115A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technology, and in particular to a disaster recovery method, device, storage medium and program product for a sliding character scheme. Background Technology
[0002] With the rapid development of computer network technology, the security and reliability of network services are receiving increasing attention. CAPTCHAs, as a common network security mechanism, are widely used in various online services to prevent malicious attacks and automated registration. Sliding CAPTCHAs, as a newer form of CAPTCHA, are gradually gaining popularity due to their higher security and better user experience.
[0003] Currently, existing slider CAPTCHA services typically rely on a single service provider. This single dependency makes the CAPTCHA service susceptible to single points of failure. In other words, if the service provider encounters network problems or software malfunctions, the slider CAPTCHA service will not function properly, thus affecting the availability of the entire online service. Summary of the Invention
[0004] Therefore, it is necessary to provide a disaster recovery method, apparatus, computer equipment, computer-readable storage medium, and computer program product for a sliding character scheme that can ensure the service continuity of the sliding character scheme, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a disaster recovery method for a sliding character scheme. The method includes:
[0006] Determine the target sliding character scheme and the backup sliding character scheme for the user terminal;
[0007] In response to the user terminal's verification request for the target sliding character scheme, determine the first availability verification result of the target sliding character scheme;
[0008] If the first availability verification result indicates that the target sliding character scheme is not available, the backup sliding character scheme will be determined as the new target sliding character scheme.
[0009] In response to the user terminal's verification request for the new target sliding character scheme, determine the second user verification result and the second availability verification result of the new target sliding character scheme;
[0010] When the second usability verification result indicates that the new target sliding character scheme is usable, the feedback result of the new target sliding character scheme is determined based on the second user verification result.
[0011] Secondly, this application also provides a disaster recovery device for a sliding character scheme. The device includes:
[0012] The first determining module is used to determine the target sliding character scheme and the backup sliding character scheme for the user terminal.
[0013] The second determining module is used to determine the first availability verification result of the target sliding character scheme in response to the user terminal's verification request for the target sliding character scheme;
[0014] The third determining module is used to determine the backup sliding character scheme as the new target sliding character scheme when the first availability verification result is that the target sliding character scheme is not available;
[0015] The fourth determining module is used to determine the second user verification result and the second availability verification result of the new target sliding character scheme in response to the user terminal's verification request for the new target sliding character scheme.
[0016] The fifth determining module is used to determine the feedback result of the new target sliding character scheme based on the second user verification result when the second availability verification result indicates that the new target sliding character scheme is available.
[0017] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement some or all of the steps described in any method of the first aspect of the embodiments of this application.
[0018] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the embodiments of this application.
[0019] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the embodiments of this application.
[0020] The aforementioned disaster recovery method, apparatus, computer equipment, storage medium, and computer program product for the sliding character scheme determine a target sliding character scheme and a backup sliding character scheme for the user terminal; in response to a verification request from the user terminal for the target sliding character scheme, determine a first availability verification result for the target sliding character scheme; if the first availability verification result indicates that the target sliding character scheme is unavailable, determine the backup sliding character scheme as the new target sliding character scheme; in response to a verification request from the user terminal for the new target sliding character scheme, determine a second user verification result and a second availability verification result for the new target sliding character scheme; if the second availability verification result indicates that the new target sliding character scheme is available, determine a feedback result for the new target sliding character scheme based on the second user verification result. The disaster recovery method for the sliding character scheme provided in this application, by determining a target sliding character scheme and a backup sliding character scheme for the user terminal, ensures service continuity of the sliding character scheme by determining the backup sliding character scheme as the new target sliding character scheme when the target sliding character scheme is unavailable, and ensures that the user terminal can always perform verification operations based on an available sliding character scheme by implementing switching between different sliding character schemes. Attached Figure Description
[0021] Figure 1 This is an application environment diagram of the disaster recovery method for a sliding character scheme in one embodiment;
[0022] Figure 2 This is a flowchart illustrating the disaster recovery method of a sliding character scheme in one embodiment;
[0023] Figure 3 This is a structural block diagram of a disaster recovery device for a sliding character scheme in one embodiment;
[0024] Figure 4 This is an internal structural diagram of a computer device in one embodiment;
[0025] Figure 5 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] It should be noted that in the following description, the terms "first, second, and third" are used only to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0028] The sliding character scheme method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0029] The terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, IoT device, or portable wearable device. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices, etc.
[0030] Server 104 can be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).
[0031] In addition, server 104 can also be a server cluster consisting of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0032] Terminal 102 and server 104 can be connected via Bluetooth, USB (Universal Serial Bus) or network, etc., and this application does not impose any restrictions.
[0033] In one embodiment, such as Figure 2 As shown, a sliding character scheme method is provided, which can be derived from... Figure 1 The method is executed by a server or terminal, or by a server and terminal working together. Figure 1Taking the server execution in [the context of the example] as an example, the steps include:
[0034] Step 202: Determine the target sliding character scheme and the backup sliding character scheme for the user terminal.
[0035] The user terminal can be an electronic device such as a smartphone, tablet, laptop, or desktop computer.
[0036] The target sliding character scheme refers to the sliding character scheme that provides the service of verification requests on the user terminal. In other words, the target sliding character scheme is visible to the user terminal.
[0037] A backup sliding character scheme is used to switch to the new target sliding character scheme to provide authentication request service to the user terminal when the target sliding character scheme is unable to do so. In other words, the backup sliding character scheme ensures the continuity of authentication request service provided to the user terminal. The backup sliding character scheme is invisible to the user terminal before becoming the new target sliding character scheme. There is at least one backup sliding character scheme.
[0038] Optionally, the target sliding character scheme can be a sliding CAPTCHA scheme. The backup sliding character scheme is the same as the target sliding character scheme in terms of presentation type; that is, when the target sliding character scheme is presented as a sliding CAPTCHA scheme, the backup sliding character scheme is also presented as a sliding CAPTCHA scheme.
[0039] Optionally, the target sliding character scheme and the alternative sliding character scheme can be JavaScript files.
[0040] Step 204: In response to the user terminal's verification request for the target sliding character scheme, determine the first availability verification result of the target sliding character scheme.
[0041] The verification request for the target sliding character scheme is initiated by the user on their terminal. This verification request is used by the server to perform human verification on the user's terminal before sending an access request to the target content. Optionally, the target content can be a content page.
[0042] The first availability verification result of the target sliding character scheme is either that the target sliding character scheme is available or that the target sliding character scheme is not available.
[0043] Optionally, while determining the first availability verification result for the target sliding character scheme, the first user verification result for the target sliding character scheme can also be determined simultaneously. The first user verification result is determined by the user's operation result of the verification request, and is used to characterize whether the user has correctly completed the verification request for the target sliding character scheme on the user terminal. Thus, the first user verification result for the target sliding character scheme is either verification successful or verification failed.
[0044] The first availability verification result is used to characterize the availability of the target sliding character scheme. The first availability verification result is determined by at least one of the following factors: the network environment of the user terminal, the network environment of the server, the service stability of the target sliding character scheme, the compatibility of the user terminal, or other factors.
[0045] The availability of the target sliding character scheme indicates that the target sliding character scheme can provide normal service to the user terminal; correspondingly, the unavailability of the target sliding character scheme indicates that the target sliding character scheme cannot provide normal service to the user terminal.
[0046] Optionally, the first availability verification result of the target sliding character scheme can be determined based on at least one of the following methods: error retry mechanism, exception capture mechanism, error callback function, timeout detection method, and listener ready callback function.
[0047] Step 206: If the first availability verification result indicates that the target sliding character scheme is not available, the backup sliding character scheme is determined as the new target sliding character scheme.
[0048] In an exemplary embodiment, the above-mentioned determination of the target sliding character scheme and the alternative sliding character scheme of the user terminal includes: determining the target sliding character scheme and the alternative sliding character scheme of the user terminal; displaying the target sliding character scheme on the display page of the user terminal; the above-mentioned determination of the alternative sliding character scheme as the new target sliding character scheme includes: determining the alternative sliding character scheme as the new target sliding character scheme, and proceeding to the process of displaying the alternative sliding character scheme on the display page of the user terminal.
[0049] Optionally, when there are two or more alternative sliding character schemes, the arrangement order of each alternative sliding character scheme can be determined, and the alternative sliding character scheme whose arrangement order satisfies the preset order condition can be determined as the new target sliding character scheme.
[0050] In an exemplary embodiment, when the availability verification result indicates that the target sliding character scheme is available, the feedback result of the target sliding character scheme is determined based on the first user verification result.
[0051] Specifically, the process of setting the backup sliding character scheme as the new target sliding character scheme is seamless for the user terminal. In other words, the server completes the process of setting the backup sliding character scheme as the new target sliding character scheme and switching the target sliding character scheme to the backup sliding character scheme without the user's awareness, so as to provide the user terminal with the verification request.
[0052] Step 208: In response to the user terminal's verification request for the new target sliding character scheme, determine the second user verification result and the second availability verification result of the new target sliding character scheme.
[0053] The verification request for the new target sliding character scheme is initiated by the user on their terminal. This verification request is used by the server to perform human verification on the user's terminal before sending an access request to the target content. Optionally, the target content can be a content page.
[0054] The second user verification result indicates whether the user has correctly completed the verification request for the new target sliding character scheme on the user terminal. Therefore, the second user verification result is either verification success or verification failure. The second user verification result is determined by the new user operation result of the verification request.
[0055] The second availability verification result is used to characterize the availability of the new target sliding character scheme. The second availability verification result is determined by at least one of the following factors: the user terminal's network environment, the server's network environment, the service stability of the target sliding character scheme, the user terminal's compatibility, or other factors.
[0056] The second availability verification result is either that the new target sliding character scheme is available or that it is not available. If the new target sliding character scheme is available, it means that it can provide normal service to the user terminal; conversely, if the new target sliding character scheme is not available, it means that it cannot provide normal service to the user terminal.
[0057] Optionally, the second availability verification result of the new target sliding character scheme can be determined based on at least one of the following methods: error retry mechanism, exception capture mechanism, error callback function, timeout detection method, and listen-ready callback function.
[0058] Step 210: When the second availability verification result indicates that the new target sliding character scheme is available, determine the feedback result of the new target sliding character scheme based on the second user verification result.
[0059] The feedback result of the new target sliding character scheme refers to the feedback that the new target sliding character scheme provides to the user terminal based on the second user authentication result. Optionally, when the second user authentication result is successful, the feedback result may be access to the target content that the user terminal wishes to access; when the second user authentication result is unsuccessful, the feedback result may be generating a prompt message to prompt the user terminal to re-submit the authentication request for the new target sliding character scheme.
[0060] In the aforementioned disaster recovery method for the sliding character scheme, a target sliding character scheme and a backup sliding character scheme for the user terminal are determined; in response to a verification request from the user terminal for the target sliding character scheme, a first availability verification result for the target sliding character scheme is determined; if the first availability verification result indicates that the target sliding character scheme is unavailable, the backup sliding character scheme is determined as the new target sliding character scheme; in response to a verification request from the user terminal for the new target sliding character scheme, a second user verification result and a second availability verification result for the new target sliding character scheme are determined; if the second availability verification result indicates that the new target sliding character scheme is available, a feedback result for the new target sliding character scheme is determined based on the second user verification result. The disaster recovery method for the sliding character scheme provided in this application, by determining a target sliding character scheme and a backup sliding character scheme for the user terminal, ensures service continuity of the sliding character scheme by determining the backup sliding character scheme when the target sliding character scheme is unavailable, thereby ensuring that the user terminal can always perform verification operations based on an available sliding character scheme by implementing switching between different sliding character schemes.
[0061] In an exemplary embodiment, the determination of the first availability verification result of the target sliding character scheme in response to a verification request from a user terminal includes:
[0062] In response to the user terminal's verification request for the target sliding character scheme, the target sliding character scheme is loaded;
[0063] After confirming that the target sliding character scheme has been successfully loaded, the target sliding character scheme is displayed.
[0064] After confirming that the target sliding character scheme has been successfully displayed, the target sliding character scheme will be displayed on the user terminal's display page.
[0065] In response to the user terminal's verification operation for the target sliding character scheme on the displayed page, determine the first availability verification result of the target sliding character scheme.
[0066] Loading the target sliding character scheme involves requesting the resources required for loading the target sliding character scheme from the operator of the target sliding character scheme, and then initializing the target sliding character scheme after obtaining the resources required for loading the target sliding character scheme.
[0067] Optionally, the loading result of the target sliding character scheme can be used to indicate whether the target sliding character scheme has completed the initialization configuration; if the loading result of the target sliding character scheme is successful, it indicates that the target sliding character scheme has completed the initialization configuration; if the loading result of the target sliding character scheme is unsuccessful, it indicates that the target sliding character scheme cannot complete the initialization configuration.
[0068] Displaying the target sliding character scheme involves showing the page elements of the target sliding character scheme on the user's terminal display page, allowing the user to interact with the page elements of the target sliding character scheme to complete the verification request.
[0069] Optionally, the display result of the target sliding character scheme can be used to indicate whether the page elements of the target sliding character scheme are successfully displayed on the display page; when the display result of the target sliding character scheme is successful, it indicates that the page elements of the target sliding character scheme are successfully displayed on the display page; when the display result of the target sliding character scheme is unsuccessful, it indicates that the page elements of the target sliding character scheme are unsuccessfully displayed on the display page.
[0070] The verification operation for the target sliding character scheme refers to a series of interactive actions performed by the user on the user terminal to prove that they are a human user and not an automated script or robot, in response to the verification requirements of the target sliding character scheme.
[0071] In an exemplary embodiment, the first user verification result is determined by the verification requirements of the target sliding character scheme and the result of the user operation requesting the verification. Therefore, when the verification operation for the target sliding character scheme meets the verification requirements, the first user verification result is successful; when the verification operation for the target sliding character scheme does not meet the verification requirements, the first user verification result is unsuccessful.
[0072] In this embodiment, in response to a user terminal's verification request for a target sliding character scheme, the target sliding character scheme is loaded. Only after it is determined that the target sliding character scheme has been successfully loaded and displayed will it be displayed on the user terminal's display page. This allows the user terminal to initiate a verification operation for the target sliding character scheme on the display page to determine the first availability verification result of the target sliding character scheme. Thus, through the full-cycle availability verification result monitoring mechanism of this embodiment, which monitors the loading, display, and verification phases, the reliability of the first availability verification result is ensured.
[0073] In an exemplary embodiment, the loading of the target sliding character scheme in response to a user terminal's verification request includes:
[0074] If the loading result of the target sliding character scheme is determined to be a loading failure, the target sliding character scheme will be reloaded a preset number of times.
[0075] After a preset number of loading attempts result in a loading failure, the first availability verification result is determined to be that the target sliding character scheme is not available.
[0076] The preset number of times can be 1 time, 2 times, 3 times or other times.
[0077] Specifically, during the process of reloading the target sliding character scheme a preset number of times, the target sliding character scheme will be displayed as long as the loading result is successful at any one time.
[0078] In this embodiment, when the loading result of the target sliding character scheme is determined to be a loading failure, an error retry mechanism is initiated to reload the target sliding character scheme a preset number of times. Therefore, only when the loading result of the preset number of loading attempts is a loading failure determined is the first availability verification result that the target sliding character scheme is unavailable. This error retry mechanism improves the server's fault tolerance for the target sliding character scheme and also enables timely switching to a backup sliding character scheme to provide service to user terminals when the target sliding character scheme is unavailable.
[0079] In an exemplary embodiment, during the loading of the target sliding character scheme, the above method further includes:
[0080] The loading result of the target sliding character scheme is determined based on the error callback function and / or timeout detection method.
[0081] The error callback function is used to monitor the loading process of the target sliding character scheme in real time, so as to determine whether the loading result of the target sliding character scheme is successful or unsuccessful based on the real-time monitoring results.
[0082] A timeout detection method is used to detect the loading time of the target sliding character scheme and determine that the loading result of the target sliding character scheme has failed when the loading time reaches a preset time. Optionally, the preset time can be 3 seconds, 5 seconds, or other times.
[0083] Optionally, when the target sliding character scheme is a JavaScript file, the error callback function can be the onerror callback function, and the timeout detection method can be the setTimeout method.
[0084] In this embodiment, during the loading process of the target sliding character scheme, the loading result of the target sliding character scheme is determined based on the error callback function and / or timeout detection method. This enables timely determination of the loading result of the target sliding character scheme, avoids loading timeouts that prevent users from successfully completing the verification request, and ensures the service continuity of the sliding character scheme.
[0085] In an exemplary embodiment, during the display of the target sliding character scheme, the above method further includes:
[0086] The display result of the target sliding character scheme is determined based on the listener's ready callback function.
[0087] Alternatively, when the target sliding character scheme is a JavaScript file, the listener ready callback function can be a listener ready callback function.
[0088] In this embodiment, during the display of the target sliding character scheme, the display result of the target sliding character scheme is determined based on the listener ready callback function. This enables timely determination of the display result of the target sliding character scheme, avoids loading timeouts that prevent users from successfully completing the verification request, and ensures the service continuity of the sliding character scheme.
[0089] In an exemplary embodiment, after loading the target sliding character scheme in response to a user terminal's verification request for the target sliding character scheme, the method further includes:
[0090] If the loading result of the target sliding character scheme is determined to be a loading failure, or if the display result of the target sliding character scheme is determined to be a display failure, the target sliding character scheme is hidden and the resources occupied by the target sliding character scheme are released.
[0091] In an exemplary embodiment, the above-described process of hiding the target sliding character scheme includes: hiding the target sliding character scheme based on a hidden dialog box function.
[0092] The hidden dialog box function is used to remove page elements of the target sliding character scheme from the displayed page, making the target sliding character scheme invisible to the user terminal.
[0093] Alternatively, when the target sliding character scheme is a JavaScript file, the function to hide the dialog box can be the hideDialog function.
[0094] In this embodiment, when it is determined that the loading result of the target sliding character scheme is a loading failure or display failure, the target sliding character scheme will be hidden and the resources occupied by the target sliding character scheme will be released. In this way, it is possible to avoid the unusable target sliding character scheme remaining on the display page, causing visual interference or poor system resource occupation. Thus, it is ensured that a seamless switch can be achieved between the target sliding character scheme and the backup sliding character scheme.
[0095] In an exemplary embodiment, the above-described process of hiding the target sliding character scheme includes: if the target sliding character scheme cannot be hidden based on the hidden dialog box function, then the target sliding character scheme is removed based on the node removal method.
[0096] Alternatively, when the target sliding character scheme is a JavaScript file, the node removal method can be the node.remove() method.
[0097] In an exemplary embodiment, determining the target sliding character scheme and the alternative sliding character scheme for the user terminal includes:
[0098] Obtain at least two sliding character schemes and determine the order in which the sliding character schemes are arranged;
[0099] Among at least two sliding character schemes, the sliding character scheme whose arrangement order satisfies the first order condition is determined as the target sliding character scheme, and the sliding character scheme whose arrangement order satisfies the second order condition is determined as the backup sliding character scheme.
[0100] The order in which the sliding character schemes are arranged refers to the order in which each sliding character scheme is loaded by the server and displayed on the display page.
[0101] Optionally, the first order condition can be that the order of arrangement is first.
[0102] Optionally, when there is one alternative sliding character scheme, the second order condition can be that the arrangement order is second; when there are two or more alternative sliding character schemes, the second order condition can be that the arrangement order is within a preset order interval. For example, the preset order interval can be that the arrangement order is in the first 10%, the first 15%, or other order intervals.
[0103] In this embodiment, the target sliding character scheme and the backup sliding character scheme for the user terminal are determined by the order in which the sliding character schemes are arranged, thereby realizing flexible configuration of different sliding character schemes in the invocation.
[0104] In an exemplary embodiment, obtaining at least two sliding character schemes and determining the arrangement order of each sliding character scheme includes:
[0105] Obtain at least two sliding character schemes, and obtain the first historical availability verification result of each sliding character scheme on the user terminal;
[0106] Based on the first historical availability verification results of each sliding character scheme, the historical availability rate of each sliding character scheme on the user terminal is determined;
[0107] Based on the historical availability of each sliding character scheme on user terminals, the order of arrangement of each sliding character scheme is determined.
[0108] Historical availability can refer to the ratio of the uptime of the verification request service provided by each sliding character scheme to the total uptime; or it can refer to the ratio of the number of times the verification request service provided by each sliding character scheme to the total number of times it is run.
[0109] The first historical availability verification result refers only to the historical availability verification result on the user terminal where the current target sliding character scheme is applied; that is, the first historical availability verification result corresponds to the current user terminal. Therefore, historical availability rate refers only to the availability rate on the user terminal where the current target sliding character scheme is applied.
[0110] Optionally, historical availability is positively correlated with the sorting order. That is, the higher the historical availability of a sliding character scheme, the better the service stability of the sliding character scheme. Therefore, the sliding character scheme can be given priority as the target sliding character scheme. Thus, the sorting order of the sliding character scheme is moved forward so that the sliding character scheme can be identified as the target sliding character scheme with higher priority.
[0111] In this embodiment, the order of each sliding character scheme is determined based on the historical availability rate of each sliding character scheme on the user terminal. This allows for the priority provision of sliding character schemes that are highly compatible with the user terminal, minimizing the risk of the user terminal being unable to complete the verification request due to a sliding character scheme that is not compatible with the user terminal. This ensures the service continuity of the sliding character scheme.
[0112] In one exemplary embodiment, the method further includes:
[0113] Establish a mapping relationship between each sliding character scheme and fault type.
[0114] In an exemplary embodiment, when the first availability verification result indicates that the target sliding character scheme is unavailable, determining the backup sliding character scheme as the new target sliding character scheme includes:
[0115] When the first availability verification result indicates that the target sliding character scheme is not available, obtain the server running parameters and the user terminal running parameters;
[0116] Based on server operating parameters and user terminal operating parameters, the faults that cause the target sliding character scheme to be unavailable are predicted, and the target fault type is obtained;
[0117] Based on the mapping relationship, a target backup sliding character scheme with a corresponding relationship to the target fault type is determined; the target backup sliding character scheme is then determined as the new target sliding character scheme.
[0118] The mapping relationship between each sliding character scheme and the fault type is used to characterize the situation under which each sliding character scheme can provide normal service to the user terminal. In other words, it characterizes the degree of adaptability between each sliding character scheme and the fault type.
[0119] Fault types include loading fault types, display fault types, and verification fault types.
[0120] Server operating parameters may include service response time, number of concurrent connections, number of networks, etc.; user terminal operating parameters may include operating system, browser type and version number, network type, network speed, terminal performance, etc.
[0121] The target fault type refers to the fault cause that renders the target sliding character scheme unavailable. The target backup sliding character scheme is the sliding character scheme with the highest degree of compatibility with the target fault type. It can still provide normal service to user terminals and enable users to complete authentication requests even when the target fault type is prone to failure.
[0122] In this embodiment, based on the mapping relationship between each sliding character scheme and the fault type, the target sliding character scheme with the highest degree of compatibility with the target fault type that causes the target sliding character scheme to be unavailable is determined. This makes the process of determining the new target sliding character scheme more flexible and targeted, and also improves the service fault tolerance rate when a fault occurs.
[0123] In an exemplary embodiment, the above-mentioned establishment of the mapping relationship between each sliding character scheme and fault type includes:
[0124] Determine the fault type and the operational characteristics of each sliding character scheme;
[0125] The fault characteristics of the fault types are analyzed to obtain the fault characteristics;
[0126] Based on the fault characteristics and the operational characteristics of each sliding character scheme, the first degree of fit between each sliding character scheme and the fault type is determined.
[0127] Obtain the second historical availability verification results of each sliding character scheme on all user terminals, as well as historical fault data that caused each sliding character scheme to be unavailable within a historical period;
[0128] Based on the second historical availability verification results and historical fault data, the second fit between each sliding character scheme and fault type is determined.
[0129] Based on the first and second fit, the total fit between each sliding character scheme and the fault type is determined;
[0130] Based on the overall fit between each sliding character scheme and the fault type, a mapping relationship between each sliding character scheme and the fault type is established.
[0131] Among them, the overall fit between the sliding character scheme and the fault type can characterize the probability that the sliding character scheme avoids triggering the corresponding fault type. There is a positive correlation between the overall fit and the probability of avoiding triggering the corresponding fault type.
[0132] Optionally, the runtime characteristics can be characteristics related to the operation of the sliding character scheme, such as user sliding method, loading method, and dependencies.
[0133] Optionally, the fault characteristics can be characteristics related to the occurrence of a fault, such as loading time, response time, user scrolling speed, and error rate.
[0134] Alternatively, historical fault data can be obtained from a database or from the operation logs that record the operation records of each user terminal.
[0135] The second set of historical availability verification results and historical fault data are all data collected from all user terminals over a historical period, not just from the user terminals where the current target sliding character scheme is applied.
[0136] For example, based on the fault characteristics and the operational characteristics of each sliding character scheme, a first degree of fit between each sliding character scheme and the fault type is determined. That is, based on the fault characteristics and the operational characteristics of each sliding character scheme, it is determined which fault type each sliding character scheme has a higher degree of fit for. For example, if a certain fault type is caused by the user sliding too fast, then for this fault type, obviously, a sliding character scheme that enables the user to slide at a slower speed is more suitable for this fault type. In other words, this sliding character scheme can avoid triggering this fault type with a higher probability. Therefore, in this case, the sliding character scheme has a higher first degree of fit with the fault type.
[0137] For example, based on the second historical availability verification results and historical fault data, a second degree of fit between each sliding character scheme and the fault type is determined. That is, based on the second historical availability verification results and historical fault data, the adaptation performance of each sliding character scheme under different fault types over a historical period is determined to determine which fault type each sliding character scheme has a higher degree of fit for. For example, a certain fault type is usually triggered when the server response time is long. After statistical analysis of historical fault data, it is determined that a certain sliding character scheme can still provide services to user terminals normally when the server response time is long. Then, it is considered that the sliding character scheme can avoid triggering this fault type with a higher probability. Therefore, at this time, the sliding character scheme has a higher second degree of fit with the fault type.
[0138] In this embodiment, by determining the first and second fit degrees between each sliding character scheme and the fault type, the total fit degree between each sliding character scheme and the fault type is determined to establish a mapping relationship. This mapping relationship accurately represents the fit degree between the sliding character scheme and the fault type. Based on the accurate mapping relationship, when the first availability verification result indicates that the target sliding character scheme is not available, the server can accurately determine a target backup sliding character scheme with a high fit degree as the new target sliding character scheme based on the predicted target fault type, thereby ensuring the service continuity of the sliding character scheme.
[0139] In an exemplary embodiment, determining the order of each sliding character scheme based on its historical availability on the user terminal includes:
[0140] Based on the historical availability of each sliding character scheme on the user terminal and the mapping relationship between each sliding character scheme and the fault type, the order of each sliding character scheme is determined.
[0141] In an exemplary embodiment, determining the order of the sliding character schemes based on their historical availability on the user terminal and the mapping relationship between each sliding character scheme and the fault type includes:
[0142] Based on the mapping relationship between each sliding character scheme and fault type, determine the overall fit between each sliding character scheme and fault type;
[0143] Determine the first weight and the second weight, and the sum of the first weight and the second weight is a fixed value; the first weight corresponds to the historical availability rate, and the second weight corresponds to the total fit.
[0144] The order of the sliding character schemes is determined based on the first weight, the historical availability of each sliding character scheme on the user terminal, the second weight, and the total adaptability between each sliding character scheme and the fault type.
[0145] In an exemplary embodiment, determining the first weight and the second weight includes:
[0146] Obtain the historical fault types of the user terminal;
[0147] The second weight is determined based on historical fault types;
[0148] The first weight is determined based on the fixed value corresponding to the sum of the second weight and the first weight.
[0149] For example, the second weight is determined based on the frequency of occurrence of historical fault types on the user terminal. The second weight is determined based on the frequency of occurrence of historical fault types on the user terminal. The weight is used to adjust the overall fit between each sliding character scheme and the fault type. For example, if a certain fault type occurs more frequently on the user terminal, then in order to focus on avoiding the user terminal being unable to use the services provided by the sliding character scheme due to this fault type, this fault type can be assigned a larger second weight.
[0150] The historical fault types of a user terminal refer only to the historical fault types on the user terminal to which the current target sliding character scheme is applied. In other words, the historical fault types correspond to the current user terminal.
[0151] In an exemplary embodiment, determining the order of the sliding character schemes based on a first weight, the historical availability of each sliding character scheme on the user terminal, a second weight, and the overall fit between each sliding character scheme and the fault type includes:
[0152] Obtain the operating parameters of the user terminal and determine the difference between the operating parameters and the preset operating parameters;
[0153] The weight adjustment coefficient is determined based on the difference between the operating parameters and the preset operating parameters; when the difference is positive, the weight adjustment coefficient is used to increase the first weight and decrease the second weight, and when the difference is negative, the weight adjustment coefficient is used to decrease the first weight and increase the second weight.
[0154] The order of each sliding character scheme is determined based on the first weight, the historical availability of each sliding character scheme on the user terminal, the second weight, the overall adaptability between each sliding character scheme and the fault type, and the weight adjustment coefficient.
[0155] The sum of the first weight and the second weight can be 1.
[0156] Specifically, when the difference is positive, it indicates that the operating parameters of the user terminal are relatively high. Therefore, when arranging the order of each sliding character scheme, more consideration should be given to the historical availability rate of each sliding character scheme on the user terminal. When the difference is negative, it indicates that the operating parameters of the user terminal are relatively low. Therefore, when arranging the order of each sliding character scheme, more consideration should be given to the overall adaptability of each sliding character scheme to the fault type.
[0157] Optionally, when the difference is positive, the effect of the weight adjustment coefficient on increasing the first weight is positively correlated with the magnitude of the difference; when the difference is negative, the effect of the weight adjustment coefficient on increasing the second weight is positively correlated with the magnitude of the absolute value of the difference.
[0158] In this embodiment, the order of each sliding character scheme is determined based on the historical availability rate of each sliding character scheme on the user terminal and the overall adaptability between each sliding character scheme and the fault type. This makes the process of determining the order of the target sliding character scheme and the backup sliding character scheme more flexible and targeted. It takes into account both the user terminal's usage of the sliding character scheme and the adaptability between the sliding character scheme and the fault type. Thus, the order of each sliding character scheme is accurately determined, thereby ensuring that the sliding character schemes given priority to the user terminal have high availability and reliability, and ensuring the service continuity of the sliding character scheme.
[0159] In an exemplary embodiment, determining the total fit between each sliding character scheme and the fault type based on the first fit and the second fit includes:
[0160] Determine the third and fourth weights; the third weight corresponds to the first fitness level, and the fourth weight corresponds to the second fitness level.
[0161] Based on the third weight, the fourth weight, the first fit, and the second fit, the total fit between each sliding character scheme and the fault type is determined.
[0162] Optionally, total fitness = third weight * first fitness + fourth weight * second fitness.
[0163] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0164] Based on the same inventive concept, this application also provides a disaster recovery device for a sliding character scheme to implement the disaster recovery method for the sliding character scheme described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the disaster recovery device for the sliding character scheme provided below can be found in the limitations of the disaster recovery method for the sliding character scheme above, and will not be repeated here.
[0165] In one embodiment, such as Figure 3 As shown, a sliding character scheme device is provided, including: a first determining module 302, a second determining module 304, a third determining module 306, a fourth determining module 308, and a fifth determining module 310, wherein:
[0166] The first determining module 302 is used to determine the target sliding character scheme and the backup sliding character scheme of the user terminal.
[0167] The second determining module 304 is used to determine the first availability verification result of the target sliding character scheme in response to the user terminal's verification request for the target sliding character scheme.
[0168] The third determining module 306 is used to determine the backup sliding character scheme as the new target sliding character scheme when the first availability verification result is that the target sliding character scheme is not available.
[0169] The fourth determining module 308 is used to determine the second user verification result and the second availability verification result of the new target sliding character scheme in response to the user terminal's verification request for the new target sliding character scheme.
[0170] The fifth determining module 310 is used to determine the feedback result of the new target sliding character scheme based on the second user verification result when the second availability verification result indicates that the new target sliding character scheme is available.
[0171] In an exemplary embodiment, in determining the first availability verification result of the target sliding character scheme in response to a verification request from the user terminal for the target sliding character scheme, the second determining module 304 is further configured to: load the target sliding character scheme in response to a verification request from the user terminal for the target sliding character scheme; display the target sliding character scheme after determining that the loading result of the target sliding character scheme is successful; display the target sliding character scheme on the display page of the user terminal after determining that the display result of the target sliding character scheme is successful; and determine the first availability verification result of the target sliding character scheme in response to a verification operation from the user terminal for the target sliding character scheme on the display page.
[0172] In an exemplary embodiment, in response to a user terminal's verification request for a target sliding character scheme, the second determining module 304 is further configured to load the target sliding character scheme a preset number of times when it is determined that the loading result of the target sliding character scheme is a loading failure; and after the loading result of the preset number of loadings is a loading failure, determine that the first availability verification result is that the target sliding character scheme is not available.
[0173] In an exemplary embodiment, during the loading of the target sliding character scheme, the second determining module 304 is further configured to determine the loading result of the target sliding character scheme based on the error callback function and / or timeout detection method.
[0174] In an exemplary embodiment, during the display of the target sliding character scheme, the second determining module 304 is further configured to determine the display result of the target sliding character scheme based on the listening ready callback function.
[0175] In an exemplary embodiment, after loading the target sliding character scheme in response to the user terminal's verification request for the target sliding character scheme, the second determining module 304 is further configured to hide the target sliding character scheme and release the resources occupied by the target sliding character scheme when it is determined that the loading result of the target sliding character scheme is a loading failure, or when it is determined that the display result of the target sliding character scheme is a display failure.
[0176] In an exemplary embodiment, in determining the target sliding character scheme and the backup sliding character scheme of the user terminal, the first determining module 302 is further configured to acquire at least two sliding character schemes and determine the arrangement order of each sliding character scheme; among the at least two sliding character schemes, the sliding character scheme whose arrangement order satisfies the first order condition is determined as the target sliding character scheme, and the sliding character scheme whose arrangement order satisfies the second order condition is determined as the backup sliding character scheme.
[0177] The various modules in the disaster recovery device of the aforementioned sliding character scheme can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0178] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores sliding character scheme data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a fault tolerance method for a sliding character scheme.
[0179] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a fault-tolerant method for a sliding character scheme. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0180] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0181] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0182] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.
[0183] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0185] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0186] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0187] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for disaster recovery of a sliding character scheme, characterized in that, The method comprises: determining a target sliding character scheme and a backup sliding character scheme of a user terminal; determining a first availability verification result of the target sliding character scheme in response to a verification request of the user terminal for the target sliding character scheme; determining the backup sliding character scheme as a new target sliding character scheme when the first availability verification result is that the target sliding character scheme has no availability; determining a second user verification result and a second availability verification result of the new target sliding character scheme in response to a verification request of the user terminal for the new target sliding character scheme; determining a feedback result of the new target sliding character scheme based on the second user verification result when the second availability verification result is that the new target sliding character scheme has availability.
2. The method of claim 1, wherein, The determining a first availability verification result of the target sliding character scheme in response to a verification request of the user terminal for the target sliding character scheme comprises: loading the target sliding character scheme in response to the verification request of the user terminal for the target sliding character scheme; displaying the target sliding character scheme after determining that a loading result of the target sliding character scheme is loading success; displaying the target sliding character scheme in a display page of the user terminal after determining that a display result of the target sliding character scheme is display success; determining the first availability verification result of the target sliding character scheme in the display page in response to a verification operation of the user terminal for the target sliding character scheme.
3. The method of claim 2, wherein, The loading the target sliding character scheme in response to the verification request of the user terminal for the target sliding character scheme comprises: reloading the target sliding character scheme for a preset number of times when it is determined that a loading result of the target sliding character scheme is loading failure; determining that the first availability verification result is that the target sliding character scheme has no availability after the loading result of the preset number of times of loading is loading failure.
4. The method of claim 2, wherein, In the process of loading the target sliding character scheme, the method further comprises: determining the loading result of the target sliding character scheme based on an error callback function and / or a timeout detection method.
5. The method of claim 2, wherein, In the process of displaying the target sliding character scheme, the method further comprises: determining the display result of the target sliding character scheme based on a listening ready callback function.
6. The method of claim 2, wherein, After the loading the target sliding character scheme in response to the verification request of the user terminal for the target sliding character scheme, the method further comprises: performing a hiding process on the target sliding character scheme and releasing the occupied resources of the target sliding character scheme when it is determined that the loading result of the target sliding character scheme is loading failure or when it is determined that the display result of the target sliding character scheme is display failure.
7. The method of claim 1, wherein, The determining a target sliding character scheme and a backup sliding character scheme of a user terminal comprises: obtaining at least two sliding character schemes, and determining arrangement orders of the sliding character schemes; in the at least two sliding character schemes, determining a sliding character scheme satisfying a first order condition as the target sliding character scheme, and determining a sliding character scheme satisfying a second order condition as the standby sliding character scheme.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 7.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Verification method, server and system
CN103973636A
Coding verification method, electronic device and storage medium
CN110443022A
Verification mode switching method and device, computer equipment and storage medium
CN112395584A
Verification code distribution method, computing device and storage medium
CN112948812A
Verification code generation method and device, verification code verification method and device, electronic equipment and storage medium
CN114363034A