Data processing device and method, and computer readable storage medium

By extracting, integrating and analyzing the data in the factory database in the data processing equipment, it solves the problem of difficulty in meeting the minute-level synchronization requirements of manufacturing data in the existing technology, achieves the real-time and accuracy of the data, and satisfies the user's demand for data. real-time processing requirements.

CN113196257BActive Publication Date: 2024-09-13BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980002701.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-29
Publication Date
2024-09-13
Estimated Expiration
2040-01-13

AI Technical Summary

Technical Problem

Existing data processing technology is difficult to meet the minute-level synchronization needs of data in the manufacturing industry. Especially when extracting data from a relational database to a distributed storage system, it cannot effectively meet the real-time requirements of users for data.

Method used

By using memory and processor in data processing equipment, data extraction, integration and analysis processing are realized. Specific steps include: extracting data from the factory database in an extraction cycle, storing it in the data table of the distributed storage system, and pre-processing it. Set time periods for data inspection and integration to ensure data consistency and accuracy, and use distributed file systems and Hive tools for data processing and analysis.

Benefits of technology

It realizes the minute-level synchronization requirements for extracting data from relational databases to distributed storage systems, meets the manufacturing industry's requirements for data real-time and accuracy, and improves data processing efficiency and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113196257B
    Figure CN113196257B
Patent Text Reader

Abstract

The present disclosure provides a data processing device and method, and a computer-readable storage medium. The data processing device includes a memory and a processor, and the processor performs the following operations based on the instructions stored in the memory: extracting the first data in the first data table in the factory database in a first extraction cycle, the first data includes the data updated by the factory in the first extraction cycle, the factory database is a relational database, and the first extraction cycle is greater than 1 minute; storing the first data in the second data table of the distributed storage system to form the second data; integrating the second data and storing it in the third data table of the distributed storage system to form the third data; calling the data in the third data table in a first analysis cycle to perform data analysis and processing, and the first analysis cycle is not less than the first extraction cycle. The present disclosure can extract data from a relational database into a distributed storage system and meet the user's demand for minute-level synchronization of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing device and method, and a computer-readable storage medium. Background Art

[0002] In the field of big data processing, the required data needs to be extracted from relational databases into the big data platform. The big data platform processes the extracted data according to business logic to meet the data needs of upper-level applications.

[0003] In related technologies, the required data is extracted from a relational database into a big data platform by using ETL (Extract-Transform-Load) tools. Summary of the Invention

[0004] According to a first aspect of an embodiment of the present disclosure, a data processing device is provided, comprising: at least one memory configured to store instructions; at least one processor coupled to the at least one memory, the at least one processor being configured to perform the following operations based on the instructions stored in the memory: extracting first data from a first data table in a factory database with a first extraction cycle, the first data including data updated by the factory within the first extraction cycle, the factory database being a relational database, and the first extraction cycle being greater than 1 minute; storing the first data in a second data table of a distributed storage system to form second data; integrating the second data and inserting it into a third data table of the distributed storage system to form third data; and calling the data in the third data table to perform data analysis and processing with a first analysis cycle, the first analysis cycle being no less than the first extraction cycle.

[0005] In some embodiments, after integrating the second data and inserting it into a third data table of the distributed storage system to form third data, the method further includes: during a preset time period, using the data stored in the second data table during the first processing cycle to check the data inserted in the third data table during the first processing cycle, so as to ensure that the data inserted in the third data table during the first processing cycle is consistent with the data updated in the first data table during the first processing cycle; during the preset time period, the first analysis cycle is greater than a preset threshold. In some embodiments, the first extraction cycle ranges from 10 minutes to 1 day.

[0006] In some embodiments, using the data stored in the second data table in the first processing cycle to check the data inserted in the first processing cycle in the third data table includes: using the data stored in the second data table in the first processing cycle to at least deduplicate or fill in the data inserted in the first processing cycle in the third data table.

[0007] In some embodiments, the first data table includes a first data sub-table and a second data sub-table, the second data table includes a third data sub-table and a fourth data sub-table, the first data sub-table includes the first sub-data modified in the factory database, and the second data sub-table includes the second sub-data removed during the modification process; extracting the first data in the first data table with the first extraction cycle includes: extracting the first sub-data from the first data sub-table and extracting the second sub-data from the second data sub-table with the first extraction cycle; storing the first data in the second data table includes: storing the first sub-data in the third data sub-table to form the third sub-data, and storing the second sub-data in the fourth data sub-table to form the fourth sub-data; and inserting the second data into the third data table after data integration includes: inserting the third sub-data into the third data table after data integration.

[0008] In some embodiments, using the data in the second data table to check the data in the third data table includes: using the data in the fourth data sub-table stored in the second processing cycle to filter the data in the third data table inserted in the second processing cycle, so as to remove the fourth sub-data in the third data table inserted in the second processing cycle; the second processing cycle is greater than the first processing cycle.

[0009] In some embodiments, the second data includes fifth sub-data and sixth sub-data, and the sixth sub-data is in a compressed format; integrating the second data and then inserting it into the third data table includes: converting the format of the sixth sub-data to obtain seventh sub-data having a preset data format; associating the fifth sub-data and the seventh sub-data according to a data identifier to obtain fourth data; and integrating the fourth data and then inserting it into the third data table.

[0010] In some embodiments, format-converting the sixth sub-data includes: extracting the sixth sub-data from the second data; and sending the sixth sub-data to a Linux server so that the Linux server formats the sixth sub-data to obtain seventh sub-data having the preset data format.

[0011] In some embodiments, the compression format of the sixth sub-data is BLOB format.

[0012] According to a second aspect of an embodiment of the present disclosure, a data processing method is provided, including: extracting first data from a first data table in a factory database with a first extraction cycle, the first data including data updated by the factory within the first extraction cycle, the factory database being a relational database, and the first extraction cycle being greater than 1 minute; storing the first data in a second data table of a distributed storage system to form second data; integrating the second data and inserting it into a third data table of the distributed storage system to form third data; and calling the data in the third data table to perform data analysis and processing with a first analysis cycle, the first analysis cycle being no less than the first extraction cycle.

[0013] In some embodiments, after the second data is integrated and inserted into the third data table of the distributed storage system to form the third data, it also includes: in a preset time period, using the data stored in the second data table in the first processing cycle to check the data in the third data table inserted in the first processing cycle, so that the data in the third data table inserted in the first processing cycle is consistent with the data in the first data table updated in the first processing cycle; in the preset time period, the first analysis cycle is greater than a preset threshold.

[0014] In some embodiments, the first extraction period ranges from 10 minutes to 1 day.

[0015] In some embodiments, the first data table includes a first data sub-table and a second data sub-table, the second data table includes a third data sub-table and a fourth data sub-table, the first data sub-table includes the first sub-data modified in the factory database, and the second data sub-table includes the second sub-data removed during the modification process; extracting the first data from the first data table in the first extraction cycle includes: extracting the first sub-data from the first data sub-table and the second sub-data from the second data sub-table in the first extraction cycle; storing the first data in the second data table includes: storing the first sub-data in the third data sub-table to form the third sub-data, and storing the second sub-data in the fourth data sub-table to form the fourth sub-data; inserting the second data into the third data table after data integration includes: inserting the third sub-data into the third data table after data integration; checking the data in the third data table using the data in the second data table includes: filtering the data in the third data table inserted in the second processing cycle using the data in the fourth data sub-table stored in the second processing cycle, so as to remove the fourth sub-data in the third data table inserted in the second processing cycle; the second processing cycle is greater than the first processing cycle.

[0016] In some embodiments, the second data includes fifth sub-data and sixth sub-data, and the sixth sub-data is in a compressed format; integrating the second data and then inserting it into the third data table includes: extracting the sixth sub-data from the second data; sending the sixth sub-data to a Linux server so that the Linux server performs format conversion on the sixth sub-data to obtain seventh sub-data having the preset data format; associating the fifth sub-data and the seventh sub-data according to a data identifier to obtain fourth data; and integrating the fourth data and then inserting it into the third data table.

[0017] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor to execute the data processing method described in any of the above embodiments.

[0018] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0021] Figure 1 is a schematic diagram of a data processing scenario according to an embodiment of the present disclosure;

[0022] Figure 2 is a flowchart of a data processing method according to an embodiment of the present disclosure;

[0023] Figure 3 is a flowchart of a data processing method according to another embodiment of the present disclosure;

[0024] Figure 4 yes Figure 3 A schematic diagram of the architecture of the illustrated embodiment;

[0025] Figure 5 is a flowchart of a data processing method according to yet another embodiment of the present disclosure;

[0026] Figure 6 yes Figure 5 A schematic diagram of the architecture of the illustrated embodiment;

[0027] Figure 7 is a flowchart of a data processing method according to yet another embodiment of the present disclosure;

[0028] Figure 8 yes Figure 7 A schematic diagram of the architecture of the illustrated embodiment;

[0029] Figure 9 It is a structural diagram of a data processing device according to an embodiment of the present disclosure.

[0030] It should be understood that the size of each part shown in the drawings is not drawn according to the actual proportional relationship.In addition, the same or similar reference numerals represent the same or similar components. DETAILED DESCRIPTION

[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The description of the exemplary embodiments is merely illustrative and is in no way intended to limit the present disclosure, its application, or use. The present disclosure can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to make the present disclosure thorough and complete and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the composition of the materials, and the numerical values ​​set forth in these embodiments should be interpreted as being merely exemplary and not as limiting.

[0032] The terms "first," "second," and similar terms used in this disclosure do not denote any order, quantity, or importance, but are simply used to distinguish one part from another. Terms such as "include" or "comprise" mean that the elements preceding the term include the elements listed after the term, and do not exclude the possibility of also including other elements.

[0033] All terms (including technical or scientific terms) used in this disclosure have the same meaning as those understood by one of ordinary skill in the art to which this disclosure belongs, unless otherwise specifically defined. It should also be understood that terms defined in, for example, general dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an idealized or highly formal sense, unless explicitly defined herein.

[0034] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0035] Through research, the inventors found that different manufacturing big data analysis applications have different real-time requirements for data. For quasi-real-time requirements with data delays at the millisecond level, technologies such as flink, kafka, and spark steaming can be used. For batch data processing without timeliness requirements, Hive components can be used. However, in the manufacturing industry, the time intervals required by applications can be at the minute level, such as 5 minutes, 30 minutes, or one hour. For example, every half hour, analyze whether the production capacity of each device on the production line is consistent with the production schedule, or analyze the product yield and defect causes within the time period based on one hour of production data. However, at present, Hive cannot be used to meet the minute-level application synchronization requirements.

[0036] Accordingly, the present disclosure proposes a solution for satisfying users' minute-level synchronization requirements for data during the process of extracting data from a relational database to a distributed storage system.

[0037] Figure 1 It is a schematic diagram of a data processing scenario according to an embodiment of the present disclosure.

[0038] like Figure 1As shown, the data processing scenario includes a big data platform based on a distributed file system (such as Hadoop Distributed File System, referred to as HDFS). Big data technology based on a distributed file system uses a distributed processing software framework, allowing the use of multiple inexpensive hardware devices to build large clusters to process massive amounts of data. Hive is a data warehouse tool based on Hadoop, used for data extraction, transformation, and loading (ETL). Hive defines a simple SQL-like query language, allowing users familiar with SQL to query data, while also allowing developers familiar with MapReduce to develop custom mappers and reducers to handle complex analysis tasks that cannot be completed by built-in mappers and reducers. Hive does not have a dedicated data storage format, nor does it create indexes for data. Users can freely organize tables in Hive and process data in the database.

[0039] Factories generate massive amounts of data during their production processes. This data is stored in factory databases. These databases are often relational databases, primarily leveraging RDBMS (Relational Database Management System) grid computing technology. RDBMS grid computing breaks a problem requiring enormous computing power into many smaller parts, distributes these parts across numerous computers, and finally integrates the computational results to produce the final result. For example, in Oracle RAC (Real Application Cluster), all servers have direct access to all data in the database. However, application systems based on RDBMS grid computing have limited hardware scalability. Therefore, once data volumes reach a certain level, disk I / O bottlenecks lead to significant data processing inefficiencies. Distributed file systems, however, offer parallel processing capabilities that can accommodate the ever-increasing storage and processing needs of these systems. Therefore, when analyzing massive factory data, it is necessary to extract data from the factory database into a distributed file system.

[0040] like Figure 1As shown, data is first extracted from the factory database into the data lake of the Hive data warehouse on the big data platform. This step can be understood as extracting data from the first data table in the factory database into the second data table in Hive. The data in the second data table is identical to the data in the first data table, except for the data storage format and location. Next, the data in the data lake is layered and integrated according to the corresponding business logic, and the results are stored in the data warehouse to meet the data needs of upper-level applications. This step can be understood as integrating the data in the second data table and storing it in the third data table. Data integration includes adding and deleting data and joining multiple tables. Compared to the second data table, the third data table is more concise and accurate. For example, based on the need to analyze product defect causes, the integrated third data table includes relevant factors such as dimension columns (time, factory, equipment, operator, etc.) and attribute columns (factory location, equipment age, number of bad pixels, abnormal parameters, energy consumption parameters, process duration, etc.) involved in the factory automation process. The data in the data warehouse is then preprocessed using the data preprocessing platform. For example, preprocessing is performed, including dimension table design, outlier handling, discretization, and normalization. Furthermore, relevant algorithms are used to analyze the extracted data. For example, data features are extracted using methods such as the Pearson correlation coefficient and one-hot encoding to identify features that meet business requirements for querying and analysis. Furthermore, algorithms such as random forests and XGBOOST are used for modeling and parameter tuning to derive the forecast information or specific conclusions required by business needs, enabling inference and reasoning.

[0041] Users enter their query requirements, and a data virtualization platform like TIBCO DV is called upon to perform task planning based on the requirements. This platform then decides whether to directly access data from the Hive data table on the big data platform or to invoke a corresponding algorithm model to process the relevant data to obtain a result that meets the user's requirements. Finally, the corresponding results are presented to the user.

[0042] The following describes in detail a solution for extracting data from a relational database to a distributed storage system through specific embodiments.

[0043] Figure 2 This is a flow chart of a data processing method according to one embodiment of the present disclosure. The method is performed by a data processing device. The data processing device includes at least one memory and at least one processor. The memory is configured to store instructions. The processor is coupled to the at least one memory. The processor performs the following operations based on the instructions stored in the memory.

[0044] In step 201, first data in a first data table in a factory database is extracted in a first extraction cycle.

[0045] The first data includes data updated by the factory during the first extraction period. Updates include operations such as addition, deletion, and modification. The factory database is a relational database. The first extraction period is greater than one minute.

[0046] In some embodiments, the factory database is an Oracle database, and the first data table is an Oracle data table.

[0047] In some embodiments, the first extraction period is determined based on actual business needs and may also change periodically based on the needs of the same business at different time periods.

[0048] In some embodiments, the first extraction period ranges from 10 minutes to 1 day.

[0049] For example, when analyzing and predicting material accumulation at various process sites during the production process, production data can be extracted every half hour to an hour for higher-level applications to perform corresponding predictive analysis and prevent material accumulation. Another example is that to analyze production schedules, production data can be extracted every half day or a day to obtain production data and production schedule data, which can then be provided to higher-level applications for production schedule analysis. For another example, to analyze production defects or failures on a production line, the first cycle time can be reduced, such as extracting production data every 10 minutes, to perform fault prediction analysis and reduce production accidents.

[0050] It should be noted that each data point in the first data table has a corresponding timestamp. Therefore, by using the timestamp, we can extract the incremental data in the first data table. Data extraction can be achieved using data extraction tools such as Sqoop, Datax, and Kettle.

[0051] In step 202, the first data is stored in a second data table of the distributed storage system to form second data.

[0052] In step 203, the second data is integrated and then inserted into a third data table of the distributed storage system to form third data.

[0053] In some embodiments, the second data table and the third data table are Hive data tables. For example, the second data table is located at Figure 1 In the data lake, the third data table is located at Figure 1 data warehouse or data mart.

[0054] It should be noted here that the insert operation means that in the process of writing the second data into the third data table, the data will not be overwritten or deleted, so as to ensure that errors will not occur due to data being overwritten or deleted when the application processes the data.

[0055] In step 204, the data in the third data table is retrieved and analyzed in a first analysis period, wherein the first analysis period is not less than the first extraction period.

[0056] It should be noted here that, since the data in the third data table is updated in the first extraction cycle, when the first analysis cycle is not less than the first extraction cycle, repeated analysis and processing of the same data will not occur.

[0057] In some embodiments, after the second data is integrated and inserted into the third data table of the distributed storage system to form the third data, it also includes: within a preset time period, using the data stored in the second data table in the first processing cycle to check the data inserted in the first processing cycle in the third data table, so that the data inserted in the first processing cycle in the third data table is consistent with the data updated in the first data table in the first processing cycle.

[0058] It should be noted that during the insertion of the second data into the third data table, due to the inherent instability of the distributed storage system, the insertion operation may be abnormal, resulting in abnormal data in the third data table. The data in the third data table is checked using the data in the second data table to ensure that the data in the third data table is consistent with the data in the first data table.

[0059] In some embodiments, the first processing period is greater than the first extraction period. For example, the first extraction period is 30 minutes and the first processing period is 3 days.

[0060] In some embodiments, the first processing cycle is greater than the interval of a preset time period and a frequent data update period so that the data inserted in the third data table during the first processing cycle can be consistent with the data updated in the first data table during the first processing cycle.

[0061] In some embodiments, during a preset time period, the first analysis period is greater than a preset threshold.

[0062] It should be noted that in order to avoid the impact of checking the data in the third data table on the data analysis, a period of time with a low frequency of data analysis is selected as the preset time period. For example, the frequency of analyzing the data in the third data table is low at night, so the preset time period can be set to the night period (e.g., between 3:00 and 4:00 in the morning).

[0063] In some embodiments, when the data stored in the second data table during the first processing cycle and the data inserted in the third data table during the first processing cycle are inconsistent, the data stored in the second data table during the first processing cycle are overwritten with the data inserted in the third data table during the first processing cycle to perform at least one of deduplication or leak correction.

[0064] The data extracted from the first data table primarily includes three types. The first type of data is data that does not change after being stored in the relational database. The second type of data is data that may change after being stored in the relational database. The third type of data is data in a preset format. The following describes the data processing solutions for these three types.

[0065] Figure 3 FIG2 is a flow chart of a data processing method according to another embodiment of the present disclosure. The method is executed by a processor based on instructions stored in a memory.

[0066] In step 301, first data in a first data table in a factory database is extracted in a first extraction cycle.

[0067] The first data includes data updated by the factory during the first extraction period. Updates include operations such as addition, deletion, and modification. The factory database is a relational database. The first extraction period is greater than one minute.

[0068] It should be noted here that the data extracted from the first data table is first type data, that is, data that will not change after being stored in the relational database.

[0069] In some embodiments, the factory database is an Oracle database, and the first data table is an Oracle data table.

[0070] In some embodiments, the first extraction period is determined based on actual business needs and may also change periodically based on the needs of the same business at different time periods.

[0071] In some embodiments, the first extraction period ranges from 10 minutes to 1 day.

[0072] It should be noted that each data point in the first data table has a corresponding timestamp. Therefore, by using the timestamp, we can extract the incremental data in the first data table. Data extraction can be achieved using data extraction tools such as Sqoop, Datax, and Kettle.

[0073] In step 302, the first data is stored in a second data table of the distributed storage system to form second data.

[0074] In step 303, the second data is integrated and then inserted into a third data table of the distributed storage system to form third data.

[0075] In some embodiments, the second data table and the third data table are Hive data tables. For example, the second data table is located at Figure 1 In the data lake, the third data table is located at Figure 1 data warehouse or data mart.

[0076] In step 304, during a preset time period, the data stored in the second data table during the first processing cycle is used to check the data inserted in the third data table during the first processing cycle, so that the data inserted in the third data table during the first processing cycle is consistent with the data updated in the first data table during the first processing cycle.

[0077] In some embodiments, the first processing period is greater than the first extraction period. For example, the first extraction period is 30 minutes and the first processing period is 3 days.

[0078] In some embodiments, the first processing cycle is greater than the interval of a preset time period and a frequent data update period so that the data inserted in the third data table during the first processing cycle can be consistent with the data updated in the first data table during the first processing cycle.

[0079] It should be noted that in order to avoid the impact of checking the data in the third data table on the data analysis, a period of time with a low frequency of data analysis is selected as the preset time period. For example, the frequency of analyzing the data in the third data table is low at night, so the preset time period can be set to the night period (e.g., between 3:00 and 4:00 in the morning).

[0080] In some embodiments, when the data stored in the second data table during the first processing cycle and the data inserted in the third data table during the first processing cycle are inconsistent, the data stored in the second data table during the first processing cycle are overwritten with the data inserted in the third data table during the first processing cycle to perform at least one of deduplication or leak correction.

[0081] In some embodiments, the data in the third data table is called for data analysis and processing in a first analysis period, wherein the first analysis period is not less than the first extraction period.

[0082] It should be noted here that, since the data in the third data table is updated in the first extraction cycle, when the first analysis cycle is not less than the first extraction cycle, repeated analysis and processing of the same data will not occur.

[0083] Figure 4 yes Figure 3A schematic diagram of the architecture of the illustrated embodiment.

[0084] like Figure 4 As shown, first data is extracted from the first data table in the factory database every half hour. The first data is stored in the second data table of the distributed storage system to form second data. The second data is inserted into the third data table of the distributed storage system to form third data. Next, during a period when the third data table is not frequently used (for example, between 3:00 and 4:00 a.m. every day), the second data table is used to check the data inserted into the third data table in the last three days to ensure that the data in the third data table is consistent with the data in the first data table in the last three days.

[0085] Figure 5 FIG2 is a flow chart of a data processing method according to another embodiment of the present disclosure. The method is executed by a processor based on instructions stored in a memory.

[0086] and Figure 3 Compared with the embodiment shown in Figure 5 In the illustrated embodiment, the first data table includes a first data sub-table and a second data sub-table. The second data table includes a third data sub-table and a fourth data sub-table. The first data sub-table includes the modified first sub-data in the factory database, and the second data sub-table includes the second sub-data that was removed during the modification process. For example, the first and second data sub-tables are Oracle data tables. The third and fourth data sub-tables are Hive data tables.

[0087] It's important to note that the data stored in the factory database is subject to random updates. To facilitate data management, real-time data generated during industrial production is stored in a first data subtable in the factory database, and the data in this first subtable is updated. Old data deleted during the update process is stored in a second data subtable in the factory database. In other words, the data extracted from the first data table is considered second-type data—data that changes after being stored in the factory database.

[0088] For example, if a production line produces a defective product, it needs to be reprocessed. However, the production history data corresponding to that product in the database is not added; it is only updated based on the existing data. Because the interval between reprocessing is uncertain, it may be a day or a week. In this case, the data stored in the factory database is updated randomly.

[0089] In step 501, first sub-data are extracted from the first data sub-table and second sub-data are extracted from the second data sub-table in a first extraction cycle.

[0090] In some embodiments, the first extraction period is determined based on actual business needs and may also change periodically based on the needs of the same business at different time periods.

[0091] In some embodiments, the first extraction period ranges from 10 minutes to 1 day.

[0092] It should be noted that each data item in the first and second data sub-tables has a corresponding timestamp. Therefore, by using timestamps, it is possible to extract incremental data from the first and second data sub-tables. Data extraction can be achieved using data extraction tools such as Sqoop, Datax, and Kettle.

[0093] In step 502, the first sub-data is stored in the third data sub-table to form the third sub-data, and the second sub-data is stored in the fourth data sub-table to form the fourth sub-data.

[0094] In step 503, the third sub-data is integrated and then inserted into the third data table.

[0095] In some embodiments, the third data table is a Hive data table. For example, the third data sub-table and the fourth data sub-table are located in Figure 1 In the data lake, the third data table is located at Figure 1 data warehouse or data mart.

[0096] At step 504 , during a preset time period, the data in the third data sub-table stored in the first processing cycle are used to check the data in the third data table inserted in the first processing cycle.

[0097] For example, when the data stored in the third data sub-table during the first processing cycle is inconsistent with the data inserted in the third data table during the first processing cycle, the data stored in the third data sub-table during the first processing cycle is overwritten with the data inserted in the third data table during the first processing cycle, so as to perform at least one of deduplication or leak filling.

[0098] It should be noted that in order to avoid the impact of checking the data in the third data table on the data analysis, a period of time with a low frequency of data analysis is selected as the preset time period. For example, the frequency of analyzing the data in the third data table is low at night, so the preset time period can be set to the night period (e.g., between 3:00 and 4:00 in the morning).

[0099] In step 505, during a preset time period, the data in the fourth data sub-table stored in the second processing cycle is used to filter the data in the third data table inserted in the second processing cycle, so as to remove the fourth sub-data in the third data table inserted in the second processing cycle.

[0100] It's important to note that the second processing cycle is longer than the first, as well as the maximum time interval for product repairs. Because the fourth data sub-table contains a smaller amount of data, using a longer processing cycle to filter the data in the third data table can reduce the processing burden. For example, the first processing cycle is 3 days, while the second processing cycle is 30 days.

[0101] In some embodiments, the data in the third data table is called for data analysis and processing in a first analysis period, wherein the first analysis period is not less than the first extraction period.

[0102] Figure 6 yes Figure 5 A schematic diagram of the architecture of the illustrated embodiment.

[0103] like Figure 6 As shown, every half hour, the first sub-data is extracted from the first data sub-table in the factory database, and the second sub-data is extracted from the second data sub-table in the factory database. The first sub-data is stored in the third data sub-table of the distributed storage system, and the second sub-data is stored in the fourth data sub-table of the distributed storage system. The third sub-data is inserted into the third data table of the distributed storage system. Next, during a time period when the third data table is not frequently used (for example, from 3:00 a.m. to 4:00 a.m. every day), the third data sub-table is used to fill in gaps and remove duplicates for the data inserted in the third data table in the last three days, and the fourth data sub-table is used to filter the data inserted in the third data table in the last 30 days, so that the data in the third data table is consistent with that in the first data sub-table.

[0104] Figure 7 FIG2 is a flow chart of a data processing method according to another embodiment of the present disclosure. The method is executed by a processor based on instructions stored in a memory.

[0105] In step 701, first data in a first data table in a factory database is extracted in a first extraction cycle.

[0106] The first data includes data updated by the factory during the first extraction period. Updates include operations such as addition, deletion, and modification. The factory database is a relational database. The first extraction period is greater than one minute.

[0107] It should be noted here that the data extracted from the first data table is the third type of data, that is, the data includes content in a preset data format.

[0108] In some embodiments, the factory database is an Oracle database, and the first data table is an Oracle data table.

[0109] In some embodiments, the first extraction period is determined based on actual business needs and may also change periodically based on the needs of the same business at different time periods.

[0110] In some embodiments, the first extraction period ranges from 10 minutes to 1 day.

[0111] It should be noted that each data point in the first data table has a corresponding timestamp. Therefore, by using the timestamp, we can extract the incremental data in the first data table. Data extraction can be achieved using data extraction tools such as Sqoop, Datax, and Kettle.

[0112] In step 702, the first data is stored in a second data table of the distributed storage system to form second data. The second data includes fifth sub-data and sixth sub-data. The fifth sub-data is in a preset data format, i.e., a data format that can be normally presented in the distributed storage system. The sixth sub-data is in a compressed format. For example, the compressed format of the sixth sub-data is BLOB format.

[0113] In some embodiments, the second data table is a Hive data table. For example, the second data table is located at Figure 1 in the data lake.

[0114] In step 703 , the format of the sixth sub-data is transformed to obtain seventh sub-data having a preset data format.

[0115] In some embodiments, sixth sub-data is extracted from the second data, and the sixth sub-data is sent to a Linux server so that the Linux server performs format conversion on the sixth sub-data to obtain seventh sub-data having a preset data format.

[0116] In step 704 , the fifth sub-data and the seventh sub-data are associated according to the data identifier to obtain fourth data.

[0117] In step 705, the fourth data is integrated and then inserted into the third data table.

[0118] In some embodiments, the third data table is a Hive data table. For example, the third data table is located at Figure 1 data warehouse or data mart.

[0119] In some embodiments, the data in the third data table is called for data analysis and processing in a first analysis period, wherein the first analysis period is not less than the first extraction period.

[0120] For example, the abstract structure diagram of the first data table in the factory database is shown in Table 1.

[0121] ID BLOB_column column 123 <blob> < / blob> AA 456 <blob> < / blob> BB

[0122] Table 1

[0123] The BLOB field contains multiple parameters, each corresponding to a value. The corresponding design abstract diagram is shown in Table 2.

[0124] ID parameter value 123 a 1.1 123 b 3.5 456 a 2.9 456 b 1.8

[0125] Table 2

[0126] By associating the fifth sub-data (as shown in Table 1) and the seventh sub-data (as shown in Table 2) according to ID, and inserting the result into the third data table, the design abstract diagram of the third data table is shown in Table 3.

[0127] ID parameter value column 123 a 1.1 AA 123 b 3.5 AA 456 a 2.9 BB 456 b 1.8 BB

[0128] Table 3

[0129] Therefore, the fourth data includes all the information in the first data.

[0130] Figure 8 yes Figure 7 A schematic diagram of the architecture of the illustrated embodiment.

[0131] like Figure 8 As shown, first data is extracted from the first data table in the factory database every half hour. The first data is stored in the second data table of the distributed storage system to form second data. The second data includes fifth sub-data in a preset data format and sixth sub-data in a BLOB format. The sixth sub-data is downloaded to a Linux server and saved as a file named file_temp1. The sixth data is processed using a corresponding Java program to convert the data format of the sixth sub-data to a preset format, thereby generating seventh sub-data and saving it as a file named file_temp2. ​​Next, all relevant data is inserted into the third data table by associating the fifth and seventh sub-data based on data identifiers.

[0132] It should be noted that although Figure 2 、 Figure 3 、 Figure 5 and Figure 7 Although various method steps are shown in a certain order in the figures, this does not mean that the method steps must be executed in the order shown. On the contrary, they can be executed in a reverse or parallel order without departing from the spirit and principles of the present invention.

[0133] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the following Figure 2 、 Figure 3 、 Figure 5 and Figure 7 The method according to any one of the embodiments.

[0134] Figure 9 FIG. 1 is a schematic diagram of the structure of a data processing device according to an embodiment of the present disclosure. Figure 9 As shown, the data processing device includes a memory 91 and a processor 92 .

[0135] The memory 91 is used to store instructions. The processor 92 is coupled to the memory 91. The processor 92 is configured to execute the instructions stored in the memory. Figure 2 、 Figure 3 、 Figure 5 and Figure 7 The method according to any one of the embodiments.

[0136] like Figure 9 As shown, the data processing device further includes a communication interface 93 for exchanging information with other devices. At the same time, the device further includes a bus 94 through which the processor 92, the communication interface 93, and the memory 91 communicate with each other.

[0137] Memory 91 may include high-speed RAM memory, or may also include non-volatile memory, such as at least one disk storage device. Memory 91 may also be a memory array. Memory 91 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.

[0138] In addition, the processor 92 can be a central processing unit (CPU), or can be a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any appropriate combination thereof that performs the functions described in the present disclosure.

[0139] So far, the embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details well known in the art have not been described. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein. Although some specific embodiments of the present disclosure have been described in detail through examples, those skilled in the art should understand that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. Those skilled in the art should understand that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A data processing device, include: at least one memory configured to store instructions; At least one processor is coupled to the at least one memory, and the at least one processor is configured to perform the following operations based on instructions stored in the memory: Extracting first data from a first data table in a factory database in a first extraction cycle, wherein the first data includes data updated by the factory within the first extraction cycle, the factory database is a relational database, and the first extraction cycle is greater than 1 minute; Storing the first data in a second data table of a distributed storage system to form second data; Inserting the second data into a third data table of the distributed storage system after data integration to form third data; Calling the data in the third data table to perform data analysis processing in a first analysis cycle, wherein the first analysis cycle is not less than the first extraction cycle; After integrating the second data and inserting the second data into a third data table of the distributed storage system to form third data, the method further includes: During a preset time period, using the data in the second data table stored in the first processing cycle to check the data in the third data table inserted in the first processing cycle, so that the data in the third data table inserted in the first processing cycle is consistent with the data in the first data table updated in the first processing cycle; In the preset time period, the first analysis period is greater than a preset threshold; The first data table includes a first data sub-table and a second data sub-table, the second data table includes a third data sub-table and a fourth data sub-table, the first data sub-table includes the modified first sub-data in the factory database, and the second data sub-table includes the second sub-data removed during the modification process; Extracting the first data in the first data table in the first extraction cycle includes: In the first extraction cycle, extract the first sub-data from the first data sub-table, and extract the second sub-data from the second data sub-table; Storing the first data in the second data table includes: storing the first sub-data into the third data sub-table to form third sub-data, and storing the second sub-data into the fourth data sub-table to form fourth sub-data; Inserting the second data into the third data table after data integration includes: The third sub-data is integrated and then inserted into the third data table.

2. The processing device according to claim 1, in, The first extraction period ranges from 10 minutes to 1 day.

3. The processing device according to claim 1, in, Using the data in the second data table stored in the first processing cycle to check the data in the third data table inserted in the first processing cycle includes: The data in the second data table stored in the first processing cycle are used to perform at least one of deduplication or omission on the data in the third data table inserted in the first processing cycle.

4. The processing device according to claim 1, in, Using the data in the second data table to check the data in the third data table includes: The data in the third data table inserted in the second processing cycle are filtered using the data in the fourth data sub-table stored in the second processing cycle, so as to remove the fourth sub-data in the third data table inserted in the second processing cycle; the second processing cycle is greater than the first processing cycle.

5. The processing device according to claim 1, in, The second data includes fifth sub-data and sixth sub-data, and the sixth sub-data is in a compressed format; Inserting the second data into the third data table after data integration includes: Performing format conversion on the sixth sub-data to obtain seventh sub-data having a preset data format; Associating the fifth sub-data with the seventh sub-data according to the data identifier to obtain fourth data; The fourth data is integrated and then inserted into the third data table.

6. The processing device according to claim 5, in, The format conversion of the sixth sub-data includes: extracting the sixth sub-data from the second data; The sixth sub-data is sent to a Linux server so that the Linux server performs format conversion on the sixth sub-data to obtain seventh sub-data having the preset data format.

7. The processing device according to claim 5, in, The compression format of the sixth sub-data is BLOB format.

8. A data processing method, include: Extracting first data from a first data table in a factory database in a first extraction cycle, wherein the first data includes data updated by the factory within the first extraction cycle, the factory database is a relational database, and the first extraction cycle is greater than 1 minute; Storing the first data in a second data table of a distributed storage system to form second data; Inserting the second data into a third data table of the distributed storage system after data integration to form third data; Calling the data in the third data table to perform data analysis processing in a first analysis cycle, wherein the first analysis cycle is not less than the first extraction cycle; After integrating the second data and inserting the second data into a third data table of the distributed storage system to form third data, the method further includes: During a preset time period, using the data in the second data table stored in the first processing cycle to check the data in the third data table inserted in the first processing cycle, so that the data in the third data table inserted in the first processing cycle is consistent with the data in the first data table updated in the first processing cycle; In the preset time period, the first analysis period is greater than a preset threshold; The first data table includes a first data sub-table and a second data sub-table, the second data table includes a third data sub-table and a fourth data sub-table, the first data sub-table includes the modified first sub-data in the factory database, and the second data sub-table includes the second sub-data removed during the modification process; Extracting the first data in the first data table in the first extraction cycle includes: In the first extraction cycle, extract the first sub-data from the first data sub-table, and extract the second sub-data from the second data sub-table; Storing the first data in the second data table includes: storing the first sub-data into the third data sub-table to form third sub-data, and storing the second sub-data into the fourth data sub-table to form fourth sub-data; Inserting the second data into the third data table after data integration includes: Inserting the third sub-data into the third data table after data integration; Using the data in the second data table to check the data in the third data table includes: The data in the third data table inserted in the second processing cycle are filtered using the data in the fourth data sub-table stored in the second processing cycle, so as to remove the fourth sub-data in the third data table inserted in the second processing cycle; the second processing cycle is greater than the first processing cycle.

9. The processing method according to claim 8, in, The first extraction period ranges from 10 minutes to 1 day.

10. The processing method according to claim 8, in, The second data includes fifth sub-data and sixth sub-data, and the sixth sub-data is in a compressed format; Inserting the second data into the third data table after data integration includes: extracting the sixth sub-data from the second data; Sending the sixth sub-data to a Linux server so that the Linux server performs format conversion on the sixth sub-data to obtain seventh sub-data having a preset data format; Associating the fifth sub-data with the seventh sub-data according to the data identifier to obtain fourth data; The fourth data is integrated and then inserted into the third data table.

11. A computer-readable storage medium, in, The computer-readable storage medium stores computer instructions, and the instructions are used by a processor to execute the data processing method according to any one of claims 8 to 10.