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

Method, device and storage medium for updating data Download PDF

Info

Publication number
CN115599793A
CN115599793A CN202211193804.9A CN202211193804A CN115599793A CN 115599793 A CN115599793 A CN 115599793A CN 202211193804 A CN202211193804 A CN 202211193804A CN 115599793 A CN115599793 A CN 115599793A
Authority
CN
China
Prior art keywords
attribute data
current
previous
attribute
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.)
Granted
Application number
CN202211193804.9A
Other languages
Chinese (zh)
Other versions
CN115599793B (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

Images

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: the method comprises the steps of obtaining at least two current attribute data of a target entity object collected in a current period, obtaining at least two previous attribute data collected in a previous 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 correspond to one attribute variable of the target entity object one by one, and the following operations are executed 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 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, so that on the premise of ensuring that the attribute data is consistent with the entity object, the storage space is saved by using the unique timestamp.

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, real-time states (namely specific values of corresponding attributes) of a plurality of attributes of an entity object in objective reality need to be updated at the same time, when the real-time state of one attribute is stored, a common storage form is that one real-time state corresponds to one timestamp, and because each entity object has a plurality of continuous real-time states corresponding to a plurality of attributes to be stored, the storage process can cause the occupied computer memory to be overlarge.
Taking a boiler plant as an entity object for example, a plurality of collection points are set in the boiler plant in advance, each collection point simultaneously collects attributes such as temperature, pressure, flow and the like, and considering that the real-time object of the boiler as a whole has different change frequencies of corresponding attributes, fast changes (e.g., temperature) and slow changes (e.g., flow). In the storage process, if the real-time states corresponding to all the attributes of the whole real-time object are updated with the change frequency of the attribute which changes most quickly, the update data amount is overlarge, even unnecessary update exists, and the storage resources are wasted; if the real-time status corresponding to all attributes of the whole entity object is updated with the change frequency of the attributes which change slowly, the storage status of the attributes of the entity object is inconsistent 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 entity objects.
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 previous 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 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 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 a timestamp corresponding to the current period.
Optionally, after comparing the current attribute data with the previous attribute data and obtaining a comparison result, the method further includes:
and if the comparison result does not exceed the attribute range threshold, updating the target timestamp to 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;
and 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 the current period, and one attribute variable corresponds to one previous attribute data in the last period.
Optionally, updating the target timestamp to a timestamp corresponding to the current period includes:
extracting a timestamp corresponding to the starting time or the ending time of the current period;
the target timestamp is updated to a corresponding timestamp.
Optionally, the obtaining of the current attribute data of the target entity object acquired in the current period includes:
and receiving current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of the attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, the obtaining of the previous attribute data acquired in the last period of the stored 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 collection 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;
and calculating a quotient value between the current attribute data and the previous attribute data, and taking the quotient value as a comparison result.
In a second aspect, an embodiment of the present application further provides an apparatus for updating data, including:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein 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 previous period of the stored target entity object, the target entity object corresponds to a target timestamp, and each current attribute data and each previous attribute data correspond to an attribute variable of the target entity object one to one;
a comparison unit, configured to perform the following operations on 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.
Optionally, after comparing the current attribute data with the previous attribute data and obtaining a comparison result, the method further includes:
and if the comparison result does not exceed the attribute range threshold, updating the target timestamp to 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;
and 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 the current period, and one attribute variable corresponds to one previous attribute data in the last period.
Optionally, the target timestamp is updated to a timestamp corresponding to the current period, and the updating unit is configured to:
extracting a timestamp corresponding to the starting time or the ending time of the current period;
the target timestamp is updated to a corresponding timestamp.
Optionally, the current attribute data of the target entity object acquired in the current period is acquired, and the acquiring unit is configured to:
and receiving current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of the attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, the previous attribute data acquired in the last period of the stored target entity object is acquired, and 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 collection time of the last period in each attribute data as the previous attribute data.
Optionally, the current attribute data and the previous attribute data are compared to obtain a comparison result, and the comparing 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;
and calculating a quotient value between the current attribute data and the previous attribute data, and taking the quotient value as a comparison result.
In a third aspect, a smart terminal includes:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in the memory to implement a method as in any one of the first aspect.
In a fourth aspect, a computer-readable storage medium, wherein instructions, when executed by a processor, enable the processor to perform the method of any of the first aspect.
The beneficial effect of this application is as follows:
to sum up, in the embodiment 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 previous 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 correspond to one attribute variable of the target entity object one to one, and the following operations are executed 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 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, so that on the premise of ensuring that the attribute data is consistent with the entity object, the unique timestamp is used for saving the storage space.
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 the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof 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 embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a block diagram of a system for updating data according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating determination of variables according to a target entity object in an embodiment of the present application;
FIG. 3 is a flow chart illustrating a data updating method 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 according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a logic structure of an apparatus for updating data according to an embodiment of the present application;
fig. 6 is a schematic entity architecture diagram of an intelligent terminal in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 obvious that the described embodiments are some, but not all, embodiments of the technical solutions of the present application. All other embodiments obtained by a person skilled in the art based on the embodiments described in the present application without any creative effort belong to the protection scope of the technical solution of the present application.
The terms "first," "second," and the like in the description and in the claims, and in the drawings described above, 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 is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
Preferred embodiments of the present invention will be described in detail below 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, a collection device, and an intelligent terminal, and after the collection device collects attribute data of the target entity object in an 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, in the embodiment of the present application, before acquiring the current attribute data of the target entity object acquired in the current period, the method further includes:
step 101: and creating a target entity object 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, the entity object to be stored with the attribute data is determined first, that is, the target entity object is determined, and specifically, the target entity object is created according to the object of the data to be updated.
For example, the boiler a generates real-time attribute data such as temperature and pressure during the use process, and if the real-time attribute data such as the temperature and the pressure are stored, that is, if it is determined that the object to be updated is the boiler a, the target entity object a is created according to the boiler a.
Step 102: and 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 the current period, and one attribute variable corresponds to one previous attribute data in the last period.
In the implementation process, after the target entity object is determined, in order to update the attribute data of the target entity object, it is necessary to determine an updated variable 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 the attribute variables of the target entity object, that is, at least two attribute variables correspond to the target timestamp.
It should be added that, in order to better reflect the data updating process, in the embodiment of the present application, one attribute variable in the current cycle is corresponding to one current attribute data, and one attribute variable in the previous cycle is corresponding to one previous attribute data.
Still taking the target entity object a (i.e. the boiler a) as an example, a target timestamp a and two attribute variables, i.e. temperature and pressure, are set for the target entity object a, and the temperature in the last period corresponds to the previous attribute data t1, the pressure corresponds to the previous attribute data y1, the temperature in the current period corresponds to the current attribute data t2, and the pressure corresponds to the current attribute data y 2. In general, in the data storage and update process, the specific values of t1, t2, y1 and y2 are directly stored, 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 process for updating data is as follows:
step 201: the method comprises the steps of obtaining at least two current attribute data of a target entity object collected in a current period, and obtaining at least two previous attribute data collected in a previous 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 to one.
It is introduced here how the current attribute data and the previous attribute data of the target entity object are acquired.
Specifically, the acquiring of the current attribute data of the target entity object acquired in the current period includes:
and receiving current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of the attribute variable acquired by the acquisition equipment from the target entity object.
In the operation process of the target entity object, the attribute data is generated in real time, in order to acquire the attribute data of the target entity object, in the implementation process, the acquisition frequency of the acquisition equipment can be preset, namely the acquisition equipment acquires the value of the attribute variable of the target entity object once every long time, and after the acquisition equipment acquires the value of the attribute variable from the target entity object in real time, the value of the attribute variable acquired in real time corresponding to the current period is taken as the current attribute data.
Correspondingly, acquiring the previous attribute data acquired in the last period of the stored target entity object, including:
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 (e.g., a database) is acquired and stored by the acquisition device at a time before the current period, in order to acquire the previous attribute data acquired by the target entity object in the previous period, in the implementation process, the stored attribute data corresponding to the target entity object is acquired from the storage space. It should be noted that the time before the current period includes a previous period, and the like.
For example, the attribute data t0, the attribute data t1, the attribute data y0, and the attribute data y1 of the target entity object a are read from the database a.
And taking the attribute data with the collection time of the last period in each attribute data as the previous attribute data.
In the implementation process, after the attribute data corresponding to the stored target entity object are obtained, the attribute data with the collection time of the previous 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 screened out and the attribute data t1 and the attribute data y1 are taken as the previous attribute data.
After obtaining current attribute data and previous attribute data corresponding to a plurality of attribute variables of a certain target entity object, further executing the following operations 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 (for example, 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 variation trend of the attribute data is obtained.
Correspondingly, after comparing the plurality of attribute variables respectively, a plurality of groups of comparison results describing the variation trend of the target entity object can be obtained.
Specifically, the comparing the current attribute data with the previous attribute data to obtain a comparison result includes:
in the first case: and calculating the difference value between the current attribute data and the previous attribute data, and taking the difference value as a comparison result.
In the comparison process, for each attribute variable, the current attribute data is subtracted from the previous attribute data, namely, the difference between the current attribute data and the previous attribute data is calculated and is used as the comparison result.
Or
In the second case: and calculating a quotient value between the current attribute data and the previous attribute data, and taking the quotient value as a comparison result.
In the comparison process, for each attribute variable, the current attribute data is divided by the previous attribute data, namely, a quotient value between the current attribute data and the previous attribute data is obtained through calculation, and the quotient value is used as a comparison result.
Through the comparison process, a plurality of comparison results aiming at the target entity object can be obtained.
Step 203: and 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 a 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 generally, the attribute range threshold is a data set that assumes that the attribute data of the target entity object is unchanged, that is, if a value corresponding to the comparison result falls within the attribute range threshold, it is assumed 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 which 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, the attribute data corresponding to the corresponding attribute variable is changed, and in this case, the stored attribute data needs 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 some attribute data are fast in change and some attribute data are slow in change, in order to accurately describe the change of the attribute data and save the storage space to the maximum extent, in the implementation process, only the current attribute data of which the comparison result exceeds the attribute range threshold value are used for updating the corresponding previous attribute data, and the target timestamp of the target entity object is updated to the timestamp corresponding to the current period, so that the latest updating time can be recorded.
Specifically, updating the target timestamp to a timestamp corresponding to the current period includes:
and extracting the timestamp 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 timestamp is usually a specific time, in the implementation process, the starting time or the ending time is extracted from the current period, and the timestamp corresponding to the starting time or the ending time is acquired.
The target timestamp is updated to a corresponding timestamp.
When at least one attribute variable needs to be updated, updating the previous attribute data corresponding to the attribute variable to be the current attribute data, and updating the target timestamp of the target entity object stored in the storage space to be the timestamp corresponding to the current period.
It should be noted that, the expression forms of the comparison result and the attribute range threshold are correspondingly consistent, that is, when the comparison result is a difference value, the attribute range threshold is also in the form of a difference value; when the comparison result is the quotient value, the attribute range threshold is also in the form of the quotient value.
Referring to fig. 4, in the implementation process, after comparing the current attribute data with the previous attribute data and obtaining the comparison result, the method further includes:
step 204: and if the comparison result does not exceed the attribute range threshold, updating the target timestamp to the timestamp corresponding to the current period.
That is, for all the 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 has not changed.
Based on the same inventive concept, referring to fig. 5, an embodiment of the present application provides an apparatus for updating data, including:
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 correspond to one attribute variable of the target entity object one to one;
a comparing unit 502, configured to perform the following operations on 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;
an updating unit 503, configured to update the previous attribute data to the current attribute data and update the target timestamp to a timestamp corresponding to the current period if the comparison result exceeds the attribute range threshold.
Optionally, after comparing the current attribute data with the previous attribute data and obtaining a comparison result, the method further includes:
and if the comparison result does not exceed the attribute range threshold, updating the target timestamp to 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;
and 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 the current period, and one attribute variable corresponds to one previous attribute data in the last period.
Optionally, the target timestamp is updated to a timestamp corresponding to the current period, and the updating unit 503 is configured to:
extracting a timestamp corresponding to the starting time or the ending time of the current period;
the target timestamp is updated to a corresponding timestamp.
Optionally, the current attribute data of the target entity object acquired in the current period is acquired, and the acquiring unit 501 is configured to:
and receiving current attribute data acquired by the acquisition equipment, wherein the current attribute data is the value of the attribute variable acquired by the acquisition equipment from the target entity object.
Optionally, the previous attribute data acquired in the last period of the stored target entity object is obtained, and the obtaining unit 501 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 collection time of the last period in each attribute data as the previous attribute data.
Optionally, the current attribute data and the previous attribute data are compared 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;
and calculating a quotient value between the current attribute data and the previous attribute data, and taking the quotient value 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 configured to read and execute executable instructions stored in a memory, and perform any one of the methods of the first aspect.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor, enable the processor to perform the method of any one of the first aspect.
To sum up, in the embodiment 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 previous 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 correspond to one attribute variable of the target entity object one to one, and the following operations are executed 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 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, so that on the premise of ensuring that the attribute data is consistent with the entity object, the unique timestamp is used for saving the storage space.
As will be appreciated by one skilled in the art, 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, and the like) 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of updating data, the method comprising:
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 previous 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 to one;
performing 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 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.
2. The method of claim 1, wherein said comparing said current attribute data to said previous attribute data, after obtaining a comparison, further comprises:
and if the comparison result does not exceed the attribute range threshold, updating the target timestamp to the timestamp corresponding to the current period.
3. The method of claim 1, wherein prior to obtaining the current property data of the target entity object acquired in the current period, further comprising:
creating the 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 the target timestamp and at least two attribute variables, one attribute variable corresponds to one current attribute data in the current period, and one attribute variable corresponds to one previous attribute data in the last period.
4. The method of claim 1, wherein the updating the target timestamp to the timestamp corresponding to the current cycle comprises:
extracting a timestamp corresponding to the starting time or the ending time of the current period;
updating the target timestamp to the corresponding timestamp.
5. The method of claim 1, wherein the obtaining current attribute data of the target entity object acquired in the current period comprises:
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.
6. The method of claim 1, wherein said obtaining stored previous property data collected from a previous cycle of a 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 collection time of the last period in each attribute data as the previous attribute data.
7. The method of any one of claims 1 to 6, wherein said comparing said current attribute data with said 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;
and calculating a quotient value between the current attribute data and the previous attribute data, and taking the quotient value as the comparison result.
8. An apparatus for updating data, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein 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 previous period of the stored target entity object, the target entity object corresponds to a target timestamp, and each current attribute data and each previous attribute data correspond to an attribute variable of the target entity object one to one;
a comparing unit, configured to perform the following operations on 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 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.
9. An intelligent terminal, comprising:
a memory for storing executable instructions;
a processor for reading and executing executable instructions stored in the memory to implement the method of any one of claims 1-7.
10. 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 of claims 1-7.
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 true CN115599793A (en) 2023-01-13
CN115599793B 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)

