Interaction anomaly compensation method, user terminal, server terminal and storage medium
By matching compensation modes on the user end and the server end to handle interaction anomalies, and by using LAN and content delivery network for data caching and forwarding, the problem of user request failures caused by server anomalies was solved, realizing a low-cost disaster recovery solution and improving data transmission capabilities and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies cause user requests to fail when servers malfunction, reducing business delivery capabilities and user experience, and are also costly, making it difficult to implement low-cost disaster recovery solutions.
When an interaction anomaly occurs between the user and the server, the corresponding compensation mode is matched by obtaining the anomaly information, and the interaction data is processed for offline caching or transfer. The user terminal and content delivery network within the local area network are used for data forwarding to ensure that the data can be processed normally after the network is restored.
It improved data transmission capabilities, reduced operation and maintenance costs, enhanced user experience, and enabled low-cost disaster recovery.
Smart Images

Figure CN116866435B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to an interaction anomaly compensation method, a user terminal, a server terminal, and a computer-readable storage medium. Background Technology
[0002] When a server malfunctions, user requests for server information are hindered, resulting in network server error status codes such as 4XX (user request error or inability to complete the request) and 5XX (server error, request cannot be completed), reducing service delivery capacity and user experience. Existing technologies typically employ CDN (Content Delivery Network) and distributed server technologies to mitigate and avoid these problems. However, this increases costs and scheduling requirements. Therefore, developing a low-cost disaster recovery solution is a pressing technical problem that needs to be solved by those skilled in the art.
[0003] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0004] Based on this, it is necessary to propose an interaction anomaly compensation method, a user terminal, a server terminal, and a computer-readable storage medium to address the above problems. This method can effectively cache or transfer the interaction data that should have been sent offline when interaction anomalies occur on the user terminal and the server terminal.
[0005] The technical problem solved by this application is achieved by the following technical solution:
[0006] This application provides an interaction anomaly compensation method applied to a user terminal, comprising the following steps: in response to an interaction anomaly between the user terminal and the server, obtaining anomaly information, wherein the anomaly information is used to characterize the cause of the connection anomaly; matching a corresponding compensation mode according to the anomaly information, wherein the compensation mode is used to characterize remedial measures when anomalies occur in the interaction between the user terminal and the server; obtaining interaction data between the user terminal and the server, and processing the interaction data according to the compensation mode to cache or transfer the interaction data offline.
[0007] In an optional embodiment of this application, matching a corresponding compensation mode based on the abnormal information includes: matching a first compensation mode when the abnormal information indicates an abnormality on the user end; and / or matching a second compensation mode when the abnormal information indicates that the server can access the server but cannot interact with it; and matching a third compensation mode when the abnormal information indicates that the server cannot access the server.
[0008] In an optional embodiment of this application, before the connection between the user terminal and the server terminal fails, the method further includes: obtaining initial data from the server terminal and encrypting and caching it locally on the user terminal and on an associated user terminal, wherein the initial data is the basic data required for interaction between the user terminal and the server terminal, and the associated user terminal is located on the same local area network as the user terminal; when the compensation mode is the first compensation mode, obtaining the interaction data between the user terminal and the server terminal, and processing the interaction data according to the compensation mode, including: obtaining initial data from the user terminal local terminal and / or the associated user terminal local terminal, rendering the initial data to generate an interactive interface, so as to obtain the interaction data through the interactive interface; and encrypting and caching the interaction data locally on the user terminal and / or on the associated user terminal local terminal.
[0009] In an optional embodiment of this application, when the compensation mode is the second compensation mode, the interaction data between the user terminal and the server terminal is obtained, and the interaction data is processed according to the compensation mode, including: determining whether there is an available user terminal in the local area network where the user terminal is located, and the available user terminal can interact with the server terminal; if there is an available user terminal, a connection is established with the available user terminal to use the available user terminal as a forwarding intermediary to transmit the interaction data between the user terminal and the server terminal; if there is no available user terminal, it is determined whether there is an available server terminal in the content delivery network, the content delivery network is the network built by the server terminal, the available server terminal and the server terminal are in the same content delivery network and have the same server functions; when there is an available server terminal, a connection is established between the user terminal and the available server terminal to transmit the interaction data between the user terminal and the available server terminal.
[0010] In an optional embodiment of this application, when the compensation mode is the third compensation mode, the interaction data between the user terminal and the server terminal is obtained, and the interaction data is processed according to the compensation mode, including: determining the running terminal specified by the content distribution network based on the interaction with the content distribution network, wherein the content distribution network is the network built by the server terminal; and forwarding the interaction data to the running terminal so that the interaction data is cached on the running terminal.
[0011] This application also provides an interaction anomaly compensation method applied to the server side, comprising the following steps: when it is determined that there is a connection anomaly between the user terminal associated with the server, obtaining interaction data, which is data that the user terminal should have sent to the server for offline caching during the connection anomaly; verifying the interaction data; adding the verified interaction data to the server's database, and extracting the verification data from the updated database, wherein the verification data is correlated with the verified interaction data; marking the failed verification interaction data as abnormal data; and sending the verification data and / or abnormal data back to the user terminal.
[0012] In an optional embodiment of this application, the server includes a gateway, which is independent of the server and is used to establish a content delivery network. Before determining that there is a connection anomaly between user terminals associated with the server, the method further includes: when the gateway determines that a user terminal cannot access the server, the gateway selects one or more user terminals or a gateway within the content delivery network as the running terminal, and caches the acquired interaction data offline in the running terminal.
[0013] This application also provides a user terminal, including a processor and a memory: the processor is used to execute a computer program stored in the memory to implement the interaction anomaly compensation method applied to the user terminal as described above.
[0014] This application also provides a server-side component, including a processor and a memory: the processor is used to execute a computer program stored in the memory to implement the interaction exception compensation method applied to the server-side as described above.
[0015] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described above.
[0016] The embodiments of this application have the following beneficial effects:
[0017] This application enables different disaster recovery methods based on the specific connection issues encountered on both the server and client sides. The overall approach involves treating each client within the local area network as a temporary server for offline data caching. This ensures that even with a temporary network interruption, the user perceives data interaction as complete. The offline cached data guarantees that the server can retrieve the data it was supposed to process once the network is restored. This improves data transmission capabilities, reduces maintenance costs on existing equipment, and enhances the user experience.
[0018] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it according to the contents of the specification, and to make the above and other objects, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this application. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] in:
[0021] Figure 1 This is a schematic diagram of an interaction anomaly compensation method applied to a user terminal, provided in Embodiment 1.
[0022] Figure 2 This is a schematic diagram of the application environment under the first compensation mode provided in Embodiment 2;
[0023] Figure 3 This is a schematic diagram of the interaction anomaly compensation method under the first compensation mode provided in Embodiment 2;
[0024] Figure 4 This is a schematic diagram of the application environment under the second compensation mode provided in Embodiment 3;
[0025] Figure 5 This is a schematic diagram of the interaction anomaly compensation method under the second compensation mode provided in Embodiment 3;
[0026] Figure 6 This is a schematic diagram of the application environment under the third compensation mode provided in Example 4;
[0027] Figure 7 A schematic diagram of the interaction anomaly compensation method under the third compensation mode provided in Embodiment 4;
[0028] Figure 8 This is a schematic diagram of an interaction exception compensation method applied to the server side, provided in Embodiment 5.
[0029] Figure 9 This is an internal structural diagram of the computer device provided in Embodiment Six. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0031] Existing technologies typically employ CDN and distributed server technologies for disaster recovery and risk mitigation. However, these technologies suffer from high equipment and maintenance costs. This application proposes an interaction anomaly compensation method to address this issue by utilizing existing equipment for disaster recovery. The method is applied separately to both the user and server sides, executing different processes to promptly remedy interaction anomalies.
[0032] Example 1
[0033] To clearly describe the interaction anomaly compensation method applied to the user terminal provided in this embodiment, please refer to... Figure 1 This includes steps S110 to S130.
[0034] Step S110: In response to an abnormal connection between the user and the server, obtain the abnormal information, which is used to characterize the reason for the connection abnormality.
[0035] In one embodiment, the server and user are connected via wired and / or wireless communication technologies. These wireless communication technologies may include, but are not limited to: Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wireless Fidelity (WiFi) (such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging, and short messages, and any other suitable communication protocols, even those not yet developed. Specifically, the user terminal can take various forms, including but not limited to mobile phones, tablets, personal digital assistants (PDAs), mobile internet devices (MIDs), and wearable devices (such as smartwatches). Applications (such as apps) on mobile terminals can process and display relevant information and perform corresponding operations, thereby improving efficiency. The server side acts as a data center, processing data sent from the user terminal.
[0036] However, during operation, connection errors may occur, such as 4XX (client request error or inability to complete the request) and 5XX (server error, request cannot be completed) network server error status codes. This allows us to collect error information indicating the cause of the connection error, so that we can determine different handling methods based on different error situations. Specifically, the error information can be the connection error status code.
[0037] Step S120: Match the corresponding compensation mode according to the abnormal information. The compensation mode is used to characterize the remedial measures when abnormalities occur in the interaction between the user end and the server end.
[0038] In one implementation, when the abnormal information indicates a user-side abnormality, a first compensation mode is matched; and / or, when the abnormal information indicates that the server can access the server but cannot interact with it, a second compensation mode is matched; and when the abnormal information indicates that the server cannot access the server, a third compensation mode is matched.
[0039] In one implementation, when the exception information is characterized as a user-side exception, it can specifically be a status code including 400 or 401. Status code 400 indicates a Bad Request, meaning the server cannot understand the request sent by the user, possibly due to a syntax error, missing parameters, or invalid request content. Alternatively, status code 401 indicates Unauthorized. Specifically, this means the request requires authentication, but the user has not provided valid authentication information, therefore the server refuses to respond to the request. Correspondingly, a first compensation mode can be matched. The specific processing procedure for the first compensation mode will be detailed in subsequent embodiments and will not be elaborated here.
[0040] When the exception information indicates that the server can access the resource but cannot interact with it, the specific status codes may include 403, 404, or 408. Specifically, status 403 means Forbidden, meaning access is prohibited: the server has understood the request but refuses to execute it. This is usually because the user does not have permission to access the requested resource. 404 means Not Found, meaning the server cannot find the resource requested by the user. It can also be 408 RequestTimeout, meaning the request timed out, and the user did not complete the request within the server's preset time. For the above situations where the server can access the resource but cannot complete the user's request, a second compensation mode can be matched for disaster recovery handling of this type of situation. The specific handling process will be detailed in subsequent embodiments and will not be elaborated here.
[0041] When the exception information indicates that the server is inaccessible, the corresponding status codes can be 500 or 503. 500 Internal Server Error: The server encountered an unexpected error while executing the request, usually indicating a server malfunction or configuration error. 503 Service Unavailable: The service is unavailable, indicating that the server is temporarily unable to process the request, usually due to overload or maintenance. However, it's understandable that all of these situations indicate a temporary, unpredictable situation on the server side, making access impossible. In such cases, a third compensation mode can be used for handling; how this compensation is implemented will be explained in subsequent embodiments.
[0042] Step S130: Obtain the interaction data between the user and the server, process the interaction data according to the compensation mode, and cache or transfer the interaction data offline.
[0043] In one implementation, after the user terminal determines the compensation mode, it can process the data that should have been interacted with the server according to the matched compensation mode, thus completing the interaction at the user's perception. In reality, the interaction data can be processed through encryption technologies, browser caching, rendering engine technologies, optimal path algorithms for request routing, and shared encrypted data, all included in the compensation mode. This enables offline caching or forwarding of the interaction data, ensuring that after subsequent connection anomalies are resolved, the interaction data can be resent to the server normally, guaranteeing the normal completion of data interaction. The method provided in this application can be implemented in the open banking field. For example, when a merchant calls an open banking payment interface, if the bank's server experiences an anomaly, payment will fail, requiring waiting for repair before normal payment can resume. This would be a serious production problem and lead to a poor user experience. The solution provided in this application packages the payment information intended for payment into interaction data on the user terminal, achieving information immutability through point-to-point information interaction and notarized transmission within a certain scope. Once available on the server side, the server stores the relevant interaction data on the internet for processing. It does not require compromising the user experience, while ensuring safe and uninterrupted operation 24 / 7 throughout the year.
[0044] Therefore, this application can perform different disaster recovery measures based on different anomalies when connection failures occur on the server and user sides. The overall approach is to treat each user terminal within the local area network as a temporary server for offline data caching. This ensures that even if the network is temporarily interrupted, the user perceives that data interaction has been completed. The offline cached data ensures that the server can retrieve the data it should be processing once the network is restored. This improves data transmission capabilities, reduces maintenance costs on existing equipment, and enhances the user experience.
[0045] Example 2
[0046] For a clear description of the execution flow of the interactive exception compensation method when the exception information matches the first compensation mode, please refer to [reference needed]. Figures 1-3 This includes steps S310 to S350. Among them, Figure 2 This is a schematic diagram of the application environment under the first compensation mode provided in Embodiment 2; Figure 3 This is a schematic diagram of the interaction anomaly compensation method under the first compensation mode provided in Embodiment 2.
[0047] While the first compensation mode is the compensation mode matched when the exception is confirmed to be a client-side 220 exception, it can actually serve as a backup compensation mode. That is to say, regardless of the exception situation, disaster recovery can be achieved through the first compensation mode. Specifically, the core of disaster recovery in the first compensation mode lies in the use of JavaScript based on local browser storage and engine rendering technology. For the application environment of the first compensation mode, please refer to [reference needed]. Figure 2 .like Figure 2 As shown, a connection failure occurs between user terminal 220 and server terminal 210. Specifically, this failure could be caused by a problem with user terminal 220 itself, such as all devices within the local area network (LAN) where user terminal 220 resides being unable to interact with server terminal 210. In this situation, user terminal 220 can mitigate the problem itself or by associating with user terminal 221. Both user terminal 220 and associated user terminal 221 must be within the same LAN. Associated user terminal 221 can be any of the devices listed above, or it can be a LAN-building device such as an optical modem or router. For details on the interaction anomaly compensation method in the first compensation mode, please refer to steps S310 to S350 below.
[0048] Step S310: Obtain the initial data from the server and encrypt and cache it locally on the user's local machine and the associated user's local machine.
[0049] In one implementation, while the user terminal 220 and the server terminal 210 are still in a normal connection state, the user terminal 220 can obtain the initial data from the server terminal 210 and encrypt and cache it locally on the user terminal 220 and associated user terminals 221. Specifically, this means providing the user terminal 220 with an offline JS call service and caching the JS core locally. The JS core locally initializes an encrypted storage and caches initial data including, but not limited to, local identifiers, HTML, JS, CSS, interface cache data, and non-sensitive data. It also feeds back identifier information to the server terminal 210 and can notify other associated user terminals 221 to also cache locally.
[0050] Step S320: In response to an abnormal connection between the user and the server, obtain the abnormal information, which is used to characterize the reason for the connection abnormality.
[0051] Step S330: When the abnormal information is characterized as a user-end abnormality, match the first compensation mode.
[0052] In one embodiment, the process of determining the first compensation mode has been described in detail in the previous embodiment one, and can be referred to the previous text for details, so it will not be repeated here.
[0053] Step S340: Obtain initial data from the user's local machine and / or associated user's local machine, render the initial data to generate an interactive interface, and obtain interactive data through the interactive interface.
[0054] Step S350: Encrypt and cache the interaction data on the user's device and locally and / or on the associated user's device.
[0055] In one embodiment, as described above, the first compensation mode can be used to address the inability to complete the interaction due to an anomaly in the user terminal 220 itself. Therefore, initial data previously cached offline using browser caching technology can be retrieved from the user terminal 220 and / or locally on the user terminal 220, and rendered using a rendering engine to generate an interactive interface, such as a webpage. The user can then obtain interactive data from the user terminal 220 by interacting with the interactive interface. From the user's perspective, the information the user wants to convey and interact with has been processed; that is, even if an anomaly occurs, the user will not have a clear perception, and it will not affect the user's normal operation. For user data that should have been uploaded to the server 210 but cannot be uploaded due to an anomaly, in the first compensation mode, the interactive data can be encrypted according to a preset method and cached point-to-point on the user terminal 220 and all associated user terminals 221 within the local area network. This notarized transmission method ensures that the interactive data can be effectively stored on all devices within the local area network, guaranteeing data validity.
[0056] Therefore, this application can render the interactive interface and obtain interactive data from the user when the local area network where the user terminal 220 is located cannot interact with the server terminal 210, by using the initial data cached before the exception occurred. This allows the user to perceive that the request has been fulfilled. The actual interactive data is stored offline and notarized across all devices within the local area network. Once the exception is resolved and the local area network can reconnect to the server terminal 210, the cached interactive data from the exception period can be uploaded to the server terminal 210, ensuring the complete execution of the interactive process. This reduces issues related to service delivery capacity and user experience, and lowers operational costs.
[0057] Example 3
[0058] For a clear description of the process executed by the interactive exception compensation method when the exception information matches the second compensation mode, please refer to [reference needed]. Figures 1-5 This includes steps S510 to S560. Among them, Figure 4 This is a schematic diagram of the application environment under the second compensation mode provided in Embodiment 3; Figure 5 This is a schematic diagram of the interaction anomaly compensation method under the second compensation mode provided in Embodiment 3.
[0059] For the application environment of the second compensation mode, please refer to Figure 4 .like Figure 4 As shown, server 210 exists in a content delivery network (CDN), which is a network built by server 210. Server 211 and server 210 can reside within the same CDN and possess the same server functionality. User terminal 220 exists within a local area network (LAN), which can contain multiple devices identical to user terminal 220. For the case of matching the second compensation mode, refer to... Figure 4 Specifically, this can be a situation where only the user terminal 220 is unable to interact with the server terminal 210, while in reality, all devices within the local area network, including the user terminal 220, can connect to the server terminal 210 within the content delivery network. For disaster recovery in this situation, this application provides an interaction anomaly compensation method under a second compensation mode, including steps S510 to S560.
[0060] Step S510: In response to a connection error between the user and the server, obtain the error information, which is used to characterize the cause of the connection error.
[0061] Step S520: When the abnormal information indicates that the server can be accessed but cannot be interacted with, the second compensation mode is matched.
[0062] In one embodiment, the process of determining the second compensation mode has been described in detail in the previous embodiment one, and can be referred to the previous text for details, so it will not be repeated here.
[0063] Step S530: Determine whether there are available user terminals within the local area network where the user terminal is located.
[0064] If a usable client exists, proceed to step S540: establish a connection with the usable client to act as a forwarding intermediary for transmitting interactive data between the client and the server.
[0065] In one implementation, as described above, when user terminal 220 matches the second compensation mode, it is clear that although user terminal 220 can access server terminal 210, it cannot complete user terminal 220's request. This problem may actually be caused by user terminal 220 itself; the request operation could be completed by having another device interact with server terminal 210. Therefore, it is possible to search for a usable user terminal 222 within the local area network where user terminal 220 is located. The usable user terminal 222 is located in the same local area network as user terminal 220 and has the same functions as user terminal 220, such as acquiring and sending interactive data. The difference is that the usable user terminal 222 can perform interactive data processing that user terminal 220 cannot. Therefore, if a usable user terminal 222 exists within the local area network, a communication connection can be established between user terminal 220 and the usable user terminal 222, with the usable user terminal 222 acting as an information intermediary to transmit the interactive data that user terminal 220 should upload. This ensures that even if the interaction data of user client 220 cannot be uploaded by user client 220 itself, it can be uploaded by the corresponding available user client 222, guaranteeing the normal flow of data. For details on the flow of interaction data, please refer to... Figure 4 The arrow markers indicate the path from the client 220 to the available client 222 and then to the server 210.
[0066] If no available client is found, step S550: Determine if an available server exists within the content delivery network.
[0067] If an available server exists, proceed to step S560: establish a connection between the client and the available server to transfer interactive data between the client and the available server.
[0068] In one embodiment, if no available user terminal 222 exists, it may be due to a problem with the server terminal 210 itself, or it may be because there are no other user terminal 220 devices on the local area network; the specific reason is not limited. In this case, it means that the user terminal 220 cannot find an intermediary to upload interactive data on its behalf. Based on this, the user terminal 220 can determine whether there is an available server terminal 211 within the content delivery network. The content delivery network is the network built by the server terminal 210. The available server terminal 211 and the server terminal 210 are in the same content delivery network and have the same server functions. The available server terminal 211 can be a server in another location or a backup server; the specific form is not limited, as long as it can perform the same function as the server terminal 210. Therefore, when there is an available server in the content delivery network, the available server terminal 211 that is compatible with the user terminal 220 can be selected through functions such as domain name forwarding configured on the server. Compatibility can specifically include proximity in geographical location, lowest latency, and matching level. The user terminal 220 establishes a direct communication connection with the available server 211, uploading interactive data to the available server 211 to achieve the same uploading and interaction effect. For details on the flow of interactive data, please refer to... Figure 4 The arrow indicates the path from the user terminal 220 to the available server terminal 211.
[0069] If no available server is available, proceed to step S570: match the first compensation pattern to process the interaction data according to the first compensation pattern, so as to cache the interaction data offline.
[0070] In one implementation, if both the local area network (LAN) lack available client 222 and the content delivery network (CDN) lack available server 211, then it means that forwarding of interactive data is impossible under the current circumstances. In this case, the compensation process described in the second embodiment can be followed to implement offline caching of the interactive data. For details on the implementation, please refer to the relevant description in the previous embodiment two, which will not be repeated here.
[0071] Therefore, this application can, when a user terminal 220 can access the server terminal 210 but cannot interact with it, forward the interactive data that should be uploaded through an available user terminal 222 in the local area network or an available server terminal 211 in the content delivery network. This allows the user to perceive that the request has been fulfilled, while the actual interactive data is forwarded, ensuring the complete execution of the interaction process. This reduces issues related to service delivery capacity and user experience, and lowers operational costs.
[0072] Example 4
[0073] For a clear description of the process executed by the interactive exception compensation method when the exception information matches the third compensation mode, please refer to [reference needed]. Figure 1 , Figure 6 and Figure 7 This includes steps S710 to S740. Among them, Figure 6 This is a schematic diagram of the application environment under the third compensation mode provided in Example 4; Figure 7 This is a schematic diagram of the interaction anomaly compensation method under the third compensation mode provided in Embodiment 4.
[0074] As mentioned earlier, when the exception information indicates that server 210 is inaccessible, the third compensation mode is applied. Therefore, the application environment in this implementation can be referenced. Figure 6 ,like Figure 6 As shown, server 210 includes gateway 230, which is independent of server 210 and used to establish a content delivery network. When the error message indicates that server 210 is inaccessible, specifically, user terminal 220 can connect to gateway 230, but gateway 230 cannot connect to server 210, the interaction error compensation method in the third compensation mode can be detailed in steps S710 to S740 below.
[0075] Step S710: In response to a connection error between the user and the server, obtain the error information, which is used to characterize the cause of the connection error.
[0076] Step S720: When the exception information indicates that the server cannot be accessed, match the third compensation mode.
[0077] In one embodiment, the process of determining the third compensation mode has been described in detail in the previous embodiment one, and can be referred to the previous text for details, so it will not be repeated here.
[0078] Step S730: Determine the runtime specified by the content delivery network based on the interaction with the content delivery network.
[0079] Step S740: Forward the interaction data to the runtime so that the interaction data is cached on the runtime.
[0080] In one implementation, as mentioned above, for patterns matching the third compensation mode, the problem lies with the server side, and the user terminal 220 cannot complete the interaction regardless of its processing. Therefore, the user terminal 220 can determine the runtime 240 designated by the content delivery network based on its interaction with the content delivery network. The content delivery network is a network established by the gateway 230 of the server terminal 210, encompassing all servers, and server errors are also determined by the gateway 230. The specific execution process of the gateway 230 determining the runtime 240 will be detailed in the subsequent interaction anomaly compensation method applied to the server terminal 210, and will not be elaborated here. It can be understood that the runtime 240 is a temporary server designated by the server terminal 210 to receive interaction data. Specifically, it can be a gateway 230 in the content delivery network, or a device within a local area network, without specific limitations. Based on this, Figure 6 The term "runner 1" and "runner 2" both refer to situations where the server is located outside the content delivery network.
[0081] Therefore, this application can determine the designated runtime 240 of the content delivery network based on the interaction between the user terminal 220 and the content delivery network when the server side is abnormal. The runtime 240 can receive the interactive data on behalf of the user, acting as a temporary server. The user's actual perception is that data interaction has been completed, but the interactive data that should have been uploaded is received by the runtime 240 designated by the content delivery network where the server terminal 210 is located, acting as a temporary server. This ensures that after the network is restored, the server terminal 210 can normally obtain the data that should have been processed. This improves data transmission capabilities, reduces maintenance costs on existing equipment, and enhances the user experience.
[0082] Example 5
[0083] For a clear description of the interaction exception compensation method applied to server-side 210, please refer to [reference needed]. Figures 1 to 8 This includes steps S810 to S850. Among them, Figure 8 This is a schematic diagram of an interaction anomaly compensation method applied to server 210 as provided in Embodiment 5.
[0084] Step S810: After determining that there is a connection error between the user terminal associated with the server, obtain the interaction data. The interaction data is the data that the user terminal should have sent to the server for offline caching during the connection error period.
[0085] In one embodiment, the device for caching interactive data may include, but is not limited to, devices such as user terminal 220, available server terminal 211, and runtime terminal 240. The specific offline caching method has been described in detail in Embodiments 1 to 4 above, and will not be repeated here.
[0086] Step S820: Verify the interactive data.
[0087] In one implementation, the server can verify the offline cached interaction data during the anomaly period. This verification can specifically include integrity verification and validity verification. Integrity verification determines whether the interaction data is processed and stored according to a preset format and whether all necessary content is complete. For example, in financial transactions, this includes data such as the payer, payee, and transaction amount. Validity verification determines whether the interaction data is authentic and valid. Again, in financial transactions, this can verify whether the payer's payment amount meets their own balance, whether their digital signature is authentic and valid, and whether the offline notarized interaction data stored within the local area network are identical. This ensures that the data generated during the anomaly period is not falsified and guarantees the normal operation of the process.
[0088] Step S830: Add the verified interaction data to the server-side database, and extract the verification data from the updated database. The verification data is related to the verified interaction data.
[0089] Step S840: Mark the interaction data that fails verification as abnormal data.
[0090] Step S850: Send the verification data and / or abnormal data back to the user terminal.
[0091] In one implementation, if the interactive data verification passes, the corresponding interactive data is stored in the database of server 210, updating the existing database to obtain the verification data. This verification data is obtained by processing the verified interactive data. It is authentic, valid, and reliable data, which can be broadcast within the corresponding network, for example, sent back to user terminal 220, or synchronized with other servers to achieve final shared data storage. If a piece of interactive data fails to pass, meaning it may contain falsified or incomplete data, it needs to be returned to user terminal 220 for correction and rectification, thereby preventing the entry of false data.
[0092] In one embodiment, server 210 includes gateway 230, which is independent of server 210 and is used to establish a content delivery network. Before determining that there is a connection anomaly between user terminals 220 associated with server 210, the method further includes: when gateway 230 determines that user terminal 220 cannot access server 210, gateway 230 selects one or more user terminals 220 or a gateway 230 within the content delivery network as runtime 240, and caches the acquired interactive data offline in runtime 240.
[0093] In one embodiment, to ensure the implementation of the third compensation mode, the server 210 also includes a relatively independent gateway 230. Multiple gateways 230 form a content delivery network (CDN) to encompass and connect multiple servers and are directly connected to the user terminal 220. When the gateway 230 determines that an anomaly has occurred on the server side, i.e., the user terminal 220 cannot access the server 210, the gateway 230 can select at least one device as the running terminal 240 according to preset selection rules. Specifically, the selection rules can be: the first gateway 230 or running terminal 240 to interact with the gateway 230 after a server problem; or the gateway 230 with the strongest data processing capability within the CDN, etc. The running terminal 240 is actually used to temporarily cache uploaded interactive data, acting as a temporary server to temporarily cache interactive data until the server recovers. This ensures that the interactive data of the user terminal 220 can be uploaded uninterruptedly, unaffected by server anomalies.
[0094] Therefore, this application, through an interaction anomaly compensation method applied to the server-side 210, enables different disaster recovery measures to be taken based on different anomalies when connection anomalies occur between the server-side 210 and the user-side 220. The overall approach is to treat each user-side 220 within the local area network as a temporary offline cached server. This ensures that even if the network is temporarily interrupted, the user's actual perception is that data interaction has been completed. The offline cached data ensures that the server-side 210 can normally retrieve the data it should process after the network is restored. This improves data transmission capabilities, reduces maintenance costs on existing equipment, and enhances the user experience.
[0095] Example 6
[0096] Figure 9 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be the user terminal 220 mentioned above, or a server terminal 210, etc. Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement an interactive exception compensation method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement the interactive exception compensation method. Those skilled in the art will understand that... Figure 9The 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.
[0097] In one embodiment, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method described above.
[0098] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0099] 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.
[0100] 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 patent application should be determined by the appended claims.
Claims
1. An interaction anomaly compensation method, applied to the user terminal, characterized in that, Includes the following steps: In response to the connection failure between the user terminal and the server, error information is obtained, which is used to characterize the reason for the connection failure. The corresponding compensation mode is matched according to the abnormal information. The compensation mode is used to characterize the remedial measures when the interaction between the user terminal and the server terminal is abnormal. The interaction data between the user terminal and the server terminal is obtained, and the interaction data is processed according to the compensation mode to cache or transfer the interaction data offline. The step of matching the corresponding compensation mode based on the anomaly information includes: When the abnormal information indicates a user-end abnormality, the first compensation mode is matched; and, When the abnormal information indicates that the server can be accessed but cannot be interacted with, the second compensation mode is matched. When the abnormal information indicates that the server cannot be accessed, the third compensation mode is matched; When the compensation mode is the second compensation mode, the step of acquiring the interaction data between the user terminal and the server terminal, and processing the interaction data according to the compensation mode, includes: Determine whether there are available user terminals within the local area network where the user terminal is located, and the available user terminals can interact with the server. If the available user terminal exists, a connection is established with the available user terminal to use the available user terminal as a forwarding intermediary to transmit the interactive data between the user terminal and the server. If no available user terminal exists, then it is determined whether an available server terminal exists within the content distribution network. The content distribution network is the network built by the server terminal. The available server terminal and the server terminal are in the same content distribution network and have the same server functions. When the available server terminal exists, a connection is established between the user terminal and the available server terminal to transmit the interactive data between the user terminal and the available server terminal.
2. The interaction anomaly compensation method as described in claim 1, characterized in that, Before the connection between the user client and the server becomes abnormal, the method further includes: The initial data from the server is obtained and encrypted and cached locally on the user's local machine and on the associated user's local machine. The initial data is the basic data required for the interaction between the user's local machine and the server. The associated user's local machine is located on the same local area network as the user's local machine. When the compensation mode is the first compensation mode, the step of acquiring the interaction data between the user terminal and the server terminal, and processing the interaction data according to the compensation mode, includes: Initial data is obtained from the local user terminal and / or the associated local user terminal, and the initial data is rendered to generate an interactive interface so as to obtain the interactive data through the interactive interface; The interaction data is encrypted and cached on the user terminal and locally and / or on the associated user terminal.
3. The interaction anomaly compensation method as described in claim 1, characterized in that, When the compensation mode is the third compensation mode, the step of acquiring the interaction data between the user terminal and the server terminal, and processing the interaction data according to the compensation mode, includes: The running end of the content delivery network is determined based on the interaction with the content delivery network, wherein the content delivery network is the network built by the server. The interaction data is forwarded to the runtime so that the interaction data is cached on the runtime.
4. A user terminal, characterized in that, Including processor and memory; The processor is used to execute a computer program stored in the memory to implement the method as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Search response method and device and computer readable storage medium
CN111966937A
Automatic fusing processing method, device and system for service exception
CN113590422A