Business data processing method and device, electronic equipment and storage medium
By sending data retrieval messages to the target database according to the data type through a real-time data processing engine, and receiving and aggregating the data, the problem of high resource consumption in existing technologies is solved, and efficient business data processing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-04-10
AI Technical Summary
Existing OLAP processing methods based on Flink's window functions suffer from waiting issues when acquiring data within a time window, resulting in excessively high resource consumption.
The data type of the first business data is obtained through the real-time data processing engine, a data acquisition message is sent to the target database, the data is generated with reference to the data processing cycle, the second business data obtained by the target database based on the data processing cycle is received, and the first and second business data are aggregated to generate the target business data.
This reduces waiting time during data processing, effectively lowers the resource consumption rate of business data, and ensures the effectiveness of business data processing.
Smart Images

Figure CN115640319B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of big data processing, and particularly relates to a business data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the technical field of big data processing, on line analytic processing (OLAP) plays an important role in business data processing tasks in various industries. With the popularization of real-time data processing methods, OLAP processing methods based on real-time data processing engine Flink have also become a necessary part of business data processing in various industries.
[0003] In related technologies, OLAP processing of business data is usually implemented based on the window function of Flink, that is, a time window can be set in advance, and then all data contained in the time window is obtained, and OLAP processing is performed on all data contained in the time window.
[0004] In this way, in the process of obtaining all data contained in the time window, there will be a phenomenon of waiting for data, so that the occupancy rate of data on resources is too high. SUMMARY
[0005] The present disclosure provides a business data processing method and device, electronic equipment and storage medium, which aims to at least solve one of the technical problems in the related art.
[0006] The first aspect embodiment of the present disclosure provides a business data processing method, which is executed by a real-time data processing engine, and includes: obtaining first business data, and sending a data acquisition message to a target database according to the data type of the first business data, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined by the data type, second business data sent by the target database is received, wherein the second business data is obtained by the target database based on the data processing period, and the first business data and the second business data are aggregated to obtain target business data.
[0007] The second aspect embodiment of the present disclosure provides a business data processing method, which is executed by a target database, and includes: receiving a data acquisition message sent by a real-time data processing engine, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined by the data type of the first business data; obtaining second business data according to the data acquisition message; and sending the second business data to the real-time data processing engine.
[0008] The third aspect of the present disclosure provides a business data processing apparatus, comprising: a first obtaining module configured to obtain first business data; a first sending module configured to send a data obtaining message to a target database according to a data type of the first business data, wherein the data obtaining message is generated according to a data processing period, and the data processing period is determined by the data type; a first receiving module configured to receive second business data sent by the target database, wherein the second business data is obtained by the target database based on the data processing period; and an aggregating module configured to aggregate the first business data and the second business data to obtain target business data.
[0009] The fourth aspect of the present disclosure provides a business data processing apparatus, comprising: a third receiving module configured to receive a data obtaining message sent by a real-time data processing engine, wherein the data obtaining message is generated according to a data processing period, and the data processing period is determined by a data type of first business data; a querying module configured to obtain second business data according to the data obtaining message; and a sixth sending module configured to send the second business data to the real-time data processing engine.
[0010] The fifth aspect of the present disclosure provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the business data processing method of the first aspect of the present disclosure, or implement the business data processing method of the second aspect of the present disclosure.
[0011] The sixth aspect of the present disclosure provides a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the business data processing method of the first aspect of the present disclosure, or implement the business data processing method of the second aspect of the present disclosure.
[0012] The seventh aspect of the present disclosure provides a computer program product, comprising a computer program, characterized in that the computer program is executed by the processor to implement the business data processing method of the first aspect of the present disclosure, or implement the business data processing method of the second aspect of the present disclosure.
[0013] In the first aspect of the present disclosure, the first business data is acquired, and a data acquisition message is sent to a target database according to a data type of the first business data, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined by the data type, second business data sent by the target database is received, wherein the second business data is obtained by the target database based on the data processing period, and the first business data and the second business data are aggregated to obtain target business data. Since the first business data and the second business data saved in the target database are aggregated, the occurrence of business data waiting in the data processing process can be reduced, so that the business data processing effect can be effectively guaranteed, and the resource occupancy rate of the business data can be effectively reduced.
[0014] In the second aspect of the present disclosure, a data acquisition message sent by a real-time data processing engine is received, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined by a data type of first business data, second business data is obtained according to the data acquisition message, and the second business data is sent to the real-time data processing engine. Since the second business data is obtained according to the data acquisition message sent by the real-time data processing engine, the business data processing demand of the real-time data processing engine can be effectively met when the second business data is provided to the real-time data processing engine, and since the data acquisition message is generated with reference to the data processing period, the data processing period is determined by the data type of the first business data, so that the second business data provided by the target database can be adapted to the first business data currently processed by the real-time data processing engine.
[0015] The additional aspects and advantages of the present disclosure will be partially given in the following description, partially will become obvious from the following description, or will be understood by the practice of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0016] The above and / or additional aspects and advantages of the present disclosure will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
[0017] Figure 1 is a flowchart of a business data processing method according to the first embodiment of the present disclosure;
[0018] Figure 2 is a flowchart of a business data processing method according to the second embodiment of the present disclosure;
[0019] Figure 3 is a flowchart of a business data processing method according to the third embodiment of the present disclosure;
[0020] Figure 4This is a schematic flowchart of a business data processing method according to the fourth embodiment of this disclosure;
[0021] Figure 5 This is a flowchart illustrating a business data processing method according to the fifth embodiment of this disclosure;
[0022] Figure 6 This is a schematic diagram of the structure of a business data processing apparatus according to an embodiment of the present disclosure;
[0023] Figure 7 This is a schematic diagram of the structure of a business data processing apparatus according to another embodiment of the present disclosure;
[0024] Figure 8 This is a schematic diagram of the structure of a business data processing apparatus according to an embodiment of the present disclosure;
[0025] Figure 9 This is a schematic diagram of the structure of a business data processing apparatus according to another embodiment of the present disclosure;
[0026] Figure 10 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0027] Embodiments of this disclosure are described in detail below, with examples of embodiments illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0028] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the relevant provisions of national laws and regulations and do not violate public order and good morals.
[0029] It should be noted that the execution subject of the business data processing method in this embodiment can be a business data processing device, which can be implemented by software and / or hardware. The device can be configured in an electronic device, which may include, but is not limited to, a terminal, a server, etc.
[0030] Figure 1 This is a flowchart illustrating a business data processing method according to the first embodiment of this disclosure, such as... Figure 1 As shown, the method includes:
[0031] S101: Obtain the first business data.
[0032] The business data processing method described in the embodiments of the present disclosure can be executed by a real-time data processing engine, which can be, for example, a Flink engine, and the like, without limitation.
[0033] In the embodiments of the present disclosure, since the business data processing method is executed by a real-time data processing engine, the safety of stream data processing can be ensured based on the check point mechanism of the real-time data processing engine, and the possibility of data loss is greatly reduced and the accuracy of one-time calculation is improved.
[0034] In the initial stage of the execution of the business data processing method, the obtained business data can be referred to as first business data, which can be, for example, account data, transaction data, purchase data, and the like, without limitation.
[0035] In some embodiments, the first business data can be obtained by the business data processing apparatus pre-providing a corresponding data transmission interface, receiving corresponding business data via the data transmission interface, and taking the business data as the first business data, or the first business data can be obtained by establishing a data transmission channel between the business data processing apparatus and a third-party business platform, and obtaining corresponding business data as the first business data via the data transmission channel in response to the third-party business platform generating the corresponding business data, without limitation.
[0036] S102: According to the data type of the first business data, a data acquisition message is sent to a target database, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type.
[0037] In the embodiments of the present disclosure, the first business data can be divided into different data types according to different data division dimensions, such as transaction data type and purchase data type, without limitation.
[0038] In the embodiments of the present disclosure, after obtaining the first business data, the real-time data processing engine can send a data acquisition message to the target database according to the data type of the first business data.
[0039] The target database can be, for example, a Remote Dictionary Server (Redis), without limitation.
[0040] The data acquisition message can be used to obtain data corresponding to the first business data from the target database, and the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type.
[0041] The data processing period can be configured for the first service data of different data types, and the data processing period can be used to describe the processing period of the corresponding first service data. That is, the data processing period of each data type of first service data can be configured in advance, and the service data processing method described in the embodiments of the present disclosure can be triggered in response to the processing waiting time of the corresponding first service data meeting the data processing period. There is no limitation to this.
[0042] That is, in the embodiments of the present disclosure, the real-time data processing engine can generate a corresponding waiting data acquisition message according to the data processing period, and then send the corresponding data acquisition message to the target database and acquire the corresponding data from the target database based on the data acquisition message. For details, see the subsequent embodiments, which will not be repeated here.
[0043] In some embodiments, according to the data type of the first service data, the data acquisition message can be sent to the target database. After obtaining the first service data, the corresponding data acquisition message can be generated according to the data type of the first data, and then the data acquisition message can be sent to the target database based on the data transmission path between the real-time data processing engine and the target database. There is no limitation to this.
[0044] In other embodiments, according to the data type of the first service data, the data acquisition message can be sent to the target database. After obtaining the first service data, the data acquisition message can be identified by using the data type, and then the real-time data processing engine can send the identified data acquisition message to the target database. Alternatively, any other possible method can be used to send the data acquisition message to the target database according to the data type of the first service data. There is no limitation to this.
[0045] S103: Receive the second service data sent by the target database, wherein the second service data is obtained by the target database based on the data processing period.
[0046] The service data obtained by the real-time data processing engine from the target database based on the data acquisition message can be referred to as second service data. The second service data can be service data processed based on the first service data, or the second service data can be other real-time service data obtained by the real-time data processing engine. There is no limitation to this.
[0047] In some embodiments, the second service data sent by the target database can be received via a data transmission path between the real-time data processing engine and the target database, or the second service data sent by the target database can also be received via a data transmission interface configured in advance for the service data processing apparatus, and no limitation is made in this regard.
[0048] S104: aggregate the first service data and the second service data to obtain target service data.
[0049] After obtaining the first service data and the second service data corresponding to the first service data from the target database according to the data type of the first service data, the embodiments of the present disclosure can perform aggregation processing on the first service data and the second service data, and use the service data obtained by the foregoing aggregation as target service data.
[0050] In some embodiments, the aggregation of the first service data and the second service data can be performed by calling a corresponding aggregation function by the real-time data processing engine, and using the aggregation function to aggregate the first service data and the second service data to obtain target service data, or the aggregation of the first service data and the second service data can also be performed by accumulating the first service data and the second service data by the real-time data processing engine, and using the accumulated data as target service data, and no limitation is made in this regard.
[0051] In the embodiments of the present disclosure, by the cooperation of the real-time data processing engine and the target database, the target service data processed by the real-time data processing engine is stored in the target database, which can effectively reduce the risk of data loss, and the target service data stored in the target database can be modified based on a third-party database management tool or a database command, thereby effectively reducing the low threshold of business error repair and making the business data processing error source traceable.
[0052] In the embodiments of the present disclosure, by obtaining the first service data, sending a data acquisition message to the target database according to the data type of the first service data, wherein the data acquisition message is generated with reference to a data processing period determined by the data type, receiving the second service data sent by the target database, wherein the second service data is obtained by the target database based on the data processing period, and aggregating the first service data and the second service data to obtain target service data, since the first service data and the second service data saved in the target database are aggregated, the occurrence of service data waiting during data processing can be reduced, thereby effectively reducing the resource occupancy rate of service data while effectively ensuring the service data processing effect.
[0053] Figure 2 is a flowchart of a service data processing method according to a second embodiment of the present disclosure, as shown in the figure, the method comprises: Figure 2
[0054] S201: Obtain first service data.
[0055] The description of S201 can be specifically referred to the above embodiments, which will not be repeated here.
[0056] S202: Determine the acquisition time information of the first service data.
[0057] The information used to describe the acquisition time of the first service, i.e., the acquisition time information, can be specifically, for example, the acquisition timestamp of the first service data, which is not limited.
[0058] To determine the acquisition time information of the first service data, the acquisition timestamp of the first service data can be determined when the real-time data processing engine acquires the first service data, and the determined acquisition timestamp of the first service data is used as the acquisition time information, which is not limited.
[0059] S203: Generate a data storage message according to the data processing period and the acquisition time information.
[0060] The data storage message is used to store the target service data to the target database.
[0061] In the embodiments of the present disclosure, after determining the acquisition time information of the first service data, a data storage message for storing the target service data can be generated according to the data processing period and the acquisition time information of the first service data, and then the target service data can be stored based on the data storage message. For details, please refer to the subsequent embodiments, which will not be repeated here.
[0062] In some embodiments, generating a data storage message according to the data processing period and the acquisition time information can be to analyze and process the data processing period and the acquisition time information to obtain the corresponding analysis processing effect, and then the corresponding data storage message can be generated based on the analysis processing effect obtained by the analysis.
[0063] In other embodiments, generating a data storage message according to the data processing period and the acquisition time information can also be to splice the data processing period and the acquisition time information (acquisition timestamp), and use the identifier obtained by the splicing to identify the data storage message, so as to generate the data storage message according to the data processing period and the acquisition time information, which is not limited.
[0064] Optionally, in some embodiments, a data storage message is generated based on the data processing cycle and acquisition time information, the source identifier of the data source to which the first business data belongs is obtained, and an index item for the target business data is generated based on the source identifier, data processing cycle, and acquisition time information. A data storage message is also generated based on the target business data and the index item. The data storage message is used to store the target business data in the target database based on the index item. Since the data storage message is generated with reference to the source identifier of the data source to which the first business data belongs, the data processing cycle, and the acquisition time information, the storage of the corresponding target business data can be triggered based on the data storage message, and better data storage support can be provided to the target database when the data storage message is sent to the target database.
[0065] The source identifier can be used to identify the data source to which the first business data belongs. The source identifier can be, for example, the business data platform name, the business data platform number, etc., and there are no restrictions on this.
[0066] The index item can be used to index the target business data stored in the target database. Specifically, the index item can be, for example, a key in the key-value database (target database), without any restrictions.
[0067] In other words, in this embodiment of the disclosure, the name of the data platform to which the first business data belongs can be determined, and the name of the business data platform determined above can be used as the source identifier of the data source. Then, an index item of the target business data can be generated according to the source identifier, the data processing cycle, and the acquisition time information. A data storage message can be generated according to the target business data and the index item. Then, the index item and the corresponding target business data can be associated and stored in the target database based on the data storage message. For details, please refer to the following embodiments, which will not be repeated here.
[0068] In some embodiments, an index item for the target business data is generated based on the source identifier, data processing cycle, and acquisition time information. This can be achieved by obfuscating the source identifier, data processing cycle, and acquisition time information, and using the obfuscated identifier as the index item. There are no restrictions on this.
[0069] For example, the source identifier can be 11, the data processing period can be 2 days, and the time information to be obtained can be 20220101. Then, "11, 2, 20220101" can be obfuscated to obtain 20221101012 as an index item. There are no restrictions on this.
[0070] In other embodiments, an index item for the target business data is generated based on the source identifier, data processing cycle, and acquisition time information. Alternatively, the source identifier, data processing cycle, and acquisition time information can be concatenated together once, and the resulting identifier can be used as the index item. There are no restrictions on this.
[0071] For example, the source identifier can be 11, the data processing period can be 2 days, and the time information to be obtained can be 20220101. Then, "11, 2, 20220101" can be concatenated in sequence to get 11220220101, which can be used as an index item. There are no restrictions on this.
[0072] Optionally, in some embodiments, generating an index item for the target business data based on the source identifier, data processing cycle, and acquisition time information may involve acquiring the cycle identifier corresponding to the data processing cycle, generating a processing time identifier based on the acquisition time information and the cycle identifier, and concatenating the source identifier, cycle identifier, and processing time identifier, using the concatenated result as the index item for the target business data. This ensures that the generated index item can be used to index the uniquely corresponding target business data, avoiding the occurrence of unclear indexes for target business data due to identical index items.
[0073] The processing time identifier can be used to identify the processing time of the target business data. This processing time identifier can be, for example, the processing timestamp of the target business data, and there are no restrictions on this.
[0074] In this context, different data types of first business data can have different corresponding data processing cycles. Therefore, a unique cycle identifier can be determined for different data processing cycles. Then, during the execution of subsequent business data processing methods, the unique data processing cycle can be determined based on the cycle identifier. This cycle identifier can be, for example, a number determined for different data processing cycles, without any restrictions.
[0075] In this embodiment of the disclosure, a cycle identifier corresponding to the data processing cycle can be obtained, and a processing time identifier can be generated based on the obtained time information and the cycle identifier.
[0076] For example, assuming the data processing cycle is one day, the cycle identifier corresponding to the data processing cycle can be, for example, 01, and the time information to be obtained can be, for example, 2022.01.01.12:12. Since the data processing cycle is one day, the time information to be obtained can be processed using one day as the smallest time unit to obtain the processing time identifier (20220101), without any restrictions.
[0077] The processing time identifier is obtained, and the source identifier, the period identifier, and the processing time identifier are spliced, and the spliced result is taken as an index item of the target service data.
[0078] For example, the source identifier (01), the period identifier (01), and the processing time identifier (20220101) can be spliced, and the spliced result (010120220101) is taken as an index item of the target service data. Based on the index item (010120220101), the corresponding unique target service data in the target database can be indexed, and this is not limited.
[0079] S204: sending the data storage message and the target service data to the target database.
[0080] In the embodiment of the disclosure, the data storage message and the target service data are sent to the target database via a data transmission path between the real-time data processing engine and the target database. Based on the data storage message and the target service data, a subsequent service data processing method can be triggered, and details can be referred to subsequent embodiments.
[0081] In the embodiment, the acquisition time information of the first service data is determined, and the data storage message is generated according to the data processing period and the acquisition time information. The data storage message is used to store the target service data to the target database, and the data storage message and the target service data are sent to the target database, so that the generation of the data storage message can be triggered in time. Since the data storage message is generated by referring to the data processing period and the acquisition time information, the target database can be triggered to store the corresponding target service data based on the data storage message after the data storage message and the target service data are sent to the target database.
[0082] S205: sending a data acquisition message to the target database according to the data type of the first service data.
[0083] The data acquisition message is generated by referring to the data processing period, and the data processing period is determined by the data type.
[0084] Optionally, in some embodiments, the data acquisition message is sent to the target database according to the data type of the first service data. The acquisition time identifier is generated according to the acquisition time information and the data processing period, the data acquisition message is generated according to the acquisition time identifier, and the data acquisition message is sent to the target database. Since the data acquisition message is generated by referring to the acquisition time information and the data processing period, the generated data acquisition message can be used to accurately trigger the acquisition of the corresponding second service data.
[0085] The acquisition time identifier is used to enable the target database to query the second service data. The acquisition time identifier can be used to identify the acquisition time information of the second service data. The acquisition time identifier can be, for example, an acquisition timestamp of the second service data, and the disclosure is not limited in this regard.
[0086] In the embodiments of the disclosure, the acquisition time identifier is generated according to the acquisition time information and the data processing period. For example, when the acquisition time information is 2022.01.01.12:12 and the data processing period is one day, since the data processing period is one day, the acquisition time information is processed with one day as the minimum time unit to obtain the acquisition time identifier (20220101), and the disclosure is not limited in this regard.
[0087] In the embodiments of the disclosure, since the generation rule of the acquisition time identifier and the generation rule of the corresponding index item of the target service data are partially the same, the corresponding target service data containing the acquisition time identifier in the index item can be taken as the second service data after the acquisition time identifier is generated, and the disclosure is not limited in this regard.
[0088] In the embodiments of the disclosure, after the acquisition time identifier is generated according to the acquisition time information and the data processing period, the data acquisition message can be generated according to the acquisition time identifier, and the data acquisition message is sent to the target database.
[0089] That is, in the embodiments of the disclosure, the acquisition time identifier can be packaged to generate a corresponding acquisition message, and then the real-time data processing engine can send the data acquisition message to the target database via a data transmission path between the real-time data processing engine and the target database.
[0090] S206: receiving the second service data sent by the target database, wherein the second service data is queried by the target database based on the data processing period.
[0091] The description of S206 can be specifically referred to the above-mentioned embodiments, which will not be repeated here.
[0092] S207: aggregating the first service data and the second service data to obtain the target service data.
[0093] Optionally, in some embodiments, after the first business data and the second business data are aggregated to obtain the target business data, the duration threshold of data storage can be determined according to the data type of the first business data, and the storage duration of the target business data in the target database is determined, and when the storage duration reaches the duration threshold, a data release message is generated, and the data release message is sent to the target database. In the embodiment of the present disclosure, since the corresponding data release message is generated in time and accurately when the storage duration of the target business data of the corresponding data type in the target database reaches the duration threshold, the generation effect of the data release message is effectively guaranteed, so that the target database can accurately trigger the release of the corresponding target business data of the data release message when the data release message is provided to the target database.
[0094] The data release message is used to release the target business data in the target database.
[0095] The business data processing method described in the embodiment of the present disclosure can determine the duration threshold of the storage of the corresponding data in advance for the business data of different data types, and then generate a data release message when the storage duration of the corresponding target business data in the target database reaches the duration threshold. Then, the real-time data processing engine can send the data release message to the target database via the data transmission path between the real-time data processing engine and the target database. Then, the target database can release the corresponding target business data stored therein based on the data release message. For details, see the subsequent embodiments, which will not be described here.
[0096] S208: generating a data update message according to the target business data, wherein the data update message is used to update the second business data in the target database.
[0097] The embodiment of the present disclosure can generate a corresponding data update message in response to the generation of the target business data after the first business data and the second business data are aggregated to obtain the target business data, so as to trigger the update of the second business data stored in the target database.
[0098] S209: sending the data update message to the target database.
[0099] In the embodiment of the present disclosure, after the data update message is generated according to the target business data, the real-time data processing engine can send the data update message to the target database based on the data transmission path between the real-time data processing engine and the target database. Then, the target database can update the second business data based on the data update message. For details, see the subsequent embodiments, which will not be described here.
[0100] In the embodiments of the present disclosure, the data update message is generated according to the target service data, the data update message is used to update the second service data in the target database, and the data update message is sent to the target database, so that the corresponding data update message can be triggered in time when the target service data is generated, and the target database can perform the corresponding data update operation in time based on the data update message when the data update message is provided to the target database.
[0101] In the embodiments of the present disclosure, the first service data is acquired, the acquisition time information of the first service data is determined, and the data storage message is generated according to the data processing period and the acquisition time information, wherein the data storage message is used to store the target service data to the target database, and the data storage message and the target service data are sent to the target database, so that the generation of the data storage message can be triggered in time, and since the data storage message is generated by referring to the data processing period and the acquisition time information, the target database can be triggered to store the corresponding target service data based on the data storage message after the data storage message and the target service data are sent to the target database, and the data acquisition message is sent to the target database according to the data type of the first service data, the second service data sent by the target database is received, the first service data and the second service data are aggregated to obtain the target service data, the data update message is generated according to the target service data, the data update message is used to update the second service data in the target database, and the data update message is sent to the target database, so that the corresponding data update message can be triggered in time when the target service data is generated, and the target database can perform the corresponding data update operation in time based on the data update message when the data update message is provided to the target database.
[0102] Figure 3 FIG. 3 is a flowchart of a service data processing method according to a third embodiment of the present disclosure.
[0103] As shown in FIG. 3, the method comprises the following steps. Figure 3
[0104] S301: acquiring first service data.
[0105] S302: sending a data acquisition message to a target database according to a data type of the first service data, wherein the data acquisition message is generated by referring to a data processing period, and the data processing period is determined by the data type.
[0106] S303: receiving second service data sent by the target database, wherein the second service data is obtained by the target database based on the data processing period.
[0107] S304: aggregate the first service data and the second service data to obtain target service data.
[0108] The description of S301-S304 can be specifically referred to the above embodiments, and will not be repeated here.
[0109] S305: receive a data query request, wherein the data query request comprises a source identifier, a data type, and acquisition time information.
[0110] The data query request can be used to trigger querying the target service data from the target database, and the data query request can comprise the source identifier, the data type, and the acquisition time information.
[0111] In the embodiments of the present disclosure, the data query request can be received via the real-time data processing engine, and the real-time data processing engine can query the target service data from the target database based on the data query request. Details can be referred to subsequent embodiments, and will not be repeated here.
[0112] S306: determine a data processing period according to the data type.
[0113] In the embodiments of the present disclosure, the data processing period corresponding to different data types of the first service data can be determined in advance, so that in the embodiments of the present disclosure, the data processing period corresponding to the data type can be determined according to the data type included in the data query request after the data query request is acquired, and then the subsequent service data processing method can be triggered and executed based on the data processing period. Details can be referred to subsequent embodiments.
[0114] S307: generate a data query message according to the source identifier, the acquisition time information, and the data processing period, wherein the data query message is used to query the target service data from the target database.
[0115] In the embodiments of the present disclosure, after the data processing period is determined according to the data type, the data query message can be generated according to the source identifier, the acquisition time information, and the data processing period.
[0116] Specifically, the index item for indexing the target business data from the target database can be generated according to the source identifier, the acquisition time information, and the data processing period (for a description of generating the index item for indexing the target business data from the target database according to the source identifier, the acquisition time information, and the data processing period, reference can be made to the above embodiments, which will not be repeated here), and then the index item can be packaged to generate a corresponding data query message, and then the real-time data processing engine can send the data query message to the target database, and the target database can index the corresponding target business data from the target database based on the index item carried in the data query message, which is not limited.
[0117] S308: sending the data query message to the target database.
[0118] In the embodiments of the present disclosure, after generating the data query message according to the source identifier, the acquisition time information, and the data processing period, the real-time data processing engine can send the data query message to the target database via a data transmission path between the real-time data processing engine and the target database, and then the target database can query the corresponding target business data based on the data query message. For details, reference can be made to subsequent embodiments, which will not be repeated here.
[0119] In the embodiments of the present disclosure, by acquiring the first business data, and according to the data type of the first business data, sending a data acquisition message to the target database, wherein the data acquisition message is generated with reference to the data processing period, the data processing period is determined by the data type, receiving the second business data sent by the target database, wherein the second business data is obtained by the target database based on the data processing period, and aggregating the first business data and the second business data to obtain the target business data, since the first business data and the second business data saved in the target database are aggregated, the occurrence of business data waiting during data processing can be reduced, thereby effectively reducing the resource occupancy rate of business data while effectively guaranteeing the business data processing effect, receiving a data query request, wherein the data query request includes: source identifier, data type, and acquisition time information, determining the data processing period according to the data type, generating the data query message according to the source identifier, the acquisition time information, and the data processing period, and sending the data query message to the target database, since the data query message is generated according to the data query request, it can fully represent the user's data query demand, and its generation logic is similar to the storage logic of the target business data, so that when the data query message is provided to the target database, the target database can be triggered to accurately provide the corresponding target business data, thereby effectively meeting the user's data query demand.
[0120] Figure 4is a flowchart of a service data processing method according to a fourth embodiment of the present disclosure.
[0121] It should be noted that the execution subject of the service data processing method in this embodiment can be a service data processing device, which can be implemented in software and / or hardware, and can be configured in an electronic device, which can include but is not limited to a terminal, a server, etc.
[0122] As shown in Figure 4 the method comprises:
[0123] S401: receiving a data acquisition message sent by a real-time data processing engine, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type of first service data.
[0124] The meanings and description of the same terms in this embodiment and the above embodiments are the same, and can be specifically referred to the above embodiments, which will not be repeated here.
[0125] The service data processing method described in the embodiments of the present disclosure can be configured to be executed by a target database, which can be, for example, a Redis database, without limitation.
[0126] In the embodiments of the present disclosure, the target database can receive the data acquisition message sent by the real-time data processing engine based on the data transmission path between the target database and the real-time data processing engine, and then can trigger the execution of the subsequent service data processing method based on the data acquisition message. For details, please refer to the subsequent embodiments, which will not be repeated here.
[0127] S402: querying the second service data according to the data acquisition message.
[0128] In the embodiments of the present disclosure, the target database can query the second service data according to the data acquisition message.
[0129] Specifically, the target database can determine the target service data stored therein corresponding to the acquisition time identifier in the data acquisition message, and take the target service data as the second service data, without limitation.
[0130] S403: sending the second service data to the real-time data processing engine.
[0131] In the embodiments of the present disclosure, after querying the second service data according to the data acquisition message, the target database can send the second service data to the real-time data processing engine.
[0132] In this embodiment, the data acquisition message sent by the real-time data processing engine is received, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined according to the data type of the first business data, the second business data is queried according to the data acquisition message, and the second business data is sent to the real-time data processing engine. Since the second business data is obtained according to the data acquisition message sent by the real-time data processing engine, the business data processing demand of the real-time data processing engine can be effectively met when the second business data is provided to the real-time data processing engine. Since the data acquisition message is generated with reference to the data processing period, and the data processing period is determined according to the data type of the first business data, the second business data provided by the target database can be adapted to the first business data currently processed by the real-time data processing engine.
[0133] Figure 5 is a flowchart of a business data processing method according to the fifth embodiment of the present disclosure.
[0134] As shown in Figure 5 , the method comprises:
[0135] S501: receiving a data acquisition message sent by a real-time data processing engine, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined according to the data type of the first business data.
[0136] S502: querying the second business data according to the data processing period.
[0137] S503: sending the second business data to the real-time data processing engine.
[0138] The description of S501-S503 can be referred to the above embodiments, which will not be repeated here.
[0139] S504: receiving a data storage message and target business data sent by the real-time data processing engine.
[0140] The data storage message is generated by the real-time data processing engine based on the data processing period and the acquisition time information of the first business data, and the target business data is obtained by the real-time data processing engine by aggregating the first business data and the second business data.
[0141] In the embodiments of the present disclosure, the target database can receive the data storage message and the target business data sent by the real-time data processing engine based on the data transmission path between the target database and the real-time data processing engine, and then store the target business data based on the data storage message and the target business data. For details, see the subsequent embodiments, which will not be repeated here.
[0142] S505: storing the target business data.
[0143] In the embodiments of the present disclosure, after receiving the data storage message sent by the real-time data processing engine and the target business data, the target database can store the target business data. Thus, the target database can store the corresponding target business data based on the data storage message received by it, effectively guaranteeing the storage effect of the target business data. Moreover, the data storage message is generated by the real-time data processing engine based on the data processing period and the acquisition time information of the first business data, and the target business data is obtained by the real-time data processing engine by aggregating the first business data and the second business data. Therefore, the execution of the corresponding business data query logic and business data acquisition logic can be guaranteed.
[0144] Specifically, the target database can be one that, after receiving the data storage message sent by the real-time data processing engine, stores the corresponding target business data of the index item contained in the data storage message. No limitation is made in this regard.
[0145] S506: receiving a data update message sent by the real-time data processing engine, wherein the data update message is generated by the real-time data processing engine based on the target business data.
[0146] In the embodiments of the present disclosure, the target database can receive the data update message sent by the real-time data processing engine based on the data transmission channel between it and the real-time data processing engine. Then, the target database can update the second business data stored by it based on the data update message. For details, reference can be made to subsequent embodiments, which will not be described herein again.
[0147] S507: updating the second business data according to the target business data.
[0148] In the embodiments of the present disclosure, after receiving the data update message sent by the real-time data processing engine, the target database can update the second business data according to the target business data. That is, the target database can update the second business data stored by it to the target business data in response to the data update message. No limitation is made in this regard.
[0149] In the embodiments of the present disclosure, by receiving the data update message sent by the real-time data processing engine and updating the second business data according to the target business data, the second business data can be updated in a timely manner, effectively guaranteeing the real-time nature of the second business data stored by it.
[0150] S508: receiving a data release message sent by the real-time data processing engine.
[0151] The data release message is generated by the real-time data processing engine based on the data type of the first business data and the storage duration of the target business data in the target database.
[0152] In this embodiment of the disclosure, the target database can receive a data release message sent by the real-time data processing engine based on the data transmission path between it and the real-time data processing engine. Then, the target database can release the target business data stored in it based on the data release message. For details, please refer to the following embodiments, which will not be repeated here.
[0153] S509: Release target business data.
[0154] In this embodiment of the disclosure, after receiving the data release message sent by the real-time data processing engine, the target database can release the target business data it stores. That is, the target database can release the target business data it stores in response to the data release message, and there is no restriction on this.
[0155] In this embodiment of the disclosure, by receiving a data release message sent by the real-time data processing engine and releasing the target business data, the corresponding target business data can be accurately released based on the data release message. This can effectively reduce the resource occupancy rate in the target database, realize the reclamation of target database storage resources, and effectively avoid the single-machine hotspot problem of the real-time data processing engine window.
[0156] S510: Receives data query messages sent by the real-time data processing engine.
[0157] Among them, the data query message is generated by the real-time data processing engine based on the data query request.
[0158] In this embodiment of the disclosure, the target database can receive data query messages sent by the real-time data processing engine based on the data transmission path between it and the real-time data processing engine. Then, the target database can query the target business data it stores based on the data query messages. For details, please refer to the following embodiments, which will not be repeated here.
[0159] S511: Query target business data based on data query message.
[0160] In this embodiment of the disclosure, the target database can retrieve target business data based on the data query message.
[0161] Specifically, the target database can determine the target business data it stores that corresponds to the index item in the data query message, without imposing any restrictions on this.
[0162] S512: Send target business data to the real-time data processing engine.
[0163] In this embodiment of the disclosure, the target database can send target business data to the real-time data processing engine based on the data transmission path between it and the real-time data processing engine.
[0164] In the embodiment of the present disclosure, the target service data is queried according to the data query message, and the target service data is sent to the real-time data processing engine, so that the target service data can be accurately queried, and when the target service data obtained by the query is provided to the real-time data processing engine, the service data demand of the user can be effectively met.
[0165] In the embodiment of the present disclosure, the data acquisition message sent by the real-time data processing engine is received, wherein the data acquisition message is generated with reference to a data processing period, the data processing period is determined by the data type of the first service data, the second service data is queried according to the data acquisition message, and the second service data is sent to the real-time data processing engine. After receiving the data storage message and the target service data sent by the real-time data processing engine, the target service data can be stored, so that the target database can store the corresponding target service data based on the data storage message received by it, effectively guaranteeing the storage effect of the target service data. The data update message sent by the real-time data processing engine is received, and the second service data is updated according to the target service data, so that the second service data can be updated in time, effectively guaranteeing the real-time performance of the second service data stored by it. The data release message sent by the real-time data processing engine is received, and the target service data is released, so that the corresponding target service data can be accurately released based on the data release message, thereby effectively reducing the resource occupancy rate in the target database, realizing the recycling of the storage resources of the target database, and effectively avoiding the single machine hotspot problem of the real-time data processing engine window. The target service data is queried according to the data query message, and the target service data is sent to the real-time data processing engine, so that the target service data can be accurately queried, and when the target service data obtained by the query is provided to the real-time data processing engine, the service data demand of the user can be effectively met.
[0166] Figure 6 FIG. 1 is a structural schematic diagram of a service data processing device according to an embodiment of the present disclosure.
[0167] As shown in FIG. 6, the service data processing device 60 comprises: Figure 6 The first acquisition module 601 is configured to acquire the first service data.
[0168] The first sending module 602 is configured to send a data acquisition message to a target database according to the data type of the first service data, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type.
[0169]
[0170] The first receiving module 603 is configured to receive second service data sent by the target database, where the second service data is obtained by the target database based on a data processing period.
[0171] The aggregation module 604 is configured to aggregate the first service data and the second service data to obtain target service data.
[0172] In some embodiments of the present disclosure, as shown in Figure 7 Figure 7 is a structural schematic diagram of a service data processing apparatus according to another embodiment of the present disclosure. The service data processing apparatus 60 further includes:
[0173] The first determining module 605 is configured to determine acquisition time information of the first service data.
[0174] The generating module 606 is configured to generate a data storage message according to the data processing period and the acquisition time information, where the data storage message is used to store the target service data to the target database; and
[0175] The second sending module 607 is configured to send the data storage message and the target service data to the target database.
[0176] In some embodiments of the present disclosure, the generating module 606 is further configured to:
[0177] The obtaining sub-module 6061 is configured to obtain a source identifier of a data source to which the first service data belongs.
[0178] The first generating sub-module 6062 is configured to generate an index item of the target service data according to the source identifier, the data processing period, and the acquisition time information; and
[0179] The second generating sub-module 6063 is configured to generate the data storage message according to the target service data and the index item, where the data storage message is used to store the target service data to the target database based on the index item.
[0180] In some embodiments of the present disclosure, the first generating sub-module 6062 is further configured to:
[0181] Obtain a period identifier corresponding to the data processing period;
[0182] Generate a processing time identifier according to the acquisition time information and the period identifier; and
[0183] Concatenate the source identifier, the period identifier, and the processing time identifier, and take the concatenated result as the index item of the target service data.
[0184] In some embodiments of the present disclosure, the first sending module 602 is further configured to:
[0185] generate the acquisition time identifier according to the acquisition time information and the data processing period;
[0186] generate the data acquisition message according to the acquisition time identifier, wherein the acquisition time identifier is used to enable the target database to query the second service data;
[0187] send the data acquisition message to the target database.
[0188] In some embodiments of the present disclosure, the service data processing apparatus 60 further comprises:
[0189] The third generation module 608 is configured to generate a data update message according to the target service data, wherein the data update message is used to update the second service data in the target database.
[0190] The third sending module 609 is configured to send the data update message to the target database.
[0191] In some embodiments of the present disclosure, the service data processing apparatus 60 further comprises:
[0192] The second determination module 610 is configured to determine a time threshold of data storage according to the data type of the first service data.
[0193] The third determination module 611 is configured to determine a storage time of the target service data in the target database.
[0194] The third generation module 612 is configured to generate a data release message when the storage time reaches the time threshold, wherein the data release message is used to release the target service data in the target database.
[0195] The fourth sending module 613 is configured to send the data release message to the target database.
[0196] In some embodiments of the present disclosure, the service data processing apparatus 60 further comprises:
[0197] The second receiving module 614 is configured to receive a data query request, wherein the data query request comprises a source identifier, a data type, and acquisition time information.
[0198] The fourth determination module 615 is configured to determine a data processing period according to the data type.
[0199] The fourth generation module 616 is configured to generate a data query message according to the source identifier, the acquisition time information, and the data processing period, wherein the data query message is used to query the target service data from the target database.
[0200] The fifth sending module 617 is configured to send the data query message to the target database.
[0201] In this embodiment, the first service data is acquired, and a data acquisition message is sent to the target database according to the data type of the first service data, the data acquisition message is generated with reference to a data processing period, the data processing period is determined by the data type, the second service data sent by the target database is received, the second service data is obtained by the target database based on the data processing period, and the first service data and the second service data are aggregated to obtain target service data. Since the first service data and the second service data saved in the target database are aggregated, the occurrence of service data waiting in the data processing process can be reduced, so that the service data processing effect can be effectively guaranteed, and the resource occupancy rate of the service data can be effectively reduced.
[0202] Figure 8 FIG. 1 is a structural schematic diagram of a service data processing apparatus according to an embodiment of the present disclosure.
[0203] As shown in FIG. 1, the service data processing apparatus 80 comprises: Figure 8
[0204] The third receiving module 801 is configured to receive a data acquisition message sent by the real-time data processing engine, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type of the first service data.
[0205] The query module 802 is configured to obtain the second service data according to the data acquisition message.
[0206] The sixth sending module 803 is configured to send the second service data to the real-time data processing engine.
[0207] In some embodiments of the present disclosure, as shown in FIG. 2, Figure 9 Figure 9 FIG. 2 is a structural schematic diagram of a service data processing apparatus according to another embodiment of the present disclosure. The service data processing apparatus 80 further comprises:
[0208] The fourth receiving module 804 is configured to receive a data storage message and target service data sent by the real-time data processing engine, wherein the data storage message is generated by the real-time data processing engine based on the data processing period and the acquisition time information of the first service data, and the target service data is obtained by the real-time data processing engine by aggregating the first service data and the second service data.
[0209] The storage module 805 is configured to store the target service data.
[0210] In some embodiments of the present disclosure, the service data processing apparatus 80 further comprises:
[0211] The fifth receiving module 806 is configured to receive a data update message sent by the real-time data processing engine, where the data update message is generated by the real-time data processing engine based on the target service data;
[0212] The updating module 807 is configured to update the second service data according to the target service data.
[0213] In some embodiments of the present disclosure, the service data processing apparatus 80 further includes:
[0214] The sixth receiving module 808 is configured to receive a data release message sent by the real-time data processing engine, where the data release message is generated by the real-time data processing engine based on a data type of the first service data and a storage duration of the target service data in the target database.
[0215] The releasing module 809 is configured to release the target service data.
[0216] In some embodiments of the present disclosure, the service data processing apparatus 80 further includes:
[0217] The seventh receiving module 810 is configured to receive a data query message sent by the real-time data processing engine, where the data query message is generated by the real-time data processing engine based on a data query request.
[0218] The querying module 811 is configured to query the target service data according to the data query message.
[0219] The seventh sending module 812 is configured to send the target service data to the real-time data processing engine.
[0220] In this embodiment, the data acquisition message sent by the real-time data processing engine is received, where the data acquisition message is generated with reference to a data processing period, the data processing period is determined according to the data type of the first service data, the second service data is queried according to the data acquisition message, and the second service data is sent to the real-time data processing engine. Since the second service data is queried according to the data acquisition message sent by the real-time data processing engine, the service data processing demand of the real-time data processing engine can be effectively met when the second service data is provided to the real-time data processing engine. Since the data acquisition message is generated with reference to the data processing period, and the data processing period is determined according to the data type of the first service data, the second service data provided by the target database can be adapted to the first service data currently processed by the real-time data processing engine.
[0221] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0222] Figure 10is a block diagram illustrating an electronic device according to the disclosure. The electronic device 1000 can be, for example, a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
[0223] Referring to Figure 10 The electronic device 1000 can include one or more of the following components: a processing component 1002, a memory 1004, a power component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.
[0224] The processing component 1002 generally controls the overall operations of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 can include one or more processors 1020 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 1002 can include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 can include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.
[0225] The memory 1004 is configured to store various types of data to support operations of the electronic device 1000. Examples of these data include instructions for any application or method operating on the electronic device 1000, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1004 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0226] The power component 1006 provides power to the various components of the electronic device 1000. The power component 1006 can include a power management system, one or more power sources, and other components associated with generating, managing and distributing power for the electronic device 1000.
[0227] The multimedia component 1008 includes a touch display that provides an output interface between the electronic device 1000 and a user. In some embodiments, the touch display can include a liquid crystal display (LCD) and a touch panel (TP). The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When the electronic device 1000 is in an operation mode, such as a camera mode or a video mode, the front-facing camera and / or the rear-facing camera can receive external multimedia data. Each of the front-facing camera and the rear-facing camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0228] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC) that is configured to receive an external audio signal when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1004 or transmitted via the communication component 1016.
[0229] In some embodiments, the audio component 1010 further includes a speaker for outputting audio signals.
[0230] The I / O interface 1012 provides an interface between the processing component 1002 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0231] The sensor component 1014 includes one or more sensors to provide various state assessments for the electronic device 1000. For example, the sensor component 1014 can detect an open / closed state of the electronic device 1000, relative positioning of components, such as a display and a keypad of the electronic device 1000, a change in position of the electronic device 1000 or a component of the electronic device 1000, presence or absence of user contact with the electronic device 1000, an orientation or acceleration / deceleration of the electronic device 1000, and a temperature change of the electronic device 1000. The sensor component 1014 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 1014 can further include a light sensor, such as a CMOS or CCD image sensor, for use in an imaging application. In some embodiments, the sensor component 1014 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0232] The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technology.
[0233] In an exemplary embodiment, the electronic device 1000 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements, for performing the above-described business data processing method.
[0234] In an exemplary embodiment, a computer-readable storage medium including instructions, such as the memory 1004 including instructions, is also provided, which can be executed by the processor 1020 of the electronic device 1000 to complete the above-described method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0235] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following, in general, the principles of the present disclosure and including such features to the extent that they are not disclosed in the prior art. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0236] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated, and that various modifications and changes can be made without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A service data processing method characterized by, executed by a real-time data processing engine, the method comprising: obtaining first business data; sending a data obtaining message to a target database according to a data type of the first business data, wherein the data obtaining message is generated with reference to a data processing period, and the data processing period is determined by the data type; receiving second business data sent by the target database, wherein the second business data is obtained by the target database based on the data processing period; and aggregating the first business data and the second business data to obtain target business data; determining acquisition time information of the first business data; obtaining a source identifier of a data source to which the first business data belongs; generating an index item of the target business data according to the source identifier, the data processing period, and the acquisition time information; and generating a data storage message according to the target business data and the index item, wherein the data storage message is used to store the target business data to the target database based on the index item; sending the data storage message and the target business data to the target database.
2. The method of claim 1, wherein, The generating of the index item of the target business data according to the source identifier, the data processing period, and the acquisition time information comprises: obtaining a period identifier corresponding to the data processing period; generating a processing time identifier according to the acquisition time information and the period identifier; and concatenating the source identifier, the period identifier, and the processing time identifier, and taking the concatenated result as the index item of the target business data.
3. The method of claim 2, wherein, The sending of the data obtaining message to the target database according to the data type of the first business data, wherein the data obtaining message is generated with reference to a data processing period, and the data processing period is determined by the data type, comprises: generating an acquisition time identifier according to the acquisition time information and the data processing period; generating the data obtaining message according to the acquisition time identifier, wherein the acquisition time identifier is used to make the target database obtain the second business data; and sending the data obtaining message to the target database.
4. The method of claim 1, wherein, The method further comprises: generating a data update message according to the target business data, wherein the data update message is used to update the second business data in the target database; and sending the data update message to the target database.
5. The method of claim 1, wherein, The method further comprises: determining a time length threshold of data storage according to the data type of the first business data; determining a storage time length of the target business data in the target database; if the storage time length reaches the time length threshold, generating a data release message, wherein the data release message is used to release the target business data in the target database; and sending the data release message to the target database.
6. The method according to any one of claims 1 to 5, wherein, The method further comprises: receiving a data query request, wherein the data query request comprises a source identifier, a data type, and acquisition time information; determining the data processing period according to the data type; and generate a data query message according to the source identifier, the acquisition time information, and the data processing period, wherein the data query message is used to query the target service data from the target database; send the data query message to the target database.
7. A service data processing method characterized by comprising: The method is executed by a target database, and the method comprises: receiving a data acquisition message sent by a real-time data processing engine, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by a data type of first service data; querying second service data according to the data acquisition message; and sending the second service data to the real-time data processing engine; receiving a data storage message and target service data sent by the real-time data processing engine, wherein the data storage message is generated by the real-time data processing engine based on the target service data and an index item of the target service data, the index item of the target service data is generated by the real-time data processing engine based on a source identifier of a data source to which the first service data belongs, the data processing period, and acquisition time information of the first service data, and the target service data is obtained by the real-time data processing engine by aggregating the first service data and the second service data; storing the target service data based on the index item.
8. The method of claim 7, wherein, The method further comprises: receiving a data update message sent by the real-time data processing engine, wherein the data update message is generated by the real-time data processing engine based on the target service data; updating the second service data according to the target service data.
9. The method of claim 7, wherein, The method further comprises: receiving a data release message sent by the real-time data processing engine, wherein the data release message is generated by the real-time data processing engine based on the data type of the first service data and a storage duration of the target service data in the target database; releasing the target service data.
10. The method according to any one of claims 7 to 9, characterized in that, The method further comprises: receiving a data query message sent by the real-time data processing engine, wherein the data query message is generated by the real-time data processing engine based on a data query request; querying the target service data according to the data query message; and sending the target service data to the real-time data processing engine.
11. A service data processing apparatus characterized by comprising: comprise: a first acquisition module configured to acquire first service data; a first sending module configured to send a data acquisition message to a target database according to a data type of the first service data, wherein the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by the data type; a first receiving module configured to receive second service data sent by the target database, wherein the second service data is obtained by the target database based on the data processing period; and an aggregation module configured to aggregate the first service data and the second service data to obtain target service data; a first determination module configured to determine acquisition time information of the first service data; a generation module configured to generate a data storage message according to the data processing period and the acquisition time information; The second sending module is configured to send the data storage message and the target service data to the target database. The generation module is further configured to: The acquisition submodule is configured to acquire a source identifier of a data source to which the first service data belongs. The first generation submodule is configured to generate an index item of the target service data according to the source identifier, the data processing period, and the acquisition time information. The second generation submodule is configured to generate the data storage message according to the target service data and the index item, where the data storage message is used to store the target service data to the target database based on the index item.
12. A service data processing apparatus characterized by comprising: The apparatus comprises: The third receiving module is configured to receive a data acquisition message sent by a real-time data processing engine, where the data acquisition message is generated with reference to a data processing period, and the data processing period is determined by a data type of first service data. The query module is configured to query second service data according to the data acquisition message. The sixth sending module is configured to send the second service data to the real-time data processing engine. The fourth receiving module is configured to receive a data storage message and target service data sent by the real-time data processing engine, where the data storage message is generated by the real-time data processing engine based on the target service data and an index item of the target service data, the index item of the target service data is generated by the real-time data processing engine based on a source identifier of a data source to which the first service data belongs, the data processing period, and acquisition time information of the first service data, and the target service data is obtained by the real-time data processing engine by aggregating the first service data and the second service data. The storage module is configured to store the target service data based on the index item.
13. An electronic device, comprising: comprises: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method of any one of claims 1-7, or execute the method of any one of claims 8-10. 14.A computer readable storage medium, when instructions in the computer readable storage medium are executed by a processor of an electronic device, enable the electronic device to implement the method of any one of claims 1-7, or execute the method of any one of claims 8-10.
15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method of any one of claims 1-7, or executes the method of any one of claims 8-10.
Citation Information
Patent Citations
Data processing method and device and electronic device
CN111600926A