Data processing method, device, electronic device and storage medium
By responding to write operations at the data block level and meeting predetermined conditions, the write strategy solves the problems of data access complexity and low flexibility, achieves convenience and security of data access, simplifies permission management, and improves data processing efficiency.
Patent Information
- Application Number
- CN202210310951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-03-28
AI Technical Summary
Data access complexity and flexibility are low, permission management is complex and easy to be obtained maliciously, and data encryption reduces access frequency and flexibility.
By responding to the write operation of the target data block in the target file, determining its corresponding data value, and writing it to the target address under predetermined conditions, the predetermined conditions include the number of records and the number of write operations within a time, thereby achieving convenience and security of data access.
It improves the convenience and security of data access, prevents data from being maliciously tampered with, simplifies permission management, and improves the efficiency of data processing.
Smart Images

Figure CN116860702B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information processing technology, and specifically relates to a data processing method, device, electronic device and storage medium. Background Art
[0002] As more and more companies undergo digital transformation, data has become a very important asset for companies, and even concerns the life of the company. Companies also adopt some corresponding technical means to protect corporate data, such as permission management and data encryption.
[0003] Permission management refers to setting different operating roles for users of different levels and access operations for different purposes. As the number of users and scenarios increases, the permissions required by different roles become higher and more similar, and permission management becomes more and more complicated. Once permissions are obtained maliciously, the harm is greater. The data encryption method uses an algorithm to change the original information data and perform a specific disguise on the data. This method requires data to be encrypted before storage and transmission, and corresponding decryption operations must be performed before access and use, reducing the frequency and flexibility of data access. Summary of the Invention
[0004] The embodiments of the present application provide a data processing method, device, electronic device, and storage medium, which can solve the problems of complexity and low flexibility in data access.
[0005] In a first aspect, an embodiment of the present application provides a method for data processing, comprising: in response to a first write operation on a target data block in a target file, determining a first data value corresponding to the target data block, wherein the first data value is at least one write value of the target data block before receiving the first write operation; when a first log file satisfies a predetermined condition, writing one of the first data values into a target address corresponding to the target data block, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0006] In a second aspect, an embodiment of the present application provides a data processing device, comprising: a determination module, for determining a first data value corresponding to a target data block in a target file in response to a first write operation on the target data block, wherein the first data value is at least one write value of the target data block before receiving the first write operation; a writing module, for writing one of the first data values into a target address corresponding to the target data block when a first log file satisfies a predetermined condition, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file corresponding to the target file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0007] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data processing method as described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data processing method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the data processing method as described in the first aspect.
[0010] In an embodiment of the present application, in response to a first write operation on a target data block in a target file, a first data value corresponding to the target data block is determined, wherein the first data value is at least one write value of the target data block before receiving the first write operation; when a first log file satisfies a predetermined condition, one of the first data values is written to a target address corresponding to the target data block, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file, which can solve the problems of complexity and low flexibility of data access. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a flow chart of a data processing method provided in an embodiment of the present application;
[0012] Figure 2 This is a flow chart of another data processing method provided in an embodiment of the present application;
[0013] Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0014] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0016] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0017] The following, in conjunction with the accompanying drawings, describes in detail a data processing method, device, electronic device, and storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0018] Figure 1 An embodiment of the present application provides a data processing method, which can be performed by an electronic device. The electronic device may include: a server and / or a terminal device. In other words, the method can be performed by software or hardware installed in the electronic device, and the method includes the following steps:
[0019] S102: In response to a first write operation on a target data block in a target file, determine a first data value corresponding to the target data block.
[0020] Wherein, the first data value is at least one write value of the target data block before receiving the first write operation. This step responds to a write operation on a data block in the target file, and determines at least one write value of the data block before this write operation. For example, each time a data block is written, a spliced file can be generated for the data block, and the spliced file stores the data value of the corresponding data block before this write operation. When the same data block is written again subsequently, a new spliced file can be generated. In addition, a write operation log file of all data blocks in the corresponding target file can be generated for each write operation. The log file can store whether the corresponding data block has changed during a corresponding write operation or the data value of the corresponding data block before each write operation.
[0021] S104: When the first log file meets a predetermined condition, write one of the first data values into a target address corresponding to the target data block.
[0022] The predetermined conditions include:
[0023] The total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record, in the first log file, at least one write operation corresponding to the target data block before the first write operation;
[0024] The total number of second records within the predetermined time is greater than or equal to a second predetermined number of records, wherein the second records are used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0025] The first record is used to record at least one write operation corresponding to the target data block in the first log file, and the total number of first records is used to count the number of write operations corresponding to the target data block before the current write operation. When the number exceeds a first predetermined value, the at least one write value corresponding to the target data block before the current write operation is written back to the target address corresponding to the target data block.
[0026] The second record is used to record multiple write operations corresponding to multiple data blocks in the target file in the first log file, and the total number of second records within the predetermined time is used to count the number of multiple write operations corresponding to the multiple data blocks of the target file within the predetermined time. When the number exceeds a second predetermined value, at least one write value corresponding to the target data block before the current write operation is written back to the target address corresponding to the target data block.
[0027] This step counts the number of write operations on the target file data block level, and when the number of write operations on a single data block exceeds the limit or the number of write operations on the target file exceeds the limit within a predetermined time, selects the historical write value to write back to the corresponding data block, thereby achieving convenient data access and preventing data from being maliciously tampered with, thereby ensuring data security.
[0028] An embodiment of the present application provides a data processing method, which determines a first data value corresponding to a target data block in a target file in response to a first write operation on the target data block, wherein the first data value is at least one write value of the target data block before receiving the first write operation; and writes one of the first data values to a target address corresponding to the target data block when a first log file meets a predetermined condition, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file, thereby solving the problems of complexity and low flexibility of data access and achieving convenience of data access and security of data protection.
[0029] In one implementation, after determining the first data value corresponding to the target data block in response to the first write operation on the target data block in the target file, the method further includes:
[0030] Determining a second data value corresponding to the target data block;
[0031] When the first log file does not satisfy the predetermined condition, the second data value is written into the target address corresponding to the target data block.
[0032] When the first log file does not meet the predetermined conditions, that is, the number of write operations on a single data block does not exceed the limit or the number of write operations on the target file within the predetermined time does not exceed the limit, the second data value corresponding to the write operation is written to the target address corresponding to the target data block in accordance with the conventional writing to the target file. In this way, the editing process of the entire file is granulated to the data block level, which improves the convenience of data access and the efficiency of data processing.
[0033] Figure 2 An embodiment of the present application provides a data processing method, which can be performed by an electronic device. The electronic device may include: a server and / or a terminal device. In other words, the method can be performed by software or hardware installed in the electronic device, and the method includes the following steps:
[0034] S201: Split the target file into multiple data blocks.
[0035] A correspondence between the target file and the plurality of data blocks, and between the plurality of data blocks and a plurality of addresses is established.
[0036] This step can split the file according to the fixed data block length (this value can be set). The file splitting will not change the format and storage method of the data. It only logically divides the file according to the fixed length. It refers to the concept of compression and encryption, but does not perform changes on the data and will not affect the data itself. For example, a data file 1: AXCHXYZQRDEFKLMNS can be split into 6 data blocks according to every 3 characters (that is, the length is set to 3). Blocks 001 to 005 are all 3 characters. Block 006 is less than 3 characters, and only two characters are retained. Then, a correspondence between the target file and the multiple data blocks, and a correspondence between the multiple data blocks and multiple addresses are established to facilitate subsequent data block-level read and write operations on the target file.
[0037] S202: In response to a first write operation on a target data block in a target file, determine a first data value corresponding to the target data block.
[0038] The first data value is at least one write value of the target data block before receiving the first write operation.
[0039] This step can be done using Figure 1 The description of step S102 in the embodiment will not be repeated here for the repeated parts.
[0040] In one implementation, in response to a first write operation on a target data block in a target file, a first log file corresponding to the target file may be first created, and then the initial value corresponding to the target data block may be saved in the first log file as a record. When a write operation is subsequently performed on the target data block, the data value before the current write operation is saved in the first log file. If the target data block is a newly written data block, a new empty data block is created in the target file, and the corresponding initial data value is recorded as an empty value in the first log file. In this way, the first log file records the write operation records for all data blocks of the target file, and saves multiple write values of the corresponding data blocks before each write operation.
[0041] S204: When the first log file meets a predetermined condition, write one of the first data values into a target address corresponding to the target data block.
[0042] The predetermined conditions include:
[0043] The total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record, in the first log file, at least one write operation corresponding to the target data block before the first write operation;
[0044] The total number of second records within the predetermined time is greater than or equal to a second predetermined number of records, wherein the second records are used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0045] This step can be done using Figure 1 The description of step S104 in the embodiment will not be repeated here for the repeated parts.
[0046] For example, as in the aforementioned data file 1, if the data content of block 004 changes, the data DEF in block 004 can be written to the log file corresponding to data file 1 first, and then the new write value, such as AWX, can be written to the address corresponding to block 004 corresponding to data file 1. When the second write operation is performed on block 004, the data AWX in the current block 004 is written to the log file..., if the maximum number of single-block operations is set to 3 times, when block 004 is modified for the third time, the log file already has two write values for block 004: DEF and AWX. The user can select one of the write values, such as DEF, to write back to the address corresponding to block 004, so that the data block can be restored to its initial state. In addition, an alarm can be set if the number of operations on multiple data blocks in a data file exceeds a certain value within a time period: for example, it can be set that if the change to the data file does not exceed 50% within 5 minutes, in this example, the data file 1 initially has 6 split blocks. When more than 3 split blocks are changed (including existing and newly added), one of the multiple write values corresponding to each data block can be written back to the corresponding data block.
[0047] An embodiment of the present application provides a data processing method, which determines a first data value corresponding to a target data block in a target file in response to a first write operation on the target data block, wherein the first data value is at least one write value of the target data block before receiving the first write operation; and writes one of the first data values to a target address corresponding to the target data block when a first log file meets a predetermined condition, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file. This method can solve the problems of complexity and low flexibility of data access and achieve convenient data access and security of data protection.
[0048] In one implementation, after determining the first data value corresponding to the target data block in response to the first write operation on the target data block in the target file, the method further includes:
[0049] When the first log file meets a predetermined condition, sending an excessive modification prompt message corresponding to the target file to the server;
[0050] When the first log file satisfies a predetermined condition, writing one of the first data values into a target address corresponding to the target data block includes:
[0051] After receiving the write-back instruction for the target data block sent by the server, one of the first data values is written into the target address corresponding to the target data block.
[0052] When the first log file meets the predetermined conditions, an excessive modification prompt message corresponding to the target file is sent to the background server to remind the security management personnel that the file is at risk of being maliciously accessed and whether to write back the file. After receiving the write-back instruction for the target data block sent by the server, one of the first data values is written into the target address corresponding to the target data block.
[0053] It should be noted that the data processing method provided in the embodiments of the present application can be executed by a data processing device or a control module in the data processing device for executing the data processing method. In the embodiments of the present application, the data processing device provided in the embodiments of the present application is described by taking the data processing method executed by the data processing device as an example.
[0054] Figure 3FIG. 1 is a schematic diagram showing a data processing device provided by an embodiment of the present application. Figure 3 As shown, the data processing device 300 includes: a determination module 320, which is used to determine a first data value corresponding to the target data block in response to a first write operation on a target data block in a target file, wherein the first data value is at least one write value of the target data block before receiving the first write operation; a writing module 340, which is used to write one of the first data values into a target address corresponding to the target data block when a first log file meets a predetermined condition, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file corresponding to the target file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0055] In one implementation, the determination module 320 is further used to determine a second data value corresponding to the target data block; the writing module 340 is further used to write the second data value into the target address corresponding to the target data block when the first log file does not meet the predetermined condition.
[0056] In one implementation, the apparatus 300 further includes: a splitting module for splitting the target file into multiple data blocks; and an establishing module for establishing corresponding relationships between the target file and the multiple data blocks, and between the multiple data blocks and multiple addresses.
[0057] In one implementation, the device 300 also includes: a sending module, which is used to send excessive modification prompt information corresponding to the target file to the user when the first log file meets predetermined conditions; the writing module 340 is also used to: after receiving a write-back indication for the target data block sent by the user, write one of the first data values into the target address corresponding to the target data block.
[0058] The data processing device in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.
[0059] The data processing device in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0060] The data processing device provided in the embodiment of the present application can achieve Figures 1 to 2 To avoid repetition, the various processes implemented in the method embodiment will not be described again here.
[0061] Optional, such as Figure 4 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a program or instruction stored on the memory 402 and executable on the processor 401, wherein the program or instruction is implemented when executed by the processor 401: in response to a first write operation on a target data block in a target file, determining a first data value corresponding to the target data block, wherein the first data value is at least one write value of the target data block before receiving the first write operation; when a first log file satisfies a predetermined condition, writing one of the first data values into a target address corresponding to the target data block, wherein the predetermined condition includes: the total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in the first log file; the total number of second records within a predetermined time is greater than or equal to a second predetermined number of records, wherein the second record is used to record multiple write operations corresponding to multiple data blocks in the first log file.
[0062] In one implementation, when the above program or instruction is executed by the processor 401, it implements: determining a second data value corresponding to the target data block; and writing the second data value into a target address corresponding to the target data block if the first log file does not meet the predetermined condition.
[0063] In one implementation, when the above program or instruction is executed by the processor 401, it realizes: splitting the target file into multiple data blocks; establishing a correspondence between the target file and the multiple data blocks, and between the multiple data blocks and multiple addresses.
[0064] In one implementation, the above-mentioned program or instruction is implemented when executed by the processor 401: when the first log file meets the predetermined conditions, sending the excessive modification prompt information corresponding to the target file to the server; when the first log file meets the predetermined conditions, writing one of the first data values into the target address corresponding to the target data block, including: after receiving the write-back indication for the target data block sent by the server, writing one of the first data values into the target address corresponding to the target data block.
[0065] The specific execution steps can refer to the various steps of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0066] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminal devices, or other devices other than terminal devices.
[0067] The above electronic device structure does not constitute a limitation of the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. to configure the display panel. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include but are not limited to a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0068] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus random access memory (DRRAM).
[0069] The processor may include one or more processing units; optionally, the processor may integrate an application processor and a modem processor, wherein the application processor primarily handles operations related to the operating system, user interface, and application programs, and the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into the processor.
[0070] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0071] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.
[0072] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0073] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0074] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0076] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A data processing method, characterized in that: The method comprises: In response to a first write operation on a target data block in a target file, determining a first data value corresponding to the target data block, wherein the first data value is at least one written value of the target data block before receiving the first write operation; When the first log file meets a predetermined condition, one of the first data values is written into a target address corresponding to the target data block, wherein the predetermined condition includes: The total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record, in the first log file, at least one write operation corresponding to the target data block before the first write operation; The total number of second records within the predetermined time is greater than or equal to a second predetermined number of records, wherein the second records are used to record multiple write operations corresponding to multiple data blocks in the first log file.
2. The method according to claim 1, characterized in that After determining the first data value corresponding to the target data block in response to the first write operation on the target data block in the target file, the method further includes: Determining a second data value corresponding to the target data block; When the first log file does not satisfy the predetermined condition, the second data value is written into the target address corresponding to the target data block.
3. The method according to claim 1, characterized in that Before determining the first data value corresponding to the target data block in response to the first write operation on the target data block in the target file, the method further includes: Split the target file into multiple data blocks; A correspondence between the target file and the plurality of data blocks, and between the plurality of data blocks and a plurality of addresses is established.
4. The method according to claim 1, wherein After determining the first data value corresponding to the target data block in response to the first write operation on the target data block in the target file, the method further includes: When the first log file meets a predetermined condition, sending an excessive modification prompt message corresponding to the target file to the server; When the first log file satisfies a predetermined condition, writing one of the first data values into a target address corresponding to the target data block includes: After receiving the write-back instruction for the target data block sent by the server, one of the first data values is written into the target address corresponding to the target data block.
5. A data processing device, characterized in that: The device comprises: a determining module, configured to determine, in response to a first write operation on a target data block in a target file, a first data value corresponding to the target data block, wherein the first data value is at least one written value of the target data block before receiving the first write operation; a writing module, configured to write one of the first data values into a target address corresponding to the target data block if the first log file meets a predetermined condition, wherein the predetermined condition includes: The total number of first records is greater than or equal to a first predetermined number of records, wherein the first record is used to record at least one write operation corresponding to the target data block before the first write operation in a first log file corresponding to the target file; The total number of second records within the predetermined time is greater than or equal to a second predetermined number of records, wherein the second records are used to record multiple write operations corresponding to multiple data blocks in the first log file.
6. The device according to claim 5, characterized in that The determining module is further configured to: Determining a second data value corresponding to the target data block; The writing module is further used for: When the first log file does not satisfy the predetermined condition, the second data value is written into the target address corresponding to the target data block.
7. The device according to claim 5, characterized in that The device further comprises: Splitting module, used to split the target file into multiple data blocks; An establishing module is used to establish a corresponding relationship between the target file and the multiple data blocks, and between the multiple data blocks and multiple addresses.
8. The device according to claim 5, characterized in that The device further comprises: A sending module, configured to send, to a server, an excessive modification prompt message corresponding to the target file when the first log file meets a predetermined condition; The writing module is further used for: After receiving the write-back instruction for the target data block sent by the server, one of the first data values is written into the target address corresponding to the target data block.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.
10. A storage medium, characterized in that: include: The storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Continuous data protection and recovery method with log space adjustable online
CN104050268A
Metadata write-back method and electronic equipment
CN106055280A