A data processing method and device, computer equipment and storage medium
By operating the primary processing system and the secondary backup processing system simultaneously, the problem of data query delay during primary data system failures was resolved, enabling rapid response to data query requests and improving system availability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YOUZHUJU NETWORK TECH CO LTD
- Filing Date
- 2023-06-20
- Publication Date
- 2026-06-23
Smart Images

Figure CN116737772B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and in particular, to a data processing method and device, computer equipment and storage medium. BACKGROUND
[0002] With the increasing amount of data, in the field of data query, in order to improve the high availability of data query, generally, the data query system will be backed up, that is, a set of main data system and a set of backup data system will be deployed, when the main data system fails, the backup data system is started for data processing and query. However, in this method, it may take a lot of time to start the backup data processing system, which may result in the inability to query data in time. SUMMARY
[0003] The present disclosure provides at least a data processing method, device, computer equipment and storage medium.
[0004] In a first aspect, the present disclosure provides a data processing method, comprising:
[0005] Obtaining user interaction data to be processed;
[0006] Inputting the user interaction data into a first main processing system and a second backup processing system to process the user interaction data through the first main processing system and the second backup processing system, wherein the first logic code of the first main processing system comprises the second logic code of the second backup processing system;
[0007] After receiving a data query request, obtaining target data corresponding to the data query request from the second backup processing system in the case that the first main processing system is detected to have a fault.
[0008] In a possible implementation, the detection of the fault of the first main processing system comprises:
[0009] The data cannot be obtained from the first main processing system, or the time length of obtaining the data from the first main processing system exceeds a preset time length, or an error instruction is received for the data obtained from the first main processing system.
[0010] In a possible implementation, the method further comprises:
[0011] After detecting that the logic code of the first main processing system is updated, updating the logic code in the second backup processing system based on the updated logic code of the first main processing system in the case that a preset update condition is met.
[0012] In a possible implementation, the preset update condition comprises:
[0013] The logic code of the first main processing system is updated, the logic code running time of the first main processing system after the update exceeds a preset time, and no failure of the first main processing system is detected.
[0014] In a possible implementation, the first main processing system and the second backup processing system process the user interaction data by the following method:
[0015] The user interaction data is processed according to a data processing method corresponding to each data index, to obtain initial data.
[0016] The initial data is aggregated according to each preset aggregation granularity, to obtain aggregated data under each preset aggregation granularity.
[0017] In a possible implementation, the preset aggregation granularity of the second backup processing system comprises at least one first aggregation granularity, the preset aggregation granularity of the first main processing system comprises the at least one first aggregation granularity and at least one second aggregation granularity, and the importance of the first aggregation granularity is higher than that of the second aggregation granularity.
[0018] In a possible implementation, the target data corresponding to the data query request is obtained from the second backup processing system in the case where the failure of the first main processing system is detected, comprising:
[0019] In the case where the failure of the first main processing system is detected and the query field of the data query request is a field under the first aggregation granularity, the target data corresponding to the data query request is obtained from the second backup processing system.
[0020] In a second aspect, the embodiments of the present disclosure further provide a data processing apparatus, comprising:
[0021] An acquisition module is configured to acquire user interaction data to be processed.
[0022] An input module is configured to input the user interaction data to a first main processing system and a second backup processing system, so as to process the user interaction data by the first main processing system and the second backup processing system simultaneously, wherein a first logic code of the first main processing system comprises a second logic code of the second backup processing system.
[0023] A query module is configured to, after receiving a data query request, obtain target data corresponding to the data query request from the second backup processing system in the case where the failure of the first main processing system is detected.
[0024] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0025] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0026] In the data processing method, apparatus, computer equipment, and storage medium provided in this disclosure, after acquiring user interaction data to be processed, the first main processing system and the second backup processing system run simultaneously and process the received user interaction data at the same time. Thus, after receiving a data query request, if a failure is detected in the first main processing system, the second backup processing system can quickly respond to the data query request because it is also running synchronously and processing the user interaction data synchronously. This solves the data delay problem when performing data queries and improves the availability of the processing system.
[0027] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0029] Figure 1 A flowchart of a data processing method provided by an embodiment of this disclosure is shown;
[0030] Figure 2 This diagram shows an overall flowchart of a data processing method provided by an embodiment of the present disclosure;
[0031] Figure 3 A schematic diagram of the architecture of a data processing apparatus provided in an embodiment of this disclosure is shown;
[0032] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0034] Research has found that in related technologies, after backing up the system, the backup data system is generally only started when the main data system fails. The backup data system takes time to start up, and after starting up, it needs to process data before it can obtain the data query results, which also takes time. Therefore, this method results in a long data delay when the main data system fails.
[0035] Based on the above research, this disclosure provides a data processing method, apparatus, computer equipment, and storage medium. After acquiring user interaction data to be processed, a first main processing system and a second backup processing system run simultaneously to process the received user interaction data. Thus, when a data query request is received and a failure is detected in the first main processing system, the second backup processing system, which is also running synchronously and processing user interaction data synchronously, can quickly respond to the data query request, thereby solving the data delay problem during data querying and improving the availability of the processing system.
[0036] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0037] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0038] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0039] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0040] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0041] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0042] To facilitate understanding of this embodiment, a data processing method disclosed in this disclosure will first be described in detail. The execution subject of the data processing method provided in this disclosure is generally a server.
[0043] See Figure 1 The diagram shown is a flowchart of a data processing method provided in an embodiment of this disclosure. The method includes steps 101 to 103, wherein:
[0044] Step 101: Obtain the user interaction data to be processed.
[0045] Step 102: Input the user interaction data into the first main processing system and the second backup processing system, so that the user interaction data can be processed simultaneously by the first main processing system and the second backup processing system, wherein the first logic code of the first main processing system includes the second logic code of the second backup processing system.
[0046] Step 103: After receiving the data query request, if a fault is detected in the first main processing system, the target data corresponding to the data query request is obtained from the second backup processing system.
[0047] The following is a detailed explanation of the steps described above.
[0048] Regarding step 101,
[0049] The user interaction data to be processed can be interaction data generated by multiple online users of an application or platform, or interaction data generated within a specific time interval, such as interaction data within a preset time range before the current moment.
[0050] The user interaction data can refer to specific interaction data used for data analysis, such as user viewing data, click data, download data, etc. Different data processing systems may acquire different user interaction data, and the specific type of user interaction data acquired can be set according to the actual situation.
[0051] Regarding step 102,
[0052] In one possible implementation, the first main processing system and the second backup processing system can be processing systems deployed on different devices. For example, the first main processing system can be deployed in data center A, and the second backup processing system can be deployed in data center B. When the first main processing system and the second backup processing system are processing data, they do not affect or disturb each other.
[0053] The logic code can refer to the code that the processing system needs to run when processing data. The first logic code of the first main processing system includes the second logic code of the second backup processing system. Optionally, the first main logic code of the first main processing system can be completely identical to the second logic code of the second backup processing system; or, the second logic code of the second backup processing system can be a portion of the first logic code of the first main processing system.
[0054] In one optional implementation, when the second logic code of the second backup processing system is a portion of the first logic code of the first main processing system, the second logic code may be automatically synchronized from the first logic code. Specifically, which code from the first logic code is synchronized to the second backup processing system as the second logic code may be related to the specific processing task.
[0055] Specifically, after the user interaction data to be processed is input into the first main processing system and the second backup processing system respectively, the first main processing system and the second backup processing system can process the user interaction data according to the following methods:
[0056] Step a1: Process the user interaction data according to the data processing method corresponding to each data indicator to obtain the initial data.
[0057] Step a2: Aggregate the initial data according to each preset aggregation dimension to obtain aggregated data under each preset aggregation dimension.
[0058] The data metrics can refer to standards used to measure business or product performance, such as click count, completion count, and share count. Different data metrics may require different data processing methods.
[0059] For example, for the data metric of "play count," the corresponding data processing method could be: a playback time exceeding 3 seconds is considered a single playback. Therefore, when preprocessing the user interaction data for the play count data metric, the playback duration of each user interaction data entry can be determined. If the playback duration exceeds 3 seconds, the play count of that user interaction data entry can be marked as 1; otherwise, the play count of that user interaction data entry can be marked as 0.
[0060] In one possible implementation, in order to improve the stability of the processing system, the processing of the above-mentioned data indicators (i.e., the process of processing user interaction data according to the corresponding data processing method) can be executed through multiple task queues in the first main processing system.
[0061] For example, the plurality of task queues may include queue 1 and queue 2. Queue 1 can be used to process data indicators with an importance higher than a first preset value, and queue 2 can be used to process data indicators with an importance less than or equal to the first preset value. The importance of each data indicator can be preset.
[0062] In one possible implementation, each preset aggregation granularity may include multiple high-frequency query fields, and the aggregation of the initial data according to each preset aggregation granularity may refer to the aggregation of the initial data according to the high-frequency query fields under each preset aggregation granularity.
[0063] The query fields include query dimensions and query metrics. The query metrics can be a specific data indicator, and the query dimensions can be dimensions used to limit the query fields. For example, they can include the attribute information of the user corresponding to the data to be filtered, or they can include the attribute information of the data to be filtered (such as the data generation time).
[0064] It should be noted that the user's attribute information mentioned above was obtained with the user's legal authorization, such as during the user's registration.
[0065] In one possible implementation, the preset aggregation granularity of the second backup processing system includes at least one first aggregation granularity, and the preset aggregation granularity of the first main processing system includes the at least one first aggregation granularity and at least one second aggregation granularity, wherein the importance of the first aggregation granularity is higher than that of the second aggregation granularity.
[0066] Here, the importance of each aggregation granularity can be preset, or the importance of each aggregation granularity can be set based on the user's search frequency. Fields with high search frequency have higher importance in their aggregation granularity, while fields with low search frequency have lower importance in their aggregation granularity.
[0067] Accordingly, when synchronizing the first logic code to the second backup processing system, the logic code corresponding to the second aggregation granularity can be used as the second logic code and synchronized to the second backup processing system.
[0068] In practical applications, the importance of each aggregation granularity can change with the user's search frequency. Therefore, the logic code of the second backup processing system also does not need to be static; that is, the second logic code of the second backup processing system can also change with the search frequency of the fields of each aggregation granularity. For example, the logic code corresponding to the top N aggregation granularities in importance can be synchronized to the second backup processing system as the second logic code. As the user's search frequency changes, if the top N aggregation granularities in importance change, the logic code of the second backup system can be updated accordingly based on the updated logic code of the top N aggregation granularities.
[0069] In another possible implementation, in order to improve the aggregation efficiency of each aggregation granularity, the user interaction data can be processed according to the data processing method corresponding to each data indicator to obtain the initial data. Then, the initial data can be pre-aggregated according to the minimum preset aggregation granularity. Then, the data can be re-aggregated according to each preset aggregation granularity based on the pre-aggregated initial data to obtain the aggregated data at each preset aggregation granularity.
[0070] The minimum preset polymerization particle size can be any particle size smaller than the preset polymerization particle size.
[0071] It should be noted that since the first primary processing system and the second backup processing system are deployed in different locations, their parameter configuration files are different.
[0072] In one possible scenario, the processing system's functionality may be updated. However, after deployment, the updated functionality might conflict with other components of the processing system, or the logic code for the new functionality might itself be problematic. Therefore, deploying the logic code for the updated functionality to the processing system could cause it to malfunction. If the updated logic code is deployed to both the first primary processing system and the second backup processing system simultaneously, both systems may fail, resulting in the inability to perform data queries.
[0073] Since the logic code of the second backup processing system is automatically synchronized from the first logic code of the first main processing system, this disclosure provides an optional implementation scheme in which, after detecting that the logic code of the first main processing system has been updated, the logic code in the second backup processing system is updated based on the updated logic code of the first main processing system, provided that preset update conditions are met.
[0074] Here, the preset update conditions may include the following: the execution time of the updated logic code of the first main processing system exceeds a preset time, and no fault is detected in the first main processing system.
[0075] The purpose of setting the update conditions in this way is to ensure that the updated logic code can run normally after the first main processing system has been running for a period of time. Therefore, updating the updated logic code to the second backup processing system under these circumstances can reduce the probability of the second backup processing system failing, thereby ensuring the high availability of the processing system.
[0076] Regarding step 103,
[0077] In one possible implementation, detecting a fault in the first main processing system may include: being unable to obtain data from the first main processing system, or the time taken to obtain data from the first main processing system exceeding a preset time, or receiving an error instruction regarding the data obtained from the first main processing system.
[0078] Here, "unable to obtain data from the first main processing system" can mean that the data obtained from the first main processing system is empty; "the time taken to obtain data from the first main processing system exceeds a preset time" can mean that the time interval between the moment the data acquisition request is sent to the first main processing system and the moment the data returned by the first main processing system is received exceeds the preset time.
[0079] The receipt of a data error instruction can refer to receiving an error instruction from the user terminal. In practical applications, the error instruction from a single user may be inaccurate. Therefore, the receipt of an error instruction for data obtained from the first main processing system can refer to receiving more than K error instructions for data obtained from the first main processing system within a preset time period, where K is a preset positive integer.
[0080] In this way, when monitoring the operation of the first main processing system, feedback from the user end is taken into account, which prevents the processing logic of the first main processing system from malfunctioning. It also facilitates timely switching to the second backup processing system when the first main processing system fails, thereby improving data reliability.
[0081] Continuing from step 102, if the preset aggregation granularity of the first main processing system includes at least one first aggregation granularity included in the second backup processing system and at least one second aggregation granularity not included in the second backup processing system, the purpose of switching to the second backup processing system in the event of a failure of the first main processing system is to obtain data from the second backup processing system. If the second backup processing system itself does not contain the data included in the data query request, then even if a system switch is performed, the data cannot be obtained.
[0082] Therefore, when a fault is detected in the first main processing system, the target data corresponding to the data query request can be obtained from the second backup processing system only after a fault is detected in the first main processing system and the query field of the data query request is a field under the first aggregation granularity.
[0083] If the query field in the data query request is not a field under the first aggregation granularity, then an indication message indicating a system failure can be directly fed back to prompt the user to query later. For example, the user can be sent the indication message "System failure, please query later".
[0084] Optionally, the query priorities of the first primary processing system and the second backup processing system can be preset. When the first primary processing system is functioning correctly, its query priority is higher than that of the second backup processing system. Upon receiving any data query request, the query can be performed from the first primary processing system, which has the higher query priority. If a fault is detected in the first primary processing system, its query priority can be adjusted to be lower than that of the second backup processing system. Upon receiving any data query request, the query can then be performed directly from the second backup processing system, which has the higher query priority.
[0085] In one possible implementation, upon detecting a fault in the first main processing system, a fault message can be sent to a target user terminal to prompt prompt maintenance of the first main processing system. The target user terminal may, for example, refer to an operations and maintenance user terminal.
[0086] The overall flow of the above data processing method is described below with reference to a specific flowchart. (See also...) Figure 2 The diagram shown is an overall flowchart of a data processing method provided in an embodiment of this disclosure, including:
[0087] After acquiring user interaction data, the user interaction data is input into the first main processing system and the second backup processing system respectively.
[0088] The first main processing system and the second backup processing system can first process the user interaction data according to the data processing method corresponding to each data indicator (i.e., the data indicator processing shown in the figure) to obtain initial data, and then input the initial data into each aggregation module after pre-aggregating it according to the smallest aggregation granularity.
[0089] Each aggregation module is used to execute the corresponding aggregation task. The first main processing system includes granularity 1 aggregation task, granularity 2 aggregation task, granularity 3 aggregation task, and granularity 4 aggregation task. The second backup processing system includes granularity 1 aggregation task, granularity 2 aggregation task, and granularity 3 aggregation task. After each aggregation task is completed, it can have a separate storage module for data storage.
[0090] Multiple query platforms (i.e., Platform 1, Platform 2, Platform 3, and Platform 4 in the diagram) can query data from the storage module through a unified query service, and can determine whether to obtain data from the first main processing system or the second backup processing system through a judgment module.
[0091] For a detailed description of the above steps, please refer to [link / reference]. Figure 1 Detailed information will not be elaborated here.
[0092] It should be noted that the aforementioned processing system can be a system with high real-time requirements, such as an advertising data processing system. Users need to adjust their advertising plans based on real-time data. Therefore, the second backup processing system needs to run synchronously with the first main processing system to ensure high availability and low latency. The above method is also applicable to other applications with high real-time requirements, and this disclosure is not limiting.
[0093] In the data processing method provided in this disclosure, after acquiring the user interaction data to be processed, the first main processing system and the second backup processing system run simultaneously and process the received user interaction data at the same time. In this way, after receiving a data query request, if a failure is detected in the first main processing system, the second backup processing system can quickly respond to the data query request because it is also running synchronously and processing the user interaction data synchronously. This solves the data delay problem when performing data queries and improves the availability of the processing system.
[0094] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0095] Based on the same inventive concept, this disclosure also provides a data processing device corresponding to the data processing method. Since the principle of the device in this disclosure for solving the problem is similar to that of the data processing method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0096] Reference Figure 3 The diagram shown is an architectural schematic of a data processing device provided in an embodiment of this disclosure. The device includes: an acquisition module 301, an input module 302, and a query module 303; wherein,
[0097] The acquisition module 301 is used to acquire user interaction data to be processed.
[0098] The input module 302 is used to input the user interaction data to the first main processing system and the second backup processing system, so that the user interaction data can be processed simultaneously by the first main processing system and the second backup processing system, wherein the first logic code of the first main processing system includes the second logic code of the second backup processing system.
[0099] The query module 303 is used to obtain the target data corresponding to the data query request from the second backup processing system after receiving the data query request and in the event that a fault is detected in the first main processing system.
[0100] In one possible implementation, detecting a fault in the first main processing system includes:
[0101] Unable to obtain data from the first main processing system, or the time taken to obtain data from the first main processing system exceeds a preset time, or an error instruction is received regarding the data obtained from the first main processing system.
[0102] In one possible implementation, the device further includes an update module 304, configured to:
[0103] After detecting that the logic code of the first main processing system has been updated, and if the preset update conditions are met, the logic code in the second backup processing system is updated based on the updated logic code of the first main processing system.
[0104] In one possible implementation, the preset update conditions include:
[0105] The updated logic code of the first main processing system ran for longer than a preset time, and no fault was detected in the first main processing system.
[0106] In one possible implementation, the first main processing system and the second backup processing system process the user interaction data using the following method:
[0107] The user interaction data is processed according to the data processing methods corresponding to each data indicator to obtain initial data;
[0108] The initial data is aggregated according to each preset aggregation granularity to obtain aggregated data at each preset aggregation granularity.
[0109] In one possible implementation, the preset aggregation granularity of the second backup processing system includes at least one first aggregation granularity, and the preset aggregation granularity of the first main processing system includes the at least one first aggregation granularity and at least one second aggregation granularity, wherein the importance of the first aggregation granularity is higher than that of the second aggregation granularity.
[0110] In one possible implementation, when a fault is detected in the first main processing system, the query module 303, when obtaining the target data corresponding to the data query request from the second backup processing system, is used to:
[0111] If a fault is detected in the first main processing system and the query field of the data query request is a field under the first aggregation granularity, the target data corresponding to the data query request is obtained from the second backup processing system.
[0112] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0113] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 4 The diagram shows the structure of a computer device 400 provided in this embodiment, including a processor 401, a memory 402, and a bus 403. The memory 402 stores execution instructions and includes main memory 4021 and external memory 4022. The main memory 4021, also called internal memory, is used to temporarily store computational data in the processor 401 and data exchanged with external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the main memory 4021. When the computer device 400 is running, the processor 401 and the memory 402 communicate through the bus 403, causing the processor 401 to execute the following instructions:
[0114] Acquire user interaction data to be processed;
[0115] The user interaction data is input to a first main processing system and a second backup processing system so that the user interaction data can be processed simultaneously by the first main processing system and the second backup processing system. The first logic code of the first main processing system includes the second logic code of the second backup processing system.
[0116] Upon receiving a data query request, if a fault is detected in the first main processing system, the target data corresponding to the data query request is obtained from the second backup processing system.
[0117] In one possible implementation, the instruction executed by processor 401, wherein detecting a fault in the first main processing system includes:
[0118] Unable to obtain data from the first main processing system, or the time taken to obtain data from the first main processing system exceeds a preset time, or an error instruction is received regarding the data obtained from the first main processing system.
[0119] In one possible implementation, the method further includes the following instructions executed by processor 401:
[0120] After detecting that the logic code of the first main processing system has been updated, and if the preset update conditions are met, the logic code in the second backup processing system is updated based on the updated logic code of the first main processing system.
[0121] In one possible implementation, the preset update conditions in the instructions executed by processor 401 include:
[0122] The updated logic code of the first main processing system ran for longer than a preset time, and no fault was detected in the first main processing system.
[0123] In one possible implementation, the instructions executed by processor 401 involve the first main processing system and the second backup processing system processing the user interaction data using the following method:
[0124] The user interaction data is processed according to the data processing methods corresponding to each data indicator to obtain initial data;
[0125] The initial data is aggregated according to each preset aggregation granularity to obtain aggregated data at each preset aggregation granularity.
[0126] In one possible implementation, the instructions executed by the processor 401 include a preset aggregation granularity of at least one first aggregation granularity, and the preset aggregation granularity of the first main processing system includes the at least one first aggregation granularity and at least one second aggregation granularity, wherein the first aggregation granularity is more important than the second aggregation granularity.
[0127] In one possible implementation, the instructions executed by processor 401, wherein obtaining the target data corresponding to the data query request from the second backup processing system when a failure is detected in the first main processing system, includes:
[0128] If a fault is detected in the first main processing system and the query field of the data query request is a field under the first aggregation granularity, the target data corresponding to the data query request is obtained from the second backup processing system.
[0129] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the data processing method described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0130] This disclosure also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the data processing method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0131] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0133] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0134] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0135] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0136] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A data processing method, characterized in that, include: Acquire user interaction data to be processed; The user interaction data is input to a first main processing system and a second backup processing system so that the user interaction data can be processed simultaneously by the first main processing system and the second backup processing system. The first logic code of the first main processing system includes the second logic code of the second backup processing system. The logic code refers to the code that the processing system needs to run when processing data. The second logic code is the code that is automatically synchronized from the first logic code to the second backup processing system. Upon receiving a data query request, if a fault is detected in the first main processing system, the target data corresponding to the data query request is obtained from the second backup processing system.
2. The method according to claim 1, characterized in that, The detection of a fault in the first main processing system includes: Unable to obtain data from the first main processing system, or the time taken to obtain data from the first main processing system exceeds a preset time, or an error instruction is received regarding the data obtained from the first main processing system.
3. The method according to claim 1, characterized in that, The method further includes: After detecting that the logic code of the first main processing system has been updated, and if the preset update conditions are met, the logic code in the second backup processing system is updated based on the updated logic code of the first main processing system.
4. The method according to claim 3, characterized in that, The preset update conditions include: The updated logic code of the first main processing system ran for longer than a preset time, and no fault was detected in the first main processing system.
5. The method according to claim 1, characterized in that, The first primary processing system and the second backup processing system process the user interaction data using the following methods: The user interaction data is processed according to the data processing methods corresponding to each data indicator to obtain initial data; The initial data is aggregated according to each preset aggregation granularity to obtain aggregated data at each preset aggregation granularity.
6. The method according to claim 5, characterized in that, The preset aggregation granularity of the second backup processing system includes at least one first aggregation granularity, and the preset aggregation granularity of the first main processing system includes the at least one first aggregation granularity and at least one second aggregation granularity, wherein the importance of the first aggregation granularity is higher than that of the second aggregation granularity.
7. The method according to claim 6, characterized in that, The step of obtaining the target data corresponding to the data query request from the second backup processing system when a failure is detected in the first main processing system includes: If a fault is detected in the first main processing system and the query field of the data query request is a field under the first aggregation granularity, the target data corresponding to the data query request is obtained from the second backup processing system.
8. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire user interaction data to be processed. An input module is used to input the user interaction data into a first main processing system and a second backup processing system, so that the user interaction data can be processed simultaneously by the first main processing system and the second backup processing system. The first logic code of the first main processing system includes the second logic code of the second backup processing system. The logic code refers to the code that the processing system needs to run when processing data. The second logic code is the code that is automatically synchronized from the first logic code to the second backup processing system. The query module is used to obtain the target data corresponding to the data query request from the second backup processing system after receiving a data query request and in the event that a failure is detected in the first main processing system.
9. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and the processor communicates with the memory via the bus when the computer device is running, and the machine-readable instructions, when executed by the processor, perform the steps of the data processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the data processing method as described in any one of claims 1 to 7.