CN114969058A - Data updating method, device, equipment and storage medium - Google Patents

Data updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN114969058A
CN114969058A CN202210832817.XA CN202210832817A CN114969058A CN 114969058 A CN114969058 A CN 114969058A CN 202210832817 A CN202210832817 A CN 202210832817A CN 114969058 A CN114969058 A CN 114969058A
Authority
CN
China
Prior art keywords
data
current user
updating
user data
structure model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210832817.XA
Other languages
Chinese (zh)
Inventor
任广磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202210832817.XA priority Critical patent/CN114969058A/en
Publication of CN114969058A publication Critical patent/CN114969058A/en
Pending legal-status Critical Current

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a data updating method, device, equipment and storage medium, which relate to the technical field of computers and comprise the following steps: collecting current user data, and capturing an entity identifier in the current user data; comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result; and selecting whether to perform the updating operation of the current user data or not based on the comparison result. Therefore, the corresponding comparison result is obtained by comparing the entity identification with the standard entity identification stored in advance, and whether the data is updated or not is selected based on the comparison result, so that the data can be updated in real time according to the acquired data, the problem that all data needs to be acquired from nodes of tree-structure data layer by layer downwards is avoided, all data are compared, the problem that whether the data is updated or not is selected, and the core competitiveness of the user for updating mass data is improved.

Description

Data updating method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data updating method, apparatus, device, and storage medium.
Background
In the information-oriented era, a large amount of data needs to be collected and updated, and when the data volume is very large, the efficiency of collection and update is a problem to be solved. The data structure used at present is generally a tree structure, so data updating of the tree structure is to acquire data and update data from a root node layer by layer, but in many cases, only part of the data changes and needs to be updated, and the manner of acquiring all the data layer by layer in the above updating manner causes a large amount of data comparison to be required before each data updating, wastes time for data comparison, and further affects efficiency of data updating, so that comparison and updating of all the data are points affecting efficiency.
In summary, how to improve the data updating efficiency, improve the real-time performance of data, and improve the core competitiveness of the user for updating mass data is a technical problem to be solved in the field.
Disclosure of Invention
In view of this, the present invention provides a data updating method, apparatus, device, and storage medium, which can improve data updating efficiency, improve data real-time performance, and improve core competitiveness of mass data updating for a user. The specific scheme is as follows:
in a first aspect, the present application discloses a data updating method, including:
acquiring current user data and capturing an entity identifier in the current user data;
comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result;
and selecting whether to update the current user data or not based on the comparison result.
Optionally, the acquiring current user data includes:
and acquiring current user data in an active acquisition mode and/or a passive receiving mode based on the user scene selection.
Optionally, the acquiring current user data includes:
and acquiring current user data based on a preset fixed time period.
Optionally, after the acquiring the current user data, the method further includes:
if the entity identification does not exist in the current user data, a corresponding data structure model is established based on the current user data;
correspondingly, the selecting whether to perform the update operation of the current user data based on the comparison result includes:
and updating and saving the current user data based on the data structure model.
Optionally, before comparing the entity identifier with a standard entity identifier corresponding to a target data model of the current user data, the method further includes:
judging whether a data structure model of the current user data exists or not;
and if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
Optionally, the data updating method further includes:
and adjusting a data updating strategy of the target data structure model based on user requirements so as to complete updating of the target data structure model, obtain a current data structure model, and taking the current data structure model as the target data structure model.
Optionally, the selecting whether to perform the update operation of the current user data based on the comparison result includes:
if the comparison result of the entity identification and the standard entity identification is consistent, the updating operation of the current user data is not executed;
and if the comparison result of the entity identification is inconsistent with the standard entity identification, executing the updating operation of the current user data based on the data updating strategy in the target data structure model corresponding to the standard entity identification.
In a second aspect, the present application discloses a data updating apparatus, comprising:
the identification grabbing module is used for collecting current user data and grabbing an entity identification in the current user data;
the comparison module is used for comparing the entity identification with a standard entity identification which is prestored and corresponds to the target data structure model of the current user data, and acquiring a comparison result;
and the data updating module is used for selecting whether to perform updating operation of the current user data or not based on the comparison result.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the data updating method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the steps of the data updating method disclosed in the foregoing when being executed by a processor.
Therefore, the present application discloses a data updating method, which includes: acquiring current user data and capturing an entity identifier in the current user data; comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result; and selecting whether to update the current user data or not based on the comparison result. Therefore, the entity identification is compared with the standard entity identification stored in advance to obtain the corresponding comparison result, and whether the data is updated or not is selected based on the comparison result, so that the data can be updated in real time according to the acquired data, the problem that the data is required to be acquired from nodes of tree-structure data layer by layer downwards is avoided, all the data is compared, the problem that whether the data is updated or not is low in selection is solved, and the core competitiveness of mass data updating of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a data update method disclosed herein;
FIG. 2 is a flow chart of a particular data update method disclosed herein;
FIG. 3 is a flow chart of another specific data update method disclosed herein;
FIG. 4 is a schematic diagram of a data updating apparatus according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments 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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the information-oriented era, a large amount of data needs to be collected and updated, and when the data volume is very large, the efficiency of collection and update is a problem to be solved. The data structure used at present is generally a tree structure, so data updating of the tree structure is to acquire data and update data from a root node layer by layer, but in many cases, only part of the data changes and needs to be updated, and the manner of acquiring all the data layer by layer in the above updating manner causes a large amount of data comparison to be required before each data updating, wastes time for data comparison, and further affects efficiency of data updating, so that comparison and updating of all the data are points affecting efficiency.
Therefore, the application discloses a data updating scheme, which can improve the data updating efficiency, improve the data real-time performance and improve the core competitiveness of mass data updating of a user.
Referring to fig. 1, an embodiment of the present invention discloses a data updating method, including:
step S11: and acquiring current user data and capturing entity identification in the current user data.
In this embodiment, current user data is collected in a unified manner, and an Etag entity identifier included in the data is captured from the current user data, where the Etag entity identifier is specifically an identifier used to determine whether the data has been modified, for example: when the client requests a page a, the server returns page a and adds an Etag to page a. The client presents the page and caches the page along with the Etag. The client requests page a again and passes to the server the Etag returned by the server at the time of the last request. The server checks the Etag and determines that the page has not been modified since the last client request, and returns a response 304 and an empty responder directly. In the embodiment, after the user data is also added to the entity identifier of the Etag, the user data is used for identifying whether the current user data changes, so that operations such as data updating are facilitated.
In this embodiment, if the entity identifier does not exist in the current user data, a corresponding data structure model is created based on the current user data; and updating and saving the current user data based on the data structure model. It can be understood that if the acquired current user data does not include entity identification information such as Etag, the data may be understood as the first received user data, a data model of the received current user data and the current user data need to be recorded in a storage module for processing by a subsequent module, where the processing by the subsequent module is to create a corresponding data structure model based on the current user data, and update and store the current user data based on the data structure model.
Step S12: and comparing the entity identification with a standard entity identification which is prestored and corresponds to the target data structure model of the current user data, and acquiring a comparison result.
In this embodiment, the target data structure model of the data model of the current user data is searched from the local database, and the entity identifiers of the two are compared to determine whether they are consistent, so as to obtain a comparison result with a consistent comparison result or an inconsistent comparison result.
Step S13: and selecting whether to perform the updating operation of the current user data or not based on the comparison result.
In this embodiment, after the comparison result generated in the above step is obtained, corresponding data operation is performed according to the comparison result.
In an embodiment, if the comparison result between the entity identifier and the standard entity identifier is consistent, the update operation of the current user data is not performed. It can be understood that, as the comparison result between the Etag entity identifier of the current user data and the target Etag entity identifier recorded last time is that the value of Etag is the same, it indicates that the current user data has not changed, and the operation of updating data is not needed, and the process is ended.
In another embodiment, if the comparison result between the entity identifier and the standard entity identifier is not consistent, the update operation of the current user data is executed based on the data update policy in the target data structure model corresponding to the standard entity identifier. It can be understood that, when the Etag entity identifier of the current user data is different from the recorded latest target entity identifier, the current user data is updated, and the latest target entity identifier is recorded for the updated current user data. It should be noted that, in the process of data updating, a corresponding updating policy needs to be used for updating, and the specific updating process is to generate an Etag entity identifier of data based on a data resource path and a data model used by current user data and based on a preset algorithm, for example: generating an Etag entity identity based on URL _ SAFE _ BASE64(SHA-256 (resource path + update model (inclusive))); the SHA algorithm described above is optional and can be replaced with an optional algorithm. Therefore, in the embodiment, the received data includes entity identifiers such as Etag, and if the received data includes the Etag identifiers, whether the identifiers are changed is preferentially judged when the data is checked.
Therefore, the present application discloses a data updating method, which includes: acquiring current user data and capturing an entity identifier in the current user data; comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result; and selecting whether to update the current user data or not based on the comparison result. Therefore, the entity identification is compared with the standard entity identification stored in advance to obtain the corresponding comparison result, and whether the data is updated or not is selected based on the comparison result, so that the data can be updated in real time according to the acquired data, the problem that the data is required to be acquired from nodes of tree-structure data layer by layer downwards is avoided, all the data is compared, the problem that whether the data is updated or not is low in selection is solved, and the core competitiveness of mass data updating of a user is improved.
Referring to fig. 2, the embodiment of the present invention discloses a specific data updating method, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. Specifically, the method comprises the following steps:
step S21: and acquiring current user data in an active acquisition mode and/or a passive receiving mode based on user scene selection, and capturing entity identification in the current user data.
In this embodiment, the current user data is collected in an active collection manner and/or a passive reception manner based on the user scenario selection, in one embodiment, if the data is collected in the passive reception manner, different processing is performed according to whether the received current user data contains an Etag entity identifier, when the received current user data contains the Etag entity identifier, the Etag entity identifier is recorded and compared with the Etag entity identifier recorded last time, if the Etag values are the same, it is indicated that the current user data is unchanged, subsequent processing is not needed, and the process is ended. When the received current user data does not have the Etag entity identification, the data model and the data of the received current user data need to be recorded in the storage module for being processed by a subsequent module.
In another embodiment, when the user actively collects the current user data, different processing is performed according to whether the received current user data contains the Etag entity identifier: when the collected current user data contains the Etag entity identification, the Etag entity identification is recorded and compared with the Etag entity identification recorded last time, if the Etag value is the same, the data is not changed, subsequent processing is not needed, and the process is ended. When the received current user data has no Etag entity identification, the data model and the data of the received data need to be recorded in the storage module for processing by the subsequent module.
Step S22: judging whether a data structure model of the current user data exists or not; and if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
In this embodiment, if a corresponding data structure model cannot be found from the local database based on the received current user data, it is indicated that the user data is acquired for the first time, the user data needs to be recorded and a corresponding target data structure model is generated based on the current user data, then a corresponding update policy is generated based on the current target data structure model, the current user data is updated according to the update policy, when the data is received for the first time, the data structure model is recorded, and the entire data model is used as a default update policy, that is, all information of the data structure needs to be compared. And displaying the recorded data model to a user through an interface, wherein the user can adjust the updating strategy of the whole data model according to the requirement of the user, generate a new updating strategy and adjust the strategy into a default strategy. And two ways exist in the generation process of the updating strategy, one way is to generate a new strategy directly based on the current data structure model and a preset strategy generation way, and the other way is to adjust the data updating strategy of the target data structure model based on the user requirement so as to complete the updating of the target data structure model, obtain the current data structure model, and use the current data structure model as the target data structure model. It can be understood that, in the first mode, more independent of the adjustment of the user, the corresponding update strategy is automatically generated according to the new data structure model, and then the update strategy is directly used for data update operation as the update strategy meets the requirement; the second mode considers more user requirements, and when the automatically generated updating strategy does not meet the user requirements, the user can select to edit the strategy and create a new updating strategy; the updating strategy classifies the acquired data according to the strategy and records the resource path when the data is acquired for the first time, and the subsequently acquired data only records the data required by the updating strategy according to the stored resource path. And the data updating strategy can select to collect the data of the whole structure once, can select partial substructure data of the whole structure and the like, and analyzes the optimal strategy of each applicable scene according to the user requirements. In addition, the embodiment also supports that a data structure has multiple updating strategies, and the updating strategies serve the requirements of the user, so that the experience of the user is better improved.
Step S23: and taking the entity identification of the current user data as the standard entity identification of the current data structure, and storing the entity identification of the current user data and the target data structure model in a local database.
In this embodiment, the target data structure model, the current user data, and the generated Etag are stored in the local database, so that when the user data of the type subsequently appears, the corresponding data structure model and the Etag are directly queried from the local database for comparison, and after the user completes selection of the update policy, a storage module currently supported by the system may be selected for policy storage, where the storage mode supports a currently common mode, and the storage mode may specifically include, but is not limited to: memory, databases, caches, and the like.
In the embodiment, a reasonable acquisition mode, an updating strategy, Etag generation, data comparison and storage modes are designed for updating the tree structure data, so that the data updating efficiency is improved; the data updating efficiency is improved by organically combining the active or passive data acquisition mode, the data updating strategy, the data processing mode and the data storage mode; the method comprises the following steps: the system comprises a data acquisition module, a data updating strategy module, a data processing module and a storage module. When receiving the updated data or actively acquiring the data, uniformly processing the data through the acquisition module; the data updating strategy is used for maintaining strategy creation, editing, deletion and the like according to different updating requirements, and comparing all data according to acquired data default configuration; the processing module compares the collected data with the updating strategy, and analyzes whether the data changes or not and whether the data needs to be updated or not; the storage module is responsible for storing the acquired data, updating the storage of strategies, data processing algorithms and the like, and when data acquisition is carried out, a passive receiving scheme or an active acquisition scheme can be selected according to a user scene; according to a scheme selected in the data acquisition process, whether the data contains an Etag entity identification or not is captured, if the acquired data contains the Etag entity identification, the generated Etag entity identification is compared with the recorded Etag entity identification corresponding to the data model, if the Etag is the same, the process is ended, and the data is abandoned to be updated; if the Etag is different, performing data updating operation and recording the latest entity identification; if no Etag entity identification exists, the data is represented as the first version data at present, a data model is established and recorded according to the collected data, and if the model meets the user requirements, the model is updated according to the data selected by the user to generate the Etag entity identification; if the model does not meet the requirements of the user, the user can edit the data model and create a new data updating model; and storing the new data updating model into a preset database or other storage media so as to provide the data updating model for comparison when the data updating operation is performed again. It should be noted that the data updating method in this embodiment may be applied to not only tree structure data but also data updating operations of other structure data, which is not limited to this.
Therefore, in the embodiment, data are acquired through different data acquisition modes, the data change notification is supported to be received, clear change data in the notification are actively acquired, the data can be updated in real time, the efficiency is improved, the experience of a user is greatly improved through different updating strategy generation modes, and the product competitiveness is improved.
Referring to fig. 3, the embodiment of the present invention discloses a specific data updating method, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. Specifically, the method comprises the following steps:
step S31: acquiring current user data based on a preset fixed time period, and capturing an entity identifier in the current user data.
In this embodiment, all current user data are periodically acquired at a fixed time period, so that data are acquired in a periodic acquisition mode, and then corresponding data updating operation is performed, an entity identifier capable of updating data in a local database in time is a latest identifier, and the latest user data is updated, so that omission of acquisition of some infrequent data caused by an active or passive acquisition mode is avoided, and the efficiency of the overall updating operation is improved.
Step S32: and comparing the entity identification with a standard entity identification which is prestored and corresponds to the target data structure model of the current user data, and acquiring a comparison result.
Step S32: and selecting whether to update the current user data or not based on the comparison result.
Please refer to the foregoing embodiments for more detailed processing in steps S32 and S33, which are not repeated herein.
Therefore, according to the method and the device, corresponding data updating operation is carried out through regular data acquisition, data updating is carried out based on the personalized requirements of the user, and updating efficiency is improved.
Referring to fig. 4, an embodiment of the present invention discloses a data updating apparatus, including:
the identifier capturing module 11 is configured to acquire current user data and capture an entity identifier in the current user data;
a comparison module 12, configured to compare the entity identifier with a standard entity identifier that is pre-stored and corresponds to the target data structure model of the current user data, and obtain a comparison result;
and a data updating module 13, configured to select whether to perform an updating operation of the current user data based on the comparison result.
In the identifier capture module 11, current user data is collected uniformly, and an Etag entity identifier included in the data is captured from the current user data, where the Etag entity identifier is specifically an identifier used to determine whether the data has been modified, for example: when the client requests a page a, the server returns page a and adds an Etag to page a. The client presents the page and caches the page along with the Etag. The client requests page a again and passes to the server the Etag returned by the server at the time of the last request. The server checks the Etag and determines that the page has not been modified since the last client request, and returns a response 304 and an empty responder directly. In the embodiment, after the user data is also added to the entity identifier of the Etag, the user data is used for identifying whether the current user data changes, so that operations such as data updating are facilitated. If the entity identification does not exist in the current user data, a corresponding data structure model is established based on the current user data; and updating and saving the current user data based on the data structure model. It can be understood that if the acquired current user data does not include entity identification information such as Etag, the data may be understood as the first received user data, a data model of the received current user data and the current user data need to be recorded in a storage module for processing by a subsequent module, where the processing by the subsequent module is to create a corresponding data structure model based on the current user data, and update and store the current user data based on the data structure model.
In the comparison module 12, if the corresponding data structure model cannot be found from the local database based on the received current user data, it is indicated that the user data is acquired for the first time, the user data needs to be recorded and a corresponding target data structure model is generated based on the current user data, then a corresponding update policy is generated based on the current target data structure model, the current user data is updated according to the update policy, when the data is received for the first time, the data structure model is recorded, and the whole data model is used as a default update policy, that is, all information of the data structure needs to be compared. And displaying the recorded data model to a user through an interface, wherein the user can adjust the updating strategy of the whole data model according to the requirement of the user, generate a new updating strategy and adjust the strategy into a default strategy. And two modes exist in the generation process of the updating strategy, one mode is to generate a new strategy directly based on a current data structure model and a preset strategy generation mode, and the other mode is to adjust the data updating strategy of a target data structure model based on user requirements so as to complete the updating of the target data structure model, obtain the current data structure model, and use the current data structure model as the target data structure model. It can be understood that, in the first mode, more independent of the adjustment of the user, the corresponding update strategy is automatically generated according to the new data structure model, and then the update strategy is directly used for data update operation as the update strategy meets the requirement; the second mode considers more user requirements, and when the automatically generated updating strategy does not meet the user requirements, the user can select to edit the strategy and create a new updating strategy; the updating strategy classifies the acquired data according to the strategy and records the resource path when the data is acquired for the first time, and the subsequently acquired data only records the data required by the updating strategy according to the stored resource path. And the data updating strategy can select to collect the data of the whole structure once, can select partial substructure data of the whole structure and the like, and analyzes the optimal strategy of each applicable scene according to the user requirements. In addition, the embodiment also supports that a data structure has multiple updating strategies, and the updating strategies serve the requirements of the user, so that the experience of the user is better improved.
In the data updating module 13, the target data structure model, the current user data, and the generated Etag are stored in the local database, so that when the user data of the type subsequently appears, the corresponding data structure model and the Etag are directly queried from the local database for comparison, and after the user completes the selection of the updating policy, the storage module currently supported by the system can be selected for storing the policy, and the storage mode supports a currently common mode, which may specifically include but is not limited to: memory, databases, caches, and the like. A reasonable collection mode, an updating strategy, Etag generation, data comparison and a storage mode are designed for updating tree structure data, and the data updating efficiency is improved; the data updating efficiency is improved by organically combining the active or passive data acquisition mode, the data updating strategy, the data processing mode and the data storage mode; the method comprises the following steps: the system comprises a data acquisition module, a data updating strategy module, a data processing module and a storage module. When receiving the updated data or actively acquiring the data, uniformly processing the data through an acquisition module; the data updating strategy is used for maintaining strategy creation, editing, deletion and the like according to different updating requirements, and comparing all data according to acquired data default configuration; the processing module compares the collected data with the updating strategy, and analyzes whether the data changes or not and whether the data needs to be updated or not; the storage module is responsible for storing the acquired data, updating the storage of strategies, data processing algorithms and the like, and when data acquisition is carried out, a passive receiving scheme or an active acquisition scheme can be selected according to a user scene; according to a scheme selected in the data acquisition process, whether the data contains an Etag entity identification or not is captured, if the acquired data contains the Etag entity identification, the generated Etag entity identification is compared with the recorded Etag entity identification corresponding to the data model, if the Etag is the same, the process is ended, and the data is abandoned to be updated; if the Etag is different, performing data updating operation and recording the latest entity identification; if no Etag entity identification exists, the data is represented as the first version data at present, a data model is established and recorded according to the collected data, and if the model meets the user requirements, the model is updated according to the data selected by the user to generate the Etag entity identification; if the model does not meet the requirements of the user, the user can edit the data model and create a new data updating model; and storing the new data updating model into a preset database or other storage media so as to provide the data updating model for comparison when the data updating operation is performed again. It should be noted that the data updating method in this embodiment may be applied to not only tree structure data but also data updating operations of other structure data, which is not limited to this.
Therefore, the present application discloses a data updating method, which includes: acquiring current user data and capturing an entity identifier in the current user data; comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result; and selecting whether to update the current user data or not based on the comparison result. Therefore, the entity identification is compared with the standard entity identification stored in advance to obtain the corresponding comparison result, and whether the data is updated or not is selected based on the comparison result, so that the data can be updated in real time according to the acquired data, the problem that the data is required to be acquired from nodes of tree-structure data layer by layer downwards is avoided, all the data is compared, the problem that whether the data is updated or not is low in selection is solved, and the core competitiveness of mass data updating of a user is improved.
In some specific embodiments, the identifier capture module 11 may specifically include:
and the data acquisition unit is used for acquiring the current user data in an active acquisition mode and/or a passive receiving mode based on the user scene selection.
In some specific embodiments, the identifier capture module 11 may specifically include:
and the fixed period acquisition unit is used for acquiring the current user data based on a preset fixed time period.
In some specific embodiments, the identifier capture module 11 may specifically include:
the model creating unit is used for creating a corresponding data structure model based on the current user data if the entity identification does not exist in the current user data;
correspondingly, the selecting whether to perform the update operation of the current user data based on the comparison result includes: and updating and saving the current user data based on the data structure model.
In some embodiments, the alignment module 12 may specifically include:
the judging unit is used for judging whether a data structure model of the current user data exists or not; and if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
In some specific embodiments, the tree structure data updating apparatus may specifically include:
and the strategy adjusting unit is used for adjusting the data updating strategy of the target data structure model based on the user requirement so as to complete the updating of the target data structure model, obtain the current data structure model and take the current data structure model as the target data structure model.
In some specific embodiments, the data updating module 13 may specifically include:
the updating operation unit is used for not executing the updating operation of the current user data if the comparison result of the entity identification is consistent with the comparison result of the standard entity identification; and if the comparison result of the entity identification is inconsistent with the standard entity identification, executing the updating operation of the current user data based on the data updating strategy in the target data structure model corresponding to the standard entity identification.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the data updating method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, and the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the data updating method performed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the data update method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The present invention provides a data updating method, apparatus, device, and storage medium, which are described in detail above, and the principle and implementation of the present invention are explained in this document by applying specific examples, and the description of the above examples is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for updating data, comprising:
acquiring current user data and capturing an entity identifier in the current user data;
comparing the entity identification with a standard entity identification which is prestored and corresponds to a target data structure model of the current user data, and acquiring a comparison result;
and selecting whether to update the current user data or not based on the comparison result.
2. The data updating method of claim 1, wherein the collecting current user data comprises:
the current user data is collected in an active collection mode and/or a passive receiving mode based on the user scene selection.
3. The data updating method of claim 1, wherein the collecting current user data comprises:
and acquiring current user data based on a preset fixed time period.
4. The data updating method of claim 1, wherein after the collecting the current user data, further comprising:
if the entity identification does not exist in the current user data, a corresponding data structure model is established based on the current user data;
correspondingly, the selecting whether to perform the update operation of the current user data based on the comparison result includes:
and updating and saving the current user data based on the data structure model.
5. The data updating method according to claim 1, wherein before comparing the entity identifier with a standard entity identifier pre-stored and corresponding to a target data model of the current user data, the method further comprises:
judging whether a data structure model of the current user data exists or not;
and if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
6. The data updating method according to claim 1, further comprising:
and adjusting a data updating strategy of the target data structure model based on user requirements so as to complete updating of the target data structure model, obtain a current data structure model, and taking the current data structure model as the target data structure model.
7. The data updating method according to any one of claims 1 to 6, wherein the selecting whether to perform the updating operation of the current user data based on the comparison result comprises:
if the comparison result of the entity identification and the standard entity identification is consistent, the updating operation of the current user data is not executed;
and if the comparison result of the entity identification is inconsistent with the standard entity identification, executing the updating operation of the current user data based on the data updating strategy in the target data structure model corresponding to the standard entity identification.
8. A data update apparatus, comprising:
the identification grabbing module is used for acquiring current user data and grabbing entity identifications in the current user data;
the comparison module is used for comparing the entity identification with a standard entity identification which is prestored and corresponds to the target data structure model of the current user data, and acquiring a comparison result;
and the data updating module is used for selecting whether to perform updating operation of the current user data or not based on the comparison result.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the data update method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program realizes the steps of the data updating method according to any one of claims 1 to 7 when executed by a processor.
CN202210832817.XA 2022-07-15 2022-07-15 Data updating method, device, equipment and storage medium Pending CN114969058A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210832817.XA CN114969058A (en) 2022-07-15 2022-07-15 Data updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210832817.XA CN114969058A (en) 2022-07-15 2022-07-15 Data updating method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114969058A true CN114969058A (en) 2022-08-30

Family

ID=82970153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210832817.XA Pending CN114969058A (en) 2022-07-15 2022-07-15 Data updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114969058A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599793A (en) * 2022-09-28 2023-01-13 北京亚控科技发展有限公司(Cn) Method, device and storage medium for updating data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599793A (en) * 2022-09-28 2023-01-13 北京亚控科技发展有限公司(Cn) Method, device and storage medium for updating data
CN115599793B (en) * 2022-09-28 2024-01-26 北京亚控科技发展有限公司 Method, device and storage medium for updating data

Similar Documents

Publication Publication Date Title
US20210303524A1 (en) Management of journal entries associated with customizations of knowledge objects in a search head cluster
US11062016B2 (en) Systems and methods for verifying user credentials for search
CN102571420B (en) Method and system for network element data management
US20110154339A1 (en) Incremental mapreduce-based distributed parallel processing system and method for processing stream data
US11822433B2 (en) Qualification parameters for captain selection in a search head cluster
US11841834B2 (en) Method and apparatus for efficient synchronization of search heads in a cluster using digests
CN114153806A (en) File storage method, device, equipment and storage medium
CN104135507A (en) A method and a device for hotlink protection
CN112036125A (en) Document management method and device and computer equipment
CN114969058A (en) Data updating method, device, equipment and storage medium
CN112491609A (en) System application architecture discovery method and system based on business service
CN112231481A (en) Website classification method and device, computer equipment and storage medium
CN111984660A (en) Data synchronization method, device, equipment and storage medium
CN115408569A (en) Process traceability tree simplification method, device, equipment and medium
CN108628702B (en) Memorandum method and device for chat records, electronic equipment and storage medium
CN115455477A (en) Data authority management method, device, equipment, medium and program product
CN111966533A (en) Electronic file management method and device, computer equipment and storage medium
CN116991815B (en) Log collection method, device, equipment and medium of distributed storage system
CN113297158B (en) Cloud security product management method, device, equipment and storage medium
CN115801569B (en) Access rule deployment method, device, equipment, medium and cloud platform
CN111930718B (en) Node adjustment method and device for configuration management database
JP2006003996A (en) Use history management device, use history management method and use history management program
CN115495769B (en) Data desensitization method, system, readable storage medium and device
CN118132067A (en) Micro-module monitoring system and configuration interface modification method, device and medium thereof
CN115730171A (en) Data storage method, device, equipment and medium

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