Database updating method and device, computer device and storage medium

By identifying changed data from the data pipeline file, parsing and loading it into the source layer table, summarizing it into the presentation layer table data, configuring the target push path and frequency to generate a data polling script, the problem of database update delay is solved, and real-time updates and efficient queries are achieved.

CN116303506BActive Publication Date: 2026-01-13IND BANK CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310268685.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-01-13
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

In traditional database update methods, there is a delay between data changes and database updates, resulting in poor update timeliness.

Method used

By responding to the data pipeline file receiving operation, the changed data file is identified, parsed into the source layer table data and loaded into the source layer table of the database, and summarized into the presentation layer table data to perform database update. The target push path and frequency are configured to generate a data polling script to achieve real-time data loading.

Benefits of technology

It enables real-time database updates, improving update timeliness and accuracy, reducing update costs, and supporting flexible querying and front-end data display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303506B_ABST
    Figure CN116303506B_ABST
Patent Text Reader

Abstract

The application relates to a database updating method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a receiving operation of a data flow file, determining a change data file from the data flow file; analyzing the change data file to obtain corresponding source layer table data, loading the source layer table data into a source layer table of a database; summarizing the data stored in the source layer table to obtain corresponding display layer table data, and using the display layer table data to perform an updating operation on the database. The method can load the change data file into the database to realize real-time updating of the database when the change data file is received, and the timeliness of database updating is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer application technology, and in particular to a database update method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] There is usually a certain correlation between the business data of upstream and downstream business systems. When the business data in the upstream business system changes, such as when the business data is deleted, updated, or added, the business data in the downstream business system that is related to the changed business data also needs to be changed.

[0003] In traditional technologies, downstream business systems can process data flow files pushed by upstream business systems in batch offline mode within a preset time period, and load the target data files that have changed in the data flow files into the database to update the database.

[0004] However, when using traditional database update methods, the target data file that has changed may not be received within a preset time period, which may lead to a delay between data changes and database updates, resulting in poor timeliness of database updates.

[0005] Invention

[0006] Therefore, it is necessary to provide a real-time database update method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0007] Firstly, this application provides a database update method. The method includes:

[0008] In response to the data stream file receiving operation, the modified data file is determined from the data stream file;

[0009] The modified data file is parsed to obtain the corresponding source layer table data, and the source layer table data is loaded into the source layer table of the database;

[0010] The data stored in the source layer table is summarized to obtain the corresponding presentation layer table data, and the database is updated using the presentation layer table data.

[0011] In one embodiment, prior to determining the modified data file from the data stream file in response to the data stream file receiving operation, the method further includes:

[0012] Configure the target push path between the database and the data source system corresponding to the data stream file, as well as the push frequency of the data source system to the data stream file;

[0013] Generate a data polling script based on the target push path and the push frequency;

[0014] Compile the data polling script to poll the target push path according to the push frequency, and if the data stream file exists in the target push path, perform a receiving operation on the data stream file.

[0015] In one embodiment, determining the modified data file from the data stream file in response to the data stream file reception operation includes:

[0016] In response to the data stream file receiving operation, obtain the data table file in the data stream file;

[0017] Determine the data range corresponding to the data table file based on the data table name corresponding to the data table file;

[0018] When it is determined that the data range matches the preset range, the data table file is used as the changed data file.

[0019] In one embodiment, the method further includes:

[0020] Retrieve query parameters;

[0021] The query interface of the database is updated using the query business parameters, so as to return the presentation layer table data through the query interface.

[0022] In one embodiment, the method further includes:

[0023] In response to the front-end query conditions sent by the application server, target presentation layer table data that meets the front-end query conditions is obtained from the query interface;

[0024] The query interface returns the target presentation layer table data to the application server.

[0025] In one embodiment, the front-end query conditions are obtained by parsing the data query request sent by the application server to the front-end server;

[0026] The application server is also used to send the target presentation layer table data to the front-end server for display.

[0027] Secondly, this application also provides a database updating apparatus. The apparatus includes:

[0028] The data determination module is used to determine the modified data file from the data stream file in response to the data stream file receiving operation;

[0029] The data loading module is used to parse the changed data file to obtain the corresponding post source layer table data, and load the post source layer table data into the post source layer table of the database.

[0030] The data update module is used to summarize the data stored in the source layer table to obtain the corresponding presentation layer table data, and to perform an update operation on the database using the presentation layer table data.

[0031] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the database update method described in any of the embodiments of the first aspect.

[0032] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the database update method described in any of the embodiments of the first aspect.

[0033] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the database update method described in any of the embodiments of the first aspect.

[0034] The aforementioned database update method, apparatus, computer equipment, storage medium, and computer program product, in response to a data stream file receiving operation, determine the changed data file from the data stream file; parse the changed data file to obtain corresponding source layer table data; load the source layer table data into the source layer table of the database; summarize the data stored in the source layer table to obtain corresponding presentation layer table data; and use the presentation layer table data to perform an update operation on the database. This allows for real-time database updates by loading the changed data file into the database simultaneously with its receipt, thus improving the timeliness of database updates. Attached Figure Description

[0035] Figure 1 This is a diagram illustrating the application environment of a database update method in one embodiment.

[0036] Figure 2 This is a flowchart illustrating a database update method in one embodiment;

[0037] Figure 3 This is a flowchart illustrating the data stream file receiving steps in one embodiment;

[0038] Figure 4 This is a flowchart illustrating the steps for determining the variable data file in one embodiment;

[0039] Figure 5 This is a flowchart illustrating the database update method in another embodiment;

[0040] Figure 6 This is a structural block diagram of a database update device in one embodiment;

[0041] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0044] The database update method provided in this embodiment can be applied to, for example, Figure 1 In the application environment shown, database server 106 communicates with data source terminal 102 and / or data source server 104 to receive data stream files 110 sent by data source terminal 102 and / or data source server 104. Database server 106 has a database deployed in it, and data source terminal 102 and / or data source server 104 have a data source system deployed in it.

[0045] The data source terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The data source server 104 and database server 106 can be implemented using independent servers or a server cluster consisting of multiple servers.

[0046] Specifically, when the data in the data source terminal 102 and / or data source server 104 changes, such as when the data is deleted, updated or added, the data source terminal 102 and / or data source server 104 can generate a data log file related to the data change to record information such as the data type that changed, the method of change, the data content after the change, and the time of the data change.

[0047] Data source terminal 102 and / or data source server 104 can push data stream file 110 to database server 106 at regular intervals (e.g., every fifteen minutes, every hour, or every three days) or push data stream file 110 to database server 106 in real time. In one example, data stream file 110 can be a full data stream file or an incremental data stream file. The full data stream file stores the full data stream recorded for all time periods. The incremental data stream file only stores the incremental data stream recorded by data source terminal 102 and / or data source server 104 after the previous push of data stream file 110.

[0048] When the database server 106 receives the data stream file 110 sent by the data source terminal 102 and / or the data source server 104, it can process the data stream file 110 using the database update method provided in this embodiment to update the database in the database server 106.

[0049] In one embodiment, such as Figure 2 The diagram illustrates a database update method. In this embodiment, the method is applied to... Figure 1 Taking database server 106 as an example, the explanation includes:

[0050] Step S202: In response to the data stream file receiving operation, the modified data file is determined from the data stream file.

[0051] In one example, when the data source is retail transaction records, the data log file can store detailed retail transaction information for the goods, such as one or more of the following: purchase price, purchase quantity, selling price, sales revenue, and profit. In another example, when the data source is inbound / outbound records, the data log file can store detailed inbound / outbound information for the goods, such as inventory levels and outbound quantities.

[0052] Change data files can be used to represent data streams that have undergone changes (updates, deletions, or additions).

[0053] Specifically, the database server can respond to the receiving operation of the data flow file by storing the data flow file in the database cache. Preset conditions are used to judge the data flow file, identifying the changed data files that meet these conditions. These preset conditions can be: a change in the data source, such as changing from "retail transaction records" to "goods in / out records"; a change in the data purpose, such as changing from calculating "sales revenue" to calculating "profit"; or a change in the data content within a preset range, such as data that changed between March 1st and March 10th.

[0054] Step S204: Parse the modified data file to obtain the corresponding source layer table data, and load the source layer table data into the source layer table of the database.

[0055] The source layer table data can be used to represent the raw data directly obtained from the data source. The source layer table can store all the raw data in the current database.

[0056] Specifically, the database server can parse the changed data file to obtain the corresponding tabular data. For example, it can extract the corresponding tabular data from the corresponding position in the changed data file according to the table format, or it can extract the corresponding tabular data from the changed data file according to the field type, and load the real-time extracted source layer table data into the source layer table of the database. In one example, the database server can automate the operations of changing data file parsing and source layer table data loading at the software logic level by writing scripts.

[0057] Step S206: Summarize the data stored in the source layer table to obtain the corresponding presentation layer table data. Use the presentation layer table data to perform an update operation on the database.

[0058] Specifically, because the source layer table data may have issues such as missing fields, mixed data types, and format errors, it needs to be processed before being stored in the database. Therefore, after the source layer table data is loaded, the database server can aggregate all the data stored in the current source layer table, and perform data processing operations such as integration, cleaning, and relational modeling based on the three normal forms (first normal form: primary key and attribute values, second normal form: non-primary attributes and primary key, and third normal form: non-primary key) to obtain the corresponding presentation layer table data. The presentation layer table data obtained in real time is stored in the source layer table of the database, and database update operations are performed. For example, if the data identifiers are consistent, the original presentation layer data in the database is replaced with the presentation layer data obtained in real time to achieve real-time database updates, and the updated data is stored.

[0059] The aforementioned database update method, in response to the data flow file receiving operation, identifies the changed data file from the data flow file; parses the changed data file to obtain the corresponding source layer table data, loads the source layer table data into the source layer table of the database; summarizes the data stored in the source layer table to obtain the corresponding presentation layer table data, and uses the presentation layer table data to perform the database update operation. This method can load the changed data file into the database at the same time as receiving the changed data file to achieve real-time database updates, thus improving the timeliness of database updates.

[0060] In one embodiment, such as Figure 3 As shown, a flowchart illustrating the steps for receiving a data stream file is provided, including:

[0061] Step S302: Configure the target push path between the database and the data source system corresponding to the data stream file, as well as the push frequency of the data source system to the data stream file.

[0062] The target push path can be used to characterize the specific path through which the data source system pushes the data flow file. Since the amount of communication data between the data source system and the database is large, and there may be multiple communication paths, configuring a specific push path dedicated to the data flow file can help improve the efficiency of the database server in receiving the data flow file and retrieving changed data files.

[0063] Specifically, the database server can obtain preset push parameters (which can be default parameters or user-defined parameters) and send a configuration request message carrying the push parameters to the data source system. This configuration request message is used to configure the target push path between the database and the data source system, as well as the push frequency of the data stream file by the data source system. In one example, the push parameters may also include: push method (periodic push or real-time push), push format (data format of the push message), push data file name, data file naming rules, and table names contained in the data file.

[0064] Step S304: Generate a data polling script based on the target push path and push frequency.

[0065] Step S306: Compile the data polling script to poll the target push path according to the push frequency, and if a data stream file exists in the target push path, perform the data stream file receiving operation.

[0066] Specifically, the database server can pre-store polling operation triggering logic. The polling object for the triggering logic is defined by the target push path to achieve polling of data files within that path. The polling frequency is defined by the push frequency to ensure synchronized triggering of data push operations from the data source system and data polling operations from the database server, thereby generating a corresponding data polling script. The database server can compile the data polling script to poll the target push path according to the push frequency, detecting the existence of data flow files within that path. If a data flow file is detected within the target push path, the database server can perform a data flow file receiving operation, receiving the data flow file from the target push path. This allows for real-time identification of changed data files from the data flow files and loading the changed data files into the database.

[0067] In one example, the specific implementation method of synchronous triggering can be that the data source system performs a data push operation every X seconds, pushing the data pipeline file to the database server through the target push path. The database server performs a data polling operation every X seconds to synchronously receive and process the data pipeline file pushed by the data source system in real time from the target push path.

[0068] In this embodiment, by configuring the target push path and push frequency, and compiling a data polling script using the target push path and push frequency to poll the target push path, the polling operation and data push can be triggered at the same frequency, thereby reducing the delay in data updates and enabling real-time acquisition of changing data.

[0069] In one embodiment, such as Figure 4 As shown, a flowchart illustrating the steps for determining a variable data file is provided, including:

[0070] Step S402: In response to the data stream file receiving operation, obtain the data table file in the data stream file.

[0071] Step S404: Determine the data range corresponding to the data table file based on the data table name corresponding to the data table file.

[0072] The data range can include, but is not limited to, the range of data sources, the range of data recording time, and the range of data types (such as the range of "purchase price," "selling price," and "profit"). Users can define the specific content of the data range according to their own needs.

[0073] Specifically, in response to the receipt of a data log file, the database server parses the data log file to obtain several (or one or more) data table files. It then retrieves the data table name corresponding to each data table file. Finally, it determines the data range corresponding to each data table file by judging the data table name according to the data file naming rules.

[0074] In one example, when the data range includes a data type range, if the data table name contains the data identifier "p", then the data range corresponding to the data table file can be determined to be the "profit" transaction range. In another example, when the data type includes a data record time range, if the data table name contains "20230301-20230310", then the data range corresponding to the data table file can be determined to be the data transaction file range recorded from 20230301 to 20230310. In yet another example, when the data range includes a data source range, if the data table name contains "Y system", then the data range corresponding to the data table file can be determined to be the data transaction file range pushed by the Y system.

[0075] Step S406: When it is determined that the data range matches the preset range, the data table file is used as the variable data file.

[0076] Specifically, the database server can match the data range with the user's preset range to determine whether the data table file is a changed data file within the preset range. For example, when the preset range is changed data files pushed by System Z, then the data table file with "System Z" in its name can be determined as the changed data file required by the user.

[0077] In this embodiment, identifying the changed data file by the data table name enables database updates within a preset range, thereby improving the accuracy of database updates. Furthermore, since only data within the preset range needs to be updated, the cost of database updates can also be reduced.

[0078] In one embodiment, the database update method may further include: obtaining query business parameters, updating the database query interface with the query business parameters, and returning presentation layer table data through the query interface.

[0079] The query parameters can be flexibly adjusted according to the user's business needs. Query requirements can be used to define the database query return logic, such as the logic for returning a data volume threshold, data sorting logic, and the logic for summarizing query results from the same data source.

[0080] Specifically, the database server can obtain the query business parameters defined by the user according to their own needs, update the database query interface with the query business parameters, and return the updated real-time presentation layer table data in the database through the query interface according to the query business parameters.

[0081] In one example, query parameters could include a threshold for the amount of data to be returned. Updating the database query interface with this threshold ensures that the updated interface returns only the query results equal to the threshold. For instance, when the threshold is 10, the updated interface will only return the corresponding 10 query results.

[0082] In another example, query parameters can also include data sorting logic. Updating the database query interface with data sorting logic allows the updated query interface to sort the returned query results according to the data sorting logic.

[0083] In this embodiment, by obtaining query business parameters and updating the database query interface using the query business parameters, the presentation layer table data can be returned through the query interface, thereby improving the flexibility of database queries for users.

[0084] In one embodiment, the database update method may further include: in response to a front-end query condition sent by an application server, obtaining target presentation layer table data that meets the front-end query condition from a query interface, and returning the target presentation layer table data to the application server through the query interface.

[0085] Among them, the front-end query conditions can be obtained by parsing the data query request sent by the front-end server by the application server. For example, the application server can obtain data that matches the field type corresponding to the query conditions from the data query request message, thereby converting the data query request sent by the front-end server into front-end query conditions that the database can recognize and process.

[0086] Specifically, the database server can also deploy business systems that interact with the database, and these business systems can run application servers and front-end servers. The database server can also establish connections between the database and the application server, responding to front-end query conditions sent by the application server, querying the updated presentation layer table data in the database to find the target presentation layer table data that matches the front-end query conditions, and returning the target presentation layer data to the application server through the query interface. After receiving the target presentation layer data, the application server can also send the target presentation layer table data to the front-end server for display.

[0087] In this embodiment, by responding to the front-end query conditions sent by the application server, the target presentation layer table data that meets the front-end query conditions is obtained from the query interface, and the target presentation layer table data is returned to the application server through the query interface, which enables real-time data query and display on the front end.

[0088] In one embodiment, such as Figure 5 The diagram illustrates a database update method, including:

[0089] Step S502: Configure the target push path between the database and the data source system corresponding to the data stream file, as well as the push frequency of the data source system to the data stream file.

[0090] Specifically, the database server can obtain preset push parameters and send a configuration request message carrying push parameters to the data source system to configure the target push path between the database and the data source system corresponding to the data flow file, the push frequency of the data source system to the data flow file, the push method (periodic push or real-time push), the push format (data format of the push message), the name of the pushed data file, the naming rules of the data file, and the names of the tables contained in the data file.

[0091] Step S504: Generate a data polling script based on the target push path and push frequency, and compile the data polling script.

[0092] Specifically, the database server can define the polling object for the polling operation triggering logic using the target push path to achieve polling of data files within the target push path; it can also define the polling frequency using the push frequency to ensure that the data push operations of the data source system and the data polling operations of the database server are triggered at the same frequency; thereby generating a corresponding data polling script. The database server can compile the data polling script to poll the target push path according to the push frequency, detecting whether a data flow file exists within the target push path. If a data flow file exists within the target push path, it will execute the data flow file receiving operation.

[0093] Step S506: In response to the data stream file receiving operation, determine the variable data file that matches the preset range based on the data table name of the data table file.

[0094] Specifically, the database server can respond to the data flow file receiving operation by parsing the corresponding data table file from the data flow file. It then obtains the table names from the data table files, uses data file naming rules to determine the data range corresponding to the data table file, and compares the data range with a preset range to identify the modified data file that matches the preset range.

[0095] Step S508: Parse the modified data file to obtain the corresponding source layer table data, and load the source layer table data into the source layer table of the database.

[0096] Step S510: Summarize the data stored in the source layer table to obtain the corresponding presentation layer table data, and use the presentation layer table data to perform an update operation on the database.

[0097] Specifically, the database server can parse the changed data file to obtain the corresponding source layer table data, and load the source layer table data into the source layer table of the database. It then aggregates the data stored in the source layer table, performs data cleaning and relational modeling operations on the data to generate the corresponding presentation layer table data. Finally, it uses the presentation layer table data to perform update operations on the database.

[0098] Step S512: In response to the front-end query conditions sent by the application server, retrieve the target presentation layer table data that meets the front-end query conditions from the query interface and return it.

[0099] Specifically, the database server can obtain query business parameters. These parameters are then used to update the database query interface. In response to the front-end query conditions sent by the application server, the target presentation layer table data that matches the updated query conditions is retrieved from the updated query interface and returned to the application server through the updated query interface. This allows the application server to send the target presentation layer table data to the front-end server for display.

[0100] In this embodiment, by polling the data stream files within the target push path in the database, the changed data files are loaded in real time. This achieves the goal of loading the changed data files into the database in real time while receiving them, and uses the updated query interface in conjunction with the front-end query conditions to process and display the data in real time.

[0101] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps.

[0102] Based on the same inventive concept, this application also provides a database update apparatus for implementing the database update method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more database update apparatus embodiments provided below can be found in the limitations of the database update method described above, and will not be repeated here.

[0103] In one embodiment, such as Figure 6 As shown, a database update device 600 is provided, including: a data determination module 602, a data loading module 604, and a data update module 606, wherein:

[0104] The data determination module 602 is used to determine the changed data file from the data flow file in response to the data flow file receiving operation.

[0105] The data loading module 604 is used to parse the changed data file to obtain the corresponding source layer table data, and load the source layer table data into the source layer table of the database.

[0106] The data update module 606 is used to summarize the data stored in the source layer table to obtain the corresponding presentation layer table data, and to perform update operations on the database using the presentation layer table data.

[0107] In one embodiment, the database update device 600 further includes: a push configuration module, configured to configure the target push path between the database and the data source system corresponding to the data stream file, and the push frequency of the data source system to the data stream file; a script generation module, configured to generate a data polling script based on the target push path and the push frequency; and a script compilation module, configured to compile the data polling script to poll the target push path according to the push frequency, and to perform a data stream file receiving operation if the data stream file exists in the target push path.

[0108] In one embodiment, the data determination module 602 includes: a table file acquisition module, used to acquire a data table file in the data flow file in response to a data flow file receiving operation; a range determination module, used to determine the data range corresponding to the data table file based on the data table name corresponding to the data table file; and a range matching module, used to treat the data table file as a variable data file when the determined data range matches a preset range.

[0109] In one embodiment, the database update device 600 further includes: an interface update module, used to obtain query business parameters; and to update the database query interface using the query business parameters so as to return presentation layer table data through the query interface.

[0110] In one embodiment, the database update device 600 further includes: a data query module, configured to obtain target presentation layer table data that meets the front-end query conditions from the query interface in response to the front-end query conditions sent by the application server; and a data return module, configured to return the target presentation layer table data to the application server through the query interface.

[0111] In one embodiment, the front-end query conditions are obtained by parsing a data query request sent by the application server to the front-end server. The application server is also used to send target presentation layer table data to the front-end server for display.

[0112] Each module in the aforementioned database update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0113] In one embodiment, a computer device is provided, which may be a terminal, and its structural diagram may be as shown below. Figure 7 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and a memory module. The non-volatile storage medium stores the operating system and computer programs. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a database update method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad located on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0114] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0115] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0116] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps in the above method embodiments.

[0117] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0118] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A database updating method characterized by comprising: The method comprises: determining a change data file from the data stream file in response to a receiving operation of the data stream file; parsing the change data file to obtain corresponding source layer table data, and loading the source layer table data to a source layer table of a database; summarizing data stored in the source layer table to obtain corresponding presentation layer table data, and performing an update operation on the database using the presentation layer table data; wherein, before the determining a change data file from the data stream file in response to a receiving operation of the data stream file, the method further comprises: configuring a target push path between the database and a data source system corresponding to the data stream file, and a push frequency of the data source system to the data stream file; generating a data polling script according to the target push path and the push frequency; compiling the data polling script to poll the target push path according to the push frequency, and performing a receiving operation on the data stream file if the data stream file exists in the target push path.

2. The method of claim 1, wherein, The determining a change data file from the data stream file in response to a receiving operation of the data stream file comprises: obtaining a data table file in the data stream file in response to the receiving operation of the data stream file; determining a data range corresponding to the data table file according to a data table name corresponding to the data table file; when it is determined that the data range matches a preset range, regarding the data table file as the change data file.

3. The method of claim 1, wherein, The method further comprises: obtaining a query service parameter; updating a query interface of the database using the query service parameter, so as to return the presentation layer table data through the query interface.

4. The method of claim 3, wherein, The method further comprises: obtaining target presentation layer table data meeting a front-end query condition from the query interface in response to the front-end query condition sent by an application server; returning the target presentation layer table data to the application server through the query interface.

5. The method of claim 4, wherein, The front-end query condition is obtained by analyzing a data query request sent by a front-end server through the application server; The application server is further configured to send the target presentation layer table data to the front-end server for display.

6. A database updating apparatus characterized by comprising: The device comprises: a data determining module configured to determine a change data file from a data stream file in response to a receiving operation of the data stream file; a data loading module configured to parse the change data file to obtain corresponding source layer table data, and load the source layer table data to a source layer table of a database; a data updating module configured to summarize data stored in the source layer table to obtain corresponding presentation layer table data, and perform an update operation on the database using the presentation layer table data; wherein, the device further comprises: a push configuration module configured to configure a target push path between the database and a data source system corresponding to the data stream file, and a push frequency of the data source system to the data stream file; a script generation module configured to generate a data polling script according to the target push path and the push frequency; A script compiling module is configured to compile the data polling script to poll the target push path according to the push frequency, and perform a receiving operation on the data flow file if the data flow file exists in the target push path.

7. The apparatus of claim 6, wherein, The data determining module comprises: A table file obtaining module is configured to obtain a data table file in the data flow file in response to the receiving operation on the data flow file. A range determining module is configured to determine a data range corresponding to the data table file according to a data table name corresponding to the data table file. A range matching module is configured to take the data table file as the change data file when it is determined that the data range and a preset range match. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 5.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Global Argo data storage and update method based on mixed database architecture

    CN105930381A

  • Data processing method and system based on data warehouse

    CN107704590A