Data processing method and device, equipment and storage medium

Through the combination of data security writing mechanism and memory access data, the system stability problems caused by data writing exceptions in smart network cards are solved, and the reliability and data reading and writing speed of cloud service systems are improved.

CN119149290APending Publication Date: 2024-12-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
CN202310704056.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During the long run, the system abnormalities caused by business scenario complexity and human misoperation may lead to the destruction of data integrity, which will affect the stability of the cloud service system. The existing data writing method of LSM-tree architecture This results in slower reading and writing speed and high consumption.

Method used

Adopt the data safe writing mechanism to copy the data to be written from the application memory to the data backup area, and set the to-write mark in the refresh area list to ensure that the data is written in full. If the write exception is detected, it will be rewrite. Enter the data target area and combine memory to access data to improve speed.

Benefits of technology

It realizes high reliability of data operations in cloud environments, reduces the delay in reading and writing of smart network card data, and ensures the integrity and speed of data writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149290A_ABST
    Figure CN119149290A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device, equipment and a storage medium, which are used for improving the data access speed and reducing the data reading time delay. The method comprises the steps of copying to-be-written data from a target application program storage space to a data backup area through a data operation interface; setting a corresponding to-be-written mark for the data backup area in the refresh area list; copying the to-be-written data from the data backup area to the data target area, and clearing the to-be-written mark in the refresh area list; when it is detected that the data writing operation abnormally exits, detecting a corresponding current to-be-written mark when the data writing operation abnormally exits in the refresh area list; and if it is detected that the current to-be-written mark exists, copying the to-be-written data corresponding to the current to-be-written mark from the data backup area to the data target area again, and clearing the current to-be-written mark in the refresh area list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing technology, and in particular, to a data processing method, device, equipment and storage medium. Background Art

[0002] With the development of the Internet and cloud service technology, the stability of cloud service systems is an important evaluation indicator of cloud service quality. Cloud services need to ensure long-term reliability. Smart NICs are the infrastructure of cloud systems, involving a large amount of data related to software and hardware collaboration. There are very high requirements for the reliability of these data. The stability of smart NICs is an important guarantee for cloud service systems. During the long-term operation of smart NICs, due to the complexity of business scenarios and possible human errors, system anomalies are inevitable. Therefore, when the underlying software of the smart NIC is abnormal, it is very likely that the integrity of the data related to software and hardware will be destroyed, which will cause the operation of the entire program to be in a completely uncertain state, which may cause the collapse of the entire cloud system.

[0003] Current systems usually use the LSM-tree (Log-Structured Merged-tree) architecture to implement data reading and writing. LSM-tree divides data writing operations into two stages: first, new data is written to a log structure in memory, and then the data in this memory data structure is periodically written to the disk through log appending. However, this segmented data access method takes a long time to read and write data. In the time-sensitive software system of the smart network card, because the hard disk read and write speed is usually in the millisecond level, this will have a great impact on the data read and write speed, which will cause delays to the system. In addition, the log append operation to write data will consume a high amount of disk space. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device and storage medium, which are used to completely write the data to be written into the data target area by adopting a data security writing mechanism, and then combine with a recovery mechanism to further ensure that after a program exception occurs, the incompletely written data can be completely re-written into the data target area. This can not only meet the high reliability requirements of data operations in a cloud environment, that is, maintain the integrity of data writing, but also improve the data access speed by adopting memory to access data, thereby reducing the latency of smart network card data reading and writing.

[0005] On the one hand, an embodiment of the present application provides a data processing method, including:

[0006] Through the data operation interface, the data to be written is copied from the target application storage space to the data backup area, wherein the data backup area is used to temporarily store the data to be written;

[0007] Setting a corresponding to-be-written mark for the data backup area in the refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark;

[0008] Copy the data to be written from the data backup area to the data target area, and clear the to-be-written mark in the refresh area list, wherein the data target area is used to store the data to be written;

[0009] When it is detected that the data write operation is abnormally exited, the current to-be-written mark corresponding to the abnormal exit of the data write operation in the refresh area list is detected;

[0010] If it is detected that there is a current mark to be written, the data to be written corresponding to the current mark to be written is copied from the data backup area to the data target area again, and the current mark to be written in the refresh area list is cleared.

[0011] On the other hand, the present application provides a data processing device, including:

[0012] A processing unit, used to copy the data to be written from the target application storage space to the data backup area through the data operation interface, wherein the data backup area is used to temporarily store the data to be written;

[0013] an acquisition unit, used to set a corresponding to-be-written mark for the data backup area in a refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark;

[0014] The processing unit is further used to copy the data to be written from the data backup area to the data target area, and clear the to-be-written mark in the refresh area list, wherein the data target area is used to store the data to be written;

[0015] The acquisition unit is further used to detect the current to-be-written mark corresponding to the abnormal exit of the data writing operation in the refresh area list when it is detected that the data writing operation is abnormally exited;

[0016] The processing unit is further configured to, if a current to-be-written mark is detected, copy the to-be-written data corresponding to the current to-be-written mark from the data backup area to the data target area again, and clear the current to-be-written mark in the refresh area list.

[0017] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0018] The acquisition unit is further used to acquire data target area information corresponding to the data to be written, wherein the data target area information at least includes a data target area address and a length, wherein the data target area address is used to indicate an address where the data to be written is written to the data target area, and the length is used to indicate a data length of the data to be written to the data target area;

[0019] The processing unit is further used to update the data target area address and length into the refresh area list.

[0020] In a possible design, in an implementation of another aspect of the embodiment of the present application, the processing unit may be specifically used for:

[0021] The data to be written is copied from the data backup area to the data target area corresponding to the data target area address and length, and the to-be-written mark in the refresh area list is cleared.

[0022] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0023] The processing unit is further used to divide the data target area, the data backup area corresponding to the data target area and the refresh area list in the system data storage space through the data access space application interface;

[0024] The processing unit is further used to divide the data target area into N data target groups based on the process type supported by the system, and divide the data backup area into N data backup groups corresponding to the N data target groups, where N is an integer greater than or equal to 1.

[0025] In a possible design, in an implementation of another aspect of the embodiment of the present application, the processing unit may be specifically used for:

[0026] If K interface call requests of different process types are concurrently received through the data security write interface, the K to-be-written data corresponding to the K different process types are copied from the target application storage space to K data backup groups, where K is an integer less than or equal to N;

[0027] The acquisition unit can be used specifically for:

[0028] In the refresh area list, set corresponding K to-be-written marks for the K data backup groups;

[0029] The processing unit can be used for:

[0030] Copying K to-be-written data corresponding to K different process types from K data backup groups to K data target groups corresponding to K data target area addresses and lengths;

[0031] Clear the K to-be-written marks corresponding to the K data target groups in the refresh area list.

[0032] In a possible design, in an implementation of another aspect of the embodiment of the present application, the processing unit may be specifically used for:

[0033] If K interface call requests of the same process type are concurrently received through the data security write interface, K data security write operations are performed in sequence, each time copying a to-be-written data corresponding to the same process type from the target application storage space to the same data backup group, where K is an integer less than or equal to N;

[0034] The acquisition unit can be used specifically for:

[0035] Set a pending write mark for each data backup group in the refresh area list in turn;

[0036] The processing unit can be used for:

[0037] Sequentially copying a to-be-written data corresponding to a same process type from the data backup group to the data target group corresponding to the data target area address and length, until K to-be-written data of K same process types are copied to the data target group;

[0038] Clear the K to-be-written marks corresponding to the data target groups in the refresh area list in sequence.

[0039] In a possible design, in an implementation of another aspect of the embodiment of the present application, the acquisition unit may be specifically used to:

[0040] Allocate K to-be-written marks to K data backup groups in the refresh area list;

[0041] Set K to-be-written flags to true respectively;

[0042] The processing unit can be used for:

[0043] The K to-be-written flags corresponding to the K data target groups in the refresh area list are set to false.

[0044] In a possible design, in an implementation of another aspect of the embodiment of the present application, the processing unit may be specifically used for:

[0045] If the current to-be-written mark is detected to be true, the data corresponding to the current to-be-written mark is regarded as unsuccessfully written data;

[0046] Copying the unsuccessfully written data from the data backup group to the data target group corresponding to the data target area address and length;

[0047] Sets the current pending write flag in the refresh region list to false.

[0048] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0049] The processing unit is further used to copy M test write data of M different process types from the M data backup groups to the M data target groups in sequence through the data security write interface, where M is an integer less than or equal to N;

[0050] The processing unit is further used to read M test read data from the M data target groups in sequence through the data read interface;

[0051] The determination unit is used to determine that the data access test is normal if the test read data read each time is consistent with the corresponding test write data.

[0052] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0053] The processing unit is further used to record the test write time consumed each time the test write data is written, and calculate the average test write time for writing the test write data based on the M test write times.

[0054] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0055] The processing unit is further used to record the test reading time consumed for each reading of the test reading data, and calculate the average test reading time for reading the test reading data based on the M test reading times;

[0056] The determination unit is further used to determine that the data access test delay meets the data read and write delay threshold if the average test write time is less than the write time threshold and the average test read time is less than the read time threshold.

[0057] In a possible design, in an implementation of another aspect of the embodiment of the present application,

[0058] The processing unit is also used to inject fault data of abnormal program exit into the data backup area;

[0059] The acquisition unit is further used to acquire P unwritten test data corresponding to the fault data through the data recovery interface, where P is an integer less than or equal to M;

[0060] The processing unit is further used to copy the P unwritten test data from the P data backup groups to the P data target groups in sequence;

[0061] The processing unit is further used to read P test read data from the P data target groups in sequence through the data read interface;

