Data processing method and device, equipment, medium and program product

By comparing the configuration data of the associated cluster and the test cluster, displaying differences and performing recovery processing, the problem of low recovery efficiency and insufficient security of the test environment is solved, and accurate recovery of the test environment and security guarantee of the production environment are achieved.

CN118550832APending Publication Date: 2024-08-27INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410782555.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In the existing technology, the recovery efficiency of the test environment is low and the security is insufficient, which affects the stability of the production environment.

Method used

By obtaining the configuration data of the associated cluster and the test cluster for comparison, the differences are determined and displayed on the target page, and configuration data recovery processing is performed in response to user selection to avoid repeated visits to the production environment.

Benefits of technology

It achieves accurate recovery of the test environment, improves recovery efficiency, and avoids multiple accesses to the production environment through associated clusters based on the production environment, ensuring the security of the production environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550832A
    Figure CN118550832A
Patent Text Reader

Abstract

The invention provides a data processing method and device, equipment, a medium and a program product, which can be applied to the technical field of data processing and financial science and technology. The data processing method comprises the steps that association configuration data of an association cluster and test configuration data of a test cluster are obtained, the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment; performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result; under the condition that it is determined that the data comparison result represents that the associated configuration data and the test configuration data are different, the data comparison result is displayed through the target page; in response to a selection operation of the target object on the target page for the to-be-recovered configuration data, obtaining the to-be-recovered configuration data, the to-be-recovered configuration data representing the configuration data to be recovered to the test cluster; and performing recovery processing on the test cluster according to the to-be-recovered configuration data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of data processing and financial technology, and specifically to a data processing method, apparatus, device, medium and program product. Background Art

[0002] During the R&D iteration process of a software project, the test data of the test environment often undergoes multiple version iterations. The software project can only be put into production after the handover from the test environment to the production environment is completed. Although the software project has been put into production, there may still be differences between the production environment and the test environment, so the test environment needs to be restored.

[0003] In the process of implementing the inventive concept of the present disclosure, the inventors found that there are at least the following problems in the related art: the method for recovering the test environment in the related art is less efficient and less secure. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a data processing method, apparatus, device, medium and program product.

[0005] According to a first aspect of the present disclosure, there is provided a data processing method, comprising:

[0006] Acquire association configuration data of an association cluster and test configuration data of a test cluster, wherein the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment;

[0007] Performing data comparison on the above-mentioned association configuration data and the above-mentioned test configuration data to obtain a data comparison result;

[0008] In the case where it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data, the data comparison result is displayed through a target page;

[0009] In response to a selection operation of the target object on the target page for the configuration data to be restored, acquiring the configuration data to be restored, wherein the configuration data to be restored represents the configuration data to be restored to the test cluster;

[0010] The test cluster is restored according to the configuration data to be restored.

[0011] According to an embodiment of the present disclosure, the recovery process of the test cluster according to the configuration data to be recovered includes:

[0012] According to the above configuration data to be restored, determine the table structure to be restored;

[0013] When it is determined that the associated cluster includes the table structure to be restored, obtaining a table creation instruction and an authorization instruction from the associated cluster;

[0014] According to the table creation instruction and the authorization instruction, the test cluster is restored.

[0015] According to an embodiment of the present disclosure, the above method further includes:

[0016] With authorization from a user associated with the test cluster, obtaining role information of the user in the test cluster;

[0017] A role parameter set is generated according to the test environment name, role name and role identifier of the test cluster in the role information.

[0018] According to an embodiment of the present disclosure, the above method further includes:

[0019] When it is determined that the role parameter set contains the test environment name and role name related to the user in the authorization instruction, the role identifier in the authorization instruction is replaced with the target role identifier;

[0020] When it is determined that the target role information related to the user in the authorization instruction does not exist in the role parameter set, the role parameter set is updated.

[0021] According to an embodiment of the present disclosure, the above-mentioned obtaining of association configuration data of an association cluster and test configuration data of a test cluster includes:

[0022] Obtain the table structure data of the above associated cluster and the authorization data of the above associated cluster;

[0023] Obtain the table structure data of the test cluster and the authorization data of the test cluster.

[0024] According to an embodiment of the present disclosure, the data comparison between the association configuration data and the test configuration data is performed to obtain a data comparison result, including:

[0025] Compare the table structure data of the association cluster and the table structure data of the test cluster to obtain a table structure data comparison result;

