Data processing method and device, electronic equipment, product and storage medium
By using remote procedure call RPC and path set BoP algorithm in the data center for code consistency verification and data processing, the problem of resource waste and insufficient stability in data production business continuity guarantee is solved, and efficient and economical data processing is realized. Production and disaster recovery resource utilization.
Patent Information
- Application Number
- CN202410422963.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-10-18
AI Technical Summary
The existing data production business in the data center has problems such as large resource redundancy, serious waste, and insufficient flexibility and stability when ensuring business continuity. This causes the enterprise's operational efficiency and costs to be negatively affected, and it fails to effectively consider data. Consistency of production task codes and full-process disaster recovery construction.
Using a data processing method based on pre-generated scheduling information and remote procedure call RPC, the production-side code and the disaster recovery-side code are checked for consistency through the path set BoP algorithm, and when the codes are consistent, the data analysis business is performed to obtain each The business completion status is used to obtain business data, and the business data is loaded to the data service user through RPC to achieve data aggregation and openness.
It reduces the cost of data aggregation, ensures the consistency of business data production, makes full use of disaster recovery end resources, improves the efficiency of data production, and optimizes the stability and resource utilization of enterprise data production.
Smart Images

Figure CN118796503A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and specifically to a data processing method, device, electronic equipment, product and storage medium. Background Art
[0002] As enterprises continue to advance their digital transformation, the importance and status of data platforms and data production in their businesses have become increasingly prominent, and the requirements for business continuity have also continued to increase. However, in practice, there are many challenges in ensuring the continuity of data production services, such as large resource redundancy, serious waste, and insufficient flexibility and stability. These problems will not only have a negative impact on the operational efficiency and costs of the enterprise, but may also damage the company's reputation and customer satisfaction.
[0003] There are currently many methods for ensuring the continuity of data production services in the data center. (1) Detect the heartbeat response of the first and second data centers to determine whether there are any abnormalities in the data centers, and automatically identify abnormal conditions in the dual data centers and make corresponding switching operations. This method only considers the situation where the global data center fails, and does not consider the situation where some data fails. (2) Adaptively trigger the data synchronization between the storage devices on the production side and the storage devices on the disaster recovery side to reduce the data difference between the storage devices on the production side and the storage devices on the disaster recovery side, and reduce the amount of data loss when a failure occurs. Although this method considers the adaptive trigger synchronization between the production side and the disaster recovery side based on data to fully utilize the resources of the disaster recovery side, it does not consider the consistency of the data production task code and the construction of the disaster recovery side for the entire data production process.
[0004] In summary, the efficiency of existing enterprise data production is low. Summary of the invention
[0005] The embodiments of the present application provide a data processing method, device, electronic device, product and storage medium to solve the technical problem of low efficiency of existing enterprise data production.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, including: based on pre-generated scheduling information and remote procedure calls (RPCs), controlling a running state scheduling group to load data from a data service user, and obtaining aggregated data based on the loading result; based on a path set BoP algorithm, performing consistency verification on a production-end code and a disaster recovery-end code; when the production-end code and the disaster recovery-end code are verified to be consistent, executing the production-end code to obtain a first completion status of each data analysis business, executing the disaster recovery-end code to obtain a second completion status of each data analysis business, and obtaining business data of each data analysis business based on the first completion status and the second completion status of each data analysis business; based on the RPC, controlling the running state scheduling group to load the business data to the data service user.
[0007] In one embodiment, the path set-based BoP algorithm performs consistency check on the production-side code and the disaster recovery-side code, including: inputting the production-side code into a language compiler to obtain a first structured query language, and inputting the disaster recovery-side code into the language compiler to obtain a second structured query language; based on the first structured query language, determining the production-side path set, and based on the second structured query language, determining the disaster recovery-side path set; comparing the cosine similarity of the paths of the production-side path set with the paths of the disaster recovery-side path set, and when the cosine similarity is greater than a set threshold, determining that the production-side code and the disaster recovery-side code are consistent.
[0008] In one embodiment, determining a production-end path set based on the first structured query language includes: splitting the first structured query language into words according to the grammatical rules of the structured query language, and determining root nodes, intermediate nodes, and leaf nodes based on the combination relationship between the words to construct a production-end abstract syntax tree; starting from the root node of the production-end abstract syntax tree, randomly traversing intermediate nodes until traversing to a leaf node to obtain a path, and obtaining the production-end path set based on all the root nodes of the production-end abstract syntax tree, wherein the production-end path set includes multiple paths.
[0009] In one embodiment, the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business, including: when the first completion status and the second completion status of the data analysis business are both completed, the business data is obtained based on the first completion status; when the first completion status of the data analysis business is not completed and the second completion status is completed, the business data is obtained based on the second completion status.
[0010] In one embodiment, the operating state scheduling group includes a production scheduling group and a disaster recovery scheduling group, and the interface of the operating state scheduling group is controlled based on the RPC to load the business data to the data service user, including: when the business data is obtained based on the first completion status, based on the business configuration information of the data service user and the RPC, the interface of the production scheduling group is controlled to load the business data from the production end to the data service user, and the production end is used to execute the production end code to obtain the business data; when the business data is obtained based on the second completion status, based on the business configuration information and the RPC, the interface of the disaster recovery scheduling group is controlled to load the business data from the disaster recovery end to the data service user, and the disaster recovery end is used to execute the disaster recovery end code to obtain the business data.
[0011] In one embodiment, the scheduling information is determined based on the following steps: based on a pre-generated data aggregation template, obtaining the name of each data service, the start time of each data service, the source data source information of each data service, the target data source information of each data service and the information of the running scheduling group to obtain the scheduling information.
[0012] In the second aspect, an embodiment of the present application provides a data processing device, including: a data aggregation module, which is used to control the running state scheduling group to load the data of the data service user based on pre-generated scheduling information and remote procedure call RPC, and obtain aggregated data based on the loading result; a verification module, which is used to perform consistency verification on the production end code and the disaster recovery end code based on the path set BoP algorithm; a business data acquisition module, which is used to execute the production end code when the production end code and the disaster recovery end code are verified to be consistent, to obtain the first completion status of each data analysis business, execute the disaster recovery end code, to obtain the second completion status of each data analysis business, and obtain the business data of each data analysis business based on the first completion status and the second completion status of each data analysis business; a data opening module, which is used to control the running state scheduling group based on the RPC to load the business data to the data service user.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the data processing method described in the first aspect when executing the program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the data processing method described in the first aspect when executed by a processor.
[0015] In a fifth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data processing method described in the first aspect.
[0016] The data processing method, device, electronic device, product and storage medium provided in the embodiment of the present application, based on the pre-generated scheduling information and remote procedure call RPC, controls the running state scheduling group to load the data of the data service user, and obtains the aggregated data based on the loading result; based on the path set BoP algorithm, performs consistency check on the production end code and the disaster recovery end code; when the production end code and the disaster recovery end code are verified to be consistent, execute the production end code to obtain the first completion status of each data analysis business, execute the disaster recovery end code to obtain the second completion status of each data analysis business, and obtain the business data of each data analysis business based on the first completion status and the second completion status of each data analysis business; based on the RPC, control the running state scheduling group to load the business data to the data service user. The present application obtains aggregated data through RPC, which is conducive to reducing the cost of data aggregation. By performing consistency check on the production end code and the disaster recovery end code, the difference between the production end and the disaster recovery end is avoided, which is conducive to ensuring the consistency of business data production. According to the first completion status and the second completion status of each of the data analysis services, the business data of each of the data analysis services is obtained, which makes full use of the resources of the disaster recovery end and is conducive to improving the efficiency of data production. The present application obtains aggregated data through RPC, performs consistency verification through the BoP algorithm, obtains business data according to the first completion status and the second completion status, and improves the efficiency of data production for data service users. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is one of the flow charts of the data processing method provided in the embodiment of the present application;
[0019] Figure 2 This is the second flow chart of the data processing method provided in the embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the process of data aggregation provided by an embodiment of the present application;
[0021] Figure 4It is a schematic diagram of the process of data production provided by the embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the data opening process provided in the embodiment of the present application;
[0023] Figure 6 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0024] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Figure 1 This is one of the flow charts of the data processing method provided in the embodiment of the present application. Figure 1 The present application embodiment provides a data processing method, including steps S100 to S400, each of which is as follows:
[0027] S100: Based on pre-generated scheduling information and remote procedure call RPC, control the running state scheduling group to load the data of the data service user, and obtain aggregated data based on the loading result.
[0028] The execution subject of the embodiment of the present application is a data processing system, such as Figure 3 As shown, it includes data management unit, operation state scheduling group, production end (data middle station) and disaster recovery end (data middle station). Data service users include enterprise data.
[0029] Remote Procedure Call (RPC) is a computer communication protocol that allows programs to communicate and call each other in different address spaces (for example, different computers). RPC enables a process to call a procedure or function in another process without the caller needing to know the specific implementation details of the called party, just like calling a local function.
[0030] like Figure 2 , 3As shown in the figure, to ensure the continuity of data aggregation, the data management unit uses various data aggregation templates developed in the early stage and uses RPC to call the running state scheduling group (templated RPC call) to extract the data of each data service user and obtain the aggregated data. The running state scheduling group includes the production scheduling group and the disaster recovery scheduling group, and the production scheduling group is physically isolated from the disaster recovery scheduling group. The production scheduling group loads the aggregated data to the production end, and the disaster recovery scheduling group loads the aggregated data to the disaster recovery end.
[0031] The data management unit has the capabilities of template development, template management, and initiating calls. The data management unit generates a data aggregation template for data aggregation based on the type of data service user and the technology stack of the data middle platform. The data management unit generates scheduling information based on the data aggregation template. The data aggregation template is shown in Table 1.
[0032] The scheduling information is determined based on the following steps: based on a pre-generated data aggregation template, obtain the name of each data service, the start time of each data service, the source data source information of each data service, the target data source information of each data service and the information of the running state scheduling group to obtain the scheduling information.
[0033] Table 1 Data aggregation template
[0034] Template Type Template Information Data aggregation Oracle Database (Oracle) - Distributed File System (HDFS) Data aggregation Oracle-Gaussian Database (Gbase) Data aggregation Ant Database (AntDB)-HDFS Data aggregation AntDB-Gbase Data aggregation GoldenDB-HDFS Data aggregation GoldenDB-Gbase Data aggregation Mysql Database - HDFS Data aggregation Mysql-Gbase Data aggregation Alibaba Cloud Database (Oceanbase) - HDFS Data aggregation Oceanbase-Gbase Data aggregation DAMO-HDFS Data aggregation DAMO-Gbase Data aggregation File Transfer Protocol (FTP) - HDFS Data aggregation FTP-Gbase Data aggregation Gbase-HDFS Data aggregation Gbase-Gbase Data aggregation HDFS-HDFS
[0035] S200: Based on the path set BoP algorithm, the code on the production side and the code on the disaster recovery side are checked for consistency.
[0036] like Figure 2 , 4 As shown, in order to ensure the continuity of data production, the data processing system also includes a development state scheduling group, which includes a development state production scheduling group and a development state disaster recovery scheduling group. The development state production scheduling group is physically isolated from the development state disaster recovery scheduling group. The development state scheduling group saves or publishes the development state code as the running state code. Figure 4 As shown, the development-state production scheduling group saves or publishes the development-state code in the production scheduling group to obtain the production-side code, and the development-state disaster recovery scheduling group saves or publishes the development-state code in the disaster recovery scheduling group to obtain the disaster recovery-side code, so as to achieve "one set of code, two sets of scheduling". The data management unit regularly performs consistency verification on the production-side code and the disaster recovery-side code based on the Bag of Paths (BoP) algorithm.
[0037] BoP is an algorithm for image retrieval. It uses local features and global information of images to represent images, thereby performing similarity matching and retrieval.
[0038] Developers develop code and obtain development-state code. Publish the development-state code to obtain production-end code and disaster recovery-end code. The data management unit performs data consistency verification on production-end code and disaster recovery-end code. The data management unit provides global variable configuration capabilities to avoid code inconsistencies caused by inconsistent production and disaster recovery environments. For example, if the production-end tenant name is dwfu and the disaster recovery-end tenant name is bddw, the ${dwfu} global variable is used for unified representation.
[0039] S300: When the production-side code and the disaster recovery-side code are verified to be consistent, the production-side code is executed to obtain the first completion status of each data analysis business, and the disaster recovery-side code is executed to obtain the second completion status of each data analysis business. Based on the first completion status and the second completion status of each data analysis business, the business data of each data analysis business is obtained.
[0040] When the production-side code and the disaster recovery-side code are verified to be consistent, the production side executes the production-side code as planned according to the scheduling information to perform multiple data analysis services, thereby realizing data production. After the production side completes each data analysis service, it records the corresponding log information to obtain the first completion status. The disaster recovery side executes the disaster recovery-side code as planned according to the scheduling information to perform multiple data analysis services, thereby realizing data production. After the disaster recovery side completes each data analysis service, it records the corresponding log information to obtain the second completion status. The log information includes information such as the service name, execution start time, execution completion time, execution status, and execution plane of each data analysis service.
[0041] Based on the first completion status and the second completion status of each data analysis business, the business data of each data analysis business is obtained. Specifically, when the first completion status and the second completion status of the data analysis business are both completed, the business data is obtained based on the first completion status; when the first completion status of the data analysis business is not completed and the second completion status is completed, the business data is obtained based on the second completion status.
[0042] The data management unit obtains the first completion status and the second completion status based on the log information. If the first completion status and the second completion status of the current data analysis business are both completed, the data obtained by the production end analysis is used as the business data of the data analysis business by default. If the first completion status of the current data analysis business is not completed and the second completion status is completed, the data obtained by the disaster recovery end analysis is used as the business data of the data analysis business.
[0043] S400: Based on the RPC, control the running state scheduling group to load the business data to the data service user.
[0044] The running state scheduling group includes a production scheduling group and a disaster recovery scheduling group. Based on RPC, the interface of the running state scheduling group is controlled to load business data to the data service user. Specifically, when business data is obtained based on the first completion situation, the interface of the production scheduling group is controlled based on the business configuration information of the data service user and RPC, and the business data is loaded from the production end to the data service user. The production end is used to execute the production end code to obtain the business data; when business data is obtained based on the second completion situation, the interface of the disaster recovery scheduling group is controlled based on the business configuration information and RPC, and the business data is loaded from the disaster recovery end to the data service user. The disaster recovery end is used to execute the disaster recovery end code to obtain the business data.
[0045] Business configuration information includes team information, scheduling information, data analysis business name, data analysis business cycle, data analysis business status, etc. of the data service user.
[0046] like Figure 2 , 5 As shown, in order to ensure the continuous opening of business data, when business data is obtained based on the first completion situation, the business configuration information is determined according to the pre-generated data service template. The data management unit uses the business configuration information (json string form) as an input parameter, uses RPC to call the interface of the production scheduling group (templated RPC call), and loads the business data from the production end to the data service user according to the interface of the production scheduling group. The further data service template is the same as the data aggregation template.
[0047] When business data is obtained based on the second completion status, the data management unit uses the business configuration information (in the form of a json string) as an input parameter, uses the RPC method to call the interface of the disaster recovery scheduling group, and loads the business data from the disaster recovery end to the data service user according to the interface of the disaster recovery scheduling group. According to the first completion status and the second completion status of each data analysis business, the production scheduling group and the disaster recovery scheduling group are called as needed to achieve adaptive switching of data openness.
[0048] The data processing method provided in the embodiment of the present application controls the running state scheduling group to load the data of the data service user based on the pre-generated scheduling information and remote procedure call RPC, and obtains the aggregated data based on the loading result; based on the path set BoP algorithm, the production end code and the disaster recovery end code are checked for consistency; when the production end code and the disaster recovery end code are checked to be consistent, the production end code is executed to obtain the first completion status of each data analysis business, the disaster recovery end code is executed to obtain the second completion status of each data analysis business, and the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business; based on RPC, the running state scheduling group is controlled to load the business data to the data service user. The embodiment of the present application obtains the aggregated data through RPC, which is conducive to reducing the cost of data aggregation. By performing consistency checks on the production end code and the disaster recovery end code, the differences between the production end and the disaster recovery end are avoided, which is conducive to ensuring the consistency of business data production. According to the first completion status and the second completion status of each of the data analysis businesses, the business data of each of the data analysis businesses is obtained, which makes full use of the resources of the disaster recovery end and is conducive to improving the efficiency of production data. The embodiment of the present application obtains aggregated data through RPC, performs consistency verification through the BoP algorithm, obtains business data according to the first completion status and the second completion status, and improves the efficiency of producing data for data service users.
[0049] The embodiment of the present application is based on the templated RPC calling capability of the data governance tool and the BoP algorithm to build a business continuity guarantee system covering the entire data production process, including data aggregation, data production, and data opening, aiming to improve the stability of the timeliness of enterprise data production and optimize the utilization rate of enterprise key business disaster recovery resources, avoiding problems such as waste of resources and excessive construction costs. The present application provides enterprises with a practical and economical solution to meet the challenges of data production business continuity.
[0050] Based on the above embodiment, based on the path set BoP algorithm, the consistency check is performed on the production end code and the disaster recovery end code, including steps S110 to S130, each step is specifically as follows:
[0051] S110: Input the production-side code into a language compiler to obtain a first structured query language, and input the disaster recovery-side code into a language compiler to obtain a second structured query language.
[0052] S120: Determine a production-side path set based on the first structured query language, and determine a disaster-recovery-side path set based on the second structured query language.
[0053] S130: Compare the cosine similarity of the paths of the production end path set and the paths of the disaster recovery end path set. When the cosine similarity is greater than a set threshold, determine that the production end code is consistent with the disaster recovery end code.
[0054] Based on the first structured query language, a production-side path set is determined. Specifically, according to the grammatical rules of the structured query language, the first structured query language is split into words, and based on the combination relationship between the words, the root node, the intermediate node and the leaf node are determined to construct a production-side abstract syntax tree; starting from the root node of the production-side abstract syntax tree, the intermediate nodes are randomly traversed until the leaf node is traversed to obtain a path, and based on all the root nodes of the production-side abstract syntax tree, a production-side path set is obtained, and the production-side path set includes multiple paths.
[0055] The consistency check uses the BoP algorithm. Input the production-side code into a language compiler, such as the Hive-SQL language compiler. The Hive-SQL language compiler splits the first structured query language into words or tokens according to the grammatical rules of the structured query language, and then builds the production-side abstract syntax tree (AST) according to the combination relationship of these words or symbols. The production-side abstract syntax tree includes a root node, an intermediate node, and a leaf node. The root node is used to represent important grammatical structures or grammatical elements in a word, such as SELECT, FROM, WHERE, etc. The intermediate node is a child node of the root node, and the leaf node is a child node of the child node. The intermediate node and the leaf node represent the substructure or parameter of the grammatical structure. Input the disaster recovery-side code into the Hive-SQL language compiler. The Hive-SQL language compiler splits the second structured query language into words according to the grammatical rules of the structured query language, and then builds the disaster recovery-side abstract syntax tree according to the combination relationship of these words.
[0056] In the abstract syntax tree (the production-side abstract syntax tree or the disaster-recovery-side abstract syntax tree), starting from the root node, select a direction to traverse the intermediate nodes until the leaf nodes are traversed to obtain a path. Record the information of all nodes (including the root node, intermediate nodes, and leaf nodes) and edges on the path. Repeat the above process until all paths are traversed. Store all paths extracted from the production-side abstract syntax tree in the production-side path set, and store all paths extracted from the disaster-recovery-side abstract syntax tree in the disaster-recovery-side path set. Monitor the consistency of the production-side code and the disaster-recovery-side code by comparing the similarity of the paths in the production-side path set with the paths in the disaster-recovery-side path set. Compare the cosine similarity of the paths in the production-side path set with the paths in the disaster-recovery-side path set. When the cosine similarity is greater than the set threshold, it is determined that the production-side code and the disaster-recovery-side code are consistent. At this time, there is no production risk between the production-side code and the disaster-recovery-side code.
[0057] The data processing method provided in the embodiment of the present application performs consistency verification on the production-side code and the disaster recovery-side code based on the BoP algorithm, thereby ensuring the consistency of the production-side code and the disaster recovery-side code, and is beneficial to improving the consistency of data production for data service users.
[0058] The embodiment of the present application performs disaster recovery for the entire data production process, including data aggregation, data analysis, and data opening, and adopts a templated RPC calling method and BoP code consistency detection capability, which can be used for low-cost disaster recovery construction. The embodiment of the present application flexibly switches disaster recovery and makes full use of the resources of the disaster recovery end. The embodiment of the present application proposes a template-based RPC calling capability, constructs multiple template capabilities to cover all aspects of data production, and flexibly switches according to the granularity of the data model, that is, data is opened on the principle of "finish first, produce first", making full use of the resources of the disaster recovery end. The embodiment of the present application proposes a code consistency detection capability based on the BoP method, which shields the differences between the production and disaster recovery planes, realizes the capability of "one code, two scheduling", and ensures the consistency of data production.
[0059] The data processing device provided in the embodiment of the present application is described below. The data processing device described below and the data processing method described above can be referred to in correspondence with each other. Figure 6 , Figure 6 Schematic diagram of the structure of a data processing device provided in an embodiment of the present application. A data processing device includes:
[0060] The data aggregation module 601 is used to control the running state scheduling group to load the data of the data service user based on the pre-generated scheduling information and remote procedure call RPC, and obtain the aggregated data based on the loading result;
[0061] Verification module 602, used to perform consistency verification on the production end code and the disaster recovery end code based on the path set BoP algorithm;
[0062] The business data acquisition module 603 is used to execute the production-side code to obtain the first completion status of each data analysis business when the production-side code and the disaster recovery-side code are verified to be consistent, execute the disaster recovery-side code to obtain the second completion status of each data analysis business, and obtain the business data of each data analysis business based on the first completion status and the second completion status of each data analysis business;
[0063] The data opening module 604 is used to control the running state scheduling group based on the RPC and load the business data to the data service user.
[0064] The data processing device provided in the embodiment of the present application controls the running state scheduling group to load the data of the data service user based on the pre-generated scheduling information and remote procedure call RPC, and obtains the aggregated data based on the loading result; performs consistency check on the production end code and the disaster recovery end code based on the path set BoP algorithm; when the production end code and the disaster recovery end code are consistent, the production end code is executed to obtain the first completion status of each data analysis business, and the disaster recovery end code is executed to obtain the second completion status of each data analysis business, and the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business; based on RPC, the running state scheduling group is controlled to load the business data to the data service user. The embodiment of the present application obtains the aggregated data through RPC, which is conducive to reducing the cost of data aggregation. By performing consistency check on the production end code and the disaster recovery end code, the difference between the production end and the disaster recovery end is avoided, which is conducive to ensuring the consistency of business data production. According to the first completion status and the second completion status of each of the data analysis businesses, the business data of each of the data analysis businesses is obtained, which makes full use of the resources of the disaster recovery end and is conducive to improving the efficiency of production data. The embodiment of the present application obtains aggregated data through RPC, performs consistency verification through the BoP algorithm, obtains business data according to the first completion status and the second completion status, and improves the efficiency of producing data for data service users.
[0065] In one embodiment, the verification module 602 is used to: input the production-side code into a language compiler to obtain a first structured query language, and input the disaster-recovery-side code into a language compiler to obtain a second structured query language; determine the production-side path set based on the first structured query language, and determine the disaster-recovery-side path set based on the second structured query language; compare the cosine similarity of the paths of the production-side path set with the paths of the disaster-recovery-side path set, and when the cosine similarity is greater than a set threshold, determine that the production-side code and the disaster-recovery-side code are consistent.
[0066] In one embodiment, the business data acquisition module 603 is used to: split the first structured query language into words according to the grammatical rules of the structured query language, determine the root node, the intermediate node and the leaf node based on the combination relationship between the words, so as to construct a production-side abstract syntax tree; starting from the root node of the production-side abstract syntax tree, randomly traverse the intermediate nodes until the leaf node is traversed to obtain a path, and based on all the root nodes of the production-side abstract syntax tree, obtain a production-side path set, and the production-side path set includes multiple paths.
[0067] In one embodiment, the business data acquisition module 603 is used to: when the first completion status and the second completion status of the data analysis business are both completed, obtain business data based on the first completion status; when the first completion status of the data analysis business is not completed and the second completion status is completed, obtain business data based on the second completion status.
[0068] In one embodiment, the data opening module 604 is used to: when business data is obtained based on the first completion status, based on the business configuration information and RPC of the data service user, control the interface of the production scheduling group to load the business data from the production end to the data service user, and the production end is used to execute the production end code to obtain the business data; when business data is obtained based on the second completion status, based on the business configuration information and RPC, control the interface of the disaster recovery scheduling group to load the business data from the disaster recovery end to the data service user, and the disaster recovery end is used to execute the disaster recovery end code to obtain the business data.
[0069] In one embodiment, the data aggregation module 601 is also used to: based on a pre-generated data aggregation template, obtain the name of each data service, the start time of each data service, the source data source information of each data service, the target data source information of each data service and the information of the running state scheduling group to obtain scheduling information.
[0070] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program in the memory 730 to execute a data processing method, for example, including:
[0071] Based on the pre-generated scheduling information and remote procedure call RPC, the running state scheduling group is controlled to load the data of the data service user, and the aggregated data is obtained based on the loading result; based on the path set BoP algorithm, the production end code and the disaster recovery end code are checked for consistency; when the production end code and the disaster recovery end code are checked to be consistent, the production end code is executed to obtain the first completion status of each data analysis business, and the disaster recovery end code is executed to obtain the second completion status of each data analysis business, and the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business; based on RPC, the running state scheduling group is controlled to load the business data to the data service user.
[0072] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.
[0073] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the data processing methods provided in the above embodiments, for example, including:
[0074] Based on the pre-generated scheduling information and remote procedure call RPC, the running state scheduling group is controlled to load the data of the data service user, and the aggregated data is obtained based on the loading result; based on the path set BoP algorithm, the production end code and the disaster recovery end code are checked for consistency; when the production end code and the disaster recovery end code are checked to be consistent, the production end code is executed to obtain the first completion status of each data analysis business, and the disaster recovery end code is executed to obtain the second completion status of each data analysis business, and the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business; based on RPC, the running state scheduling group is controlled to load the business data to the data service user.
[0075] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores a computer program, wherein the computer program is used to enable a processor to execute the data processing method provided in the above embodiments, for example, including:
[0076] Based on the pre-generated scheduling information and remote procedure call RPC, the running state scheduling group is controlled to load the data of the data service user, and the aggregated data is obtained based on the loading result; based on the path set BoP algorithm, the production end code and the disaster recovery end code are checked for consistency; when the production end code and the disaster recovery end code are checked to be consistent, the production end code is executed to obtain the first completion status of each data analysis business, and the disaster recovery end code is executed to obtain the second completion status of each data analysis business, and the business data of each data analysis business is obtained based on the first completion status and the second completion status of each data analysis business; based on RPC, the running state scheduling group is controlled to load the business data to the data service user.
[0077] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0078] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: include: Based on the pre-generated scheduling information and remote procedure call RPC, the running state scheduling group is controlled to load the data of the data service user, and the aggregated data is obtained based on the loading results; Based on the path set BoP algorithm, the code on the production side and the code on the disaster recovery side are checked for consistency; When the production-end code and the disaster recovery-end code are verified to be consistent, the production-end code is executed to obtain a first completion status of each data analysis business, and the disaster recovery-end code is executed to obtain a second completion status of each data analysis business, and based on the first completion status and the second completion status of each data analysis business, the business data of each data analysis business is obtained; Based on the RPC, the running state scheduling group is controlled to load the business data to the data service user.
2. The data processing method according to claim 1, characterized in that: The BoP algorithm based on the path set is used to check the consistency of the production end code and the disaster recovery end code, including: Inputting the production-end code into a language compiler to obtain a first structured query language, and inputting the disaster recovery-end code into the language compiler to obtain a second structured query language; Based on the first structured query language, determine a production end path set, and based on the second structured query language, determine a disaster recovery end path set; The cosine similarity of the paths of the production end path set and the paths of the disaster recovery end path set is compared, and when the cosine similarity is greater than a set threshold, it is determined that the production end code is consistent with the disaster recovery end code.
3. The data processing method according to claim 2, characterized in that: The determining, based on the first structured query language, a set of production-end paths includes: According to the grammatical rules of the structured query language, the first structured query language is split into words, and based on the combination relationship between the words, a root node, an intermediate node, and a leaf node are determined to construct a production-side abstract syntax tree; Starting from the root node of the production-end abstract syntax tree, randomly traverse the intermediate nodes until traversing to the leaf node to obtain a path, and based on all the root nodes of the production-end abstract syntax tree, obtain the production-end path set, and the production-end path set includes multiple paths.
4. The data processing method according to claim 1, characterized in that: The acquiring the business data of each of the data analysis services based on the first completion status and the second completion status of each of the data analysis services comprises: When the first completion status and the second completion status of the data analysis service are both completed, obtaining the service data based on the first completion status; When the first completion status of the data analysis service is incomplete and the second completion status is completed, the service data is obtained based on the second completion status.
5. The data processing method according to claim 4, characterized in that: The operation state scheduling group includes a production scheduling group and a disaster recovery scheduling group. The RPC-based control of the interface of the operation state scheduling group to load the business data to the data service user includes: When the business data is obtained based on the first completion status, the interface of the production scheduling group is controlled based on the business configuration information of the data service user and the RPC to load the business data from the production end to the data service user, and the production end is used to execute the production end code to obtain the business data; When the business data is obtained based on the second completion status, the interface of the disaster recovery scheduling group is controlled based on the business configuration information and the RPC to load the business data from the disaster recovery end to the data service user, and the disaster recovery end is used to execute the disaster recovery end code to obtain the business data.
6. The data processing method according to claim 5, characterized in that: The scheduling information is determined based on the following steps: Based on the pre-generated data aggregation template, the name of each data service, the start time of each data service, the source data source information of each data service, the target data source information of each data service and the information of the running state scheduling group are obtained to obtain the scheduling information.
7. A data processing device, characterized in that: include: The data aggregation module is used to control the running state scheduling group to load the data of the data service user based on the pre-generated scheduling information and remote procedure call RPC, and obtain the aggregated data based on the loading result; The verification module is used to perform consistency verification on the production-end code and the disaster recovery-end code based on the path set BoP algorithm; A business data acquisition module, used for executing the production-side code to obtain a first completion status of each data analysis business when the production-side code and the disaster recovery-side code are verified to be consistent, executing the disaster recovery-side code to obtain a second completion status of each data analysis business, and acquiring business data of each data analysis business based on the first completion status and the second completion status of each data analysis business; The data opening module is used to control the running state scheduling group based on the RPC and load the business data to the data service user.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the data processing method according to any one of claims 1 to 6 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