[0062] The determination unit is further used to determine that the data recovery test is normal if the test read data read each time is consistent with the corresponding unwritten test data.

[0063] On the other hand, the present application provides a computer device, including: a memory, a processor, and a bus system;

[0064] Wherein, the memory is used to store programs;

[0065] The processor is used to implement the above-mentioned methods when executing the program in the memory;

[0066] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0067] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.

[0068] It can be seen from the above technical solutions that the embodiments of the present application have the following beneficial effects:

[0069] Through the data operation interface, the data to be written is copied from the application memory to the data backup area, and then the corresponding to-be-written mark is set for the data backup area in the refresh area list, and then the data to be written is copied from the data backup area to the data target area, and the to-be-written mark in the refresh area list is cleared. Then, when it is detected that the data write operation is abnormally exited, the current to-be-written mark corresponding to the abnormal exit of the data write operation in the refresh area list is detected. If it is detected that there is a current to-be-written mark, the to-be-written data corresponding to the current to-be-written mark is copied from the data backup area to the data target area again, and the current to-be-written mark in the refresh area list is cleared. Through the above method, the data security write mechanism can be used to copy the data to be written from the application memory to the data backup area, and the data to be written from the data backup area to the data target area to achieve complete data writing. Then, combined with the recovery mechanism, after the program exception occurs, the integrity of the to-be-written data corresponding to the current to-be-written mark can be rewritten to the data target area. It can not only meet the high reliability requirements of data operations in the cloud environment, that is, maintain the integrity of data writing, but also improve the data access speed by using memory to access data, thereby reducing the delay of smart network card data reading and writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1This is a schematic diagram of the architecture of a data object control system in an embodiment of the present application;

[0071] Figure 2 is a flow chart of an embodiment of a method for processing data in an embodiment of the present application;

[0072] Figure 3 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0073] Figure 4 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0074] Figure 5 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0075] Figure 6 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0076] Figure 7 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0077] Figure 8 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0078] Fig. 9 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0079] Fig.10 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0080] Fig.11 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0081] Fig.12 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0082] Fig.13 is another embodiment flow chart of the method for processing data in the embodiment of the present application;

[0083] Fig.14 It is a schematic diagram of a principle flow chart of a method for processing data in an embodiment of the present application;

[0084] Fig.15 It is a schematic diagram of the principle of memory design of the data processing method in the embodiment of the present application;

[0085] Fig.16It is a schematic diagram of the principle of a data security writing mechanism of the data processing method in the embodiment of the present application;

[0086] Fig.17 It is a schematic diagram of the principle of a data recovery mechanism of the data processing method in the embodiment of the present application;

[0087] Fig.18 It is a schematic diagram of the principle of a data test of the data processing method in the embodiment of the present application;

[0088] Fig.19 is a schematic diagram of an embodiment of a data processing device in an embodiment of the present application;

[0089] Fig. 20 It is a schematic diagram of an embodiment of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0090] The embodiments of the present application provide a data processing method, apparatus, device and storage medium, which are used to completely write the data to be written into the data target area by adopting a data security writing mechanism, and then combine with a recovery mechanism to further ensure that after a program exception occurs, the incompletely written data can be completely re-written into the data target area. This can not only meet the high reliability requirements of data operations in a cloud environment, that is, maintain the integrity of data writing, but also improve the data access speed by adopting memory to access data, thereby reducing the latency of smart network card data reading and writing.

[0091] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0092] To facilitate understanding, some terms or concepts involved in the embodiments of the present application are first explained.

[0093] 1. Smart network interface card (SmartNIC) is a flexible and programmable network card used in conjunction with servers. Because smart network cards have computing capabilities, in order to release CPU computing power, they will offload the data processing functions that are not suitable for CPU in network, security, and storage to programmable hardware chips for execution, reduce CPU consumption, enable servers to run key applications and operating systems more effectively, and optimize the overall effectiveness of business data processing.

[0094] It is understandable that in the specific implementation of the present application, related data such as data to be written is involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0095] It is understandable that the data processing method disclosed in this application specifically involves cloud technology. Cloud technology is further introduced below. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool and be used on demand, flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0096] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0097] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0098] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of transaction software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0099] Secondly, cloud security refers to the general term for security software, hardware, users, institutions, and security cloud platforms based on cloud computing business model applications. Cloud security integrates emerging technologies and concepts such as parallel processing, grid computing, and unknown virus behavior judgment. Through a large number of networked clients, it monitors abnormal software behavior in the network, obtains the latest information on Trojans and malicious programs on the Internet, and sends it to the server for automatic analysis and processing, and then distributes virus and Trojan solutions to each client.

[0100] Secondly, cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and transaction access functions.

[0101] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, IDentity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0102] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disk), the physical storage space is divided into stripes in advance. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0103] It should be understood that the data-based processing method provided in the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, maps, smart transportation, etc., and is used to copy the data to be written from the application memory to the data backup area by adopting a data security write mechanism, and copy the data to be written from the data backup area to the data target area, and then combine the recovery mechanism after a program exception occurs. The data to be written can be rewritten to the data target area to complete the safe writing of the data, and can be applied to scenarios such as data transmission, virtual switching scenarios, data security scenarios, data storage scenarios, memory space virtualization configuration scenarios, network traffic detection scenarios, network fault diagnosis scenarios, etc.

[0104] In order to solve the above problems, this application proposes a data processing method, which is applied to Figure 1 The data object control system shown is shown in Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an architecture of a data object control system in an embodiment of the present application. Figure 1As shown, the server copies the data to be written from the application memory to the data backup area through the data operation interface, and then sets the corresponding to-be-written mark for the data backup area in the refresh area list, and then copies the data to be written from the data backup area to the data target area, and clears the to-be-written mark in the refresh area list. Then, when it is detected that the data write operation is abnormally exited, the current to-be-written mark corresponding to the abnormal exit of the data write operation in the refresh area list is detected. If it is detected that there is a current to-be-written mark, the to-be-written data corresponding to the current to-be-written mark is copied from the data backup area to the data target area again, and the current to-be-written mark in the refresh area list is cleared. Through the above method, the data security write mechanism can be used to copy the data to be written from the application memory to the data backup area, and the data to be written from the data backup area to the data target area to achieve complete data writing. Then, combined with the recovery mechanism, it is further ensured that after the program exception occurs, the integrity of the to-be-written data corresponding to the current to-be-written mark can be rewritten to the data target area. It can not only meet the high reliability requirements of data operations in the cloud environment, that is, maintain the integrity of data writing, but also improve the data access speed by using memory to access data, thereby reducing the delay of smart network card data reading and writing.

[0105] Understandably, Figure 1 Only one type of terminal device is shown in the figure. In actual scenarios, more types of terminal devices may participate in the data processing process. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc. The specific number and type depend on the actual scenario and are not limited here. Figure 1 One server is shown in the figure, but in actual scenarios, multiple servers may also be involved, especially in the scenario of multi-model training interaction. The number of servers depends on the actual scenario and is not limited here.

[0106] It should be noted that in this embodiment, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and the terminal device and the server can be connected to form a blockchain network, which is not limited in this application.

[0107] Combined with the above introduction, the following will introduce the data processing method in this application, please refer to Figure 2In one embodiment of the data processing method of the present application, the method includes:

[0108] In step S101, the data to be written is copied from the target application storage space to the data backup area through the data operation interface, wherein the data target area is used to store the data to be written;

[0109] In the embodiments of the present application, in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), it is necessary to maintain the integrity of the data so that the smart network card system can stably process the data, thereby maintaining the high reliability requirements of the storage engine or the cloud environment data operation. Therefore, the present embodiment can configure the data operation interface of the application layer, and then, through the data operation interface, the data to be written can be copied from the target application storage space to the data backup area, and the data security writing mechanism (such as temporary storage in the data backup area) can be used. Fig.16 The flowchart of the data security writing mechanism shown in the figure is used to maintain that when the program executes data writing normally or an exception occurs in the data writing, the data writing operation will only have two states: the data is completely written and the data is not completely written, so as to avoid other intermediate states that may cause damage to the location where the data is finally written, that is, the data target area.

