Business file storage method and device, storage medium and electronic device

By modifying file characteristics based on file update frequency and type in a distributed file system, generating and storing traceable files, the problems of low file usability and low efficiency in handling abnormal data in distributed file systems are solved, achieving efficient file backtracking and improved stability.

CN116955302BActive Publication Date: 2025-12-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310939496.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-12-16
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

In distributed file systems, the time difference and dispersion of file provisioning platforms result in low file usability and low efficiency in handling abnormal data, which can easily lead to logical errors and production accidents.

Method used

By obtaining the initial set of files from the business system within the target time period, modifying file characteristics based on file update frequency and whether they are incremental files, generating traceable files that meet the target business characteristics, and storing them in the business partition of the target storage space, so that when file usage errors occur, the files can be traced back to the reference time period.

Benefits of technology

It improves the efficiency of handling abnormal data, reduces logical errors and production accidents, and enhances the stability and efficiency of file usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955302B_ABST
    Figure CN116955302B_ABST
Patent Text Reader

Abstract

The application discloses a business file storage method and device, a storage medium and an electronic device. It relates to the field of cloud computing, and the method comprises the following steps: acquiring a first file set of a business system in a target time period; transforming each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, wherein the target file feature is used to indicate the update frequency of the initial business file and whether the initial business file is an incremental file, the second file set comprises N traceable files satisfying a target business feature, and each traceable file is used to trace the file used by the business system to the corresponding reference business file in the case that the corresponding initial business file used by the business system is wrong; and storing the second file set to a target business partition in a target storage space. Through the application, the problem of low processing efficiency of abnormal data in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of cloud computing, in particular to a business file storage method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the popularization of distributed technology, files are provided by multiple providers instead of a single provider, that is, files are provided by various distributed platforms instead of a single host platform. In the prior art, the provision of files by the platform has a certain time difference, and the provided files are too scattered, so that the use of files by multiple providers is low. That is, the user of the file needs to perform a large amount of adjustment and switching work, and even a logic error may occur due to too many data sources, thereby causing a large-scale production accident.

[0003] For the problem of low processing efficiency of abnormal data in the related art, no effective solution has been proposed. SUMMARY

[0004] The main purpose of the present application is to provide a business file storage method and device, a storage medium and an electronic device to solve the problem of low processing efficiency of abnormal data in the related art.

[0005] In order to achieve the above purpose, according to one aspect of the present application, a business file storage method is provided. The method comprises: acquiring a first file set of a business system in a target time period, wherein the business system is used to handle a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business file is used to record business data generated by the business system in the target time period when handling the target business; transforming each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, wherein the target file feature is used to indicate the update frequency of the initial business file and whether the initial business file is an incremental file, the second file set comprises N traceable files satisfying the target business feature, each traceable file is used to trace the file used by the business system to the corresponding reference business file in the case that the corresponding initial business file used by the business system is wrong, and the reference business file is a business file transformed and stored in a reference time period before the target time period; storing the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, and M is greater than or equal to 1.

[0006] Optionally, the transforming each of the initial business files according to the target file feature of each of the initial business files and the reference business file corresponding to each of the initial business files to obtain a second file set comprises: detecting the target file feature of the initial business file, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is used to indicate whether the initial business file is an incremental file, the update frequency feature comprises a high frequency and a low frequency, the high frequency is used to indicate that the update frequency of the initial business file is greater than or equal to a frequency threshold, and the low frequency is used to indicate that the update frequency of the initial business file is less than the frequency threshold; and transforming the initial business file according to the update frequency feature and the added file feature to obtain the traceable file using the reference business file.

[0007] Optionally, the detecting the target file feature of the initial business file comprises: detecting whether the initial business file is an incremental file, wherein the incremental file is used to indicate that the initial business file is an added business file; and calculating the update frequency feature of the initial business file according to the number of updates of the initial business file in the target time period.

[0008] Optionally, the calculating the update frequency feature of the initial business file according to the number of updates of the initial business file in the target time period comprises: acquiring the number of updates of each business data in the initial business file in the target time period; calculating the update frequency of the initial business file in the target time period according to the number of updates; and determining the update frequency as the update frequency feature of the initial business file.

[0009] Optionally, the transforming the initial business file according to the update frequency feature and the added file feature to obtain the traceable file using the reference business file comprises: acquiring first business data of a reference business partition as the reference business file from the target storage space, wherein the reference business partition is a previous business partition of the target business partition; acquiring second business data from the initial business file according to the added file feature; and combining the first business data and the second business data to obtain the traceable file.

[0010] Optionally, the obtaining the second service data from the initial service file according to the new file feature comprises: in a case where the new file feature indicates that the initial service file is the incremental file, obtaining the latest service data from the initial service file as the second service data; in a case where the new file feature indicates that the initial service file is not the incremental file, obtaining the latest service data corresponding to each primary key from the initial service file and the reference service file as the second service data.

[0011] Optionally, the obtaining the first service data of the reference service partition from the target storage space as the reference service file comprises: in a case where the update frequency is the high frequency, determining that the reference service partition is a first service partition; in a case where the update frequency feature is the low frequency, determining that the reference service partition is a second service partition, wherein a time length of the second service partition is greater than that of the first service partition.

[0012] Optionally, the transforming each initial service file according to the target file feature of each initial service file and the reference service file corresponding to each initial service file to obtain a second file set comprises: performing verification on the first file set according to a registration file, wherein the registration file is used to record basic information of each service data in the first file set, and the first file set comprises a host file and a distributed file; obtaining a to-be-transformed file from the first file set according to a verification result of the first file set; transforming each to-be-transformed file according to the target file feature of each to-be-transformed file and the reference service file corresponding to each to-be-transformed file to obtain a second file set.

[0013] Optionally, the obtaining the to-be-transformed file from the first file set according to the verification result of the first file set comprises: matching the host file with the registration file; in a case where the registration file does not record first basic information of the host file, determining that a verification result of the host file is failed; obtaining an updated host file and matching the updated host file with the registration file until an updated host file with a passed verification result is obtained, and determining the updated host file with the passed verification result as the to-be-transformed file; in a case where the registration file has recorded the first basic information of the host file, matching the distributed file with the registration file; obtaining a partial file with second basic information recorded in the registration file from the distributed file; and determining the host file and the partial file as the to-be-transformed file.

[0014] To achieve the above object, according to another aspect of the present application, a storage device of business files is provided.

[0015] The device comprises:

[0016] An acquisition module is configured to acquire a first file set of a business system in a target time period, wherein the business system is configured to handle a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business files are configured to record business data generated by the business system in handling the target business in the target time period;

[0017] A modification module is configured to modify each of the initial business files according to a target file feature of each of the initial business files and a reference business file corresponding to each of the initial business files, to obtain a second file set, wherein the target file feature is configured to indicate an update frequency of the initial business files and whether the initial business files are incremental files, the second file set comprises N traceable files satisfying the target business feature, each of the traceable files is configured to trace a file used by the business system to the corresponding reference business file in a case that the business system uses the corresponding initial business file incorrectly, and the reference business file is a business file modified and stored in a reference time period before the target time period;

[0018] A storage module is configured to store the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, and M is greater than or equal to 1.

[0019] According to the application, the following steps are adopted: acquiring a first file set of a business system for handling a target business in a target time period, the first file set including N initial business files for recording business data generated by the business system in handling the target business in the target time period, N being greater than or equal to 1; transforming each initial business file according to a target file feature of the initial business file and a reference business file corresponding to the initial business file, to obtain a second file set; and storing the second file set in a target business partition in a target storage space, wherein the target storage space includes M business partitions, M being greater than or equal to 1. That is, the initial business file is transformed into a traceable file meeting a target business feature according to the update frequency of the initial business file and whether the initial business file is an incremental file, and in the case that the business system using the corresponding initial business file has an error, the file used by the business system is traced back to a business file stored in a reference time period before the target time period and transformed, so as to realize, in the case that the user of the file has an error, the business system is rolled back to the reference time period before the target time period by using the transformed business file. The problem of low processing efficiency of abnormal data in the related art is solved, and the effect of improving the processing efficiency of abnormal data is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0020] The accompanying drawings, which form a part of the present application, are included to provide a further understanding of the application, and are incorporated herein for purposes of illustrating the illustrative embodiments of the present application and the explanations provided herein are made with respect to the accompanying drawings. In the drawings:

[0021] Figure 1 is a flowchart of a business file storage method according to an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of transforming an initial business file according to an embodiment of the present application Figure 1 ;

[0023] Figure 3 is a schematic diagram of transforming an initial business file according to an embodiment of the present application Figure 2 ;

[0024] Figure 4 is a schematic diagram of transforming an initial business file according to an embodiment of the present application Figure 3 ;

[0025] Figure 4 is a schematic diagram of transforming an initial business file according to an embodiment of the present application Figure 6 ;

[0026] Figure 7 is a schematic diagram of transforming an initial business file according to an embodiment of the present application

[0027] Figure 8 is a schematic diagram of a storage device of a service file according to an embodiment of the present application;

[0028] Figure 1 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] It should be noted that the embodiments and features of the embodiments in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the business file storage method proposed in the present application has a wide range of application scenarios, which can include but is not limited to: file processing platforms including host systems and distributed systems, distributed systems, etc. In the following embodiments, the business file storage method can be described by taking the file processing platform including the host system and the distributed system as an example, but the use scenario is not limited, that is, any multi-service system that needs to perform system rollback operation can use the business file storage method proposed in the present application.

[0033] It should be noted that the related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties. For example, an interface is provided between the system and the related user or institution. Before obtaining the related information, the interface needs to send a request to the aforementioned user or institution, and after receiving the consent information feedback from the aforementioned user or institution, the related information is obtained.

[0034] The present application will be described below in conjunction with the preferred implementation steps, Figure 1 The flowchart of the business file storage method provided by the embodiment of the present application is shown in Primary Key The method comprises the following steps:

[0035] Step S101, obtaining a first file set of a business system in a target time period, wherein the business system is used to handle a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business file is used to record business data generated by the business system in the target time period when handling the target business;

[0036] Step S102, modifying each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, wherein the target file feature is used to indicate the update frequency of the initial business file and whether the initial business file is an incremental file, the second file set comprises N traceable files meeting the target business feature, each traceable file is used to trace the file used by the business system to the corresponding reference business file in the case that the corresponding initial business file used by the business system has an error, and the reference business file is a business file modified and stored in a reference time period before the target time period;

[0037] Step S103, storing the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, and M is greater than or equal to 1.

[0038] In the technical solution provided in the above step S101, the business system can include one or more systems for handling target business, such as: using a host system as a business system to handle target business, using a distributed system as a business system to handle target business, and the business system including a host system and a distributed system, etc.

[0039] Optionally, in the embodiment, the service files in the first file set can be, but are not limited to, from one or more service systems, and each service system in a certain time period can be, but is not limited to, obtained from the storage space of the service system to generate the service files of the target service, such as: the service system generates service data of the target service, records the service data in the service file, stores the service file in the storage space corresponding to each service system, and obtains the service files of the target service generated by each service system in a certain time period from the storage space corresponding to each service system to obtain the first file set. Or, the service data generated by the service system of the target service is recorded in the service file, and the service file of each service system is stored in the same storage space, and the service file of the target service generated by the service system in a certain time period is obtained from the storage space to obtain the first file set.

[0040] Optionally, in the embodiment, the target service is a service handled by a service system, which can be, but is not limited to, a process of recording service data in a service system to handle the target service, and the target service can be, but is not limited to, including: liability business, asset business, intermediate business, etc.

[0041] In the technical solution provided in the above step S102, the update frequency of the initial service file can be, but is not limited to, determined according to the update of the service data recorded on the initial service file in the target time period, such as: the update frequency of the service data recorded on the initial service file is determined as the update frequency of the initial service file. Or, the average of the update frequency of the service data recorded on the initial service file is determined as the update frequency of the initial service file.

[0042] Optionally, in the embodiment, the second file set can be, but is not limited to, constructed in the case that the corresponding initial service file used by the service system has an error, or constructed in the case that the target time period is reached, such as: the initial service file can be, but is not limited to, transformed to obtain a traceable file satisfying the target service characteristic, and the traceable file is used to trace the file used by the service system to the corresponding reference service file in the case that the corresponding initial service file used by the service system has an error. Or, in the case that the target time period is reached, the initial service file of the target time period is used to obtain a traceable file satisfying the target service characteristic, and the traceable file is used to trace the file used by the service system to the corresponding reference service file in the case that the corresponding initial service file used by the service system has an error, and the traceable file satisfying the target service characteristic is used to replace the file in which the service system has an error with the corresponding traceable file, and the service system is rolled back to the traceable file state.

[0043] In an example embodiment, each of the initial business files can be modified according to the target file features of each of the initial business files and the reference business files corresponding to each of the initial business files to obtain a second file set in the following manner, but not limited thereto: detecting the target file features of the initial business files, wherein the target file features include an added file feature and an update frequency feature, the added file feature is used to indicate whether the initial business file is an incremental file, the update frequency feature includes a high frequency and a low frequency, the high frequency is used to indicate that the update frequency of the initial business file is greater than or equal to a frequency threshold, and the low frequency is used to indicate that the update frequency of the initial business file is less than the frequency threshold; and modifying the initial business files according to the update frequency feature and the added file feature using the reference business files to obtain the traceable files.

[0044] Optionally, in the present embodiment, whether the initial business file is an incremental file can be determined from the storage space storing the business files of the business system, such as: detecting whether the storage space storing the business files of the business system stores the business file corresponding to the initial business file (i.e. the business file recording the same business data as the initial business file) before a target time period, and in the case that the storage space does not store the business file corresponding to the initial business file, the initial business file is determined to be an incremental file; and in the case that the storage space stores the business file corresponding to the initial business file, the initial business file is determined to be a stock file.

[0045] Optionally, in the present embodiment, the frequency threshold for the first file set can be determined according to the initial business file, such as: each of the initial business files in the first file set has a corresponding frequency threshold, and the initial business file determines its update frequency feature compared with the corresponding frequency threshold. Or the frequency threshold is a unique value, such as: each of the initial business files in the first file set determines its update frequency feature compared with the same frequency threshold.

[0046] Optionally, in the present embodiment, the reference business file is a business file having a corresponding relationship with the initial business file, such as: the reference business file and the initial business file are used to record the business data generated by handling the same business in different time periods, and the reference business file and the initial business file record the same length of business data in different time periods.

[0047] Optionally, in the embodiment, the initial business file is used to record the business data generated by the business system in the target time period, and the adding file feature of the initial business file is used to indicate whether the target business is handled by the business system before the target time period and whether there is business data generated by handling the target business. The corresponding business data can be obtained from the storage space corresponding to the business system, so as to determine the adding file feature of the initial business file, for example: whether there is business data recorded by handling the target business before the target time period is found in the storage space corresponding to the business system. In the case that there is no business data of the target business handled before the target time period in the storage space, it is determined that the initial business file is an added business file, that is, an incremental file. Or, in the case that there is business data of the target business handled before the target time period in the storage space, it is determined that the initial business file is not an added business file, that is, a stock file. Or, whether there is business data of the same business recorded by the initial business file and the retroactive file modified before the target time period is found in the target storage space for storing the modified retroactive file. In the case that there is no business data of the same business recorded by the initial business file and the retroactive file modified before the target time period in the target storage space, it is determined that the initial business file is an added business file, that is, an incremental file. Or, in the case that the business data of the same business recorded by the initial business file and the retroactive file modified before the target time period is found in the target storage space, it is determined that the initial business file is not an added business file, that is, a stock file.

[0048] Optionally, in the embodiment, the initial business file is modified using the reference business file to obtain the retroactive file, and the reference business file is stored in the business partition of the target storage space. The business partition in which the reference business file is located can be determined according to the adding file feature of the initial business file, for example: in the case that the initial business file records the business data of the target business in the 00:15-00:30 time period, the business partition in which the business data of the target business in the 00:00-00:15 time period is stored is obtained from the target storage space, and the retroactive file stored in the business partition is determined as the reference business file.

[0049] In one example embodiment, the target file feature of the initial business file can be detected in the following manner: detecting whether the initial business file is an incremental file, wherein the incremental file is used to indicate that the initial business file is an added business file; and calculating the update frequency feature of the initial business file according to the number of updates of the initial business file in the target time period.

[0050] Optionally, in the embodiment, the initial service file records a plurality of service data, which can include but is not limited to: a primary key, a plurality of fields, a receiving time of the service data, etc. The update frequency of the initial service file can be determined according to the number of times each service data changes in the target time period, such as: the sum of the number of times each service data changes in the target time period is determined as the update frequency of the initial service file; or, the average of the number of times the service data changes in the target time period is calculated and determined as the update frequency of the initial service file. The update frequency feature of the initial service file is determined according to the update frequency of the initial service file, such as: the ratio of the update frequency of the initial service file to the length of the target time period is determined as the update frequency of the initial service file, and then the update frequency of the initial service file is compared with the frequency threshold to determine the update frequency feature of the initial service file.

[0051] In an example embodiment, the update frequency feature of the initial service file can be calculated according to the number of updates of the initial service file in the target time period in the following manner: the number of updates of each service data in the initial service file in the target time period is obtained; the update frequency of the initial service file in the target time period is calculated according to the number of updates; and the update frequency is determined as the update frequency feature of the initial service file.

[0052] Optionally, in the embodiment, the update frequency of the initial service file can be calculated according to the number of updates of the initial service file, such as: the ratio of the number of updates of the initial service file in the target time period to the length of the target time period is determined as the update frequency of the initial service file. Or, the number of updates of the initial service file in the target time period is determined as the update frequency of the initial service file.

[0053] Optionally, in the embodiment, the update frequency feature of the initial service file includes that the update frequency of the initial service file is high or the update frequency of the initial service file is low, and the update frequency of the initial service file is determined according to the number of updates of the initial service file in the target time period, such as: in the case that the update frequency of the initial service file is greater than or equal to the frequency threshold, the update frequency feature of the initial service file is determined as high frequency. Or, in the case that the update frequency of the initial service file is less than the frequency threshold, the update frequency feature of the initial service file is determined as low frequency.

[0054] In an example embodiment, the reference service file can be used to transform the initial service file into the traceable file according to the update frequency feature and the new file feature in the following manner, but not limited to: obtaining first service data of a reference service partition in the target storage space as the reference service file, wherein the reference service partition is a previous service partition of the target service partition; obtaining second service data from the initial service file according to the new file feature; and combining the first service data and the second service data to obtain the traceable file.

[0055] Optionally, in the example embodiment, the target storage space can be used to store the traceable file obtained after each transformation, and the target storage space can include a data lake, a database, a cache, a register, and the like, but not limited to. The data lake can be used as the target storage space, because the data lake does not perform conversion, cleaning, processing, and the like on the received service data, and thus the original features of the service data can be retained. The use of the data lake achieves integration and management of the source layer data, and the service data in the data lake is stored in a consistent format with the data source, and thus data support can be provided, and the information storage faces multiple data sources for gathering original service data.

[0056] Optionally, in the example embodiment, the target storage space can be divided into multiple service partitions according to different time lengths, and the target service partition in which the traceable file obtained after transformation of the initial service file is stored can be determined according to the update frequency feature of the initial service file, for example: in the case where the update frequency of the initial service file is low, the traceable file obtained after transformation of the initial service file is written into a service partition stored in units of days. Alternatively, in the case where the update frequency of the initial service file is high, the traceable file obtained after transformation of the initial service file is written into a service partition stored in units of hours.

[0057] Optionally, in the example embodiment, the target service partition of the traceable file obtained after transformation of the initial service file is a next service partition of a reference service partition in which a reference service file corresponding to the initial service file is located, and the reference service partition has the same time length as the initial service partition.

[0058] Optionally, in the example embodiment, the second service data can be obtained from the initial service file according to whether the initial service file is an incremental file, for example: in the case where the initial service file is an incremental file, the latest part of the service data in a target time period is selected from the initial service file as the second service data. Alternatively, in the case where the initial service file is a stock file, the latest part of each service data is selected from the initial service file and the reference service file as the second service data.

[0059] In an example embodiment, the second business data can be obtained from the initial business file according to the new file feature in the following manner, but not limited thereto: in the case that the new file feature indicates that the initial business file is the incremental file, the latest business data in the initial business file is obtained as the second business data; in the case that the new file feature indicates that the initial business file is not the incremental file, the latest business data corresponding to each primary key is obtained from the initial business file and the reference business file as the second business data.

[0060] Optionally, in the present embodiment, part of the business data in the initial business file can be obtained as the second business data according to whether the initial business file is the incremental file, such as: in the case that the initial business file is the incremental file, the latest business data in the initial business file is obtained as the second business data. Alternatively, in the case that the initial business file is the stock file, the latest business data of each business data is selected from the initial business file and the reference business file as the second business data.

[0061] Optionally, in the present embodiment, each business data can be determined whether it belongs to the same data through its corresponding primary key, and whether the business data is updated can be determined through the field in the business data, such as: for the same primary key, in the case that the field corresponding to the primary key changes, it is determined that the business data is updated.

[0062] Optionally, in the present embodiment, Table 1 is the business data received in the time period of 00:00:00-00:15:00 on January 12, 2023, including: the business data of Value-1A (field 1), Value-2A (field 2) received at 00:01:00 on January 12, 2023; the business data of Value-1B (field 1), Value-2B (field 2) received at 00:07:00 on January 12, 2023.

[0063] Table 1

[0064] Field 1 Field 2 Received Time Value-1A K000001 Value-2A 2023-01-12 00:01:00 Value-1B K000002 Value-2B 2023-01-12 00:07:00 Primary Key

[0065] As can be seen from Table 1, each business data has a primary key: the business data of Value-1A (field 1), Value-2A (field 2) corresponds to the primary key K000001; the business data of Value-1B (field 1), Value-2B (field 2) corresponds to the primary key K000002.

[0066] The service data received within 00:00:00-00:15:00 on January 12, 2023 is directly loaded into the first service partition 01 on January 12, 2023 in the target storage space to obtain Table 2.

[0067] Table 2

[0068] Field 1 Field 2 Business Partition Value-1A K000001 Value-2A Value-1B 2023-01-12-01 K000002 Value-2B Figure 2 2023-01-12-01

[0069] As can be seen from Table 2, the service data of Value-1A (field 1), Value-2A (field 2) with the primary key K000001 and the service data of Value-1B (field 1), Value-2B (field 2) with the primary key K000002 can be written into the service partition 2023-01-12-01 of the target storage space, but are not limited to this.

[0070] Optionally, in the embodiment, Figure 1 is a schematic diagram of transforming an initial service file according to an embodiment of the application Figure 2 As shown in Primary Key , the reference service file is the service data in the reference service interval shown in Table 2, the initial service file is the service file received within 00:15:00-00:29:59 on January 12, 2023 shown in Table 3, the update frequency of the initial service file is high frequency, and the initial service file is an incremental file. As an example, the initial service file can be transformed into a traceable file of the initial service file by the following method, but is not limited to this:

[0071] Table 3

[0072] Field 1 Field 2 Received Time Value-1A K000001 Value-2A 2023-01-12 00:18:00 Value-1B K000002 Value-2B 2023-01-12 00:19:00 Value-1C K000003 Value-2C 2023-01-12 00:20:00 Value-1D K000001 Value-2D 2023-01-12 00:20:00 Primary Key

[0073] As can be seen from Table 3, the service data received within 00:15:00-00:29:59 on January 12, 2023 includes Value-1A (field 1), Value-2A (field 2) received at 00:18:00 on January 12, 2023, with the primary key K000001; Value-1B (field 1), Value-2B (field 2) received at 00:19:00 on January 12, 2023, with the primary key K000002; Value-1C (field 1), Value-2C (field 2) received at 00:20:00 on January 12, 2023, with the primary key K000003; and Value-1D (field 1), Value-2D (field 2) received at 00:20:00 on January 12, 2023, with the primary key K000001.

[0074] According to the update frequency of the initial business file, the reference business file corresponding to the initial business file is obtained from the target storage space. The business data as shown in Table 2 is taken as the first business data. Since the initial business file is an incremental file, the latest business data (Value-1D (field 1), Value-2D (field 2), and primary key K000001 received at 00:20:00 on January 12, 2023) of the target time period is obtained from Table 3 as the second business data, the first business data and the second business data are combined to obtain the retroactive file as shown in Table 4, and the second business data is written into the business partition 2023-01-12-02 in the target storage space.

[0075] Table 4

[0076] Field 1 Field 2 Business Partition Value-1A K000001 Value-2A Value-1B 2023-01-12-01 K000002 Value-2B Value-1C 2023-01-12-01 K000003 Value-2C Value-1D 2023-01-12-02 K000001 Value-2D Figure 3 2023-01-12-02

[0077] As can be seen from Table 4, in the case where the initial business file has a new primary key relative to the reference business file, the field corresponding to the new primary key can be but not limited to being written into the business partition 2023-01-12-02.

[0078] Optionally, in this embodiment, Figure 2 is a schematic diagram for modifying an initial business file according to an embodiment of the present application Figure 3 As Primary Key shown, the initial business file is the business data received from 00:15:00 to 00:29:59 on January 12, 2023 as shown in Table 5, the reference business file includes the business data as shown in Table 2, the update frequency of the initial business file is high, and the initial business file is not an incremental file. As an example, the initial business file can be but not limited to being modified to obtain the retroactive file of the initial business file in the following manner:

[0079] Table 5

[0080] Field 1 Field 2 Received Time Value-1C K000001 Value-2C 2023-01-12 00:18:00 Value-1E K000003 Value-2E 2023-01-12 00:19:00 Value-1F K000001 Value-2F 2023-01-12 00:20:00 Primary Key

[0081] As can be seen from Table 5, the business data received from 00:15:00 to 00:29:59 on January 12, 2023 includes Value-1C (field 1), Value-2C (field 2) received at 00:18:00 on January 12, 2023, Value-1E (field 1), Value-2E (field 2) received at 00:19:00 on January 12, 2023, and Value-1F (field 1), Value-2F (field 2) received at 00:20:00 on January 12, 2023.

[0082] Since the initial business file is a stock file, the latest business data of each primary key is obtained from Table 5 as the second business data (Value-1F (field 1), Value-2F (field 2), primary key K000001; Value-1B (field 1), Value-2B (field 2), primary key K000002; Value-1E (field 1), Value-2E (field 2), primary key K000003) to obtain the traceable file as shown in Table 6:

[0083] Table 6

[0084] Field 1 Field 2 Business Partition Value-1A K000001 Value-2A Value-1B 2023-01-12-01 K000002 Value-2B Value-1F 2023-01-12-01 K000001 Value-2F Value-1B 2023-01-12-02 K000002 Value-2B Value-1E 2023-01-12-02 K000003 Value-2E Primary Key 2023-01-12-02

[0085] As can be seen from Table 6, the second business data (Value-1F (field 1), Value-2F (field 2), primary key K000001; Value-1B (field 1), Value-2B (field 2), primary key K000002; Value-1E (field 1), Value-2E (field 2), primary key K000003) is written into the business partition 2023-01-12-02.

[0086] Optionally, in the present embodiment, Table 7 is the business data received on January 12, 2023, and the business data received on the first day can be but not limited to be written into the first business partition.

[0087] Table 7

[0088] Field 1 Field 2 Received Time Value-1A K000001 Value-2A 2023-01-12 00:01:00 Value-1B K000001 Value-2B 2023-01-12 00:07:00 Value-1C K000002 Value-2C 2023-01-12 00:17:00 Value-1D K000001 Value-2D 2023-01-12 00:27:00 Value-1E K000001 Value-2E 2023-01-12 00:37:00 Value-1F K000001 Value-2F 2023-01-13 01:17:00 Primary Key

[0089] As can be seen from Table 7, the business data received on January 12, 2023 includes Value-1A (field 1), Value-2A (field 2) received at 00:01:00 on January 12, 2023, primary key K000001; Value-1B (field 1), Value-2B (field 2) received at 00:07:00 on January 12, 2023, primary key K000001; Value-1C (field 1), Value-2C (field 2) received at 00:17:00 on January 12, 2023, primary key K000002; Value-1D (field 1), Value-2D (field 2) received at 00:27:00 on January 12, 2023, primary key K000001; Value-1E (field 1), Value-2E (field 2) received at 00:37:00 on January 12, 2023, primary key K000001; Value-1F (field 1), Value-2F (field 2) received at 01:17:00 on January 13, 2023, primary key K000001.

[0090] According to the business data in Table 7, the latest business data on January 12, 2023 corresponding to each primary key as shown in Table 8 can be but not limited to filtered as second business data according to the primary key of each business data and written into the first business partition of January 2023.

[0091] Table 8

[0092] Field 1 Field 2 Received Time Value-1C K000002 Value-2C 2023-01-12 00:17:00 Value-1E K000001 Value-2E 2023-01-12 00:37:00 Primary Key

[0093] As can be seen from Table 8, the latest business data of primary key K000002 on January 12, 2023 is Value-1C (field 1), Value-2C (field 2) of 00:17:00 on January 12, 2023; the latest business data of primary key K000001 on January 12, 2023 is Value-1E (field 1), Value-2E (field 2) of 00:37:00 on January 12, 2023.

[0094] According to Table 9, the latest business data of each primary key on January 12, 2023 can be but not limited to written into the business partition 2023-01-12-01 of January 2023 as second business data.

[0095] Table 9

[0096] Field 1 Field 2 Business Partition Value-1C K000002 Value-2C Value-1E 2023-01-12-01 K000001 Value-2E Figure 4 2023-01-12-01

[0097] According to Table 9, the latest business data of primary key K000002 on January 12, 2023 is Value-1C (field 1), Value-2C (field 2) of 00:17:00 on January 12, 2023; the latest business data of primary key K000001 on January 12, 2023 is Value-1E (field 1), Value-2E (field 2) of 00:37:00 on January 12, 2023, and the latest business data of each primary key on January 12, 2023 is written into the business partition 2023-01-12-01 of January 2023 as second business data.

[0098] Optionally, in the embodiment, Figure 3 is a schematic of modifying an initial business file according to an embodiment of the application Figure 4 For example, Primary KeyAs shown in the table, the initial business file is taken as the business data received on January 13, 2023, as shown in Table 7, the reference business file corresponding to the initial business file includes the business data as shown in Table 9, the update frequency of the initial business file is low frequency, and the initial business file is an incremental file. As an example, the initial business file can be modified to obtain a traceable file of the initial business file by the following method, but is not limited to the following method:

[0099] According to the initial business file is a new file, the latest business data received on January 13, 2023 is obtained from Table 7 to obtain the second business data as shown in Table 10.

[0100] Table 10

[0101] Field 1 Field 2 Received Time Value-1F K000001 Value-2F ​ 2023-01-13 01:17:00

[0102] As shown in Table 10, the second business data includes Value-1F (field 1), Value-2F (field 2) of January 13, 2023 01:17:00, and the primary key K000001. The second business data can be combined with the reference business file to obtain a traceable file, as shown in Table 11, and the second business data is written to the business partition 2023-01-13-01 of the reference business file.

[0103] Table 11

[0104] Primary Key Field 1 Field 2 Business Partition K000001 Value-1C Value-2C 2023-01-12-01 K000002 Value-1D Value-2D 2023-01-12-01 K000001 Value-1F Value-2F 2023-01-13-01

[0105] Optionally, in this embodiment, as shown in Table 12, the business data includes the business data received on January 12, 2023 and January 13, 2023, and in the case of receiving the business data, the business data can be stored in the corresponding database, and the effective time of the business data in the database can be determined as the receiving time of the business data.

[0106] Table 12

[0107] Primary Key Field 1 Field 2 Last Updated Date Database Effective Time K000001 Value-1A Value-2A 2023-01-11 2023-01-12 00:05:00 K000001 Value-1B Value-2B 2023-01-12 2023-01-12 00:10:00 K000002 Value-1C Value-2C 2023-01-12 2023-01-12 00:15:00 K000001 Value-1D Value-2D 2023-01-12 2023-01-12 22:00:00 K000001 Value-1E Value-2E 2023-01-13 2023-01-13 00:05:00

