CN115599793B - Method, device and storage medium for updating data - Google Patents

Method, device and storage medium for updating data Download PDF

Info

Publication number
CN115599793B
CN115599793B CN202211193804.9A CN202211193804A CN115599793B CN 115599793 B CN115599793 B CN 115599793B CN 202211193804 A CN202211193804 A CN 202211193804A CN 115599793 B CN115599793 B CN 115599793B
Authority
CN
China
Prior art keywords
attribute data
attribute
current
previous
entity object
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.)
Active
Application number
CN202211193804.9A
Other languages
Chinese (zh)
Other versions
CN115599793A (en
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.)
Beijing Wellintech Co Ltd
Original Assignee
Beijing Wellintech 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 Beijing Wellintech Co Ltd filed Critical Beijing Wellintech Co Ltd
Priority to CN202211193804.9A priority Critical patent/CN115599793B/en
Publication of CN115599793A publication Critical patent/CN115599793A/en
Application granted granted Critical
Publication of CN115599793B publication Critical patent/CN115599793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2322Optimistic concurrency control using timestamps
    • 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
    • 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/2379Updates performed during online database operations; commit processing

Landscapes

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

Abstract

The application relates to the technical field of data storage, and discloses a method, a device and a storage medium for updating data, wherein the method comprises the following steps: acquiring at least two current attribute data of a target entity object acquired in a current period, and acquiring at least two previous attribute data acquired in a last period of a stored target entity object, wherein the target entity object corresponds to a target timestamp, each current attribute data and each previous attribute data corresponds to one attribute variable of the target entity object one by one, and executing the following operations aiming at the current attribute data and the previous attribute data corresponding to the same attribute variable: and comparing the current attribute data with the previous attribute data to obtain a comparison result, if the comparison result exceeds the attribute range threshold, updating the previous attribute data into the current attribute data, and updating the target timestamp into the timestamp corresponding to the current period, thereby saving the storage space by using the unique timestamp on the premise of ensuring that the attribute data is consistent with the entity object.

Description

Method, device and storage medium for updating data
Technical Field
The application relates to the technical field of data storage and provides a method, a device and a storage medium for updating data.
Background
In the data storage process, the real-time states of a plurality of attributes (namely the specific values of the corresponding attributes) of the entity objects in the objective reality need to be updated at the same time, and when the real-time state of one attribute is stored, a common storage form is that one real-time state corresponds to one timestamp.
Taking a boiler device as a physical object for illustration, a plurality of acquisition points are preset in the boiler device, each acquisition point acquires the properties of temperature, pressure, flow and the like at the same time, and considering that the real-time object of the boiler as a whole has different change frequencies of the corresponding properties, and has rapid change (for example, temperature) and slow change (for example, flow). In the storage process, if the real-time state corresponding to all the attributes of the whole real-time object is updated with the change frequency of the attribute with the fastest change, the update data volume is overlarge, even unnecessary update exists, and the storage resource is wasted; if the real-time state corresponding to all the attributes of the whole entity object is updated with the change frequency of the attributes with slower change, the storage state of the attributes of the entity object is not consistent with the objective reality.
Disclosure of Invention
The embodiment of the application provides a method, a device and a storage medium for updating data, which are used for saving storage space on the premise of ensuring that attribute data are consistent with an entity object.
The specific technical scheme provided by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for updating data, including:
acquiring at least two current attribute data of a target entity object acquired in a current period, and acquiring at least two previous attribute data acquired in a last period of the stored target entity object, wherein the target entity object corresponds to a target timestamp, and each current attribute data and each previous attribute data correspond to one attribute variable of the target entity object one by one;
the following operations are performed for the current attribute data and the previous attribute data corresponding to the same attribute variable:
comparing the current attribute data with the previous attribute data to obtain a comparison result;
if the comparison result exceeds the attribute range threshold, the previous attribute data is updated to the current attribute data, and the target timestamp is updated to the timestamp corresponding to the current period.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, and further including:
if the comparison result does not exceed the attribute range threshold, the target timestamp is updated to be the timestamp corresponding to the current period.
Optionally, before acquiring the current attribute data of the target entity object acquired in the current period, the method further includes:
creating a target entity object based on the object of the data to be updated;
at least three variables are set for the target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in a current period, and one attribute variable corresponds to one previous attribute data in a previous period.
Optionally, updating the target timestamp to a timestamp corresponding to the current period includes:
extracting a time stamp corresponding to the starting time or the ending time of the current period;
and updating the target time stamp to the corresponding time stamp.
Optionally, acquiring the current attribute data of the target entity object acquired in the current period includes:
and receiving the current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of an attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, acquiring the stored previous attribute data acquired in the last period of the target entity object includes:
acquiring each attribute data corresponding to the stored target entity object from the storage space;
and taking the attribute data with the acquisition time of the last period in each attribute data as the previous attribute data.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, including:
calculating a difference value between the current attribute data and the previous attribute data, and taking the difference value as a comparison result;
or alternatively;
and calculating the quotient between the current attribute data and the previous attribute data, and taking the quotient as a comparison result.
In a second aspect, an embodiment of the present application further provides an apparatus for updating data, including:
the acquisition unit is used for acquiring at least two current attribute data of a target entity object acquired in a current period and acquiring at least two previous attribute data acquired in a last period of a stored target entity object, wherein the target entity object corresponds to a target timestamp, and each current attribute data and each previous attribute data correspond to one attribute variable of the target entity object one by one;
a comparison unit, configured to perform the following operations for current attribute data and previous attribute data corresponding to the same attribute variable: comparing the current attribute data with the previous attribute data to obtain a comparison result;
and the updating unit is used for updating the previous attribute data into the current attribute data and updating the target timestamp into the timestamp corresponding to the current period if the comparison result exceeds the attribute range threshold value.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, and further including:
if the comparison result does not exceed the attribute range threshold, the target timestamp is updated to be the timestamp corresponding to the current period.
Optionally, before acquiring the current attribute data of the target entity object acquired in the current period, the method further includes:
creating a target entity object based on the object of the data to be updated;
at least three variables are set for the target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in a current period, and one attribute variable corresponds to one previous attribute data in a previous period.
Optionally, the target timestamp is updated to a timestamp corresponding to the current period, and the updating unit is configured to:
extracting a time stamp corresponding to the starting time or the ending time of the current period;
and updating the target time stamp to the corresponding time stamp.
Optionally, the acquiring unit is configured to acquire current attribute data of the target entity object acquired in the current period:
and receiving the current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of an attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, the acquiring unit is configured to acquire the stored previous attribute data acquired in the last period of the target entity object, where the acquiring unit is configured to:
acquiring each attribute data corresponding to the stored target entity object from the storage space;
and taking the attribute data with the acquisition time of the last period in each attribute data as the previous attribute data.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, wherein the comparison unit is configured to:
calculating a difference value between the current attribute data and the previous attribute data, and taking the difference value as a comparison result;
or alternatively;
and calculating the quotient between the current attribute data and the previous attribute data, and taking the quotient as a comparison result.
In a third aspect, an intelligent terminal includes:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in a memory to implement the method of any one of the first aspects.
In a fourth aspect, a computer readable storage medium, which when executed by a processor, causes the processor to perform the method of any of the first aspects.
The beneficial effects of the application are as follows:
in summary, in the embodiments of the present application, a method, an apparatus, and a storage medium for updating data are provided, where the method includes: acquiring at least two current attribute data of a target entity object acquired in a current period, and acquiring at least two previous attribute data acquired in a last period of a stored target entity object, wherein the target entity object corresponds to a target timestamp, each current attribute data and each previous attribute data corresponds to one attribute variable of the target entity object one by one, and executing the following operations on the current attribute data and the previous attribute data corresponding to the same attribute variable: and comparing the current attribute data with the previous attribute data to obtain a comparison result, if the comparison result exceeds the attribute range threshold, updating the previous attribute data into the current attribute data, and updating the target timestamp into the timestamp corresponding to the current period, thereby saving the storage space by using the unique timestamp on the premise of ensuring that the attribute data is consistent with the entity object.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a schematic diagram of a system architecture for updating data according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of determining variables according to target entity objects in an embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for updating data according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for updating data according to an attribute range threshold in an embodiment of the present application;
FIG. 5 is a schematic diagram of a logic architecture of an apparatus for updating data according to an embodiment of the present application;
fig. 6 is a schematic diagram of an entity architecture of the intelligent terminal in the embodiment of the application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, which can be made by a person of ordinary skill in the art without any inventive effort, based on the embodiments described in the present application are intended to be within the scope of the technical solutions of the present application.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements 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 the embodiments of the invention described herein may be capable of being practiced otherwise than as specifically illustrated and described.
The preferred embodiments of the present application will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, in the embodiment of the present application, a system includes at least one target entity object, an acquisition device and an intelligent terminal, and when the acquisition device acquires attribute data of the target entity object in the operation process, the attribute data is sent to the intelligent terminal, and the intelligent terminal stores and updates the attribute data, which is described in detail below.
Referring to fig. 2, before obtaining the current attribute data of the target entity object collected in the current period, in this embodiment of the present application, the method further includes:
step 101: a target entity object is created based on the object of the data to be updated.
Considering that the number of entity objects that can be stored in the database is huge, in the implementation process, first, the entity object that is to store attribute data is determined, that is, a target entity object is determined, and specifically, the target entity object is created according to the object that is to be updated.
For example, the boiler a generates real-time attribute data such as temperature and pressure during use, and if the real-time attribute data such as temperature and pressure is to be stored, that is, it is determined that the object of the data to be updated is the boiler a, the target entity object a is created according to the boiler a.
Step 102: at least three variables are set for the target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in a current period, and one attribute variable corresponds to one previous attribute data in a previous period.
In the implementation process, after determining the target entity object, in order to update the attribute data of the target entity object, the updated variables need to be determined first, specifically, at least three variables are set for the target entity object, where the at least three variables include a target timestamp and at least two attribute variables, that is, only a unique timestamp is set for one target entity object, and the target timestamp corresponds to all attribute variables of the target entity object, that is, at least two attribute variables correspond to the target timestamp.
It should be noted that, in order to better reflect the process of updating data, in this embodiment of the present application, one attribute variable of a current period corresponds to one current attribute data, and one attribute variable of a previous period corresponds to one previous attribute data.
Taking the above-mentioned target entity object a (i.e. the boiler a) as an example, a target timestamp a and two attribute variables are set for the target entity object a, where the two attribute variables are temperature and pressure respectively, and the temperature corresponds to the previous attribute data t1, the pressure corresponds to the previous attribute data y1, the temperature corresponds to the current attribute data t2, and the pressure corresponds to the current attribute data y2 in the previous period. Typically, during the data storage and update process, the specific values of t1, t2, y1 and y2 are stored directly, and the specific value of the target timestamp a is also stored for the target entity object a.
Referring to fig. 3, in the embodiment of the present application, a specific flow of updating data is as follows:
step 201: and acquiring at least two current attribute data of the target entity object acquired in the current period, and acquiring at least two previous attribute data acquired in the last period of the stored target entity object, wherein the target entity object corresponds to the target timestamp, and each current attribute data and each previous attribute data correspond to one attribute variable of the target entity object one by one.
Here, first, how the current attribute data and the previous attribute data of the target entity object are acquired will be described.
Specifically, obtaining current attribute data of a target entity object collected in a current period includes:
and receiving the current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of an attribute variable acquired by the acquisition equipment from the target entity object.
In the implementation process, the collection frequency of the collection device, that is, how often the collection device collects the value of the attribute variable of the target entity object, is preset, and after the collection device obtains the value of the attribute variable from the target entity object in real time, the value of the attribute variable obtained in real time corresponding to the current period is used as the current attribute data.
Correspondingly, acquiring the stored previous attribute data acquired in the last period of the target entity object comprises the following steps:
and acquiring each attribute data corresponding to the stored target entity object from the storage space.
Considering that the data stored in the storage space (for example, the database) is collected and stored by the collection device at a time before the current period, based on this, in order to obtain the previous attribute data collected in the previous period of the target entity object, in the implementation process, each attribute data corresponding to the stored target entity object is obtained from the storage space. The time before the current period includes the last period, and so on.
For example, attribute data t0, attribute data t1, attribute data y0, and attribute data y1 of the target entity object a are read from the database a.
And taking the attribute data with the acquisition time of the last period in each attribute data as the previous attribute data.
In the implementation process, after each attribute data corresponding to the stored target entity object is obtained, the attribute data with the collection time of the last period is screened out from the attribute data.
It is assumed that the attribute data t0 and the attribute data y0 correspond to the last cycle, and the attribute data t1 and the attribute data y1 correspond to the last cycle, so that the attribute data t1 and the attribute data y1 are filtered out, and the attribute data t1 and the attribute data y1 are taken as previous attribute data.
After obtaining the current attribute data and the previous attribute data corresponding to the plurality of attribute variables of a certain target entity object, the following operations are further executed for the current attribute data and the previous attribute data corresponding to the same attribute variable:
step 202: and comparing the current attribute data with the previous attribute data to obtain a comparison result.
In the implementation process, after each attribute variable (such as temperature) is obtained, the current attribute data and the previous attribute data of each attribute variable are compared, so that a comparison result representing the change trend of the attribute data is obtained.
Correspondingly, after comparing the attribute variables, a plurality of groups of comparison results describing the change trend of the target entity object can be obtained.
Specifically, comparing the current attribute data with the previous attribute data to obtain a comparison result, including:
first case: and calculating the difference between the current attribute data and the previous attribute data, and taking the difference as a comparison result.
In the comparison process, for each attribute variable, subtracting the previous attribute data from the current attribute data, i.e. calculating the difference between the current attribute data and the previous attribute data, and taking the difference as a comparison result.
Or alternatively
Second case: and calculating the quotient between the current attribute data and the previous attribute data, and taking the quotient as a comparison result.
In the comparison process, for each attribute variable, dividing the current attribute data by the previous attribute data, i.e. calculating a quotient between the current attribute data and the previous attribute data, and taking the quotient as a comparison result.
Through the comparison process, a plurality of comparison results aiming at the target entity object can be obtained.
Step 203: if the comparison result exceeds the attribute range threshold, the previous attribute data is updated to the current attribute data, and the target timestamp is updated to the timestamp corresponding to the current period.
In the implementation process, before a comparison result corresponding to a certain attribute variable is obtained, an attribute range threshold corresponding to the attribute variable is correspondingly obtained, and in general, the attribute range threshold is a data set in which attribute data of a target entity object is not changed, that is, if a value corresponding to the comparison result falls within the attribute range threshold, the previous attribute data is determined to be the same as the current attribute data, the attribute data corresponding to the corresponding attribute variable is not changed, and in this case, the stored attribute data does not need to be updated.
If the comparison result exceeds the attribute range threshold, the previous attribute data is determined to be different from the current attribute data, and the attribute data corresponding to the corresponding attribute variable is changed, so that the stored attribute data is required to be updated.
Considering that the types and the number of the attribute data about the target entity object stored in the storage space are multiple, and the attribute data in the storage space are fast in change, and the attribute data in the storage space are slow in change, in order to accurately describe the change of the attribute data, meanwhile, the storage space is saved to the greatest extent, in the implementation process, only the current attribute data with the comparison result exceeding the attribute range threshold value is used for updating the corresponding previous attribute data, and the target timestamp of the target entity object is updated to be the timestamp corresponding to the current period, so that the latest updated time can be recorded.
Specifically, updating the target timestamp to the timestamp corresponding to the current period includes:
and extracting a time stamp corresponding to the starting time or the ending time of the current period.
Because the current period corresponds to a period of time, and the time stamp is usually a specific time, in the implementation process, the starting time or the ending time is extracted from the current period, and the time stamp corresponding to the starting time or the ending time is obtained.
And updating the target time stamp to the corresponding time stamp.
When at least one attribute variable needs to be updated, updating the previous attribute data corresponding to the attribute variable into the current attribute data, and simultaneously updating the target timestamp of the target entity object stored in the storage space into the timestamp corresponding to the current period.
It should be noted that, the comparison result is correspondingly consistent with the expression form of the attribute range threshold, that is, when the comparison result is a difference value, the attribute range threshold is also a difference value form; when the comparison result is a quotient, the attribute range threshold is also in the form of the quotient.
Referring to fig. 4, in the implementation process, the comparison result is obtained by comparing the current attribute data with the previous attribute data, and further includes:
step 204: if the comparison result does not exceed the attribute range threshold, the target timestamp is updated to be the timestamp corresponding to the current period.
That is, for all attribute data of the target entity object, if the comparison result does not exceed the attribute range threshold, it is determined that the previous attribute data is the same as the current attribute data, and the attribute data corresponding to the corresponding attribute variable is unchanged, in this case, the stored attribute data does not need to be updated, but in order to effectively identify the validity of the attribute data in the storage space, the target timestamp corresponding to the target entity object is updated to the timestamp corresponding to the current period.
Based on the same inventive concept, referring to fig. 5, an apparatus for updating data in an embodiment of the present application includes:
an obtaining unit 501, configured to obtain at least two current attribute data of a target entity object collected in a current period, and obtain at least two previous attribute data collected in a previous period of a stored target entity object, where the target entity object corresponds to a target timestamp, and each current attribute data and each previous attribute data corresponds to one attribute variable of the target entity object one by one;
a comparing unit 502, configured to perform the following operations for the current attribute data and the previous attribute data corresponding to the same attribute variable: comparing the current attribute data with the previous attribute data to obtain a comparison result;
and an updating unit 503, configured to update the previous attribute data to the current attribute data and update the target timestamp to the timestamp corresponding to the current period if the comparison result exceeds the attribute range threshold.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, and further including:
if the comparison result does not exceed the attribute range threshold, the target timestamp is updated to be the timestamp corresponding to the current period.
Optionally, before acquiring the current attribute data of the target entity object acquired in the current period, the method further includes:
creating a target entity object based on the object of the data to be updated;
at least three variables are set for the target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in a current period, and one attribute variable corresponds to one previous attribute data in a previous period.
Optionally, the update unit 503 is configured to update the target timestamp to a timestamp corresponding to the current period:
extracting a time stamp corresponding to the starting time or the ending time of the current period;
and updating the target time stamp to the corresponding time stamp.
Optionally, the acquiring unit 501 is configured to acquire current attribute data of a target entity object acquired in a current period:
and receiving the current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of an attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, the acquiring unit 501 is configured to acquire previous attribute data acquired in a previous period of the stored target entity object:
acquiring each attribute data corresponding to the stored target entity object from the storage space;
and taking the attribute data with the acquisition time of the last period in each attribute data as the previous attribute data.
Optionally, comparing the current attribute data with the previous attribute data to obtain a comparison result, and the comparing unit 502 is configured to:
calculating a difference value between the current attribute data and the previous attribute data, and taking the difference value as a comparison result;
or alternatively;
and calculating the quotient between the current attribute data and the previous attribute data, and taking the quotient as a comparison result.
Based on the same inventive concept, referring to fig. 6, an embodiment of the present application provides an intelligent terminal, including: a memory 601 for storing executable instructions; a processor 602 for reading and executing executable instructions stored in a memory and performing any of the methods of the first aspect described above.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium, which when executed by a processor, causes the processor to perform the method of any one of the above-described first aspects.
In summary, in the embodiments of the present application, a method, an apparatus, and a storage medium for updating data are provided, where the method includes: acquiring at least two current attribute data of a target entity object acquired in a current period, and acquiring at least two previous attribute data acquired in a last period of a stored target entity object, wherein the target entity object corresponds to a target timestamp, each current attribute data and each previous attribute data corresponds to one attribute variable of the target entity object one by one, and executing the following operations on the current attribute data and the previous attribute data corresponding to the same attribute variable: and comparing the current attribute data with the previous attribute data to obtain a comparison result, if the comparison result exceeds the attribute range threshold, updating the previous attribute data into the current attribute data, and updating the target timestamp into the timestamp corresponding to the current period, thereby saving the storage space by using the unique timestamp on the premise of ensuring that the attribute data is consistent with the entity object.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product system. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product system embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program product systems according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (8)

