CN118093269A - Data restoration method, device, equipment and storage medium - Google Patents

Data restoration method, device, equipment and storage medium Download PDF

Info

Publication number
CN118093269A
CN118093269A CN202410276267.7A CN202410276267A CN118093269A CN 118093269 A CN118093269 A CN 118093269A CN 202410276267 A CN202410276267 A CN 202410276267A CN 118093269 A CN118093269 A CN 118093269A
Authority
CN
China
Prior art keywords
data
storage area
event data
event
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410276267.7A
Other languages
Chinese (zh)
Inventor
刘建辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Volcano Engine Technology Co Ltd filed Critical Beijing Volcano Engine Technology Co Ltd
Priority to CN202410276267.7A priority Critical patent/CN118093269A/en
Publication of CN118093269A publication Critical patent/CN118093269A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to the technical field of data analysis, and discloses a data restoration method, a device, equipment and a storage medium, wherein the method comprises the following steps: if the login change message is acquired, acquiring a first data identifier in a non-login state and a second data identifier in the login state in the login change message, wherein the login change message is used for indicating that the login state is switched from the non-login state to the login state; determining a first storage area and first event data based on the first data identification; determining a second storage area and second event data based on the second data identification; and moving the first event data from the first storage area to the second event data in the second storage area so as to update the second event data. The present disclosure can restore event data of the same object by moving first event data in a non-login state to second event data in a corresponding login state.

Description

