Data processing
By serializing the data format differences, collaborative cooperation between the online and offline is achieved, the data real-time and consistency problems are solved, and real-time calculation of massive data and real-time feedback of calculation results are achieved.
Patent Information
- Application Number
- PCT/CN2024/128638
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-03
- Filing Date
- 2024-10-30
- Publication Date
- 2025-05-08
AI Technical Summary
In some business scenarios, it is necessary to coordinate the completion of online systems and offline computing tasks, making it difficult to ensure real-time and consistency of data.
By serializing the data format differences, the coordinated cooperation between the online and offline is realized, the first execution parameters are generated and transmitted through serialization and deserialization, ensuring the real-time data processing and the consistency of configuration data.
Real-time calculation of massive data and real-time feedback of calculation results are realized, real-time performance of data processing is improved, and consistency between online and offline configuration data.
Smart Images

Figure CN2024128638_08052025_PF_FP_ABST
Abstract
Description
Data processing Technical Field
[0001] This specification relates to the field of computer technology, and in particular to data processing methods, devices, systems, equipment, media, and program products. Background Art
[0002] Currently, many business scenarios involve big data computing tasks. These big data are stored in offline tables, leveraging the powerful computing capabilities of offline computing engines for data processing. However, if these big data computing tasks were handled by online application systems, their performance would be a challenge. However, in some business scenarios, the need for online systems to collaborate with offline computing tasks poses challenges to data real-time and consistency.
[0003] Summary of the Invention
[0004] The embodiments of this specification provide a data processing method, apparatus, system, device, medium, and program product, which not only solve the problem that the offline end does not support the JSON format or other data format parameter transmission through serialization, but also realize the real-time calculation of massive data and the real-time feedback of the calculation results to the online end user through the collaborative cooperation between the online end and the offline end, thereby improving the real-time performance of data processing. In addition, by generating the first execution parameter from the configuration data of the online end and transmitting it to the offline end after serialization and deserialization, the consistency of the configuration data of the online end and the offline end during the data processing process is ensured. The above technical solution is as follows.
[0005] In a first aspect, an embodiment of this specification provides a data processing method, which is applied to an online terminal; the method includes:
[0006] Obtaining data processing instructions;
[0007] In response to the above data processing instruction, obtain corresponding configuration data;
[0008] generating a first execution parameter based on the configuration data;
[0009] Serialize the first execution parameter to obtain the second execution parameter;
[0010] sending an offline task instruction to the offline terminal based on the second execution parameter, so that the offline terminal generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result;
[0011] The calculation result sent by the offline terminal is obtained, and the calculation result is stored in the first result table.
[0012] In a possible implementation, obtaining the calculation result sent by the offline terminal includes:
[0013] sending a result data return instruction to the offline end, so that the offline end responds to the result data return instruction and returns the calculation result to the online end;
[0014] Receive the calculation result of the offline end return flow.
[0015] In a possible implementation, after obtaining the data processing instruction and before sending the result data backflow instruction to the offline terminal, the method further includes:
[0016] When the duration of the data processing instruction reaches the first target duration, a task status query instruction is sent to the offline end, so that the offline end returns the corresponding offline task status to the online end based on the task status query instruction; the offline task status is used to represent the life cycle of the offline computing task;
[0017] Receive the offline task status returned by the offline client;
[0018] The above-mentioned instruction to send result data backflow to the above-mentioned offline terminal includes:
[0019] When the offline task status is a successful execution status, a result data reflow instruction is sent to the offline end.
[0020] In a possible implementation, after receiving the offline task status returned by the offline terminal, the method further includes:
[0021] When the offline task status is not the successful execution status, the first target duration is updated to the second target duration, and the step of sending the task status query instruction to the offline end when the duration of obtaining the data processing instruction reaches the first target duration is performed again; the second target duration is equal to the first target duration plus the preset duration.
[0022] In a possible implementation, before obtaining the data processing instruction, the method further includes:
[0023] Obtain the above configuration data input by the business party corresponding to the above online terminal;
[0024] The above-mentioned response to the above-mentioned data processing instruction, obtaining corresponding configuration data, includes:
[0025] In response to the data processing instruction, the configuration data is loaded.
[0026] In a possible implementation, after obtaining the data processing instruction and before obtaining the corresponding configuration data in response to the data processing instruction, the method further includes:
[0027] In response to the data processing instruction, a corresponding online task is generated according to the configuration data; the online task is used to record the life cycle of the task corresponding to the data processing instruction;
[0028] After receiving the offline task status returned by the offline terminal, the method further includes:
[0029] The online task is updated based on the offline task status.
[0030] In a possible implementation, serializing the first execution parameter to obtain the second execution parameter includes:
[0031] The first target character in the above-mentioned first execution parameter is replaced with the corresponding second target character according to the preset correspondence relationship to obtain the second execution parameter; the above-mentioned first target character is used to represent the character in the above-mentioned first execution parameter that the above-mentioned offline end does not support transmission; the above-mentioned second target character is used to represent the character corresponding to the above-mentioned first target character that the above-mentioned offline end supports transmission; the above-mentioned preset correspondence relationship is used to represent the correspondence between the above-mentioned first target character and the above-mentioned second target character.
[0032] In a second aspect, an embodiment of this specification provides a data processing method, which is applied to an offline terminal; the method includes:
[0033] Receiving an offline task instruction sent by the online end; the offline task instruction carries a second execution parameter; the second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data;
[0034] In response to the above offline task instruction, generate a corresponding offline computing task;
[0035] Deserialize the second execution parameter to obtain the first execution parameter;
[0036] Execute the offline computing task based on the first execution parameter to obtain a corresponding computing result;
[0037] The above calculation results are sent to the above online terminal.
[0038] In a possible implementation, sending the calculation result to the online terminal includes:
[0039] Receive the result data return instruction sent by the online end;
[0040] In response to the result data return instruction, the calculation result is returned to the online end.
[0041] In a possible implementation, after receiving the offline task instruction sent by the online end and before receiving the result data reflow instruction sent by the online end, the method further includes:
[0042] Receive the task status query instruction sent by the online terminal;
[0043] Based on the above task status query instruction, the corresponding offline task status is returned to the above online end; the above offline task status is used to represent the life cycle of the above offline computing task;
[0044] The above-mentioned receiving the result data return instruction sent by the above-mentioned online end includes:
[0045] When the offline task status is a successful execution status, a result data reflow instruction sent by the online end is received.
[0046] In a possible implementation, deserializing the second execution parameter to obtain the first execution parameter includes:
[0047] According to the preset correspondence, the second target character in the second execution parameter is replaced with the corresponding first target character to obtain the first execution parameter; the first target character is used to represent the character in the first execution parameter that the offline end does not support transmission; the second target character is used to represent the character corresponding to the first target character that the offline end supports transmission; the preset correspondence is used to represent the correspondence between the first target character and the second target character.
[0048] In a third aspect, an embodiment of this specification provides a data processing device, which is applied to an online terminal. The data processing device includes:
[0049] A first acquisition module, configured to acquire a data processing instruction;
[0050] A second acquisition module, configured to acquire corresponding configuration data in response to the data processing instruction;
[0051] A first generating module, configured to generate a first execution parameter based on the configuration data;
[0052] A serialization module, configured to serialize the first execution parameter to obtain a second execution parameter;
[0053] a first sending module, configured to send an offline task instruction to the offline terminal based on the second execution parameter, so that the offline terminal generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result;
[0054] The third acquisition module is used to obtain the calculation result sent by the offline terminal and store the calculation result in the first result table.
[0055] In a possible implementation, the third obtaining module includes:
[0056] a first sending unit, configured to send a result data reflow instruction to the offline end, so that the offline end responds to the result data reflow instruction and reflows the calculation result to the online end;
[0057] The first receiving unit is configured to receive the calculation result of the offline end return flow.
[0058] In a possible implementation, the data processing device further includes:
[0059] A second sending module is configured to send a task status query instruction to the offline end when the duration of obtaining the data processing instruction reaches a first target duration, so that the offline end returns a corresponding offline task status to the online end based on the task status query instruction; the offline task status is used to represent the life cycle of the offline computing task;
[0060] A first receiving module is used to receive the offline task status returned by the offline terminal;
[0061] The first sending unit is specifically configured to:
[0062] When the offline task status is a successful execution status, a result data reflow instruction is sent to the offline end.
[0063] In a possible implementation, the data processing device further includes:
[0064] The first update module is used to update the above-mentioned first target duration to the second target duration when the above-mentioned offline task status is not the above-mentioned execution success status, and again execute the above-mentioned step of sending the task status query instruction to the above-mentioned offline end when the duration of obtaining the above-mentioned data processing instruction reaches the first target duration; the above-mentioned second target duration is equal to the above-mentioned first target duration plus the preset duration.
[0065] In a possible implementation, the data processing device further includes:
[0066] A fourth acquisition module is used to acquire the configuration data input by the business party corresponding to the online terminal;
[0067] The second acquisition module is specifically used for:
[0068] In response to the data processing instruction, the configuration data is loaded.
[0069] In a possible implementation, the data processing device further includes:
[0070] An online task generation module, configured to generate corresponding online tasks according to the configuration data in response to the data processing instructions; the online tasks are configured to record the life cycle of the tasks corresponding to the data processing instructions;
[0071] The data processing device further includes:
[0072] The second updating module is used to update the online task based on the offline task status.
[0073] In one possible implementation, the serialization module is specifically used to:
[0074] The first target character in the above-mentioned first execution parameter is replaced with the corresponding second target character according to the preset correspondence relationship to obtain the second execution parameter; the above-mentioned first target character is used to represent the character in the above-mentioned first execution parameter that the above-mentioned offline end does not support transmission; the above-mentioned second target character is used to represent the character corresponding to the above-mentioned first target character that the above-mentioned offline end supports transmission; the above-mentioned preset correspondence relationship is used to represent the correspondence between the above-mentioned first target character and the above-mentioned second target character.
[0075] In a fourth aspect, an embodiment of this specification provides a data processing device, which is applied to an offline terminal; the device includes:
[0076] A second receiving module is configured to receive an offline task instruction sent by the online end; the offline task instruction carries a second execution parameter; the second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data;
[0077] A second generating module is used to generate a corresponding offline computing task in response to the above offline task instruction;
[0078] A deserialization module, configured to deserialize the second execution parameter to obtain the first execution parameter;
[0079] An execution module, configured to execute the offline computing task based on the first execution parameter to obtain a corresponding computing result;
[0080] The third sending module is used to send the above calculation results to the above online end.
[0081] In a possible implementation, the third sending module includes:
[0082] A second receiving unit is used to receive the result data reflow instruction sent by the online end;
[0083] The reflux unit is configured to respond to the result data reflux instruction and reflux the calculation result to the online end.
[0084] In a possible implementation, the data processing device further includes:
[0085] The third receiving module is used to receive the task status query instruction sent by the online end;
[0086] A fourth sending module is used to return the corresponding offline task status to the online end based on the task status query instruction; the offline task status is used to represent the life cycle of the offline computing task;
[0087] The second receiving unit is specifically configured to:
[0088] When the offline task status is a successful execution status, a result data reflow instruction sent by the online end is received.
[0089] In one possible implementation, the deserialization module is specifically used to:
[0090] According to the preset correspondence, the second target character in the second execution parameter is replaced with the corresponding first target character to obtain the first execution parameter; the first target character is used to represent the character in the first execution parameter that the offline end does not support transmission; the second target character is used to represent the character corresponding to the first target character that the offline end supports transmission; the preset correspondence is used to represent the correspondence between the first target character and the second target character.
[0091] In the fifth aspect, an embodiment of this specification provides a data processing system, which includes an online end and an offline end; the online end is used to execute the method provided by the first aspect of the embodiment of this specification or any possible implementation of the first aspect; the offline end is used to execute the method provided by the second aspect of the embodiment of this specification or any possible implementation of the second aspect.
[0092] In a sixth aspect, an embodiment of this specification provides an electronic device, including: a processor and a memory;
[0093] The processor is connected to the memory;
[0094] The aforementioned memory is used to store executable program code;
[0095] The above-mentioned processor runs the program corresponding to the above-mentioned executable program code by reading the executable program code stored in the above-mentioned memory, so as to execute the method provided by the first aspect of the embodiment of this specification or any possible implementation of the first aspect or the second aspect of the embodiment of this specification or any possible implementation of the second aspect.
[0096] In the seventh aspect, an embodiment of this specification provides a computer storage medium, which stores multiple instructions, and the above instructions are suitable for being loaded by a processor and executing the method provided by the first aspect of the embodiment of this specification or any possible implementation of the first aspect or the second aspect of the embodiment of this specification or any possible implementation of the second aspect.
[0097] In an eighth aspect, an embodiment of this specification provides a computer program product comprising instructions, which, when the above-mentioned computer program product runs on a computer or a processor, enables the above-mentioned computer or the above-mentioned processor to execute the method provided by the first aspect of the embodiment of this specification or any possible implementation of the first aspect or the second aspect of the embodiment of this specification or any possible implementation of the second aspect.
[0098] In an embodiment of the present specification, after the online end obtains a data processing instruction, it will respond to the data processing instruction, obtain corresponding configuration data, and generate a first execution parameter based on the configuration data; and serialize the first execution parameter to obtain a second execution parameter; then, based on the second execution parameter, send an offline task instruction to the offline end, so that the offline end generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result; finally, the online end can obtain the computing result sent by the offline end and store the computing result in a first result table, thereby solving the problem that the offline end does not support parameter transmission in JSON format or other data formats through serialization, and through the collaborative cooperation between the online and offline ends, achieving real-time computing of massive data and real-time feedback of computing results to the online end user, thereby improving the real-time performance of data processing. In addition, by generating the first execution parameter from the online configuration data and transmitting it to the offline end after serialization and deserialization, the consistency of the online and offline configuration data during the data processing process is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0100] FIG1 is a schematic diagram of the architecture of a data processing system provided by an exemplary embodiment of this specification;
[0101] FIG2 is a flow chart of a data processing method provided by an exemplary embodiment of this specification;
[0102] FIG3 is a schematic diagram of a serialization and deserialization implementation process provided by an exemplary embodiment of this specification;
[0103] FIG4 is a flow chart of another data processing method provided by an exemplary embodiment of this specification;
[0104] FIG5 is a flow chart of another data processing method provided by an exemplary embodiment of this specification;
[0105] FIG6 is a schematic diagram of an online task provided by an exemplary embodiment of this specification;
[0106] FIG7 is a schematic diagram of the overall implementation process of a data processing method provided by an exemplary embodiment of this specification;
[0107] FIG8 is a schematic structural diagram of a data processing device provided by an exemplary embodiment of this specification;
[0108] FIG9 is a schematic structural diagram of another data processing device provided by an exemplary embodiment of this specification;
[0109] FIG10 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of this specification. DETAILED DESCRIPTION
[0110] The technical solutions in the embodiments of this specification will be described clearly and completely below in conjunction with the drawings in the embodiments of this specification.
[0111] In this specification, claims, and the accompanying drawings, the terms "first," "second," "third," and so on are used to distinguish between different items, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0112] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the configuration data, calculation results, execution parameters, etc. involved in this specification are all obtained with full authorization.
[0113] The data processing method provided in the embodiments of this specification can be applied to, but is not limited to, consumer finance reconciliation scenarios. In the consumer finance reconciliation scenario, the consumer finance reconciliation platform aims to undertake all reconciliation demands of consumer finance through configuration, and use the powerful performance of the offline computing engine to achieve reconciliation of various massive data within the consumer finance body. Business reconciliation configuration is a process from configuration, debugging to online, where debugging is triggered by the online end, the offline end does data processing, and the results of the offline end processing need to flow back to the online end. Therefore, if real-time performance is not guaranteed, it will inevitably affect the efficiency and experience of business access. In addition, when debugging, the business party may modify the configuration and trigger debugging at any time, so the online configuration data needs to be consistent with the configuration data of the offline task run, otherwise the reconciliation results (calculation results) that flow back cannot correspond one to one with the configuration data that triggered the debugging.
[0114] Next, please refer to Figure 1, which is a schematic diagram of the architecture of a data processing system provided by an exemplary embodiment of this specification. As shown in Figure 1, the data processing system includes: an online terminal 110 and an offline terminal 120.
[0115] The online terminal 110 may include one or more servers corresponding to the online system, or one or more terminals corresponding to the online system. Business-specific software may be installed in the online terminal 110 to enable users, such as business parties, to input configuration data corresponding to the business on the online terminal 110, as well as functions such as, but not limited to, triggering the online terminal 110 to generate online tasks through data processing instructions. The online terminal 110 may obtain data processing instructions and, in response to the data processing instructions, obtain corresponding configuration data. It may also generate first execution parameters based on the configuration data and serialize the first execution parameters to obtain second execution parameters. The online terminal 110 may establish a data relationship with the network and establish a data connection with the offline terminal 120 via the network. For example, it may send offline task instructions to the offline terminal 120 based on the second execution parameters and obtain calculation results sent by the offline terminal 120. Furthermore, after obtaining the calculation results, the online terminal 110 may store the calculation results in the first result table corresponding to the online terminal 110. The above-mentioned server may be, but is not limited to, a hardware server, a virtual server, a cloud server, etc., and the terminal may be, but is not limited to, a mobile phone, a tablet computer, a laptop computer, etc. with a business version of the software installed.
[0116] The offline terminal 120 may include one or more servers corresponding to the offline platform. The offline terminal 120 may establish a data relationship with the network and establish a data connection relationship with the online terminal 110 through the network, such as receiving an offline task instruction sent by the online terminal 110 and sending a calculation result to the online terminal 110. The above-mentioned offline task instruction carries a second execution parameter, and the above-mentioned second execution parameter is serialized by the first execution parameter generated by the online terminal 110 based on the configuration data. After receiving the offline task instruction sent by the online terminal 110, the offline terminal 120 may generate a corresponding offline computing task in response to the offline task instruction, deserialize the above-mentioned second execution parameter to obtain the above-mentioned first execution parameter, and execute the above-mentioned offline computing task based on the above-mentioned first execution parameter to obtain the corresponding calculation result. Among them, the above-mentioned server may be, but is not limited to, a hardware server, a virtual server, a cloud server, etc.
[0117] The network can be a medium that provides a communication link between the online end 110 and the offline end 120, or can be the Internet including network devices and transmission media, but is not limited thereto. The transmission media can be a wired link, such as, but not limited to, coaxial cable, optical fiber, and digital subscriber line (DSL), or a wireless link, such as, but not limited to, wireless fidelity (WIFI), Bluetooth, and mobile device networks.
[0118] It should be understood that the number of online terminals 110 and offline terminals 120 in the data processing system shown in FIG1 is merely exemplary. In a specific implementation, the data processing system may include any number of online terminals 110 and offline terminals 120, and this embodiment of the specification does not specifically limit this. For example, but not limited to, the online terminal 110 may be an online terminal cluster composed of multiple online terminals, and the offline terminal 120 may be an offline terminal cluster composed of multiple offline terminals.
[0119] Next, the data processing method provided by an embodiment of this specification is described in conjunction with Figure 1. Specifically, please refer to Figure 2, which is a flow chart of a data processing method provided by an exemplary embodiment of this specification. As shown in Figure 2, the data processing method includes the following steps S202 to S220.
[0120] S202, obtaining data processing instructions on the online side.
[0121] Optionally, when a user, such as but not limited to a business party, wants to process data, the user can trigger the generation of a data processing instruction on the online side through operations such as, but not limited to, clicking, long pressing, and short pressing.
[0122] Optionally, the online end may also, but is not limited to, receive data processing instructions sent from a business end corresponding to the business party through the network.
[0123] S204: The online end responds to the data processing instruction and obtains corresponding configuration data.
[0124] Optionally, the above data processing instruction may carry configuration data corresponding to this task.
[0125] Optionally, before the online side receives the data processing instruction, the business side can first configure the business data based on the online side. That is, the online side can pre-acquire the configuration data input by the business side corresponding to the online side. When the online side receives the data processing instruction, it will respond to the data processing instruction and load the corresponding configuration data.
[0126] For example, in a consumer finance reconciliation scenario, the configuration data may include, but is not limited to, a three-layer reconciliation model, namely, three types of data: reconciliation category, reconciliation scenario, and reconciliation plan.
[0127] S206: The online end generates a first execution parameter based on the configuration data.
[0128] Specifically, after obtaining the corresponding configuration data, the online end may format the data according to the business usage scenario corresponding to the configuration data to generate the corresponding first execution parameter.
[0129] S208: The online end serializes the first execution parameter to obtain a second execution parameter.
[0130] Specifically, many platforms may only support the transmission of string types, and do not support parameter transmission in json format or other data formats, while many online terminals mainly transmit parameters in json or other data formats. The embodiment of this specification adopts a custom serialization method, as shown in Figure 3. For example, but not limited to, according to the preset correspondence, the first target character that the offline terminal does not support transmission in the first execution parameter is replaced with the corresponding second target character that the offline terminal supports transmission, to obtain the second execution parameter, thereby solving the problem that the offline terminal does not support parameter transmission in json format or other data formats. The above-mentioned first target character is used to represent the character in the first execution parameter that the offline terminal does not support transmission, and the above-mentioned second target character is used to represent the character corresponding to the first target character that the offline terminal supports transmission. The above-mentioned preset correspondence is used to represent the correspondence between the first target character and the second target character.
[0131] S210: The online end sends an offline task instruction to the offline end based on the second execution parameter.
[0132] Specifically, after the online end obtains the second execution parameter serialized from the first execution parameter, it will send an offline task instruction to the offline end based on the second execution parameter, so that the offline end generates a corresponding offline computing task in response to the above offline task instruction, deserializes the above second execution parameter to obtain the above first execution parameter, and executes the above offline computing task based on the above first execution parameter to obtain the corresponding computing result.
[0133] S212: The offline end generates a corresponding offline computing task in response to the offline task instruction.
[0134] Specifically, after receiving an offline task instruction from the online end, the offline end can generate a corresponding offline computing task in response to the offline task instruction. For example, but not limited to, the offline end can write a corresponding offline Python script task based on the second execution parameter carried in the offline task instruction. The second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data. The offline computing task is used to execute the data reconciliation task corresponding to the configuration data.
[0135] S214: The offline end deserializes the second execution parameter to obtain the first execution parameter.
[0136] Specifically, after receiving the offline task instruction sent by the online end, the offline end will deserialize the second execution parameter carried in the offline task instruction. For example, but not limited to, as shown in Figure 3, the second target character in the second execution parameter is replaced with the corresponding first target character according to the preset correspondence relationship to obtain the first execution parameter corresponding to the configuration data. In this way, the offline end can obtain the configuration data input by the business party into the online system through serialization and deserialization, so that the configuration data when the offline end executes the offline computing task is consistent with the configuration data input by the corresponding business party in the online system.
[0137] S216: The offline end executes the offline computing task based on the first execution parameter to obtain a corresponding computing result.
[0138] Specifically, after obtaining the first execution parameter corresponding to the configuration data, the offline terminal will execute the offline computing task based on the first execution parameter, such as, but not limited to, executing the corresponding offline Python script task, to obtain the corresponding computing result. The computing result may be, but is not limited to, the reconciliation result corresponding to the data reconciliation task.
[0139] S218, the offline end sends the calculation result to the online end.
[0140] Specifically, after obtaining the corresponding calculation results, the offline end can directly send the above calculation results to the online end through the network.
[0141] S220: The online end stores the calculation result in a first result table.
[0142] Specifically, the first result table may be an online data storage medium and may be stored in an online database.
[0143] In an embodiment of the present specification, after the online end obtains a data processing instruction, it will respond to the data processing instruction, obtain corresponding configuration data, and generate a first execution parameter based on the configuration data; and serialize the first execution parameter to obtain a second execution parameter; then, based on the second execution parameter, send an offline task instruction to the offline end, so that the offline end generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result; finally, the online end can obtain the computing result sent by the offline end and store the computing result in a first result table, thereby solving the problem that the offline end does not support parameter transmission in JSON format or other data formats through serialization, and through the collaborative cooperation between the online and offline ends, achieving real-time computing of massive data and real-time feedback of computing results to the online end user, thereby improving the real-time performance of data processing. In addition, by generating the first execution parameter from the online configuration data and transmitting it to the offline end after serialization and deserialization, the consistency of the online and offline configuration data during the data processing process is ensured.
[0144] Next, please refer to Figure 4, which is a flowchart of another data processing method provided by an exemplary embodiment of this specification. As shown in Figure 4, the data processing method includes the following steps S402 to S422.
[0145] S402, obtaining data processing instructions on the online side.
[0146] Specifically, S402 is consistent with S202 and will not be repeated here.
[0147] S404: The online end responds to the data processing instruction and obtains corresponding configuration data.
[0148] Specifically, S404 is consistent with S204 and will not be repeated here.
[0149] S406: The online end generates a first execution parameter based on the configuration data.
[0150] Specifically, S406 is consistent with S206 and will not be repeated here.
[0151] S408: The online end serializes the first execution parameter to obtain a second execution parameter.
[0152] Specifically, S408 is consistent with S208 and will not be repeated here.
[0153] S410: The online end sends an offline task instruction to the offline end based on the second execution parameter.
[0154] Specifically, S410 is consistent with S210 and will not be repeated here.
[0155] S412: The offline end generates a corresponding offline computing task in response to the offline task instruction.
[0156] Specifically, S412 is consistent with S212 and will not be repeated here.
[0157] S414: The offline end deserializes the second execution parameter to obtain the first execution parameter.
[0158] Specifically, S414 is consistent with S214 and will not be repeated here.
[0159] S416: The offline end executes the offline computing task based on the first execution parameter to obtain a corresponding computing result.
[0160] Specifically, S416 is consistent with S216 and will not be repeated here.
[0161] S418: The online end sends a result data reflow instruction to the offline end.
[0162] Specifically, in the embodiments of this specification, the online end can, but is not limited to, automatically trigger the offline end to reflow result data, that is, send a result data reflow instruction corresponding to the configuration data to the offline end, so that the offline end responds to the result data reflow instruction and reflows the calculation results to the online end.
[0163] It is understandable that the above S418 and the above S410 can be executed successively or simultaneously, and the embodiments of this specification do not limit this.
[0164] S420: The offline end responds to the result data return instruction and returns the calculation result to the online end.
[0165] Specifically, after the offline end receives the result data reflow instruction sent by the online end, if the offline end has executed the offline computing task based on the first execution parameter and obtained the corresponding computing result, it will respond to the result data reflow instruction and reflow the above computing result to the online end.
[0166] S422: The online end stores the calculation result in a first result table.
[0167] Specifically, S422 is consistent with S220 and will not be repeated here.
[0168] Next, please refer to Figure 5, which is a flowchart of another data processing method provided by an exemplary embodiment of this specification. As shown in Figure 5, the data processing method includes the following steps 502 to 528.
[0169] S502, obtaining data processing instructions on the online side.
[0170] Specifically, S502 is consistent with S202 and will not be repeated here.
[0171] S504: The online end responds to the data processing instruction and obtains corresponding configuration data.
[0172] Specifically, S504 is consistent with S204 and will not be repeated here.
[0173] S506: The online end generates a first execution parameter based on the configuration data.
[0174] Specifically, S506 is consistent with S206 and will not be repeated here.
[0175] S508: The online end serializes the first execution parameter to obtain a second execution parameter.
[0176] Specifically, S508 is consistent with S208 and will not be repeated here.
[0177] S510: The online end sends an offline task instruction to the offline end based on the second execution parameter.
[0178] Specifically, S510 is consistent with S210 and will not be repeated here.
[0179] S512: The offline end generates a corresponding offline computing task in response to the offline task instruction.
[0180] Specifically, S512 is consistent with S212 and will not be repeated here.
[0181] S514: The offline end deserializes the second execution parameter to obtain the first execution parameter.
[0182] Specifically, S514 is consistent with S214 and will not be repeated here.
[0183] S516: The offline end executes the offline computing task based on the first execution parameter to obtain a corresponding computing result.
[0184] Specifically, S516 is consistent with S216 and will not be repeated here.
[0185] S518: When the duration of obtaining the data processing instruction reaches the first target duration, the online end sends a task status query instruction to the offline end.
[0186] Specifically, the online end can be triggered by the scheduled scheduling engine to send a task status query instruction to the offline end at regular intervals. For example, but not limited to, when the duration of the acquired data processing instruction reaches a first target duration, the task status query instruction is automatically sent to the offline end. This task status query instruction is used to query whether the offline computing task on the offline end has been completed. This first target duration can be 8 minutes, 8 seconds, etc., and is not limited to this embodiment of this specification.
[0187] For example, after the online end obtains the data processing instruction, the online end's timing scheduling engine can automatically trigger the sending of a task status query instruction to the offline end after 2 minutes.
[0188] S520: The offline end returns the corresponding offline task status to the online end based on the task status query instruction.
[0189] Specifically, after receiving a task status query command from the online end, the offline end returns the offline task status corresponding to the offline computing task to the online end based on the task status query command. The offline task status represents the lifecycle of the offline computing task and may include, but is not limited to, initialization, pending execution, executing, and successful execution.
[0190] S522: The online end determines whether the offline task status is a successful execution status.
[0191] Specifically, the online end can determine whether the offline end has successfully executed the offline computing task through the offline task status returned by the offline end.
[0192] S524 , when the offline task status is a successful execution status, the online end sends a result data reflow instruction to the offline end.
[0193] Specifically, if the offline task status is a successful execution status, it means that the offline end has successfully executed the offline computing task corresponding to the configuration data. Then, the corresponding result data return instruction can be sent directly to the offline end to trigger the offline end to return the calculation results corresponding to the offline computing task to the online end.
[0194] S526: The offline end responds to the result data return instruction and returns the calculation result to the online end.
[0195] Specifically, S526 is consistent with S420 and will not be repeated here.
[0196] S528: The online end stores the calculation result in the first result table.
[0197] Specifically, S528 is consistent with S220 and will not be repeated here.
[0198] Next, please continue to refer to FIG. 5 . As shown in FIG. 5 , in S522 , after the online end determines whether the offline task status is a successful execution status, the data processing method further includes S530 .
[0199] S530: When the offline task status is not a successful execution status, the online end updates the first target duration to a second target duration.
[0200] Specifically, if the offline task status is not a successful execution state, indicating that the offline terminal has not yet completed the offline computing task corresponding to the configuration data, the first target duration can be updated to a second target duration, and S518 above is executed again. When the duration of the acquired data processing instruction reaches the first target duration, the task status query instruction is sent to the offline terminal. The second target duration is equal to the first target duration plus the preset duration. The preset duration can be 8 minutes, 8 seconds, etc., and is not limited to this embodiment of this specification.
[0201] In the embodiments of this specification, as long as the offline end has not completed the offline computing task corresponding to the configuration data, the online end will trigger the sending of a task status query instruction to the offline end at regular intervals. For example, but not limited to, after the online end obtains the data processing instruction, it will trigger the sending of a task status query instruction to the offline end every 10 seconds, ensuring that the online end can timely understand the offline task status of the offline end, thereby improving the real-time performance of data processing.
[0202] In some possible embodiments, at S202, after the online end obtains the data processing instruction, the online end may generate a corresponding online task in response to the data processing instruction based on the configuration data pre-entered by the business party. The online task is used to record the lifecycle of the task corresponding to the data processing instruction. For example, but not limited to, as shown in FIG6 , the lifecycle of the task corresponding to the data processing instruction recorded in the online task may include, but not limited to, an initialization period, an execution period, and a successful execution period. Furthermore, after receiving the offline task status returned by the offline end, the online end may also update the online task based on the offline task status. For example, but not limited to, when the offline task status is a successful execution state, the generation period recorded in the online task may be updated to a successful execution period.
[0203] Next, please refer to Figure 7, which is a schematic diagram of the overall implementation process of a data processing method provided by an exemplary embodiment of this specification. As shown in Figure 7, the business party (user) corresponding to the online end can directly enter the configuration data required for the offline computing task on the online end, triggering the online end to generate a task record persisted to the database based on the configuration data. This record is used to record the entire life cycle of the task corresponding to the above configuration data, that is, to record the state changes of the task from the time the business party triggers the task to the time the offline end returns the task result (computation result). After the online end generates the corresponding online task, it can first load the received configuration data, then format the data according to the usage scenario corresponding to the configuration data to generate the corresponding first execution parameter. To ensure that the first execution parameter corresponding to the configuration data can be fully transmitted to the offline end, the first execution parameter will be serialized according to the implementation process specifically described in S208 above to obtain the second execution parameter, and then trigger the offline task, that is, send the corresponding offline task instruction to the offline end. In response to the received offline task instruction, the offline end will generate the corresponding offline computing task and deserialize the second execution parameter carried in the offline task instruction to obtain the first execution parameter corresponding to the configuration data. Then, based on the first execution parameter, the corresponding offline computing task is executed to obtain and store the corresponding computing results. The above computing results can be stored in the second result table (odps result table) corresponding to the offline end, and the above second result table is used to record the results of the offline computing processing of the offline end. The online end is equipped with a timing scheduling engine. After being triggered to generate an online task, it will also regularly poll the task results through the timing scheduling engine, that is, send the corresponding task status query instruction to the offline end, so as to understand whether the offline computing task is completed according to the offline task status returned by the offline end. Exemplarily, the above-mentioned polling task result can be, but is not limited to, automatically triggering a task result query after 2 minutes or 1 minute after the business party triggers the task online. If the query finds that the offline computing task is not completed, the task result query can be triggered again every 10 seconds, but is not limited to. If the query finds that the offline computing task is completed, it will trigger the data reflow task of the offline end, that is, sending the corresponding result data reflow instruction to the offline end, so that the offline end can respond to the result data reflow instruction and reflow the calculation results corresponding to the above-mentioned configuration data stored in the second result table (odps result table) to the first result table (OB result table) of the online end, thereby ensuring that after the offline end processes the data, it can flow back to the online end in real time, realizing the quasi-real-time performance of offline big data computing tasks and online application systems in collaborative data processing.
[0204] Next, please refer to Figure 8, which is a schematic diagram of the structure of a data processing device provided in an exemplary embodiment of this specification. The data processing device is applied to an online terminal. As shown in Figure 8, the data processing device 800 includes a first acquisition module 810, a second acquisition module 820, a first generation module 830, a serialization module 840, a first sending module 850, and a third acquisition module 860.
[0205] The first acquisition module 810 is configured to acquire a data processing instruction.
[0206] The second acquisition module 820 is configured to acquire corresponding configuration data in response to the above data processing instruction.
[0207] The first generating module 830 is configured to generate a first execution parameter based on the configuration data.
[0208] The serialization module 840 is configured to serialize the first execution parameter to obtain a second execution parameter.
[0209] The first sending module 850 is used to send an offline task instruction to the offline end based on the above-mentioned second execution parameter, so that the above-mentioned offline end generates a corresponding offline computing task in response to the above-mentioned offline task instruction, deserializes the above-mentioned second execution parameter to obtain the above-mentioned first execution parameter, and executes the above-mentioned offline computing task based on the above-mentioned first execution parameter to obtain the corresponding computing result.
[0210] The third acquisition module 860 is configured to acquire the calculation result sent by the offline terminal and store the calculation result in the first result table.
[0211] In a possible implementation, the third obtaining module 860 includes:
[0212] a first sending unit, configured to send a result data reflow instruction to the offline end, so that the offline end responds to the result data reflow instruction and reflows the calculation result to the online end;
[0213] The first receiving unit is configured to receive the calculation result of the offline end return flow.
[0214] In a possible implementation, the data processing device 800 further includes:
[0215] A second sending module is configured to send a task status query instruction to the offline end when the duration of obtaining the data processing instruction reaches a first target duration, so that the offline end returns a corresponding offline task status to the online end based on the task status query instruction; the offline task status is used to represent the life cycle of the offline computing task;
[0216] A first receiving module is used to receive the offline task status returned by the offline terminal;
[0217] The first sending unit is specifically configured to:
[0218] When the offline task status is a successful execution status, a result data reflow instruction is sent to the offline end.
[0219] In a possible implementation, the data processing device 800 further includes:
[0220] The first update module is used to update the above-mentioned first target duration to the second target duration when the above-mentioned offline task status is not the above-mentioned execution success status, and again execute the above-mentioned step of sending the task status query instruction to the above-mentioned offline end when the duration of obtaining the above-mentioned data processing instruction reaches the first target duration; the above-mentioned second target duration is equal to the above-mentioned first target duration plus the preset duration.
[0221] In a possible implementation, the data processing device 800 further includes:
[0222] A fourth acquisition module is used to acquire the configuration data input by the business party corresponding to the online terminal;
[0223] The second acquisition module 820 is specifically configured to:
[0224] In response to the data processing instruction, the configuration data is loaded.
[0225] In a possible implementation, the data processing device 800 further includes:
[0226] An online task generation module, configured to generate corresponding online tasks according to the configuration data in response to the data processing instructions; the online tasks are configured to record the life cycle of the tasks corresponding to the data processing instructions;
[0227] The data processing device 800 further includes:
[0228] The second updating module is used to update the online task based on the offline task status.
[0229] In one possible implementation, the serialization module 840 is specifically configured to:
[0230] The first target character in the above-mentioned first execution parameter is replaced with the corresponding second target character according to the preset correspondence relationship to obtain the second execution parameter; the above-mentioned first target character is used to represent the character in the above-mentioned first execution parameter that the above-mentioned offline end does not support transmission; the above-mentioned second target character is used to represent the character corresponding to the above-mentioned first target character that the above-mentioned offline end supports transmission; the above-mentioned preset correspondence relationship is used to represent the correspondence between the above-mentioned first target character and the above-mentioned second target character.
[0231] The division of the modules in the above-mentioned data processing device is for illustration only. In other embodiments, the data processing device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned data processing device. The implementation of each module in the data processing device provided in the embodiments of this specification can be in the form of a computer program. The computer program can be executed on a terminal or server. The program modules constituting the computer program can be stored in the memory of the terminal or server. When the computer program is executed by the processor, it implements all or part of the steps of the data processing method described in the embodiments of this specification.
[0232] Next, please refer to Figure 9, which is a schematic diagram of the structure of another data processing device provided in an exemplary embodiment of this specification. The above-mentioned data processing device is applied to an offline terminal. As shown in Figure 9, the data processing device 900 includes a second receiving module 910, a second generating module 920, a deserialization module 930, an execution module 940, and a third sending module 950.
[0233] The second receiving module 910 is used to receive an offline task instruction sent by the online end; the offline task instruction carries a second execution parameter; the second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data.
[0234] The second generating module 920 is configured to generate a corresponding offline computing task in response to the offline task instruction.
[0235] The deserialization module 930 is configured to deserialize the second execution parameter to obtain the first execution parameter.
[0236] The execution module 940 is used to execute the above-mentioned offline computing task based on the above-mentioned first execution parameter to obtain the corresponding computing result.
[0237] The third sending module 950 is used to send the above calculation results to the above online end.
[0238] In a possible implementation, the third sending module 950 includes:
[0239] A second receiving unit is used to receive the result data reflow instruction sent by the online end;
[0240] The reflux unit is configured to respond to the result data reflux instruction and reflux the calculation result to the online end.
[0241] In a possible implementation, the data processing device 900 further includes:
[0242] The third receiving module is used to receive the task status query instruction sent by the online end;
[0243] A fourth sending module is used to return the corresponding offline task status to the online end based on the task status query instruction; the offline task status is used to represent the life cycle of the offline computing task;
[0244] The second receiving unit is specifically configured to:
[0245] When the offline task status is a successful execution status, a result data reflow instruction sent by the online end is received.
[0246] In one possible implementation, the deserialization module 930 is specifically configured to:
[0247] According to the preset correspondence, the second target character in the second execution parameter is replaced with the corresponding first target character to obtain the first execution parameter; the first target character is used to represent the character in the first execution parameter that the offline end does not support transmission; the second target character is used to represent the character corresponding to the first target character that the offline end supports transmission; the preset correspondence is used to represent the correspondence between the first target character and the second target character.
[0248] The division of the modules in the above-mentioned data processing device is for illustration only. In other embodiments, the data processing device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned data processing device. The implementation of each module in the data processing device provided in the embodiments of this specification can be in the form of a computer program. The computer program can be executed on a terminal or server. The program modules constituting the computer program can be stored in the memory of the terminal or server. When the computer program is executed by the processor, it implements all or part of the steps of the data processing method described in the embodiments of this specification.
[0249] Next, please refer to Figure 10, which is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this specification. As shown in Figure 10, the electronic device 1000 may include: at least one processor 1010, at least one communication bus 1020, a user interface 1030, at least one network interface 1040, and a memory 1050.
[0250] The communication bus 1020 may be used to implement connection and communication among the above-mentioned components.
[0251] The user interface 1030 may include a display screen (Display) and a camera (Camera), and the optional user interface may also include a standard wired interface and a wireless interface.
[0252] The network interface 1040 may optionally include a Bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, and the like.
[0253] The processor 1010 may include one or more processing cores. The processor 1010 utilizes various interfaces and circuits to connect various components within the electronic device 1000. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1050, and accessing data stored in the memory 1050, the processor 1010 performs various functions and processes data for the routing electronic device 1000. Optionally, the processor 1010 may be implemented using at least one hardware form factor selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1010 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content displayed on the display; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 1010 and may be implemented as a separate chip.
[0254] Among them, the memory 1050 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1050 includes a non-transitory computer-readable medium. The memory 1050 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1050 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as an acquisition function, a serialization function, a generation function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1050 may also be at least one storage device located away from the aforementioned processor 1010. As shown in Figure 10, the memory 1050 as a computer storage medium may include an operating system, a network communication module, a user interface module and program instructions.
[0255] In some possible embodiments, the electronic device 1000 may be the data processing device shown in FIG. 8 , and the processor 1010 may be configured to call the program instructions stored in the memory 1050 and specifically perform the following operations: obtaining a data processing instruction; obtaining corresponding configuration data in response to the data processing instruction; generating a first execution parameter based on the configuration data; serializing the first execution parameter to obtain a second execution parameter; sending an offline task instruction to the offline end based on the second execution parameter, so that the offline end generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result; obtaining the computing result sent by the offline end, and storing the computing result in the first result table.
[0256] In some possible embodiments, when the processor 1010 executes the above-mentioned acquisition of the calculation result sent by the offline end, it is specifically used to execute: sending a result data reflow instruction to the offline end, so that the offline end responds to the result data reflow instruction and reflows the calculation result to the online end; and receiving the calculation result reflowed by the offline end.
[0257] In some possible embodiments, after executing the instruction to obtain data processing and before executing the instruction to send result data back to the offline terminal, the processor 1010 is further configured to execute:
[0258] When the duration of obtaining the above-mentioned data processing instruction reaches the first target duration, a task status query instruction is sent to the above-mentioned offline end, so that the above-mentioned offline end returns the corresponding offline task status to the above-mentioned online end based on the above-mentioned task status query instruction; the above-mentioned offline task status is used to characterize the life cycle of the above-mentioned offline computing task; and the above-mentioned offline task status returned by the above-mentioned offline end is received.
[0259] When the processor 1010 executes the instruction to send the result data backflow to the offline terminal, it is specifically configured to execute: when the offline task status is a successful execution status, send the result data backflow instruction to the offline terminal.
[0260] In some possible embodiments, after the processor 1010 executes the above-mentioned receiving of the above-mentioned offline task status returned by the above-mentioned offline terminal, it is also used to execute: when the above-mentioned offline task status is not the above-mentioned execution success status, updating the above-mentioned first target duration to the second target duration, and executing again the above-mentioned step of sending a task status query instruction to the above-mentioned offline terminal when the duration of obtaining the above-mentioned data processing instruction reaches the first target duration; the above-mentioned second target duration is equal to the above-mentioned first target duration plus the preset duration.
[0261] In some possible embodiments, before executing the above-mentioned data acquisition processing instruction, the above-mentioned processor 1010 is further configured to execute: acquiring the above-mentioned configuration data input by the business party corresponding to the above-mentioned online end.
[0262] When the processor 1010 executes the above-mentioned response to the above-mentioned data processing instruction and obtains the corresponding configuration data, it is specifically used to execute: loading the above-mentioned configuration data in response to the above-mentioned data processing instruction.
[0263] In some possible embodiments, after executing the above-mentioned acquisition data processing instruction, the processor 1010 executes the above-mentioned response to the above-mentioned data processing instruction and before obtaining the corresponding configuration data, and is further used to execute: in response to the above-mentioned data processing instruction, generate a corresponding online task according to the above-mentioned configuration data; the above-mentioned online task is used to record the life cycle of the task corresponding to the above-mentioned data processing instruction.
[0264] After receiving the offline task status returned by the offline end, the processor 1010 is further configured to update the online task based on the offline task status.
[0265] In some possible embodiments, when the processor 1010 executes the serialization of the first execution parameter to obtain the second execution parameter, it is specifically used to execute: replacing the first target character in the first execution parameter with the corresponding second target character according to a preset correspondence to obtain the second execution parameter; the first target character is used to represent the character in the first execution parameter that the offline end does not support transmission; the second target character is used to represent the character corresponding to the first target character that the offline end supports transmission; the preset correspondence is used to represent the correspondence between the first target character and the second target character.
[0266] In some possible embodiments, the electronic device 1000 may also be the data processing device shown in FIG. 9 , and the processor 1010 may be used to call the program instructions stored in the memory 1050 and perform the following operations: receiving an offline task instruction sent by the online end; the offline task instruction carries a second execution parameter; the second execution parameter is serialized from the first execution parameter generated by the online end based on the configuration data; generating a corresponding offline computing task in response to the offline task instruction; deserializing the second execution parameter to obtain the first execution parameter; executing the offline computing task based on the first execution parameter to obtain a corresponding computing result; and sending the computing result to the online end.
[0267] In some possible embodiments, when the processor 1010 executes the above-mentioned sending of the calculation result to the online end, it is specifically used to execute: receiving a result data reflow instruction sent by the online end; and reflowing the calculation result to the online end in response to the result data reflow instruction.
[0268] In some possible embodiments, after executing the offline task instruction received from the online end and before executing the result data reflow instruction received from the online end, the processor 1010 is further configured to: receive a task status query instruction sent from the online end; based on the task status query instruction, return the corresponding offline task status to the online end; the offline task status is used to represent the life cycle of the offline computing task.
[0269] When the processor 1010 executes the instruction to receive the result data reflow sent by the online end, it is specifically configured to execute: when the offline task status is a successful execution status, receive the result data reflow instruction sent by the online end.
[0270] In some possible embodiments, when the processor 1010 executes the deserialization of the second execution parameter to obtain the first execution parameter, it is specifically used to execute: replacing the second target character in the second execution parameter with the corresponding first target character according to a preset correspondence relationship to obtain the first execution parameter; the first target character is used to represent the character in the first execution parameter that the offline end does not support transmission; the second target character is used to represent the character corresponding to the first target character that the offline end supports transmission; the preset correspondence relationship is used to represent the correspondence between the first target character and the second target character.
[0271] The embodiments of this specification also provide a computer-readable storage medium containing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of the above embodiments. If the components of the above-described data processing device are implemented as software functional units and sold or used as independent products, they can be stored in the above-described computer-readable storage medium.
[0272] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The above-mentioned computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, the above-mentioned process or function according to the embodiment of this specification is generated in whole or in part. The above-mentioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium or transmitted by the above-mentioned computer-readable storage medium. The above-mentioned computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The above-mentioned computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available media may be magnetic media (eg, floppy disks, hard disks, tapes), optical media (eg, digital versatile discs (DVDs)), or semiconductor media (eg, solid state disks (SSDs)).
[0273] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. The technical features of this embodiment and the implementation scheme can be combined in any manner unless they conflict.
[0274] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims.
[0275] The foregoing description of specific embodiments of this specification is intended to be a description of other embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims and specification can be performed in a different order than that described in the embodiments described in the specification and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A data processing method, the method being applied to an online terminal; the method comprising: Obtaining data processing instructions; In response to the data processing instruction, obtaining corresponding configuration data; generating a first execution parameter based on the configuration data; Serializing the first execution parameter to obtain a second execution parameter; Sending an offline task instruction to the offline end based on the second execution parameter, so that the offline end generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result; The calculation result sent by the offline end is obtained, and the calculation result is stored in a first result table.
2. The method according to claim 1, wherein obtaining the calculation result sent by the offline terminal comprises: Sending a result data return instruction to the offline end, so that the offline end responds to the result data return instruction and returns the calculation result to the online end; The calculation result of the offline end return flow is received.
3. The method according to claim 2, after obtaining the data processing instruction and before sending the result data backflow instruction to the offline end, the method further comprises: When the duration of acquiring the data processing instruction reaches the first target duration, sending a task status query instruction to the offline end, so that the offline end returns the corresponding offline task status to the online end based on the task status query instruction; The offline task state is used to characterize the life cycle of the offline computing task; Receiving the offline task status returned by the offline end; The sending of the result data backflow instruction to the offline end includes: When the offline task status is a successful execution status, a result data reflow instruction is sent to the offline end.
4. The method according to claim 3, after receiving the offline task status returned by the offline end, the method further comprises: When the offline task status is not the execution success status, the first target duration is updated to the second target duration, and the step of sending a task status query instruction to the offline end when the duration of obtaining the data processing instruction reaches the first target duration is executed again; the second target duration is equal to the first target duration plus the preset duration.
5. The method according to claim 3 or 4, before obtaining the data processing instruction, the method further comprises: Acquire the configuration data input by the service party corresponding to the online end; The step of obtaining corresponding configuration data in response to the data processing instruction includes: In response to the data processing instruction, the configuration data is loaded.
6. The method according to claim 5, after obtaining the data processing instruction and before obtaining the corresponding configuration data in response to the data processing instruction, the method further comprises: In response to the data processing instruction, generating a corresponding online task according to the configuration data; The online task is used to record the life cycle of the task corresponding to the data processing instruction; After receiving the offline task status returned by the offline end, the method further includes: The online task is updated based on the offline task status.
7. The method according to claim 1, wherein serializing the first execution parameter to obtain the second execution parameter comprises: According to a preset corresponding relationship, the first target character in the first execution parameter is replaced with the corresponding second target character to obtain a second execution parameter; The first target character is used to represent a character in the first execution parameter that the offline end does not support transmission; The second target character is used to indicate that the offline end supports transmission of the first target The preset corresponding relationship is used to represent the corresponding relationship between the first target character and the second target character.
8. A data processing method, the method being applied to an offline terminal; the method comprising: Receive offline task instructions sent by the online end; The offline task instruction carries a second execution parameter; The second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data; In response to the offline task instruction, generating a corresponding offline computing task; Deserialize the second execution parameter to obtain the first execution parameter; Execute the offline computing task based on the first execution parameter to obtain a corresponding computing result; The calculation result is sent to the online end.
9. The method according to claim 8, wherein sending the calculation result to the online end comprises: Receiving a result data reflow instruction sent by the online end; In response to the result data reflow instruction, the calculation result is reflowed to the line end.
10. The method according to claim 9, after receiving the offline task instruction sent by the online end and before receiving the result data reflow instruction sent by the online end, the method further comprises: Receiving a task status query instruction sent by the online end; Based on the task status query instruction, return the corresponding offline task status to the online end; The offline task state is used to characterize the life cycle of the offline computing task; The receiving the result data reflow instruction sent by the online end includes: When the offline task status is a successful execution status, a result data reflow instruction sent by the online end is received.
11. The method according to claim 8, wherein deserializing the second execution parameter to obtain the first execution parameter comprises: Replacing the second target character in the second execution parameter with the corresponding first target character according to a preset corresponding relationship to obtain the first execution parameter; The first target character is used to represent a character in the first execution parameter that the offline end does not support transmission; The second target character is used to represent the character corresponding to the first target character and supported for transmission by the offline end; and the preset corresponding relationship is used to represent the corresponding relationship between the first target character and the second target character.
12. A data processing device, the device being applied to an online terminal; the device comprising: A first acquisition module, used for acquiring a data processing instruction; A second acquisition module, configured to acquire corresponding configuration data in response to the data processing instruction; A first generating module, configured to generate a first execution parameter based on the configuration data; A serialization module, used for serializing the first execution parameter to obtain a second execution parameter; A first sending module is used to send an offline task instruction to the offline end based on the second execution parameter, so that the offline end generates a corresponding offline computing task in response to the offline task instruction, deserializes the second execution parameter to obtain the first execution parameter, and executes the offline computing task based on the first execution parameter to obtain a corresponding computing result; The third acquisition module is used to acquire the calculation result sent by the offline terminal and store the calculation result in the first result table.
13. A data processing device, the device being applied to an online terminal; the device comprising: The second receiving module is used to receive the offline task instruction sent by the online end; The offline task instruction carries a second execution parameter; The second execution parameter is obtained by serializing the first execution parameter generated by the online end based on the configuration data; A second generating module, configured to generate a corresponding offline computing task in response to the offline task instruction; A deserialization module, used for deserializing the second execution parameter to obtain the first execution parameter; An execution module, configured to execute the offline computing task based on the first execution parameter to obtain a corresponding computing result; The third sending module is used to send the calculation result to the online end.
14. A data processing system, comprising an online end and an offline end; the online end is used to execute the method according to any one of claims 1 to 7; the offline end is used to execute the method according to any one of claims 8 to 11.
15. An electronic device, comprising: Processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1-7 or 8-11.
16. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1-7 or 8-11.
17. A computer program product comprising instructions, which, when the computer program product is run on a computer or a processor, causes the computer or the processor to perform the method according to any one of claims 1 to 7 or 8 to 11.
Citation Information
Patent Citations
Task processing method and device
CN113986580A
Task execution method and device, terminal equipment and readable storage medium
CN114257637A
Offline service calling method, device and system and storage medium
CN115994017A
Mixing online investigation method based on edge calculation
CN116051174A
APP formatted file offline storage method and device, equipment and storage medium
CN116501700A