1. A method of updating data, the method comprising:
creating a target entity object based on the object of the data to be updated;
setting at least three variables for the target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in a current period, one attribute variable corresponds to one previous attribute data in a previous period, and the at least two attribute variables correspond to the target timestamp;
acquiring at least two current attribute data of the target entity object acquired in real time according to the acquisition frequency in a current period, and acquiring at least two previous attribute data acquired in the last period of the stored target entity object, wherein the target entity object corresponds to a target timestamp, each current attribute data and each previous attribute data corresponds to one attribute variable of the target entity object one by one, and the attribute data is the value of the attribute variable corresponding to the current period;
the following operations are performed for the current attribute data and the previous attribute data corresponding to the same attribute variable:
comparing the current attribute data with the previous attribute data to obtain a comparison result;
if the comparison result exceeds an attribute range threshold, updating the previous attribute data into the current attribute data, and updating the target timestamp into a timestamp corresponding to the current period;
if the comparison result does not exceed the attribute range threshold, updating the target timestamp to be the timestamp corresponding to the current period; the attribute range threshold is a data set which identifies that the attribute data of the target entity object is unchanged.
2. The method of claim 1, wherein the updating the target timestamp to the timestamp corresponding to the current period comprises:
extracting a time stamp corresponding to the starting time or the ending time of the current period;
and updating the target timestamp to the corresponding timestamp.
3. The method of claim 1, wherein the obtaining the current attribute data of the target entity object collected in the current period comprises:
and receiving the current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of an attribute variable acquired by the acquisition equipment from a target entity object.
4. The method of claim 1, wherein the acquiring the previous attribute data collected in the last cycle of the stored target entity object comprises:
acquiring each stored attribute data corresponding to the target entity object from a storage space;
and taking the attribute data with the acquisition time of the last period in the attribute data as the previous attribute data.
5. The method according to any one of claims 1 to 4, wherein comparing the current attribute data with the previous attribute data to obtain a comparison result comprises:
calculating a difference value between the current attribute data and the previous attribute data, and taking the difference value as the comparison result;
or alternatively;
and calculating a quotient between the current attribute data and the previous attribute data, and taking the quotient as the comparison result.
6. An apparatus for updating data, comprising:
the device comprises an acquisition unit, a storage unit and a storage unit, wherein the acquisition unit is used for creating a target entity object based on an object of data to be updated, setting at least three variables for the target entity object, acquiring at least two current attribute data of the target entity object acquired in real time according to acquisition frequency in a current period, and acquiring at least two previous attribute data acquired in the last period of the stored target entity object, wherein the at least three variables comprise a target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in the current period, one attribute variable corresponds to one previous attribute data in the last period, the at least two attribute variables correspond to the target timestamp, the target entity object corresponds to the target timestamp, and each current attribute data and each previous attribute data correspond to one attribute variable of the target entity object one by one, and the attribute data are values of the attribute variables corresponding to the current period;
a comparison unit, configured to perform the following operations for the current attribute data and the previous attribute data corresponding to the same attribute variable: comparing the current attribute data with the previous attribute data to obtain a comparison result;
the updating unit is used for updating the previous attribute data into the current attribute data and updating the target timestamp into the timestamp corresponding to the current period if the comparison result exceeds the attribute range threshold value, and updating the target timestamp into the timestamp corresponding to the current period if the comparison result does not exceed the attribute range threshold value; the attribute range threshold is a data set which identifies that the attribute data of the target entity object is unchanged.
7. An intelligent terminal, characterized by comprising:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in said memory to implement the method of any one of claims 1-5.
8. A computer readable storage medium, wherein instructions in the storage medium, when executed by a processor, enable the processor to perform the method of any one of claims 1-5.
CN202211193804.9A 2022-09-28 2022-09-28 Method, device and storage medium for updating data Active CN115599793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211193804.9A CN115599793B (en) 2022-09-28 2022-09-28 Method, device and storage medium for updating data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211193804.9A CN115599793B (en) 2022-09-28 2022-09-28 Method, device and storage medium for updating data

Publications (2)

Publication Number Publication Date
CN115599793A CN115599793A (en) 2023-01-13
CN115599793B true CN115599793B (en) 2024-01-26

Family

ID=84844828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211193804.9A Active CN115599793B (en) 2022-09-28 2022-09-28 Method, device and storage medium for updating data

Country Status (1)

Country Link
CN (1) CN115599793B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932008B (en) * 2023-09-12 2023-12-08 湖南速子文化科技有限公司 Method, device, equipment and medium for updating component data of virtual society simulation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008211748A (en) * 2007-02-28 2008-09-11 Canon Inc Server apparatus, information processing device, data registration processing method, storage medium, and program
CN110019823A (en) * 2017-07-13 2019-07-16 阿里巴巴集团控股有限公司 Update the method and device of knowledge mapping
CN112115143A (en) * 2020-09-15 2020-12-22 招商局金融科技有限公司 Automatic data updating and synchronizing method and device, electronic equipment and storage medium
CN113407623A (en) * 2021-05-31 2021-09-17 北京达佳互联信息技术有限公司 Data processing method and device and server
CN113672692A (en) * 2021-10-25 2021-11-19 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
CN114969058A (en) * 2022-07-15 2022-08-30 济南浪潮数据技术有限公司 Data updating method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060184563A1 (en) * 2005-02-14 2006-08-17 Potter David H Method and apparatus for temporal database
CN113590017B (en) * 2020-04-30 2023-11-17 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for processing data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008211748A (en) * 2007-02-28 2008-09-11 Canon Inc Server apparatus, information processing device, data registration processing method, storage medium, and program
CN110019823A (en) * 2017-07-13 2019-07-16 阿里巴巴集团控股有限公司 Update the method and device of knowledge mapping
CN112115143A (en) * 2020-09-15 2020-12-22 招商局金融科技有限公司 Automatic data updating and synchronizing method and device, electronic equipment and storage medium
CN113407623A (en) * 2021-05-31 2021-09-17 北京达佳互联信息技术有限公司 Data processing method and device and server
CN113672692A (en) * 2021-10-25 2021-11-19 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
CN114969058A (en) * 2022-07-15 2022-08-30 济南浪潮数据技术有限公司 Data updating method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115599793A (en) 2023-01-13

Similar Documents

Publication Publication Date Title
CN107909107B (en) Fiber detection method and device and electronic equipment
CN108536752B (en) Data synchronization method, device and equipment
CN115599793B (en) Method, device and storage medium for updating data
CN109358898B (en) Information processing method and device, electronic equipment and storage medium
CN109165175B (en) Equipment identifier generation method and device
CN106682017B (en) Database updating method and device
CN113918658A (en) Method and device for recovering data
CN101751248B (en) Method and system applied by Web for designing time-sensitive performance test case
CN116776787B (en) Automatic recognition method of signal alias, electronic equipment and medium
CN113704343A (en) Data blood margin visualization implementation method and system in data processing
CN111427696B (en) Service resource scheduling method and device
CN111510109B (en) Signal filtering method, device, equipment and medium
CN112132931B (en) Processing method, device and system for templated video synthesis
CN114020640A (en) Automatic testing method and device
CN106776623B (en) User behavior analysis method and device
CN111143582B (en) Multimedia resource recommendation method and device for updating association words in double indexes in real time
CN110968640A (en) Oil well data processing method and device and oil well control system
CN109325432B (en) Three-dimensional object identification method and equipment and computer readable storage medium
CN106874391B (en) deadlock processing method and device
CN111143182A (en) Method and device for analyzing process behaviors and storage medium
CN106469086B (en) Event processing method and device
CN106055625B (en) Method and device for executing service
CN114594746B (en) Intelligent production detection control method and system for modified rubber
CN115599330B (en) Fault diagnosis method and related device of data acquisition system
CN113792247B (en) Method, apparatus, device and medium for generating functional flow chart based on code characteristics

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
GR01 Patent grant
GR01 Patent grant