Cited By (1)

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

Citations (8)

* 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
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
US20210342089A1 (en) * 2020-04-30 2021-11-04 EMC IP Holding Company LLC Method, electronic device, and computer program product for processing data
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

Patent Citations (8)

* 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
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
US20210342089A1 (en) * 2020-04-30 2021-11-04 EMC IP Holding Company LLC Method, electronic device, and computer program product for processing data
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN115599793B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN115599793B (en) Method, device and storage medium for updating data
CN109165175B (en) Equipment identifier generation method and device
CN106682017B (en) Database updating method and device
CN107315652B (en) Data backup method and cloud HDFS system
CN101751248B (en) Method and system applied by Web for designing time-sensitive performance test case
CN107193619B (en) Method and device for automatically updating compiled version
CN113704343A (en) Data blood margin visualization implementation method and system in data processing
CN111078790B (en) Method and system for synchronizing isolated block data in block chain and storage medium
CN111510109B (en) Signal filtering method, device, equipment and medium
CN115129390A (en) Method, device, equipment and medium for determining execution duration of client code interval
CN114020640A (en) Automatic testing method and device
CN111046003B (en) Soil erosion factor data updating method and device and electronic equipment
CN111143182B (en) Analysis method, device and storage medium for process behavior
CN110457064B (en) Method and device for generating network cutover script
CN110968640A (en) Oil well data processing method and device and oil well control system
CN107463374B (en) Subset model extraction method and system based on inheritance and association automatic deduction
CN106874391B (en) deadlock processing method and device
CN106469086B (en) Event processing method and device
CN110610060A (en) Product modeling method of open expandable information, computer device and computer readable storage medium
CN111125047A (en) Cold and hot data directory identification method and device
CN112732669B (en) Data processing method and device
CN115599330B (en) Fault diagnosis method and related device of data acquisition system
CN110992448A (en) Animation processing method and device, electronic equipment and storage medium
CN114594746B (en) Intelligent production detection control method and system for modified rubber
CN108171336A (en) The automatic sensing method and device of machine data model evolution

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