Data processing method and device, electronic equipment and computer readable storage medium

By storing offline data and generating relationships in the data warehouse first, the problem of incomplete data during the storage of real-time and offline data is solved, achieving seamless data switching and integrity.

CN116662364BActive Publication Date: 2026-03-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-18
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, the storage methods for real-time and offline data result in incomplete data retrieval during the deletion of real-time data and the storage of offline data, making it impossible to query both real-time and offline data simultaneously.

Method used

First, retrieve offline data for the target time interval from the data warehouse and store it in a preset temporary storage address. Delete real-time data from the original storage address. Then, generate a relationship between the temporary storage address and the time interval. Query real-time data in the original storage address using the initial relationship and query offline data in the temporary storage address using the target relationship.

Benefits of technology

It enables seamless switching between real-time and offline data, ensuring data integrity and availability, and avoiding the problem of incomplete data during storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662364B_ABST
    Figure CN116662364B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data processing method and device, electronic equipment and computer readable storage medium; in the embodiments of the present application, target offline data of target time interval is stored to preset temporary storage address, and target real-time data corresponding to target time interval stored in target original storage address is deleted;A target relationship between preset temporary storage address and target time interval is generated;If a query request is received before the completion of storing target offline data to preset temporary storage address, then the target real-time data of target time interval is queried in target original storage address through the query request and the initial relationship between target original storage address and target time interval;If a query request is received after the completion of storing target offline data to preset temporary storage address, then the target offline data of target time interval is queried in preset temporary storage address through the query request and the target relationship.The present application can find complete data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a data processing method and device, electronic equipment and a computer readable storage medium. BACKGROUND

[0002] With the development of the Internet, more and more data is generated on the Internet. Users can obtain these data from the Internet through querying.

[0003] These data include real-time data and offline data. At present, the storage method of real-time data and offline data is: first, store the real-time data to the original storage address, and then when the offline data is obtained, first delete the real-time data in the original storage address, and then store the offline data in the original storage address, which results in that the data found in the process of deleting the real-time data in the original storage address and storing the offline data in the original storage address is incomplete. SUMMARY

[0004] The embodiments of the present application provide a data processing method and device, electronic equipment and a computer readable storage medium, which can solve the technical problem that the data found is incomplete.

[0005] A data processing method comprises:

[0006] obtaining target offline data corresponding to a target time interval from a data warehouse in advance;

[0007] storing the target offline data to a preset temporary storage address, and deleting the target real-time data corresponding to the target time interval stored in the target original storage address;

[0008] generating a target relationship between the preset temporary storage address and the target time interval;

[0009] if the query request is received before the target offline data is stored to the preset temporary storage address, querying the target real-time data corresponding to the target time interval in the target original storage address through the query request and an initial relationship between the target original storage address and the target time interval;

[0010] if the query request is received after the target offline data is stored to the preset temporary storage address, querying the target offline data corresponding to the target time interval in the preset temporary storage address through the query request and the target relationship.

[0011] Correspondingly, the embodiments of the present application provide a data processing device, comprising:

[0012] The acquisition module is configured to acquire target offline data corresponding to the target time interval from the data warehouse;

[0013] The storage module is configured to store the target offline data to a preset temporary storage address and delete the target real-time data corresponding to the target time interval stored in the target original storage address;

[0014] The generation module is configured to generate a target relationship between the preset temporary storage address and the target time interval;

[0015] The query module is configured to query the target real-time data corresponding to the target time interval in the target original storage address through the query request and an initial relationship between the target original storage address and the target time interval if the query request is received before the target offline data is stored to the preset temporary storage address is completed, and query the target offline data corresponding to the target time interval in the preset temporary storage address through the query request and the target relationship if the query request is received after the target offline data is stored to the preset temporary storage address is completed.

[0016] Optionally, the storage module is specifically configured to perform:

[0017] acquire a preset temporary index name;

[0018] store the target offline data to a preset temporary storage address corresponding to the preset temporary index name.

[0019] Optionally, the storage module is further configured to perform:

[0020] acquire a target real-time index name;

[0021] store the target real-time data to a target original storage address corresponding to the target real-time index name, and determine an index name of the target time interval according to the target real-time index name to obtain an initial relationship between the target original storage address and the target time interval.

[0022] Correspondingly, the generation module is specifically configured to perform:

[0023] generate a target relationship between the preset temporary storage address and the index name of the target time interval.

[0024] Optionally, the storage module is specifically configured to perform:

[0025] use the target real-time index name as the index name of the target time interval to obtain the initial relationship between the target original storage address and the target time interval.

[0026] Correspondingly, the generating module is specifically configured to perform:

[0027] updating the index name of the target time interval from the target real-time index name to the preset temporary index name, to obtain a target relationship between the preset temporary storage address and the index name of the target time interval.

[0028] Optionally, the storing module is specifically configured to perform:

[0029] obtaining a target alias, and taking the target alias as the index name of the target time interval;

[0030] associating the target alias with the target real-time index name, to obtain an initial relationship between the target original storage address and the target time interval.

[0031] Correspondingly, the generating module is specifically configured to perform:

[0032] deleting the association between the target alias and the target real-time index name, and associating the target alias with the preset temporary index name, to obtain the target relationship between the preset temporary storage address and the index name of the target time interval.

[0033] Optionally, the querying module is specifically configured to perform:

[0034] if the querying request is received before the target offline data is stored into the preset temporary storage address, and the querying request includes the target alias, then the target real-time data of the target time interval is obtained from the target original storage address according to the target alias and the initial relationship.

[0035] Optionally, the querying module is specifically configured to perform:

[0036] if the querying request is received after the target offline data is stored into the preset temporary storage address, and the querying request includes the target alias, then the target offline data of the target time interval is obtained from the preset temporary storage address according to the target alias and the target relationship.

[0037] In addition, an electronic device is also provided in the embodiments of the present application, which includes a processor and a memory, the memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the data processing method provided in the embodiments of the present application.

[0038] In addition, a computer readable storage medium is also provided in the embodiments of the present application, which stores a computer program, and the computer program is adapted to be loaded by a processor to execute any one of the data processing methods provided in the embodiments of the present application.

