Computational task execution methods, apparatus, equipment and storage media
By acquiring and comparing the data file information between multiple server clusters, determining whether the data files are consistent, the problems of resource waste and inefficiency caused by frequent data migration in the prior art are solved, and more efficient computing task processing is achieved.
Patent Information
- Application Number
- CN202411856716.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the prior art, data between multiple server clusters cannot be called directly, resulting in frequent migration of data to maintain consistency when processing computing tasks, resulting in waste of resources and inefficient processing.
By obtaining the file information of the data file that the calculation task is to be executed, including the number of files and the latest modification time, it is determined whether the data file and the historical data file are consistent. If consistent, the calculation task is performed directly; otherwise, the latest data file is obtained and the calculation task is performed.
This solution avoids unnecessary data migration, saves migration resources and verification time, and improves the processing efficiency of the target server cluster processing computing tasks.
Smart Images

Figure CN119322768B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information technology, and in particular, relates to a computing task execution method, device, equipment and storage medium. Background Art
[0002] In the prior art, data between multiple server clusters cannot be called between different server clusters. If a computing task processed by any server cluster in the multiple server clusters depends on data stored in other server clusters in the multiple server clusters, the data that the computing task in other server clusters depends on needs to be migrated to the current server cluster to ensure that the current server cluster can process the computing task normally. However, when the migrated data in other server clusters changes, the migrated data of the current server cluster remains unchanged, which makes the migrated data in the current server cluster inconsistent with the migrated data in other server clusters after the change.
[0003] In the prior art, the following two methods are generally used to maintain the consistency of the migration data of the current server cluster with the latest data after the migrated data in other server clusters has changed. Method 1: Before processing each computing task, all migrated data in other server clusters are migrated back to the current server cluster. Method 2: Before processing each computing task, use a third-party tool to migrate the migrated data in other server clusters that are inconsistent with the migration data in the current server cluster back to the current server cluster.
[0004] When the consistency of the migrated data and the migrated data is achieved through method 1, the unchanged data in the migrated data will also be re-migrated to the current server cluster, resulting in unnecessary waste of migration resources and consuming a lot of migration time. Although method 2 saves migration time compared to method 1, it requires more verification time. Both methods make the current server cluster have low processing efficiency when processing computing tasks based on data in other server clusters. Summary of the invention
[0005] The embodiment of the present application provides an implementation solution different from the prior art to solve the technical problem that the current server cluster has low processing efficiency when processing computing tasks based on data in other server clusters.
[0006] In a first aspect, the present application provides a computing task execution method applicable to a target server cluster among multiple server clusters, comprising: obtaining file information of a data file in an original server cluster on which the computing task to be executed depends, the file information including a first file number and a first latest modification time, the original server cluster being any server cluster among the multiple server clusters except the target server cluster; determining whether the data file is consistent with a historical data file obtained last time based on the file information, if so, executing the computing task, if not, obtaining the data file and executing the computing task based on the data file.
[0007] In the second aspect, the present application provides a computing task execution device, which is applicable to a target server cluster among multiple server clusters, including: an acquisition unit, used to obtain file information of data files in an original server cluster on which the computing task to be executed depends, the file information including a first file number and a first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster; a determination unit, used to determine whether the data file is consistent with the historical data file obtained last time based on the file information, if so, execute the computing task, if not, acquire the data file and execute the computing task based on the data file.
[0008] In a third aspect, the present application provides an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any method in the first aspect or any possible implementation manner of the first aspect by executing the executable instructions.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any method in the first aspect or any possible implementation manner of the first aspect.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method in the first aspect or any possible implementation manner of the first aspect.
[0011] The present application provides a method for obtaining file information of data files in the original server cluster that the computing task to be executed depends on, wherein the file information includes the first number of files and the first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster; based on the file information, determining whether the data file is consistent with the historical data file obtained last time, if so, executing the computing task, if not, obtaining the data file, and executing the computing task based on the data file. The method uses file information to determine whether the data files in the original server cluster are consistent with the data files in the target server cluster, and if they are inconsistent, migrate the data files, and if they are consistent, do not migrate the data files, saving unnecessary migration resources, avoiding wasting unnecessary migration time, and avoiding wasting more verification time, thereby greatly improving the processing efficiency of the target server cluster in processing computing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0013] Figure 1 A schematic diagram of the structure of a computing task execution system provided in one embodiment of the present application;
[0014] Figure 2 A flowchart of a method for executing a computing task is provided for an embodiment of the present application;
[0015] Figure 3 A schematic diagram of a process for generating a first character string provided in an embodiment of the present application;
[0016] Figure 4 A schematic diagram of a flow chart of determining to execute a computing task based on a first character string provided in an embodiment of the present application;
[0017] Figure 5 A schematic diagram of the structure of a computing task execution device is provided for an embodiment of the present application;
[0018] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.
[0020] The terms "first" and "second" etc. in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising 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 equipment.
[0021] In the prior art, data between multiple server clusters cannot be called between different server clusters. If a computing task processed by any server cluster in the multiple server clusters depends on data stored in other server clusters in the multiple server clusters, the data that the computing task in other server clusters depends on needs to be migrated to the current server cluster to ensure that the current server cluster can process the computing task normally. However, when the migrated data in other server clusters changes, the migrated data of the current server cluster remains unchanged, which makes the migrated data in the current server cluster inconsistent with the migrated data in other server clusters after the change.
[0022] In the prior art, the following two methods are generally used to maintain the consistency of the migration data of the current server cluster with the latest data after the migrated data in other server clusters has changed. Method 1: Before processing each computing task, all migrated data in other server clusters are migrated back to the current server cluster. Method 2: Before processing each computing task, use a third-party tool to migrate the migrated data in other server clusters that are inconsistent with the migration data in the current server cluster back to the current server cluster.
[0023] When the consistency of the migration data and the migrated data is achieved through method 1, the unchanged data in the migrated data will also be re-migrated to the current server cluster, resulting in unnecessary waste of migration resources and consuming a lot of migration time. Although method 2 saves migration time compared to method 1, it requires more verification time. Both of the above methods make the current server cluster less efficient when processing computing tasks based on data in other server clusters. In addition, in methods 1 and 2, only the latest migration data (the latest version of the migration data) is stored in the target server cluster. When the migration data changes, the latest migration data will overwrite the historical migration data before the change, resulting in the historical migration data being overwritten and unable to be reused.
[0024] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0025] Figure 1 A schematic diagram of a computing task execution system provided for an exemplary embodiment of the present application, the system includes a target server cluster and multiple other server clusters, wherein the original server cluster is included in the multiple other server clusters, namely, other server cluster 1, and the number of server clusters in the multiple other server clusters is 1 or more, for example Figure 1 The multiple other server clusters shown also include other server cluster 2 and other server cluster n.
[0026] The target server cluster is used to obtain the file information of the data files in the original server cluster that the computing task to be executed depends on, the file information includes the first file number and the first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster; based on the file information, it is determined whether the data file is consistent with the historical data file obtained last time, if so, the computing task is executed, if not, the data file is obtained, and the computing task is executed based on the data file. Among them, the server cluster in the multiple other server clusters that stores the data files that the computing task executed by the target server cluster depends on is the original server cluster, that is, it is used to provide data files for the target server cluster.
[0027] The execution principles and interaction processes of the component units in the embodiment of the system, such as the target server cluster and the original server cluster in multiple other server clusters, can be found in the description of the following method embodiments.
[0028] Figure 2 A flowchart of a computing task execution method provided by an exemplary embodiment of the present application is provided. The execution subject of the method may be a target server cluster in multiple server clusters. The method at least includes the following steps S101-S102:
[0029] S101. Obtain file information of data files in an original server cluster on which a computing task to be executed depends, wherein the file information includes a first file number and a first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster.
[0030] Optionally, the number of servers in any server cluster of the multiple server clusters may be one or more.
[0031] Optionally, a computing task refers to a series of operations or instructions that need to be processed by a server.
[0032] Optionally, a data file refers to a file storing data. Data in a server cluster is stored in the form of files, wherein a data file is a collection of multiple sub-data files, and a sub-data file is the smallest file unit for storing data.
[0033] Exemplarily, a data file can be understood as a folder, and sub-data files are files in the folder, and each file stores data.
[0034] Optionally, the data file includes multiple sub-data files. In the aforementioned S101, file information of data files in the original server cluster that the computing task to be executed depends on is obtained, and the file information includes the first file number and the first latest modification time, including the following steps S0001-S0003:
[0035] S0001. Acquire multiple metadata information corresponding to multiple sub-data files, acquire the number of the multiple metadata information, and use the number of the multiple metadata information as the first file number of the data file, wherein the metadata information corresponds to the sub-data file one by one.
[0036] S0002. Obtain corresponding multiple sub-file modification times from multiple metadata information, and take the maximum value of the multiple sub-file modification times as the first latest modification time.
[0037] Optionally, the first latest modification time may be a Unix timestamp, that is, the first latest modification time is a 10-digit integer. The Unix timestamp may be referred to in the prior art, and will not be described in detail here.
[0038] S0003. Compose file information of data files in the original server cluster that the computing task to be executed depends on based on the first file number and the first latest modification time.
[0039] Optionally, the metadata information refers to characteristic information describing the sub-data file, such as access rights to the sub-data file, file address information, file modification time, and other characteristic information.
[0040] Optionally, the file information refers to file characteristic information and file quantity information describing the data file, wherein the file characteristic information includes the latest file modification time of the data file.
[0041] Optionally, the target server cluster is used to process the computing tasks to be executed, and the original server cluster stores data required to process the computing tasks to be executed.
[0042] S102: Determine whether the data file is consistent with the historical data file obtained last time based on the file information; if so, execute the computing task; if not, acquire the data file and execute the computing task based on the data file.
[0043] It should be understood that when a data file is inconsistent with the historical data file obtained last time, it means that the data file in the original server cluster has changed. Therefore, it is necessary to obtain the latest data file from the original server cluster, so as to execute the computing task based on the latest data file to ensure that the computing task is executed correctly.
[0044] Optionally, the historical data files refer to different versions of data files obtained from the original server cluster when the target server cluster executes the computing task to be executed before the computing task to be executed this time, wherein different versions of data files mean that when the computing task is executed multiple times, the data files of the original server cluster that are dependent on are all locally modified, so that the target server cluster obtains multiple data files that are locally different.
[0045] Optionally, when the file modification time of a sub-data file in the data file in the original server cluster is less than the first latest modification time of the data file, the first latest modification time has not changed, but the number of data files has changed, and the data file has been changed. Therefore, it is not accurate enough to judge whether the data file has been modified by the first latest modification time. In order to accurately judge whether the data file is consistent with the historical data file obtained last time, the method of this application also includes: when the first number of files is consistent with the number of files of historical data files, and the first latest modification time is consistent with the second latest modification time of the historical data file, the data file is deemed to be consistent with the historical data file obtained last time.
[0046] In summary, by determining the number of data files and the latest modification time of data files, we can comprehensively cover the situation where all data files are modified when sub-data files are deleted or sub-data file contents are modified, thereby accurately determining whether data files are modified.
[0047] Optionally, in order to accurately determine whether the data file is consistent with the historical data file acquired last time, the method further includes the following steps S1021-S1023:
[0048] S1021. Determine a first character string indicating the first file number and the first latest modification time based on the first file number and the first latest modification time.
[0049] Optionally, in the aforementioned S1021, determining a first character string indicating the first file number and the first latest modification time based on the first file number and the first latest modification time includes the following steps S01-S02:
[0050] S01. Concatenate the first file number and the first latest modification time in a character string to obtain a third character string.
[0051] Optionally, in the aforementioned S01, concatenating the first file number and the first latest modification time in a character string to obtain a third character string includes the following steps S0101-S0103:
[0052] S0101. Convert the first file number into a fourth character string of a character string type.
[0053] S0102. Convert the first latest modification time into a fifth character string of a character string type.
[0054] S0103. Concatenate the fourth character string and the fifth character string to obtain a third character string.
[0055] S02. Calculate the third character string using a preset function to obtain a first character string indicating the number of the first files and the first latest modification time.
[0056] Optionally, the preset function in the aforementioned S02 is a hash function, which includes any of the following functions: SHA-1 function, MD5 function, SHA-2 function, and SHA-3 function.
[0057] It should be understood that, in order to facilitate understanding of how the first string is generated, see Figure 3 , Figure 3 A flowchart of generating a first character string is provided for an exemplary embodiment of the present application, and the flowchart includes S301-S305:
[0058] S301: Obtain metadata information corresponding to each sub-data file in a data file.
[0059] S302, obtaining multiple file modification times and multiple numbers of metadata information from multiple metadata information;
[0060] S303: Taking the maximum value among the multiple file modification times as the first latest modification time, and taking the number of the multiple metadata information as the first file number.
[0061] S304: Concatenate the first latest modification time of the string type and the first number of files of the string type to obtain a third string.
[0062] S305 . Perform a hash function process on the third character string to obtain a first character string.
[0063] S1022: If the first character string is identical to the second character string corresponding to the historical data file, the data file is deemed to be consistent with the historical data file acquired last time.
[0064] S1023: If the first character string is different from the second character string corresponding to the historical data file, it is deemed that the data file is inconsistent with the historical data file obtained last time.
[0065] Optionally, in order to distinguish different versions of data files, the method further includes: creating a correspondence between the first character string and the data file, and storing the correspondence.
[0066] Optionally, different versions of data files refer to versions of data files that have changed since the first execution of the computing task. For example, if the data file has not changed since the first execution of the computing task until the last execution of the computing task, there is only one version of the data file in the target server cluster. If the data file has changed three times since the first execution of the computing task until the last execution of the computing task, there are three versions of the data file (historical data files) in the target server cluster.
[0067] Optionally, the first character string may be used as a version identifier to identify a data file, so that a data file of a required version may be directly obtained through the first character string.
[0068] In summary, by using the first character string as the version number to identify the data file, multiple versions of the data file can be stored in the target server cluster, avoiding direct overwriting of historical data files, which results in only retaining the latest data file and losing historical data files, making them unusable.
[0069] It should be understood that in order to understand how the target server cluster stores different versions of data files, see Figure 4 , Figure 4 A flow chart of determining the execution of a computing task based on a first string provided for an exemplary embodiment of the present application, firstly, determining whether the first string is stored in the target server cluster by obtaining the first string, if so, directly executing the computing task based on the data file corresponding to the first string stored in the target server cluster, that is, the data file on which the computing task depends in the original server cluster has not changed, and the data file corresponding to the first string is the historical data file stored in the target server cluster (the latest version of the data file stored in the target server cluster). If not, the data file (the latest data file) is obtained from the original server cluster, a correspondence between the first string and the data file is constructed, and the correspondence is stored, that is, the data file on which the computing task depends in the original server cluster has changed, and the first string is used as the version number of the data file. Finally, the computing task is executed based on the data file.
[0070] Optionally, in the aforementioned S102, the obtaining of the data file includes the following steps S001-S002:
[0071] S001. Obtain data file address information corresponding to the computing task.
[0072] S002. Acquire the data file from the data file address information.
[0073] In summary, the present application provides a method for obtaining file information of data files in an original server cluster on which a computing task to be executed depends, the file information including a first file number and a first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster; based on the file information, determining whether the data file is consistent with the historical data file obtained last time, if so, executing the computing task, if not, obtaining the data file, and executing the computing task based on the data file. The method utilizes file information to determine whether the data files in the original server cluster are consistent with the data files in the target server cluster, migrates inconsistent data files, and does not migrate consistent data, thereby avoiding wasting unnecessary migration time or avoiding wasting a lot of verification time, thereby greatly improving the processing efficiency of the target server cluster in processing computing tasks, improving the efficiency of data preparation before executing computing tasks, and determining whether the data set has changed through the first file number and the first latest modification time, and migrating the changed data files, which not only ensures that the target server cluster relies on the data in the latest data files in the original server cluster when executing computing tasks, but also saves unnecessary processing resources for data migration processing and saves more processing resources for data comparison processing.
[0074] In addition, the first character string is used as a version identifier, and each changed data file is migrated to the target server cluster, and each migrated data file is identified by the first character string, so that multiple versions of data files are stored in the target server cluster. When a certain version of the data file is needed, it can be directly obtained using the first character string, avoiding data file overwriting and solving the problem of losing historical versions of data files and thus being unable to use historical versions of data files.
[0075] Figure 5 A schematic diagram of a computing task execution device provided for an exemplary embodiment of the present application; wherein the device is applicable to a target server cluster among multiple server clusters, and the device includes:
[0076] An acquisition unit 51 is used to acquire file information of data files in an original server cluster on which the computing task to be executed depends, wherein the file information includes a first file number and a first latest modification time, and the original server cluster is any server cluster among the multiple server clusters except the target server cluster;
[0077] The determination unit 52 is used to determine whether the data file is consistent with the historical data file obtained last time based on the file information, and if so, execute the computing task; if not, obtain the data file and execute the computing task based on the data file.
[0078] Optionally, the device is also used to, when the first file number is consistent with the file number of historical data files, and the first latest modification time is consistent with the second latest modification time of the historical data files, regard the data file as consistent with the historical data file acquired last time.
[0079] Optionally, the device is also used to: determine a first character string used to indicate the first number of files and the first latest modification time based on the first number of files and the first latest modification time; if the first character string is the same as a second character string corresponding to the historical data file, the data file is deemed to be consistent with the historical data file obtained last time.
[0080] Optionally, the device is used to determine a first character string indicating the first number of files and the first latest modification time based on the first number of files and the first latest modification time, specifically for: concatenating the first number of files and the first latest modification time in the form of a character string to obtain a third character string; calculating the third character string through a preset function to obtain a first character string indicating the first number of files and the first latest modification time.
[0081] Optionally, the device is further used to: create a correspondence between the first character string and the data file, and store the correspondence.
[0082] Optionally, the device is used to obtain a data file, specifically to: obtain address information of a data file corresponding to the computing task; and obtain the data file from the data file address information.
[0083] Optionally, in the device, the preset function is a hash function.
[0084] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the device may perform the above method embodiment, and the above and other operations and / or functions of each module in the device are the corresponding processes in each method in the above method embodiment, respectively, and no further description is given here for the sake of brevity.
[0085] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0086] Figure 6 is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0087] The memory 601 and the processor 602, the memory 601 is used to store the computer program and transmit the program code to the processor 602. In other words, the processor 602 can call and run the computer program from the memory 601 to implement the method in the embodiment of the present application.
[0088] For example, the processor 602 may be configured to execute the above method embodiments according to instructions in the computer program.
[0089] In some embodiments of the present application, the processor 602 may include but is not limited to:
[0090] General-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0091] In some embodiments of the present application, the memory 601 includes but is not limited to:
[0092] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
[0093] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 601 and executed by the processor 602 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0094] like Figure 6 As shown, the electronic device may also include:
[0095] The transceiver 603 may be connected to the processor 602 or the memory 601 .
[0096] The processor 602 may control the transceiver 603 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 603 may include a transmitter and a receiver. The transceiver 603 may further include an antenna, and the number of antennas may be one or more.
[0097] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0098] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.
[0099] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0100] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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 devices or modules, which can be electrical, mechanical or other forms.
[0102] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0103] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for executing a computing task, characterized in that: Applicable to target server clusters in multiple server clusters, including: Obtaining file information of data files in an original server cluster on which the computing task to be executed depends, the file information including the first file number and the first latest modification time, the original server cluster being any server cluster among the multiple server clusters except the target server cluster; Determine whether the data file is consistent with the historical data file obtained last time based on the file information, if so, execute the computing task, if not, acquire the data file and execute the computing task based on the data file; The method further comprises: Determine a first character string indicating the first file number and the first latest modification time based on the first file number and the first latest modification time; If the first character string is identical to the second character string corresponding to the historical data file, the data file is deemed to be consistent with the historical data file acquired last time.
2. The method according to claim 1, characterized in that When the first file number is consistent with the file number of the historical data file, and the first latest modification time is consistent with the second latest modification time of the historical data file, the data file is considered to be consistent with the historical data file obtained last time.
3. The method according to claim 1, characterized in that The determining, based on the first number of files and the first latest modification time, a first character string for indicating the first number of files and the first latest modification time includes: Concatenate the first file number and the first latest modification time in a character string to obtain a third character string; The third character string is calculated by a preset function to obtain a first character string indicating the first file number and the first latest modification time.
4. The method according to claim 1, characterized in that: The method further comprises: A correspondence between the first character string and the data file is created, and the correspondence is stored.
5. The method according to claim 1, characterized in that The obtaining of the data file comprises: Obtaining data file address information corresponding to the computing task; The data file is obtained from the data file address information.
6. The method according to claim 3, characterized in that The preset function is a hash function.
7. A computing task execution device, characterized in that: Applicable to target server clusters in multiple server clusters, including: an acquisition unit, configured to acquire file information of data files in an original server cluster on which the computing task to be executed depends, the file information including the first number of files and the first latest modification time, the original server cluster being any server cluster among the multiple server clusters except the target server cluster; a determination unit, configured to determine whether the data file is consistent with the historical data file obtained last time based on the file information, and if so, execute the computing task; if not, acquire the data file and execute the computing task based on the data file; The device is also used to realize the following functions: Determine a first character string indicating the first file number and the first latest modification time based on the first file number and the first latest modification time; If the first character string is identical to the second character string corresponding to the historical data file, the data file is deemed to be consistent with the historical data file acquired last time.
8. An electronic device, characterized in that: include: processor; as well as A memory for storing executable instructions of the processor; Wherein, the processor is configured to perform the method of any one of claims 1-6 by executing executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
File migration method and apparatus and storage device
CN105637491A
Cluster data migration method, device and equipment and storage medium
CN113157645A