[0110] Among them, Fig.15 As shown, the system memory (i.e., the system data storage space) includes at least a data backup area, a data target area, and a refresh area list. The data backup area is a temporary storage space corresponding to the data target area. The data backup area is used for temporary storage of data during data writing operations, so that when the data to be written is completely written to the data backup area, the data in the data backup area can be copied to the data target area for storage. It can be understood that this embodiment supports batch data writing, such as Fig.15 As shown, you can use the array form in the data backup area (such as Fig.15 The arrays group0 and groupn corresponding to the data to be written (not specifically limited here) store each piece of data to be written.

[0111] The data to be written refers to the recorded data and files to be stored generated during the use of the application. For example, a social conversation application can generate avatars of conversation objects, pictures buffered or downloaded in the conversation, emoticon packages, etc. during use.

[0112] Specifically, in data application scenarios (e.g., data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (e.g., Fig.14As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0113] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0114] Furthermore, when data needs to be stored, the data can be backed up first (such as Fig.16 The data written as indicated is filled with backup) so that the data can be read or called later, specifically, the data operation interface can be called to temporarily store the data to be written from the target application storage space (for example, the memory when the program is running in a terminal device such as a computer or smart phone, such as random access memory (RAM), etc.) to the data backup area, that is, the data to be written is copied from the target application storage space to the data backup area, so that the data to be written can be better and more securely written from the data backup area to the data target area for storage later.

[0115] In step S102, a corresponding to-be-written mark is set for the data backup area in the refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark;

[0116] In an embodiment of the present application, after the data to be written is temporarily stored in the data backup area, a to-be-written mark can be assigned to the data backup area that temporarily stores the data to be written in the refresh area list to indicate whether the data to be written needs to be written or copied to the data target area for storage, so that the to-be-written mark can be used to better and more accurately detect or judge whether the data to be written has been completely written to the data target area in the subsequent process, so as to maintain the integrity of the data writing.

[0117] Among them, Fig.15As shown, the refresh area list is a data attribute information storage space corresponding to the data target area. The refresh area list is used to record the data attribute information of the to-be-written data temporarily stored in the data backup area. The data attribute information generally includes the to-be-written mark of the to-be-written data temporarily stored in each group (i.e., the data target group) in the data backup area, the target address and length of the to-be-written data. It can be understood that this embodiment supports batch data writing, such as Fig.15 As shown, you can use the array form in the refresh area list (such as Fig.15 The arrays group0 and groupn corresponding to the to-be-written mark, target address and length shown in the figure, which are not specifically limited here, store the to-be-written mark, target address and length corresponding to each to-be-written data.

[0118] Among them, the to-be-written mark is used to indicate whether the to-be-written data temporarily stored in the group of the data backup area needs to be written to the data target area. For example, when the to-be-written mark is set to true, it indicates that the to-be-written data temporarily stored in the group of the data backup area needs to be written or copied to the data target area; conversely, when the to-be-written mark is set to false, it can indicate that the to-be-written data temporarily stored in the group of the data backup area does not need to be written or copied to the data target area, or it can also be used to indicate that the to-be-written data temporarily stored in the group of the data backup area has been copied or written to the data target area.

[0119] Specifically, Fig.16 As shown, after the data to be written is temporarily stored in the data backup area, a to-be-written mark can be assigned to the data backup area temporarily storing the data to be written in the refresh area list. For example, a to-be-written mark (such as Fig.16 The to-be-copied mark of refreshing the backup area list as shown in the figure) may specifically be to set the to-be-written mark to true, to indicate that the to-be-written data needs to be written or copied to the data target area.

[0120] In step S103, the data to be written is copied from the data backup area to the data target area, and the to-be-written mark in the refresh area list is cleared, wherein the data target area is used to store the data to be written;

[0121] In an embodiment of the present application, after setting a corresponding to-be-written mark for the data backup area, the to-be-written data can be copied from the data backup area to the data target area based on the to-be-written mark, and then the to-be-written mark in the refresh area list is cleared to indicate that the to-be-written data temporarily stored in the group of the data backup area has been safely copied or written to the data target area, so as to avoid the situation where the to-be-written data is written repeatedly, thereby reducing the repeated writing operations of the data, and thus the data writing efficiency can be improved to a certain extent.

[0122] Among them, Fig.15 As shown, the data target area refers to the storage location of the data body of the data to be written, that is, the data writing operation refers to finally writing the data to be written into the area, and the data reading operation refers to directly reading the written data from the area.

[0123] It is understandable that, in order to support concurrent access by multiple processes, the city has implemented a method that can divide the data target area into multiple groups, namely data target groups, to provide isolated areas for simultaneous data access by multiple functional modules. Among them, data write operations for different groups can be executed concurrently, while only one process is allowed to operate the data write operation for the same group at the same time. It is understandable that each group of the data target area (i.e., data target group) is assigned a corresponding data backup area, so the data backup area can also be divided into multiple groups, namely, data backup groups.

[0124] Specifically, Fig.16 As shown, after the data to be written is temporarily stored in the data backup area for backup and a to-be-written mark is assigned to the data to be written, the to-be-written mark can be based on the to-be-written mark, for example, the to-be-written mark is set to true to indicate that the data to be written needs to be written or copied to the data target area, so the backed-up data to be written in the data backup area can be copied to the data target area (such as Fig.16 The backed-up data is copied to the data target area as shown in the figure), and then the to-be-written mark corresponding to the backed-up to-be-written data in the refresh area list is cleared (as shown in the figure). Fig.16 The to-be-copied mark of the refresh area list is cleared as shown), for example, the to-be-written mark (such as the to-be-copied mark) corresponding to the backed-up to-be-written data in the refresh area list is set to false, which is used to indicate that the backed-up to-be-written data has been completely written to the data target area.

[0125] In step S104, when it is detected that the data writing operation is abnormally exited, the current to-be-written mark corresponding to the abnormal exit of the data writing operation in the refresh area list is detected;

[0126] In an embodiment of the present application, when it is detected that a data write operation has exited abnormally, the current to-be-written mark corresponding to the abnormal exit of the data write operation in the refresh area list can be detected after the system program is restarted, so that it can be subsequently detected or judged based on the acquired current to-be-written mark whether the to-be-written data corresponding to the current to-be-written mark has been completely written into the data target area, so as to maintain the integrity of the data writing in the data target area.

[0127] Among them, the current mark to be written refers to the mark to be written corresponding to the most recent abnormal exit of the data write operation (for example, after the data to be written is backed up, the data to be written is ready to be copied to the data target area, but due to abnormalities such as program garbled characters, flash back, and excessive load, the data write operation abnormally exits; or, after the data to be written is backed up, the data to be written has been copied to the data target area, but due to abnormalities such as program garbled characters, flash back, and excessive load, the data write operation abnormally exits, and no specific restrictions are made here).

[0128] Specifically, Fig.17 As shown, for example, when the system program is performing a data writing operation, that is, writing the data to be written into the data target area, if the system program has an exception, that is, it can be detected that the data writing operation is abnormally exited, the system program can be restarted. When the system program is restarted (such as Fig.17 After the program abnormal recovery as shown in FIG. 1 , the current to-be-written mark corresponding to the abnormal exit of the most recent data writing operation can be detected in the refresh area list.

[0129] In step S105, if it is detected that there is a current mark to be written, the to-be-written data corresponding to the current mark to be written is copied from the data backup area to the data target area again, and the current mark to be written in the refresh area list is cleared.

[0130] In the embodiment of the present application, when the system program is restarted (such as Fig.17 The program abnormal recovery shown in the figure) detects the current to-be-written mark corresponding to the abnormal exit of the most recent data write operation in the refresh area list, if it is detected that there is a current to-be-written mark, the to-be-written data corresponding to the current to-be-written mark can be copied from the data backup area to the data target area again, and then, the current to-be-written mark in the refresh area list is cleared, so that after the program abnormality occurs, the backed-up to-be-written data can be written again to the data target area to maintain the integrity of the data write in the data target area.

[0131] Specifically, Fig.17As shown, for example, when the system program is performing a data writing operation, that is, writing the data to be written into the data target area, if the system program has an exception, that is, it can be detected that the data writing operation is abnormally exited, the system program can be restarted. When the system program is restarted (such as Fig.17 After the program abnormal recovery as shown in FIG. 1 is recovered), the current to-be-written mark (such as Fig.17 The detection to be copied mark in the refresh area list is true).

[0132] Further, for example, when it is detected in the refresh area list that the current to-be-written mark corresponding to the abnormal exit of the most recent data write operation exists, that is, the current to-be-written mark is set to true, it can be understood that if the current to-be-written mark is set to true, it means that after the abnormality occurs, the to-be-written data corresponding to the current to-be-written mark has been backed up in the data backup area, and the to-be-written data has not been written to the data target area, that is, the data integrity of the data target area may be damaged, so the to-be-written data corresponding to the current to-be-written mark can be copied from the data backup area to the data target area (such as Fig.17 The backed-up data is copied to the data target area as shown in the figure), and then the current to-be-written mark corresponding to the backed-up to-be-written data in the refresh area list is cleared (such as Fig.17 The method as shown in the figure clears the to-be-copied mark in the refresh area list), for example, sets the current to-be-written mark (such as the to-be-copied mark) corresponding to the backed-up to-be-written data in the refresh area list to false, to indicate that the to-be-written data corresponding to the current to-be-written mark has been completely written into the data target area.

[0133] On the contrary, for example, when it is detected in the refresh area list that the current to-be-written mark corresponding to the abnormal exit of the most recent data write operation does not exist, that is, the current to-be-written mark is set to false. It can be understood that if the current to-be-written mark is set to false, it means that after the abnormality occurs, the to-be-written data that has been backed up in the data backup area has been written to the data target area, that is, the data integrity of the data target area has not been destroyed, so there is no need to perform a recovery operation to rewrite the data.

[0134] In an embodiment of the present application, a data processing method is provided. Through the above method, a data security write mechanism can be used to copy the data to be written from the application program memory to the data backup area, and the data to be written from the data backup area to the data target area to achieve complete data writing. Then, combined with the recovery mechanism, after a program exception occurs, the integrity of the data to be written corresponding to the current to-be-written mark can be rewritten into the data target area. This can not only meet the high reliability requirements of data operations in the cloud environment, that is, maintain the integrity of data writing, but also improve the data access speed by using memory to access data, thereby reducing the latency of smart network card data reading and writing.

[0135] Optionally, in the above Figure 2 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 3 As shown, before step S102 sets a corresponding to-be-written mark for the data backup area in the refresh area list, the method further includes:

[0136] In step S301, data target area information corresponding to the data to be written is obtained, wherein the data target area information at least includes a data target area address and a length, wherein the data target area address is used to indicate an address where the data to be written is written to the data target area, and the length is used to indicate the data length of the data to be written to the data target area;

[0137] In step S302, the data target area address and length are updated into the refresh area list.

[0138] In an embodiment of the present application, after the data to be written is temporarily stored in the data backup area, the data target area address and length corresponding to the data to be written can be obtained, and then the data target area address and length can be updated to the refresh area list, that is, the data target area information of the backed-up data to be written is recorded in the refresh area list, so that the data to be written can be accurately and quickly written to the location of the data target area according to the data target area address and length recorded in the refresh area list, so as to maintain the integrity of the data writing.

[0139] Among them, Fig.15 As shown, the refresh area list is a data attribute information storage space corresponding to the data target area. The refresh area list is used to record the data attribute information of the to-be-written data temporarily stored in the data backup area. The data attribute information generally includes the to-be-written mark of the to-be-written data temporarily stored in each group (i.e., the data target group) in the data backup area, the target address and length of the to-be-written data. It can be understood that this embodiment supports batch data writing, such as Fig.15As shown, you can use the array form in the refresh area list (such as Fig.15 The arrays group0 and groupn corresponding to the to-be-written mark, target address and length shown in the figure, which are not specifically limited here, store the to-be-written mark, target address and length corresponding to each to-be-written data.

[0140] The target area address (such as Fig.15 The target address array shown in FIG. 1 represents the address of the data to be written that is temporarily stored in the data backup area and needs to be written to the data target area. Fig.15 The length array shown in the figure) represents the data length of the to-be-written data temporarily stored in the group of the data backup area that needs to be written to the data target area.

[0141] Specifically, Fig.16 As shown, after the data to be written is temporarily stored in the data backup area, the data target area address and length corresponding to the data to be written can be obtained from the file header of the data to be written, and then the data target area address and length can be updated to the refresh area list, that is, the data target area information of the data to be written (that is, the data target area address and length) is recorded in the refresh area list, and at the same time, a to-be-written mark is allocated to the data backup area that temporarily stores the data to be written in the refresh area list. For example, a to-be-written mark (such as Fig.16 The to-be-copied mark of refreshing the backup area list as shown in the figure) may specifically be to set the to-be-written mark to true, to indicate that the to-be-written data needs to be written or copied to the data target area.

[0142] Optionally, in the above Figure 3 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 4 As shown, step S103 copies the data to be written from the data backup area to the data target area, and clears the to-be-written mark in the refresh area list, including:

[0143] In step S401, the data to be written is copied from the data backup area to the data target area corresponding to the data target area address and length, and the to-be-written mark in the refresh area list is cleared.

[0144] In an embodiment of the present application, after setting a corresponding to-be-written mark for the data backup area and updating the data target area address and length in the refresh area list, the to-be-written data can be copied from the data backup area to the data target area corresponding to the data target area address and length based on the to-be-written mark, and then the to-be-written mark in the refresh area list is cleared to indicate that the to-be-written data temporarily stored in the group of the data backup area has been safely copied or written to the data target area, so as to avoid the situation where the to-be-written data is written repeatedly, so as to reduce the repeated writing operation of the data, thereby improving the data writing efficiency to a certain extent.

[0145] Specifically, Fig.16 As shown, after setting the corresponding to-be-written mark for the data backup area and updating the data target area address and length in the refresh area list, the address to which the to-be-written data temporarily stored in the group of the data backup area needs to be written to the data target area can be determined according to the data target area address in the refresh area list (for example, the address of data group A in the data target area), and the data length (for example, 50KB) to which the to-be-written data temporarily stored in the group of the data backup area needs to be written to the data target area can be determined according to the length.

[0146] Furthermore, based on the to-be-written mark, for example, the to-be-written mark is set to true to indicate that the to-be-written data needs to be written or copied to the data target area, so the to-be-written data backed up in the data backup area can be quickly and accurately copied to the data target area corresponding to the address and length of the data target area (such as Fig.16 The backed-up data is copied to the data target area as shown in the figure), and then the to-be-written mark corresponding to the backed-up to-be-written data in the refresh area list is cleared (as shown in the figure). Fig.16 The to-be-written mark of the refresh area list is cleared as shown), for example, the to-be-written mark (such as the to-be-written mark) corresponding to the backed-up to-be-written data in the refresh area list is set to false, which is used to indicate that the backed-up to-be-written data has been completely written to the data target area (for example, the address of data group A in the data target area).

[0147] Optionally, in the above Figure 2 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 5 As shown, the data operation interface includes a data access space application interface; step S101 copies the data to be written from the target application storage space to the data backup area through the data operation interface, and the method further includes:

[0148] In step S501, a data target area, a data backup area corresponding to the data target area, and a refresh area list are divided in the system data storage space through a data access space application interface;

[0149] In step S502, based on the process types supported by the system, the data target area is divided into N data target groups, and the data backup area is divided into N data backup groups corresponding to the N data target groups, where N is an integer greater than or equal to 1.

[0150] In an embodiment of the present application, before copying the data to be written from the target application storage space to the data backup area, the data target area, the data backup area corresponding to the data target area, and the refresh area list can be divided in the system data storage space through the data access space application interface. Then, based on the process types supported by the system, the data target area can be divided into N data target groups, and the data backup area can be divided into N data backup groups corresponding to the N data target groups. This can support concurrent access by multiple processes, that is, it can support concurrent execution of data write operations for multiple data to be written of different process types, so as to realize secure data writing of multiple data to be written of different process types, thereby improving the efficiency of data access to a certain extent.

[0151] It is understandable that in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (such as Fig.14 As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0152] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0153] Among them, the data access space application interface is used to apply for a certain size (a default value can be assigned according to the application type, and can also be set according to actual application requirements, and there is no specific restriction here) of data access space from the system memory (i.e., the system data storage space) by using this interface (i.e., the operation triggered by the data access space application interface will apply for an area of ​​a specified size in the system memory as the data target area). It can be understood that the data access space application interface needs to be called before data reading, writing and data recovery operations.

[0154] Specifically, before copying the data to be written from the target application storage space to the data backup area, the application can first apply for a certain size of data access space from the system memory (i.e., the system data storage space) through the data access space application interface as the data target area (e.g., Fig.15 The data target area is shown in the figure, i.e. Fig.15 As shown, a data target area of ​​a specified size is divided in the system memory (i.e., the system data storage space), and at the same time, a data backup area corresponding to the data target area is divided in the system memory (for example, the data backup area space size may be less than or equal to the data target area space size) and a refresh area list.

[0155] Furthermore, it can support concurrent access by multiple processes. Therefore, this embodiment can divide the data target area into N data target groups based on the process types supported by the system, and divide the data backup area into N data backup groups corresponding to the N data target groups, to support the simultaneous and concurrent execution of data write operations for multiple data to be written of N different process types, so as to realize the safe data writing and storage of multiple data to be written of N different process types in the data target area.

[0156] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 6 As shown, the data operation interface also includes a data security write interface; step S101 copies the data to be written from the target application storage space to the data backup area through the data operation interface, including: step S601; step S102 includes: step S602; step S103 includes: step S603 to step S604;

[0157] In step S601, if K interface call requests of different process types are concurrently received through the data security write interface, K to-be-written data corresponding to the K different process types are copied from the target application storage space to K data backup groups, where K is an integer less than or equal to N;

[0158] In step S602, K corresponding to-be-written marks are set for the K data backup groups in the refresh area list;

[0159] In step S603, K to-be-written data corresponding to K different process types are copied from K data backup groups to K data target groups corresponding to K data target area addresses and lengths;

[0160] In step S604, K to-be-written marks corresponding to K data target groups in the refresh area list are cleared.

[0161] In an embodiment of the present application, if there are multiple data to be written of different types of processes that need to be written concurrently at the same time, K interface call requests of different process types of the data security write interface can be first issued to the system, so that the system can concurrently receive interface call requests of K different process types, and then, the data security write interface can be called to copy the K data to be written corresponding to the K different process types from the target application storage space to K data backup groups, and set corresponding K to-be-written marks for the K data backup groups in the refresh area list, and at the same time, obtain the K target area addresses and K lengths corresponding to the K data to be written, and then, the K data to be written corresponding to the K different process types can be copied from the K data backup groups to the K data target area addresses and K data target groups corresponding to the lengths, thereby realizing concurrent data access by multiple processes.

[0162] It is understandable that in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (such as Fig.14 As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0163] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0164] The data security write interface is used to securely write data into the data access space (i.e., the data target area) by using the interface. The function provided by the data security write interface is used to ensure the integrity of data writing, so that the data writing operation has only two results: completely writing to the data target area and not writing to the data target area at all, so as to avoid other intermediate states that cause the data to not be completely written (such as partially or partially written) to the data target area, resulting in incomplete data in the data target area.

[0165] Specifically, if there are multiple to-be-written data of different types of processes that need to be written concurrently, K call requests of the data security write interface can be sent to the system first, so that the system can concurrently receive the interface call requests of K different process types, and then call the data security write interface to fill and back up the K to-be-written data corresponding to the K different process types (such as Fig.16 The data is written to fill the backup) so that the data can be read or called later, specifically, by calling the data security write interface, the K data to be written corresponding to K different process types are copied from the target application storage space to K data backup groups for backup, so that the data to be written can be better and more accurately written from the data backup group to the data target area for storage later.

[0166] Furthermore, if Fig.16 As shown, after temporarily storing the data to be written in the data backup area, corresponding K to-be-written marks can be set for the K data backup groups in the refresh area list. For example, K to-be-written marks are set for the K data backup groups that temporarily store the K to-be-written data in the refresh area list (such as Fig.16 The setting shown is to refresh the to-be-copied mark of the backup area list, which can specifically be to set the K to-be-written marks corresponding to the K data backup groups to true, to indicate that the K to-be-written data need to be concurrently written or copied to the K data target groups.

[0167] At the same time, the K target area addresses and K lengths corresponding to the K data to be written are recorded or updated in the refresh area list. Then, the addresses of the K data to be written temporarily stored in the K data backup groups that need to be written to the data target area (for example, the addresses of data target group A to data target group K in the data target area) can be determined according to the K target area addresses in the refresh area list, and the K data lengths (for example, K lengths of 100KB) of the K data to be written temporarily stored in the K data backup groups that need to be written to the data target area can be determined according to the K lengths.

[0168] Furthermore, based on the K to-be-written marks, for example, the K to-be-written marks are all set to true, which indicates that the K to-be-written data need to be written or copied to the K data target groups in the data target area. Therefore, the K to-be-written data that have been backed up in the K data backup groups can be quickly and accurately copied to the K data target groups corresponding to the addresses and lengths of the K data target areas (such as Fig.16 The backed-up data is copied to the data target area as shown in the figure), and then the K to-be-written marks corresponding to the backed-up K to-be-written data in the refresh area list are cleared (as shown in the figure). Fig.16 The method as shown in the figure clears the to-be-copied marks in the refresh area list), for example, sets the K to-be-written marks (such as to-be-copied marks) corresponding to the backed-up K to-be-written data in the refresh area list to false, to indicate that the backed-up K to-be-written data have been completely written to the data target area (for example, the addresses of data target group A to data target group K in the data target area).

[0169] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 7 As shown, the data operation interface also includes a data security write interface; step S101 copies the data to be written from the target application storage space to the data backup area through the data operation interface, including: step S701; step S102 includes: step S702; step S103 includes: step S703 to step S704;

[0170] In step S701, if K interface call requests of the same process type are concurrently received through the data security write interface, K data security write operations are performed sequentially, each time copying a to-be-written data corresponding to the same process type from the target application storage space to the same data backup group, where K is an integer less than or equal to N;

[0171] In step S702, a pending-write mark is set for each data backup group in the refresh area list in turn;

[0172] In step S703, one to-be-written data corresponding to the same process type is copied from the data backup group to the data target group corresponding to the data target area address and length, until K to-be-written data of K same process types are copied to the data target group;

[0173] In step S704, K to-be-written marks corresponding to the data target groups in the refresh area list are cleared in sequence.

[0174] In an embodiment of the present application, if there are multiple data to be written of the same type of processes at the same time, K interface call requests of the same process type of the data security write interface can be first issued to the system, so that the system can concurrently receive K interface call requests of the same process type. However, since only one process is allowed to perform the data write operation on the same group at the same time, for K data to be written of the same process type, only one process type can be executed at the same time to perform the data write operation on the data to be written. That is, the data security write interface can be called to copy the K data to be written corresponding to the K processes of the same type from the target application storage space to the same data backup group in turn, and set the corresponding K to-be-written marks for the data backup group in the refresh area list in turn. At the same time, one data to be written is backed up each time to obtain the target area address and length corresponding to each data to be written. Then, the K data to be written corresponding to the K processes of the same type can be copied K times from the same data backup group to the same data target group corresponding to the data target area address and length in turn.

[0175] It is understandable that in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (such as Fig.14 As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0176] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0177] Specifically, if there are multiple data to be written of the same type of processes that need to be written, K interface call requests of the same process type of the data security write interface can be sent to the system first, so that the system can concurrently receive K interface call requests of the same process type. Furthermore, since only one process is allowed to perform an operation on the data write operation of the same group at the same time, for K data to be written of the same process type, only one process type can be executed to perform a data write operation on the data to be written at the same time, that is, the data security write interface can be called to perform K times of padding and backup of the K data to be written corresponding to the K processes of the same type in turn (such as Fig.16 The data writing filling backup indicated above) can be specifically called by calling the data security writing interface to copy K to-be-written data corresponding to K processes of the same process type from the target application storage space K times to the same data backup group for backup, so that the to-be-written data can be subsequently better and more accurately written from the data backup group to the data target area for storage.

