CN116561141A - Updating method and device of data processing file, storage medium and electronic device - Google Patents

Updating method and device of data processing file, storage medium and electronic device Download PDF

Info

Publication number
CN116561141A
CN116561141A CN202310331650.3A CN202310331650A CN116561141A CN 116561141 A CN116561141 A CN 116561141A CN 202310331650 A CN202310331650 A CN 202310331650A CN 116561141 A CN116561141 A CN 116561141A
Authority
CN
China
Prior art keywords
type table
data
data processing
update
target type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310331650.3A
Other languages
Chinese (zh)
Inventor
王颖雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202310331650.3A priority Critical patent/CN116561141A/en
Publication of CN116561141A publication Critical patent/CN116561141A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for updating a data processing file, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the method for updating the data processing file comprises the following steps: determining a first data processing file to be updated; determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period; and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file. The problem that the database table corresponding to the workbook is updated in a delayed manner so as to cause the workbook to be not updated actually in the related art is solved.

Description

Updating method and device of data processing file, storage medium and electronic device
Technical Field
The present invention relates to the technical field of smart home, and in particular, to a method and apparatus for updating a data processing file, a storage medium, and an electronic apparatus.
Background
In the case of visual signage, a BI (Business Intelligence ) tool is often used, and optionally, the BI tool may be tabelau. A visual sign is called a workbook, which is dependent on tables in a database. In a daily billboard, in order to improve the refresh efficiency of the billboard, the data sources used by the workbook are refreshed, and a general refresh mechanism is as follows: the tables in the database automatically update the data every day, and the workbook is refreshed after the database is refreshed. One drawback of this mechanism is however: the backend database is unstable, and the update time of the database table may be delayed, which may lead to the workbook running empty when refreshed, and the actual data is not updated into the workbook.
Aiming at the problems that in the related art, the update time of a database table corresponding to a workbook is delayed, so that the workbook is not actually updated, and the like, no effective solution is proposed.
Accordingly, there is a need for improvements in the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the application provides a method and a device for updating a data processing file, a storage medium and an electronic device, which are used for at least solving the problem that a database table corresponding to a workbook is updated in a related technology due to delayed updating time, so that the workbook is not actually updated.
According to an aspect of an embodiment of the present application, there is provided a method for updating a data processing file, including: determining a first data processing file to be updated; determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period; and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file.
In an exemplary embodiment, determining the update status of the target type table includes: determining first data content of the target type table at a first update time, wherein the first update time is a latest update time indicated by the update period; determining a second data content of the target type table at a target time after a first update time, wherein a difference between the target time and the first update time is less than a first threshold; determining whether there is difference data between the first data content and the second data content; in the presence of difference data, the update status is determined to be updated.
In an exemplary embodiment, after determining whether there is difference data between the first data content and the second data content, the method further comprises: in the event that there is no difference data between the first data content and the second data content, the update status is determined to be not updated.
In an exemplary embodiment, determining the update status of the target type table includes: acquiring a resource address corresponding to data in the target type table; accessing a data source object of the target type table according to the resource address, and acquiring log sending data of the data source object from the data source object, wherein the data source object is used for providing data of the target type table, and the log sending data is used for recording a log of the data source object sending data to the target type table; determining the latest data transmission time of the data source object from the log transmission data; and determining the update state of the target type table according to the latest data transmission time and the first update time of the target type table.
In an exemplary embodiment, determining the update status of the target type table according to the latest data transmission time and the first update time of the target type table includes: determining the update state of the target type table to be updated under the condition that the difference value between the latest data sending time and the first update time is smaller than a second threshold value, wherein the second threshold value is smaller than or equal to a time interval corresponding to the update period; and determining that the updating state of the target type table is not updated under the condition that the difference value between the latest data sending time and the first updating time is larger than a second threshold value.
In an exemplary embodiment, after updating the first data processing file according to the target type table to obtain a second data processing file, the method further includes: acquiring update states of a plurality of first data processing files under the condition that the plurality of first data processing files are provided; and storing a plurality of first data processing files, a plurality of second data processing files corresponding to the plurality of first data processing files and update states corresponding to each first data processing file respectively.
In an exemplary embodiment, after obtaining the update status of the plurality of first data processing files, the method further includes: determining update failure files in the plurality of first data processing files, wherein file data of the first data processing files and file data of the second data processing files corresponding to the update failure files are the same; determining a unique identifier of a first type table corresponding to the update failure file, and determining an update state of the first type table according to the unique identifier, wherein the first type table is a target type table corresponding to the update failure file; and re-updating the update failure file according to the first type table under the condition that the update state of the first type table is updated.
According to another aspect of the embodiments of the present application, there is also provided an updating apparatus for a data processing file, including: the first determining module is used for determining a first data processing file to be updated; the second determining module is used for determining a target type table in a database corresponding to the first data processing file and determining the updating state of the target type table, wherein the target type table has a preset updating period; and the updating module is used for updating the first data processing file according to the target type table to obtain a second data processing file under the condition that the updating state of the target type table is determined to be updated.
According to yet another aspect of the embodiments of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described method of updating a data processing file when run.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for updating the data processing file by using the computer program.
According to the method and the device, a first data processing file to be updated is determined; determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period; and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file. That is, the update state of the target type table is predetermined, and the first data processing file corresponding to the target type table is updated when the update state is updated, so that the problem that the database table corresponding to the workbook is not actually updated due to the delay of the update time of the database table in the related art is solved; the effect of avoiding blank data is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative method of updating a data processing file according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of updating a data processing file according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative method of updating a data processing file according to an embodiment of the present application;
FIG. 4 is a block diagram of an alternative data processing file updating apparatus according to an embodiment of the present application;
fig. 5 is a block diagram (ii) of an alternative data processing file updating apparatus according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a method for updating a data processing file is provided. The updating method of the data processing file is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (intelligent house) ecology and the like. Alternatively, in the present embodiment, the above-described update method of the data processing file may be applied to a hardware environment constituted by a plurality of terminal devices 102 and servers 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to a plurality of terminal devices 102 through a network, and may be used to provide services (such as application services, etc.) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data operation services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
In this embodiment, a method for updating a data processing file is provided, including but not limited to being applied to a database, and fig. 2 is a flowchart of a method for updating a data processing file according to an embodiment of the present application, where the flowchart includes the following steps:
step S202: determining a first data processing file to be updated;
step S204: determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period;
step S206: and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file.
Through the steps, a first data processing file to be updated is determined; determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period; and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file. That is, the update state of the target type table is predetermined, and the first data processing file corresponding to the target type table is updated when the update state is updated, so that the problem that the database table corresponding to the workbook is not actually updated due to the delay of the update time of the database table in the related art is solved; the effect of avoiding blank data is achieved.
In an exemplary embodiment, determining the update status of the target type table includes: determining first data content of the target type table at a first update time, wherein the first update time is a latest update time indicated by the update period; determining a second data content of the target type table at a target time after a first update time, wherein a difference between the target time and the first update time is less than a first threshold; determining whether there is difference data between the first data content and the second data content; in the presence of difference data, the update status is determined to be updated.
It can be appreciated that the update period of the target type table may be set to be updated every day, that is, every 24 hours, and then the first update time of each day may be 8:00, and then the target time may be 8:05, and then the corresponding first threshold may be 6 minutes. Acquiring first data content of a target type table at a first update time 8:00, and at a target time 8:05 obtaining the second data content of the target type table. And further comparing whether the first data content and the second data content have difference data, and determining the update state as updated if the difference data exists.
It should be noted that 1) the target time may be selected before the first update time, and then: and determining third data content of the target type table at a target time before the first updating time, wherein the difference value between the target time and the first updating time is still smaller than a first threshold value. 2) The first threshold needs to be smaller than an update time interval corresponding to an update period preset in the target type table, for example, the update period is 24 hours, and then the first threshold is smaller than 24 hours. 3) The target time, the first threshold, may be selected as desired within a defined time frame.
In an exemplary embodiment, after determining whether there is difference data between the first data content and the second data content, the method further comprises: in the event that there is no difference data between the first data content and the second data content, the update status is determined to be not updated.
In an exemplary embodiment, determining the update status of the target type table includes: acquiring a resource address corresponding to data in the target type table; accessing a data source object of the target type table according to the resource address, and acquiring log sending data of the data source object from the data source object, wherein the data source object is used for providing data of the target type table, and the log sending data is used for recording a log of the data source object sending data to the target type table; determining the latest data transmission time of the data source object from the log transmission data; and determining the update state of the target type table according to the latest data transmission time and the first update time of the target type table.
Alternatively, the data source object may be a cloud or another database. The log of the data source object may be obtained actively, or may be sent by the data source object, which is not limited in this embodiment of the present application. Alternatively, the log transmission data may include log transmission data for a plurality of target type tables. The unique identification of the target type table that determines the update status as needed determines the latest data transmission time for the data source object to transmit data to the target type table. The latest data transmission time is before the first update time or coincides with the first update time. It should be noted that, in the embodiment of the present application, the latest data sending time of the data source object is determined as the latest data receiving time of the target type table, that is, the data transmission time is ignored.
In an exemplary embodiment, determining the update status of the target type table according to the latest data transmission time and the first update time of the target type table includes: determining the update state of the target type table to be updated under the condition that the difference value between the latest data sending time and the first update time is smaller than a second threshold value, wherein the second threshold value is smaller than or equal to a time interval corresponding to the update period; and determining that the updating state of the target type table is not updated under the condition that the difference value between the latest data sending time and the first updating time is larger than a second threshold value.
It will be appreciated that in an extreme case the second threshold may be the time interval between two updates.
By way of example, assuming a daily update and a first daily update time of 8:00 for the target type table, the second threshold may be 24 hours, and thus the latest data transmission time if 8 yesterday: after 00, the corresponding time difference value is necessarily smaller than a second threshold value, and the updating state of the target type table is determined to be updated; if the latest data sending time is 8:00 a yesterday before, the corresponding time difference value is necessarily larger than a second threshold value, and the updating state of the target type table is determined to be not updated. Further, to more accurately determine the update status of the target type table, it may be determined that the update status of the target type table is not updated if the difference between the latest data transmission time and the first update time is equal to a second threshold. I.e. the latest data transmission time is 8:00 yesterday, and the update state of the target type table is determined as not updated.
In an exemplary embodiment, after determining the update status of the target type table according to the latest data transmission time and the first update time of the target type table, the method further includes: transmitting an update request to the data source object under the condition that the update state of the target type table is not updated, wherein the update request is used for requesting update data for updating the target type table; and receiving the update data which is sent by the data source object and is used for updating the target type table, and simultaneously updating the target type table and the first data processing file according to the update data.
Optionally, an update request is sent to the data source object, where the update request includes at least a unique identification of the target type table.
In an exemplary embodiment, after updating the first data processing file according to the target type table to obtain a second data processing file, the method further includes: acquiring update states of a plurality of first data processing files under the condition that the plurality of first data processing files are provided; and storing a plurality of first data processing files, a plurality of second data processing files corresponding to the plurality of first data processing files and update states corresponding to each first data processing file respectively.
That is, the update state of each of the plurality of first data processing files before update and after update is stored, and the update state of each of the plurality of first data processing files is stored, may include: the predicted update time and the actual update time, and the unique identifier of the corresponding target type table. Optionally, the first data processing file before and after updating may also be stored in the updated state. It should be noted that, the corresponding target type table is similarly stored in the database: in the case that the target type table is updated, storing the updated target type table and storing an update state corresponding to the target type table, the update state of the target type table may include: the target type table before updating is updated according to the expected updating time and the actual updating time.
In an exemplary embodiment, after obtaining the update status of the plurality of first data processing files, the method further includes: determining update failure files in the plurality of first data processing files, wherein file data of the first data processing files and file data of the second data processing files corresponding to the update failure files are the same; determining a unique identifier of a first type table corresponding to the update failure file, and determining an update state of the first type table according to the unique identifier, wherein the first type table is a target type table corresponding to the update failure file; and re-updating the update failure file according to the first type table under the condition that the update state of the first type table is updated.
It will be appreciated that after updating the plurality of first data processing files, if the file data of the first data processing file and the corresponding second data processing file are the same, it is determined that the first data processing file has failed. And determining a target type table (first type table) corresponding to the update failure file, and judging the update state of the first type table again, and executing the re-update operation on the first data processing file according to the first type table when the first type table is updated.
It will be apparent that the embodiments described above are only some, but not all, of the embodiments of the present application. In order to better understand the update method of the data processing file, the following description will explain the above process with reference to the embodiments, but is not limited to the technical solutions of the embodiments of the present application, specifically:
in the process of making visual reports in the tab tool, each visual report is a workbook (corresponding to the data processing file in the above embodiment), the data source of the workbook is obtained by connecting the database, the data source used for automatically updating the workbook every day is generally adopted for improving the query efficiency, but there is a problem that the refreshing plan of the workbook is the refreshing time set after the updating time of the database table, but there is often a case that the database has no updated data due to the problems of resources and the like, and the database has been successfully extracted in the specified time, but the actual data has not run. To address this problem, in an alternative embodiment, it is necessary to tune the rest api of the tableau server with Python.
Specifically, fig. 3 is a flow chart of an alternative method for updating a data processing file according to an embodiment of the present application, as shown in fig. 3, including the following steps:
it should be noted that, a Python writing program may be used to call the rest api interface of the tableau server.
S1-1, firstly, a program firstly checks a check dependency, namely checking a table of a plurality of bins on which each workbook depends, and starting to refresh the workbook if the dependency in the plurality of bins is refreshed;
s1-2, at the same time, refreshing each workbook is a task, polling is polling, and task states are tracked;
s2-1, if the task is unsuccessful, repeatedly refreshing the workbook;
s2-2, if the tasks are successful, automatically copy the running log into a table for troubleshooting, and send mails to the monitoring user, wherein if the tasks exceed the maximum running time, the tasks fail. By this mechanism, the user in charge of monitoring receives mail at regular intervals every day, and monitors the status of each task.
Through the steps, the interface service of the tabelau tool is adopted, the Python is used for automatically adjusting the interface, whether the dependency list is updated is automatically checked, and then a refreshing mechanism of the automatically adjusting workbook is removed, so that the problem of idle running is solved
Based on the above steps, for example, each time a tab makes a workbook, in a state of extracting a data source, a plan for regularly refreshing the data source is set for each workbook, and typically, a time point after updating a table of a plurality of bins is set, for example: the daily update time of the table a of the bins used by the workbook A is 8:00, and the refreshing mechanism of the workbook generally creates 8:10 to automatically update every day, but the table a may be updated at 8:30 due to the resources of the bins or other reasons, and at this time, the 8:10 workbook is updated, but the data in the workbook is not updated at this time. Therefore, the above steps solve the problem that the program is used to determine whether the table a is updated, and the work book is refreshed after the update, so that the problem of idle running data can be avoided.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiment also provides an updating device for a data processing file, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
FIG. 4 is a block diagram (one) of an alternative data processing file updating apparatus according to an embodiment of the present application, the apparatus including:
a first determining module 42, configured to determine a first data processing file to be updated;
a second determining module 44, configured to determine a target type table in a database corresponding to the first data processing file, and determine an update status of the target type table, where the target type table has a preset update period;
and the updating module 46 is configured to update the first data processing file according to the target type table to obtain a second data processing file if it is determined that the update status of the target type table is updated.
Determining a first data processing file to be updated through the device; determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period; and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file. That is, the update state of the target type table is predetermined, and the first data processing file corresponding to the target type table is updated when the update state is updated, so that the problem that the database table corresponding to the workbook is not actually updated due to the delay of the update time of the database table in the related art is solved; the effect of avoiding blank data is achieved.
In an exemplary embodiment, the second determining module 44 is further configured to determine a first data content of the target type table at a first update time, where the first update time is a latest update time indicated by the update period; determining a second data content of the target type table at a target time after a first update time, wherein a difference between the target time and the first update time is less than a first threshold; determining whether there is difference data between the first data content and the second data content; in the presence of difference data, the update status is determined to be updated.
It can be appreciated that the update period of the target type table may be set to be updated every day, that is, every 24 hours, and then the first update time of each day may be 8:00, and then the target time may be 8:05, and then the corresponding first threshold may be 6 minutes. Acquiring first data content of a target type table at a first update time 8:00, and at a target time 8:05 obtaining the second data content of the target type table. And further comparing whether the first data content and the second data content have difference data, and determining the update state as updated if the difference data exists.
It should be noted that 1) the target time may be selected before the first update time, and then: and determining third data content of the target type table at a target time before the first updating time, wherein the difference value between the target time and the first updating time is still smaller than a first threshold value. 2) The first threshold needs to be smaller than an update time interval corresponding to an update period preset in the target type table, for example, the update period is 24 hours, and then the first threshold is smaller than 24 hours. 3) The target time, the first threshold, may be selected as desired within a defined time frame.
In an exemplary embodiment, the second determining module 44 is further configured to determine that the update status is not updated if there is no difference data between the first data content and the second data content after determining whether there is difference data between the first data content and the second data content.
In an exemplary embodiment, the second determining module 44 is further configured to obtain a resource address corresponding to the data in the target type table; accessing a data source object of the target type table according to the resource address, and acquiring log sending data of the data source object from the data source object, wherein the data source object is used for providing data of the target type table, and the log sending data is used for recording a log of the data source object sending data to the target type table; determining the latest data transmission time of the data source object from the log transmission data; and determining the update state of the target type table according to the latest data transmission time and the first update time of the target type table.
Alternatively, the data source object may be a cloud or another database. The log of the data source object may be obtained actively, or may be sent by the data source object, which is not limited in this embodiment of the present application. Alternatively, the log transmission data may include log transmission data for a plurality of target type tables. The unique identification of the target type table that determines the update status as needed determines the latest data transmission time for the data source object to transmit data to the target type table. The latest data transmission time is before the first update time or coincides with the first update time. It should be noted that, in the embodiment of the present application, the latest data sending time of the data source object is determined as the latest data receiving time of the target type table, that is, the data transmission time is ignored.
In an exemplary embodiment, the second determining module 44 is further configured to determine that the update status of the target type table is updated if the difference between the latest data sending time and the first update time is less than a second threshold, where the second threshold is less than or equal to a time interval corresponding to the update period; and determining that the updating state of the target type table is not updated under the condition that the difference value between the latest data sending time and the first updating time is larger than a second threshold value.
It will be appreciated that in an extreme case the second threshold may be the time interval between two updates.
By way of example, assuming a daily update and a first daily update time of 8:00 for the target type table, the second threshold may be 24 hours, and thus the latest data transmission time if 8 yesterday: after 00, the corresponding time difference value is necessarily smaller than a second threshold value, and the updating state of the target type table is determined to be updated; if the latest data sending time is 8:00 a yesterday before, the corresponding time difference value is necessarily larger than a second threshold value, and the updating state of the target type table is determined to be not updated. Further, to more accurately determine the update status of the target type table, it may be determined that the update status of the target type table is not updated if the difference between the latest data transmission time and the first update time is equal to a second threshold. I.e. the latest data transmission time is 8:00 yesterday, and the update state of the target type table is determined as not updated.
In an exemplary embodiment, the update module 46 is further configured to, after determining the update status of the target type table according to the latest data sending time and the first update time of the target type table, send an update request to the data source object if it is determined that the update status of the target type table is not updated, where the update request is used to request update data for updating the target type table; and receiving the update data which is sent by the data source object and is used for updating the target type table, and simultaneously updating the target type table and the first data processing file according to the update data.
Optionally, an update request is sent to the data source object, where the update request includes at least a unique identification of the target type table.
In an exemplary embodiment, as shown in fig. 5, the apparatus further includes a storage module 58, configured to update the first data processing file according to the target type table, and obtain, after obtaining a second data processing file, update statuses of a plurality of the first data processing files if the first data processing file is plural; and storing a plurality of first data processing files, a plurality of second data processing files corresponding to the plurality of first data processing files and update states corresponding to each first data processing file respectively.
That is, the update state of each of the plurality of first data processing files before update and after update is stored, and the update state of each of the plurality of first data processing files is stored, may include: the predicted update time and the actual update time, and the unique identifier of the corresponding target type table. Optionally, the first data processing file before and after updating may also be stored in the updated state. It should be noted that, the corresponding target type table is similarly stored in the database: in the case that the target type table is updated, storing the updated target type table and storing an update state corresponding to the target type table, the update state of the target type table may include: the target type table before updating is updated according to the expected updating time and the actual updating time.
In an exemplary embodiment, the update module 46 is further configured to determine an update failure file in the plurality of first data processing files after obtaining update statuses of the plurality of first data processing files, where file data of a first data processing file and file data of a second data processing file corresponding to the update failure file are the same; determining a unique identifier of a first type table corresponding to the update failure file, and determining an update state of the first type table according to the unique identifier, wherein the first type table is a target type table corresponding to the update failure file; and re-updating the update failure file according to the first type table under the condition that the update state of the first type table is updated.
It will be appreciated that after updating the plurality of first data processing files, if the file data of the first data processing file and the corresponding second data processing file are the same, it is determined that the first data processing file has failed. And determining a target type table (first type table) corresponding to the update failure file, and judging the update state of the first type table again, and executing the re-update operation on the first data processing file according to the first type table when the first type table is updated.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, determining a first data processing file to be updated;
s2, determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period;
And S3, under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
Embodiments of the present application also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, determining a first data processing file to be updated;
s2, determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period;
And S3, under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method of updating a data processing file, comprising:
determining a first data processing file to be updated;
determining a target type table in a database corresponding to the first data processing file, and determining an updating state of the target type table, wherein the target type table has a preset updating period;
and under the condition that the updating state of the target type table is determined to be updated, updating the first data processing file according to the target type table to obtain a second data processing file.
2. The method of updating a data processing file according to claim 1, wherein determining an update status of the target type table comprises:
determining first data content of the target type table at a first update time, wherein the first update time is a latest update time indicated by the update period;
Determining a second data content of the target type table at a target time after a first update time, wherein a difference between the target time and the first update time is less than a first threshold;
determining whether there is difference data between the first data content and the second data content;
in the presence of difference data, the update status is determined to be updated.
3. The method of updating a data processing file according to claim 2, wherein after determining whether there is difference data between the first data content and the second data content, the method further comprises:
in the event that there is no difference data between the first data content and the second data content, the update status is determined to be not updated.
4. The method of updating a data processing file according to claim 1, wherein determining an update status of the target type table comprises:
acquiring a resource address corresponding to data in the target type table;
accessing a data source object of the target type table according to the resource address, and acquiring log sending data of the data source object from the data source object, wherein the data source object is used for providing data of the target type table, and the log sending data is used for recording a log of the data source object sending data to the target type table;
Determining the latest data transmission time of the data source object from the log transmission data;
and determining the update state of the target type table according to the latest data transmission time and the first update time of the target type table.
5. The method of updating a data processing file according to claim 4, wherein determining the update status of the target type table based on the latest data transmission time and the first update time of the target type table comprises:
determining the update state of the target type table to be updated under the condition that the difference value between the latest data sending time and the first update time is smaller than a second threshold value, wherein the second threshold value is smaller than or equal to a time interval corresponding to the update period;
and determining that the updating state of the target type table is not updated under the condition that the difference value between the latest data sending time and the first updating time is larger than a second threshold value.
6. The method for updating a data processing file according to claim 1, wherein after updating the first data processing file according to the target type table to obtain a second data processing file, the method further comprises:
Acquiring update states of a plurality of first data processing files under the condition that the plurality of first data processing files are provided;
and storing a plurality of first data processing files, a plurality of second data processing files corresponding to the plurality of first data processing files and update states corresponding to each first data processing file respectively.
7. The method for updating a data processing file according to claim 6, wherein after acquiring the update statuses of the plurality of first data processing files, the method further comprises:
determining update failure files in the plurality of first data processing files, wherein file data of the first data processing files and file data of the second data processing files corresponding to the update failure files are the same;
determining a unique identifier of a first type table corresponding to the update failure file, and determining an update state of the first type table according to the unique identifier, wherein the first type table is a target type table corresponding to the update failure file;
and re-updating the update failure file according to the first type table under the condition that the update state of the first type table is updated.
8. An updating apparatus for a data processing file, comprising:
the first determining module is used for determining a first data processing file to be updated;
the second determining module is used for determining a target type table in a database corresponding to the first data processing file and determining the updating state of the target type table, wherein the target type table has a preset updating period;
and the updating module is used for updating the first data processing file according to the target type table to obtain a second data processing file under the condition that the updating state of the target type table is determined to be updated.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202310331650.3A 2023-03-30 2023-03-30 Updating method and device of data processing file, storage medium and electronic device Pending CN116561141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310331650.3A CN116561141A (en) 2023-03-30 2023-03-30 Updating method and device of data processing file, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310331650.3A CN116561141A (en) 2023-03-30 2023-03-30 Updating method and device of data processing file, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116561141A true CN116561141A (en) 2023-08-08

Family

ID=87502699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310331650.3A Pending CN116561141A (en) 2023-03-30 2023-03-30 Updating method and device of data processing file, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116561141A (en)

Similar Documents

Publication Publication Date Title
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US8930521B2 (en) Method, apparatus, and computer program product for enabling monitoring of a resource
US8447757B1 (en) Latency reduction techniques for partitioned processing
CN106817408B (en) Distributed server cluster scheduling method and device
CN110543512B (en) Information synchronization method, device and system
CN116561141A (en) Updating method and device of data processing file, storage medium and electronic device
CN112035139A (en) Data updating method, device, system and storage medium for intelligent household equipment
CN109960572B (en) Equipment resource management method and device and intelligent terminal
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN114598662A (en) Message queue cluster federal management system and method
CN115174513B (en) Message pushing method and device, storage medium and electronic device
CN115296948B (en) Scene information updating method and device, storage medium and electronic device
CN115314549B (en) Offline equipment management method, storage medium and electronic device
CN116418613A (en) Message reflow processing method and device, storage medium and electronic device
CN115174382B (en) Equipment upgrading method, storage medium and electronic device
CN115175109B (en) Control command sending method and device, storage medium and electronic device
CN116248647A (en) Method and device for sending resource package, storage medium and electronic device
EP4033722A1 (en) Event notification method, system, server device, and computer storage medium
CN116301767A (en) Interface file generation method and device, storage medium and electronic device
CN115296958A (en) Distribution method and device of equipment control task, storage medium and electronic device
CN116467173A (en) Method and device for determining key test, storage medium and electronic device
CN116980403A (en) File uploading method and device, storage medium and electronic device
CN117743461A (en) Data synchronization method and device, storage medium and electronic device
CN115576966A (en) Data updating method and device, storage medium and electronic device
CN116436861A (en) Message sending method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination