A data repair method, device, apparatus and storage medium
By storing session messages in a cloud database on the server side and performing differential processing, the problem of inconsistent session messages is solved, and the integrity and consistency of session messages are achieved.
Patent Information
- Application Number
- CN202111300362.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-11-04
AI Technical Summary
In a session scenario, due to network issues or other reasons, the server may fail to send session messages to the session receiver, resulting in inconsistencies and message loss between the session sender and receiver.
By storing session messages in a cloud database on the server side and performing differential analysis with the session database on the receiving end, lost session messages are identified and resent to the session database on the receiving end to maintain the consistency of session messages.
It ensures consistency of session messages between the session sender and receiver, avoids missing session messages, and guarantees the integrity of the session process.
Smart Images

Figure CN114020759B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data repair method, apparatus, device, and storage medium. Background Technology
[0002] In a session scenario, the session sender sends session messages to the server, and the server then sends the session messages to the session receiver, thus establishing a session between the session sender and the session receiver.
[0003] However, due to network issues or other reasons, the server may fail to send session messages to the session receiver, resulting in the loss of session messages and inconsistencies between the session messages sent and received. Summary of the Invention
[0004] This disclosure provides a data repair method, apparatus, device, and storage medium that can keep session messages consistent between the session sender and the session receiver, thus avoiding the loss of session messages.
[0005] In a first aspect, embodiments of this disclosure provide a data repair method, including:
[0006] Receive session messages sent by the session sender and store them in the cloud database;
[0007] The session message is sent to the session receiving end so that the session receiving end stores the session message in its local session database;
[0008] The cloud database is differentiated from the session database of the session receiving end;
[0009] Based on the differential results, determine the session messages lost during the session between the session sender and the session receiver;
[0010] The lost session messages will be resent to the session database of the session receiver.
[0011] Secondly, embodiments of this disclosure provide a data repair method, including:
[0012] The session sender sends the session message to the server;
[0013] The server receives the session messages sent by the session sender and stores them in the cloud database;
[0014] The server sends the session message to the session receiver.
[0015] The session receiving end receives the session message and stores the session message in its local session database;
[0016] The server performs a differential operation between the cloud database and the session database of the session receiving end;
[0017] The server determines the session messages lost during the session between the session sender and the session receiver based on the differential results.
[0018] The server will resend the lost session messages to the session database of the session receiver.
[0019] Thirdly, embodiments of this disclosure provide a data repair apparatus, comprising:
[0020] The receiving module is used to receive session messages sent by the session sender and store them in the cloud database;
[0021] The sending module is used to send the session message to the session receiving end so that the session receiving end stores the session message in the session database of its local end;
[0022] The differential module is used to perform differential analysis between the cloud database and the session database of the session receiving end;
[0023] The determination module is used to determine the session messages lost by the session sender and the session receiver during the session based on the differential results;
[0024] The resend module is used to resend the lost session messages to the session database of the session receiver.
[0025] Fourthly, embodiments of this disclosure provide an electronic device, including:
[0026] one or more processors;
[0027] Storage device for storing one or more programs.
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the embodiments of this disclosure.
[0029] Fifthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the methods provided in embodiments of this disclosure.
[0030] The technical solution provided in this disclosure involves the server performing differential analysis between the cloud database and the session database of the session receiver, and determining the session messages lost during the session between the session sender and the session receiver based on the differential analysis results. The lost session messages are then resent to the session database of the session receiver, which can keep the session messages between the session sender and the session receiver consistent and avoid the loss of session messages. Attached Figure Description
[0031] Figure 1 This is a flowchart of a data repair method provided in an embodiment of this disclosure;
[0032] Figure 2 This is a flowchart of a data repair method provided in an embodiment of this disclosure;
[0033] Figure 3 This is a flowchart of a data repair method provided in an embodiment of this disclosure;
[0034] Figure 4 This is a flowchart of a data repair method provided in an embodiment of this disclosure;
[0035] Figure 5 This is a structural block diagram of a data repair device provided in an embodiment of this disclosure;
[0036] Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of this disclosure. Detailed Implementation
[0037] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0038] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0039] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0040] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0041] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0042] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0043] Figure 1 This is a flowchart of a data repair method provided in an embodiment of the present disclosure. The method can be executed by a data repair device, which can be executed by software and / or hardware. The device can be configured on a server, which can be an electronic device such as a server. The method can be applied in a session scenario.
[0044] like Figure 1 As shown, the technical solutions provided by the embodiments of this disclosure include:
[0045] S110: Receives session messages sent by the session sender and stores them in the cloud database.
[0046] In this embodiment of the disclosure, in a scenario involving two user sessions, the session sender sends session messages to the server, the server receives the session messages sent by the session sender, and stores the session messages in a cloud database. The session sender can be a device that sends the session, or it can be a client that sends the session.
[0047] S120: Send the session message to the session receiving end so that the session receiving end stores the session message in its local session database.
[0048] In this embodiment of the disclosure, the session receiving end can be a session receiving device or a session receiving client.
[0049] In this embodiment, the server can send session messages to the receiver, and the receiver stores the session messages in its local session database. Under normal session conditions, the session messages of the sender, server, and receiver are consistent. However, during the process of the server sending session messages to the receiver, network issues or technical problems may cause the server to fail to successfully send the session messages. The server may mistakenly believe that the messages have been sent, leading to inconsistencies between the sender and receiver. Therefore, the server needs to perform differential analysis between the cloud database and the receiver's session database to determine if any session messages are lost, and then resend the lost messages.
[0050] S130: Perform differential processing between the cloud database and the session database of the session receiving end.
[0051] In this embodiment of the disclosure, the triggering condition for the server to differentiate between the cloud database and the session database of the session receiver may be a time interval, or it may be the detection of a fault, or other triggering conditions.
[0052] In one embodiment of this disclosure, optionally, differential processing of the cloud database and the session database of the session receiving end includes: differential processing of the cloud database and the session database of the session receiving end; if the sessions in the cloud database and the session database of the session receiving end are the same, differential processing of the session messages in each session.
[0053] Specifically, in a session scenario, multiple sessions may be created. Session differential can be performed first between the cloud database and the session database at the receiving end. This involves comparing whether the sessions in the two databases are identical. If the sessions are identical, then the session messages within each session are compared to find the missing session messages hierarchically, thus improving differential efficiency. Specifically, sessions can be compared by checking if their session IDs are the same, and session messages can be compared by checking if their session message IDs are the same.
[0054] In one embodiment of this disclosure, optionally, the differential processing of session messages in each session includes: segmenting the session messages in each session; comparing whether the first session message and the last session message are the same for a target session message segment in the cloud database and the session database of the session receiving end; if not, comparing whether the intermediate session messages of the target session message segment are the same; if not, taking the session message segment from the first session message to the intermediate session message as the target session message segment, or taking the session message segment from the intermediate session message to the last session message as the target session message segment, and returning the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
[0055] In this embodiment of the disclosure, the session messages in each session can be segmented and differentiated. For example, the IDs of session messages 1-100 can be checked first to see if they are the same, then the IDs of session messages 101-200 can be checked sequentially, and so on. For a target session message segment, if the first session message in the target session message segment in the two databases is different, and the last session message is also different, then the intermediate session messages can be checked for similarity, and so on, thereby finding the different session messages and identifying the lost session messages. For example, in a session message segment, if the IDs of session messages 101 and 200 are both different, the intermediate session message (session message 150) can be checked for similarity. If the ID of session message 150 is the same, then an intermediate session message can be selected from session messages 101 and 150, or from session messages 150 and 200, and the ID of this intermediate session message can be checked for similarity, thereby successively finding the different session messages in the two databases in the session message segment.
[0056] Therefore, by segmenting and differentiating the session messages in each session, the efficiency of session message differentiation can be improved, and the speed of finding lost session messages can be increased.
[0057] S140: Based on the differential results, determine the session messages lost by the session sender and the session receiver during the session.
[0058] In this embodiment of the disclosure, the difference result can be the result obtained by differentiating the session data of the cloud database and the session receiving end, including whether the sessions in the two databases are the same, and whether the session messages in the sessions are the same.
[0059] In one embodiment of this disclosure, optionally, determining the lost session messages between the session sender and the session receiver during a session based on the differential result includes: if the session database of the session receiver has lost a first target session relative to the cloud database, the session message corresponding to the first target session is taken as the lost session message between the session sender and the session receiver during the session; if the session database of the session receiver is the same as the session in the cloud database, and the target session message is lost in the second target session, the target session message is taken as the lost session message between the session sender and the session receiver during the session.
[0060] Specifically, if the session database of the receiving end loses a session relative to the cloud database, it means that all session messages in that session are missing. In this case, the session messages in that session are considered lost during the session. If the session database of the receiving end is the same as the session in the cloud database, but a session message is missing in a certain session, that session message is considered lost during the session. This allows for the identification of lost session messages, which is convenient for subsequent resending.
[0061] S150: Resend the lost session message to the session database of the session receiver.
[0062] In this embodiment of the disclosure, the server resends the lost session messages to the session receiver so that the session receiver stores the lost session messages in its local session database. This can ensure the consistency of session messages among the session sender, server, and session receiver, and can avoid the loss of session messages during the session.
[0063] The technical solution provided in this disclosure involves the server performing differential analysis between the cloud database and the session database of the session receiver, and determining the session messages lost during the session between the session sender and the session receiver based on the differential analysis results. The lost session messages are then resent to the session database of the session receiver, which can keep the session messages between the session sender and the session receiver consistent and avoid the loss of session messages.
[0064] Figure 2 This is a flowchart of a title display method provided in this embodiment. In this embodiment, the solution can be combined with one or more optional solutions in the above embodiments.
[0065] In this embodiment, optionally, the step of differentially dividing the cloud database and the session database of the session receiving end includes:
[0066] When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
[0067] like Figure 2 As shown, the technical solutions provided by the embodiments of this disclosure include:
[0068] S210: Receives session messages sent by the session sender and stores them in the cloud database.
[0069] S220: Send the session message to the session receiving end so that the session receiving end stores the session message in its local session database.
[0070] The descriptions of S210-S220 can be found in the descriptions of the above embodiments.
[0071] S230: When it is detected that a user is browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially processed.
[0072] In this embodiment of the disclosure, when a user on the session receiving end wants to browse the settings session messages, they can trigger the operation of browsing the settings session messages. The session receiving end will send a request to the server, and the server will perform differential processing on the corresponding session messages in the cloud database and the session database of the session receiving end based on the request. The settings session messages can be one or more session messages.
[0073] For example, when a user wants to browse 1-100 messages in a session, the session receiver sends a request to the server. Based on this request, the server performs a differential search between the cloud database and the session receiver's session database for the 1-100 messages in that session to find any lost messages during the session. The server then resends the lost messages to the session receiver's session database. When the user browses 1-100 messages, they can view the complete session messages from their local session database.
[0074] Therefore, by monitoring when a user browses the configured session messages, the corresponding session messages in the cloud database and the session database of the session receiver are differentiated, allowing the user to view the complete session messages and ensuring the consistency of session messages between the session receiver and the session sender.
[0075] S240: Based on the differential results, determine the session messages lost by the session sender and the session receiver during the session.
[0076] S250: Resend the lost session message to the session database of the session receiver.
[0077] Figure 3 This is a flowchart of a data repair method provided in this embodiment. In this embodiment, the solution can be combined with one or more optional solutions in the above embodiments.
[0078] In this embodiment, optionally, the step of differentially dividing the cloud database and the session database of the session receiving end includes:
[0079] The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or,
[0080] In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
[0081] like Figure 3 As shown, the technical solutions provided by the embodiments of this disclosure include:
[0082] S310: Receives session messages sent by the session sender and stores them in the cloud database.
[0083] S320: Send the session message to the session receiving end so that the session receiving end stores the session message in the session database of its local end.
[0084] S330: Perform differential analysis between the cloud database and the session database of the session receiving end at set intervals; or, if a session failure is detected, perform differential analysis between the cloud database and the session database of the session receiving end.
[0085] In this embodiment, a timer can be set on the server side to perform differential analysis between the cloud database and the session database of the session receiving end at set intervals. The set interval can be configured according to session requirements or external network conditions. By performing differential analysis between the cloud database and the session database of the session receiving end at set intervals, lost session messages can be periodically monitored and resent, ensuring the consistency of session messages between the two ends.
[0086] In this embodiment of the disclosure, the session failure may be a network failure or a technical failure, etc. The session failure may cause the loss of session messages when the server sends session messages to the session receiver. Therefore, when a session failure is detected, it is necessary to perform differential analysis between the cloud database and the session database of the session receiver to determine the lost session messages and resend them to ensure the consistency of session messages between the two ends and to ensure normal sessions.
[0087] S340: Based on the differential results, determine the session messages lost by the session sender and the session receiver during the session.
[0088] S350: Resend the lost session message to the session database of the session receiver.
[0089] Figure 4 This is a flowchart of a data repair method provided in an embodiment of the present disclosure. The method can be executed by a system consisting of a session sender, a server, and a session receiver.
[0090] like Figure 4 As shown, the method provided in this disclosure embodiment may include:
[0091] S410: The session sender sends the session message to the server.
[0092] S420: The server receives the session message sent by the session sender and stores it in the cloud database.
[0093] S430: The server sends the session message to the session receiver.
[0094] S440: The session receiving end receives the session message and stores the session message in its local session database.
[0095] S450: The server performs differential processing between the cloud database and the session database of the session receiving end.
[0096] S460: The server determines the session messages lost during the session between the session sender and the session receiver based on the differential results.
[0097] S470: The server will resend the lost session message to the session database of the session receiver.
[0098] The descriptions of S410-S470 can be found in the descriptions of the above embodiments.
[0099] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0100] Perform session differential between the cloud database and the session database of the session receiving end;
[0101] If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are differentiated.
[0102] Optionally, the session messages in each session are differentially processed, including:
[0103] Segment and differentiate the session messages in each session;
[0104] For the target session message segment in the cloud database and the session database of the session receiver, compare whether the first session message and the last session message are the same;
[0105] If not, compare whether the intermediate session messages of the target session message segment are the same;
[0106] If not, take the session message segment from the first session message to the intermediate session message as the target session message segment, or take the session message segment from the intermediate session message to the last session message as the target session message segment, and return to the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
[0107] Optionally, determining the session messages lost during the session between the session sender and the session receiver based on the differential results includes:
[0108] If the session database of the session receiving end loses the first target session relative to the cloud database, the session message corresponding to the first target session shall be regarded as the session message lost by the session sending end and the session receiving end during the session.
[0109] If the session database of the session receiving end is the same as the session of the cloud database, and the target session message is lost in the second target session, the target session message is regarded as the session message lost by the session sending end and the session receiving end during the session.
[0110] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0111] The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or,
[0112] In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
[0113] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0114] When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
[0115] The technical solution provided in this disclosure involves the server performing differential analysis between the cloud database and the session database of the session receiver, and determining the session messages lost during the session between the session sender and the session receiver based on the differential analysis results. The lost session messages are then resent to the session database of the session receiver, which can keep the session messages between the session sender and the session receiver consistent and avoid the loss of session messages.
[0116] Figure 5 This is a structural block diagram of a data repair device provided in an embodiment of this disclosure, such as... Figure 5 As shown, the device includes a receiving module 510, a transmitting module 520, a differential module 530, a determining module 540, and a retransmission module 550.
[0117] The receiving module 510 is used to receive session messages sent by the session sender and store them in the cloud database;
[0118] The sending module 520 is used to send the session message to the session receiving end so that the session receiving end stores the session message in the session database of its local end;
[0119] The differential module 530 is used to perform differential analysis between the cloud database and the session database of the session receiving end;
[0120] The determination module 540 is used to determine the session messages lost by the session sender and the session receiver during the session based on the differential results;
[0121] The resend module 550 is used to resend the lost session messages to the session database of the session receiving end.
[0122] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0123] Perform session differential between the cloud database and the session database of the session receiving end;
[0124] If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are differentiated.
[0125] Optionally, the session messages in each session are differentially processed, including:
[0126] Segment and differentiate the session messages in each session;
[0127] For the target session message segment in the cloud database and the session database of the session receiver, compare whether the first session message and the last session message are the same;
[0128] If not, compare whether the intermediate session messages of the target session message segment are the same;
[0129] If not, take the session message segment from the first session message to the intermediate session message as the target session message segment, or take the session message segment from the intermediate session message to the last session message as the target session message segment, and return to the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
[0130] Optionally, determining the session messages lost during the session between the session sender and the session receiver based on the differential results includes:
[0131] If the session database of the session receiving end loses the first target session relative to the cloud database, the session message corresponding to the first target session shall be regarded as the session message lost by the session sending end and the session receiving end during the session.
[0132] If the session database of the session receiving end is the same as the session of the cloud database, and the target session message is lost in the second target session, the target session message is regarded as the session message lost by the session sending end and the session receiving end during the session.
[0133] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0134] The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or,
[0135] In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
[0136] Optionally, differential sharding is performed between the cloud database and the session database at the session receiving end, including:
[0137] When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
[0138] The above-described apparatus can execute the methods provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the methods.
[0139] Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of this disclosure, such as... Figure 6 The device shown includes:
[0140] One or more processors 610, Figure 6 Taking the 610 processor as an example;
[0141] Memory 620;
[0142] The device may further include an input device 630 and an output device 640.
[0143] The processor 610, memory 620, input device 630, and output device 640 in the device can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0144] Memory 620, as a non-transitory computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to a data repair method in an embodiment of this disclosure (e.g., appendix). Figure 5 The receiver module 510, transmitter module 520, differential module 530, determination module 540, and retransmission module 550 are shown. The processor 610 executes various functional applications and data processing of the computer device by running software programs, instructions, and modules stored in the memory 620, thereby implementing a data repair method according to the above method embodiment.
[0145] Receive session messages sent by the session sender and store them in the cloud database;
[0146] The session message is sent to the session receiving end so that the session receiving end stores the session message in its local session database;
[0147] The cloud database is differentiated from the session database of the session receiving end;
[0148] Based on the differential results, determine the session messages lost during the session between the session sender and the session receiver;
[0149] The lost session messages will be resent to the session database of the session receiver.
[0150] The memory 620 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 620 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 620 may optionally include memory remotely located relative to the processor 610, and these remote memories can be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0151] Input device 630 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the computer device. Output device 640 may include display devices such as a display screen.
[0152] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0153] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0154] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0155] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0156] Receive session messages sent by the session sender and store them in the cloud database;
[0157] The session message is sent to the session receiving end so that the session receiving end stores the session message in its local session database;
[0158] The cloud database is differentiated from the session database of the session receiving end;
[0159] Based on the differential results, determine the session messages lost during the session between the session sender and the session receiver;
[0160] The lost session messages will be resent to the session database of the session receiver.
[0161] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. The modules and units described in the embodiments of the present disclosure may be implemented in software or hardware. The names of modules and units do not, in some cases, constitute a limitation on the module or unit itself.
[0163] According to one or more embodiments of this disclosure, [Example 1] provides a data repair method, including:
[0164] Receive session messages sent by the session sender and store them in the cloud database;
[0165] The session message is sent to the session receiving end so that the session receiving end stores the session message in its local session database;
[0166] The cloud database is differentiated from the session database of the session receiving end;
[0167] Based on the differential results, determine the session messages lost during the session between the session sender and the session receiver;
[0168] The lost session messages will be resent to the session database of the session receiver.
[0169] According to one or more embodiments of this disclosure, [Example 2] provides the method of Example 1, wherein the differential calculation of the cloud database and the session database of the session receiving end includes:
[0170] Perform session differential between the cloud database and the session database of the session receiving end;
[0171] If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are differentiated.
[0172] According to one or more embodiments of this disclosure, [Example 3] provides the method of Example 1, wherein differentially processing session messages in each session includes:
[0173] Segment and differentiate the session messages in each session;
[0174] For the target session message segment in the cloud database and the session database of the session receiving end, compare whether the first session message and the last session message are the same;
[0175] If not, compare whether the intermediate session messages of the target session message segment are the same;
[0176] If not, take the session message segment from the first session message to the intermediate session message as the target session message segment, or take the session message segment from the intermediate session message to the last session message as the target session message segment, and return to the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
[0177] According to one or more embodiments of this disclosure, [Example 4] provides the method of Example 1, wherein determining the session messages lost during a session between the session sender and the session receiver based on the differential result includes:
[0178] If the session database of the session receiving end loses the first target session relative to the cloud database, the session message corresponding to the first target session shall be regarded as the session message lost by the session sending end and the session receiving end during the session.
[0179] If the session database of the session receiving end is the same as the session of the cloud database, and the target session message is lost in the second target session, the target session message is regarded as the session message lost by the session sending end and the session receiving end during the session.
[0180] According to one or more embodiments of this disclosure, [Example 5] provides a method of Example 1, wherein differentially dividing the cloud database with the session database of the session receiving end includes:
[0181] The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or,
[0182] In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
[0183] According to one or more embodiments of this disclosure, [Example 6] provides a method of Example 1, wherein differentially dividing the cloud database with the session database of the session receiving end includes:
[0184] When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
[0185] According to one or more embodiments of this disclosure, [Example 7] provides a data repair method, including:
[0186] The session sender sends the session message to the server;
[0187] The server receives the session messages sent by the session sender and stores them in the cloud database;
[0188] The server sends the session message to the session receiver.
[0189] The session receiving end receives the session message and stores the session message in its local session database;
[0190] The server performs a differential operation between the cloud database and the session database of the session receiving end;
[0191] The server determines the session messages lost during the session between the session sender and the session receiver based on the differential results.
[0192] The server will resend the lost session messages to the session database of the session receiver.
[0193] According to one or more embodiments of this disclosure, [Example 8] provides a data repair apparatus, including:
[0194] The receiving module is used to receive session messages sent by the session sender and store them in the cloud database;
[0195] The sending module is used to send the session message to the session receiving end so that the session receiving end stores the session message in the session database of its local end;
[0196] The differential module is used to perform differential analysis between the cloud database and the session database of the session receiving end;
[0197] The determination module is used to determine the session messages lost by the session sender and the session receiver during the session based on the differential results;
[0198] The resend module is used to resend the lost session messages to the session database of the session receiver.
[0199] According to one or more embodiments of this disclosure, [Example 9] provides an apparatus of Example 8 for differentially dividing the cloud database from the session database of the session receiver, including:
[0200] Perform session differential between the cloud database and the session database of the session receiving end;
[0201] If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are differentiated.
[0202] According to one or more embodiments of this disclosure, [Example 10] provides an apparatus of Example 9, comprising:
[0203] Segment and differentiate the session messages in each session;
[0204] For the target session message segment in the cloud database and the session database of the session receiver, compare whether the first session message and the last session message are the same;
[0205] If not, compare whether the intermediate session messages of the target session message segment are the same;
[0206] If not, take the session message segment from the first session message to the intermediate session message as the target session message segment, or take the session message segment from the intermediate session message to the last session message as the target session message segment, and return to the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
[0207] According to one or more embodiments of this disclosure, [Example 11] provides an apparatus of Example 8, which determines, based on differential results, session messages lost during a session between the session sender and the session receiver, including:
[0208] If the session database of the session receiving end loses the first target session relative to the cloud database, the session message corresponding to the first target session shall be regarded as the session message lost by the session sending end and the session receiving end during the session.
[0209] If the session database of the session receiving end is the same as the session of the cloud database, and the target session message is lost in the second target session, the target session message is regarded as the session message lost by the session sending end and the session receiving end during the session.
[0210] According to one or more embodiments of this disclosure, [Example 12] provides an apparatus of Example 8 for differentially dividing the cloud database from the session database of the session receiver, including:
[0211] The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or,
[0212] In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
[0213] According to one or more embodiments of this disclosure, [Example 13] provides an apparatus of Example 8 for differentially dividing the cloud database from the session database of the session receiver, including:
[0214] When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
[0215] According to one or more embodiments of this disclosure, [Example 14] provides an electronic device including a memory, a processing device, and a computer program stored on the memory and executable on the processing device, wherein the processing device executes the program to implement the data repair method as described in any of Examples 1-6.
[0216] According to one or more embodiments of this disclosure, [Example 15] provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a data repair method as described in any of Examples 1-6.
[0217] Note that the above description is merely a preferred embodiment and the technical principles employed in this disclosure. Those skilled in the art will understand that this disclosure is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this disclosure. Therefore, although this disclosure has been described in detail through the above embodiments, it is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this disclosure, and the scope of this disclosure is determined by the scope of the appended claims.
Claims
1. A data repair method, characterized in that, include: Receive session messages sent by the session sender and store them in the cloud database; The session message is sent to the session receiving end so that the session receiving end stores the session message in its local session database; Perform session differential between the cloud database and the session database of the session receiving end; If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are segmented and differentiated. The differential results determine the session messages lost during the session between the session sender and the session receiver; wherein, the differential results include whether the sessions in the two databases are the same, and whether the session messages in the sessions are the same. The lost session messages will be resent to the session database of the session receiver.
2. The method according to claim 1, characterized in that, The differential processing of session messages in each session includes: Segment and differentiate the session messages in each session; For the target session message segment in the cloud database and the session database of the session receiving end, compare whether the first session message and the last session message are the same; If not, compare whether the intermediate session messages of the target session message segment are the same; If not, take the session message segment from the first session message to the intermediate session message as the target session message segment, or take the session message segment from the intermediate session message to the last session message as the target session message segment, and return to the operation of comparing whether the first session message and the last session message are the same, until the search is completed.
3. The method according to claim 1, characterized in that, The step of determining the session messages lost during the session between the session sender and the session receiver based on the differential results includes: If the session database of the session receiving end loses the first target session relative to the cloud database, the session message corresponding to the first target session shall be regarded as the session message lost by the session sending end and the session receiving end during the session. If the session database of the session receiving end is the same as the session of the cloud database, and the target session message is lost in the second target session, the target session message is regarded as the session message lost by the session sending end and the session receiving end during the session.
4. The method according to claim 1, characterized in that, The step of differentiating the cloud database from the session database at the session receiving end includes: The cloud database and the session database of the session receiving end are differentially analyzed at set intervals; or, In the event of a detected session failure, the cloud database and the session database of the session receiving end are differentiated.
5. The method according to claim 1, characterized in that, The step of differentiating the cloud database from the session database at the session receiving end includes: When a user is detected browsing a set session message, the corresponding session message in the cloud database and the session database of the session receiving end are differentially analyzed.
6. A data repair method, characterized in that, include: The session sender sends the session message to the server; The server receives the session messages sent by the session sender and stores them in the cloud database; The server sends the session message to the session receiver. The session receiving end receives the session message and stores the session message in its local session database; The server performs session differential between the cloud database and the session database of the session receiving end; If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are segmented and differentiated. The server determines the session messages lost during the session between the session sender and the session receiver based on the differential results; wherein, the differential results include whether the sessions in the two databases are the same, and whether the session messages in the sessions are the same. The server will resend the lost session messages to the session database of the session receiver.
7. A data repair device, characterized in that, include: The receiving module is used to receive session messages sent by the session sender and store them in the cloud database; The sending module is used to send the session message to the session receiving end so that the session receiving end stores the session message in the session database of its local end; The differential module is used to perform session differential between the cloud database and the session database of the session receiving end; If the sessions in the cloud database are the same as those in the session database of the session receiving end, the session messages in each session are segmented and differentiated. The determination module is used to determine the session messages lost by the session sender and the session receiver during the session based on the differential results; wherein, the differential results include whether the sessions in the two databases are the same, and whether the session messages in the sessions are the same; The resend module is used to resend the lost session messages to the session database of the session receiver.
8. An electronic device, characterized in that, include: one or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Message loss detection method and device for message queue
CN111190747A
Techniques for message indexing
US20190207888A1