[0108] As shown in Table 12, the latest business data corresponding to each primary key in the database can be obtained from Table 12 to obtain the business data as shown in Table 13:

[0109] Table 13

[0110] Primary Key Field 1 Field 2 Last Updated Date Database Effective Time K000002 Value-1C Value-2C 2023-01-12 2023-01-12 00:15:00 K000001 Value-1D Value-2D 2023-01-12 2023-01-12 22:00:00

[0111] As shown in Table 14, the latest business data of each primary key on January 12, 2023 is written to the business partition 2023-01-12 of the reference business file:

[0112] Table 14

[0113] Primary Key Field 1 Field 2 Business Partition K000002 Value-1C Value-2C 2023-01-12 K000001 Value-1D Value-2D 2023-01-12

[0114] Optionally, in the embodiment, Figure 5 is a schematic of transforming an initial business file according to the embodiment of the application Figure Four As Figure 5 shown, taking the business data of January 13, 2023 shown in Table 12 as an initial business file, the reference business file corresponding to the initial business file is the business data of the business partition 2023-01-12 shown in Table 14, the update frequency of the initial business file is low frequency, and the initial business file is a stock file. As an example, the initial business file can be transformed into a traceable file of the initial business file by the following method, but is not limited to:

[0115] From the business data of January 13, 2023 shown in Table 12, the latest business data of each primary key is selected to obtain the second business data shown in Table 15:

[0116] Table 15

[0117] Primary Key Field 1 Field 2 Business Partition K000002 Value-1C Value-2C 2023-01-13 K000001 Value-1E Value-2E 2023-01-13

[0118] The second business data shown in Table 15 is combined with the first business data of the reference business file to obtain the traceable file shown in Table 16:

[0119] Table 16

[0120] Primary Key Field 1 Field 2 Business Partition K000002 Value-1C Value-2C 2023-01-12 K000001 Value-1D Value-2D 2023-01-12 K000002 Value-1C Value-2C 2023-01-13 K000001 Value-1E Value-2E 2023-01-13

[0121] As shown in Table 14, the second business data can be written into the business partition 2023-01-13, but is not limited to.

[0122] In one exemplary embodiment, the first business data of the reference business partition can be obtained from the target storage space as the reference business file by the following method, but is not limited to: in the case where the update frequency is the high frequency, it is determined that the reference business partition is a first business partition; in the case where the update frequency feature is the low frequency, it is determined that the reference business partition is a second business partition, wherein the time length of the second business partition is greater than that of the first business partition.

[0123] Optionally, in the embodiment, the reference business partition where the reference business data of the initial business data is located can be determined according to the update frequency of the initial business data, but is not limited to, for example, in the case that the update frequency of the initial business data is high frequency, the reference business partition is determined as the retroactive file of the target storage space modified 15 minutes before the target time period. Or, in the case that the update frequency of the initial business data is low frequency, the reference business partition is determined as the retroactive file of the target storage space modified 1 day before the target time period.

[0124] In an example embodiment, each of the initial business files can be modified according to the target file characteristics of each of the initial business files and the reference business file corresponding to each of the initial business files, but is not limited to, for example, the first file set is checked according to the registration file, wherein the registration file is used to record the basic information of each of the business data in the first file set, and the first file set includes the host file and the distributed file; the to-be-modified file is obtained from the first file set according to the checking result of the first file set; each of the to-be-modified file is modified according to the target file characteristics of each of the to-be-modified file and the reference business file corresponding to each of the to-be-modified file, and the second file set is obtained.

[0125] Optionally, in the embodiment, the first file set includes the host file and the distributed file, and the host file can be obtained from the host system, for example, by FTP (File Transfer Protocol, File Transfer Protocol), and the distributed file can be obtained from the distributed system including multiple distributed platforms, for example, by kafka (a distributed message queue based on publish / subscribe mode). In the case that the first file set including the host file and the distributed file is received, the first file set can be backed up.

[0126] Optionally, in the embodiment, the first file set can be determined whether to be modified according to the switch judgment, and in the case that the first file set does not need to be modified, the host file can be stored in the corresponding storage space; in the case that the first file set needs to be modified, the first file set can be checked.

[0127] Optionally, in the embodiment, the registration file is used to check the host file and the distributed file, and the registration file is used to record the basic information of the business data in the first file set, and the basic information can include, but is not limited to, the number of bytes of the file, the number of records, the length of each row record, etc.

[0128] Optionally, in the embodiment, it can be but not limited to determining whether the host file and the distributed file pass the verification according to the basic information of the service data in the host file and the distributed file, for example: in the case that the basic information of the host file and the distributed file and the registration file are completely same, it is considered that the host file and the distributed file pass the verification. Or, in the case that the similarity of the basic information of the host file and the distributed file and the registration file falls into the target threshold, it is considered that the host file and the distributed file pass the verification.

[0129] In an example embodiment, it can be but not limited to acquiring the to-be-transformed file from the first file set according to the verification result of the first file set in the following manner: matching the host file with the registration file; in the case that the first basic information of the host file is not recorded in the registration file, determining that the verification result of the host file is failed; acquiring an updated host file and matching the updated host file with the registration file until the updated host file with the verification result of passing the verification is acquired, and determining the updated host file with the verification result of passing the verification as the to-be-transformed file; in the case that the first basic information of the host file is recorded in the registration file, matching the distributed file with the registration file; acquiring a partial file with the second basic information recorded in the registration file from the distributed file; and determining the host file and the partial file as the to-be-transformed file.

[0130] Optionally, in the embodiment, it can be but not limited to matching the host file with the registration file, in the case that the first basic information of the host file is recorded in the registration file, determining that the host file passes the verification; in the case that the first basic information of the host file is not recorded in the registration file, determining that the host file fails the verification, acquiring the latest host file to obtain an updated host file, and verifying the updated host file until the host file with the verification result of passing the verification is obtained.

[0131] Optionally, in the embodiment, in the case that the host file passes the verification, matching the distributed file with the registration file, in the case that the second basic information of the distributed file is not recorded in the registration file, determining the host file with the verification result of passing the verification as the to-be-transformed file; in the case that the second basic information of the complete distributed file is recorded in the registration file, determining the host file with the verification result of passing the verification and the distributed file as the to-be-transformed file; in the case that the second basic information of the partial distributed file is recorded in the registration file, determining the host file with the verification result of passing the verification and the distributed file with the verification result of passing the verification as the to-be-transformed file.

[0132] In the technical solution provided in step S103, the target service partition of the second file set can be determined according to the update frequency of the initial service file, the second file set includes the first service data of the reference service partition and the second service data of the initial service file, and the first service data and the second service data can be stored in the target service partition or in the corresponding target service partition, for example, the first service data is the service data of the reference service partition, and only the second service data is stored in the next service partition of the reference service partition in the target storage space; or the first service data and the second service data are stored in the next service partition of the reference service partition in the target storage space.

[0133] Optionally, in the embodiment, the first file set includes the host file and the distributed file, and the target storage space is the data lake. Figure 6 is a schematic diagram of the first file set according to an embodiment of the present application, as shown in Figure 6 For example, the host file can be obtained through FTP, and the distributed file can be received through kafka, the service data recorded in the host file and the service data recorded in the distributed file can be matched with the basic information of the service data recorded in the registration file, the host file and the distributed file can be checked, and the checking can include the following four cases.

[0134] If the host file does not pass the check, the updated host file is obtained for checking until the host file passes the check. If the host file passes the check, the distributed file is checked. If all the distributed files do not pass the check, the host file is processed into the lake (written into the data lake). If some of the distributed files pass the check, the distributed files that pass the check and the host file are determined as the files to be modified for modification. If all the distributed files pass the check, all the distributed files and the host file are determined as the files to be modified for modification.

[0135] The files to be modified can be modified through the following process to obtain the second file set.

[0136] The business partition corresponding to the to-be-transformed file is determined according to whether the update frequency of each to-be-transformed file is a high frequency, a corresponding reference business file is obtained according to the business partition corresponding to the to-be-transformed file (for example, in the case of a high frequency of the to-be-transformed file, a multi-batch algorithm is used for processing, that is, a plurality of batches are processed in an equal time period within a day; or in the case of a low frequency of the to-be-transformed file, a day-end algorithm is used for processing, that is, processing is performed once within a day), and second business data is selected from the to-be-transformed file according to whether the to-be-transformed file is a stock file, business data in the reference business file is combined with the second business data to obtain a traceable file, so as to obtain a set of traceable files, that is, a second file set, and each traceable file in the second file set is stored in the corresponding business partition according to the update frequency of the to-be-transformed file.

[0137] The method for storing business files provided in the embodiments of the present application comprises the following steps: obtaining a first file set of a business system for handling a target business in a target time period, the first file set comprising N initial business files for recording business data generated by the business system in the target time period when handling the target business, N being greater than or equal to 1; transforming each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set; and storing the second file set in a target business partition in a target storage space, wherein the target storage space comprises M business partitions, M being greater than or equal to 1. That is, the initial business files are transformed into traceable files meeting a target business feature according to the update frequency of the initial business files and whether the initial business files are incremental files, so that in the case of an error in the use of the business system using the corresponding initial business files, the file used by the business system is traced back to a reference time period before the target time period to the business file transformed and stored, so as to realize the rollback of the business system to the reference time period before the target time period using the transformed business file in the case of an error in the use of the file. The problem of low processing efficiency of abnormal data in the related art is solved, and the effect of improving the processing efficiency of abnormal data is achieved.

[0138] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0139] The embodiments of the present application also provide a storage device for business files. It should be noted that the storage device for business files of the embodiments of the present application can be used to execute the method for storing business files provided by the embodiments of the present application. The storage device for business files provided by the embodiments of the present application is introduced as follows.

[0140] Figure 7 is a schematic diagram of a storage device of a service file according to an embodiment of the present application. As shown in the figure, the device comprises: Figure 7

[0141] an acquisition module 72, configured to acquire a first file set of a service system in a target time period, wherein the service system is used to handle a target service, the first file set comprises N initial service files, N is greater than or equal to 1, and the initial service file is used to record service data generated by the service system in handling the target service in the target time period;

[0142] a modification module 74, configured to modify each of the initial service files according to a target file feature of each of the initial service files and a reference service file corresponding to each of the initial service files, to obtain a second file set, wherein the target file feature is used to indicate an update frequency of the initial service file and whether the initial service file is an incremental file, the second file set comprises N traceable files satisfying the target service feature, each of the traceable files is used to trace a file used by the service system to the corresponding reference service file in a case where the service system uses the corresponding initial service file and an error occurs, and the reference service file is a service file modified and stored in a reference time period before the target time period;

[0143] a storage module 76, configured to store the second file set to a target service partition in a target storage space, wherein the target storage space comprises M service partitions, and M is greater than or equal to 1.

[0144] Optionally, in the storage device of the service file provided in the embodiment of the present application, the modification module comprises:

[0145] a detection unit, configured to detect the target file feature of the initial service file, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is used to indicate whether the initial service file is an incremental file, and the update frequency feature comprises a high frequency and a low frequency, the high frequency is used to indicate that the update frequency of the initial service file is greater than or equal to a frequency threshold, and the low frequency is used to indicate that the update frequency of the initial service file is less than the frequency threshold;

[0146] a first modification unit, configured to modify the initial service file using the reference service file according to the update frequency feature and the added file feature to obtain the traceable file.

[0147] ​Optionally, in the business file storage apparatus provided by the embodiment of the present application, the detection unit is configured to: detect whether the initial business file is an incremental file, wherein the incremental file is used to indicate that the initial business file is a newly added business file; and calculate the update frequency feature of the initial business file according to the number of times of update of the initial business file in the target time period.

[0148] Optionally, in the business file storage apparatus provided by the embodiment of the present application, the detection unit is configured to: obtain the number of times of update of each piece of business data in the initial business file in the target time period; calculate the update frequency of the initial business file in the target time period according to the number of times of update; and determine the update frequency as the update frequency feature of the initial business file.

[0149] Optionally, in the business file storage apparatus provided by the embodiment of the present application, the first modification unit is configured to: obtain first business data of a reference business partition as the reference business file from the target storage space, wherein the reference business partition is a previous business partition of the target business partition; obtain second business data from the initial business file according to the new file feature; and combine the first business data and the second business data to obtain the traceable file.

[0150] Optionally, in the business file storage apparatus provided by the embodiment of the present application, the first modification unit is configured to: in a case where the new file feature indicates that the initial business file is the incremental file, obtain the latest piece of business data from the initial business file as the second business data; and in a case where the new file feature indicates that the initial business file is not the incremental file, obtain the latest piece of business data corresponding to each primary key from the initial business file and the reference business file as the second business data.

[0151] Optionally, in the business file storage apparatus provided by the embodiment of the present application, the first modification unit is configured to: in a case where the update frequency is the high frequency, determine that the reference business partition is a first business partition; and in a case where the update frequency feature is the low frequency, determine that the reference business partition is a second business partition, wherein the time length of the second business partition is greater than that of the first business partition.

[0152] Optionally, in the business file storage apparatus provided by the embodiment of the present application, the modification module comprises:

[0153] A checking unit is configured to check the first file set according to a registration file, wherein the registration file is used to record basic information of each service data in the first file set, and the first file set includes a host file and a distributed file;

[0154] A obtaining unit is configured to obtain a to-be-transformed file from the first file set according to a checking result of the first file set.

[0155] A second transforming unit is configured to transform each to-be-transformed file according to a target file feature of each to-be-transformed file and the reference service file corresponding to each to-be-transformed file, to obtain a second file set.

[0156] Optionally, in the service file storage device provided by the embodiment of the present application, the obtaining unit is configured to match the host file with the registration file; in a case where the registration file does not record first basic information of the host file, determine that a checking result of the host file is failed; obtain an updated host file and match the updated host file with the registration file until the updated host file with a passing checking result is obtained, and determine the updated host file with the passing checking result as the to-be-transformed file; in a case where the registration file has recorded the first basic information of the host file, match the distributed file with the registration file; obtain a partial file with second basic information recorded in the registration file from the distributed file; and determine the host file and the partial file as the to-be-transformed file.

[0157] The service file storage apparatus provided by the embodiments of the present application comprises the following steps: obtaining a first file set of a service system for handling a target service in a target time period, the first file set comprising N initial service files for recording service data generated by the service system in the target time period when handling the target service, N being greater than or equal to 1; transforming each initial service file according to a target file feature of each initial service file and a reference service file corresponding to each initial service file, to obtain a second file set; and storing the second file set in a target service partition in a target storage space, wherein the target storage space comprises M service partitions, M being greater than or equal to 1. That is, the initial service file is transformed into a traceable file meeting the target service feature according to the update frequency of the initial service file and whether the initial service file is an incremental file, and in the case that the service system using the corresponding initial service file has an error, the file used by the service system is traced back to the service file stored in the reference time period before the target time period and transformed, so as to realize the rollback of the service system to the reference time period before the target time period by using the transformed service file in the case that the user of the file has an error. The problem of low processing efficiency of abnormal data in the related art is solved, and the effect of improving the processing efficiency of abnormal data is achieved.

[0158] The Z device comprises a processor and a memory, the above modules, units and the like are stored in the memory as program units, and the corresponding functions are realized by the processor executing the above program units stored in the memory.

[0159] The processor comprises a core, and the core retrieves the corresponding program units from the memory. The core can be one or more, and the processing efficiency of abnormal data is improved by adjusting the core parameters.

[0160] The memory can comprise a non-permanent memory in a computer readable medium, a random access memory (RAM) and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory comprises at least one memory chip.

[0161] The embodiments of the present application provide a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the service file storage method.

[0162] The embodiments of the present application provide a processor, which is used to run a program, wherein the program is executed to perform the service file storage method.

[0163] As shown in Figure 8 The embodiments of the present application provide an electronic device, which comprises a processor, a memory and a program stored in the memory and executable on the processor, and the processor performs the following steps when executing the program:

[0164] obtaining a first file set of a business system in a target time period, wherein the business system is used for handling a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business files are used for recording business data generated by the business system in the target time period when handling the target business;

[0165] transforming each of the initial business files according to a target file feature of each of the initial business files and a reference business file corresponding to each of the initial business files, to obtain a second file set, wherein the target file feature is used for indicating an update frequency of the initial business files and whether the initial business files are incremental files, the second file set comprises N traceable files satisfying the target business feature, each of the traceable files is used for tracing a file used by the business system to the corresponding reference business file in a case that the business system uses the corresponding initial business file and an error occurs, and the reference business file is a business file transformed and stored in a reference time period before the target time period;

[0166] storing the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, and M is greater than or equal to 1.

[0167] Optionally, the transforming each of the initial business files according to the target file feature of each of the initial business files and the reference business file corresponding to each of the initial business files, to obtain the second file set, comprises:

[0168] detecting the target file feature of the initial business files, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is used for indicating whether the initial business files are incremental files, the update frequency feature comprises a high frequency and a low frequency, the high frequency is used for indicating that the update frequency of the initial business files is greater than or equal to a frequency threshold, and the low frequency is used for indicating that the update frequency of the initial business files is less than the frequency threshold;

[0169] transforming the initial business files to obtain the traceable files using the reference business files according to the update frequency feature and the added file feature.

[0170] Optionally, the detecting the target file feature of the initial business files comprises:

[0171] detecting whether the initial business files are incremental files, wherein the incremental files are used for indicating that the initial business files are added business files;

[0172] According to the number of times of updating of the initial business file in the target time period, the updating frequency feature of the initial business file is calculated.

[0173] Optionally, the calculation of the updating frequency feature of the initial business file according to the number of times of updating of the initial business file in the target time period comprises:

[0174] The number of times of updating of each business data in the initial business file in the target time period is obtained;

[0175] According to the number of times of updating, the updating frequency of the initial business file in the target time period is calculated;

[0176] The updating frequency is determined as the updating frequency feature of the initial business file.

[0177] Optionally, the reconstruction of the initial business file into the traceable file using the reference business file according to the updating frequency feature and the new file feature comprises:

[0178] The first business data of a reference business partition in the target storage space is obtained as the reference business file, wherein the reference business partition is a previous business partition of the target business partition;

[0179] According to the new file feature, the second business data is obtained from the initial business file;

[0180] The first business data and the second business data are combined to obtain the traceable file.

[0181] Optionally, the obtaining of the second business data from the initial business file according to the new file feature comprises:

[0182] In a case where the new file feature indicates that the initial business file is the incremental file, the latest business data in the initial business file is obtained as the second business data;

[0183] In a case where the new file feature indicates that the initial business file is not the incremental file, the latest business data corresponding to each primary key is obtained from the initial business file and the reference business file as the second business data.

[0184] Optionally, the obtaining of the first business data of the reference business partition in the target storage space as the reference business file comprises:

[0185] In a case where the updating frequency is the high frequency, the reference business partition is determined as a first business partition;

[0186] In a case that the update frequency feature is the low frequency, the reference service partition is determined as a second service partition, wherein a time length of the second service partition is greater than that of the first service partition.

[0187] Optionally, the second file set is obtained by modifying each of the initial service files according to a target file feature of each of the initial service files and a reference service file corresponding to each of the initial service files.

[0188] The first file set is verified according to a registration file, wherein the registration file is used to record basic information of each of the service data in the first file set, and the first file set includes a host file and a distributed file.

[0189] The to-be-modified file is obtained from the first file set according to a verification result of the first file set.

[0190] The second file set is obtained by modifying each of the to-be-modified files according to a target file feature of each of the to-be-modified files and the reference service file corresponding to each of the to-be-modified files.

[0191] Optionally, the to-be-modified file is obtained from the first file set according to a verification result of the first file set, including:

[0192] The host file is matched with the registration file.

[0193] In a case that the first basic information of the host file is not recorded in the registration file, a verification result of the host file is determined as not passing the verification; an updated host file is obtained, and the updated host file is matched with the registration file until the updated host file passing the verification is obtained; and the updated host file passing the verification is determined as the to-be-modified file.

[0194] In a case that the first basic information of the host file is recorded in the registration file, the distributed file is matched with the registration file; a part of file having second basic information recorded in the registration file is obtained from the distributed file; and the host file and the part of file are determined as the to-be-modified file.

[0195] The device herein can be a server, a PDA, a mobile phone, etc.

[0196] The application further provides a computer program product, which is adapted to execute a program of the following method steps when executed on a data processing device:

[0197] acquiring a first file set of a business system in a target time period, wherein the business system is used for handling a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business files are used for recording business data generated by the business system in the target time period when handling the target business;

[0198] transforming each of the initial business files according to a target file feature of each of the initial business files and a reference business file corresponding to each of the initial business files, to obtain a second file set, wherein the target file feature is used for indicating an update frequency of the initial business files and whether the initial business files are incremental files, the second file set comprises N traceable files satisfying the target business feature, and each of the traceable files is used for tracing a file used by the business system to the corresponding reference business file in a case where the business system uses the corresponding initial business file and an error occurs, the reference business file is a business file that is transformed and stored in a reference time period before the target time period;

[0199] storing the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, and M is greater than or equal to 1.

[0200] Optionally, the transforming each of the initial business files according to the target file feature of each of the initial business files and the reference business file corresponding to each of the initial business files, to obtain the second file set, comprises:

[0201] detecting the target file feature of the initial business file, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is used for indicating whether the initial business file is an incremental file, the update frequency feature comprises a high frequency and a low frequency, the high frequency is used for indicating that the update frequency of the initial business file is greater than or equal to a frequency threshold, and the low frequency is used for indicating that the update frequency of the initial business file is less than the frequency threshold;

[0202] transforming the initial business file to obtain the traceable file according to the update frequency feature and the added file feature using the reference business file.

[0203] Optionally, the detecting the target file feature of the initial business file comprises:

[0204] detecting whether the initial business file is an incremental file, wherein the incremental file is used for indicating that the initial business file is an added business file;

[0205] According to the number of times of updating of the initial business file in the target time period, the updating frequency feature of the initial business file is calculated.

[0206] Optionally, the calculation of the updating frequency feature of the initial business file according to the number of times of updating of the initial business file in the target time period comprises:

[0207] The number of times of updating of each business data in the initial business file in the target time period is obtained;

[0208] According to the number of times of updating, the updating frequency of the initial business file in the target time period is calculated;

[0209] The updating frequency is determined as the updating frequency feature of the initial business file.

[0210] Optionally, the reconstruction of the initial business file into the traceable file using the reference business file according to the updating frequency feature and the new file feature comprises:

[0211] The first business data of a reference business partition in the target storage space is obtained as the reference business file, wherein the reference business partition is a previous business partition of the target business partition;

[0212] According to the new file feature, the second business data is obtained from the initial business file;

[0213] The first business data and the second business data are combined to obtain the traceable file.

[0214] Optionally, the obtaining of the second business data from the initial business file according to the new file feature comprises:

[0215] In a case where the new file feature indicates that the initial business file is the incremental file, the latest business data in the initial business file is obtained as the second business data;

[0216] In a case where the new file feature indicates that the initial business file is not the incremental file, the latest business data corresponding to each primary key is obtained from the initial business file and the reference business file as the second business data.

[0217] Optionally, the obtaining of the first business data of the reference business partition in the target storage space as the reference business file comprises:

[0218] In a case where the updating frequency is the high frequency, the reference business partition is determined as the first business partition;

[0219] In a case that the update frequency feature is the low frequency, the reference service partition is determined as a second service partition, wherein a time length of the second service partition is greater than that of the first service partition.

[0220] Optionally, the second file set is obtained by transforming each of the initial service files according to a target file feature of each of the initial service files and a reference service file corresponding to each of the initial service files.

[0221] The first file set is verified according to a registration file, wherein the registration file is used to record basic information of each of the service data in the first file set, and the first file set includes a host file and a distributed file.

[0222] The to-be-transformed file is obtained from the first file set according to a verification result of the first file set.

[0223] The second file set is obtained by transforming each of the to-be-transformed files according to a target file feature of each of the to-be-transformed files and the reference service file corresponding to each of the to-be-transformed files.

[0224] Optionally, the to-be-transformed file is obtained from the first file set according to the verification result of the first file set, including:

[0225] The host file is matched with the registration file.

[0226] In a case that the first basic information of the host file is not recorded in the registration file, a verification result of the host file is determined as not passing the verification; an updated host file is obtained, and the updated host file is matched with the registration file until the updated host file passing the verification is obtained; and the updated host file passing the verification is determined as the to-be-transformed file.

[0227] In a case that the first basic information of the host file is recorded in the registration file, the distributed file is matched with the registration file; a part of file having second basic information recorded in the registration file is obtained from the distributed file; and the host file and the part of file are determined as the to-be-transformed file.

[0228] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, a system or a computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, ROM memory, flash memory, etc.) embodying computer program code thereon for use by or in connection with an instruction execution system. Program code embodied on a computer-usable storage medium can be transmitted using any apparatus adapted to transfer a set of data or instructions for execution by a processor.

[0229] The present application is described in reference to the flowchart and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks.

[0230] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks.

[0231] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks. Figure One one or more functions specified in the flowchart and / or block diagram block or blocks.

[0232] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0233] Memory can include non-persistent memory, Random Access Memory (RAM), and / or non-volatile memory such as read only memory (ROM) or flash memory, etc. in a computer readable medium. Memory is an example of computer readable media.

[0234] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0235] It should also be noted that the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusions such that a process, method, article, or apparatus that comprises a list of elements does not include those elements solely, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0236] Those skilled in the art will understand that embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product embodied in one or more computer usable storage medium (including but not limited to disk memory, CD-ROMs, optical storage devices, etc.) having computer usable program code embodied thereon.

[0237] The above merely provides an example of the present application and is not intended to limit the present application. Various modifications and changes can be made by those skilled in the art to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A storage method of a business document, characterized by, The method comprises: obtaining a first file set of a business system in a target time period, wherein the business system is used for handling a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business files are used for recording business data generated by the business system in the target time period when handling the target business; transforming each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, wherein the target file feature is used for indicating an update frequency of the initial business file and whether the initial business file is an incremental file, the second file set comprises N traceable files meeting the target business feature, and each traceable file is used for tracing a file used by the business system to the corresponding reference business file in a case where the business system uses the corresponding initial business file and an error occurs, the reference business file is a business file transformed and stored in a reference time period before the target time period; storing the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, M is greater than or equal to 1; wherein the transforming each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, comprises: detecting the target file feature of the initial business file, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is used for indicating whether the initial business file is an incremental file, the update frequency feature comprises a high frequency and a low frequency, the high frequency is used for indicating that the update frequency of the initial business file is greater than or equal to a frequency threshold, and the low frequency is used for indicating that the update frequency of the initial business file is less than the frequency threshold; and transforming the initial business file using the reference business file according to the update frequency feature and the added file feature to obtain the traceable file; wherein the transforming the initial business file using the reference business file according to the update frequency feature and the added file feature to obtain the traceable file comprises: obtaining first business data of a reference business partition from the target storage space as the reference business file, wherein the reference business partition is a previous business partition of the target business partition; obtaining second business data from the initial business file according to the added file feature; and combining the first business data and the second business data to obtain the traceable file. The first service data of the reference service partition in the target storage space is obtained as the reference service file, including: in the case that the update frequency is the high frequency, determining the reference service partition as a first service partition; in the case that the update frequency feature is the low frequency, determining the reference service partition as a second service partition, wherein the time length of the second service partition is greater than that of the first service partition.

2. The method of claim 1, wherein, The target file feature of the initial service file is detected, including: It is detected whether the initial service file is an incremental file, wherein the incremental file is used to indicate that the initial service file is a newly added service file; The update frequency feature of the initial service file is calculated according to the number of updates of the initial service file in the target time period.

3. The method of claim 2, wherein, The update frequency feature of the initial service file is calculated according to the number of updates of the initial service file in the target time period, including: The number of updates of each service data in the initial service file in the target time period is obtained; The update frequency of the initial service file in the target time period is calculated according to the number of updates; The update frequency is determined as the update frequency feature of the initial service file.

4. The method of claim 1, wherein, The second service data is obtained from the initial service file according to the new file feature, including: In the case that the new file feature indicates that the initial service file is the incremental file, the latest service data in the initial service file is obtained as the second service data; In the case that the new file feature indicates that the initial service file is not the incremental file, the latest service data corresponding to each primary key is obtained from the initial service file and the reference service file as the second service data.

5. The method of claim 1, wherein, Each initial service file is transformed according to the target file feature of each initial service file and the reference service file corresponding to each initial service file, to obtain a second file set, including: The first file set is verified according to a registration file, wherein the registration file is used to record the basic information of each service data in the first file set, and the first file set includes a host file and a distributed file; The to-be-transformed file is obtained from the first file set according to the verification result of the first file set; Each to-be-transformed file is transformed according to the target file feature of each to-be-transformed file and the reference service file corresponding to each to-be-transformed file, to obtain a second file set.

6. The method of claim 5, wherein, The to-be-transformed file is obtained from the first file set according to the verification result of the first file set, including: The host file and the registration file are matched; In a case where the first basic information of the host file is not recorded in the registration file, it is determined that the check result of the host file is failed; an updated host file is obtained and matched with the registration file until the updated host file with a passed check result is obtained, and the updated host file with the passed check result is determined as the file to be transformed; In a case where the first basic information of the host file is recorded in the registration file, the distributed file is matched with the registration file; a partial file with second basic information recorded in the registration file is obtained from the distributed file; and the host file and the partial file are determined as the file to be transformed.

7. A storage device for business documents, characterized by Comprise: An acquisition module is configured to acquire a first file set of a business system in a target time period, wherein the business system is configured to handle a target business, the first file set comprises N initial business files, N is greater than or equal to 1, and the initial business file is configured to record business data generated by the business system in the target time period when handling the target business; A transformation module is configured to transform each initial business file according to a target file feature of each initial business file and a reference business file corresponding to each initial business file, to obtain a second file set, wherein the target file feature is configured to indicate an update frequency of the initial business file and whether the initial business file is an incremental file, the second file set comprises N traceable files meeting the target business feature, each traceable file is configured to trace a file used by the business system to the corresponding reference business file in a case where the business system uses the corresponding initial business file and an error occurs, and the reference business file is a business file transformed and stored in a reference time period before the target time period; A storage module is configured to store the second file set to a target business partition in a target storage space, wherein the target storage space comprises M business partitions, M is greater than or equal to 1; The transformation module comprises a detection unit configured to detect the target file feature of the initial business file, wherein the target file feature comprises an added file feature and an update frequency feature, the added file feature is configured to indicate whether the initial business file is an incremental file, the update frequency feature comprises a high frequency and a low frequency, the high frequency is configured to indicate that the update frequency of the initial business file is greater than or equal to a frequency threshold, and the low frequency is configured to indicate that the update frequency of the initial business file is less than the frequency threshold; and a first transformation unit configured to transform the initial business file using the reference business file according to the update frequency feature and the added file feature to obtain the traceable file. The first transformation unit is further configured to: acquire first service data of a reference service partition as the reference service file from the target storage space, wherein the reference service partition is a previous service partition of the target service partition; acquire second service data from the initial service file according to the new file feature; and combine the first service data and the second service data to obtain the traceable file. The first transformation unit is further configured to: determine the reference service partition as a first service partition when the update frequency is the high frequency; and determine the reference service partition as a second service partition when the update frequency feature is the low frequency, wherein a time length of the second service partition is greater than that of the first service partition.

8. A processor, comprising: The processor is configured to run a program, and the program, when running, performs the method for storing the service file in any one of claims 1 to 6.

9. An electronic device, comprising: The apparatus comprises one or more processors and a memory configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for storing the service file in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semi-structured data processing method, processor, system and storage medium

    CN116244258A

  • Business data processing method and device, computer equipment and storage medium

    CN116302608A