[0026] Compare the authorization data of the associated cluster with the authorization data of the test cluster to obtain an authorization data comparison result;

[0027] According to the above table structure comparison result and the above authorization data comparison result, a data comparison result is obtained.

[0028] According to an embodiment of the present disclosure, the recovery process of the test cluster according to the table creation instruction and the authorization instruction includes:

[0029] Connect to the database of the above test cluster;

[0030] Delete the data related to the table structure to be restored in the database of the test cluster;

[0031] Execute the above table creation instruction and the above authorization instruction to complete the recovery of the above test cluster.

[0032] A second aspect of the present disclosure provides a data processing device, including:

[0033] A first acquisition module is used to acquire association configuration data of an association cluster and test configuration data of a test cluster, wherein the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment;

[0034] A comparison module is used to compare the associated configuration data with the test configuration data to obtain a data comparison result;

[0035] A display module, configured to display the data comparison result through a target page when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data;

[0036] A second acquisition module is used to acquire the configuration data to be restored in response to the target object's selection operation on the target page for the configuration data to be restored, wherein the configuration data to be restored represents the configuration data to be restored to the test cluster;

[0037] The recovery module is used to recover the test cluster according to the configuration data to be recovered.

[0038] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0039] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.

[0040] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.

[0041] According to the data processing method, device, equipment, medium and program product provided by the present disclosure, by obtaining the associated configuration data of the associated cluster and the test configuration data of the test cluster, wherein the associated cluster is established based on the data of the production environment, and the test cluster is a cluster of the test environment associated with the production environment; performing data comparison on the associated configuration data and the test configuration data to obtain the data comparison result; in the case where it is determined that the data comparison result represents that the associated configuration data and the test configuration data are different, the data comparison result is displayed through the target page; in response to the target object's selection operation on the target page for the configuration data to be restored, the configuration data to be restored is obtained, wherein the configuration data to be restored represents the configuration data to be restored to the test cluster; according to the configuration data to be restored, the test cluster is restored. Since an associated cluster is established based on the data of the production environment, the associated configuration data in the associated cluster is compared with the test configuration data of the test cluster to obtain the data comparison result, and the test cluster is restored according to the selection operation of the target object, so that the test cluster can be accurately restored, and the associated cluster is established based on the data of the production environment, which can avoid the repeated access to the production environment during the recovery process of the test cluster, thereby ensuring the security of the production environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0043] Figure 1 The application scenario diagram of the data processing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown;

[0044] Figure 2 A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;

[0045] Figure 3 A flowchart schematically shows a data processing method according to another embodiment of the present disclosure;

[0046] Figure 4 A flowchart schematically shows a data processing method according to another embodiment of the present disclosure;

[0047] Figure 5 A structural block diagram schematically shows a data processing device according to an embodiment of the present disclosure; and

[0048] Figure 6 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0049] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0050] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0051] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0052] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0053] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0054] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0055] If there are problems with the test environment, you can circumvent them by reinstalling and testing in a new environment. However, in the big data development scenario, since the platform framework with massive hive data is not easy to build or move, the test environment often needs to continue to be used as the basis for the development of subsequent versions, so the configuration data with problems in the test environment needs to be repaired.

[0056] In the process of repairing the configuration data, the tester needs to contact the developer to whom the problem table belongs to analyze the relevant issues. When the developer confirms that the configuration data needs to be repaired, it is necessary to pull the historical table structure of the configuration data from the code base of the production environment, and obtain the role ID of the role required for subsequent authorization in the corresponding HADOOP from the cluster maintenance personnel, so as to write the relevant repair commands, and finally repair them in the current test cluster through script operation or background interface. Therefore, the problems in the test environment will not be discovered until they occur in specific use, and cannot be avoided in advance. In addition, the repair process needs to be collected and sorted from multiple positions and departments, and the system must be changed by relevant personnel. The cost of rectification and communication is high and the efficiency is too low. In addition, the production environment needs to be repeatedly connected during the repair process, which will affect the stability of the production environment and cause security problems.

[0057] In view of this, an embodiment of the present disclosure provides a data processing method, including obtaining associated configuration data of an associated cluster and test configuration data of a test cluster, wherein the associated cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment; performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result; when it is determined that the data comparison result represents that the associated configuration data and the test configuration data are different, displaying the data comparison result through a target page; in response to a selection operation of a target object on a target page for configuration data to be restored, obtaining the configuration data to be restored, wherein the configuration data to be restored represents configuration data to be restored to the test cluster; and performing recovery processing on the test cluster according to the configuration data to be restored.

[0058] Figure 1The application scenario diagram of the data processing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0059] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first cluster 101, a second cluster 102, a third cluster 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first cluster 101, the second cluster 102, the third cluster 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0060] The first cluster 101, the second cluster 102, and the third cluster 103 may interact with the server 105 through the network 104 to receive or send messages, etc. The first cluster 101 may be an association cluster, the second cluster 102 may be a test cluster, and the third cluster 103 may be a cluster of a production environment.

[0061] The server 105 may be a server that provides various services. The backend management server may analyze and process the received user request and other data, and feed back the processing result (eg, web page, information, or data obtained or generated according to the user request) to the terminal device.

[0062] It should be noted that the data processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first cluster 101, the second cluster 102, the third cluster 103 and / or the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first cluster 101, the second cluster 102, the third cluster 103 and / or the server 105.

[0063] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0064] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0065] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S250.

[0066] In operation S210 , association configuration data of an association cluster and test configuration data of a test cluster are acquired, wherein the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment.

[0067] In operation S220, data comparison is performed on the associated configuration data and the test configuration data to obtain a data comparison result.

[0068] In operation S230 , when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data, the data comparison result is displayed through a target page.

[0069] In operation S240 , in response to a selection operation of the target object on the target page for the configuration data to be restored, the configuration data to be restored is acquired, wherein the configuration data to be restored represents configuration data to be restored to the test cluster.

[0070] In operation S250 , the test cluster is restored according to the configuration data to be restored.

[0071] According to the embodiments of the present disclosure, the production environment may be the environment in which the product is actually run after it is put into use, and the test environment may be the environment in which the product is tested before use. For example, the product may be financial software, the test environment may be a performance test environment, a security test environment, a stress test environment, etc., and the production environment is the environment after the financial software is officially used.

[0072] According to an embodiment of the present disclosure, the data in the associated cluster may be the same as the data in the production environment. Therefore, the associated configuration data of the associated cluster may also represent the configuration data of the cluster in the production environment.

[0073] According to an embodiment of the present disclosure, the associated configuration data may characterize the configuration in the associated cluster, for example, the associated configuration data may include the number of tables, programming language, data volume, etc. in the associated cluster; the test configuration data may characterize the configuration in the associated cluster, for example, the associated configuration data may include the number of tables, programming language, data volume, etc. in the test cluster.

[0074] According to an embodiment of the present disclosure, the associated configuration data and the test configuration data may be compared to obtain a data comparison result, which may indicate whether the associated configuration data and the test configuration data are the same, that is, whether the test environment is the same as the production environment.

[0075] According to an embodiment of the present disclosure, when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data, that is, the test environment is different from the production environment, the data comparison result may be displayed through a target page.

[0076] According to an embodiment of the present disclosure, the target page may be a page for displaying to a target object.

[0077] According to an embodiment of the present disclosure, the display of data comparison results on the target page may include multiple items, and the target object may select each item. For example, the data comparison results may include two items: different number of tables and different programming languages. The target object may select the test environment that needs to be repaired, and may also select the number of tables. When the selection operation of the target object is detected, the configuration data to be restored may be obtained, for example, the data of all tables may be obtained from the associated cluster, and the test cluster may be restored according to the data of all tables, or the original table in the test cluster may be deleted, and all tables obtained from the associated cluster may be updated to the test cluster.

[0078] According to the embodiments of the present disclosure, since an associated cluster is established based on the data of the production environment, the associated configuration data in the associated cluster is compared with the test configuration data of the test cluster to obtain a data comparison result, and the test cluster is restored according to the selection operation of the target object, thereby achieving accurate recovery of the test cluster. In addition, by establishing an associated cluster based on the data of the production environment, it is possible to avoid repeated visits to the production environment during the recovery process of the test cluster, thereby ensuring the security of the production environment.

[0079] Figure 3 The flowchart of a data processing method according to another embodiment of the present disclosure is schematically shown.

[0080] like Figure 3 As shown, the data processing method of this embodiment includes operations S310 to S330.

[0081] In operation S310, a table structure to be restored is determined according to configuration data to be restored.

[0082] In operation S320 , when it is determined that the associated cluster includes the table structure to be restored, a table creation instruction and an authorization instruction are obtained from the associated cluster.

[0083] In operation S330 , the test cluster is restored according to the table creation instruction and the authorization instruction.

[0084] According to an embodiment of the present disclosure, acquiring association configuration data of an association cluster and test configuration data of a test cluster includes: acquiring table structure data of an association cluster and authorization data of an association cluster; acquiring table structure data of a test cluster and authorization data of a test cluster.

[0085] According to an embodiment of the present disclosure, the table structure to be restored may be a table structure in the test cluster that is different from that in the associated cluster. It may be verified whether the associated cluster includes the table structure to be restored. If it is determined that the associated cluster includes the table structure to be restored, the table structure to be restored may be restored to the test cluster.

[0086] According to an embodiment of the present disclosure, the associated cluster and the test cluster may be HADOOP clusters. In the Hive database of the HADOOP cluster, the table structure data and the authorization data are stored separately. Since the table structure data and the authorization are stored separately in the cluster, it is necessary to obtain the table structure data of the associated cluster and the authorization data of the associated cluster. The table structure data of the test cluster and the authorization data of the test cluster are obtained.

[0087] According to the embodiments of the present disclosure, when operating and maintaining multiple clusters, the table structure and authorization of the same database cannot be directly copied and synchronized. Therefore, the table structure to be restored can be processed through table creation instructions and authorization instructions. The table creation instructions can be used to establish the table structure to be restored, and the authorization instructions can be used to associate the permissions related to the table structure to be restored with the table structure to be restored.

[0088] According to the embodiment of the present disclosure, since the associated cluster includes the table structure to be restored, the table creation instruction and the authorization instruction can be obtained from the associated cluster.

[0089] According to the embodiments of the present disclosure, by associating a cluster to obtain a table creation instruction and an authorization instruction, access to the production environment is avoided, and the security and stability of the production environment can be further ensured.

[0090] According to an embodiment of the present disclosure, the data processing method further includes: obtaining the role information of the user in the test cluster under the authorization of the user associated with the test cluster; generating a role parameter set according to the test environment name, role name and role identifier of the test cluster in the role information.

[0091] According to an embodiment of the present disclosure, a user associated with a test cluster may be a user who can access some table structures in the test cluster.

[0092] According to an embodiment of the present disclosure, before obtaining the role information of the user in the test cluster, the user's consent or authorization may be obtained. For example, before obtaining the role information of the user in the test cluster, a request for obtaining the user information may be issued to the user. When the user agrees or authorizes that the user information may be obtained, the role information of the user in the test cluster is obtained.

[0093] According to an embodiment of the present disclosure, the test environment name of the test cluster in the role information may be the specific test environment where the user is located, for example, it may be a stress testing environment; the role name of the test cluster in the role information may be the name of the user in the test cluster, for example, it may be Zhang San; the role identifier of the test cluster in the role information may be an identifier used to identify the user in the test environment, for example, it may be timestamp information for generating user information.

[0094] According to an embodiment of the present disclosure, the role information may also include other data, such as address information of the test cluster, etc., and a role parameter set may be generated according to the test environment name, role name and role identifier of the test cluster in the role information.

[0095] According to an embodiment of the present disclosure, a role parameter set may be generated by batch acquiring user information of users, thereby determining the user's test environment as well as the name and identification, facilitating subsequent comparison.

[0096] According to an embodiment of the present disclosure, the data processing method also includes: when it is determined that the role parameter set contains a test environment name and a role name related to the user in the authorization instruction, replacing the role identifier in the authorization instruction with a target role identifier; when it is determined that the role parameter set does not contain target role information related to the user in the authorization instruction, updating the role parameter set.

[0097] According to an embodiment of the present disclosure, since the authorization instruction is obtained from an associated cluster, the authorization instruction may include the role name and role identifier of the user in the production environment. The role name of the user in different environments may be the same. Therefore, it is possible to determine whether there is matching user information in the role parameter set based on the user's role name and the name of the test environment to be restored. When it is determined that the role parameter set contains a test environment name and role name related to the user in the authorization instruction, the role identifier in the authorization instruction may be replaced with the target role identifier, thereby using the replaced authorization instruction to perform recovery processing on the test cluster.

[0098] According to an embodiment of the present disclosure, when it is determined that the target role information related to the user in the authorization instruction does not exist in the role parameter set, the role parameter set may be updated.

