Data updating method, device, equipment, and storage medium
By selectively updating data based on entity identifiers, the problem of low efficiency in updating tree-structured data is solved, and more efficient data updating and real-time performance are achieved.
Patent Information
- Application Number
- CN202210832817.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-07-15
AI Technical Summary
In the existing technology, the data update method of the tree structure requires obtaining all data layer by layer for comparison, resulting in low data update efficiency, affecting data real-time performance and the core competitiveness of users' massive data updates.
By collecting the entity identifiers in the current user data and comparing them with the pre-saved standard entity identifiers, it is decided whether to perform the update operation based on the comparison results, thus avoiding the layer-by-layer comparison of all data.
It improves the efficiency and real-time performance of data updates, enhances the core competitiveness of users in updating massive data, and reduces unnecessary data comparison time.
Smart Images

Figure CN114969058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data updating method, device, equipment, and storage medium. Background Art
[0002] In the information age, a vast amount of data needs to be collected and updated. When the amount of data is enormous, the efficiency of data collection and updating becomes a challenge that needs to be addressed. Currently, the data structure used is generally a tree structure. Data updates in tree structures typically start from the root node and work their way down to retrieve and update data. However, in many cases, only some data changes and require updating. This approach of retrieving all data layer by layer through the aforementioned update method requires extensive data comparisons before each update, wasting time and impacting the efficiency of data updates. Consequently, the time it takes to compare and update all data becomes a significant factor impacting efficiency.
[0003] In summary, how to improve data update efficiency, improve data real-time performance, and enhance the core competitiveness of users in updating massive data are technical issues that need to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a data update method, device, equipment, and storage medium that can improve data update efficiency, improve data real-time performance, and enhance the core competitiveness of users in updating massive data. The specific solution is as follows:
[0005] In a first aspect, the present application discloses a data updating method, comprising:
[0006] Collecting current user data and capturing entity identifiers in the current user data;
[0007] Comparing the entity identifier with a pre-stored standard entity identifier corresponding to the target data structure model of the current user data, and obtaining a comparison result;
[0008] Based on the comparison result, it is selected whether to perform an update operation on the current user data.
[0009] Optionally, collecting current user data includes:
[0010] Based on the user scenario, active collection mode and / or passive reception mode are selected to collect current user data.
[0011] Optionally, collecting current user data includes:
[0012] Collect current user data based on a preset fixed time period.
[0013] Optionally, after collecting the current user data, the method further includes:
[0014] If the entity identifier does not exist in the current user data, creating a corresponding data structure model based on the current user data;
[0015] Accordingly, the selecting whether to update the current user data based on the comparison result includes:
[0016] The current user data is updated and saved based on the data structure model.
[0017] Optionally, before comparing the entity identifier with a pre-stored standard entity identifier corresponding to the target data data model of the current user data, the method further includes:
[0018] Determining whether the data structure model of the current user data exists;
[0019] If the data structure model does not exist, a corresponding target data structure model is generated based on the current user data.
[0020] Optionally, the data updating method further includes:
[0021] The data update strategy of the target data structure model is adjusted based on user needs to complete the update 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.
[0022] Optionally, the selecting whether to update the current user data based on the comparison result includes:
[0023] If the comparison result of the entity identifier and the standard entity identifier is consistent, the update operation of the current user data is not performed;
[0024] If the comparison result between the entity identifier and the standard entity identifier is inconsistent, an update operation of the current user data is performed based on a data update strategy in a target data structure model corresponding to the standard entity identifier.
[0025] In a second aspect, the present application discloses a data updating device, comprising:
[0026] An identification capture module, used to collect current user data and capture entity identifications in the current user data;
[0027] a comparison module, configured to compare the entity identifier with a pre-stored standard entity identifier corresponding to a target data structure model of the current user data, and obtain a comparison result;
[0028] The data updating module is used to select whether to update the current user data based on the comparison result.
[0029] In a third aspect, the present application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the steps of the aforementioned disclosed data updating method.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed data updating method are implemented.
[0033] It can be seen that the present application discloses a data update method, including: collecting current user data and capturing entity identifiers in the current user data; comparing the entity identifier with a pre-saved standard entity identifier corresponding to the target data structure model of the current user data, and obtaining a comparison result; and selecting whether to update the current user data based on the comparison result. It can be seen that the present application compares the entity identifier with the pre-saved standard entity identifier to obtain a corresponding comparison result, and then selects whether to update the data based on the comparison result. In this way, it can be updated in real time according to the collected data, and avoids the need to obtain all data from the nodes of the tree structure data layer by layer, compare all data, and the low efficiency problem of selecting whether to update, thereby improving the core competitiveness of users' massive data updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0035] Figure 1 A flow chart of a data updating method disclosed in this application;
[0036] Figure 2 This is a flow chart of a specific data updating method disclosed in this application;
[0037] Figure 3 This is a flow chart of another specific data updating method disclosed in this application;
[0038] Figure 4 This is a structural diagram of a data updating device disclosed in this application;
[0039] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0041] In the information age, a vast amount of data needs to be collected and updated. When the amount of data is enormous, the efficiency of data collection and updating becomes a challenge that needs to be addressed. Currently, the data structure used is generally a tree structure. Data updates in tree structures typically start from the root node and work their way down to retrieve and update data. However, in many cases, only some data changes and require updating. This approach of retrieving all data layer by layer through the aforementioned update method requires extensive data comparisons before each update, wasting time and impacting the efficiency of data updates. Consequently, the time it takes to compare and update all data becomes a significant factor impacting efficiency.
[0042] To this end, the present application discloses a data update solution that can improve data update efficiency, improve data real-time performance, and enhance the core competitiveness of users in updating massive data.
[0043] Reference Figure 1 As shown, an embodiment of the present invention discloses a data updating method, comprising:
[0044] Step S11: Collect current user data and capture entity identifiers in the current user data.
[0045] In this embodiment, the current user data is collected uniformly, and the Etag entity identifier contained in the data is captured from the current user data, wherein 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 displays the page and caches the page together with the Etag. The client requests page A again and passes the Etag returned by the server during the last request to the server. The server checks the Etag and determines that the page has not been modified since the last client request, and directly returns a response 304 and an empty response body. In this embodiment, by adding the user data to the entity identifier of the Etag, it is used to identify whether the current user data has changed, which facilitates operations such as data updates.
[0046] In this embodiment, if the current user data does not contain an entity identifier, a corresponding data structure model is created based on the current user data; and the current user data is updated and saved based on the data structure model. It is understood that if the collected current user data does not contain entity identifier information such as an Etag, then the data can be understood as user data received for the first time, and the data model of the received current user data and the current user data need to be recorded in the storage module for processing by subsequent modules, wherein the processing of the subsequent modules is to create a corresponding data structure model based on the current user data, and update and save the current user data based on the data structure model.
[0047] Step S12: Compare the entity identifier with a pre-stored standard entity identifier corresponding to the target data structure model of the current user data, and obtain a comparison result.
[0048] In this embodiment, a target data structure model that is the same as 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 indicating whether the comparison result is consistent or inconsistent.
[0049] Step S13: selecting whether to update the current user data based on the comparison result.
[0050] In this embodiment, after obtaining the comparison results generated in the above steps, corresponding data operations are performed according to the comparison results.
[0051] In one embodiment, if the comparison result of 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 since the result of comparing the Etag entity identifier of the current user data with the target Etag entity identifier recorded last time is the same, it means that the current user data has not changed, and the data update operation is not required, and the process ends.
[0052] In another embodiment, if the comparison result between the entity identifier and the standard entity identifier is inconsistent, the update operation of the current user data is performed based on the data update strategy in the target data structure model corresponding to the standard entity identifier. It can be understood that, since the Etag entity identifier of the current user data is different from the latest recorded 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 during the data update process, the corresponding update strategy needs to be used for updating. The specific update process is to generate the Etag entity identifier of the data based on the path of the data resource and the data model used by the current user data and based on a preset algorithm, for example: based on URL_SAFE_BASE64 (SHA-256 (resource path + update model (including value))) to generate the Etag entity identifier; the above-mentioned SHA algorithm can be selected and can be replaced with a self-selected algorithm. As can be seen, this embodiment supports the received data containing entity identifiers such as Etag. If the received data contains Etag identifier, it will be prioritized to determine whether the identifier has changed when verifying the data.
[0053] It can be seen that the present application discloses a data update method, including: collecting current user data and capturing entity identifiers in the current user data; comparing the entity identifier with a pre-saved standard entity identifier corresponding to the target data structure model of the current user data, and obtaining a comparison result; and selecting whether to update the current user data based on the comparison result. It can be seen that the present application compares the entity identifier with the pre-saved standard entity identifier to obtain a corresponding comparison result, and then selects whether to update the data based on the comparison result. In this way, it can be updated in real time according to the collected data, and avoids the need to obtain all data from the nodes of the tree structure data layer by layer, compare all data, and the low efficiency problem of selecting whether to update, thereby improving the core competitiveness of users' massive data updates.
[0054] Reference Figure 2 As shown, the embodiment of the present invention discloses a specific data update method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0055] Step S21: Based on the user scenario, the current user data is collected through active collection and / or passive reception, and the entity identifier in the current user data is captured.
[0056] In this embodiment, the current user data is collected through active collection and / or passive reception based on the user scenario. In one embodiment, if the data is collected through passive reception, different processing is performed based on whether the received current user data contains an Etag entity identifier. When the received current user data contains an Etag entity identifier, the Etag entity identifier is recorded and compared with the Etag entity identifier recorded last time. If the Etag value is the same, it means that the current user data has not changed, no subsequent processing is required, and the process ends. When the received current user data does not have an Etag entity identifier, the data model and data of the received current user data need to be recorded in the storage module for subsequent module processing.
[0057] In another embodiment, when a user actively collects current user data, different processing is performed based on whether the received current user data contains an Etag entity identifier: When the collected current user data contains an Etag entity identifier, the Etag entity identifier is recorded and compared with the previously recorded Etag entity identifier. If the Etag values are the same, the data has not changed, no further processing is required, and the process ends. If the received current user data does not contain an Etag entity identifier, the data model and data of the received data need to be recorded in the storage module for subsequent processing.
[0058] Step S22: determining whether a data structure model of the current user data exists; if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
[0059] In this embodiment, if a corresponding data structure model cannot be found in the local database based on the current user data received, it means that the user data is being collected for the first time. It is necessary to record the user data and generate a corresponding target data structure model based on the current user data. Then, a corresponding update strategy is generated based on the current target data structure model, and the current user data is updated according to the update strategy. When the data is received for the first time, the data structure model is recorded, and the entire data model is used as the default update strategy, that is, all information in the data structure needs to be compared. The recorded data model is displayed to the user through an interface. The user can adjust the update strategy of the entire data model according to their needs, generate a new update strategy, and adjust this strategy to the default strategy. There are two ways to generate the update strategy: one is to directly generate a new strategy based on the current data structure model and a pre-set strategy generation method; the other is to adjust the data update strategy of the target data structure model based on user needs to complete the update 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 is understandable that the first method does not rely much on user adjustments, and automatically generates a corresponding update strategy based on the new data structure model. Then, because the update strategy meets the needs, the update strategy is directly used to perform data update operations. The second method takes user needs into consideration more. When the automatically generated update strategy does not meet user needs, the user can choose to edit the strategy and create a new update strategy. Among them, the update strategy will classify the acquired data according to the strategy and record the resource path when the data is first acquired. The subsequently acquired data will only record the data required by the update strategy according to the stored resource path. In addition, the data update strategy can choose to collect the data of the entire structure at one time, or select part of the substructure data of the overall structure, etc., and analyze the optimal strategy for each applicable scenario according to user needs. In addition, this embodiment also supports the existence of multiple update strategies for a data structure. The update strategy serves user needs and better improves the user experience.
[0060] Step S23: The entity identifier of the current user data is used as the standard entity identifier of the current data structure, and is stored in the local database together with the target data structure model.
[0061] In this embodiment, the target data structure model, current user data, and generated Etag are saved in the local database so that when this type of user data appears subsequently, the corresponding data structure model and Etag can be directly queried from the local database for comparison. After the user completes the selection of the update strategy, the system can select the storage module currently supported by the system to store the strategy. The storage method supports the currently commonly used methods, which may include but are not limited to: memory, database, cache and other media.
[0062] In this embodiment, a reasonable collection method, update strategy, Etag generation, data comparison, and storage method are designed for the update of tree-structured data to improve the efficiency of data update; the efficiency of data update is improved by actively or passively collecting data, and the data update strategy, data processing, and data storage method are organically combined; including: data collection module, data update strategy module, data processing module, and storage module. When updated data is received or data is actively collected, the data is uniformly processed by the collection module; the data update strategy performs policy creation, editing, deletion, and other maintenance according to different update requirements, and compares all data according to the default configuration of the collected data; the processing module compares the data according to the collected data and the update strategy, and analyzes whether the data has changed and whether it needs to be updated; the storage module is responsible for storing the collected data, update strategy, data processing algorithm, etc. When collecting data, passive reception or active collection scheme can be selected according to the user scenario; according to the scheme selected in the data collection process, whether the Etag entity identifier is contained in the captured data is detected. If the Etag entity identifier is present in the collected data, the generated Etag entity identifier is compared. Identify the recorded Etag entity identifier corresponding to the data model. If the Etag is the same, the process ends and the data update is abandoned. If the Etag is different, the data update operation is performed and the latest entity identifier is recorded. If there is no Etag entity identifier, it means that the current version is the first version of the data. The data model is created and recorded based on the collected data. If the model meets the user's needs, the Etag entity identifier is generated based on the data update model selected by the user. If the model does not meet the user's needs, the user can edit and create a new data update model based on the data model. The new data update model is stored in a preset database or other storage medium so that when the data is updated again, it can be used to provide a data update model for comparison. It should be noted that the data update method in this embodiment can be applied not only to tree-structured data but also to data update operations of other structured data, and this is not limited.
[0063] It can be seen that this embodiment collects data through different data collection methods, supports receiving data change notifications, actively collects the change data specified in the notification, can update data in real time, improve efficiency, and through the generation of different update strategies, greatly improves the user experience and enhances product competitiveness.
[0064] Reference Figure 3 As shown, the embodiment of the present invention discloses a specific data update method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0065] Step S31: collecting current user data based on a preset fixed time period, and capturing entity identifiers in the current user data.
[0066] In this embodiment, all current user data is collected regularly at fixed time periods. In this way, by collecting data in a regular manner and then performing corresponding data update operations, the entity identifier of the data can be updated to the latest identifier in the local database in a timely manner, and the latest user data can be updated, avoiding the omission of some infrequently used data caused by active or passive collection methods, thereby improving the efficiency of the overall update operation.
[0067] Step S32: Compare the entity identifier with a pre-stored standard entity identifier corresponding to the target data structure model of the current user data, and obtain a comparison result.
[0068] Step S32: selecting whether to update the current user data based on the comparison result.
[0069] For more detailed processing procedures in step S32 and step S33, please refer to the aforementioned disclosed embodiments, which will not be described again here.
[0070] It can be seen that this application performs corresponding data update operations through regular data collection, updates data based on the user's personalized needs, and improves update efficiency.
[0071] Reference Figure 4 As shown, an embodiment of the present invention discloses a data updating device, comprising:
[0072] The identification capture module 11 is used to collect current user data and capture the entity identification in the current user data;
[0073] a comparison module 12, configured to compare the entity identifier with a pre-stored standard entity identifier corresponding to the target data structure model of the current user data, and obtain a comparison result;
[0074] The data updating module 13 is configured to select whether to update the current user data based on the comparison result.
[0075] In the identifier capture module 11, the current user data is uniformly collected and the Etag entity identifier contained in the data is captured from the current user data. The Etag entity identifier is specifically used to determine whether the data has been modified. For example, when a client requests page A, the server returns page A and adds an Etag to page A. The client displays the page and caches it along with the Etag. The client requests page A again and passes the Etag returned by the server during the previous request to the server. The server checks the Etag and determines that the page has not been modified since the last client request. It directly returns a 304 response and an empty response body. In this embodiment, by adding the Etag entity identifier to the user data, it is used to identify whether the current user data has changed, facilitating operations such as data updates. 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; based on the data structure model, the current user data is updated and saved. It can be understood that if the collected current user data does not contain entity identification information such as Etag, then the data can be understood as user data received for the first time, and the data model of the received current user data and the current user data need to be recorded in the storage module for subsequent module processing, where the processing of the subsequent module is to create a corresponding data structure model based on the current user data, and update and save the current user data based on the data structure model.
[0076] In the comparison module 12, if the corresponding data structure model cannot be found in the local database based on the current user data received, it means that the user data is being collected for the first time. It is necessary to record the user data and generate a corresponding target data structure model based on the current user data. Then, a corresponding update strategy is generated based on the current target data structure model, and the current user data is updated according to the update strategy. When the data is received for the first time, the data structure model is recorded and the entire data model is used as the default update strategy, that is, all information in the data structure needs to be compared. The recorded data model is displayed to the user through the interface. The user can adjust the update strategy of the entire data model according to their needs, generate a new update strategy, and adjust this strategy to the default strategy. There are two ways to generate the update strategy: one is to directly generate a new strategy based on the current data structure model and a pre-set strategy generation method; the other is to adjust the data update strategy of the target data structure model based on user needs to complete the update 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 is understandable that the first method does not rely much on user adjustments, and automatically generates a corresponding update strategy based on the new data structure model. Then, because the update strategy meets the needs, the update strategy is directly used to perform data update operations. The second method takes user needs into consideration more. When the automatically generated update strategy does not meet user needs, the user can choose to edit the strategy and create a new update strategy. Among them, the update strategy will classify the acquired data according to the strategy and record the resource path when the data is first acquired. The subsequently acquired data will only record the data required by the update strategy according to the stored resource path. In addition, the data update strategy can choose to collect the data of the entire structure at one time, or select part of the substructure data of the overall structure, etc., and analyze the optimal strategy for each applicable scenario according to user needs. In addition, this embodiment also supports the existence of multiple update strategies for a data structure. The update strategy serves user needs and better improves the user experience.
[0077] In the data update module 13, the target data structure model, current user data, and generated Etag are saved to the local database. This allows the corresponding data structure model and Etag to be directly queried from the local database for comparison when user data of the same type appears later. After the user completes the selection of the update strategy, they can select a storage module currently supported by the system to store the strategy. The storage method supports currently common methods, which may include but is not limited to: memory, database, cache, and other media. For the update of tree-structured data, a reasonable collection method, update strategy, Etag generation, data comparison, and storage method are designed to improve the efficiency of data update. The efficiency of data update is improved by organically combining active or passive data collection, data update strategy, data processing, and data storage methods. The system includes: a data collection module, a data update strategy module, a data processing module, and a storage module. When updated data is received or data is actively collected, the data is processed uniformly through the collection module; the data update strategy creates, edits, deletes and other maintenance strategies according to different update requirements, and compares all data with the default configuration of the collected data; the processing module compares the data according to the collected data and the update strategy, and analyzes whether the data has changed and whether it needs to be updated; the storage module is responsible for storing the collected data, update strategies, data processing algorithms, etc. When collecting data, you can choose passive reception or active collection scheme according to the user scenario; according to the scheme selected in the data collection process, whether the captured data contains Etag entity identifiers, if the collected data contains Etag entity identifiers, the generated Etag entity identifiers are compared. Identify the recorded Etag entity identifier corresponding to the data model. If the Etag is the same, the process ends and the data update is abandoned. If the Etag is different, the data update operation is performed and the latest entity identifier is recorded. If there is no Etag entity identifier, it means that the current version is the first version of the data. The data model is created and recorded based on the collected data. If the model meets the user's needs, the Etag entity identifier is generated based on the data update model selected by the user. If the model does not meet the user's needs, the user can edit and create a new data update model based on the data model. The new data update model is stored in a preset database or other storage medium so that when the data is updated again, it can be used to provide a data update model for comparison. It should be noted that the data update method in this embodiment can be applied not only to tree-structured data but also to data update operations of other structured data, and this is not limited.
[0078] It can be seen that the present application discloses a data update method, including: collecting current user data and capturing entity identifiers in the current user data; comparing the entity identifier with a pre-saved standard entity identifier corresponding to the target data structure model of the current user data, and obtaining a comparison result; and selecting whether to update the current user data based on the comparison result. It can be seen that the present application compares the entity identifier with the pre-saved standard entity identifier to obtain a corresponding comparison result, and then selects whether to update the data based on the comparison result. In this way, it can be updated in real time according to the collected data, and avoids the need to obtain all data from the nodes of the tree structure data layer by layer, compare all data, and the low efficiency problem of selecting whether to update, thereby improving the core competitiveness of users' massive data updates.
[0079] In some specific implementations, the identification capture module 11 may specifically include:
[0080] The data collection unit is used to select active collection mode and / or passive reception mode to collect current user data based on the user scenario.
[0081] In some specific implementations, the identification capture module 11 may specifically include:
[0082] The fixed period collection unit is used to collect current user data based on a preset fixed time period.
[0083] In some specific implementations, the identification capture module 11 may specifically include:
[0084] a model creation unit, configured to create a corresponding data structure model based on the current user data if no entity identifier exists in the current user data;
[0085] Correspondingly, the selecting whether to perform an update operation on the current user data based on the comparison result includes: updating and saving the current user data based on the data structure model.
[0086] In some specific implementations, the comparison module 12 may specifically include:
[0087] The judging unit is configured to judge whether a data structure model of the current user data exists; if the data structure model does not exist, generating a corresponding target data structure model based on the current user data.
[0088] In some specific implementations, the tree structure data updating device may specifically include:
[0089] The policy adjustment unit is used to adjust the data update policy of the target data structure model based on user needs to complete the update 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.
[0090] In some specific implementations, the data updating module 13 may specifically include:
[0091] An update operation unit is used to not perform the update operation of the current user data if the comparison result between the entity identifier and the standard entity identifier is consistent; if the comparison result between the entity identifier and the standard entity identifier is inconsistent, perform the update operation of the current user data based on the data update strategy in the target data structure model corresponding to the standard entity identifier.
[0092] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0093] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. 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. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the data update method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0094] In this embodiment, the power supply 23 is used to provide operating 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 the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0095] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the 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 to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0096] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0097] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, enabling the processor 21 to calculate and process the massive amount of data 223 in the memory 22. It can be Windows Server, NetWare, Unix, Linux, etc. In addition to including computer programs capable of implementing the data update method performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer programs 222 may further include computer programs capable of performing other specific tasks. Data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0098] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned data update method is implemented. The specific steps of this method can be referred to the corresponding contents disclosed in the aforementioned embodiments and will not be repeated here.
[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0100] Professionals can also further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0101] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0102] The above is a detailed introduction to a data update method, device, equipment, and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A data updating method, characterized in that: include: Collecting current user data and capturing entity identifiers in the current user data; Comparing the entity identifier with a pre-stored standard entity identifier corresponding to a target data structure model of the current user data, and obtaining a comparison result; the target data structure model is a tree structure model dynamically generated in real time based on the user data; If the comparison result of the entity identifier and the standard entity identifier is consistent, the update operation of the current user data is not performed; If the comparison result between the entity identifier and the standard entity identifier is inconsistent, an update operation of the current user data is performed based on a data update strategy in a target data structure model corresponding to the standard entity identifier.
2. The data updating method according to claim 1, wherein: The collecting of current user data includes: Based on the user scenario, active collection mode and / or passive reception mode are selected to collect current user data.
3. The data updating method according to claim 1, wherein: The collecting of current user data includes: Collect current user data based on a preset fixed time period.
4. The data updating method according to claim 1, wherein: After collecting the current user data, the method further includes: If the entity identifier does not exist in the current user data, creating a corresponding data structure model based on the current user data; Accordingly, the selecting whether to update the current user data based on the comparison result includes: The current user data is updated and saved based on the data structure model.
5. The data updating method according to claim 1, wherein: Before comparing the entity identifier with a pre-stored standard entity identifier corresponding to the target data data model of the current user data, the method further includes: Determining whether the data structure model of the current user data exists; If the data structure model does not exist, a corresponding target data structure model is generated based on the current user data.
6. The data updating method according to claim 1, wherein: Also includes: The data update strategy of the target data structure model is adjusted based on user needs to complete the update 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.
7. A data updating device, characterized in that: include: An identification capture module, used to collect current user data and capture entity identifications in the current user data; a comparison module for comparing the entity identifier with a pre-stored standard entity identifier corresponding to a target data structure model of the current user data, and obtaining a comparison result; the target data structure model is a tree structure model dynamically generated in real time based on the user data; A data update module is used to not perform the update operation of the current user data if the comparison result between the entity identifier and the standard entity identifier is consistent; if the comparison result between the entity identifier and the standard entity identifier is inconsistent, perform the update operation of the current user data based on the data update strategy in the target data structure model corresponding to the standard entity identifier.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the data updating method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the data updating method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Webpage data calling method and device
CN103699554A
Systems and Methods Thereto for Acceleration of Web Pages Access Using Next Page Optimization, Caching and Pre-Fetching Techniques
US20110029641A1