Method, apparatus, and storage medium for automatically updating buried point events and their fields
By receiving client data and comparing with hash algorithms, automatically updating buried event and field information, the problem of low efficiency in manual addition of event and field information in the prior art is solved, and the efficiency of event analysis is improved.
Patent Information
- Application Number
- CN202110728781.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-06-29
AI Technical Summary
In the prior art, developers need to manually add event information and field information, resulting in inefficient analysis and inefficient update of field information and dependencies of events.
By receiving the data information reported by the client, the field information, buried event and dependent field information are stored in local variables, and the hash algorithm is used to compare whether it exists in the preset global variable, and the database corresponding to the global variable is automatically updated.
It realizes automatic update of event information and field information, improves event analysis efficiency, reduces manual operations by developers, and provides a reliable source of data.
Smart Images

Figure CN113377796B_ABST
Abstract
Description
Technical Field
[0001] This application relates to a method, apparatus, and storage medium for automatically updating buried point events and their fields, belonging to the technical field of data processing. Background Art
[0002] In the technical field of data analysis, analyzing an event from multiple dimensions can meet various requirements. For example, analyzing multiple houses according to housing prices, cleaning conditions, service life, etc. can meet various requirements. For example, analyzing houses according to housing prices can meet the needs of homebuyers or developers, analyzing cleaning conditions can meet the needs of service companies, and analyzing service life can meet the needs of housing managers and other aspects.
[0003] However, in the existing technical solutions, the field information for events is relatively fixed. For example, the housing analysis event includes fields such as housing price, cleaning condition, and service life. The system can only analyze based on the already constructed field information. For new fields of the same event, developers need to manually add them in the form of code. Even if the analysis method is the same, just adding fields is a time-consuming and laborious task. Similarly, for analyzing certain fields of a new event, developers need to manually write code to add the new event and the field information it depends on to the corresponding database. Manually adding fields or manually adding new events and the field information they depend on in this way has low efficiency, resulting in a decrease in analysis efficiency. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for automatically updating buried point events and fields to solve the technical problem in the existing technology of "developers need to manually write code to add event information, field information, and the dependency relationship between event information and field information".
[0005] To solve the above technical problem, this application provides the following technical solutions:
[0006] In the first aspect, according to an embodiment of the present invention, a method for automatically updating buried point events and their fields is provided, including:
[0007] Based on the data information reported by the client, store the field information, buried point event, and the field information on which the buried point event depends in the corresponding local variables respectively;
[0008] Use the hash algorithm to compare whether the data information stored in the two local variables is completely stored in the preset global variable;
[0009] If not, update the database corresponding to the preset global variable with the new field information, and / or the new event and the field information it depends on;
[0010] Among them, the data information includes buried point event information and field information.
[0011] Preferably, updating the database corresponding to the preset global variable with the newly added field information, and / or the newly added event and the fields it depends on, includes:
[0012] Adding the newly added field information and the dependency relationship between the newly added field information and the current event, and / or the newly added event and the fields it depends on to the ClickHouse database; and
[0013] Storing the metadata of the newly added field information and the metadata of the newly added event and the fields it depends on in the mysql database.
[0014] Preferably, updating the database corresponding to the preset global variable with the newly added field information, and / or the newly added event and the fields it depends on, includes:
[0015] If the buried point event information in the data information does not all exist in the database corresponding to the first global variable, then update the newly added buried point event information to the database corresponding to the first global variable, and update the dependency relationship between the newly added buried point event information and the field information to the database corresponding to the third global variable;
[0016] If the buried point event information in the data information all exists in the database corresponding to the first global variable, and the field information in the data information all exists in the database corresponding to the second global variable, then update the dependency relationship between the newly added field information and the buried point event information to the database corresponding to the third global variable;
[0017] If the buried point event information in the data information all exists in the database corresponding to the first global variable, and the field information in the data information does not all exist in the database corresponding to the second global variable, update the newly added field information to the database corresponding to the second global variable, and then update the dependency relationship between the newly added field information and the buried point event information to the database corresponding to the third global variable.
[0018] Preferably, storing the field information, buried point events, and the fields that the buried point events depend on in the data information in corresponding local variables respectively, includes:
[0019] Judging whether the current event is included in the first local variable;
[0020] If not, create a third local variable to store the current event and the fields it depends on in the second local variable;
[0021] Obtaining the fields that the current event depends on from the second local variable;
[0022] Determine the type of each field information, and store the field information and its type in the first local variable;
[0023] Among them, the first local variable is used to store field information, and the second field is used to store the buried point event and the field information on which the buried point event depends.
[0024] Preferably, the method further includes:
[0025] Traverse the event information in the second local variable, and judge one by one whether the current event is included in the second global variable;
[0026] If not, save the current event information to the mysql database.
[0027] In a second aspect, according to an embodiment of the present invention, an apparatus for automatically updating buried point events and their fields includes:
[0028] A storage module, configured to respectively store the field information, buried point event, and field information on which the buried point event depends in the data information in corresponding local variables based on the data information reported by the client;
[0029] A comparison module, configured to use a hash algorithm to compare whether the data information stored in two local variables is completely stored in a preset global variable;
[0030] An update module, configured to, if not, update the database corresponding to the preset global variable with the newly added field information, and / or the newly added event and its dependent field information;
[0031] Among them, the data information includes buried point event information and field information.
[0032] Preferably, the update module is configured to:
[0033] Add the newly added field information and the dependency relationship between the newly added field information and the current event, and / or the newly added event and its dependent field information to the ClickHouse database; and
[0034] Store the metadata of the newly added field information and the metadata of the newly added event and its dependent field information in the mysql database.
[0035] Preferably, the update module is configured to:
[0036] If all the buried point events in the data information exist in the database corresponding to the global variable, update the newly added field information to the database corresponding to the preset global variable;
[0037] If the buried point events in the data information do not all exist in the database corresponding to the global variable, new fields and the field information on which the new events depend will be updated to the preset global variable.
[0038] Thirdly, according to an embodiment of the present invention, a device for automatically updating buried point events and their fields is provided. The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The computer program is loaded and executed by the processor to implement the method for automatically updating buried point events and their fields as described in any one of the above.
[0039] Fourthly, according to an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method for automatically updating buried point events and their fields as described in any one of the above.
[0040] The beneficial effects of this application are as follows: Based on the data information reported by the client received by the server, the field information, buried point events, and the field information on which the buried point events depend in the data information are respectively stored in the corresponding local variables. Then, using the hash algorithm, when it is determined by comparison that there is new field information, and / or new events and the field information on which they depend, the system automatically updates the updated event information and field information to the database corresponding to the preset global variable. Through this solution, developers can be exempted from manually adding new field information, event information, and the field information on which the event information depends through code. The system automatically updates the field information, event information, and the dependency relationship between event information and field information stored in the database based on the data information reported by the client, providing a reliable data source for subsequent event analysis and effectively improving the event analysis efficiency.
[0041] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly and implement it according to the content of the specification, the following takes a preferred embodiment of this application and combines it with the accompanying drawings to describe in detail as follows. Brief Description of the Drawings
[0042] Figure 1 is a schematic diagram of the network architecture of a device for automatically updating buried point events and fields provided by an embodiment of this application;
[0043] Figure 2 is based on Figure 1 of the architecture for automatically updating buried point events and fields;
[0044] Figure 3 is a flowchart of automatically updating buried point events and fields provided by an embodiment of this application;
[0045] Figure 4 It is a flowchart for updating the database corresponding to global variables provided by an embodiment of the present application;
[0046] Figure 5 It is a flowchart for storing updated field information, event information, and dependency relationships provided by an embodiment of the present application;
[0047] Figure 6 It is a module diagram of a device for automatically updating buried point events and fields provided by an embodiment of the present application;
[0048] Figure 7 It is a block diagram of a device for automatically updating buried point events and fields provided by an embodiment of the present application. Detailed implementation manners
[0049] The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0050] Figure 1 It is a schematic diagram of the system network architecture for automatically updating buried point events and their fields provided by an embodiment of the present application. As Figure 1 shown, the system at least includes: a client device 1 and a server device 2. Optionally, the client device 1 can be a mobile phone, a laptop computer, a desktop computer, etc.; the server device is mainly a browser on a laptop computer or a desktop computer.
[0051] The client device 1 uploads data information to the data collection service module. The data collection service module stores the information in the ClickHouse database and the Mysql database. The server device 2 calls the data analysis service module to analyze new event information or new field information of the current event. The data analysis service module analyzes the field information on which the event information depends based on the ClickHouse database.
[0052] Based on Figure 1 the architecture, Figure 2 a flowchart of the method for a user to automatically update buried point events and their fields in an embodiment of the present application is given. As Figure 2 shown, the method for a user to automatically update buried point events and their fields is as follows:
[0053] Step S101: The client device reports data information;
[0054] Step S102: Based on the data information reported by the client received by the server device, the server device stores the field information, buried point events, and field information on which the buried point events depend in the data information in corresponding local variables respectively;
[0055] Step S103: Use the hash algorithm to compare whether the data information stored in the two local variables is completely stored in the preset global variable;
[0056] Step S104: If not, update the new field information, and / or the new event information and the field information it depends on to the database corresponding to the preset global variable;
[0057] The data information reported by the client device 1 can be the data information collected by the data collection service module from the mobile phone or computer terminal upload, including event information, such as housing price analysis event, cleaning service analysis event, or analysis event of the houses sold in each real estate during the same period, etc. The data information also includes the field information that the event information depends on. For example, the field information that the housing price analysis event depends on: current housing price information, housing price growth information during the same period, etc., while the field information that the cleaning service analysis event depends on includes cleaning service frequency information, cleaning service item information, etc.; the field information that the analysis event of the houses sold in each real estate depends on includes the quantity of houses sold in each real estate, the housing price of houses sold in each real estate, etc.
[0058] Based on Figure 1 the architecture of Figure 3 FIG. shows the flowchart of the method for the user of the embodiment of the present application to automatically update the buried point event and its fields, which is applied to the server device 2. Figure 3 The method for the user to automatically update the buried point event and its fields is as follows:
[0059] Step S202: The server device stores the field information, the buried point event, and the field information that the buried point event depends on in the corresponding local variables respectively based on the data information reported by the client device;
[0060] Specifically, when the data information reported by the client is received, the field information is stored in the first local variable, and the dependency relationship between the buried point time and the buried point event is stored in the second local variable. As a specific embodiment, create the first local variable HashSet <filed>, named currentEventAllFieldSet, saves all field information in the data information of this batch; creates a second local variable HashMap<Event, HashSet <field>>, named eventAndFieldSetMap, is used to store event information and the dependency relationship between event information and field information. That is, in the second local variable eventAndFieldSetMap, event information and the field information on which the event information depends are stored.
[0061] Step S204: Use the hash algorithm to compare whether the data information stored in the two local variables is completely stored in the preset global variable;
[0062] Specifically, in the embodiment of the present invention, three global variables are preset, and the first global variable is HashSet <event>, named All_Event_SET, is used to store all events in the system; the second global variable HashSet <field>, named ALL_FIELD_SET, is used to store all fields in the system; The third global variable HashMap<Event,HashSet <field>>, named ALL_EVENT_AND_FIELD_SET_MAP, is used to save the dependency relationship between event information and field information.
[0063] Here, the first local variable HashSet can be compared through the Hash algorithm <filed>Whether the field information in currentEventAllFieldSet exists in the second global variable HashSet <field>In ALL_FIELD_SET, and the second local variable HashMap<Event, HashSet <field>>Whether the event information in the eventAndFieldSetMap and the field information on which the event information depends exist in the third global variable HashMap<Event, HashSet <field>>In the ALL_EVENT_AND_FIELD_SET_MAP. If it exists completely, it means that there is no new field information in the collected data information, nor is there a new dependency relationship between event information and field information. Otherwise, continue to update the new field information or the dependency relationship between new event information and field information to the corresponding database according to the subsequent method.
[0064] Step S206: If not, update the new field information, and / or the new event information and the field information it depends on to the database corresponding to the preset global variable;
[0065] Among them, the data information includes buried point event information and field information.
[0066] Specifically, if new field information is added based on existing event information, for example, based on the existing housing price analysis event, on the basis of the original current housing price information and the housing price growth information in the same period, new field information such as the housing price growth information compared with the previous quarter is added, then the "housing price growth information compared with the previous quarter" is updated to the second global variable HashSet <field>In ALL_FIELD_SET, and the third global variable HashMap<Event, HashSet <field>>The field information on which the house price analysis event in the ALL_EVENT_AND_FIELD_SET_MAP depends is updated from the current house price information and the year-on-year house price growth information to "the field information on which the house price analysis event depends is the current house price information, the year-on-year house price growth information, and the house price growth information compared with the previous quarter".
[0067] For another example, if, through comparison, on the basis that the original cleaning service analysis event depends on the cleaning service frequency information and the cleaning service item information, the field information of the cleaning service price information is newly added, then the cleaning service price information is updated to the second global variable HashSet. <field>In ALL_FIELD_SET, while the third global variable HashMap<Event,HashSet <field>>In the ALL_EVENT_AND_FIELD_SET_MAP, the cleaning service event information depends on the cleaning service frequency information and the cleaning service item information. It is updated to that the cleaning service event information depends on the cleaning frequency information, the cleaning service item information, and the cleaning service price information.
[0068] In an embodiment of the present invention, as shown in Figure 4 In step S206, updating the new field information, and / or the new event and the field information it depends on to the database corresponding to the preset global variable includes:
[0069] Step S2061: Add the new field information, the dependency relationship between the new field information and the current event information, and / or the new event and the field information it depends on to the ClickHouse database;
[0070] Specifically, if the received data information is compared with the previously stored event information and field information through the Hash algorithm, and it is determined through the comparison that there is new field information but no new event information, that is, for the existing event information, new dependent field information is added, then the new field information and the dependency relationship between the new field information and the current event information are added to the ClickHouse database.
[0071] If the received data information is compared with the previously stored event information and field information through the Hash algorithm, and it is found through the comparison that there is new event information, then the new event information and the field information it depends on are updated to the ClickHouse database.
[0072] In the ClickHouse database, the complete field information added to the previously stored field information and event information in the database for the received data information reported by the client, and / or the event information, as well as the updated dependency relationship between the field information and the event information, are stored.
[0073] Subsequent event information analysis can be performed based on the event information, field information, and the dependency relationship between the event information and the field information stored in the ClickHouse database.
[0074] Step S2062: Store the new field information metadata and the new event and the field information it depends on metadata in the mysql database.
[0075] In an embodiment of the present invention, complete event information, field information, and the dependency relationship between event information and field information are stored in the ClickHouse database, and metadata is stored in the mysql database. When analyzing events, the analysis is performed based on the event information, field information, and the dependency relationship between event information and field information stored in the ClickHouse database and the mysql database.
[0076] In an embodiment of the present invention, in step S206, the updating of the database corresponding to the preset global variable with the newly added field information and / or the newly added event and the field information on which it depends includes:
[0077] 1) If the buried point event information in the data information does not all exist in the database corresponding to the first global variable, the newly added buried point event information is updated to the database corresponding to the first global variable, and the dependency relationship between the newly added buried point event information and the field information is updated to the database corresponding to the third global variable;
[0078] If it is obtained through comparison that there is newly added field information in the data information compared with the preset global variable, the newly added field information is updated to the second global variable. Based on the presence of newly added field information, generally, the newly added field information will not exist in isolation and will inevitably have a new dependency relationship with the existing event information. Therefore, the dependency relationship between the newly added field information and the existing event information is simultaneously updated to the third global variable HashMap<Event,HashSet <field>>ALL_EVENT_AND_FIELD_SET_MAP corresponding database.
[0079] 2) If all the buried point event information in the data information exists in the database corresponding to the first global variable, and not all the field information in the data information exists in the database corresponding to the second global variable, update the newly added field information to the database corresponding to the second global variable, and then update the dependency relationship between the newly added field information and the buried point event information to the database corresponding to the third global variable.
[0080] In the embodiment of the present invention, the buried point event is the event information to be analyzed. If the buried point event exists in the first global variable HashSet <event>In All_Event_SET, the newly added field information is updated to the database corresponding to the second global variable; for use as a comparison benchmark during the next analysis. If the buried point event in the data information reported by the client does not exist in the first global variable HashSet <event>In the database corresponding to All_Event_SET, update the newly added event information to the first global variable HashSet <event>For the database corresponding to All_Event_SET, update the newly added field information to the database corresponding to the second global variable, and update the dependency relationships between the newly added field information and event information, as well as between the newly added event information and field information, to the third global variable HashMap<Event,HashSet <field>>
[0081] In the ALL_EVENT_AND_FIELD_SET_MAP. It should be noted here that the dependency relationship between the newly added field information and the event information can be the dependency relationship between the newly added field information and the newly added event information, or the dependency relationship between the newly added field information and the existing event information; similarly, the dependency relationship between the newly added event information and the field information can be the dependency relationship between the newly added event information and the newly added field information, or the dependency relationship between the newly added event information and the existing field information;
[0082] 3) If all the buried point event information in the data information exists in the database corresponding to the first global variable, and all the field information in the data information exists in the database corresponding to the second global variable, then update the dependency relationship between the newly added field information and the buried point event information to the database corresponding to the third global variable;
[0083] In the embodiments of the present application, if through comparison, all the field information in the data information exists in the second global variable, and all the event information exists in the first global variable HashSet <event>In All_Event_SET, there is an additional dependency between event information and field information. That is, for the existing event information and field information, a new dependency is added. Then, the newly added dependency between time information and field information is updated to the third global variable.
[0084] Further, in the embodiment of the present invention, refer to Figure 5 As shown, storing the field information, buried point events, and field information on which the buried point events depend in the data information in corresponding local variables respectively includes:
[0085] 1) Determine whether the current event is included in the second local variable;
[0086] The second local variable HashMap<Event, HashSet <field>>The dependency relationship between the current event information and the field information is stored in the eventAndFieldSetMap. Here, it is judged whether the dependency relationship between the current event information and the field information contains the current event.
[0087] 2) If it does not contain, create a third local variable to store the current event and the field information on which the current event depends into the second local variable;
[0088] Specifically, if the second local variable HashMap<Event, HashSet <field>>If the current event information is not included in the eventAndFieldSetMap, create a third local variable, assign the current event and the field information on which the current event depends to the third local variable, and then store the assigned value in the second global variable through the third global variable.
[0089] 3) From the second local variable HashMap<Event, HashSet <field>>Obtain the field information on which the current event depends from the eventAndFieldSetMap;
[0090] 4) Determine the type of each piece of field information, and store the field information and its type in a first local variable; for example, the field information is numeric, character, etc.
[0091] Among them, the first local variable is used to store the field information, and the second local variable is used to store the buried point event and the field information on which the buried point event depends.
[0092] In an embodiment of the present invention, the method further includes:
[0093] For the second local variable HashMap<Event, HashSet <field>Traverse the event information in the >eventAndFieldSetMap, and judge one by one whether the current event is included in the second local variable;
[0094] If not, save the current event information to the mysql database.
[0095] Specifically, in the embodiment of the present invention, determine the event information in the received data information. For each event information, traverse the second local variable to judge whether the second local variable contains the event information. If not, the current event information needs to be saved to the mysql database. Such operations are performed for each event information in the data information.
[0096] In summary, the method for automatically updating buried point events and their fields provided in this embodiment. The server side stores the field information, buried point events, and field information on which the buried point events depend in the corresponding local variables based on the data information reported by the client. Then, using the hash algorithm, when it is determined by comparison that there are new field information, and / or new events and their dependent field information, the system automatically updates the updated event information and field information to the database corresponding to the preset global variable. Through this solution, developers can be exempted from manually adding new field information, event information, and field information on which the event information depends through code. The system automatically updates the field information, event information, and the dependency relationship between event information and field information stored in the database based on the data information reported by the client, providing a reliable data source for subsequent event analysis and effectively improving the event analysis efficiency.
[0097] Figure 6 It is a block diagram of a device for automatically updating buried point events and fields provided by an embodiment of the present application. In this embodiment, it is described by taking the device as an example applied to the Figure 1 server device 2 in the image retrieval device system shown. The device at least includes the following modules:
[0098] The storage module 61 is used to store the field information, buried point events, and field information on which the buried point events depend in the corresponding local variables based on the data information reported by the client;
[0099] The comparison module 62 is used to use the hash algorithm to compare whether the data information stored in the two local variables is completely stored in the preset global variable;
[0100] The update module 63 is used to, if not, update the database corresponding to the preset global variable with the new field information, and / or new events and their dependent field information;
[0101] Among them, the data information includes buried point event information and field information.
[0102] The device for automatically updating buried point events and fields provided by the embodiment of the present application can be used for the method executed by the server device 2 in the above embodiment. For relevant details, refer to the above method embodiment. The implementation principle and technical effect are similar and will not be elaborated here.
[0103] It should be noted that: when the device for automatically updating buried point events and fields provided in the above embodiment performs automatic update of buried point events and fields, only the division of the above functional modules is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device for automatically updating buried point events and fields is divided into different functional modules to complete all or part of the functions described above. In addition, the device for automatically updating buried point events and fields provided in the above embodiment and the method embodiment for automatically updating buried point events and fields belong to the same inventive concept. The specific implementation process is detailed in the method embodiment and will not be elaborated here.
[0104] Figure 7 is a block diagram of a device for automatically updating buried point events and fields provided by an embodiment of the present application. The device for automatically updating buried point events and fields in this embodiment can be a computing device such as a desktop computer, a laptop computer, a palm computer, and a cloud server. The device can include, but is not limited to, a processor and a memory. The device for automatically updating buried point events and fields in this embodiment at least includes a processor and a memory. A computer program is stored on the memory, and the computer program can run on the processor. When the processor executes the computer program, the steps in the above image retrieval method embodiment are implemented, such as Figure 3 the steps of the method for automatically updating buried point events and fields shown. Or, when the processor executes the computer program, the functions of each module in the above embodiment of the device for automatically updating buried point events and fields are implemented.
[0105] Exemplarily, the computer program can be divided into one or more modules. The one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of completing specific functions. The instruction segments are used to describe the execution process of the computer program in the device for automatically updating buried point events and fields. For example, the computer program can be divided into a storage module, a comparison module, and an update module. The specific functions of each module are as follows:
[0106] The storage module is used to store the field information, buried point events, and field information on which the buried point events depend in the data information in corresponding local variables based on the data information reported by the client.
[0107] A comparison module, configured to use a hash algorithm to compare whether the data information stored in two local variables is completely stored in a preset global variable;
[0108] An update module, configured to, if not, update the database corresponding to the preset global variable with the newly added field information and / or the newly added event and the field information on which it depends;
[0109] Wherein, the data information includes buried point event information and field information.
[0110] The processor may include one or more processing cores, such as: a 4-core processor, a 6-core processor, etc. The processor may 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 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the central processor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning. The processor is the control center of the device for automatically updating buried point events and fields, and connects various parts of the entire device for automatically updating buried point events and fields through various interfaces and lines.
[0111] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory and invoking the data stored in the memory, the processor implements various functions of the image detection device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a memory device, or other volatile solid-state storage devices.
[0112] Those skilled in the art can understand that the device described in this embodiment is only an example of the device for automatically updating the buried point events and fields, and does not constitute a limitation on the device for automatically updating the buried point events and fields. In other embodiments, there may be more or fewer components, or some components may be combined, or different components. For example, the device for automatically updating the buried point events and fields may further include input / output devices, network access devices, buses, etc. The processor, the memory, and the peripheral device interface can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface through a bus, a signal line, or a circuit board. Schematically, the peripheral devices include, but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply, etc.
[0113] Of course, the device for automatically updating the buried point events and fields may also include fewer or more components, and this embodiment does not limit this.
[0114] Optionally, the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it is used to implement the steps of the method for automatically updating the buried point events and fields.
[0115] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, and a program is stored in the computer-readable storage medium, and the program is loaded and executed by the processor to implement the steps of the method embodiment for automatically updating the buried point events and fields.
[0116] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0117] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.< / field> < / field> < / field> < / field> < / event> < / field> < / event> < / event> < / event> < / field> < / field> < / field> < / field> < / field> < / field> < / field> < / field> < / filed> < / field> < / field> < / event> < / field> < / filed>
Claims
1. A method for automatically updating buried events and their fields, characterized in that: include: Based on the data information reported by the client, the field information, tracking events, and field information that the tracking events depend on in the data information are stored in corresponding local variables, including: Determine whether the first local variable contains the current event; If not, create a third local variable to store the current event and the field information that the current event depends on in the second local variable; Get the field information that the current event depends on from the second local variable; Determine the type of each field information, and store the field information and type in the first local variable; The first local variable is used to store field information, and the second local variable is used to store embedded events and field information that embedded events depend on. Use the hash algorithm to compare whether the data information stored in the two local variables is completely stored in the preset global variable; If not, the database corresponding to the preset global variable is updated with the newly added field information and / or the newly added event and its dependent field information, including: If the embedded event information in the data information does not all exist in the database corresponding to the first global variable, the newly added embedded event information is updated to the database corresponding to the first global variable, and the dependency relationship between the newly added embedded event information and the field information is updated to the database corresponding to the third global variable; If the embedded event information in the data information exists in the database corresponding to the first global variable, and the field information in the data information exists in the database corresponding to the second global variable, the dependency relationship between the newly added field information and the embedded event information is updated to the database corresponding to the third global variable; If the embedded event information in the data information all exists in the database corresponding to the first global variable, and the field information in the data information does not all exist in the database corresponding to the second global variable, the newly added field information is updated to the database corresponding to the second global variable, and the dependency relationship between the newly added field information and the embedded event information is updated to the database corresponding to the third global variable; Among them, the newly added field information and the dependency relationship between the newly added field information and the current event, and / or the newly added event and its dependent field information are added to the ClickHouse database; and the metadata of the newly added field information and the metadata of the newly added event and its dependent field information are stored in the mysql database.
2. The method according to claim 1, characterized in that The method further comprises: Traverse the event information in the second local variable and determine whether the second global variable contains the current event one by one; If not included, the current event information will be saved in the MySQL database.
3. A device for automatically updating buried events and their fields, characterized in that: include: The storage module is used to store the field information, tracking events, and field information dependent on the tracking events in the data information in corresponding local variables based on the data information reported by the client, including: Determine whether the first local variable contains the current event; If not, create a third local variable to store the current event and the field information that the current event depends on in the second local variable; Get the field information that the current event depends on from the second local variable; Determine the type of each field information, and store the field information and type in the first local variable; The first local variable is used to store field information, and the second local variable is used to store embedded events and field information that embedded events depend on. The comparison module is used to use the hash algorithm to compare whether the data information stored in two local variables is completely stored in the preset global variable; An update module, configured to update the database corresponding to the preset global variable with the newly added field information, and / or the newly added event and its dependent field information if not already present; The data information includes embedded event information and field information; the update module is used to: If all the embedded events in the data information exist in the database corresponding to the global variable, the newly added field information is updated to the database corresponding to the preset global variable; If the embedded events in the data information do not all exist in the database corresponding to the global variable, the newly added fields and the field information on which the newly added events depend are updated to the preset global variables; Among them, the newly added field information and the dependency relationship between the newly added field information and the current event, and / or the newly added event and its dependent field information are added to the ClickHouse database; and the metadata of the newly added field information and the metadata of the newly added event and its dependent field information are stored in the mysql database.
4. A device for automatically updating buried events and their fields, the device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: The computer program is loaded and executed by the processor to implement the method of automatically updating buried events and their fields as described in any one of claims 1-2.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the method of automatically updating buried events and their fields as described in any one of claims 1-2.
Citation Information
Patent Citations
Buried point management method, buried point updating method and buried point management system
CN110688275A
Buried point data processing method and device, equipment and storage medium
CN110727572A