Data restoration method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of data analysis, and in particular relates to a data restoration method, a device, equipment and a storage medium.
Background
In the use process of the product, the situation that the login state of the object is switched is often involved. For example, the object uses the product in a non-login state at first, and login use is performed after a period of time. Because, when the product is used in the non-login state, the product usage analysis system can consider some actions in the non-login state as new objects to be executed, so that the event data of the same object is divided into event data of different objects to be stored.
Disclosure of Invention
In view of this, the present disclosure provides a data repairing method, apparatus, device and storage medium, so as to solve the problem that event data of the same object is divided into event data of different objects for storage.
In a first aspect, the present disclosure provides a data repair method, the method comprising:
If the login change message is acquired, acquiring a first data identifier in a non-login state and a second data identifier in a login state in the login change message, wherein the login change message is used for indicating that the login state is switched from the non-login state to the login state;
Determining a first storage area and first event data based on the first data identification;
determining a second storage area and second event data based on the second data identification;
and moving the first event data from the first storage area to second event data in the second storage area so as to update the second event data.
In a second aspect, the present disclosure provides a data repair apparatus, the apparatus comprising:
The change message acquisition module is used for acquiring a first data identifier in a non-login state and a second data identifier in a login state in the login change message if the login change message is acquired, wherein the login change message is used for indicating that the non-login state is switched to the login state;
The first information acquisition module is used for determining a first storage area and first event data based on the first data identification;
a second information acquisition module for determining a second storage area and second event data based on the second data identification;
And the event data moving module is used for moving the first event data from the first storage area to the second event data of the second storage area so as to update the second event data.
In a third aspect, the present disclosure provides a computer device comprising: the data restoration method comprises the steps of storing computer instructions in a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores the computer instructions, and the processor executes the computer instructions, so that the data restoration method of the first aspect or any corresponding implementation mode of the first aspect is executed.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the data repair method of the first aspect or any of its corresponding embodiments.
According to the data restoration method provided by the embodiment of the disclosure, if the login change message switched from the non-login state to the login state is acquired, the first data identifier in the non-login state and the second data identifier in the login state in the login change message are acquired. Then, a first storage area and first event data are determined based on the first data identification, and a second storage area and second event data are determined based on the second data identification. And moving the first event data from the first storage area to the second event data in the second storage area so as to update the second event data. Therefore, the event data of the same object in the non-login state and in the login state can be stored in a unified manner, so that the event data of the same object can be repaired.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are required in the detailed description or the prior art will be briefly described, it will be apparent that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow diagram of a data repair method according to an embodiment of the present disclosure;
FIG. 2 is an interactive schematic diagram of a data repair according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram of another data repair method according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of a data repair device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
In the use process of the product, the situation that the login state of the object is switched is often involved. For example, when a subject starts daily use of a product, the subject uses the product in a non-login state and registers login use after a certain period of time. Or when the equipment is replaced, the object does not log in the product to be used on the new equipment at first, and log in the product to be used is used after a period of time.
When the product is used in the non-login state, the product usage analysis system can consider some actions in the non-login state as new objects to be executed, so that event data of the same object in the non-login state and in the login state are divided into event data of different objects to be stored, and inaccurate identification of the event data is caused.
In view of the above, in accordance with the disclosed embodiments, there is provided a data repair method embodiment, it is noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system, such as a set of computer executable instructions, and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In this embodiment, a data repairing method is provided, which may be used in a product usage analysis system, and fig. 1 is a schematic flow chart of a data repairing method according to an embodiment of the disclosure, as shown in fig. 1, where the flow chart includes the following steps:
in step S101, if the login change message is acquired, the first data identifier in the non-login state and the second data identifier in the login state in the login change message are acquired, and the login change message is used for indicating that the login state is switched from the non-login state to the login state.
Specifically, as shown in fig. 2, when an object logs in on the device, a login request is triggered to the identifier service system, and when the identifier service system determines that the login involves switching from the non-login state to the login state, a login change message is generated based on the first data identifier in the non-login state and the second data identifier in the login state.
Step S102, determining a first storage area and first event data based on the first data identification.
Specifically, an event database for storing event data may be constructed in advance, and a plurality of slices are provided in the event database. In each fragment, corresponding event data is stored according to the data identification, each fragment can store event data of a plurality of data identifications, and event data corresponding to the same data identification is stored in the same storage area.
In actual operation, based on the first data identification, a corresponding first storage area in the pre-constructed event data is determined, and the first event data in a non-login state is acquired from the first storage area.
In particular, the event database may be built by the columnar database management system ClickHouse. Or constructing the event database through a relational database management system MySQL, and the construction mode of the event database is not limited.
In addition, other data storage modes may be used to store event data corresponding to different data identifiers, such as file systems, block storage, object storage, etc., and the storage modes of the event data are not limited herein.
Step S103, determining a second storage area and second event data based on the second data identification.
Specifically, based on the second data identifier, a corresponding second storage area in the pre-constructed event data is determined, and the second event data in the login state is acquired from the second storage area.
Step S104, the first event data is moved from the first storage area to the second event data in the second storage area, so as to update the second event data.
For example, in actual use of a product, event data for the same object is typically stored on the same tile for ease of data analysis and data management. However, when the product analysis system stores data, the data in the non-login state is often regarded as a new object to be executed, so that a new data identifier is allocated to store event data in the non-login state. As shown in fig. 2, it is assumed that event data in the non-login state is stored in the patch 1, and event data in the login state is stored in the patch 2. At this time, since event data of the same object is stored in each of the slices 1 and 2, it is necessary to move event data in a non-login state on the slice 1 to event data in a login state of the slice 2 so that event data of the same object is stored in a unified manner.
In the data restoration method provided in this embodiment, if a login change message for switching from a non-login state to a login state is obtained, a first data identifier in the non-login state and a second data identifier in the login state in the login change message are obtained. Then, a first storage area and first event data are determined based on the first data identification, and a second storage area and second event data are determined based on the second data identification. And moving the first event data from the first storage area to the second event data in the second storage area so as to update the second event data. Therefore, the event data of the same object in the non-login state and the login state can be uniformly stored, so that the event data of the same object can be repaired, and the accuracy of subsequent product analysis is improved.
In some optional embodiments, the data repair method of the present disclosure further includes, after the step S101, the steps of: transmitting the first data identifier and the corresponding second data identifier to a distributed publish-subscribe message system; creating an identification information table; based on the distributed publishing and subscribing message system, the first data identification and the corresponding second data identification are written into an identification information table.
For example, taking ClickHouse to manage event data as an example, if a login change message is obtained, a first data identifier in a non-login state and a second data identifier in a login state in the login change message are sent to a distributed publish-subscribe message system (english: kafka) to generate a message queue. Then, an identification information table is created at ClickHouse to consume the message content format of Kafka to write the first data identification and the second data identification into the identification information table. Therefore, in the subsequent data repairing process, the first data identifier in the non-login state and the second data identifier in the corresponding login state can be determined according to the identifier information table, so that the first event data in the non-login state is moved to the second event data in the corresponding login state, and the event data of the same object is repaired.
In addition, as shown in fig. 2, the identification information table may be correspondingly stored on the segment where the first storage area is located, so as to determine whether there is first event data in the non-login state that needs to be moved on the current segment.
According to the data restoration method provided by the embodiment, the first data identifier in the non-login state and the second data identifier in the corresponding login state are sent to the distributed publish-subscribe message system, and then the first data identifier and the corresponding second data identifier are written into the created identifier information table by utilizing the distributed publish-subscribe message system. Therefore, in the subsequent data restoration process, the first event data in the non-login state which needs to be restored can be quickly determined, so that the data restoration efficiency is improved.
In some optional embodiments, the acquiring the first event data in the non-login state in step S102 based on the first data identifier includes: when a preset repair starting condition is met, if a first data identifier is stored in the identifier information table, a first storage area and first event data are determined based on the first data identifier.
Specifically, the repair initiation condition is whenever a preset period is reached. The preset period may be 2 hours, 6 hours, 1 day or one week, and may be determined according to practical situations. In addition, the repair initiation condition may be when a repair instruction is received, or when a product analysis task is started. In actual operation, the repair starting conditions can be adjusted according to actual conditions.
It will be appreciated that during the use of the product, a large number of login change messages may be involved, and if one login change message is obtained, a large amount of computing resources are occupied if data repair is performed once, and frequent data movement easily causes data errors. Thus, the repair task may be performed at regular intervals, e.g., 1 am a day, once. Or perform a repair task every 2 hours.
According to the data restoration method provided by the embodiment, when the restoration starting condition is met and the first data identifier in the non-login state is stored in the identifier information table, the first storage area and the first event data in the non-login state are acquired based on the first data identifier. Therefore, frequent data repair can be avoided, and unnecessary computing resource occupation is reduced. Meanwhile, whether the first event data in the non-login state which needs to be moved or repaired exists or not can be rapidly determined according to the data condition in the identification information table.
In some optional embodiments, the step S104 of moving the first event data from the first storage area to the second event data in the second storage area to update the second event data includes:
Step a1, creating a temporary data table in the first storage area, wherein the temporary data table is used for storing first event data.
And a step a2 of moving the first event data from the first storage area to the second event data in the second storage area based on the temporary data table so as to update the second event data.
It should be noted that, considering that data loss or data corruption may occur during the process of data migration or copying, if modification is directly performed on the original event data, data errors and even data crashes are easily caused. Therefore, the temporary data table needs to be used for backing up the first event data, and then the first event data in the temporary data table is moved to the second event data in the second storage area, so that when the data loss or the data damage occurs, the temporary data table can be used for data recovery.
In the data restoration method provided in this embodiment, when the first event data of the first storage area is moved to the second event data of the second storage area, the temporary data table is created first, the first event data of the first storage area is copied to the temporary data table to be cached, and then the data of the temporary data table is moved to the second event data of the second storage area. Therefore, even if the data movement fails, the temporary data table can be used for data recovery so as to ensure the reliability of the data movement process.
In some alternative embodiments, creating the temporary data table in the first storage area in the step a1 includes: creating an initial data table, wherein an identification field is arranged in the initial data table, and the identification field is a first data identification; and moving the first event data to the initial data table, and modifying the identification field into a second data identification to obtain a temporary data table.
Illustratively, using ClickHouse as an example, the data identifications can be used as column names, and then event data for different data identifications can be stored in a columnar storage manner. When the first event data corresponding to the first data identifier is copied to the initial data table, the identifier field of the initial data table is the first data identifier. Therefore, if the first event data in the initial data table is to be moved to the second event data corresponding to the second data identifier, the identifier field of the initial data table needs to be modified to the second data identifier, so that ClickHouse can move the first event data to the second event data corresponding to the second data identifier according to the second data identifier, so as to update the second event data.
According to the data restoration method provided by the embodiment, an initial data table with an identification field being the first data identification is created, then the first event data is moved to the initial data table, the identification field is modified to be the second data identification, and a temporary data table is obtained. Therefore, the first event data in the temporary data table can be moved to the second event data of the corresponding second data identifier according to the identification field in the temporary data table, and the reliability of data movement can be further improved.
In some optional embodiments, the step a2 of moving the first event data from the first storage area to the second event data in the second storage area based on the temporary data table to update the second event data includes: if the first storage area and the second storage area are located in the same partition, the first event data in the temporary data table is moved to the second event data in the second storage area, and the first event data in the first storage area is deleted.
In the data restoration method provided in this embodiment, when the first storage area and the second storage area are located in the same partition, the temporary data table is used as an intermediate transmission medium to move the first event data from the first storage area to the second event data in the second storage area. Therefore, the original event data can be prevented from being directly modified, so that when the data movement fails, the temporary data table is utilized to repair the data, and the reliability of the data movement is ensured. And deleting the first event data in the first storage area, releasing the storage space and reducing the space occupation of redundant data.
In some optional embodiments, the step a2 of moving the first event data from the first storage area to the second event data in the second storage area based on the temporary data table to update the second event data further includes: if the first storage area and the second storage area are located in different fragments, creating a target data table in the second storage area; moving first event data in the temporary data table to the target data table; and moving the first event data in the target data table to the second event data in the second storage area, and deleting the first event data in the first storage area.
For example, as shown in fig. 2, in performing a repair task, it is assumed that a first storage area is located in a partition 1 and a second storage area is located in a partition 2, and since the partitions are located on different machines, it is impossible to directly locally move first event data of the first storage area to second event data stored in the second storage area. Therefore, the data of the temporary data table of the segment 1 can be transmitted to the target data table of the segment 2 through network transmission, and then the first event data in the target data table is moved to the second event data in the second storage area.
According to the data restoration method provided by the embodiment, when the first storage area and the second storage area are located in different fragments, first event data of the temporary data table is transmitted to the target data table of the second storage area, then the first event data in the target data table is moved to second event data of the second storage area, so that when the data movement fails, the data movement can be carried out again based on the target data table, and the reliability of the data movement is ensured. And deleting the first event data in the first storage area, releasing the storage space and reducing the space occupation of redundant data.
By way of example, the data repair method of the present disclosure is illustrated in a specific embodiment, as shown in fig. 3, which includes the steps of:
step S201, judging whether first event data corresponding to the first data identification in the non-login state exists in each storage area, if yes, executing step S202, and if not, ending the repair task.
Step S202, first event data is read from a first storage area corresponding to the first data identifier, and the first event data is stored in a pre-created initial data table, wherein an identifier field in the initial data table is the first data identifier.
Step S203, the identification field in the initial data table is modified from the first data identification to the second data identification in the login state, and a temporary data table is obtained.
Step S204, deleting the first event data identified by the first data in the first storage area.
Step S205, the first event data in the temporary data table is moved to the second event data in the second storage area corresponding to the second data identifier.
It should be noted that, in the data repairing method of the present disclosure, the temporary data table is obtained by moving the event data in the non-login state to the pre-created initial data table. Then, the event data in the non-login state of the original storage area is deleted. And moving the event data in the temporary data table to the event data in the corresponding logging state. Therefore, event data of the same object can be repaired. Meanwhile, the temporary data table is used for caching event data in a non-login state, and then the event data in the non-login state is moved to the event data in the corresponding login state, so that on one hand, when the data movement fails, the event data in the temporary data table can be used for repairing again, on the other hand, the original data storage area can be prevented from being operated for multiple times, and data errors are avoided to a certain extent.
The embodiment also provides a data repairing device, which is used for implementing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a data repairing apparatus, as shown in fig. 4, including:
A change message obtaining module 301, configured to obtain, if a login change message is obtained, a first data identifier in a non-login state and a second data identifier in a login state in the login change message, where the login change message is used to indicate switching from the non-login state to the login state;
A first information acquisition module 302, configured to determine a first storage area and first event data based on the first data identifier;
a second information acquisition module 303 for determining a second storage area and second event data based on the second data identification;
The event data moving module 304 is configured to move the first event data from the first storage area to the second event data in the second storage area, so as to update the second event data.
In some alternative embodiments, the data repair device further comprises:
the data identifier sending module is used for sending the first data identifier and the corresponding second data identifier to the distributed publish-subscribe message system;
the identification table creation module is used for creating an identification information table;
And the data identification recording module is used for writing the first data identification and the corresponding second data identification into the identification information table based on the distributed publishing and subscribing message system.
In some alternative embodiments, the first information acquisition module 302 includes:
And the information acquisition unit is used for determining the first storage area and the first event data based on the first data identifier if the first data identifier is stored in the identifier information table when the preset repair starting condition is met.
In some alternative embodiments, the event data mover module 304 includes:
a temporary table creation unit configured to create a temporary data table for storing first event data in the first storage area;
And the event data moving unit is used for moving the first event data from the first storage area to the second event data of the second storage area based on the temporary data table so as to update the second event data.
In some alternative embodiments, the temporary table creation unit includes:
an initial table creation subunit, configured to create an initial data table, where an identification field is set in the initial data table, and the identification field is a first data identifier;
and the initial table writing subunit is used for moving the first event data into the initial data table, modifying the identification field into the second data identification and obtaining the temporary data table.
In some alternative embodiments, the event data mover includes:
and the first data moving subunit is used for moving the first event data in the temporary data table to the second event data in the second storage area and deleting the first event data in the first storage area if the first storage area and the second storage area are positioned in the same partition.
In some alternative embodiments, the event data mover further comprises:
A target table creation subunit, configured to create a target data table in the second storage area if the first storage area and the second storage area are located in different fragments;
a target table moving subunit, configured to move the first event data in the temporary data table to the target data table;
And the second data moving subunit is used for moving the first event data in the target data table to the second event data in the second storage area and deleting the first event data in the first storage area.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The data repair device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that can provide the above functions.
The embodiment of the disclosure also provides a computer device, which is provided with the data restoration device shown in the figure 4.
Referring to fig. 5, fig. 5 is a block diagram illustrating a computer device according to an alternative embodiment of the disclosure, as shown in fig. 5, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 5.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The presently disclosed embodiments also provide a computer readable storage medium, and the methods described above according to the presently disclosed embodiments may be implemented in hardware, firmware, or as recordable storage medium, or as computer code downloaded over a network that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and is to be stored in a local storage medium, such that the methods described herein may be stored on such software processes on a storage medium using a general purpose computer, special purpose processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present disclosure have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations are within the scope defined by the appended claims.

Claims (10)

1. A method of data repair, the method comprising:
If the login change message is acquired, acquiring a first data identifier in a non-login state and a second data identifier in a login state in the login change message, wherein the login change message is used for indicating that the login state is switched from the non-login state to the login state;
Determining a first storage area and first event data based on the first data identification;
determining a second storage area and second event data based on the second data identification;
and moving the first event data from the first storage area to second event data in the second storage area so as to update the second event data.
2. The method of claim 1, wherein the moving the first event data from the first storage area to the second event data in the second storage area to update the second event data comprises:
Creating a temporary data table in the first storage area, wherein the temporary data table is used for storing the first event data;
and moving the first event data from the first storage area to second event data in the second storage area based on the temporary data table so as to update the second event data.
3. The data repair method of claim 2 wherein the moving the first event data from the first storage area to the second event data of the second storage area based on the temporary data table to update the second event data comprises:
And if the first storage area and the second storage area are positioned in the same partition, moving the first event data in the temporary data table to the second event data in the second storage area, and deleting the first event data in the first storage area.
4. The data repair method of claim 2 wherein the moving the first event data from the first storage area to the second event data of the second storage area based on the temporary data table to update the second event data comprises:
If the first storage area and the second storage area are located in different fragments, creating a target data table in the second storage area;
moving first event data in the temporary data table to the target data table;
And moving the first event data in the target data table to the second event data in the second storage area, and deleting the first event data in the first storage area.
5. The method of claim 2, wherein creating a temporary data table in the first storage area comprises:
creating an initial data table, wherein an identification field is arranged in the initial data table, and the identification field is the first data identification;
And moving the first event data to the initial data table, and modifying the identification field into the second data identification to obtain the temporary data table.
6. The method for repairing data according to claim 1, further comprising, after said obtaining the first data identifier in the non-login state and the second data identifier in the login state in the login change message:
transmitting the first data identifier and the corresponding second data identifier to a distributed publish-subscribe message system;
creating an identification information table;
And writing the first data identifier and the corresponding second data identifier into the identifier information table based on the distributed publish-subscribe message system.
7. The data repair method of claim 6 wherein the determining a first storage area and first event data based on the first data identification comprises:
When a preset repair starting condition is met, if the first data identifier is stored in the identifier information table, the first storage area and the first event data are determined based on the first data identifier.
8. A data repair device, the device comprising:
The change message acquisition module is used for acquiring a first data identifier in a non-login state and a second data identifier in a login state in the login change message if the login change message is acquired, wherein the login change message is used for indicating that the non-login state is switched to the login state;
The first information acquisition module is used for determining a first storage area and first event data based on the first data identification;
a second information acquisition module for determining a second storage area and second event data based on the second data identification;
And the event data moving module is used for moving the first event data from the first storage area to the second event data of the second storage area so as to update the second event data.
9. A computer device, comprising:
A memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the data repair method of any of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the data repair method of any one of claims 1 to 7.
CN202410276267.7A 2024-03-11 2024-03-11 Data restoration method, device, equipment and storage medium Pending CN118093269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410276267.7A CN118093269A (en) 2024-03-11 2024-03-11 Data restoration method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410276267.7A CN118093269A (en) 2024-03-11 2024-03-11 Data restoration method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118093269A true CN118093269A (en) 2024-05-28

Family

ID=91164897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410276267.7A Pending CN118093269A (en) 2024-03-11 2024-03-11 Data restoration method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118093269A (en)

Similar Documents

Publication Publication Date Title
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
CN110062924B (en) Capacity reservation for virtualized graphics processing
US9535754B1 (en) Dynamic provisioning of computing resources
US10417213B1 (en) Metadata updating
CN108369544B (en) Deferred server recovery in a computing system
CN109587331B (en) Method and system for automatically repairing cloud mobile phone fault
CN110753084B (en) Uplink data reading method, cache server and computer readable storage medium
RU2653254C1 (en) Method, node and system for managing data for database cluster
US10990312B2 (en) Method, apparatus, device and storage medium for processing data location of storage device
CN108475201B (en) Data acquisition method in virtual machine starting process and cloud computing system
WO2019242455A1 (en) Method and apparatus for user request forwarding, reverse proxy and computer readable storage medium
CN111049913B (en) Data file transmission method and device, storage medium and electronic equipment
CN106708865B (en) Method and device for accessing window data in stream processing system
CN114138838A (en) Data processing method and device, equipment and medium
US11120007B2 (en) Module expiration management
CN117131014A (en) Database migration method, device, equipment and storage medium
US10474475B2 (en) Non-intrusive restart of a task manager
CN118093269A (en) Data restoration method, device, equipment and storage medium
CN111930707B (en) Method and system for correcting drive letter of windows cloud migration
US20230195582A1 (en) Rolling back a database transaction
US11163612B2 (en) Multi-tier coordination of destructive actions
CN112257004B (en) Method, device, server and storage medium for page backup
CN113868679B (en) Cluster encryption method and device
CN112445778B (en) File operation method and file operation system based on VxWorks
CN117149487A (en) Method, device, equipment and storage medium for determining data loss

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination