Data storage method and device and computer equipment
By introducing constraint detection and accuracy detection in the data storage process, it ensures that the data meets the preset standards, solves the problem of data quality assurance in the existing technology, and improves the efficiency and accuracy of data storage.
Patent Information
- Application Number
- CN202411105579.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology lacks effective constraint detection in the data collection and storage process, making it difficult to guarantee data quality, and the data cleaning steps lack systematic processing, which reduces efficiency and accuracy.
Provide a data storage method that uses preset constraint strategies to perform constraint detection on the data set to be detected, and obtains the changed data after the detection passes, uses the detection strategy to verify its accuracy, and ensures that the data meets the preset standards before being stored in the target data table. middle. This method includes steps such as data acquisition, constraint detection, change data acquisition and accuracy detection, forming a complete data detection link.
Through constraint detection and accuracy detection, it ensures that data meets preset standards, improves the quality and accuracy of data storage, reduces the risk of human error, and improves the efficiency of data storage.
Smart Images

Figure CN118779308A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a data storage method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the rapid increase and diversification of information, it is necessary to effectively collect, organize, edit and publish information. In the prior art, data collection and storage is often a decentralized process. First, data collectors obtain data sets from multiple sources, clean the data and store them in the database. However, this method often lacks effective constraint detection on the quality of the data, and although the data cleaning step will perform a certain degree of error correction, it is usually based on empirical rules and lacks systematic data processing, which greatly reduces the efficiency and accuracy of data collection and storage. Summary of the invention
[0003] Based on this, it is necessary to provide a data storage method, apparatus, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.
[0004] In a first aspect, the present application provides a data storage method. The method comprises:
[0005] Get the data set to be tested;
[0006] Using a preset constraint strategy, performing constraint detection on the data set to be detected;
[0007] When the constraint detection is passed, obtaining the changed data in the to-be-detected data set; wherein the changed data includes data that is different between the to-be-detected data set and the target data table;
[0008] Using a preset detection strategy, the changed data is detected to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate;
[0009] When the changed data detection result is a target detection result, the changed data is stored in the target data table.
[0010] In one embodiment, obtaining the data set to be detected includes:
[0011] Obtaining data dimensions of the data table;
[0012] Using the data dimension, matching the data set of the corresponding dimension from the candidate data table to obtain the initial data set to be detected;
[0013] The data set that does not exist in the candidate data table is obtained and merged into the initial data set to be detected to obtain the data set to be detected.
[0014] In one embodiment, the step of obtaining a data set to be detected includes:
[0015] Obtaining the data set to be detected and the data dimensions of the data table;
[0016] Using a preset grouping strategy, grouping the data dimensions;
[0017] A detection node is established for each group respectively; wherein the detection node is used to perform constraint detection and accuracy detection on the data set to be detected.
[0018] In one embodiment, storing the changed data in the target data table includes:
[0019] Using the storage strategy of the target data table, the changed data is processed to obtain the target data;
[0020] The target data is stored in the target data table.
[0021] In one embodiment, the using a preset constraint strategy to perform constraint detection on the to-be-detected data set includes:
[0022] Using a preset constraint strategy, a constraint test is performed on the to-be-tested data set to obtain a constraint test result;
[0023] When the constraint detection result is passed, a preset sampling strategy is used to obtain a target data set to be detected from the data sets to be detected that have passed the constraint detection, and the constraint strategy is used to perform constraint detection on the target data set to obtain a sampling result of the target detection data set;
[0024] When the sampling inspection result of the target data set to be inspected is not passed, the constraint inspection result of the target data set to be inspected is modified to not passed.
[0025] In one embodiment, the method further comprises:
[0026] Generate a record file; wherein the record file includes at least one of the following: a constraint detection record file, an accurate detection record file, and a data storage record file.
[0027] In a second aspect, the present application also provides a data storage device. The device comprises:
[0028] A data acquisition module is used to acquire the data set to be detected;
[0029] A constraint detection module, used to perform constraint detection on the to-be-detected data set using a preset constraint strategy;
[0030] A changed data acquisition module, used for acquiring changed data in the data set to be detected when the constraint detection passes; wherein the changed data includes data that differs between the data set to be detected and the target data table;
[0031] An accuracy detection module, used to detect the changed data using a preset detection strategy to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate;
[0032] The data storage module is used to store the changed data in the target data table when the changed data detection result is a target detection result.
[0033] In one embodiment, the data acquisition module includes:
[0034] A dimension acquisition submodule, used to acquire the data dimension of the data table;
[0035] A data matching submodule is used to use the data dimension to match the data set of the corresponding dimension from the candidate data table to obtain an initial data set to be detected;
[0036] The data acquisition submodule is used to acquire the data set that does not exist in the candidate data table and merge it into the initial data set to be detected to obtain the data set to be detected.
[0037] In one embodiment, the data acquisition module includes:
[0038] A dimension acquisition submodule, used to acquire the data dimensions of the data set to be detected and the data table;
[0039] A data grouping submodule, used to group the data dimensions using a preset grouping strategy;
[0040] The node establishment submodule is used to establish detection nodes for each group; wherein the detection nodes are used to perform constraint detection and accuracy detection on the data set to be detected.
[0041] In one embodiment, the data storage module includes:
[0042] A data conversion submodule, used to process the changed data using the storage strategy of the target data table to obtain target data;
[0043] The data storage submodule is used to store the target data in the target data table.
[0044] In one embodiment, the accuracy detection module includes:
[0045] The constraint detection submodule is used to perform constraint detection on the to-be-detected data set using a preset constraint strategy to obtain a constraint detection result;
[0046] The constraint detection submodule is further used to, when the constraint detection result is passed, use a preset sampling strategy to obtain a target data set to be detected from the data sets to be detected that have passed the constraint detection, and use the constraint strategy to perform constraint detection on the target data set to obtain a sampling result of the target detection data set;
[0047] The constraint detection submodule is further configured to modify the constraint detection result of the target data set to be detected as failed when the sampling result of the target data set to be detected is failed.
[0048] In one embodiment, the method further comprises:
[0049] The record generation module is used to generate a record file; wherein the record file includes at least one of the following: a constraint detection record file, an accurate detection record file, and a data storage record file.
[0050] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the data storage method as described in any one of the embodiments of the present disclosure is implemented.
[0051] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data storage method as described in any one of the embodiments of the present disclosure is implemented.
[0052] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the data storage method as described in any one of the embodiments of the present disclosure is implemented.
[0053] The above-mentioned data storage method, device, computer equipment, storage medium and computer program product detect the data type of the data set to be detected through constraint detection, and use the detection strategy to detect the accuracy of the changed data in the data to be detected. When both the constraint detection and the accuracy are passed, the data is stored in the target data table. A complete set of data detection links from data acquisition, data detection, and data storage is provided. Through constraint detection and change data detection, it can be ensured that the data to be detected meets the preset standards, thereby improving the quality of data storage. By automatically acquiring data and performing detection, the efficiency of data storage is improved, the risk of human error is reduced, and the accuracy of data storage is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a flow chart of a data storage method in one embodiment;
[0055] Figure 2 A schematic diagram of a process for obtaining a data set to be detected in one embodiment;
[0056] Figure 3 A schematic diagram of a process of grouping data dimensions in one embodiment;
[0057] Figure 4 A schematic diagram of a process of storing data into a data table in one embodiment;
[0058] Figure 5 A schematic diagram of a process of data constraint detection in one embodiment;
[0059] Figure 6 A schematic diagram of an implementation of a data storage method in one embodiment;
[0060] Figure 7 A schematic diagram showing data differences in one embodiment;
[0061] Figure 8 is a structural block diagram of a data storage device in one embodiment;
[0062] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] In one embodiment, Figure 1As shown, a data storage method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0065] Step S100, obtaining a data set to be detected.
[0066] In an exemplary embodiment, obtaining the data set to be detected may include directly collecting business data from the business system, or extracting dimensional data from other databases using a data cleaning method, and then obtaining empty data in the data set using the collection method.
[0067] In an exemplary embodiment, before obtaining the data set to be detected, the business may be analyzed and a corresponding empty data table may be created. Data may be obtained in sequence for data attributes in the empty data table (i.e., data categories stored in each column), and the data may be combined to obtain the data set to be detected.
[0068] Step S200: performing constraint detection on the to-be-detected data set using a preset constraint strategy.
[0069] In an exemplary embodiment, before performing constraint detection on the data set to be detected, the following may be included: performing corresponding conversion on the data set to be detected, that is, using different templates so that the data set to be detected can be rendered more clearly. For example, JSON data can be subjected to template switching operations to realize list display of JSON data, which greatly improves the convenience of candidate detection.
[0070] In an exemplary embodiment, the constraint strategy may include data format constraints, non-empty constraints, etc. Specifically, the data format constraints may include data value constraints, data type constraints, etc. For example, the data value constraints may include a percentage not less than 0 and not greater than 1, etc.; the data type constraints may include that the data type is double type, and when the input data type is char type, the constraint check fails, and when the input data type is int type, the int type data can be converted into double type, etc.; the non-empty constraints may include setting the data to be non-empty, that is, it cannot be empty, and when the data is empty, the constraint check fails, etc.
[0071] Step S300, when the constraint detection passes, obtaining the changed data in the to-be-detected data set; wherein the changed data includes data that is different between the to-be-detected data set and the target data table.
[0072] In an exemplary embodiment, the change data may include that the corresponding data in the to-be-detected data set is inconsistent with the corresponding data in the target data table, or that the corresponding data in the target data table is empty, etc. It is understandable that both the target data table and the to-be-detected data set may have a unique identifier, which may be used to determine the corresponding data in the target data table and the to-be-detected data set.
[0073] In an exemplary embodiment, the target data table may include a data table in which data needs to be stored, etc. Specifically, the target data table may be empty, in which case all the data sets to be detected are changed data, etc.
[0074] In an exemplary embodiment, after the changed data is acquired, the changed data may be highlighted in the data set to be detected, or the changed data in the data set to be detected and the corresponding data in the target data table may be extracted respectively, and subsequent judgment may be performed.
[0075] Step S400, using a preset detection strategy to detect the changed data to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate.
[0076] In an exemplary embodiment, the detection strategy may be used to detect whether the changed data is accurate, or detect whether the data change is within a preset range, etc. The detection strategy may specifically include manually detecting the accuracy of the changed data, etc.
[0077] In an exemplary embodiment, when the data constraint detection fails or the detection result is inaccurate, the corresponding data is sent to the corresponding data maintenance personnel, and the data maintenance personnel edits and modifies the received data.
[0078] Step S500: When the changed data detection result is a target detection result, the changed data is stored in the target data table.
[0079] In an exemplary embodiment, the target detection result may include an accuracy detection result of accurate, etc.; before storing the changed data in the target data table, the data type of the changed data may be adjusted to the data type corresponding to the target data table, etc.
[0080] In the above data storage method, the data type of the data set to be tested is tested through constraint detection, and the accuracy of the changed data in the data to be tested is tested using the detection strategy. When both the constraint detection and the accuracy are passed, the data is stored in the target data table. A complete set of data detection links from data acquisition, data detection, and data storage is provided. Through constraint detection and change data detection, it can be ensured that the data to be tested meets the preset standards, thereby improving the quality of data storage. By automatically acquiring data and performing detection, the efficiency of data storage is improved, the risk of human error is reduced, and the accuracy of data storage is improved.
[0081] In one embodiment, Figure 2 As shown, obtaining the data set to be stored includes:
[0082] Step S101, obtaining the data dimension of the target data table.
[0083] In an exemplary embodiment, the data dimension may include the attributes of each column of the data table, etc. For example, if the data table is a transcript of a school, the data dimension may include name, gender, subject, score, etc.
[0084] Step S102: using the data dimension, matching the data set of the corresponding dimension from the candidate data table to obtain the initial data set to be stored.
[0085] In an exemplary embodiment, the candidate data table may include a data table that has a certain association relationship with the target data table. For example, the target data table is a transcript of a school, and the data dimensions include name, gender, subject, and score; the candidate data table may include a gender data table, and the data dimensions include name and gender; in this case, the name and gender in the candidate data table may be determined as the initial data set to be detected.
[0086] Step S103, obtaining a data set that does not exist in the candidate data table, and merging it into the initial data set to be stored, to obtain the data set to be stored.
[0087] In an exemplary embodiment, the initial data set to be detected may include all data of all data dimensions, and may also include data of some data dimensions, etc. For example, the target data table is a school transcript, and the data dimensions include name, gender, subject, and score; there are two candidate data tables, namely a gender table and a score table, the gender table includes name and gender, and the score table includes name, subject, and score; at this time, the candidate data table includes data of all data dimensions, etc. In another exemplary embodiment, the initial data set to be detected may include some data of the data dimensions, and may also include all data of the data dimensions, etc. For example, the XX school transcript includes two classes A and B, and the data dimensions include name, gender, and score; there are two candidate data tables, namely the gender table of class A and the score table of class B, at this time, the data about the students in the class is all the data of the data dimension, and the gender and score are part of the data dimension, etc. Acquiring data not existing in the candidate data table may include acquiring data that is empty in the initial data to be detected, etc. Specifically, it may include empty data in the initial data table to be detected, etc.
[0088] In an exemplary embodiment, obtaining a data set that does not exist in the candidate data table may include collecting corresponding data; or obtaining the data set by manually analyzing the file.
[0089] In this embodiment, by acquiring data dimensions and using candidate data sets to determine an initial data set to be detected, a data set that does not exist in the initial data set to be detected is acquired, thereby improving the efficiency of data acquisition.
[0090] In one embodiment, Figure 3 As shown, the step of obtaining the data set to be detected includes:
[0091] Step S111, obtaining the data set to be detected and the data dimensions of the data table.
[0092] Step S112: grouping the data dimensions using a preset grouping strategy.
[0093] In an exemplary embodiment, the grouping strategy may include dynamic allocation according to real-time demand to ensure that the workload handled by each group is balanced, etc. In an exemplary embodiment, after the data dimensions are grouped, for example, the original data dimensions include seven dimensions of abcdefg, where a is a data identifier, which can be divided into three groups, namely abc, ade, and afg. In the actual detection process, you can choose to display and hide the corresponding fields, that is, if the table data originally displayed is abcdefg, you can choose to hide defg and only display abc, etc.
[0094] Step S113, establishing detection nodes for each group; wherein the detection nodes are used to perform constraint detection and accuracy detection on the data set to be detected.
[0095] In an exemplary embodiment, the detection node may include distributed constraint detection and accuracy detection of the data set to be detected; or multi-threaded constraint detection and accuracy detection of the data set to be detected, etc. Specifically, the detection node may also include auditors, different auditors' data, different dimensions of data, etc.
[0096] In another exemplary embodiment, the data dimensions may be grouped before obtaining the data set to be detected, and different nodes may be used for collection to obtain corresponding data.
[0097] In this embodiment, by grouping the data using data dimensions and establishing detection nodes respectively, the data can be detected in a distributed manner, thereby improving the efficiency of data detection.
[0098] In one embodiment, Figure 4 As shown, storing the changed data into the target data table includes:
[0099] Step S501: Process the changed data using the storage strategy of the target data table to obtain target data.
[0100] In an exemplary embodiment, the storage strategy may include converting the data into a data type corresponding to the data table, such as converting int type into double type, etc.; the storage strategy may include normalizing the data, for example, the unit of each type of data is consistent; for example, the unit of length is m; the corresponding speed unit is m / s, etc.
[0101] Step S502: storing the target data in the target data table.
[0102] In this embodiment, the changed data is processed through the storage strategy, so that the changed data can be converted into a data format corresponding to the target data table and normalized, thereby ensuring the consistency and reliability of the data and improving the accuracy of the data.
[0103] In one embodiment, Figure 5 As shown, the use of a preset constraint strategy to perform constraint detection on the to-be-detected data set includes:
[0104] Step S201 , using a preset constraint strategy, performs constraint detection on the to-be-detected data set to obtain a constraint detection result.
[0105] Step S202, when the constraint detection result is passed, using a preset sampling strategy, obtain a target data set to be detected from the data sets to be detected that have passed the constraint detection, and use the constraint strategy to perform constraint detection on the target data set to obtain a sampling result of the target detection data set.
[0106] In an exemplary embodiment, the sampling strategy may include performing a quadratic constraint test on data with a weight greater than a preset threshold, and randomly selecting data for a quadratic constraint test, etc. Specifically, it may include setting a preset sampling ratio, randomly selecting data from constraint test data for a quadratic constraint test, etc.
[0107] Step S203, when the sampling inspection result of the target data set to be inspected is not passed, modifying the constraint inspection result of the target data set to be inspected to not passed.
[0108] In an exemplary embodiment, if the sampling inspection result fails, the data can be transmitted to the data maintenance personnel, who can edit the data and continue the review.
[0109] In this embodiment, by setting a sampling strategy and performing a secondary constraint test on the data that passes the constraint test, the accuracy of the constraint test can be improved, and the accuracy of data storage can be further improved.
[0110] In one embodiment, the method further comprises:
[0111] Generate a record file; wherein the record file includes at least one of the following: a constraint detection record file, an accurate detection record file, and a data storage record file.
[0112] In an exemplary embodiment, the constraint detection record file may include a data constraint detection record file and a random inspection constraint detection record file. After the detection is completed, the system can automatically display the random inspection record to facilitate the detection personnel to perform detailed detection and result determination, etc. This greatly facilitates the later data problem tracking and analysis.
[0113] In an exemplary embodiment, the accurate detection record file may include specific detection results; when the detection result is wrong, the error area can be recorded, and the area where the correct data corresponding to the error area is found can be indicated, so as to facilitate data maintenance personnel to edit and modify the data.
[0114] In an exemplary embodiment, the data storage record file may include data records stored in a data table, so as to facilitate the subsequent maintenance of the data table.
[0115] In this embodiment, the generation of constraint detection record files, accurate detection record files, and data storage record files can facilitate the tracking and analysis of data problems at a later stage and improve the stability of data storage.
[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0117] In an exemplary embodiment, the data storage method may be as follows: Figure 6 The flowchart shown in the figure is implemented, including: data table system, collection and editing system, cleaning system and downstream system, specifically including:
[0118] The data table system can be used to organize business information, establish data tables, and corresponding storage rules, such as metadata. In actual use, the business can be organized, and the data table structure can be set and managed to meet different business needs.
[0119] The collection and editing system can be used for data collection and editing (data collection, editing and integration, etc.), reference process and data allocation (data allocation can be completed by referring to preset allocation rules, i.e., grouping rules), data maintenance (data can be edited so that the data meets the constraint strategy and accuracy strategy, and different templates are used to display the collected data, etc.), data review (can be used to review the collected data to determine whether it meets the constraint detection, etc.), data quality inspection (can be used for secondary judgment whether it meets the constraint detection, which can specifically include random sampling and specific sampling, etc.), data difference (the difference between the existing data in the table data and the collected data can be compared to further determine the accuracy of the collected data, etc.); specifically, the grouping rules can include dynamically allocating data to different groups according to implementation requirements, etc.; the constraint strategy can include data format constraints, non-empty constraints, etc. Specifically, the data format constraints can include data value constraints, data type constraints, etc. The accuracy strategy can include using manual methods to determine whether the data is accurate, etc. It is understandable that using different templates can help to display different data, greatly improving the efficiency of data auditing and reducing the professional requirements for auditors. For example, JSON data requires files with certain professional knowledge to understand, and different templates can be used to display JSON data through corresponding table data. Data differences can include highlighting and comparing the different data, so that the changed data can be identified more intuitively, so as to quickly and accurately judge the consistency and accuracy of the data, improve the detection efficiency and accuracy, etc. You can also export the different data, such as Figure 7 The pictures shown show the old data and the new data for observation. When the data fails to pass the data review or data quality inspection or there is a data difference, the data can be returned to the data allocation or data maintenance to edit and modify the data. Specifically, Figure 7 In the table, field A and field D indicate that there are differences between the new data and the old data, the new data is XX, and the old data is YY; field B indicates that the old data is XX and the new data is empty, and here the new data and the old data also differ; field C indicates that the old data is empty and the new data is XX, indicating that the data is newly added and needs to be reviewed; field E indicates that both the new data and the old data are empty, indicating that there is no difference, but since field E is a non-empty field, it can also display fields where both the old data and the new data are empty and the field is non-empty, etc.
[0120] The cleaning system can be used to clean the data in other databases into the created table data; specifically, when data needs to be collected and edited, the cleaning system is first used to match the data of the corresponding dimension from other data tables, and then the data that does not exist in other data tables is supplemented by collection and editing; the data synchronization can include storing the data in the table data during the data cleaning process;
[0121] If the data difference passes the accuracy detection, review, and quality inspection, the data is stored in the table data, and a corresponding change record is created and stored in the corresponding change history;
[0122] After the table data is completed, the cleaning system can re-clean the data and transmit the cleaned data to downstream for use; wherein, the re-cleaning may include normalizing the data, etc.
[0123] Based on the same inventive concept, the embodiment of the present application also provides a data storage device for implementing the data storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more data storage device embodiments provided below can refer to the limitations on the data storage method above, and will not be repeated here.
[0124] In one embodiment, Figure 8 As shown, a data storage device 100 is provided, comprising: a data acquisition module 101, a constraint detection module 102, a change data acquisition module 103, an accuracy detection module 104 and a data storage module 105, wherein:
[0125] A data acquisition module is used to acquire the data set to be detected;
[0126] A constraint detection module, used to perform constraint detection on the to-be-detected data set using a preset constraint strategy;
[0127] A changed data acquisition module, used for acquiring changed data in the data set to be detected when the constraint detection passes; wherein the changed data includes data that differs between the data set to be detected and the target data table;
[0128] An accuracy detection module, used to detect the changed data using a preset detection strategy to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate;
[0129] The data storage module is used to store the changed data in the target data table when the changed data detection result is a target detection result.
[0130] In one embodiment, the data acquisition module includes:
[0131] A dimension acquisition submodule, used to acquire the data dimension of the data table;
[0132] A data matching submodule is used to use the data dimension to match the data set of the corresponding dimension from the candidate data table to obtain an initial data set to be detected;
[0133] The data acquisition submodule is used to acquire the data set that does not exist in the candidate data table and merge it into the initial data set to be detected to obtain the data set to be detected.
[0134] In one embodiment, the data acquisition module includes:
[0135] A dimension acquisition submodule, used to acquire the data dimensions of the data set to be detected and the data table;
[0136] A data grouping submodule, used to group the data dimensions using a preset grouping strategy;
[0137] The node establishment submodule is used to establish detection nodes for each group; wherein the detection nodes are used to perform constraint detection and accuracy detection on the data set to be detected.
[0138] In one embodiment, the data storage module includes:
[0139] A data conversion submodule, used to process the changed data using the storage strategy of the target data table to obtain target data;
[0140] The data storage submodule is used to store the target data in the target data table.
[0141] In one embodiment, the accuracy detection module includes:
[0142] The constraint detection submodule is used to perform constraint detection on the to-be-detected data set using a preset constraint strategy to obtain a constraint detection result;
[0143] The constraint detection submodule is further used to, when the constraint detection result is passed, use a preset sampling strategy to obtain a target data set to be detected from the data sets to be detected that have passed the constraint detection, and use the constraint strategy to perform constraint detection on the target data set to obtain a sampling result of the target detection data set;
[0144] The constraint detection submodule is further configured to modify the constraint detection result of the target data set to be detected as failed when the sampling result of the target data set to be detected is failed.
[0145] In one embodiment, the method further comprises:
[0146] The record generation module is used to generate a record file; wherein the record file includes at least one of the following: a constraint detection record file, an accurate detection record file, and a data storage record file.
[0147] Each module in the above data storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0148] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data storage method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0149] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0151] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data storage method, characterized in that: The method comprises: Get the data set to be tested; Using a preset constraint strategy, performing constraint detection on the data set to be detected; When the constraint detection is passed, obtaining the changed data in the to-be-detected data set; wherein the changed data includes data that is different between the to-be-detected data set and the target data table; Using a preset detection strategy, the changed data is detected to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate; When the changed data detection result is a target detection result, the changed data is stored in the target data table.
2. The method according to claim 1, characterized in that The obtaining of the to-be-detected data set comprises: Obtaining data dimensions of the data table; Using the data dimension, matching the data set of the corresponding dimension from the candidate data table to obtain the initial data set to be detected; The data set that does not exist in the candidate data table is obtained and merged into the initial data set to be detected to obtain the data set to be detected.
3. The method according to claim 1, characterized in that The step of obtaining the data set to be detected includes: Obtaining the data set to be detected and the data dimensions of the data table; Using a preset grouping strategy, grouping the data dimensions; A detection node is established for each group respectively; wherein the detection node is used to perform constraint detection and accuracy detection on the data set to be detected.
4. The method according to claim 1, characterized in that: The storing the changed data into the target data table comprises: Using the storage strategy of the target data table, the changed data is processed to obtain the target data; The target data is stored in the target data table.
5. The method according to claim 1, characterized in that The method of using a preset constraint strategy to perform constraint detection on the to-be-detected data set includes: Using a preset constraint strategy, a constraint test is performed on the to-be-tested data set to obtain a constraint test result; When the constraint detection result is passed, a preset sampling strategy is used to obtain a target data set to be detected from the data sets to be detected that have passed the constraint detection, and the constraint strategy is used to perform constraint detection on the target data set to obtain a sampling result of the target detection data set; When the sampling inspection result of the target data set to be inspected is not passed, the constraint inspection result of the target data set to be inspected is modified to not passed.
6. The method according to claim 1, characterized in that The method further comprises: Generate a record file; wherein the record file includes at least one of the following: a constraint detection record file, an accurate detection record file, and a data storage record file.
7. A data storage device, characterized in that: The device comprises: A data acquisition module is used to acquire the data set to be detected; A constraint detection module, used to perform constraint detection on the to-be-detected data set using a preset constraint strategy; A changed data acquisition module, used for acquiring changed data in the data set to be detected when the constraint detection passes; wherein the changed data includes data that differs between the data set to be detected and the target data table; An accuracy detection module, used to detect the changed data using a preset detection strategy to obtain a detection result of the changed data; wherein the detection strategy is used to detect whether the changed data is accurate; The data storage module is used to store the changed data in the target data table when the changed data detection result is a target detection result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data quality detection method and device, electronic equipment and storage medium
CN113760874A
Data quality detection method and device and computer equipment
CN116894031A