[0178] Furthermore, if Fig.16 As shown, each time after the data to be written is temporarily stored in the same data backup group, a corresponding to-be-written mark is set for the data backup group in the refresh area list each time. After K times, K to-be-written marks are set. For example, each time in the refresh area list, a to-be-written mark is set for the same data backup group that temporarily stores the data to be written (such as Fig.16 The setting to refresh the to-be-copied mark of the backup area list as indicated can specifically be to set the to-be-written mark corresponding to the data backup group to true, and set it K times to indicate that the K to-be-written data need to be written or copied to the same data target group in sequence.

[0179] At the same time, each time a data write operation is performed, the target area address and length corresponding to the data to be written are recorded or updated in the refresh area list. Then, the address to which the data to be written temporarily stored in the data backup group needs to be written to the data target area (for example, the address of data target group A in the data target area) can be determined based on the target area address in the refresh area list, and the data length to which the data to be written temporarily stored in the data backup group needs to be written to the data target area can be determined based on the length (for example, a length of 50KB).

[0180] Furthermore, based on the K to-be-written marks, for example, the K to-be-written marks are set to true in sequence, indicating that the K to-be-written data need to be written or copied to the same data target group in the data target area in sequence. Therefore, when the data writing operation is performed, the to-be-written data that has been backed up in the data backup group can be quickly and accurately copied to the data target group corresponding to the address and length of the data target area (e.g. Fig.16 The backed-up data is copied to the data target area as shown in the figure), and then the to-be-written mark corresponding to the backed-up to-be-written data in the refresh area list is cleared (as shown in the figure). Fig.16 The to-be-written mark of the refresh area list is cleared as shown), for example, the to-be-written mark (such as the to-be-written mark) corresponding to the backed-up data to be written in the refresh area list is set to false, which is used to indicate that the backed-up data to be written has been completely written to the data target area (for example, the address of the data target group A in the data target area). Similarly, for the subsequent K-1 data to be written, the backed-up data to be written in the data backup group is repeatedly copied quickly and accurately to the data target group corresponding to the address and length of the data target area, and the to-be-written mark corresponding to the backed-up data to be written in the refresh area list is cleared, so as to realize that K to-be-written data of the same process type are completely written to the same data target group.

[0181] Optionally, in the above Figure 6 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Figure 8 As shown, step S602 sets corresponding K to-be-written marks for K data backup groups in the refresh area list, including: step S801 to step S802; step S604 includes: step S803;

[0182] In step S801, K to-be-written marks are allocated to K data backup groups in the refresh area list;

[0183] In step S802, K to-be-written flags are respectively set to true;

[0184] In step S803, K to-be-written marks corresponding to K data target groups in the refresh area list are set to false.

[0185] In an embodiment of the present application, if there are multiple data to be written of different types of processes that need to be written concurrently, K call requests for the data security write interface can be first issued to the system, so that the system can concurrently receive interface call requests of K different process types, and then, the data security write interface can be called to copy the K data to be written corresponding to the K different process types from the target application storage space to the K data backup groups, and then, K to-be-written marks are assigned to the K data backup groups in the refresh area list, and the K to-be-written marks are set to true respectively. At the same time, the K target area addresses and K lengths corresponding to the K data to be written are obtained, and the K data to be written corresponding to the K different process types can be copied from the K data backup groups to the K data target area addresses and lengths. K to-be-written marks corresponding to the K data target groups in the refresh area list are set to false, thereby realizing concurrent data access by multiple processes.

[0186] Specifically, if there are multiple to-be-written data of different types of processes that need to be written concurrently, K call requests of the data security write interface can be sent to the system first, so that the system can concurrently receive the interface call requests of K different process types, and then call the data security write interface to fill and back up the K to-be-written data corresponding to the K different process types (such as Fig.16 The data is written to fill the backup) so that the data can be read or called later, specifically, by calling the data security write interface, the K data to be written corresponding to K different process types are copied from the target application storage space to K data backup groups for backup, so that the data to be written can be better and more accurately written from the data backup group to the data target area for storage later.

[0187] Furthermore, if Fig.16 As shown, after temporarily storing the data to be written in the data backup area, K to-be-written marks can be allocated to the K data backup groups in the refresh area list, and the K to-be-written marks (such as Fig.16 The illustrated setting refreshes the to-be-copied flags of the backup area list and sets them to true, respectively, to indicate that the K to-be-written data need to be concurrently written or copied to K data target groups.

[0188] At the same time, the K target area addresses and K lengths corresponding to the K data to be written are recorded or updated in the refresh area list. Then, the addresses of the K data to be written temporarily stored in the K data backup groups that need to be written to the data target area (for example, the addresses of data target group A to data target group K in the data target area) can be determined according to the K target area addresses in the refresh area list, and the K data lengths (for example, K lengths of 100KB) of the K data to be written temporarily stored in the K data backup groups that need to be written to the data target area can be determined according to the K lengths.

[0189] Furthermore, based on the K to-be-written marks, for example, the K to-be-written marks are all set to true, which indicates that the K to-be-written data need to be written or copied to the K data target groups in the data target area. Therefore, the K to-be-written data that have been backed up in the K data backup groups can be quickly and accurately copied to the K data target groups corresponding to the addresses and lengths of the K data target areas (such as Fig.16 The backed-up data is copied to the data target area as shown in the figure), and then the K to-be-written marks corresponding to the backed-up K to-be-written data in the refresh area list are cleared (as shown in the figure). Fig.16 For example, the K to-be-written marks (such as the to-be-copied marks) corresponding to the backed-up K to-be-written data in the refresh area list are set to false, indicating that the backed-up K to-be-written data have been completely written to the data target area (for example, the addresses of data target group A to data target group K in the data target area), and then, the K to-be-written marks (such as the to-be-copied marks) corresponding to the backed-up K to-be-written data in the refresh area list are cleared. Fig.16 The method as shown in the figure clears the to-be-copied marks in the refresh area list), for example, sets the K to-be-written marks (such as to-be-copied marks) corresponding to the backed-up K to-be-written data in the refresh area list to false, to indicate that the backed-up K to-be-written data have been completely written to the data target area (for example, the addresses of data target group A to data target group K in the data target area).

[0190] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Fig. 9 As shown, if it is detected that there is a current to-be-written mark, S105 copies the to-be-written data corresponding to the current to-be-written mark from the data backup area to the data target area again, and clears the current to-be-written mark in the refresh area list, including:

[0191] In step S901, if it is detected that the current to-be-written mark is true, the data corresponding to the current to-be-written mark is regarded as unsuccessfully written data;

[0192] In step S902, the unsuccessfully written data is copied from the data backup group to the data target group corresponding to the data target area address and length;

[0193] In step S903, the current pending-write flag in the refresh area list is set to false.

[0194] In the embodiment of the present application, when the system program is restarted (such as Fig.17 The program abnormal recovery shown in the figure) detects the current to-be-written mark corresponding to the abnormal exit of the most recent data write operation in the refresh area list, and if the current to-be-written mark is detected to be true, the data corresponding to the current to-be-written mark can be treated as unsuccessfully written data, and then the unsuccessfully written data corresponding to the current to-be-written mark is copied from the data backup area to the data target area again, and then the current to-be-written mark in the refresh area list is cleared, that is, the current to-be-written mark in the refresh area list is set to false, so that after the program abnormality occurs, the backed-up to-be-written data can be written to the data target area again to maintain the integrity of the data write in the data target area.

[0195] Specifically, Fig.17 As shown, for example, when the system program is performing a data writing operation, that is, writing the data to be written into the data target area, if the system program has an exception, that is, it can be detected that the data writing operation is abnormally exited, the system program can be restarted. When the system program is restarted (such as Fig.17 After the program abnormal recovery as shown in FIG. 1 is recovered), the current to-be-written mark (such as Fig.17 The detection to be copied mark in the refresh area list is true).

[0196] Further, for example, when the most recent data write operation is detected to have exited abnormally in the refresh area list, the current mark to be written is detected to be true. It can be understood that if the current mark to be written is detected to be true, it means that after the abnormality occurs, the data to be written corresponding to the current mark to be written has been backed up in the data backup area, and the data to be written has not been written to the data target area, that is, the data integrity of the data target area may be damaged, so the data to be written corresponding to the current mark to be written can be regarded as unsuccessfully written data.

[0197] Further, based on the current to-be-written mark, the unsuccessfully written data is copied from the data backup group to the data target group (eg Fig.17 The backed-up data is copied to the data target area as shown in the figure), and then the current to-be-written mark corresponding to the backed-up to-be-written data in the refresh area list is cleared (such as Fig.17 The method as shown in the figure clears the to-be-copied mark of the refresh area list), for example, sets the current to-be-written mark (such as the to-be-copied mark) corresponding to the backed-up to-be-written data in the refresh area list to false, to indicate that the unsuccessfully written data corresponding to the current to-be-written mark has been completely written into the data target group.

[0198] On the contrary, for example, when it is detected in the refresh area list that the current to-be-written mark corresponding to the abnormal exit of the most recent data write operation does not exist, that is, the current to-be-written mark is set to false. It can be understood that if the current to-be-written mark is set to false, it means that after the abnormality occurs, the to-be-written data that has been backed up in the data backup area has been written to the data target area, that is, the data integrity of the data target area has not been destroyed, so there is no need to perform a recovery operation to rewrite the data.

[0199] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Fig.10 As shown, the data operation interface also includes a data reading interface; after step S502 divides the data target area into N data target groups based on the process type supported by the system, and divides the data backup area into N data backup groups corresponding to the N data target groups, the method further includes:

[0200] In step S1001, through the data security write interface, M test write data of M different process types are copied from M data backup groups to M data target groups in sequence, where M is an integer less than or equal to N;

[0201] In step S1002, M test read data are read from M data target groups in sequence through a data read interface;

[0202] In step S1003 , if the test read data read each time is consistent with the corresponding test write data, it is determined that the data access test is normal.

[0203] In an embodiment of the present application, in order to maintain the stability and effectiveness of the data security write mechanism and the data recovery mechanism in actual applications, the present embodiment can perform performance tests on the data security write mechanism and the data recovery mechanism respectively after dividing the data target area into N data target groups and dividing the data backup area into N data backup groups corresponding to the N data target groups. That is, through the data security write interface, M test write data of M different process types can be copied from the M data backup groups to the M data target groups in turn, and then through the data read interface, M test read data can be read from the M data target groups in turn. Then, if the test read data read each time is consistent with the corresponding test write data, it is determined that the data access test is normal, that is, data access can be stably and safely performed through the data security write mechanism to improve the reliability of data access.

[0204] It is understandable that in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (such as Fig.14 As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0205] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0206] The data reading interface is used to read data from the data target area by using the interface.

[0207] Specifically, Fig.17 As shown in the left figure, after the data target area is divided into N data target groups, and the data backup area is divided into N data backup groups corresponding to the N data target groups, the performance test of the data security write mechanism is performed. Specifically, the M test write data of M different process types can be copied from the M data backup groups to the M data target groups in sequence through the data security write interface. For example, Fig.17 As shown in the left figure, 1000 test write data can be copied from the data backup area to different data target groups (ie, different locations) in 1000 times.

[0208] Further, after each test write data is stored in the data target group, the M test read data can be read from the M data target groups in sequence through the data read interface, for example, Fig.17 As shown in the left figure, each time from a different data target group, the test write data written in the data target group is read to obtain the test read data, so 1000 test read data can be read in sequence.

[0209] Furthermore, the test read data read each time can be compared with the corresponding test write data. If the test read data read each time is consistent with the corresponding test write data, it means that the data security write mechanism has stable performance and can access data with high reliability, so it can be determined that the data access test is normal.

[0210] Optionally, in the above Fig.10 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Fig.11 As shown, after step S1001 copies M test write data of M different process types from M data backup groups to M data target groups in sequence through the data security write interface, the method further includes:

[0211] In step S1101 , the test write time consumed for each test write data writing is recorded, and the average test write time for writing the test write data is calculated based on the M test write times.

[0212] In an embodiment of the present application, in order to achieve high-speed reading and writing of memory access data, the data access rate or delay can be tested. Therefore, after M test write data of M different process types are copied from M data backup groups to M data target groups in sequence, the test write time consumed for each writing of the test write data can be recorded, and the average test write time for writing the test write data can be calculated based on the M test write times, so that the data access test delay can be better judged based on the average test write time of the test write data.

[0213] Specifically, Fig.17 As shown in the left figure, in the process of copying M test write data of M different process types from M data backup groups to M data target groups in sequence, for example, in the process of copying 1000 test write data from the data backup area to different data target groups (i.e., different locations) in 1000 times, the time consumed for each test write data to be completely written to the data target group can be recorded, i.e., the test write time.

[0214] Furthermore, the average test write time for writing test write data can be calculated based on M test write times. For example, 1000 test write data can be copied 1000 times from the data backup area to different data target groups (i.e., different locations), and the 1000 test write times corresponding to the times are added up. Then, the sum of the 1000 test write times is divided by 1000, and the quotient obtained is the average test write time.

[0215] Optionally, in the above Fig.11 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Fig.12 As shown, after step S1002 reads M test read data from M data target groups in sequence through the data read interface, the method further includes:

[0216] In step S1201, the test read time consumed for each test read data reading is recorded, and the average test read time for reading the test read data is calculated based on the M test read times;

[0217] In step S1202, if the average test write time is less than the write time threshold, and the average test read time is less than the read time threshold, it is determined that the data access test latency satisfies the data read and write latency threshold.

[0218] In an embodiment of the present application, in order to achieve high-speed reading and writing of memory access data, the data access rate or delay can be tested. Therefore, after reading M test read data from M data target groups in sequence, the test read time consumed for each reading of the test read data can be recorded, and the average test read time for reading the test read data can be calculated based on the M test read times, so that the data access test delay can be better judged based on the average test read time of the test read data.

[0219] Specifically, Fig.17 As shown in the left figure, in the process of reading M test read data from M data target groups in sequence, for example, each time from a different data target group, the test write data that has been written to the data target group is read to obtain the test read data, and 1000 test read data can be read in sequence, so the time consumed to completely read the test read data from the data target group each time can be recorded, that is, the test read time.

[0220] Furthermore, the average test read time for reading the test read data can be calculated based on M test read times. For example, 1000 test read times corresponding to 1000 test read data read from different data target groups (i.e., different locations) can be added up, and then the sum of the 1000 test read times is divided by 1000. The quotient obtained is the average test read time.

[0221] Furthermore, the average test write time can be compared with the write time threshold, and the average test read time can be compared with the read time threshold. If the average test write time is less than the write time threshold, and the average test read time is less than the read time threshold, then it means that the data access test delay of the memory access data is less than the data read and write delay threshold, that is, the data read and write delay threshold is met, which means that relative to the delay of hard disk data reading and writing (millisecond level), the memory data reading and writing of this embodiment can achieve a delay of nanosecond level. Therefore, in the smart network card software and hardware related data access scenario with high latency requirements, using memory to access data can meet the low latency requirements.

[0222] Optionally, in the above Fig.10 Based on the corresponding embodiment, in another optional embodiment of the data processing method provided in the embodiment of the present application, as Fig.13 As shown, the data operation interface also includes a data recovery interface; after step S1001, through the data security write interface, M test write data of M different process types are copied from M data backup groups to M data target groups in sequence, the method also includes:

[0223] In step S1301, the fault data of abnormal program exit is injected into the data backup area;

[0224] In step S1302, P unwritten test data corresponding to the fault data are obtained through the data recovery interface, where P is an integer less than or equal to M;

[0225] In step S1303, the P unwritten test data are copied from the P data backup groups to the P data target groups in sequence;

[0226] In step S1304, P test read data are read from P data target groups in sequence through the data read interface;

[0227] In step S1305 , if the test read data read each time is consistent with the corresponding unwritten test data, it is determined that the data recovery test is normal.

[0228] In an embodiment of the present application, in order to maintain the stability and effectiveness of the data security write mechanism and the data recovery mechanism in actual applications, the present embodiment can perform performance tests on the data security write mechanism and the data recovery mechanism respectively after dividing the data target area into N data target groups and dividing the data backup area into N data backup groups corresponding to the N data target groups. That is, the fault data of the abnormal program exit can be injected into the data backup area, and then the P unwritten test data corresponding to the fault data can be obtained through the data recovery interface. Then, the P unwritten test data are copied from the P data backup groups to the P data target groups in turn, and then, the P test read data are read from the P data target groups in turn through the data read interface. If the test read data read each time is consistent with the corresponding unwritten test data, it is determined that the data recovery test is normal, that is, the data recovery can be stably and safely performed through the data recovery mechanism to improve the reliability of data access.

[0229] It is understandable that in data application scenarios (for example, data transmission scenarios, virtual switching scenarios, data security scenarios, and data storage scenarios), smart network cards generally include functional modules that support smart network card features (such as Fig.14 As shown in the figure, virtualization configuration function, network traffic detection, network fault diagnosis, etc.), these functional modules usually involve a large amount of software and hardware related data, so these data need to be securely accessed to maintain the stability of the smart network card.

[0230] Therefore, if Fig.14 As shown, the data operation interface of the application layer can be configured first (such as data access space application interface, data security writing interface, data reading interface and data recovery interface, etc., which are not specifically limited here) to provide the upper-level functional module with data access space application function, data writing function, data reading function, data abnormality recovery function, etc., wherein each function has a corresponding data operation interface to provide to the upper-level functional module for calling.

[0231] The data recovery interface is used to recover the data that was not written (i.e., the data that was not successfully written) after the last abnormal exit (i.e., the most recent abnormal exit of the data writing operation) by using the interface. The function provided by the data recovery interface is used to automatically detect whether there is any unwritten data (i.e., the data that was not successfully written) when the program last exited (i.e., the most recent abnormal exit of the data writing operation). If there is, the unwritten data (i.e., the data that was not successfully written) will continue to be written into the data target area.

[0232] Specifically, Fig.17As shown in the right figure, after the data target area is divided into N data target groups, and the data backup area is divided into N data backup groups corresponding to the N data target groups, the performance test of the data recovery mechanism is performed, specifically, the fault data of abnormal program exit can be injected into the data backup area, for example, Fig.17 As shown in the figure on the right, while executing the data write operation, fault code or data is injected into the program to cause the data write operation to exit abnormally.

[0233] Furthermore, when the program is restarted, the P unwritten test data corresponding to the fault data can be obtained through the data recovery interface. Specifically, the written test data corresponding to each abnormal exit of the data writing operation can be obtained. Then, the P unwritten test data can be copied from the P data backup groups to the P data target groups in sequence. For example, Fig.17 As shown in the right figure, assuming that there are 300 unwritten test data, the 300 unwritten test data can be copied from the data backup area to different data target groups (ie, different locations) in 300 times.

[0234] Further, after each time the unwritten test data is stored in the data target group, the P test read data can be read from the P data target groups in sequence through the data read interface, for example, Fig.17 As shown in the right figure, each time, the unwritten test data that has been rewritten in the data target group is read from a different data target group to obtain the test read data, so 300 test read data can be read in sequence.

[0235] Furthermore, the test read data read each time can be compared with the corresponding unwritten test data. If the test read data read each time is consistent with the corresponding unwritten test data, then this indicates that the unwritten test data can be safely rewritten to the data target area, that is, the data recovery mechanism can recover the unwritten data, indicating that the data recovery mechanism has stable performance and can perform data recovery with high reliability, so it can be determined that the data recovery test is normal.

[0236] The following is a detailed description of the data processing device in this application. Fig.19 , Fig.19 This is a schematic diagram of an embodiment of a data processing device in an embodiment of the present application. The data processing device 20 includes:

[0237] The processing unit 201 is used to copy the data to be written from the target application storage space to the data backup area through the data operation interface, wherein the data backup area is used to temporarily store the data to be written;

[0238] An acquisition unit 202 is used to set a corresponding to-be-written mark for the data backup area in a refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark;

[0239] The processing unit 201 is further used to copy the data to be written from the data backup area to the data target area, and clear the to-be-written mark in the refresh area list, wherein the data target area is used to store the data to be written;

[0240] The acquisition unit 202 is further configured to detect a current to-be-written mark corresponding to the abnormal exit of the data writing operation in the refresh area list when it is detected that the data writing operation is abnormally exited;

[0241] The processing unit 201 is further configured to, if a current to-be-written mark is detected, copy the to-be-written data corresponding to the current to-be-written mark from the data backup area to the data target area again, and clear the current to-be-written mark in the refresh area list.

[0242] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0243] The acquisition unit 202 is further used to acquire data target area information corresponding to the data to be written, wherein the data target area information at least includes a data target area address and a length, wherein the data target area address is used to indicate an address where the data to be written is written to the data target area, and the length is used to indicate a data length of the data to be written to the data target area;

[0244] The processing unit 201 is further configured to update the data target area address and length into the refresh area list.

[0245] Optionally, in the above Fig.19 On the basis of the corresponding embodiment, in another embodiment of the data processing device provided in the embodiment of the present application, the processing unit 201 can be specifically used for:

[0246] The data to be written is copied from the data backup area to the data target area corresponding to the data target area address and length, and the to-be-written mark in the refresh area list is cleared.

[0247] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0248] The processing unit 201 is further used to divide the data target area, the data backup area corresponding to the data target area and the refresh area list in the system data storage space through the data access space application interface;

[0249] The processing unit 201 is further used to divide the data target area into N data target groups based on the process types supported by the system, and divide the data backup area into N data backup groups corresponding to the N data target groups, where N is an integer greater than or equal to 1.

[0250] Optionally, in the above Fig.19 On the basis of the corresponding embodiment, in another embodiment of the data processing device provided in the embodiment of the present application, the processing unit 201 can be specifically used for:

[0251] If K interface call requests of different process types are concurrently received through the data security write interface, the K to-be-written data corresponding to the K different process types are copied from the target application storage space to K data backup groups, where K is an integer less than or equal to N;

[0252] The acquisition unit 202 may be specifically used for:

[0253] In the refresh area list, set corresponding K to-be-written marks for the K data backup groups;

[0254] The processing unit 201 may be specifically used for:

[0255] Copying K to-be-written data corresponding to K different process types from K data backup groups to K data target groups corresponding to K data target area addresses and lengths;

[0256] Clear the K to-be-written marks corresponding to the K data target groups in the refresh area list.

[0257] Optionally, in the above Fig.19 On the basis of the corresponding embodiment, in another embodiment of the data processing device provided in the embodiment of the present application, the processing unit 201 can be specifically used for:

[0258] If K interface call requests of the same process type are concurrently received through the data security write interface, K data security write operations are performed in sequence, each time copying a to-be-written data corresponding to the same process type from the target application storage space to the same data backup group, where K is an integer less than or equal to N;

[0259] The acquisition unit 202 may be specifically used for:

[0260] Set a pending write mark for each data backup group in the refresh area list in turn;

[0261] The processing unit 201 may be specifically used for:

[0262] Sequentially copying a to-be-written data corresponding to a same process type from the data backup group to the data target group corresponding to the data target area address and length, until K to-be-written data of K same process types are copied to the data target group;

[0263] Clear the K to-be-written marks corresponding to the data target groups in the refresh area list in sequence.

[0264] Optionally, in the above Fig.19 On the basis of the corresponding embodiment, in another embodiment of the data processing device provided in the embodiment of the present application, the acquisition unit 202 can be specifically used for:

[0265] Allocate K to-be-written marks to K data backup groups in the refresh area list;

[0266] Set K to-be-written flags to true respectively;

[0267] The processing unit 201 may be specifically used for:

[0268] The K to-be-written flags corresponding to the K data target groups in the refresh area list are set to false.

[0269] Optionally, in the above Fig.19 On the basis of the corresponding embodiment, in another embodiment of the data processing device provided in the embodiment of the present application, the processing unit 201 can be specifically used for:

[0270] If the current to-be-written mark is detected to be true, the data corresponding to the current to-be-written mark is regarded as unsuccessfully written data;

[0271] Copying the unsuccessfully written data from the data backup group to the data target group corresponding to the data target area address and length;

[0272] Sets the current pending write flag in the refresh region list to false.

[0273] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0274] The processing unit 201 is further used to copy M test write data of M different process types from M data backup groups to M data target groups in sequence through the data security write interface, where M is an integer less than or equal to N;

[0275] The processing unit 201 is further configured to read M test read data from the M data target groups in sequence through the data read interface;

[0276] The determination unit 203 is used to determine that the data access test is normal if the test read data read each time is consistent with the corresponding test write data.

[0277] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0278] The processing unit 201 is further configured to record the test write time consumed each time the test write data is written, and calculate the average test write time for reading the test write data based on the M test write times.