[0099] According to the embodiments of the present disclosure, the role information of users is uniformly managed through the role parameter table, and the relevant information of the users can be quickly queried in the role parameter table, thereby improving the efficiency of data processing.

[0100] According to an embodiment of the present disclosure, a data comparison is performed on the associated configuration data and the test configuration data to obtain a data comparison result, including: comparing the table structure data of the associated cluster with the table structure data of the test cluster to obtain a table structure data comparison result; comparing the authorization data of the associated cluster with the authorization data of the test cluster to obtain an authorization data comparison result; and obtaining a data comparison result based on the table structure comparison result and the authorization data comparison result.

[0101] According to an embodiment of the present disclosure, since the table structure data and the authorization data are isolated, the table structure data of the associated cluster and the table structure data of the test cluster can be compared to obtain the table structure data comparison result; the authorization data of the associated cluster and the authorization data of the test cluster can be compared to obtain the authorization data comparison result. For example, the first item can be obtained from the table structure data of the associated cluster and compared with each item in the table structure data of the test cluster. If there are identical items in the table structure data of the test cluster, the item in the associated cluster and the test cluster is removed, and the second item is obtained from the table structure data of the associated cluster and compared with each remaining item in the table structure data of the test cluster. If there are identical items in the table structure data of the test cluster, the item in the associated cluster and the test cluster is removed until all items in the associated cluster are compared. If there are no identical items in the table structure data of the test cluster, the item is recorded to obtain the table structure data comparison result. The authorization data comparison result is similar and will not be repeated here.

[0102] According to an embodiment of the present disclosure, the table structure comparison result and the authorization data comparison result are used as the data comparison result.

[0103] According to the embodiments of the present disclosure, through two comparisons, the data comparison results of the associated cluster and the test cluster can be accurately obtained, which facilitates detailed display based on the data comparison results.

[0104] According to an embodiment of the present disclosure, the test cluster is recovered according to the table creation instructions and the authorization instructions, including: connecting to the database of the test cluster; deleting data related to the table structure to be recovered in the database of the test cluster; executing the table creation instructions and the authorization instructions to complete the recovery of the test cluster.

[0105] According to an embodiment of the present disclosure, the database of the test cluster may be connected, and data related to the table structure to be restored in the database may be deleted to avoid the existence of dirty data after restoration.

[0106] According to an embodiment of the present disclosure, a table creation instruction and an authorization instruction are executed in the database to complete the recovery of the test cluster. The authorization instruction here may be an instruction for replacing a user identifier.

[0107] Figure 4The flowchart of a data processing method according to another embodiment of the present disclosure is schematically shown.

[0108] like Figure 4 As shown, the data processing method of this embodiment includes operations S401 to S413.

[0109] In operation S401 , an associated cluster is established, wherein the associated cluster is established based on data of a production environment.

[0110] In operation S402, association configuration data of an association cluster and test configuration data of a test cluster are obtained, wherein the association configuration data includes table structure data and authorization data, the test configuration data includes table structure data and authorization data, and the test cluster is a cluster of a test environment associated with a production environment.

[0111] In operation S403, data comparison is performed on the associated configuration data and the test configuration data to obtain a data comparison result.

[0112] In operation S404, when the user associated with the test cluster is authorized, the role information of the user in the test cluster is obtained.

[0113] In operation S405 , a role parameter set is generated according to the test environment name of the test cluster, the role name, and the role identifier in the role information.

[0114] In operation S406, when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data, the data comparison result is displayed through a target page.

[0115] In operation S407 , in response to a selection operation of the target object on the target page for the configuration data to be restored, the configuration data to be restored is acquired.

[0116] In operation S408, a table structure to be restored is determined according to the configuration data to be restored.

[0117] In operation S409, when it is determined that the associated cluster includes the table structure to be restored, a table creation instruction and an authorization instruction are obtained from the associated cluster.

[0118] In operation S410, when it is determined that the role parameter set contains a test environment name and a role name related to the user in the authorization instruction, the role identifier in the authorization instruction is replaced with a target role identifier.

[0119] In operation S411 , a database of the test cluster is connected.

[0120] In operation S412, data related to the table structure to be restored is deleted in the database of the test cluster.

[0121] In operation S413, the table creation instruction and the replaced authorization instruction are executed to complete the recovery of the test cluster.

[0122] According to the embodiment of the present disclosure, a new hadoop cluster can be created as an associated cluster, and a hive service can be deployed in the associated cluster. According to the version production cycle, the hive service metadata (db service) of the production environment after the product is put into production is obtained and imported into the associated cluster.

[0123] According to an embodiment of the present disclosure, a data export command may be executed on a hive service metadata (dbservice) server of an associated cluster and a test cluster to obtain configuration table structure data and authorization data.

[0124] According to an embodiment of the present disclosure, the target object can input the test environment, database, table structure, etc. to be restored in the target page. The target page can also provide a drop-down option for the user to select the test environment to be restored. The target page can also include a repair button so that the target object can be repaired with one click.

[0125] According to an embodiment of the present disclosure, the associated cluster may be connected to determine whether the associated cluster includes a table structure to be restored.

[0126] According to the embodiments of the present disclosure, the test configuration data of the test environment is compared with the correct associated configuration data in the associated cluster related to the production environment, problematic data in the test environment is identified in advance, and a one-click repair function is provided, which simplifies the communication and operation steps of related data governance, improves the consistency of test data and production data, and improves R&D and testing work efficiency.

[0127] Based on the above data processing method, the present disclosure also provides a data processing device. Figure 5 The device is described in detail.

[0128] Figure 5 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.

[0129] like Figure 5 As shown, the data processing device 500 of this embodiment includes a first acquisition module 510 , a comparison module 520 , a display module 530 , a second acquisition module 540 and a recovery module 550 .

[0130] The first acquisition module 510 is used to acquire the associated configuration data of the associated cluster and the test configuration data of the test cluster, wherein the associated cluster is established based on the data of the production environment, and the test cluster is a cluster of the test environment associated with the production environment. In one embodiment, the first acquisition module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0131] The comparison module 520 is used to compare the associated configuration data with the test configuration data to obtain a data comparison result. In one embodiment, the comparison module 520 can be used to perform the operation S220 described above, which will not be described in detail here.

[0132] The display module 530 is used to display the data comparison result through the target page when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data. In one embodiment, the display module 530 can be used to perform the operation S230 described above, which will not be described in detail here.

[0133] The second acquisition module 540 is used to obtain the configuration data to be restored in response to the target object's selection operation on the target page for the configuration data to be restored, wherein the configuration data to be restored represents the configuration data to be restored to the test cluster. In one embodiment, the second acquisition module 540 can be used to perform the operation S240 described above, which will not be repeated here.

[0134] The recovery module 550 is used to recover the test cluster according to the configuration data to be recovered. In one embodiment, the recovery module 550 can be used to perform the operation S250 described above, which will not be described in detail here.

[0135] According to an embodiment of the present disclosure, a recovery module 550 for performing recovery processing on a test cluster according to configuration data to be recovered includes:

[0136] A first recovery unit, used to determine a table structure to be recovered according to the configuration data to be recovered;

[0137] A second recovery unit is used to obtain a table creation instruction and an authorization instruction from the associated cluster when it is determined that the associated cluster includes the table structure to be recovered;

[0138] The third recovery unit is used to recover the test cluster according to the table creation instruction and the authorization instruction.

[0139] According to an embodiment of the present disclosure, the data processing device 500 further includes:

[0140] A third acquisition module is used to obtain the role information of the user in the test cluster under the authorization of the user associated with the test cluster;

[0141] The generation module is used to generate a role parameter set according to the test environment name, role name and role identifier of the test cluster in the role information.

[0142] According to an embodiment of the present disclosure, the data processing device 500 further includes:

[0143] A replacement module, used for replacing the role identifier in the authorization instruction with the target role identifier when it is determined that the test environment name and the role name related to the user in the authorization instruction exist in the role parameter set;

[0144] The updating module is used to update the role parameter set when it is determined that the target role information related to the user in the authorization instruction does not exist in the role parameter set.

[0145] According to an embodiment of the present disclosure, the first acquisition module 510 for acquiring association configuration data of an association cluster and test configuration data of a test cluster includes:

[0146] The first acquisition unit is used to acquire the table structure data of the associated cluster and the authorization data of the associated cluster.

[0147] The second acquisition unit is used to acquire the table structure data of the test cluster and the authorization data of the test cluster.

[0148] According to an embodiment of the present disclosure, a comparison module 520 for performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result includes:

[0149] A first comparison unit is used to compare the table structure data of the associated cluster with the table structure data of the test cluster to obtain a comparison result of the table structure data;

[0150] A second comparison unit, used to compare the authorization data of the associated cluster with the authorization data of the test cluster to obtain an authorization data comparison result;

[0151] The third comparison unit is used to obtain a data comparison result according to the table structure comparison result and the authorization data comparison result.

[0152] According to an embodiment of the present disclosure, a third recovery unit for performing recovery processing on a test cluster according to a table creation instruction and an authorization instruction includes:

[0153] A first recovery subunit, used to connect to the database of the test cluster;

[0154] The second recovery subunit is used to delete data related to the table structure to be recovered in the database of the test cluster;

[0155] The third recovery subunit is used to execute table creation instructions and authorization instructions to complete the recovery of the test cluster.

[0156] According to an embodiment of the present disclosure, any multiple modules of the first acquisition module 510, the comparison module 520, the display module 530, the second acquisition module 540 and the recovery module 550 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the comparison module 520, the display module 530, the second acquisition module 540 and the recovery module 550 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the first acquisition module 510, the comparison module 520, the display module 530, the second acquisition module 540 and the recovery module 550 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0157] Figure 6 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown.

[0158] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0159] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0160] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0161] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0162] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0163] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.

[0164] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0165] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0166] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.

[0167] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0168] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0169] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0170] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire association configuration data of an association cluster and test configuration data of a test cluster, wherein the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment; Performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result; In a case where it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data, displaying the data comparison result through a target page; In response to a selection operation of the target object on the target page for the configuration data to be restored, acquiring the configuration data to be restored, wherein the configuration data to be restored represents configuration data to be restored to the test cluster; The test cluster is restored according to the configuration data to be restored.

2. The method according to claim 1, characterized in that The restoring process of the test cluster according to the configuration data to be restored includes: Determine the table structure to be restored according to the configuration data to be restored; When it is determined that the associated cluster includes the table structure to be restored, obtaining a table creation instruction and an authorization instruction from the associated cluster; The test cluster is restored according to the table creation instruction and the authorization instruction.

3. The method according to claim 2, characterized in that Also includes: Under the condition of authorization by a user associated with the test cluster, obtaining role information of the user in the test cluster; A role parameter set is generated according to the test environment name, role name and role identifier of the test cluster in the role information.

4. The method according to claim 3, characterized in that Also includes: When it is determined that the role parameter set contains a test environment name and a role name related to the user in the authorization instruction, replacing the role identifier in the authorization instruction with the target role identifier; When it is determined that the target role information related to the user in the authorization instruction does not exist in the role parameter set, the role parameter set is updated.

5. The method according to any one of claims 1 to 4, characterized in that The obtaining of the association configuration data of the association cluster and the test configuration data of the test cluster includes: Acquire table structure data of the associated cluster and authorization data of the associated cluster; The table structure data of the test cluster and the authorization data of the test cluster are obtained.

6. The method according to claim 5, characterized in that The performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result includes: Comparing the table structure data of the associated cluster with the table structure data of the test cluster to obtain a table structure data comparison result; Comparing the authorization data of the associated cluster with the authorization data of the test cluster to obtain an authorization data comparison result; A data comparison result is obtained according to the table structure comparison result and the authorization data comparison result.

7. The method according to any one of claims 2 to 4, characterized in that The recovering the test cluster according to the table creation instruction and the authorization instruction includes: Connecting to the database of the test cluster; Deleting data related to the table structure to be restored in the database of the test cluster; The table creation instruction and the authorization instruction are executed to complete the recovery of the test cluster.

8. A data processing device, characterized in that: The device comprises: A first acquisition module, configured to acquire association configuration data of an association cluster and test configuration data of a test cluster, wherein the association cluster is established based on data of a production environment, and the test cluster is a cluster of a test environment associated with the production environment; A comparison module, used for performing data comparison on the associated configuration data and the test configuration data to obtain a data comparison result; A display module, configured to display the data comparison result through a target page when it is determined that the data comparison result indicates that the associated configuration data is different from the test configuration data; A second acquisition module, configured to acquire the configuration data to be restored in response to a selection operation of the target object on the target page for the configuration data to be restored, wherein the configuration data to be restored represents configuration data to be restored to the test cluster; A recovery module is used to recover the test cluster according to the configuration data to be recovered.

9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.