Data repair method, device, electronic device and computer program product
By dividing the job pool and component group in the application space and using the repair component to automatically execute the job, the problem of low efficiency of repair components is solved, and high repair efficiency and system stability are achieved.
Patent Information
- Application Number
- CN202410383253.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-03-29
AI Technical Summary
The repair efficiency of repair components in existing technologies is low, and the introduction of third-party components will increase single points of failure and operation and maintenance workload, and there is a risk of multiple components being unable to self-identify and process the same job.
By obtaining the job information of the job to be executed, dividing it into the corresponding application space job pool, and determining the component group, the repair component in the component group is used to automatically execute the job, realizing automatic allocation and load balancing of the repair component.
It improves the repair efficiency of repair components, reduces the operation and maintenance workload, enhances system stability, avoids single point failures caused by third-party components, and improves operational efficiency.
Smart Images

Figure CN118277162B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a data repair method, device, electronic equipment and computer program product. Background Art
[0002] When the scale of data collection is large, the operation and deployment of repair components is difficult and inefficient; if third-party components are introduced, there will be an additional single point of failure and operation and maintenance object.
[0003] However, current technology requires manual management and configuration of the ownership and scope of repair components, resulting in low operational efficiency. Introducing third-party components creates a single point of failure and increased maintenance workload, reducing system stability. Repair components are unable to self-identify, creating the risk of multiple components handling the same operation.
[0004] With respect to the problem of low repair efficiency of the repair components in the above-mentioned prior art, no effective solution has been proposed so far. Summary of the Invention
[0005] The embodiments of the present invention provide a data repair method, device, electronic device and computer program product to at least solve the technical problem of low repair efficiency of repair components in the prior art.
[0006] According to one aspect of an embodiment of the present invention, a data repair method is provided, comprising: obtaining job information of at least one job to be executed, wherein each of the job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, each application space being pre-equipped with a corresponding repair component; assigning at least one job to be executed belonging to the same application space to a job pool corresponding to the application space; determining a component group that belongs to the same application space as each job pool, wherein each component group includes: at least one repair component belonging to the same application space; and calling at least one repair component in the component group to execute at least one job to be executed in the job pool.
[0007] Optionally, calling at least one repair component in the component group to execute at least one of the pending jobs in the job pool includes: assigning consecutive component numbers to at least one repair component in the same component group; assigning consecutive job numbers to at least one of the pending jobs in the same job pool; establishing a job list corresponding to each component number based on the component number and the job number, wherein the job list is used to record at least one of the job numbers assigned to the same component number; calling the repair component corresponding to each component number, and respectively executing at least one of the pending jobs recorded in the job list corresponding to the component number.
[0008] Optionally, based on the component number and the job number, establishing a job list corresponding to each component number includes: detecting the number of components of the repair component in the component group; determining at least one job number corresponding to each component number with the number of components as a step size, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step size; and filling at least one job number corresponding to each component number into the job list corresponding to the same component number.
[0009] Optionally, before calling at least one repair component in the component group to execute at least one of the pending jobs in the job pool, the method further includes: obtaining a component registration list, wherein the component registration list is used to record at least one repair component that has been registered; detecting available repair components in the registration list according to a preset period, wherein the available repair components are the repair components that are in an available state; and determining the component group based on the available repair components.
[0010] Optionally, before obtaining the component registration list, the method further includes: receiving a registration request for a repair component; and configuring component information for the repair component in response to the registration request, wherein the component information includes at least an application space to which the repair component belongs.
[0011] Optionally, detecting the available repair components in the registration list according to a preset period includes: sending a detection instruction to at least one of the repair components in the registration list according to the preset period, wherein the detection instruction is used to detect the operating status of the repair component, and the operating status at least includes: an available status; receiving feedback information from the repair component, wherein, when the repair component belongs to the available status, the repair component successfully responds to the detection instruction to generate the feedback information; and determining the repair component that receives the feedback information as the available repair component.
[0012] Optionally, based on the available repair components, determining the component group includes: identifying the application space to which each available repair component belongs; and assigning at least one available repair component belonging to the same application space to the component group corresponding to the application space.
[0013] According to another aspect of an embodiment of the present invention, a data repair device is also provided, including: an acquisition module for acquiring job information of at least one job to be executed, wherein each of the jobs to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; a division module for assigning at least one job to be executed belonging to the same application space to a job pool corresponding to the application space; a determination module for determining a component group belonging to the same application space as each job pool, wherein each component group includes: at least one repair component belonging to the same application space; an execution module for calling at least one repair component in the component group to execute at least one job to be executed in the job pool.
[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, including: a memory and a processor, wherein the processor is configured to run a program stored in the processor, wherein the data repair method is executed when the program is run.
[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, wherein the computer program implements the steps of the data repair method when executed by a processor.
[0016] In an embodiment of the present invention, job information of at least one job to be executed is obtained, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; at least one job to be executed belonging to the same application space is assigned to a job pool corresponding to the application space; a component group belonging to the same application space as each job pool is determined, wherein each component group includes: at least one repair component belonging to the same application space; at least one repair component in the component group is called to execute at least one job to be executed in the job pool, so that the correspondence between the job pool and the component group can be determined by using the application space, and the repair component in the component group respectively executes at least one component to be repaired in the job pool corresponding to the component group, thereby achieving the purpose of automatically allocating jobs to be executed to the components to be repaired, improving the execution efficiency of the components to be repaired on the jobs to be executed, and realizing the technical effect of improving the repair efficiency of the components to be repaired, thereby solving the technical problem of low repair efficiency of the repair components in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of a data repair method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a repair component operation deployment structure according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of a repair component registration process according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of a repair component operation deployment process according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a component processing operation process according to an embodiment of the present invention;
[0023] Figure 6 is a schematic diagram of a data repair device according to an embodiment of the present invention;
[0024] Figure 7 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] According to an embodiment of the present invention, an embodiment of a data repair method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 1 is a flow chart of a data repair method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0029] Step S102: Obtain job information of at least one pending job, wherein each pending job is used to request a repair component to repair abnormal data, and the job information includes at least: an application space to which the pending job belongs, and each application space is pre-configured with a corresponding repair component;
[0030] Step S104: at least one pending job belonging to the same application space is allocated to a job pool corresponding to the application space;
[0031] Step S106, determining a component group belonging to the same application space as each operation pool, wherein each component group includes: at least one repair component belonging to the same application space;
[0032] Step S108: calling at least one repair component in the component group to execute at least one pending job in the job pool.
[0033] In an embodiment of the present invention, job information of at least one job to be executed is obtained, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; at least one job to be executed belonging to the same application space is assigned to a job pool corresponding to the application space; a component group belonging to the same application space as each job pool is determined, wherein each component group includes: at least one repair component belonging to the same application space; at least one repair component in the component group is called to execute at least one job to be executed in the job pool, so that the correspondence between the job pool and the component group can be determined by using the application space, and the repair component in the component group respectively executes at least one component to be repaired in the job pool corresponding to the component group, thereby achieving the purpose of automatically allocating jobs to be executed to the components to be repaired, improving the execution efficiency of the components to be repaired on the jobs to be executed, and realizing the technical effect of improving the repair efficiency of the components to be repaired, thereby solving the technical problem of low repair efficiency of the repair components in the prior art.
[0034] Optionally, the data repair method may be executed by a repair component request platform, which registers repair components, obtains jobs to be executed, and allocates related functions of the jobs to be executed to each repair component.
[0035] In the above step S102, the job to be executed is used to indicate abnormal data that occurs during the data collection process, and the abnormal data needs to be repaired by the repair component.
[0036] As an optional example, obtaining job information of at least one job to be executed includes: obtaining a to-be-repaired list for recording at least one job to be executed, wherein the to-be-repaired list is used to record the unique job identity of each job to be executed and the application space to which each job to be executed belongs; identifying job information of each job to be executed from the to-be-repaired list, wherein the job information also includes: the job identity of the job to be executed.
[0037] Optionally, the list to be repaired may record the correspondence between the job identity of each job to be executed and the application space to which it belongs in a key-value pair format.
[0038] In the above step S102 , the application space is used to separate and manage the virtual space of each application, and carries information such as the application's repair components and pending operations.
[0039] In the above step S102, the repair component is a structured component used to repair abnormal data that occurs during the data collection process.
[0040] In the above step S102 , each application space may be pre-configured with at least one component to be repaired belonging to the application space.
[0041] In the above step S102, after obtaining the job to be executed, the job type of the job to be executed can be identified, wherein the job type can be determined according to the data type of the abnormal data to be repaired by the job to be executed; according to the job type of the job to be executed, the application space to which the job to be executed belongs is determined.
[0042] In the above step S102, the application space can be determined according to the data type of the repair abnormal data, that is, different data types have corresponding application spaces, and then according to the correspondence between the data type and the application space, the application space to which the execution operation and the repair component belong is divided.
[0043] For example, a pending job requesting repair of abnormal data of a target data type may determine that the pending job belongs to an application space corresponding to the target data type.
[0044] For another example, the repair component has the ability to repair abnormal data of the target data type, and it can be determined that the repair component belongs to the application space corresponding to the target data type.
[0045] In the above step S104, each application space can pre-set a corresponding job pool. When the application space to which the job to be executed belongs is determined, the job to be executed can be assigned to the job pool corresponding to the application space to which it belongs. Then, the repair component belonging to the application space can directly retrieve the job to be executed from the corresponding job pool, thereby achieving the technical effect of improving the repair efficiency of the component to be repaired.
[0046] It should be noted that each pending job has an application space to which it belongs, and multiple pending jobs have multiple application spaces to which they belong. However, the application spaces to which multiple pending jobs belong may overlap, so multiple pending jobs may belong to the same application space.
[0047] As an optional example, when each to-be-executed job has a unique job identity, the to-be-executed job can be assigned to a job pool by assigning the job identity of the to-be-executed job to the job pool.
[0048] In the above step S106, a corresponding component group is pre-set for each application space, and each component group includes at least one repair component belonging to the application space.
[0049] In the above step S106, the job pool and the component group have a corresponding relationship based on the application space they belong to. For example, the job pool and the component group belonging to the same application space have a corresponding relationship.
[0050] Optionally, at least one repair component in the component group can execute at least one pending job in the job pool corresponding to the component group.
[0051] As an optional embodiment, before calling at least one repair component in the component group to execute at least one to-be-executed job in the job pool, the method further includes: obtaining a component registration list, wherein the component registration list is used to record at least one repair component that has been registered; detecting available repair components in the registration list according to a preset period, wherein available repair components are repair components that are in an available state; and determining a component group based on the available repair components.
[0052] In the above embodiment of the present invention, the prerequisite for using the repair component to execute the job to be executed is that the repair component has been registered and is in an available state during execution. Therefore, before calling the repair component in the component group to execute the job to be executed in the job pool, it is necessary to form a component group based on the repair components that have been registered and are in an available state to realize the determination of the component group.
[0053] Optionally, the operating status of the repair component includes: available status and unavailable status, and the repair component may be in different operating statuses at different times. Therefore, before calling the repair component to execute the pending job, the operating status of the repair component needs to be detected.
[0054] Optionally, the available state may also be represented as an online state, and the unavailable state may also be represented as an offline state.
[0055] Optionally, the timing for detecting the operational status of the repair component may be triggered by the timing of obtaining a job to be executed, or may be automatically triggered according to a preset cycle.
[0056] Optionally, the preset period may be a period for obtaining pending jobs. For example, a pending repair list including at least one pending job is obtained according to the preset period, and the operational status is checked. Alternatively, at least one pending job received within a preset period is assigned to a corresponding job pool at the end of the preset period, and the operational status is checked.
[0057] Optionally, newly added repair components need to be registered before they can be used. Registered repair components can be recorded in the component registration list. When the component's operational status needs to be detected, the registered repair components recorded in the framework registration list can be detected.
[0058] As an optional embodiment, before obtaining the component registration list, the method further includes: receiving a registration request for the repair component; and configuring component information for the repair component in response to the registration request, wherein the component information includes at least: an application space to which the repair component belongs.
[0059] In the above embodiment of the present invention, during the registration process of the repair component, a registration requester of the component may be received, component information may be configured for the repair component in response to the registration request, and the repair component may be recorded in the component registration list.
[0060] Optionally, in response to the registration request, configuring component information for the repair component includes: injecting a unique component identity into the repair component; allocating an application space to which the repair component belongs, and the component information includes at least: the application space to which the repair component belongs and the unique component identity of the repair component.
[0061] Optionally, the component registration list may record the unique component identity of each registered repair component.
[0062] As an optional embodiment, in response to a registration request, configuring component information for a repair component includes: identifying a component type of the repair component, wherein the component type is determined based on the data type of abnormal data that the repair component can repair; and determining, based on the component type of the repair component, an application space to which the repair component belongs.
[0063] As an optional embodiment, detecting available repair components in the registration list according to a preset period includes: sending a detection instruction to at least one repair component in the registration list according to the preset period, wherein the detection instruction is used to detect the operating status of the repair component, and the operating status at least includes: an available status; receiving feedback information from the repair component, wherein, when the repair component is in an available status, the repair component successfully responds to the detection instruction to generate feedback information; and determining the repair component that receives the feedback information as an available repair component.
[0064] In the above embodiment of the present invention, the repair component whose operating status is available can respond to the detection instruction and generate feedback information; while the repair component whose operating status is unavailable should not respond to the detection instruction and will not generate feedback information. Therefore, the repair component in the available state can be determined by sending a detection instruction to the registered one and counting the feedback information received.
[0065] Optionally, the feedback information may include: a unique component identity of the repair component that responds to the detection instruction. By identifying the component identity in the feedback information, the repair component in the usable state can be determined.
[0066] As an optional embodiment, determining a component group based on available repair components includes: identifying an application space to which each available repair component belongs; and assigning at least one available repair component belonging to the same application space to a component group corresponding to the application space.
[0067] In the above embodiment of the present invention, after determining the available repair components, the application space allocated to the available repair components during the registration phase can be identified, and then each available repair component can be divided into a component group corresponding to the application space to which each available repair component belongs, thereby determining the component group.
[0068] It should be noted that the application space at least includes: an exclusive application space and a public application space, wherein there can be multiple exclusive application spaces, and each exclusive application space has a corresponding data type; when it is determined that there is an exclusive application space to which the job to be executed and / or the repair component belongs, the job to be executed is assigned to the job pool corresponding to the exclusive application space, and the repair component is assigned to the component group corresponding to the exclusive application space; when it is determined that there is no exclusive application space to which the job to be executed and / or the repair component belongs, the job to be executed is assigned to the job pool corresponding to the public application space, and the repair component is assigned to the component group corresponding to the public application space.
[0069] As an optional embodiment, calling at least one repair component in a component group and executing at least one pending job in a job pool includes: assigning consecutive component numbers to at least one repair component in the same component group; assigning consecutive job numbers to at least one pending job in the same job pool; establishing a job list corresponding to each component number based on the component number and the job number, wherein the job list is used to record at least one job number assigned to the same component number; calling the repair component corresponding to each component number, and respectively executing at least one pending job recorded in the job list corresponding to the component number.
[0070] In the above embodiment of the present invention, when calling at least one repair component in the component group to execute at least one job to be executed in the job pool, corresponding serial numbers can be assigned to at least one repair component in the component group and at least one job to be executed in the job pool, and then an execution relationship between each repair component and each job to be executed can be established as needed, so that each repair component can process its assigned job to be executed one by one according to its own assigned job serial number.
[0071] Optionally, when determining that at least one to-be-performed job is assigned to each repair component, the component serial number of the repair component and the job serial number of the at least one to-be-performed job assigned to the repair component may be recorded in a job list.
[0072] Optionally, the job list can be stored in a memory, and the repair component can detect the job list allocated for itself from the memory, and then execute each job to be executed corresponding to each job number recorded in the job list one by one.
[0073] Optionally, when the repair component needs to execute a pending job, a first mark indicating that it is being executed can be added to the pending job first; then the pending job with the first mark added can be retrieved and executed, thereby avoiding repeated execution of the same pending job.
[0074] Optionally, when the job to be executed has been completed by the repair component, a second mark indicating that the job to be executed is completed may be added to the job to be executed, thereby avoiding repeated execution of the same job to be executed.
[0075] Optionally, when the repair component calls a job to be executed and an execution failure occurs, a third mark indicating the execution failure is added to the job to be executed.
[0076] Optionally, the job list can be generated according to a preset period, and the repair component can also execute the pending jobs recorded in the job list corresponding to the preset period within the preset period. If there are still pending jobs that have not been executed in the job list after the preset period ends, a fourth mark indicating execution timeout is added to the pending job.
[0077] As an optional embodiment, when the preset period ends, the pending jobs marked as failed or timed out in the job list corresponding to the preset period may be reset, and a job list for the next preset period may be generated.
[0078] As an optional embodiment, based on the component number and the job number, establishing a job list corresponding to each component number includes: detecting the number of components to be repaired in the component group; determining at least one job number corresponding to each component number with the number of components as a step size, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step size; and filling at least one job number corresponding to each component number into the job list corresponding to the same component number.
[0079] In the above embodiment of the present invention, after assigning corresponding serial numbers to the repair components and the jobs to be executed, the number of components of the repair components in the component group is used as a step size, and each repair component is assigned a job to be executed corresponding to a job number whose component number is an integer multiple of the step size, thereby obtaining a job list for each repair component. This allows multiple repair components in the same component group to be assigned to jobs to be executed in a substantially identical number, thereby achieving load balancing for multiple repair components in the same component group.
[0080] It should be noted that 0 is an integer, so for a repair component with component number A, components to be repaired with operation numbers A, A+step, A+2*step, ..., A+n*step can be assigned.
[0081] The present invention also provides a preferred embodiment, which provides a method for dynamically allocating data acquisition and repair component operations. Its purpose is to build a method that enables the repair component to self-identify and dynamically allocate the operation scope without introducing third-party components, provide large-scale cluster applications, and ensure that the cluster can operate efficiently and reliably without adding additional resources, thereby improving operational efficiency.
[0082] Figure 2 Schematic diagram of a repair component operation deployment structure according to an embodiment of the present invention. Figure 2 As shown, it at least includes: a first component group and a first operation pool whose application space is space 1, and a second component group and a second operation pool whose application space is a public space, wherein the public space includes space 2 and space 3; the first component group includes: repair components with component numbers 1 and 2, the second component group includes: repair components with component numbers 3 and 4, the first operation pool includes: pending operations with operation numbers 1, 2 and 3, and the second operation pool includes: pending operations with operation numbers 4, 5 and 6, wherein the repair component with component number 1 executes pending operations with operation numbers 1 and 3, the repair component with component number 2 executes pending operations with operation number 2, the repair component with component number 3 executes pending operations with operation numbers 4 and 6, and the repair component with component number 4 executes pending operations with operation number 5.
[0083] Figure 3 FIG. 1 is a schematic diagram of a repair component registration process according to an embodiment of the present invention. Figure 3 As shown, the following steps are included:
[0084] Step S301: The repair component requests the platform to register component information of the repair component and automatically generate a component identity for the repair component.
[0085] Step S302: configure the application space to which the repair component belongs.
[0086] Alternatively, as Figure 4 As shown, the repair component request platform configures the repair components 1 and 2 to belong to the application space 1, and the repair components 3 and 4 are not configured to belong, which means that the repair components belong to the public space.
[0087] Step S303: Initiate a test on the registered repair component to obtain the operation status of the repair component.
[0088] Step S304, check whether the operating status is available, if not, execute step S305, if yes, execute step S306.
[0089] Step S305: Update the component status of the repair component that is not in the available state to the offline state, and then execute S309.
[0090] Step S306: Update the component status of the repair component that is in the available status to the online status.
[0091] Step S307, registering a component identity for the repair component;
[0092] Step S308: receiving feedback information of the repair component, wherein the feedback information indicates a successful response.
[0093] Step S309: After a preset period, re-check the operating status of the repair component until the end condition is met.
[0094] Figure 4 Schematic diagram of a repair component operation deployment process according to an embodiment of the present invention, such as Figure 4 As shown, the following steps are included:
[0095] Step S401: Repair the component request platform, obtain information of all components of the same type, and sort them.
[0096] Step S402: Classify the repair components according to their application spaces and divide them into construction groups.
[0097] Optionally, the repair components in the obtained component list are classified according to the application space to which they belong. Repair components in the same application space form exclusive component groups of their respective application spaces, and repair components without a belonging space are placed in the cluster public component group. Figure 4 As shown, restoration components 1 and 2 belong to a first component group of space 1, and restoration components 3 and 4 belong to a second component group of the public space.
[0098] Step S403: Repair the component request platform, obtain the job list of all jobs to be executed, and sort them.
[0099] Step S404 , detecting whether the job to be executed has an exclusive component group, that is, detecting the application space to which the job to be executed belongs, and determining the component group belonging to the application space; if so, executing step S405 ; if not, executing step S406 .
[0100] Step S405: To-be-executed jobs with dedicated component groups are sequentially assigned to the job pools of their respective application spaces.
[0101] In step S406 , the jobs without dedicated component groups are sequentially assigned to a public job pool, that is, a job pool whose application space is a public space.
[0102] Alternatively, as Figure 4 As shown, pending jobs 1, 2, and 3 are assigned to the first job pool of space 1, and jobs 4 and 5 of space 2 and pending job 6 of space 3 are assigned to the job pool of the public space.
[0103] Step S407 , the repair component searches for its own component group and component serial number in the component group based on the injected component identity, and then locks the corresponding operation pool based on the application space to which the repair component belongs.
[0104] Step S408: Take out the pending job with the corresponding job number from the job pool, and then take out the pending job with the corresponding job number plus the step from the job pool with the component group size (that is, the number of components in the component group) as the step, to obtain a job list, and store the job list in the memory. The pending jobs in this job list are handed over to the corresponding repair component for processing, such as Figure 4 The arrow in the middle points to the direction shown.
[0105] Step S409: Reset the pending jobs that have failed or timed out in the job list at preset intervals, recreate the component group and job pool, and select a new round of job lists until the end condition is met.
[0106] Figure 5 FIG. 1 is a schematic diagram of a component processing operation process according to an embodiment of the present invention. Figure 5 As shown, the following steps are included:
[0107] Step S501: The repair component detects the job list allocated for itself in the memory.
[0108] Step S502: Process each to-be-executed job in the job list one by one.
[0109] Step S504: Before processing, mark the job item (that is, the pending job to be executed) as being processed, and send the status back to the platform to avoid repeated processing.
[0110] Step S505: Execute specific job processing logic.
[0111] Step S506, determining whether the job list has been processed. If not, returning to step S502; if it has been processed, executing step S507.
[0112] Step S506: After the job list processing is completed, the allocation job list is rechecked at a preset interval and the processing is performed again until the end condition is met.
[0113] The above-mentioned embodiment of the present application dynamically allocates pending jobs according to the application space to which the repair component belongs, ensuring that each pending job is processed by the corresponding repair component. Compared with the original preemptive job allocation, it can block conflicts in job processing and improve processing efficiency. Moreover, the repair components are allocated according to the application space to which they belong. When the pending jobs in the application space accumulate, the repair components can be allocated separately, and the jobs can be processed centrally, giving priority to completing space jobs with higher weights, thereby improving customer satisfaction.
[0114] The above-mentioned embodiment of the present application obtains component identity identification by repairing component registration to achieve self-identification. In a large-scale deployment cluster, compared with manual management methods, it reduces the probability of error and saves operation and maintenance costs.
[0115] The above-mentioned embodiments of the present application do not rely on third-party coordination components, reduce the project volume, alleviate the operation and maintenance workload, and enhance system stability.
[0116] According to an embodiment of the present invention, a data repair device embodiment is also provided. It should be noted that the data repair device can be used to execute the data repair method in the embodiment of the present invention, and the data repair method in the embodiment of the present invention can be executed in the data repair device.
[0117] Figure 6 is a schematic diagram of a data repair device according to an embodiment of the present invention. Figure 6 As shown, the device may include: an acquisition module 62, used to obtain job information of at least one job to be executed, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; a division module 64, used to divide at least one job to be executed belonging to the same application space into a job pool corresponding to the application space; a determination module 66, used to determine a component group belonging to the same application space as each job pool, wherein each component group includes: at least one repair component belonging to the same application space; an execution module 68, used to call at least one repair component in the component group to execute at least one job to be executed in the job pool.
[0118] It should be noted that the acquisition module 62 in this embodiment can be used to execute step S102 in the embodiment of the present application, the division module 64 in this embodiment can be used to execute step S104 in the embodiment of the present application, the determination module 66 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the execution module 68 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0119] In an embodiment of the present invention, job information of at least one job to be executed is obtained, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: an application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; at least one job to be executed belonging to the same application space is assigned to a job pool corresponding to the application space; a component group belonging to the same application space as each job pool is determined, wherein each component group includes: at least one repair component belonging to the same application space; at least one repair component in the component group is called to execute at least one job to be executed in the job pool, so that the correspondence between the job pool and the component group can be determined by using the application space, and the repair component in the component group respectively executes at least one component to be repaired in the job pool corresponding to the component group, thereby achieving the purpose of automatically allocating jobs to be executed to the components to be repaired, improving the execution efficiency of the components to be repaired on the jobs to be executed, and realizing the technical effect of improving the repair efficiency of the components to be repaired, thereby solving the technical problem of low repair efficiency of the repair components in the prior art.
[0120] As an optional embodiment, the execution module includes: a first allocation unit, used to allocate continuous component serial numbers to at least one repair component in the same component group; a second allocation unit, used to allocate continuous job serial numbers to at least one to-be-executed job in the same job pool; an establishment unit, based on the component serial number and the job serial number, to establish a job list corresponding to each component serial number, wherein the job list is used to record at least one job serial number allocated to the same component serial number; an execution unit, used to call the repair component corresponding to each component serial number, and respectively execute at least one to-be-executed job recorded in the job list corresponding to the component serial number.
[0121] As an optional embodiment, the establishment unit includes: a detection subunit, used to detect the number of components to be repaired in the component group; a determination subunit, used to determine at least one job number corresponding to each component number with the number of components as a step size, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step size; and a filling subunit, used to fill at least one job number corresponding to each component number into the job list corresponding to the same component number.
[0122] As an optional embodiment, the device also includes: an acquisition sub-module, which is used to obtain a component registration list before calling at least one repair component in the component group to execute at least one to-be-executed job in the job pool, wherein the component registration list is used to record at least one repair component that has been registered; a detection sub-module, which is used to detect the available repair components in the registration list according to a preset period, wherein the available repair components are repair components that are in an available state; and a determination sub-module, which is used to determine the component group based on the available repair components.
[0123] As an optional embodiment, the device also includes: a receiving submodule, used to receive a registration request for the repair component before obtaining the component registration list; a configuration submodule, used to configure component information for the repair component in response to the registration request, wherein the component information includes at least: the application space to which the repair component belongs.
[0124] As an optional embodiment, the detection submodule includes: a sending unit, used to send a detection instruction to at least one repair component in the registration list according to a preset period, wherein the detection instruction is used to detect the operating status of the repair component, and the operating status at least includes: an available status; a receiving unit, used to receive feedback information from the repair component, wherein, when the repair component is in an available status, the repair component successfully responds to the detection instruction to generate feedback information; a determination unit, used to determine the repair component that receives the feedback information as an available repair component.
[0125] As an optional embodiment, the determination submodule includes: an identification unit for identifying the application space to which each available repair component belongs; and a division unit for classifying at least one available repair component belonging to the same application space into a component group corresponding to the application space.
[0126] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0127] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.
[0128] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the data repair method: obtaining job information of at least one job to be executed, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: the application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; at least one job to be executed belonging to the same application space is assigned to a job pool corresponding to the application space; determining a component group belonging to the same application space as each job pool, wherein each component group includes: at least one repair component belonging to the same application space; calling at least one repair component in the component group to execute at least one job to be executed in the job pool.
[0129] Optionally, Figure 7 1 is a block diagram of a computer terminal according to an embodiment of the present invention. Figure 7 As shown, the computer terminal 70 may include: one or more (only one is shown in the figure) processors 72 and a memory 74.
[0130] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data repair method and device in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned data repair method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories may be connected to the terminal 70 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0131] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the job information of at least one job to be executed, wherein each job to be executed is used to request a repair component to perform data repair on abnormal data, and the job information at least includes: the application space to which the job to be executed belongs, and each application space is pre-equipped with a corresponding repair component; at least one job to be executed belonging to the same application space is assigned to the job pool corresponding to the application space; determine the component group belonging to the same application space as each job pool, wherein each component group includes: at least one repair component belonging to the same application space; call at least one repair component in the component group to execute at least one job to be executed in the job pool.
[0132] Optionally, the processor may also execute the program code for the following steps: assigning consecutive component numbers to at least one repair component in the same component group; assigning consecutive job numbers to at least one job to be executed in the same job pool; establishing a job list corresponding to each component number based on the component number and the job number, wherein the job list is used to record at least one job number assigned to the same component number; calling the repair component corresponding to each component number, and respectively executing at least one job to be executed recorded in the job list corresponding to the component number.
[0133] Optionally, the processor may also execute the program code of the following steps: detecting the number of components to be repaired in the component group; determining at least one job number corresponding to each component number using the number of components as a step length, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step length; and filling at least one job number corresponding to each component number into the job list corresponding to the same component number.
[0134] Optionally, the processor may also execute the program code of the following steps: obtaining a component registration list, wherein the component registration list is used to record at least one repair component that has been registered; detecting available repair components in the registration list according to a preset period, wherein available repair components are repair components that are in an available state; and determining a component group based on the available repair components.
[0135] Optionally, the processor may further execute program code of the following steps: receiving a registration request for a repair component; and configuring component information for the repair component in response to the registration request, wherein the component information includes at least an application space to which the repair component belongs.
[0136] Optionally, the processor may also execute the program code of the following steps: sending a detection instruction to at least one repair component in the registration list according to a preset period, wherein the detection instruction is used to detect the operating status of the repair component, and the operating status includes at least: an available status; receiving feedback information from the repair component, wherein, when the repair component is in an available status, the repair component successfully responds to the detection instruction to generate feedback information; and determining the repair component that receives the feedback information as an available repair component.
[0137] Optionally, the processor may further execute program code of the following steps: identifying the application space to which each available repair component belongs; and assigning at least one available repair component belonging to the same application space to a component group corresponding to the application space.
[0138] An embodiment of the present invention provides a data repair solution. In this embodiment, job information of at least one pending job is obtained, wherein each pending job is used to request a repair component to perform data repair on abnormal data, and the job information includes at least: the application space to which the pending job belongs, each application space being pre-equipped with a corresponding repair component; at least one pending job belonging to the same application space is assigned to a job pool corresponding to the application space; a component group belonging to the same application space as each job pool is determined, wherein each component group includes at least one repair component belonging to the same application space; at least one repair component in the component group is called to execute at least one pending job in the job pool, thereby determining the correspondence between the job pool and the component group using the application space, and having the repair components in the component group respectively execute at least one pending component in the job pool corresponding to the component group, thereby achieving the purpose of automatically allocating pending jobs to the pending components, improving the execution efficiency of the pending components on the pending jobs, and achieving the technical effect of improving the repair efficiency of the pending components, thereby solving the technical problem of low repair efficiency of the repair components in the prior art.
[0139] It can be understood by those skilled in the art that Figure 7The structure shown is for illustration only, and the computer terminal may also be a smart phone, tablet computer, handheld computer, mobile Internet device (MID), PAD and other terminal devices. Figure 7 It does not limit the structure of the above electronic device. For example, the computer terminal 70 may also include Figure 7 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 7 Different configurations shown.
[0140] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0141] An embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the data repair method provided in the above embodiment are implemented.
[0142] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0143] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0144] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0145] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0146] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0148] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A data repair method, characterized in that: include: Obtaining job information of at least one pending job, wherein each pending job is used to request a repair component to repair abnormal data, the job information including at least: an application space to which the pending job belongs, each application space being pre-configured with a corresponding repair component, the application space being used to separate and manage virtual spaces of various applications; assigning at least one of the to-be-executed jobs belonging to the same application space to a job pool corresponding to the application space; Determining a component group that belongs to the same application space as each of the operation pools, wherein each of the component groups includes: at least one repair component that belongs to the same application space; Calling at least one repair component in the component group to execute at least one of the pending jobs in the job pool includes: Assign consecutive component numbers to at least one of the repair components in the same component group; assign consecutive job numbers to at least one of the to-be-executed jobs in the same job pool; detect the number of components of the repair components in the component group; determine at least one job number corresponding to each component number using the number of components as a step size, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step size; fill at least one job number corresponding to each component number into a job list corresponding to the same component number, wherein the job list is used to record at least one job number assigned to the same component number.
2. The method according to claim 1, characterized in that Calling at least one repair component in the component group to execute at least one of the pending jobs in the job pool includes: The repair component corresponding to each component serial number is called to respectively execute at least one of the to-be-executed jobs recorded in the job list corresponding to the component serial number.
3. The method according to claim 1, characterized in that Before calling at least one repair component in the component group to execute at least one of the pending jobs in the job pool, the method further includes: Acquire a component registration list, wherein the component registration list is used to record at least one repair component that has been registered; detecting available repair components in the registration list according to a preset period, wherein the available repair components are the repair components in an available state; Based on the available repair components, the component group is determined.
4. The method according to claim 3, characterized in that Before obtaining the component registration list, the method further includes: receiving a registration request for a repair component; In response to the registration request, component information is configured for the repair component, wherein the component information at least includes: an application space to which the repair component belongs.
5. The method according to claim 3, characterized in that Detecting available repair components in the registration list according to a preset period includes: Sending a detection instruction to at least one of the repair components in the registration list according to the preset period, wherein the detection instruction is used to detect the operating status of the repair component, and the operating status at least includes: an available status; receiving feedback information of the repair component, wherein, when the repair component is in the usable state, the repair component successfully responds to the detection instruction to generate the feedback information; The repair component receiving the feedback information is determined as the available repair component.
6. The method according to claim 3, characterized in that Determining the component group based on the available repair components includes: Identifying the application space to which each of the available repair components belongs; At least one of the available repair components belonging to the same application space is classified into a component group corresponding to the application space.
7. A data repair device, characterized in that: include: an acquisition module configured to acquire job information of at least one pending job, wherein each pending job is configured to request a repair component to repair abnormal data, and the job information includes at least: an application space to which the pending job belongs, each application space being pre-configured with a corresponding repair component, and the application space being configured to separate and manage virtual spaces of various applications; a partitioning module, configured to allocate at least one of the to-be-executed jobs belonging to the same application space into a job pool corresponding to the application space; a determination module, configured to determine a component group belonging to the same application space as each of the operation pools, wherein each component group includes: at least one repair component belonging to the same application space; An execution module, configured to call at least one repair component in the component group to execute at least one of the pending jobs in the job pool, comprising: Assign consecutive component numbers to at least one of the repair components in the same component group; assign consecutive job numbers to at least one of the to-be-executed jobs in the same job pool; detect the number of components of the repair components in the component group; determine at least one job number corresponding to each component number using the number of components as a step size, wherein the difference between at least one job number and the corresponding component number is an integer multiple of the step size; fill at least one job number corresponding to each component number into a job list corresponding to the same component number, wherein the job list is used to record at least one job number assigned to the same component number.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the processor, wherein the data repair method according to any one of claims 1 to 6 is executed when the program is run.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the data repair method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data recovery method and device and electronic equipment
CN115630054A
Task scheduling method and device, electronic equipment and storage medium
CN116089034A