[0279] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0280] The processing unit 201 is further used to record the test read time consumed for each reading of the test read data, and calculate the average test read time for writing the test read data based on the M test read times;

[0281] The determination unit 203 is further configured to determine that the data access test delay satisfies the data read / write delay threshold if the average test write time is less than the write time threshold and the average test read time is less than the read time threshold.

[0282] Optionally, in the above Fig.19 Based on the corresponding embodiment, in another embodiment of the data processing device provided by the embodiment of the present application,

[0283] The processing unit 201 is also used to inject fault data of abnormal program exit into the data backup area;

[0284] The acquisition unit 202 is further used to acquire P unwritten test data corresponding to the fault data through the data recovery interface, where P is an integer less than or equal to M;

[0285] The processing unit 201 is further used to copy the P unwritten test data from the P data backup groups to the P data target groups in sequence;

[0286] The processing unit 201 is further configured to read P test read data from the P data target groups in sequence through the data read interface;

[0287] The determination unit 203 is further configured to determine that the data recovery test is normal if the test read data read each time is consistent with the corresponding unwritten test data.

[0288] On the other hand, the present application provides another schematic diagram of a computer device, such as Fig. 20 As shown, Fig. 203 is a schematic diagram of a computer device structure provided by an embodiment of the present application. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 331 or data 332. Among them, the memory 320 and the storage medium 330 may be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 300. Furthermore, the central processing unit 310 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.

[0289] The computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 333, such as Windows Server 2000, Windows Server 2003 ... TM , MacOSX TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0290] The computer device 300 is also used to perform the following steps: Figures 2 to 13 The steps in the corresponding embodiments.

[0291] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following Figures 2 to 13 The illustrated embodiments describe steps in a method.

[0292] Another aspect of the present application provides a computer program product comprising a computer program, which, when executed by a processor, implements the following Figures 2 to 13 The illustrated embodiments describe steps in a method.

[0293] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0294] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0295] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0296] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0297] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

Claims

1. A data processing method, It is characterized in that include: Through the data operation interface, copy the data to be written from the target application storage space to the data backup area, wherein the data backup area is used to temporarily store the data to be written; Setting a corresponding to-be-written mark for the data backup area in a refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark; Copying the data to be written from the data backup area to the data target area, and clearing the to-be-written mark in the refresh area list, wherein the data target area is used to store the data to be written; When it is detected that the data writing operation is abnormally exited, detecting the current to-be-written mark corresponding to the abnormal exit of the data writing operation in the refresh area list; If the existence of the current to-be-written mark is detected, the to-be-written data corresponding to the current to-be-written mark is copied from the data backup area to the data target area again, and the current to-be-written mark in the refresh area list is cleared.

2. The method according to claim 1, It is characterized in that The attribute information of the data to be written also includes data target area information; before setting a corresponding to-be-written mark for the data backup area in the refresh area list, the method also includes: Acquire data target area information corresponding to the data to be written, wherein the data target area information at least includes a data target area address and a length, wherein the data target area address is used to indicate an address where the data to be written is written to the data target area, and the length is used to indicate a data length of the data to be written to the data target area; The data target area address and length are updated into the refresh area list.

3. The method according to claim 2, It is characterized in that The step of copying the data to be written from the data backup area to the data target area and clearing the to-be-written mark in the refresh area list includes: The to-be-written data is copied from the data backup area to the data target area corresponding to the address and length of the data target area, and the to-be-written mark in the refresh area list is cleared.

4. The method according to claim 1, It is characterized in that The data operation interface includes a data access space application interface. Before the data to be written is copied from the target application storage space to the data backup area through the data operation interface, the method further includes: Through the data access space application interface, the data target area, the data backup area corresponding to the data target area, and the refresh area list are divided in the system data storage space; Based on the process types supported by the system, the data target area is divided into N data target groups, and the data backup area is divided into N data backup groups corresponding to the N data target groups, wherein N is an integer greater than or equal to 1.

5. The method according to claim 4, It is characterized in that The data operation interface also includes a data security writing interface; The step of copying the data to be written from the target application storage space to the data backup area through the data operation interface includes: If K interface call requests of different process types are concurrently received through the data security write interface, K to-be-written data corresponding to the K different process types are copied from the target application storage space to K data backup groups, where K is an integer less than or equal to N; The setting of a corresponding to-be-written mark for the data backup area in the refresh area list includes: In the refresh area list, corresponding K to-be-written marks are set for the K data backup groups; The step of copying the data to be written from the data backup area to the data target area and clearing the to-be-written mark in the refresh area list includes: Copying the K to-be-written data corresponding to the K different process types from the K data backup groups to the K data target groups corresponding to the K data target area addresses and lengths; Clear the K to-be-written marks corresponding to the K data target groups in the refresh area list.

6. The method according to claim 4, It is characterized in that The data operation interface also includes a data security writing interface; The step of copying the data to be written from the target application storage space to the data backup area through the data operation interface includes: If K interface call requests of the same process type are concurrently received through the data security write interface, K data security write operations are performed in sequence, each time copying a to-be-written data corresponding to the same process type from the target application storage space to the same data backup group, wherein K is an integer less than or equal to N; The setting of a corresponding to-be-written mark for the data backup area in the refresh area list includes: sequentially setting a to-be-written mark for each of the data backup groups in the refresh area list; The step of copying the data to be written from the data backup area to the data target area and clearing the to-be-written mark in the refresh area list comprises: Sequentially copying one to-be-written data corresponding to the same process type from the data backup group to the data target group corresponding to the data target area address and length, until K to-be-written data of K same process types are copied to the data target group; The K to-be-written marks corresponding to the data target groups in the refresh area list are cleared in sequence.

7. The method according to claim 5, It is characterized in that The step of setting corresponding K to-be-written marks for the K data backup groups in the refresh area list includes: Allocating the K to-be-written marks to the K data backup groups in the refresh area list; Setting the K to-be-written flags to true respectively; The step of clearing the K to-be-written marks corresponding to the K data target groups in the refresh area list includes: The K to-be-written marks corresponding to the K data target groups in the refresh area list are set to false.

8. The method according to claim 4, It is characterized in that If the current to-be-written mark is detected, the to-be-written data corresponding to the current to-be-written mark is copied from the data backup area to the data target area again, and the current to-be-written mark in the refresh area list is cleared, including: If it is detected that the current to-be-written mark is true, the data corresponding to the current to-be-written mark is regarded as unsuccessfully written data; Copying the unsuccessfully written data from the data backup group to the data target group corresponding to the data target area address and length; The current to-be-written flag in the refresh area list is set to false.

9. The method according to claim 4, It is characterized in that The data operation interface also includes a data reading interface; after the data target area is divided into N data target groups based on the process type supported by the system, and the data backup area is divided into N data backup groups corresponding to the N data target groups, the method further includes: Through the data security write interface, M test write data of M different process types are copied from M data backup groups to M data target groups in sequence, wherein M is an integer less than or equal to N; Reading M test read data from the M data target groups in sequence through the data read interface; If the test read data read each time is consistent with the corresponding test write data, it is determined that the data access test is normal.

10. The method according to claim 9, It is characterized in that After the M test write data of M different process types are copied from the M data backup groups to the M data target groups in sequence through the data security write interface, the method further includes: The test write time consumed for writing the test write data each time is recorded, and the average test write time for writing the test write data is calculated based on the M test write times.

11. The method according to claim 10, It is characterized in that After sequentially reading the M test read data from the M data target groups through the data read interface, the method further includes: Record the test read time consumed for each test read data reading, and calculate the average test read time for reading the test read data based on the M test read times; If the average test write time is less than the write time threshold, and the average test read time is less than the read time threshold, it is determined that the data access test delay meets the data read and write delay threshold.

12. The method according to claim 9, It is characterized in that The data operation interface also includes a data recovery interface; after the M test write data of M different process types are copied from the M data backup groups to the M data target groups in sequence through the data security write interface, the method also includes: Injecting fault data of abnormal program exit into the data backup area; Obtaining, through the data recovery interface, P unwritten test data corresponding to the fault data, wherein P is an integer less than or equal to M; Copying P unwritten test data from the P data backup groups to the P data target groups in sequence; Reading P test read data from the P data target groups in sequence through the data read interface; If the test read data read each time is consistent with the corresponding unwritten test data, it is determined that the data recovery test is normal.

13. A data processing device, It is characterized in that include: A processing unit, used for copying the data to be written from the target application storage space to the data backup area through the data operation interface, wherein the data backup area is used for temporarily storing the data to be written; an acquisition unit, configured to set a corresponding to-be-written mark for the data backup area in a refresh area list, wherein the refresh area list is used to record attribute information of the to-be-written data, and the attribute information includes the to-be-written mark; The processing unit is further used to copy the data to be written from the data backup area to the data target area, and clear the to-be-written mark in the refresh area list, wherein the data target area is used to store the data to be written; The acquisition unit is further configured to detect a current to-be-written mark corresponding to the abnormal exit of the data writing operation in the refresh area list when it is detected that the data writing operation is abnormally exited; The processing unit is further configured to, if the existence of the current to-be-written mark is detected, copy the to-be-written data corresponding to the current to-be-written mark from the data backup area to the data target area again, and clear the current to-be-written mark in the refresh area list.

14. A computer device comprising a memory, a processor and a bus system, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

15. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

16. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Smart card power-off protection method

    CN101321341A

  • Data protection method of radio frequency smart card

    CN102799931A

  • Nor flash power down protection method and Nor flash power down protection device

    CN103176920A

  • Data write-in method and device

    CN106155596A

Cited By

  • Test method and device of data processing function, program product and storage medium

    CN120492222A