[0039] Further, the embodiment of the present application further provides a computer program product comprising a computer program, which, when executed by a processor, implements any of the data processing methods provided by the embodiment of the present application.

[0040] In the embodiment of the present application, the target offline data corresponding to the target time interval is first acquired from the data warehouse. Then the target offline data is stored in the preset temporary storage address, and the target real-time data in the target original storage address is deleted. Then the target relationship between the preset temporary storage address and the target time interval is generated. Finally, if the query request is received before the target offline data is stored in the preset temporary storage address is completed, the target real-time data corresponding to the target time interval is queried in the target original storage address through the query request and the initial relationship between the target original storage address and the target time interval, and if the query request is received after the target offline data is stored in the preset temporary storage address is completed, the target offline data corresponding to the target time interval is queried in the preset temporary storage address through the query request and the target relationship.

[0041] That is, in the embodiment of the present application, the target offline data of the target time interval acquired is stored in the preset temporary storage address, without deleting the target real-time data of the target time interval in the target original storage address before storing the target offline data in the target original storage address, so that before the target offline data is stored in the preset temporary storage address is completed, the target real-time data corresponding to the target time interval can be queried in the target original storage address through the query request and the initial relationship between the target original storage address and the target time interval, so that the data found is complete, thereby avoiding the case that the data found is incomplete when the target real-time data in the original address is deleted and before the target offline data is stored in the target original storage address and in the process of storing the target offline data in the target original storage address.

[0042] And, after the storage of the target offline data is completed, the target real-time data in the target original storage address is deleted, and the target relationship between the preset temporary storage address and the target time interval is generated, so that the target offline data corresponding to the target time interval can be queried in the preset temporary storage address through the query request and the target relationship, so that the target real-time data and the target offline data of the target time interval can be seamlessly switched, so that all data before the target time interval and in the target time interval can be found, that is, the integrity and availability of the data found are guaranteed. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor.

[0044] Figure 1 is a scene schematic diagram of a data processing process provided by an embodiment of the present application;

[0045] Figure 2 is a flow schematic diagram of a data processing method provided by an embodiment of the present application;

[0046] Figure 3 is a schematic diagram of a data storage process provided by an embodiment of the present application;

[0047] Figure 4 is a schematic diagram of another data storage process provided by an embodiment of the present application;

[0048] Figure 5 is a schematic diagram of an updating process of an index name of a target time interval provided by an embodiment of the present application;

[0049] Figure 6 is a schematic diagram of a data query process provided by an embodiment of the present application;

[0050] Figure 7 is a schematic diagram of a query page and a query result provided by an embodiment of the present application;

[0051] Figure 8 is a flow schematic diagram of another data processing method provided by an embodiment of the present application;

[0052] Figure 9 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application;

[0053] Figure 10 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0055] Embodiments of the present application provide a data processing method and device, electronic equipment and computer readable storage medium. The data processing device can be integrated in the electronic equipment, which can be a server or a terminal.

[0056] The server can be a physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0057] The multiple servers can form a blockchain, and the server is a node on the blockchain.

[0058] The terminal can be a smartphone, tablet computer, notebook computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.

[0059] For example, as shown in Figure 1 The server can obtain target offline data corresponding to a target time interval from a data warehouse, store the target offline data to a preset temporary storage address, delete target real-time data corresponding to the target time interval stored in a target original storage address, generate a target relationship between the preset temporary storage address and the target time interval, query the target real-time data corresponding to the target time interval in the target original storage address through the query request and an initial relationship between the target original storage address and the target time interval if the query request is received before the target offline data is stored to the preset temporary storage address is completed, and query the target offline data corresponding to the target time interval in the preset temporary storage address through the query request and the target relationship if the query request is received after the target offline data is stored to the preset temporary storage address is completed.

[0060] In addition, "multiple" in the embodiments of the present application refers to two or more. "First" and "second" in the embodiments of the present application are used to distinguish the description, and cannot be understood as implying relative importance.

[0061] The following will be described in detail. It should be noted that the description order of the following embodiments is not limited as the preferred order of the embodiments.

[0062] In the embodiment, the data processing device can be integrated in a server or a terminal, and the data processing method is described in detail below by taking the server as an execution subject.

[0063] In the related art, data is collected from a data source, and then the collected data is stored in a data warehouse periodically through offline technology, and the collected data is synchronized from the data warehouse to a query database, so as to obtain offline data, and finally the offline data can be queried from the query database.

[0064] However, in the technology, only past offline data can be queried, and real-time data of the day cannot be queried. In order to query real-time data of the day and past offline data, real-time tasks and offline tasks are created, real-time tasks of the day are run on the day, real-time data of the day is collected from the data source in real time, and the real-time data is stored in the query database. If querying is performed in the query database at this time, real-time data of the day and offline data before the day can be obtained.

[0065] When the offline tasks of the day are run on the next day of the day, the offline data of the day is synchronized from the data warehouse to the query database, and the real-time data of the day in the query database is deleted. At this time, if querying is performed in the query database, offline data of the day, offline data before the day, and real-time data of the next day of the day can be obtained, so that offline data of the day can be ensured to be queried.

[0066] For example, on T day, T-day real-time tasks are run to obtain T-day real-time data, and (T-1)-day offline tasks are run to obtain (T-1)-day offline data. On (T+1) day, T-day offline tasks are run to obtain T-day offline data, and (T+1)-day real-time tasks are run to obtain (T+1)-day real-time data.

[0067] After obtaining the offline data of T day, the real-time data of T day in the query database is deleted, and the offline data of T day is stored in the query database.

[0068] However, on T day, if the (T-1)-day offline data is not generated on time, only the T-day real-time data, (T-2)-day offline data, and (T-N)-day offline data are in the query database, resulting in that the (T-1)-day offline data is not in the queried data, that is, the queried data is incomplete.

[0069] And, on the T day, if the offline task of the (T-1) day is still running, that is, the process of storing the offline data of the (T-1) day to the query database is still in progress, only part of the offline data of the (T-1) day is generated, resulting in that the queried data is also incomplete.

