Timing Data Migration Method, Apparatus, Device, and Storage Medium
By automatically processing the timing task code and configuration data in the source file, and generating and updating formatted text, the problem of low manual migration efficiency is solved and efficient timing task data migration is achieved.
Patent Information
- Application Number
- CN202211270546.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-10-18
AI Technical Summary
In the prior art, manual data migration of timing tasks is inefficient and cannot effectively automate the migration of timing tasks.
By obtaining the source file to be migrated to the target platform, the timing task code is determined based on the code annotation of the programming data, formatted text is generated, and the task time expression and timing execution method are updated by the key value pair dictionary in the configuration data, and finally the updated formatted text is written to the target platform.
Automatic migration of timing tasks is realized, greatly improving the efficiency of timing tasks migration and avoiding errors in manual processing.
Smart Images

Figure CN115470197B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method, device, equipment, and storage medium for timed data migration. Background Art
[0002] With the development of the digital information age, more and more business scenarios rely on digital information processing. Among them, in banking business, in the face of complex operations and a large amount of data, various business data is often processed relying on a data processing platform / system. However, due to the continuous optimization of data and the replacement and upgrade of the processing platform, the information of the historical platform cannot be synchronized. In particular, in the data processing of banking business, timed tasks of data are often involved, such as timed data updates, timed data cleaning, etc. In the related art, the current method for timed data synchronization is manual processing. However, due to the large number of timed tasks, the manual processing efficiency is low. Summary of the Invention
[0003] This application provides a method, device, equipment, and storage medium for timed data migration, which solves the problem of low processing efficiency of manually migrating timed task data in the prior art, realizes automatic migration of timed tasks, and greatly improves the migration efficiency of timed tasks.
[0004] In a first aspect, this application provides a method for timed data migration, including:
[0005] Obtain source files to be migrated to a target platform, where the source files include programming data and configuration data corresponding to the programming data;
[0006] Based on the code annotations of the programming data, determine the timed task code in the source files;
[0007] For each of the timed task codes, generate a formatted text according to the class name in the timed task code, the task time expression in the timed task code, and the timed execution method in the timed task code;
[0008] Extract key-value pairs from the configuration data to generate a key-value pair dictionary;
[0009] Update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timed execution method in the formatted text according to the interface of the target platform;
[0010] Write the updated formatted text into the target platform.
[0011] In a possible implementation manner of this application, the writing the updated formatted text into the target platform includes:
[0012] Encrypt the updated formatted text according to the preset migration file encryption rule;
[0013] Send the encrypted formatted text to the target platform, so that the target platform feedbacks a decryption information collection window based on the encrypted formatted text, and collects decryption data based on the decryption information collection window;
[0014] Receive the decryption data feedback by the target platform;
[0015] If the decryption data is the same as the updated formatted text, write the formatted text into the target platform.
[0016] In a possible implementation manner of the present application, the extracting key-value pairs in the configuration data to generate a key-value pair dictionary includes:
[0017] Divide the configuration data into different configuration sub-data according to the type of the timing task in the configuration data;
[0018] For each type of the configuration sub-data, extract the target key-value pairs corresponding to the task time expression in the configuration sub-data;
[0019] Combine the target key-value pairs corresponding to each configuration sub-data to generate a key-value pair dictionary.
[0020] In a possible implementation manner of the present application, after writing the updated formatted text into the target platform, it includes:
[0021] Receive the migration result feedback by the target platform, obtain the target formatted text with the migration completed in the migration result, and extract the task time expression in the target formatted text;
[0022] Delete other key-value pairs in the key-value pair dictionary except the target key-value pairs corresponding to the task time expression to obtain an updated key-value pair dictionary.
[0023] In a possible implementation manner of the present application, after writing the updated formatted text into the target platform, it includes:
[0024] Obtain the current network speed traffic. If the network speed traffic is greater than the preset traffic threshold, upload the source file to the cloud and delete the source file in the local database;
[0025] Associate and store the cloud storage address of the source file with the configuration data in the local database.
[0026] In a possible implementation of the present application, after determining the timed task code in the source file based on the code annotation of the programming data, the method further includes:
[0027] Intercepting image information of the scheduled task code, splicing it to form a scheduled task code map, and feeding back the scheduled task code map to the user end;
[0028] If confirmation information is received from the user end in response to the scheduled task code diagram, the steps of extracting the class name in the scheduled task code, the task time expression in the scheduled task code, and the scheduled execution method in the scheduled task code are executed to generate formatted text corresponding to each scheduled task code.
[0029] In a possible implementation of the present application, after intercepting the image information of the timed task code, splicing to form a timed task code map, and feeding back the timed task code map to the user end, it also includes:
[0030] If no confirmation information of the user end responding to the scheduled task code map is received, feedback information of scheduled task code recognition failure is fed back;
[0031] Closes the migration thread for the source file.
[0032] In a second aspect, the present application provides a timed data migration device, the timed data migration device comprising:
[0033] An acquisition module: used to acquire a source file to be migrated to a target platform, wherein the source file includes programming data and configuration data corresponding to the programming data;
[0034] A determination module: used for determining the timed task code in the source file based on the code annotation of the programming data;
[0035] A text generation module: for generating formatted text for each of the scheduled task codes according to the class name in the scheduled task code, the task time expression in the scheduled task code, and the scheduled execution method in the scheduled task code;
[0036] Key-value pair processing module: used to extract key-value pairs from the configuration data and generate a key-value pair dictionary;
[0037] Update module: used to update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timed execution method in the formatted text according to the interface of the target platform;
[0038] Migration module: used for writing updated formatted text into the target platform.
[0039] In a third aspect, the present application provides a timed data migration device, where the timed data migration device includes:
[0040] One or more processors;
[0041] A memory; and
[0042] One or more applications, where the one or more applications are stored in the memory and are configured to be executed by the processor to implement the timed data migration method described in any one of the above.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, which is characterized in that a computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the timed data migration method described in any one of the above.
[0044] In the present application, a timed data migration method, device, equipment, and storage medium are provided. By obtaining source files to be migrated to a target platform, the source files include programming data and configuration data corresponding to the programming data; based on the code annotations of the programming data, determining the timed task code in the source files; for each timed task code, generating a formatted text according to the class name in the timed task code, the task time expression in the timed task code, and the timed execution method in the timed task code; extracting key-value pairs in the configuration data to generate a key-value pair dictionary; updating the task time expression in the formatted text according to the key-value pair dictionary, and updating the data call interface of the timed execution method in the formatted text according to the interface of the target platform; then writing the updated formatted text into the target platform. By automatically analyzing the programming data and configuration files in the source files to be migrated, and updating the encoding corresponding to the timed tasks in the encoding data through the configuration file and the interface of the target platform to be migrated, the accuracy of the timed data and the effectiveness of the timed tasks after migration are ensured, and the formatted text corresponding to the updated timed tasks is written into the target platform to implement the migration of timed task data, greatly improving the efficiency of timed task migration and avoiding errors in manual migration processing. Description of the Drawings
[0045] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0046] Figure 1 It is a schematic diagram of the scenario of the timed data migration method provided by the embodiment of the present application;
[0047] Figure 2 It is a schematic flowchart of an embodiment of the timing data migration method provided in the embodiments of the present application;
[0048] Figure 3 It is a schematic structural diagram of one implementation scheme for generating a key-value dictionary in the timing data migration method provided in the embodiments of the present application;
[0049] Figure 4 It is a schematic structural diagram of one implementation scheme for writing text into a target platform in the timing data migration method provided in the embodiments of the present application;
[0050] Figure 5 It is a schematic structural diagram of another implementation scheme of the timing data migration method provided in the embodiments of the present application;
[0051] Figure 6 It is a schematic structural diagram of yet another implementation scheme of the timing data migration method provided in the embodiments of the present application;
[0052] Figure 7 It is a schematic structural diagram of an embodiment of the timing data migration device provided in the embodiments of the present application;
[0053] Figure 8 It is a schematic structural diagram of an embodiment of the timing data migration device provided in the embodiments of the present application. Detailed implementation manners
[0054] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0055] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. are based on the orientation or positional relationships shown in the drawings. These are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more, unless otherwise specifically defined.
[0056] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "exemplary" in this application is not necessarily to be construed as more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the present invention. In the following description, details are set forth for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present invention can be practiced without these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in this application.
[0057] The embodiments of this application provide a timing data migration method, apparatus, device, and computer-readable storage medium, which will be described in detail below respectively.
[0058] The timing data migration method in the embodiments of the present invention is applied to a timing data migration apparatus, which is disposed in a timing data migration device. The timing data migration device is provided with one or more processors, a memory, and one or more application programs. One or more of the application programs are stored in the memory and configured to be executed by the processor to implement the timing data migration method. The timing data migration device may be a terminal, such as a mobile phone or a tablet computer. The timing data migration device may also be a server, or a service cluster composed of multiple servers.
[0059] As Figure 1 shown, Figure 1This is a schematic diagram of the scenario of the timed data migration method according to the embodiments of the present application. In the embodiments of the present invention, the timed data migration scenario includes a timed data migration device 100 (a timed data migration device is integrated with a timed data migration device). A computer-readable storage medium corresponding to the timed data migration runs in the timed data migration device 100 to execute the steps of the timed data migration.
[0060] It can be understood that Figure 1 The timed data migration device in the scenario of the illustrated timed data migration method, or the devices included in the timed data migration device do not constitute a limitation to the embodiments of the present invention. That is, the number of devices, the types of devices in the scenario of the timed data migration method, or the number of devices included in each device, the types of devices do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed in the embodiments of the present invention.
[0061] In the embodiments of the present invention, the timed data migration device 100 is mainly used for: obtaining source files to be migrated to the target platform, where the source files include programming data and configuration data corresponding to the programming data; determining the timed task code in the source files based on the code annotations of the programming data; for each timed task code, generating a formatted text according to the class name in the timed task code, the task time expression in the timed task code, and the timed execution method in the timed task code; extracting key-value pairs from the configuration data to generate a key-value pair dictionary; updating the task time expression in the formatted text according to the key-value pair dictionary, and updating the data call interface of the timed execution method in the formatted text according to the interface of the target platform; writing the updated formatted text into the target platform.
[0062] In the embodiments of the present invention, the timed data migration device 100 may be an independent timed data migration device, or a timed data migration device network or a timed data migration device cluster composed of timed data migration devices. For example, the timed data migration device 100 described in the embodiments of the present invention includes, but is not limited to, a computer, a network host, a single network timed data migration device, a set of multiple network timed data migration devices, or a cloud timed data migration device composed of multiple timed data migration devices. Among them, the cloud timed data migration device is composed of a large number of computers or network timed data migration devices based on cloud computing.
[0063] Those skilled in the art can understand that Figure 1 The application environment shown is only one application scenario of the solution of the present application, and does not constitute a limitation to the application scenario of the solution of the present application. Other application environments may also include more Figure 1More or fewer timing data migration devices shown, or the network connection relationship of the timing data migration devices, for example Figure 1 Only 1 timing data migration device is shown in Figure 1 . It can be understood that the scenario of this timing data migration method may also include one or more other timing data migration devices, which are not specifically limited here; the timing data migration device 100 may also include a memory for storing data, for example, storing image information obtained by shooting, etc.
[0064] In addition, in the scenario of the timing data migration method of this application, the timing data migration device 100 may be provided with a display device, or the timing data migration device 100 is not provided with a display device and is communicatively connected to an external display device 200. The display device 200 is used to output the result of the execution of the timing data migration method in the timing data migration device. The timing data migration device 100 can access the background database 300 (the background database may be in the local memory of the timing data migration device, and the background database may also be set in the cloud). The background database 300 stores information related to timing data migration. For example, the initial image in the background database 300, or the pre-set filtering parameters.
[0065] It should be noted that Figure 1 The schematic diagram of the scenario of the timing data migration method shown is only an example. The scenario of the timing data migration method described in the embodiments of the present invention is for more clearly illustrating the technical solutions of the embodiments of the present invention, and does not constitute a limitation on the technical solutions provided by the embodiments of the present invention.
[0066] Based on the above scenario of the timing data migration method, embodiments of the timing data migration method are proposed.
[0067] As Figure 2 shown, it is a schematic flowchart of an embodiment of the timing data migration method in an embodiment of this application. The timing data migration method includes steps S201 - S206:
[0068] S201. Obtain the source file to be migrated to the target platform, where the source file includes programming data and the configuration data corresponding to the programming data.
[0069] Among them, the target platform, that is, a third-party software for processing and accommodating the timing task. For example, a bank client software installed on an electronic device. It can be understood that the target platform to be migrated may be installed on the same intelligent device as the platform before migration, or may be installed on different intelligent devices from the platform before migration. For example, the target platform may be a bank client installed on electronic device 1, and the platform before migration may be a bank client installed on electronic device 2.
[0070] Among them, the source file to be migrated, that is, the programming data corresponding to the scheduled task scheduling stored in the platform before migration, and the configuration data corresponding to the programming data. It can be understood that the source file can be obtained according to the preset storage path. It can be understood that the programming data includes the code data of the scheduled task, and the configuration data is the configuration data that can be adjusted manually for the programming data.
[0071] Specifically, in the implementation solution of this application, the scheduled data migration method is applied to a scheduled data migration device. An historical platform before migration is installed on the scheduled data migration device, and the corresponding source file is stored for the platform data. When the scheduled data migration device receives a scheduled task migration instruction from the historical platform, it obtains the platform information of the target platform to which the historical platform corresponds and is to be migrated, and the source file to be migrated. Among them, the platform information of the target platform includes, for example, the data call interface corresponding to the scheduled task of the target platform, the communication path of the target platform, etc.
[0072] S202. Based on the code annotations of the programming data, determine the scheduled task code in the source file.
[0073] Among them, the code annotation is a kind of code tag that can be inserted into the source code. Our compiler can perform logical judgments on them, or we can write a tool method ourselves to read the annotation information in our source code.
[0074] Specifically, in the implementation solution of this application, the programming data includes code annotations. After the scheduled data migration device obtains the source file, it identifies the encoded data in the source file and identifies the code segment corresponding to the scheduled task annotation in the encoded data to determine the scheduled task code in the source file.
[0075] S203. For each of the scheduled task codes, generate a formatted text according to the class name in the scheduled task code, the task time expression in the scheduled task code, and the scheduled execution method in the scheduled task code.
[0076] Among them, each scheduled task has an entry class. The class name corresponding to the entry class is the grouping name of the scheduled task. For example, as long as the grouping for creating the scheduled task is JobOne, the logic in the task class JobOne will be executed. That is, JobOne is the class name. It can be understood that the class names corresponding to different entry classes are different. That is, for each scheduled task, there is a corresponding class name. Further, it can be understood that the scheduled task class name can also be determined according to the entry class parsed in the code segment.
[0077] Among them, the time expression, that is, the time calculation expression corresponding to the timing task. It can be understood that the timing task code executes the timing method based on the task time expression.
[0078] Specifically, after the timing data migration device determines the timing task code in the source file, it parses the timing task code in the source file. For example, according to the preset class name format and the preset time expression format, it parses the class name corresponding to the timing task and the time expression. The part of the timing task code excluding the class name and the time expression is the timing execution method. It can be understood that the timing execution method executes the timing task according to the time expression.
[0079] S204. Extract the key-value pairs in the configuration data to generate a key-value pair dictionary.
[0080] Among them, the configuration data, that is, the configuration data corresponding to each configurable item in the corresponding encoded data. It can be understood that the configuration data includes multiple key-value pairs. The key in each key-value pair corresponds to the programming code in the programming data. That is, the configuration data includes the key corresponding to the programming data and the value corresponding to the key. Generally, the configuration data is changed by modifying the corresponding value. When the programming data is used, the corresponding value is found through the key.
[0081] Specifically, in the implementation of this application, the timing data migration device searches for the value corresponding to the task time expression according to the key in the configuration data, and then extracts the corresponding key-value pair. It can be understood that in other implementation schemes of this application, all the key-value pairs in the configuration data can also be extracted to generate the corresponding key-value pair dictionary.
[0082] S205. Update the time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timing execution method in the formatted text according to the interface of the target platform.
[0083] Among them, the interface of the target platform, that is, the data interface for the target platform to call the timing task. That is, the target platform calls the timing task through the interface, that is, the interface for data transmission. It can be understood that the data call interface of the timing task execution method is the data call interface for the platform before migration to call the timing task.
[0084] Specifically, the timing data migration device looks up the target key corresponding to the task time expression in each timing task according to the key-value pair dictionary, confirms the corresponding target value according to the prime target key, and updates the target value to the data value corresponding to the task time expression, so as to update the time expression in the formatted text according to the key-value pair dictionary, ensuring that the task time expression after migration is synchronously corresponding to the configuration data. It can be understood that in some timing tasks, the configuration data and the update of the timing task may not be synchronous. Updating the time expression in the formatted text according to the key-value pair dictionary ensures the synchronization of the data.
[0085] S206. Write the updated formatted text into the target platform.
[0086] Specifically, after updating the formatted text, the timing data migration device writes the updated formatted text into the preset storage structure corresponding to the interface of the target platform.
[0087] Further, referring to Figure 3 , Figure 3 is a schematic structural diagram of one implementation scheme for generating a key-value dictionary in the timing data migration method provided by the embodiment of the present application, including steps S301-S303:
[0088] S301. Divide the configuration data into different configuration sub-data according to the types of timing tasks in the configuration data.
[0089] Among them, the timing task type, that is, the classification corresponding to each timing task, can be a preset classification identifier to determine a unique classification identifier, or it can be the class name of each timing task. It can be understood that the timing task type is used to distinguish which data in the configuration data corresponds to the timing task.
[0090] Specifically, after obtaining the configuration data of the programming data, the timing data migration device identifies the configuration sub-data corresponding to each timing task in the configuration data according to the preset classification identifier corresponding to each timing task.
[0091] S302. For each type of the configuration sub-data, extract the target key-value pairs corresponding to the task time expression in the configuration sub-data.
[0092] Further, the timing data migration device, according to the preset expression format of the preset time expression corresponding to each type of configuration sub-data, identifies the timing task time expression in the configuration sub-data, and extracts the target value corresponding to the time expression, so as to obtain the target key-value pairs corresponding to the task time expression in each timing task.
[0093] S303. Combine the target key-value pairs corresponding to each of the configuration sub-data to generate a key-value pair dictionary.
[0094] Further, after the timing data migration device obtains the target key-value pairs corresponding to the task time expressions in each timing task, it combines all the target key-value pairs to generate a key-value pair dictionary. It can be understood that the key-value pair dictionary includes multiple target key-value pairs, and each key-value pair includes the target key corresponding to the task time expression in the timing task and the target value corresponding to the target key.
[0095] Further, refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of one implementation for writing text into the target platform in the timing data migration method provided by the embodiments of the present application, including steps S401-S404:
[0096] S401. Encrypt the updated formatted text according to the preset migration file encryption rule.
[0097] Among them, the preset migration file encryption rule is used to encrypt the text to be migrated. It can be understood that the migration file encryption rule can be determined by an agreement between the target platform and the platform before migration, and the agreed migration file encryption rule is stored in a predetermined storage location. For example, the migration file encryption rule can be the encryption password or verification password of the formatted text, or convert the updated formatted text into decodable encoded data.
[0098] Specifically, after the timing data migration device obtains the updated formatted text, it obtains the migration file encryption rule stored in the predetermined storage location and encrypts the updated formatted text.
[0099] S402. Send the encrypted formatted text to the target platform so that the target platform feeds back a decryption information collection window based on the encrypted formatted text and collects decryption data based on the decryption information collection window.
[0100] Among them, the decryption information is the decryption information for decrypting the updated formatted text after encryption. For example, the decryption password that is the same as the encryption password, or the decryption data that has a certain calculation rule with the encryption password.
[0101] Specifically, after encrypting the updated formatted text in the timing task migration task, it sends the encrypted formatted text to the target platform. After receiving the encrypted formatted text, the target platform feeds back the decryption window corresponding to the encrypted formatted text to the user side corresponding to the target platform to receive the decryption information input by the target user.
[0102] S403. Receive the decrypted data fed back by the target platform.
[0103] Further, after the target platform collects decryption information based on the decryption window, it sends the decryption information to the timed data migration device, and the timed data migration device receives the decrypted data fed back by the target platform.
[0104] S404. If the decrypted data is the same as the updated formatted text, write the formatted text into the target platform.
[0105] Specifically, after the timed data migration device receives the decrypted data fed back by the target platform, it compares the decrypted data with the updated formatted text. If the decrypted data is the same as the updated formatted text, that is, the decrypted data of the target platform is correct, it sends a write instruction for the updated formatted text to the target platform, and the target platform writes the decrypted data into the storage medium corresponding to the interface of the target platform in response to the write instruction.
[0106] Further, referring to Figure 5 , Figure 5 is a schematic structural diagram of another implementation solution of the timed data migration method provided by the embodiment of the present application. After step S206, steps S501 - S502 are further included:
[0107] S501. Receive the migration result fed back by the target platform, obtain the target formatted text completed in the migration in the migration result, and extract the task time expression in the target formatted text.
[0108] Among them, the migration result includes migration success and migration failure. It can be understood that if the migration result is migration success, the target key and target value corresponding to the time expression in the timed task with successful migration are obtained, aiming to delete the key - value pair corresponding to the timed task with migration failure from the key - value pair dictionary.
[0109] S502. Delete other key - value pairs in the key - value pair dictionary except the target key - value pair corresponding to the task time expression to obtain an updated key - value pair dictionary.
[0110] Specifically, the timing data migration device acquires source files to be migrated to the target platform, where the source files include programming data and configuration data corresponding to the programming data; determines the timing task code in the source files based on the code annotations of the programming data; for each timing task code, generates a formatted text according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code; extracts key-value pairs from the configuration data to generate a key-value pair dictionary; updates the task time expression in the formatted text according to the key-value pair dictionary, and updates the data call interface of the timing execution method in the formatted text according to the interface of the target platform; writes the updated formatted text into the target platform, then receives the migration result feedback by the target platform, acquires the target formatted text with successful migration in the migration result, extracts the task time expression in the target formatted text, and deletes other key-value pairs in the key-value pair dictionary except the target key-value pairs corresponding to the task time expression, to obtain an updated key-value pair dictionary.
[0111] Further, referring to Figure 6 , Figure 6 FIG. 6 is a schematic structural diagram of another implementation solution of the timing data migration method provided by the embodiment of the present application. After step S206, steps S601-S602 are further included:
[0112] S601. Acquire the current network speed traffic. If the network speed traffic is greater than the preset traffic threshold, upload the source file to the cloud and delete the source file in the local database.
[0113] Among them, the current network traffic, that is, the current network traffic corresponding to the timing data migration device. It can be understood that the network traffic can be determined by a network traffic manager.
[0114] Among them, the preset network traffic threshold is used to monitor whether there is a margin in the current network traffic, and to meet the condition of uploading the source file to the cloud and releasing local space.
[0115] Specifically, after the timing data migration device writes the updated formatted text into the target platform, it acquires the current network speed traffic according to the traffic manager, and compares the size relationship between the current network speed traffic and the preset traffic threshold. If the current network traffic is greater than the preset traffic threshold, upload the source file to the cloud and delete the programming data in the source file locally.
[0116] S602. Associatively store the cloud storage address of the source file and the configuration data in the local database.
[0117] Specifically, after deleting the programming data in the source file, obtain the storage address of the source file in the cloud, and store the storage address and the configuration data in the source file in the local database in an associated manner.
[0118] Further, in some other implementation manners of the present application, the timing data migration method further includes:
[0119] (1) Obtain a source file to be migrated to a target platform, where the source file includes programming data and configuration data corresponding to the programming data.
[0120] (2) Based on the code annotations of the programming data, determine the timing task code in the source file.
[0121] (3) Intercept the image information of the timing task code, splice it to form a timing task code diagram, and feedback the timing task code diagram to the user side.
[0122] (4) If a confirmation message in response to the timing task code diagram is received from the user side, extract the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code, and generate a formatted text corresponding to each timing task code.
[0123] (5) For each of the timing task codes, generate a formatted text according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code.
[0124] (6) Extract the key-value pairs in the configuration data to generate a key-value pair dictionary;
[0125] (7) Update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timing execution method in the formatted text according to the interface of the target platform;
[0126] (8) Write the updated formatted text into the target platform.
[0127] Specifically, after the timing data migration device determines the timing task code in the source file, it intercepts the image information of the code corresponding to the timing task, that is, intercepts the image including the code corresponding to the timing task through a screen capture tool, splices the intercepted images to obtain a spliced image, and feeds back the formed timing task code image to the user side. Based on the confirmation information corresponding to the prime timing task code image fed back by the user side, if the confirmation information in response to the timing task code image is received from the user side, it executes the steps of extracting the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code, and generating a formatted text corresponding to each timing task code.
[0128] Further, based on the confirmation information corresponding to the prime timing task code image fed back by the user side, if the confirmation information in response to the timing task code image is not received from the user side, it feeds back a failure message for identifying the timing task code; and closes the migration thread of the source file.
[0129] In this application, a timing data migration method is provided. By obtaining the source file to be migrated to the target platform, the source file includes programming data and the configuration data corresponding to the programming data; based on the code annotations of the programming data, determining the timing task code in the source file; for each timing task code, generating a formatted text according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code; extracting the key-value pairs in the configuration data to generate a key-value pair dictionary; updating the task time expression in the formatted text according to the key-value pair dictionary, and updating the data call interface of the timing execution method in the formatted text according to the interface of the target platform; then writing the updated formatted text into the target platform. By automatically analyzing the programming data and configuration file in the source file to be migrated, and updating the code corresponding to the timing task in the coding data through the configuration file and the interface of the target platform to be migrated, it ensures the accuracy of the timing data and the effectiveness of the timing task after migration, and writes the formatted text corresponding to the updated timing task into the target platform, realizing the migration of timing task data, greatly improving the efficiency of timing task migration, and at the same time avoiding errors in manual migration processing.
[0130] To better implement the timing data migration method in the embodiments of this application, on the basis of the timing data migration method, an embodiment of this application also provides a timing data migration device, as Figure 7 shown. The timing data migration device includes modules 701-706:
[0131] Acquisition module 701: used to acquire source files to be migrated to the target platform, where the source files include programming data and configuration data corresponding to the programming data;
[0132] Determination module 702: used to determine the timing task code in the source file based on the code annotations of the programming data;
[0133] Text generation module 703: used to generate formatted text for each timing task code according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code;
[0134] Key-value pair processing module 704: used to extract key-value pairs from the configuration data to generate a key-value pair dictionary;
[0135] Update module 705: used to update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timing execution method in the formatted text according to the interface of the target platform;
[0136] Migration module 706: used to write the updated formatted text into the target platform.
[0137] In some embodiments of the present application, the migration module 706: used to write the updated formatted text into the target platform, specifically including:
[0138] Encrypt the updated formatted text according to the preset migration file encryption rule;
[0139] Send the encrypted formatted text to the target platform, so that the target platform feedbacks a decryption information collection window based on the encrypted formatted text, and collects decryption data based on the decryption information collection window;
[0140] Receive the decryption data feedback by the target platform;
[0141] If the decryption data is the same as the updated formatted text, write the formatted text into the target platform.
[0142] In some embodiments of the present application, the key-value pair processing module 704: used to extract key-value pairs from the configuration data to generate a key-value pair dictionary, specifically including:
[0143] Divide the configuration data into different configuration sub-data according to the type of the timing task in the configuration data;
[0144] For each type of configuration sub-data, extract the target key-value pairs corresponding to the task time expression in the configuration sub-data;
[0145] Combine the target key-value pairs corresponding to each piece of the configuration sub-data to generate a key-value pair dictionary.
[0146] In some embodiments of the present application, the migration module 706: is used to write the updated formatted text into the target platform, and then includes the following:
[0147] Receive the migration result feedback by the target platform, obtain the target formatted text for which the migration is completed in the migration result, and extract the task time expression in the target formatted text;
[0148] Delete other key-value pairs in the key-value pair dictionary except for the target key-value pairs corresponding to the task time expression, to obtain an updated key-value pair dictionary.
[0149] In some embodiments of the present application, the migration module 706: is used to write the updated formatted text into the target platform, and then includes the following:
[0150] Obtain the current network speed traffic. If the network speed traffic is greater than a preset traffic threshold, upload the source file to the cloud and delete the source file in the local database;
[0151] Associate and store the cloud storage address of the source file with the configuration data in the local database.
[0152] In one implementation scheme of the present application, the determination module 702: after determining the scheduled task code in the source file based on the code annotation of the programming data, further includes the following:
[0153] Intercept the image information of the scheduled task code, splice it to form a scheduled task code diagram, and feedback the scheduled task code diagram to the user side;
[0154] If the confirmation information in response to the scheduled task code diagram is received from the user side, then execute the steps of extracting the class name in the scheduled task code, the task time expression in the scheduled task code, and the scheduled execution method in the scheduled task code, and generating the formatted text corresponding to each scheduled task code.
[0155] In one implementation scheme of the present application, the determination module 702: after intercepting the image information of the scheduled task code, splicing it to form a scheduled task code diagram, and feedbacking the scheduled task code diagram to the user side, further includes the following:
[0156] If the confirmation information in response to the scheduled task code diagram is not received from the user side, then feedback the information indicating that the recognition of the scheduled task code fails;
[0157] Close the migration thread of the source file.
[0158] In this application, a timing data migration device is provided. By obtaining source files to be migrated to a target platform, the source files include programming data and configuration data corresponding to the programming data; based on the code annotations of the programming data, the timing task code in the source files is determined; for each timing task code, according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code, a formatted text is generated; key-value pairs in the configuration data are extracted to generate a key-value pair dictionary; the task time expression in the formatted text is updated according to the key-value pair dictionary, and the data call interface of the timing execution method in the formatted text is updated according to the interface of the target platform; then the updated formatted text is written into the target platform. By automatically analyzing the programming data and configuration files in the source files to be migrated, and updating the encoding corresponding to the timing tasks in the encoding data through the configuration file and the interface of the target platform to be migrated, the accuracy of the timing data and the effectiveness of the timing tasks after migration are ensured, and the formatted text corresponding to the updated timing tasks is written into the target platform, realizing the migration of timing task data, greatly improving the efficiency of timing task migration, and at the same time avoiding errors in manual migration processing.
[0159] An embodiment of the present invention further provides a timing data migration device, as Figure 8 shown Figure 8 is a schematic structural diagram of an embodiment of the timing data migration device provided in an embodiment of this application.
[0160] The timing data migration device integrates any one of the image stitching devices provided in the embodiments of the present invention. The timing data migration device includes:
[0161] One or more processors;
[0162] A memory; and
[0163] One or more applications, where one or more applications are stored in the memory and configured to be executed by the processor to perform the steps in the image stitching method in any one of the embodiments of the above image stitching method embodiment.
[0164] Specifically: The timing data migration device may include a processor 801 with one or more processing cores, a memory 802 of one or more computer-readable storage media, a power supply 803, an input unit 804 and other components. Those skilled in the art can understand that Figure 8 the structural diagram of the timing data migration device shown in
[0165] The processor 801 is the control center of the timing data migration device, connecting various parts of the entire timing data migration device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802, and calling the data stored in the memory 802, it performs various functions of the timing data migration device and processes data, thereby monitoring the entire timing data migration device. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 801 either.
[0166] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store data created according to the use of the timing data migration device. In addition, the memory 802 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 802 can also include a memory controller to provide the processor 801 with access to the memory 802.
[0167] The timing data migration device further includes a power supply 803 that powers each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 803 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0168] The timing data migration device may further include an input unit 804, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0169] Although not shown, the timing data migration device may further include a display unit or the like, which will not be elaborated here. Specifically, in this embodiment, the processor 801 in the timing data migration device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802 to implement various functions as follows:
[0170] Obtain the source file to be migrated to the target platform, where the source file includes programming data and the configuration data corresponding to the programming data;
[0171] Based on the code annotations of the programming data, determine the timing task code in the source file;
[0172] For each of the timing task codes, generate a formatted text according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code;
[0173] Extract the key-value pairs in the configuration data to generate a key-value pair dictionary;
[0174] Update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timing execution method in the formatted text according to the interface of the target platform;
[0175] Write the updated formatted text into the target platform.
[0176] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0177] For this reason, an embodiment of the present invention provides a computer-readable storage medium, which may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk or an optical disc, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the image stitching methods provided by the embodiments of the present invention. For example, when the computer program is loaded by a processor, the following steps can be executed:
[0178] Obtain the source file to be migrated to the target platform, where the source file includes programming data and the configuration data corresponding to the programming data;
[0179] Based on the code annotations of the programming data, determine the timing task code in the source file;
[0180] For each of the described scheduled task codes, generate formatted text based on the class name in the scheduled task code, the task time expression in the scheduled task code, and the scheduled execution method in the scheduled task code;
[0181] Extract the key-value pairs from the configuration data to generate a key-value pair dictionary;
[0182] Update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the scheduled execution method in the formatted text according to the interface of the target platform;
[0183] Write the updated formatted text into the target platform.
[0184] In the above embodiments, the descriptions of the various embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the detailed descriptions of other embodiments above, and will not be elaborated here.
[0185] In specific implementation, the above units or structures can be implemented as independent entities, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of the above units or structures, reference may be made to the method embodiments above, and will not be elaborated here.
[0186] For the specific implementation of the above operations, reference may be made to the previous embodiments, and will not be elaborated here.
[0187] The above has introduced in detail a scheduled data migration method, device, equipment and storage medium provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A timed data migration method, characterized in that, Including: Obtain source files to be migrated to the target platform, where the source files include programming data and configuration data corresponding to the programming data; Based on the code annotations of the programming data, determine the timed task code in the source file; For each of the timed task codes, generate a formatted text according to the class name in the timed task code, the task time expression in the timed task code, and the timed execution method in the timed task code; Extract key-value pairs from the configuration data to generate a key-value pair dictionary; Update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timed execution method in the formatted text according to the interface of the target platform; Write the updated formatted text into the target platform; The extracting key-value pairs from the configuration data to generate a key-value pair dictionary includes: Divide the configuration data into different configuration sub-data according to the type of the timed task in the configuration data; For each type of the configuration sub-data, extract the target key-value pairs corresponding to the task time expression in the configuration sub-data; Combine the target key-value pairs corresponding to each configuration sub-data to generate a key-value pair dictionary; After determining the timed task code in the source file based on the code annotations of the programming data, it further includes: Intercept the image information of the timed task code, splice it to form a timed task code diagram, and feedback the timed task code diagram to the user side; If receiving the confirmation information of the user side responding to the timed task code diagram, then execute the steps of extracting the class name in the timed task code, the task time expression in the timed task code, and the timed execution method in the timed task code to generate a formatted text corresponding to each timed task code.
2. The timed data migration method according to claim 1, characterized in that, The writing the updated formatted text into the target platform includes: Encrypt the updated formatted text according to the preset migration file encryption rule; Send the encrypted formatted text to the target platform, so that the target platform feedbacks a decryption information collection window based on the encrypted formatted text, and collects decryption data based on the decryption information collection window; Receive the decryption data feedback by the target platform; If the decryption data is the same as the updated formatted text, then write the formatted text into the target platform.
3. The timed data migration method according to claim 1, characterized in that, After writing the updated formatted text into the target platform, it includes: Receive the migration result feedback by the target platform, obtain the target formatted text with migration completed in the migration result, and extract the task time expression in the target formatted text; Delete other key-value pairs in the key-value pair dictionary except the target key-value pairs corresponding to the task time expression to obtain an updated key-value pair dictionary.
4. The timed data migration method according to claim 1, characterized in that, After writing the updated formatted text into the target platform, it includes: Obtain the current network speed traffic. If the network speed traffic is greater than the preset traffic threshold, then upload the source file to the cloud and delete the source file in the local database. Associate the cloud storage address of the source file with the configuration data and store them in the local database.
5. The timed data migration method according to claim 1, characterized in that, After intercepting the image information of the timing task code, stitching it into a timing task code graph, and feeding back the timing task code graph to the client, the following steps are further included: If the confirmation information for the timing task code graph is not received from the client, feedback information indicating that the recognition of the timing task code fails. Close the migration thread of the source file.
6. A timed data migration device, characterized in that, The timing data migration device includes: An acquisition module: used to acquire the source file to be migrated to the target platform, where the source file includes programming data and the configuration data corresponding to the programming data. A determination module: used to determine the timing task code in the source file based on the code annotations of the programming data. A text generation module: for each timing task code, generate formatted text according to the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code. A key-value pair processing module: used to extract the key-value pairs in the configuration data and generate a key-value pair dictionary. An update module: used to update the task time expression in the formatted text according to the key-value pair dictionary, and update the data call interface of the timing execution method in the formatted text according to the interface of the target platform. A migration module: used to write the updated formatted text into the target platform. The extraction of the key-value pairs in the configuration data to generate a key-value pair dictionary includes: Dividing the configuration data into different configuration sub-data according to the type of the timing task in the configuration data. For each type of configuration sub-data, extract the target key-value pairs corresponding to the task time expression in the configuration sub-data. Combine the target key-value pairs corresponding to each configuration sub-data to generate a key-value pair dictionary. After determining the timing task code in the source file based on the code annotations of the programming data, the following steps are further included: Intercept the image information of the timing task code, stitch it into a timing task code graph, and feed back the timing task code graph to the client. If the confirmation information for the timing task code graph is received from the client, execute the steps of extracting the class name in the timing task code, the task time expression in the timing task code, and the timing execution method in the timing task code, and generate formatted text corresponding to each timing task code.
7. A timed data migration device, characterized in that, The timing data migration device includes: One or more processors; A memory; and One or more applications, where the one or more applications are stored in the memory and configured to be executed by the processor to implement the timing data migration method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is loaded by the processor to execute the steps in the timing data migration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Code migration method, equipment and storage medium
CN111008037A
Code migration method and device, computer equipment and storage medium
CN112181489A