[0070] In addition, before storing the offline data of the (T-1) day to the query database, that is, before running the offline task of the (T-1) day, the real-time data of the (T-1) day in the query database needs to be deleted, at this time, the real-time data of the (T-1) day cannot be queried, and the offline data of the (T-1) day cannot be queried, that is, the data of the (T-1) day cannot be queried.

[0071] Therefore, the current storage mode of real-time data and offline data causes that the data found in the process of deleting the real-time data and storing the offline data is incomplete.

[0072] In order to solve the technical problem, the embodiment of the present application improves a data processing method, in which the target offline data corresponding to the target time interval is first obtained from the data warehouse. Then the target offline data is stored to the preset temporary storage address, and the target real-time data in the target original storage address is deleted. Then the target relationship between the preset temporary storage address and the target time interval is generated. Finally, if the query request is received before the target offline data is stored to the preset temporary storage address is completed, the target real-time data corresponding to the target time interval in the target original storage address is queried through the query request and the initial relationship between the target original storage address and the target time interval, and if the query request is received after the target offline data is stored to the preset temporary storage address is completed, the target offline data corresponding to the target time interval in the preset temporary storage address is queried through the query request and the target relationship.

[0073] That is, in the embodiment of the present application, the target offline data of the target time interval obtained is stored in the preset temporary storage address, without deleting the target real-time data of the target time interval in the target original storage address before storing the target offline data to the target original storage address, so that before the target offline data is stored to the preset temporary storage address is completed, the target real-time data corresponding to the target time interval in the target original storage address can be queried through the query request and the initial relationship between the target original storage address and the target time interval, so that the data found is complete, thereby avoiding the case that the data found is incomplete before deleting the target real-time data in the original address and before storing the target offline data to the target original storage address and in the process of storing the target offline data to the target original storage address.

[0074] And, after the target offline data storage is completed, the target real-time data in the target original storage address is deleted, and a target relationship between the preset temporary storage address and the target time interval is generated, so that the target offline data corresponding to the target time interval can be queried in the preset temporary storage address through a query request and the target relationship, and the target real-time data and the target offline data of the target time interval can be seamlessly switched, so that all data before and in the target time interval can be found, that is, the integrity and availability of the found data are ensured.

[0075] The data processing method provided by the embodiment of the application is described in detail below. Please refer to Figure 2 , Figure 2 is a flowchart of a data processing method provided by an embodiment of the application. The data processing method can include the following steps.

[0076] S201, obtaining target offline data corresponding to a target time interval from a data warehouse.

[0077] The server can run an offline task of the target time interval when detecting that the current time is the zero point of the day after the target time interval, so as to obtain the target offline data corresponding to the target time interval. Alternatively, the server can also run the offline task of the target time interval when receiving an offline instruction, so as to obtain the target offline data corresponding to the target time interval.

[0078] The specific type of the data warehouse can be selected according to actual conditions, for example, a distributed data warehouse Hive or a Tencent distributed data warehouse (TDW) is selected as the data warehouse in the embodiment, which is not limited in the embodiment.

[0079] It should be understood that the server can also run a real-time task corresponding to the day after the target time interval when detecting that the current time is the zero point of the day after the target time interval, so as to obtain real-time data corresponding to the day after the target time interval.

[0080] For example, the target time interval is T days, and when the server detects that the current time is the zero point of (T+1) days, the (T+1) day real-time task is run to obtain the (T+1) day target real-time data, and the T day offline task is run to obtain the T day offline data.

[0081] The target time interval can refer to a day. For example, the target time interval can be T days. The real-time task refers to a program for collecting data from a data source in real time. The offline task refers to a program for collecting data from a data source offline.

[0082] S202. Store the target offline data to a preset temporary storage address and delete the target real-time data corresponding to the target time interval stored in the target's original storage address.

[0083] In this embodiment, after the server obtains the target offline data, it does not store the target offline data in the target original storage address. Instead, it establishes a preset temporary storage address and stores the target offline data in the preset temporary storage address. This ensures that the target real-time data in the target original storage address is not deleted during the storage of the target offline data, so that users can query the target real-time data for the target time range.

[0084] Then, after the target offline data for the target time interval is stored, because offline tasks are more stable than real-time tasks, the target offline data for the target time interval is more complete and accurate than the target real-time data for the target time interval.

[0085] For example, the target offline data for the target time interval may include: watching video for 'a' seconds at A:B, watching video for 'b' seconds at A:C, and watching video for 'c' seconds at A:D. However, the target real-time data for the target time interval only includes: watching video for 'a' seconds at A:B and watching video for 'c' seconds at A:D. In other words, the target real-time data for the target time interval omits the data entry for watching video for 'b' seconds at A:C.

[0086] Therefore, the server deletes the target's real-time data from its original storage address. At this point, it queries the database for the target's offline data for the target's time range.

[0087] The target original storage address refers to a storage space in the query database, while the preset temporary storage address refers to a storage space in the query database that is different from the target original storage address. The specific type of query database can be selected according to the actual situation. For example, an HBase database or an Elasticsearch (ES) database can be selected as the query database in this embodiment of the application. This embodiment does not limit this.

[0088] In some embodiments, storing the target offline data to a preset temporary storage address includes:

[0089] Get the preset temporary index name;

[0090] Store the target offline data to the preset temporary storage address corresponding to the preset temporary index name.

[0091] In this embodiment, after the server obtains the target offline data for the target time interval, it can first obtain a preset temporary index name, and then store the target offline data for the target time interval in the preset temporary storage address corresponding to the preset temporary index name.

[0092] For example, the preset temporary index name can be temp_index_T-1, and when the server stores the target offline data into temp_index_T-1, the target offline data of the target time interval can be stored into the preset temporary storage address.

[0093] S203, generating a target relationship between the preset temporary storage address and the target time interval.

[0094] After the server stores the target offline data into the preset temporary storage address, the target real-time data in the target original storage address is deleted, and a target relationship between the preset temporary storage address and the target time interval is generated, so that when a query request is received after the target offline data is stored into the preset temporary storage address, the target offline data corresponding to the target time interval in the preset temporary storage address can be queried through the target relationship. That is, the target offline data of the target time interval is finally regarded as the data corresponding to the target time interval.

[0095] S204, if a query request is received before the target offline data is stored into the preset temporary storage address, the target real-time data corresponding to the target time interval in the target original storage address is queried through the query request and the initial relationship between the target original storage address and the target time interval.

[0096] S205, if a query request is received after the target offline data is stored into the preset temporary storage address, the target offline data corresponding to the target time interval in the preset temporary storage address is queried through the query request and the target relationship.

[0097] That is, in the embodiment, before the target offline data of the target time interval is stored into the preset temporary storage address, the user can query the target real-time data of the target time interval in the target original storage address through the query request and the initial relationship, so as to obtain the data corresponding to the target interval, and after the target offline data of the target time interval is stored into the preset temporary storage address, the user can query the target offline data of the target time interval in the preset temporary storage address through the query request and the target relationship, so as to obtain the data corresponding to the target interval, so that the target real-time data and the target offline data of the target time interval can be seamlessly switched, so that all data before the target time interval and the target time interval can be found, that is, the integrity and availability of the found data are guaranteed.

[0098] In addition, the target real-time data and the target offline data of the target time interval are seamlessly switched, the data continuity is guaranteed, the latest data can be found at any time, so that the user has no perception of whether the found data is target real-time data or target offline data, and the user also has no perception of not finding data.

[0099] For example, such as Figure 3 As shown, the target time interval is (T-1). On day T, even if the target offline data for day (T-1) is not generated on time or the offline task for day (T-1) is still running, the database will still show the target real-time data for day (T-1). If a query is performed at this time, the real-time data for day T, the target real-time data for day (T-1), the offline data for day (T-2), ..., the offline data for day (TN) can be obtained, thus ensuring that the data retrieved is complete.

[0100] And, as Figure 4 As shown, after storing the target offline data for (T-1) days to the preset temporary storage address, the target real-time data in the original target storage address can be deleted, and a target relationship between the preset temporary storage address and the target time interval can be generated. Then, the target offline data for (T-1) days can be queried through the target relationship. This avoids the situation where the target real-time data for (T-1) days needs to be deleted from the query database before running the offline task for (T-1) days, and the data for (T-1) days cannot be queried.

[0101] It should be noted that after generating the target relationship between the preset temporary storage address and the target time interval, the target offline data corresponding to the target time interval can be queried in the preset temporary storage address immediately through the target relationship, or the target offline data corresponding to the target time interval can be queried in the preset temporary storage address after a preset time interval.

[0102] The user can select the time for querying the target offline data corresponding to the target time interval in the preset temporary storage address based on the target relationship, and this embodiment does not limit it.

[0103] In some embodiments, before retrieving the target offline data corresponding to the pre-stored target time interval from the data warehouse, the method further includes:

[0104] Get the target real-time index name;

[0105] The target real-time data is stored in the target original storage address corresponding to the target real-time index name, and the index name of the target time interval is determined according to the target real-time index name, so as to obtain the initial relationship between the target original storage address and the target time interval.

[0106] Generate the target relationship between the preset temporary storage address and the target time interval, including:

[0107] Generate the target relationship between the preset temporary storage address and the index name of the target time interval.

[0108] For example, the target real-time index name can be realtime_index_T-1, and when the server stores the target real-time data into realtime_index_T-1, the target real-time data of the target time interval can be stored into the target original storage address.

[0109] It should be noted that the server can run the real-time task corresponding to the target time interval when detecting that the current time is the zero point of the target time interval, so as to obtain the target real-time data corresponding to the target time interval, and store the target real-time data into the target original storage address corresponding to the target real-time index name. Alternatively, the server can also run the real-time task corresponding to the target time interval when receiving the real-time instruction, so as to obtain the target real-time data corresponding to the target time interval, and store the target real-time data into the target original storage address corresponding to the target real-time index name.

[0110] It should be noted that the server can run the real-time task corresponding to the target time interval when detecting that the current time is the zero point of the target time interval, so as to obtain the target real-time data corresponding to the target time interval, and store the target real-time data into the target original storage address corresponding to the target real-time index name. Alternatively, the server can also run the real-time task corresponding to the target time interval when receiving the real-time instruction, so as to obtain the target real-time data corresponding to the target time interval, and store the target real-time data into the target original storage address corresponding to the target real-time index name.

[0111] The server can determine the index name of the target time interval according to the target real-time index name after storing the target real-time data into the target original storage address, so as to obtain the initial relationship between the target original storage address and the target time interval, so that the target real-time data of the target time interval can be queried in the target original storage address through the initial relationship subsequently.

[0112] It should be noted that the process of generating the target relationship between the preset temporary storage address and the index name of the target time interval can be: generating a target relationship between a preset temporary index name and the index name of the target time interval.

[0113] In some possible implementation manners, the initial relationship between the target original storage address and the target time interval is obtained by determining the index name of the target time interval according to the target real-time index name, including:

[0114] The initial relationship between the target original storage address and the target time interval is obtained by taking the target real-time index name as the index name of the target time interval;

[0115] The target relationship between the preset temporary storage address and the index name of the target time interval is generated, including:

[0116] The target relationship between the preset temporary storage address and the index name of the target time interval is obtained by updating the index name of the target time interval from the target real-time index name to a preset temporary index name.

[0117] For example, when the target real-time index name is realtime_index_T-1 and the preset temporary index name is temp_index_T-1, the index name of the target time interval is realtime_index_T-1 before the target offline data is stored in the preset temporary storage address. At this time, the data corresponding to the target time interval is obtained by querying realtime_index_T-1.

[0118] When the target offline data is stored in the preset temporary storage address, the index name of the target time interval is updated to temp_index_T-1. At this time, the data corresponding to the target time interval is obtained by querying temp_index_T-1.

[0119] However, in the above manner, the index name of the target time interval changes, resulting in the need to rebuild the index, so that a copy of the target offline data of the target time interval is made, thereby wasting the storage space in the query database and increasing the storage time.

[0120] To solve the technical problem, in another possible implementation, the index name of the target time interval is determined according to the target real-time index name, and an initial relationship between the target original storage address and the target time interval is obtained, including:

[0121] Obtaining a target alias and taking the target alias as the index name of the target time interval;

[0122] Associating the target alias with the target real-time index name to obtain an initial relationship between the target original storage address and the target time interval;

[0123] Generating a target relationship between the preset temporary storage address and the index name of the target time interval, including:

[0124] Deleting the association between the target alias and the target real-time index name, and associating the target alias with the preset temporary index name to obtain a target relationship between the preset temporary storage address and the index name of the target time interval.

[0125] In addition, when the association between the target alias and the target real-time index name is deleted, the target real-time index name of the target time interval can also be deleted.

[0126] For example, as Figure 5As shown, at the zero point of T day, the (T-1) day offline task is run, a preset temporary index name temp_index_T-1 is created first, then the server stores the (T-1) day offline data in the preset temporary index name, and the user can not know the existence of temp_index_T-1. At this time, the real-time data of T day also starts to be stored, so at the zero point of T day, the real-time index name of T day, realtime_index_T, is also created, and the server stores the real-time data of T day in realtime_index_T.

[0127] After the real-time index name of T day is created, the alias kd_data_T of T day can be associated with the real-time index name of T day, realtime_index_T.

[0128] At this time, the real-time data of T day can be found through kd_data_T. And because at the zero point of (T-1) day, the target real-time index name realtime_index_T-1 is created, and the target alias kd_data_T-1 of (T-1) day is associated with the target real-time index name realtime_index_T-1, so if before the (T-1) day offline task is completed, the real-time data of (T-1) day can be found through the target alias kd_data_T-1.

[0129] After the (T-1) day offline task is run, the target alias kd_data_T-1 of (T-1) day is associated with the preset temporary index name temp_index_T-1, and the association between the target alias kd_data_T-1 and the target real-time index name realtime_index_T-1 is deleted, and realtime_index_T-1 is deleted. At this time, the offline data of (T-1) day can be found through the target alias kd_data_T-1.

[0130] In this embodiment, the target alias is used as the index name of the target time interval, then before the target offline data of the target time interval is stored, the target alias is associated with the target real-time index name, and when the target offline data of the target time interval is stored, the target alias is associated with the preset temporary index name, so that the target real-time data and the target offline data of the target time interval can be queried through the target alias, the rolling update of the index name of the target time interval is realized, the index name of the target time interval does not need to be modified, so that the index does not need to be rebuilt and the target offline data does not need to be copied, and the storage space and the storage time in the query database are saved.

[0131] In some embodiments, if the query request is received before the target offline data is stored to the preset temporary storage address, the target real-time data corresponding to the target time interval is queried in the target original storage address according to the initial relationship between the query request and the target original storage address, including:

[0132] If the query request is received before the target offline data is stored to the preset temporary storage address, the query request includes a target alias, and the target real-time data of the target time interval is obtained from the target original storage address according to the target alias and the initial relationship.

[0133] In some embodiments, if the query request is received after the target offline data is stored to the preset temporary storage address, the target offline data corresponding to the target time interval is queried in the preset temporary storage address according to the query request and the target relationship, including:

[0134] If the query request is received after the target offline data is stored to the preset temporary storage address, the query request includes a target alias, and the target offline data of the target time interval is obtained from the preset temporary storage address according to the target alias and the target relationship.

[0135] After the server queries the target offline data or the target real-time data, the target offline data or the target real-time data is returned to the object corresponding to the query request.

[0136] The object can refer to a user, or an account, or a webpage, or a terminal.

[0137] For example, as shown in FIG. 1, the object is a terminal, the query database includes an HBase database and an Elasticsearch database, the HBase database stores dimension data (such as title or name), and the Elasticsearch database stores index data (such as click volume). Figure 6

[0138] After the server receives the query request, if the offline task of the target time interval has not been completed, the data is queried from the HBase database and the Elasticsearch database according to the target alias and the initial relationship, and the queried dimension data and index data are returned to the terminal. If the offline task of the target time interval is completed, the data is queried from the HBase database and the Elasticsearch database according to the target alias and the target relationship, and the queried dimension data and index data are returned to the terminal.

[0139] ​The user can input relevant information on a page of the terminal, so that the terminal can generate a query request according to the relevant information, and finally the terminal can display the dimension data and the index data returned by the server on the page of the terminal.

[0140] It should be noted that when the target alias and the other alias are included in the query request, the server can return the data corresponding to the target alias and the other alias to the terminal after statistics, and the terminal displays. For example, as shown in Figure 7 PV indicates Page View, that is, PV represents the page view or click volume.

[0141] As can be seen from the above, in the embodiment of the application, the target offline data corresponding to the target time interval is first obtained from the data warehouse. Then the target offline data is stored in the preset temporary storage address, and the target real-time data in the target original storage address is deleted. Then the target relationship between the preset temporary storage address and the target time interval is generated. Finally, if the query request is received before the target offline data is stored in the preset temporary storage address is completed, the target real-time data corresponding to the target time interval is queried in the target original storage address through the initial relationship between the query request and the target original storage address and the target time interval, and if the query request is received after the target offline data is stored in the preset temporary storage address is completed, the target offline data corresponding to the target time interval is queried in the preset temporary storage address through the target relationship.

[0142] That is, in the embodiment of the application, the target offline data of the target time interval obtained is stored in the preset temporary storage address, without deleting the target real-time data of the target time interval in the target original storage address and then storing the target offline data in the target original storage address, so that before the target offline data is stored in the preset temporary storage address is completed, the target real-time data corresponding to the target time interval can be queried in the target original storage address through the initial relationship between the query request and the target original storage address and the target time interval, so that the data found is complete, thereby avoiding the case that the data found is incomplete when the target real-time data in the original address is deleted and before the target offline data is stored in the target original storage address and in the process of storing the target offline data in the target original storage address.

[0143] And, when the target offline data storage is completed, the target real-time data in the target original storage address is deleted, and a target relationship between the preset temporary storage address and the target time interval is generated, so that the target offline data corresponding to the target time interval can be queried in the preset temporary storage address through the query request and the target relationship, and the target real-time data and the target offline data of the target time interval can be seamlessly switched, so that all data before the target time interval to the target time interval can be found, that is, the integrity and availability of the found data are ensured.

[0144] According to the method described in the above embodiment, the following will be further illustrated by way of example.

[0145] Please refer to Figure 8 , Figure 8 The flowchart of the data processing method provided by the embodiment of the application. The data processing method flow can include:

[0146] S801, the server acquires the target real-time data corresponding to the target time interval when detecting that the current time is the zero point of the target time interval.

[0147] The server can also acquire offline data corresponding to the day before the target time interval when detecting that the current time is the zero point of the target time interval.

[0148] S802, the server acquires the target real-time index name of the target time interval, and stores the target real-time data to the target original storage address corresponding to the target real-time index name.

[0149] The server can also acquire the temporary index name of the day before the target time interval, and then store the offline data corresponding to the day before the target time interval to the temporary storage address corresponding to the temporary index name.

[0150] S803, the server acquires the target alias of the target time interval, and associates the target alias with the target real-time index name to obtain an initial relationship.

[0151] The server can also delete the association between the real-time index name of the day before the target time interval and the alias of the day before the target time interval, and then associate the temporary index name of the day before the target time interval with the alias of the day before the target time interval.

[0152] S804, the server receives the query request sent by the terminal, and the query request includes the target alias.

[0153] It should be noted that the query request can also include the alias of other time intervals.

[0154] S805, the server finds the target real-time data of the target time interval in the target original storage address through the target alias and the initial relationship, and returns the found target real-time data to the terminal.

[0155] If the alias of the other time interval is included in the query request, the offline data of the other time interval in the temporary storage address corresponding to the other time interval can also be found through the alias of the other time interval.

[0156] S806, the server acquires the target offline data of the target time interval from the data warehouse when detecting that the current time is the zero point of the next day of the target time interval.

[0157] At this time, the server can also acquire the real-time data of the next day of the target time interval.

[0158] S807, the server acquires a preset temporary index name of the target time interval, and stores the target offline data to the preset temporary storage address corresponding to the preset temporary index name.

[0159] The server can also store the real-time data of the next day of the target time interval to the original storage address of the next day of the target time interval.

[0160] S808, the server deletes the association between the target alias and the target real-time index name based on the initial relationship, and associates the target alias with the preset temporary index name to obtain a target relationship.

[0161] The server can also associate the alias of the next day of the target time interval with the real-time index name of the next day of the target time interval.

[0162] S809, the server receives a query request sent by the terminal, and the query request includes the target alias.

[0163] It should be noted that the query request can also include the alias of the other time interval.

[0164] S8010, the server finds the target offline data of the target time interval in the preset temporary storage address through the target alias and the target relationship, and returns the found target offline data to the terminal.

[0165] If the alias of the other time interval is included in the query request, the offline data of the other time interval in the temporary storage address corresponding to the other time interval can also be found through the alias of the other time interval, or the real-time data of the other time interval in the original storage address corresponding to the other time interval can also be found through the alias of the other time interval.

[0166] In the embodiment of the present application, the target real-time data is first stored in the target original storage address, and an initial relationship between the target original storage address and the target time interval is generated, and then the obtained target offline data is stored in the preset temporary storage address, without deleting the target real-time data in the target original storage address before storing the target offline data in the target original storage address, so that the target real-time data of the target time interval can be found based on the initial relationship in the process of storing the target offline data in the preset temporary storage address, thereby ensuring that the found data is complete, and thus avoiding the case that the found data is incomplete before storing the target offline data in the target original storage address and in the process of storing the target offline data in the target original storage address.

[0167] Moreover, after the target offline data is stored, the target real-time data in the target original storage address is deleted based on the initial relationship, and a target relationship between the preset temporary storage address and the target time interval is generated, so that the target offline data corresponding to the target time interval can be queried in the preset temporary storage address through the target relationship, and the target real-time data and the target offline data of the target time interval can be seamlessly switched, thereby enabling all data before and in the target time interval to be found, i.e., ensuring the completeness and availability of the found data.

[0168] In addition, in the embodiment, the target alias is used as the index name of the target time interval, and then the target alias is associated with the target real-time index name before the target offline data of the target time interval is stored, and the target alias is associated with the preset temporary index name when the target offline data of the target time interval is stored, so that the target real-time data and the target offline data of the target time interval can be queried through the target alias, the index name of the target time interval is updated, and the index name of the target time interval does not need to be modified, thereby enabling the index to be rebuilt and the target offline data to be copied, and thus the storage space and storage time in the query database are saved.

[0169] To better implement the data processing method provided in the embodiment of the present application, the embodiment of the present application further provides a device based on the above data processing method. The meanings of the terms are the same as those in the above data processing method, and specific implementation details can be referred to the description in the method embodiment.

[0170] For example, as shown in FIG. 8, the data processing device can include: Figure 9

[0171] The obtaining module 901 is configured to obtain the target offline data corresponding to the target time interval from the data warehouse.

[0172] ​The storage module 902 is configured to store the target offline data into a preset temporary storage address, and delete the target real-time data corresponding to the target time interval in the target original storage address.

[0173] The generation module 903 is configured to generate a target relationship between the preset temporary storage address and the target time interval.

[0174] The query module 904 is configured to query the target real-time data corresponding to the target time interval in the target original storage address by the query request and an initial relationship between the target original storage address and the target time interval if the query request is received before the storage of the target offline data into the preset temporary storage address is completed, and query the target offline data corresponding to the target time interval in the preset temporary storage address by the query request and the target relationship if the query request is received after the storage of the target offline data into the preset temporary storage address is completed.

[0175] Optionally, the storage module 902 is specifically configured to perform the following steps.

[0176] Obtain a preset temporary index name.

[0177] Store the target offline data into a preset temporary storage address corresponding to the preset temporary index name.

[0178] Optionally, the storage module 902 is further configured to perform the following steps.

[0179] Obtain a target real-time index name.

[0180] Store the target real-time data into a target original storage address corresponding to the target real-time index name, and determine the index name of the target time interval according to the target real-time index name to obtain an initial relationship between the target original storage address and the target time interval.

[0181] Correspondingly, the generation module 903 is specifically configured to perform the following steps.

[0182] Generate a target relationship between the preset temporary storage address and the index name of the target time interval.

[0183] Optionally, the storage module 902 is specifically configured to perform the following steps.

[0184] Take the target real-time index name as the index name of the target time interval to obtain the initial relationship between the target original storage address and the target time interval.

[0185] Correspondingly, the generation module 903 is specifically configured to perform the following steps.

[0186] Update the index name of the target time interval from the target real-time index name to the preset temporary index name to obtain the target relationship between the preset temporary storage address and the index name of the target time interval.

[0187] Optionally, the storage module 902 is specifically configured to perform:

[0188] obtain a target alias, and take the target alias as an index name of a target time interval;

[0189] associate the target alias with a target real-time index name, to obtain an initial relationship between a target original storage address and the target time interval.

[0190] Correspondingly, the generation module 903 is specifically configured to perform:

[0191] delete the association between the target alias and the target real-time index name, and associate the target alias with a preset temporary index name, to obtain a target relationship between a preset temporary storage address and the index name of the target time interval.

[0192] Optionally, the query module 904 is specifically configured to perform:

[0193] if a query request is received before the target offline data is stored into the preset temporary storage address, and the query request includes the target alias, then according to the initial relationship between the target alias and the target time interval, the target real-time data of the target time interval is obtained from the target original storage address.

[0194] Optionally, the query module 904 is specifically configured to perform:

[0195] if a query request is received after the target offline data is stored into the preset temporary storage address, and the query request includes the target alias, then according to the target relationship, the target offline data of the target time interval is obtained from the preset temporary storage address.

[0196] In implementation, each of the above modules can be implemented as an independent entity, or can be combined as one or more entities. The specific implementation and advantages of each of the above modules can be found in the method embodiments, which will not be repeated here.

[0197] The embodiments of the present application also provide an electronic device, which can be a server or a terminal, etc. Figure 10 As shown in the figure, the structure of the electronic device is shown, and specifically:

[0198] The electronic device can include a processor 1001 with one or more processing cores, a memory 1002 with one or more computer readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art can understand that Figure 10The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and can include more or fewer components than shown, or combine certain components, or arrange different components. Among them:

[0199] The processor 1001 is the control center of the electronic device, connects various parts of the entire electronic device through various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing computer programs and / or modules stored in the memory 1002, and calling data stored in the memory 1002. Optionally, the processor 1001 can include one or more processing cores; preferably, the processor 1001 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1001.

[0200] The memory 1002 can be used to store computer programs and modules, and the processor 1001 executes various functions and data processing by running the computer programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one computer program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 1002 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1002 can also include a memory controller to provide access for the processor 1001 to the memory 1002.

[0201] The electronic device also includes a power supply 1003 for supplying power to various components, and preferably the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 1003 can also include one or more than one direct current or alternating current power supply, a recharging system, a power supply failure detection circuit, a power supply converter or inverter, a power supply state indicator, and any other components.

[0202] The electronic device can also include an input unit 1004, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0203] Although not shown, the electronic device can further include a display unit and the like, which will not be described herein. Specifically, in the present embodiment, the processor 1001 in the electronic device will load the executable file corresponding to the process of one or more computer programs into the memory 1002 according to the following instructions, and run the computer program stored in the memory 1002 by the processor 1001, thereby realizing various functions, such as:

[0204] obtaining the target offline data corresponding to the target time interval from the data warehouse;

[0205] storing the target offline data to the preset temporary storage address, and deleting the target real-time data corresponding to the target time interval stored in the target original storage address;

[0206] generating a target relationship between the preset temporary storage address and the target time interval;

[0207] if the query request is received before the target offline data is stored to the preset temporary storage address is completed, querying the target real-time data corresponding to the target time interval in the target original storage address through the query request and the initial relationship between the target original storage address and the target time interval;

[0208] if the query request is received after the target offline data is stored to the preset temporary storage address is completed, querying the target offline data corresponding to the target time interval in the preset temporary storage address through the query request and the target relationship.

[0209] The specific implementation of each operation and the corresponding beneficial effects can be referred to the detailed description of the data processing method above, which will not be described herein.

[0210] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a computer program, or by a computer program controlling related hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0211] To this end, the embodiments of the present application provide a computer readable storage medium, which stores a computer program capable of being loaded by a processor to execute the steps in any data processing method provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0212] obtaining the target offline data corresponding to the target time interval from the data warehouse;

[0213] storing the target offline data to the preset temporary storage address, and deleting the target real-time data corresponding to the target time interval stored in the target original storage address;

[0214] generate a target relationship between the preset temporary storage address and the target time interval;

[0215] If the query request is received before the target offline data is stored to the preset temporary storage address, the target real-time data corresponding to the target time interval is queried in the target original storage address through the initial relationship between the query request and the target original storage address and the target time interval.

[0216] If the query request is received after the target offline data is stored to the preset temporary storage address, the target offline data corresponding to the target time interval is queried in the preset temporary storage address through the target relationship and the query request.

[0217] The specific implementation and corresponding beneficial effects of each operation above can be referred to the foregoing embodiments, which will not be repeated here.

[0218] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0219] Due to the computer program stored in the computer readable storage medium, the steps of any one of the data processing methods provided by the embodiments of the present application can be executed, and thus the beneficial effects of any one of the data processing methods provided by the embodiments of the present application can be achieved. Details can be referred to the foregoing embodiments, which will not be repeated here.

[0220] According to an aspect of the present application, a computer program product or a computer program is provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the data processing method.

[0221] The data processing method, device, electronic device and computer readable storage medium provided by the embodiments of the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above embodiment descriptions are only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, the specific implementation manner and application range can be changed according to the idea of the present application, and the content of the specification should not be understood as a limitation of the present application.

Claims

1. A data processing method, characterized in that, include: By running offline tasks, target offline data corresponding to the target time interval is retrieved from the data warehouse. The target offline data is stored in a preset temporary storage address, and the target real-time data corresponding to the target time interval collected by running a real-time task, which is stored in the target's original storage address, is deleted. Generate the target relationship between the preset temporary storage address and the target time interval; If a query request is received before the offline data of the target is stored in a preset temporary storage address, the target real-time data corresponding to the target time interval is queried from the original storage address of the target based on the query request and the initial relationship between the original storage address of the target and the target time interval. If the query request is received after the target offline data has been stored in the preset temporary storage address, the target offline data corresponding to the target time interval is queried in the preset temporary storage address through the query request and the target relationship.

2. The data processing method according to claim 1, characterized in that, The step of storing the target offline data to a preset temporary storage address includes: Get the preset temporary index name; The target offline data is stored in the preset temporary storage address corresponding to the preset temporary index name.

3. The data processing method according to claim 1 or 2, characterized in that, Before retrieving the pre-stored target offline data corresponding to the target time interval from the data warehouse, the method further includes: Get the target real-time index name; The target real-time data is stored in the target original storage address corresponding to the target real-time index name, and the index name of the target time interval is determined according to the target real-time index name to obtain the initial relationship between the target original storage address and the target time interval; The step of generating the target relationship between the preset temporary storage address and the target time interval includes: Generate the target relationship between the preset temporary storage address and the index name of the target time interval.

4. The data processing method according to claim 3, characterized in that, The step of determining the index name of the target time interval based on the target real-time index name, and obtaining the initial relationship between the target original storage address and the target time interval, includes: Using the target real-time index name as the index name of the target time interval, the initial relationship between the target original storage address and the target time interval is obtained; The step of generating the target relationship between the preset temporary storage address and the index name of the target time interval includes: The index name of the target time interval is updated from the target real-time index name to the preset temporary index name, thereby obtaining the target relationship between the preset temporary storage address and the index name of the target time interval.

5. The data processing method according to claim 3, characterized in that, The step of determining the index name of the target time interval based on the target real-time index name, and obtaining the initial relationship between the target original storage address and the target time interval, includes: Obtain the target alias and use the target alias as the index name of the target time interval; Associating the target alias with the target real-time index name yields the initial relationship between the target's original storage address and the target's time interval; The step of generating the target relationship between the preset temporary storage address and the index name of the target time interval includes: Delete the association between the target alias and the target real-time index name, and associate the target alias with the preset temporary index name to obtain the target relationship between the preset temporary storage address and the index name of the target time interval.

6. The data processing method according to claim 5, characterized in that, If a query request is received before the offline storage of the target data to a preset temporary storage address is completed, the real-time data corresponding to the target time interval is queried from the original storage address of the target data based on the query request and the initial relationship between the original storage address of the target and the target time interval, including: If a query request is received before the offline data of the target is stored in a preset temporary storage address, and the query request includes the target alias, then the real-time data of the target within the target time interval is obtained from the original storage address of the target based on the target alias and the initial relationship.

7. The data processing method according to claim 5, characterized in that, If the query request is received after the target offline data has been stored in a preset temporary storage address, the process of querying the target offline data corresponding to the target time interval in the preset temporary storage address using the query request and the target relationship includes: If a query request is received after the target offline data has been stored in a preset temporary storage address, and the query request includes the target alias, then the target offline data for the target time interval is retrieved from the preset temporary storage address based on the target alias and the target relationship.

8. A data processing apparatus, characterized in that, include: The acquisition module is used to retrieve target offline data corresponding to the target time interval from the data warehouse by running offline tasks; The storage module is used to store the target offline data to a preset temporary storage address and delete the target real-time data corresponding to the target time interval collected by running a real-time task stored in the target's original storage address. The generation module is used to generate the target relationship between the preset temporary storage address and the target time interval; The query module is configured to, if a query request is received before the target offline data storage to the preset temporary storage address is completed, query the target real-time data corresponding to the target time interval in the target original storage address based on the query request and the initial relationship between the target original storage address and the target time interval; and if the query request is received after the target offline data storage to the preset temporary storage address is completed, query the target offline data corresponding to the target time interval in the preset temporary storage address based on the query request and the target relationship.

9. The data processing apparatus according to claim 8, characterized in that, The storage module is also used for: Get the preset temporary index name; The target offline data is stored in the preset temporary storage address corresponding to the preset temporary index name.

10. The data processing apparatus according to claim 8 or 9, characterized in that, The storage module is also used for: Get the target real-time index name; The target real-time data is stored in the target original storage address corresponding to the target real-time index name, and the index name of the target time interval is determined according to the target real-time index name to obtain the initial relationship between the target original storage address and the target time interval; The generation module is also used for: Generate the target relationship between the preset temporary storage address and the index name of the target time interval.

11. The data processing apparatus according to claim 10, characterized in that, The storage module is also used for: Using the target real-time index name as the index name of the target time interval, the initial relationship between the target original storage address and the target time interval is obtained; The generation module is used for: The index name of the target time interval is updated from the target real-time index name to the preset temporary index name, thereby obtaining the target relationship between the preset temporary storage address and the index name of the target time interval.

12. The data processing apparatus according to claim 10, characterized in that, The storage module is also used for: Obtain the target alias and use the target alias as the index name of the target time interval; Associating the target alias with the target real-time index name yields the initial relationship between the target's original storage address and the target's time interval; The generation module is used for: Delete the association between the target alias and the target real-time index name, and associate the target alias with the preset temporary index name to obtain the target relationship between the preset temporary storage address and the index name of the target time interval.

13. The data processing apparatus according to claim 12, characterized in that, The query module is also used for: If a query request is received before the offline data of the target is stored in a preset temporary storage address, and the query request includes the target alias, then the real-time data of the target within the target time interval is obtained from the original storage address of the target based on the target alias and the initial relationship.

14. The data processing apparatus according to claim 12, characterized in that, The query module is also used for: If a query request is received after the target offline data has been stored in a preset temporary storage address, and the query request includes the target alias, then the target offline data for the target time interval is retrieved from the preset temporary storage address based on the target alias and the target relationship.

15. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor running the computer program in the memory to perform the data processing method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the data processing method according to any one of claims 1 to 7.

17. A computer program product, characterized in that, The computer program product stores a computer program adapted for loading by a processor to execute the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data loading method and device, computer program product and storage medium

    CN113377777A

  • Direct broadcasting room front-end offline storage method and device and electronic equipment

    CN113760838A