Pre-emptive means replication method and apparatus
By utilizing a pre-defined universal interface to acquire methods during the replication of contingency plans, the problem of large coding workload in existing technologies is solved, achieving efficient and accurate replication of contingency plans.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QI-ANXIN LEGENDSEC INFORMATION TECH (BEIJING) INC
- Filing Date
- 2022-08-26
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the replication of contingency plans requires compiling code and adjusting integration interfaces separately for each method, resulting in a large workload and redundant code issues.
By responding to the means copy instruction to determine the means type, using a preset general interface to obtain the means implementation method, and performing the means copy operation based on the method, the code adjustment of setting up a dedicated copy interface and integration interface for each means is avoided.
This reduces the amount of compilation work involved in the method replication process, avoids redundant code, and improves the efficiency and accuracy of method replication.
Smart Images

Figure CN115408081B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for copying a pre-planned scheme. Background Technology
[0002] With the development of information technology, the automation of contingency planning has also improved. A contingency plan can be understood as a series of independent steps that are arranged and linked together to form a complete process. Each independent step is a means; when a contingency plan needs to be replicated, the means within that plan also need to be replicated.
[0003] Currently, in the process of replicating contingency plan measures, since each measure is an independent execution step, the algorithms, operational behaviors, execution targets, and parameters required during its execution are all different. Therefore, in the conventional measure replication process, different replication interfaces are generally needed to determine the corresponding measure implementation method from the measure implementation method dataset to complete the measure replication operation. However, in practical applications, to facilitate the acquisition of measure implementation methods, different replication interfaces are usually integrated. After the user issues the instruction to replicate the measure, the integrated interface is used to determine which specific interface to select from the integrated replication interfaces to determine the measure implementation method. This means that each time a measure implementation method is obtained during the measure replication process, a new corresponding replication interface needs to be compiled separately for the measure to be replicated, and the code of the integrated interface also needs to be adjusted to integrate the new replication interface. Consequently, each time a measure is replicated, software engineers need to compile a large amount of code, resulting in a large workload for code replication. Summary of the Invention
[0004] This application provides a method and apparatus for copying a proposed means, the main purpose of which is to reduce the workload of compiling code during the copying process.
[0005] To address the aforementioned technical problems, this application provides the following technical solutions:
[0006] Firstly, this application provides a method for reproducing a preliminary plan, the method comprising:
[0007] The means type is determined in response to the means copying instruction, wherein each of the contingency plans includes a plurality of the means;
[0008] Based on the means type, a means implementation method corresponding to the means type is determined in the means implementation set. The means implementation set contains at least one means implementation method, and each means implementation method corresponds to one means type. The means implementation method is the configuration information required to implement the means.
[0009] The means implementation method is obtained through a preset general interface, and a means copying operation is performed based on the means implementation method; the preset general interface is an interface adapted to the means implementation methods corresponding to different means types.
[0010] Optionally, the method of implementing the means includes configuration information for implementing a means instance, wherein the means instance is implemented based on a preset means template and the corresponding configuration information;
[0011] The method for determining the means implementation corresponding to the means type in the means implementation set based on the means type includes:
[0012] Based on the method type, determine the preset method template and configuration information corresponding to the method type;
[0013] The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes:
[0014] The preset method template and configuration information are obtained through the preset general interface;
[0015] The configuration information is added to the preset means template to obtain the target means, and the means copying operation is performed based on the target means.
[0016] Optionally, after adding the configuration information to the preset means template to obtain the target means, the method further includes:
[0017] When a means modification instruction is detected, the target means is modified according to the means modification instruction.
[0018] Optionally, modifying the target means according to the means modification instruction includes:
[0019] The modified configuration information is determined by modifying the instructions according to the aforementioned methods;
[0020] The modified target means is generated based on the preset means template corresponding to the target means and the modified configuration information.
[0021] Optionally, before determining the means type in response to the means copying instruction, the method further includes:
[0022] The multiple preset means templates are grouped according to the means type to obtain multiple means groups, wherein each means group corresponds to a means type, and each means group contains at least one preset means template;
[0023] Based on the configuration information corresponding to each of the means types, the configuration information is added to the means group of the corresponding means type to obtain the means implementation method;
[0024] The means implementation set is implemented according to multiple means.
[0025] Optionally, the means type includes at least one means subtype;
[0026] After grouping the multiple preset means templates according to the means type to obtain multiple means groups, the method further includes:
[0027] When each of the means groups contains multiple preset means templates, the multiple preset means templates are divided according to the means subtype of each means instance to obtain multiple means items, wherein each means item contains one preset means template and each means item corresponds to one means subtype;
[0028] The method of adding the configuration information to the corresponding means group of each means type to obtain the means implementation method includes:
[0029] Based on the configuration information corresponding to each of the means subtypes, the configuration information is added to the means item of the corresponding means subtype in the means group to obtain the means implementation method.
[0030] Optionally, before obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method, the method further includes:
[0031] Determine the encapsulation method for each of the aforementioned means, and determine the interface type that conforms to the corresponding encapsulation method;
[0032] According to the interface type, a preset general interface is set, wherein the preset general interface supports the interface type;
[0033] The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes:
[0034] The aforementioned means implementation method is encapsulated according to the aforementioned encapsulation method to obtain a means implementation method data package;
[0035] The means implementation method data package is obtained based on the preset general interface, and the means copying operation is performed based on the means implementation method data package.
[0036] Secondly, this application also provides a means of copying a plan, comprising:
[0037] The first determining unit is configured to determine the type of means in response to a copying instruction of the means, wherein each of the plans includes a plurality of the means;
[0038] The second determining unit is configured to determine, based on the means type, a means implementation method corresponding to the means type in a means implementation set, wherein the means implementation set contains at least one means implementation method, and each means implementation method corresponds to one means type; the means implementation method is configuration information required to implement the means.
[0039] An execution unit is configured to obtain the means implementation method through a preset general interface and perform a means copying operation based on the means implementation method; the preset general interface is an interface adapted to the means implementation methods corresponding to different means types.
[0040] Optionally, the method of implementing the means includes configuration information for implementing a means instance, wherein the means instance is implemented based on a preset means template and the corresponding configuration information;
[0041] The second determining unit is specifically used to determine the preset means template and the configuration information corresponding to the means type, respectively, based on the means type.
[0042] The execution unit includes:
[0043] The acquisition module is used to acquire the preset method template and the configuration information through the preset general interface;
[0044] An add module is used to add the configuration information to the preset means template to obtain the target means, and to perform the means copy operation based on the target means.
[0045] Optionally, the execution unit includes:
[0046] The modification module is used to modify the target means according to the means modification instruction when a means modification instruction is detected.
[0047] Optionally, the modification module includes:
[0048] A determination submodule is used to determine the configuration information to be modified based on the modification instructions provided by the aforementioned means;
[0049] A generation submodule is used to generate a modified target means based on the preset means template corresponding to the target means and the modified configuration information.
[0050] Optionally, the device further includes:
[0051] A grouping unit is used to group multiple preset means templates according to the means type to obtain multiple means groups, wherein each means group corresponds to a means type, and each means group contains at least one preset means template;
[0052] An adding unit is used to add the configuration information to the corresponding means group of the means type according to the configuration information corresponding to each means type, so as to obtain the means implementation method;
[0053] An implementation unit is used to implement the means implementation set according to multiple means implementation methods.
[0054] Optionally, the means type includes at least one means subtype; the apparatus further includes:
[0055] A partitioning unit is used to partition the multiple preset means templates according to the means subtype of each means instance when each means group contains multiple preset means templates, to obtain multiple means items, wherein each means item contains one preset means template and each means item corresponds to one means subtype;
[0056] The adding unit is further specifically used to add the configuration information to the means item of the corresponding means subtype in the means group according to the configuration information corresponding to each means subtype, so as to obtain the means implementation method.
[0057] Optionally, the device further includes:
[0058] The third determining unit is used to determine the encapsulation method of each of the means implementation methods, and to determine the interface type that conforms to the corresponding encapsulation method;
[0059] The setting unit is used to set the preset general interface according to the interface type, wherein the preset general interface supports the interface type;
[0060] The execution unit is specifically used to encapsulate the means implementation method according to the encapsulation method to obtain a means implementation method data package, obtain the means implementation method data package based on the preset general interface, and perform the means copying operation based on the means implementation method data package.
[0061] Thirdly, embodiments of this application provide a storage medium including a stored program, wherein, when the program is executed, the means of copying the plan of the terminal device described in the first aspect are controlled to be executed on the device where the storage medium is located.
[0062] Fourthly, embodiments of this application provide a scheme copying apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the scheme copying method of the terminal device described in the first aspect.
[0063] By employing the above-described technical solution, the technical solution provided in this application has at least the following advantages:
[0064] This application provides a method, apparatus, and system for copying a proposed means. This application can first determine the means type in response to a means copying instruction; then, based on the means type, determine the means implementation method corresponding to the means type in a means implementation set; finally, obtain the means implementation method through a preset general interface, and perform a means copying operation based on the means implementation method, thereby realizing the means copying function. Compared with existing technologies, in this application, each of the proposed solutions includes multiple means; the means implementation set includes at least one means implementation method, each means implementation method corresponds to a means type, and the means implementation method is the configuration information required to implement the means. The preset general interface is an interface adapted to means implementation methods corresponding to different means types. Thus, by directly determining the means implementation method in the means implementation set through the interface type, instead of using an integration interface to determine which means implementation method corresponds to the means to be copied, it is no longer necessary to set up a dedicated copy interface for each means during the means copying process. This eliminates the need for software engineers to compile the code of the copy interface and avoids the adjustment process of the integration interface code during compatibility and integration, thereby reducing the workload of compiling code during means copying. Furthermore, in this application, since the means implementation method is obtained using a preset general interface, the conventional method of recompiling the corresponding copy interface is avoided when copying the same means, reducing redundant code.
[0065] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0066] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein:
[0067] Figure 1 A flowchart illustrating a method for replicating a proposed scheme according to an embodiment of this application is shown;
[0068] Figure 1-a A schematic diagram illustrating the execution of a prior art method for copying data is shown.
[0069] Figure 1-b This illustration shows a schematic diagram of the execution of a method for copying a scheme provided in an embodiment of this application;
[0070] Figure 2 A flowchart illustrating another method for copying a prototype provided in this application is shown.
[0071] Figure 3 This illustration shows a block diagram of a means of copying a scheme provided in an embodiment of this application;
[0072] Figure 4 This illustration shows a block diagram of a means of copying an apparatus according to another embodiment of the present application. Detailed Implementation
[0073] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0074] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0075] This application provides a method for replicating a plan, specifically as follows: Figure 1 As shown, the method includes:
[0076] 101. Determine the means type in response to the means copy instruction.
[0077] Each of the aforementioned plans includes multiple of the aforementioned measures.
[0078] A contingency plan can be understood as a scheme with multiple steps, where each step is the means described in this embodiment. In other words, a contingency plan contains multiple means, which are "connected" to each other in the order of the nodes to form the contingency plan. Based on this, in the process of copying or generating a contingency plan, it is necessary to copy the means. The accuracy of the means copying will directly affect the overall accuracy of the contingency plan.
[0079] In this embodiment, the means can actually be classified based on different types, such as the order of execution nodes. For example, they can be divided into initiation types, intermediate execution types, and result feedback types. Of course, in practical applications, they can also be classified based on their specific functions. Here, there is no limitation on the method and type of means classification; they can be selected based on actual needs.
[0080] Furthermore, since the copying process is based on user needs, meaning the user will issue an instruction to copy a particular method, i.e., a copy instruction, in this embodiment, the method type can be determined based on the copy instruction. In other words, the method to be copied is determined according to the content contained in the user's instruction, and the method type is determined accordingly.
[0081] 102. Based on the means type, determine the means implementation method corresponding to the means type in the means implementation set.
[0082] The set of means implementations includes at least one means implementation method, and each means implementation method corresponds to one means type. The means implementation method is the configuration information required to implement the means.
[0083] In this embodiment, since different types of methods differ in the replication process, after determining the method type, it is necessary to determine the appropriate implementation method for that method. This determination can be made from a set of method implementations, which can be understood as a collection containing implementation methods for each type of method. Specifically, this set of method implementations can be a method library. Users can pre-store implementation methods for different method types in this library. Furthermore, in this embodiment, the method implementation method can be understood as the data required to implement the method. Since a method itself is a step, its execution necessarily requires setting information such as the action behavior, executor, and target. Therefore, the method implementation method is data containing this information.
[0084] Since different means require different implementation methods, the aforementioned data will also differ. Therefore, this embodiment requires selecting suitable implementation methods based on the means type. Of course, in practical applications, the implementation methods include, but are not limited to, the methods described above, and can also be selected based on the user's actual needs; no limitation is made here.
[0085] 103. Obtain the implementation method through the preset general interface, and perform the copy operation based on the implementation method.
[0086] Once the implementation method for the corresponding means type is determined, since this means type is the means to be copied by the corresponding copy instruction, the implementation method can implement the copying function of the means copy instruction. At this point, the implementation method can be obtained through the interface, and after obtaining the implementation method, the means copying operation can be performed based on the implementation method.
[0087] Furthermore, as a specific description of the foregoing embodiments, reference may also be made to... Figure 1-a and Figure 1-b To proceed. Among them, such as... Figure 1-a As shown, in the existing means replication process, the means implementation module contains multiple different means implementation methods, or means implementation replication methods, such as "means implementation replication method A, means implementation replication method B, etc." Since these existing means implementation methods exist as instances, meaning each method is a specific "step," the execution goals and functions differ based on the operation methods of different "steps." Therefore, during the means replication process, when retrieving the means implementation method from the means replication module, different calling interfaces need to be set for each method. Furthermore, to ensure compatibility during the means replication process, the calling interfaces corresponding to these different means implementation methods need to be integrated—this is the process of means implementation deep replication interface integration, forming an integrated interface. Therefore, software engineers need to consider the compatibility of different means implementation methods when compiling the code for this integrated interface.
[0088] And reference Figure 1-bAs can be seen, in this embodiment, each means implementation method is stored in the means implementation set. However, this means implementation differs from existing technologies; it is not a "step" existing as an instance, but rather "raw material" data constituting the means. Therefore, during the acquisition of each means implementation method, the interface does not need to consider the compatibility of each "step," but can acquire it through a preset general interface in the form of "raw material" data. Furthermore, this preset general interface differs from previous integration interfaces; it is an interface specifically for raw material data, capable of transmitting any means implementation method. Then, after acquiring the means implementation method, the means copying module can directly implement and copy the means based on this means implementation method in the form of "raw material" data.
[0089] This application provides a method for copying a proposed means. In this embodiment, the means type is first determined in response to a means copying instruction; then, according to the means type, a means implementation method corresponding to that means type is determined from a means implementation set; finally, the means implementation method is obtained through a preset general interface, and a means copying operation is performed based on the means implementation method, thereby realizing the means copying function. Compared with the prior art, in this application, each proposed means includes multiple means; the means implementation set contains at least one means implementation method, and each means implementation method corresponds to a means type. Thus, by directly determining the means implementation method from the means implementation set through the interface type, instead of using an integrated interface to determine which means implementation method corresponds to the means to be copied, it is no longer necessary to set a dedicated copying interface for each means during the means copying process. This eliminates the need for software engineers to compile the code of the copying interface, avoiding the adjustment process of the integrated interface code during compatibility and integration, thereby reducing the workload of compiling code during means copying. Meanwhile, in this application, since the acquisition method is implemented using a pre-defined general interface, the process of copying the method avoids the need to recompile the corresponding copy interface in the conventional way when copying the same method, thus reducing the occurrence of redundant code.
[0090] To provide a more detailed explanation, this application provides another proposed method for replication, as detailed below. Figure 2 As shown, the method includes:
[0091] 201. Group multiple preset method templates according to method type to obtain multiple method groups.
[0092] Each of the means groups corresponds to a means type, and each means group contains at least one preset means template.
[0093] In this embodiment, a contingency plan can be understood as a pre-configured process plan with nodes to be executed, awaiting command and dispatch. Taking an emergency response plan as an example, since this plan requires the participation of various departments to coordinate and handle emergencies, the overall process of the plan needs to include a scheme that allows for sequential execution of steps based on the order of each node—that is, the contingency plan itself. During the generation of this plan, a "command issuance" method can be added to the overall process. This requires obtaining the corresponding preset method template and adding the corresponding configuration information, which includes, but is not limited to, the personnel notified of the command and the content to be issued. The preset method template can be understood as a template for implementing the method, while the configuration information can be understood as the specific content added to the template. The preset method template and configuration information constitute the method implementation method that ensures the method can be implemented. Finally, after setting up the "instruction issuance" method and completing the remaining methods in the entire contingency plan, when encountering an emergency, the configured workflow plan, which is the contingency plan for the emergency, can be directly invoked to automatically execute the various methods in the plan. When the "instruction issuance" method is executed, it will automatically execute the operation of "sending pre-edited content to the personnel who need to be informed" according to the function of the method instance, based on the configuration information when the method was previously implemented.
[0094] Therefore, before performing the copying operation of a method, it is necessary to first classify the preset method templates according to the method described in this embodiment. This ensures that the correct preset method template can be accurately selected according to the method category during the copying process. Of course, in this embodiment, the specific method and number of categories for grouping multiple preset method templates according to the method type are not limited and can be determined according to the user's actual needs. For example, each potentially executable method can be assigned a different type, so that the method instance can be accurately found directly based on the method type during the subsequent copying process.
[0095] 202a. Based on the configuration information corresponding to each means type, add the configuration information to the means group of the corresponding means type to obtain the means implementation method.
[0096] Since different means correspond to different methods, their configuration information also differs. For example, means A is to issue an alarm to a target person, while means B is to record the occurrence of a current emergency. Therefore, the configuration information for these two means will definitely differ based on their means type. Thus, in this embodiment, it is necessary to add each piece of configuration information to a corresponding means group according to its means type. This way, each means group contains the function of the means to be executed (i.e., the preset means template) and the target or related content during execution (i.e., the configuration information).
[0097] It should be noted that step 203 can be executed directly after step 202a is completed. However, in some application scenarios, the means type also includes at least one means subtype; that is, the means type contains further refinement. To avoid interference between the refined subtypes and affect the accuracy of the means replication results, in this case, after grouping based on means type, a further division process based on means subtype can be included. Therefore, after step 201, it can also be performed in the following manner:
[0098] 202b. When each method group contains multiple preset method templates, the multiple preset method templates are divided according to the method subtype of each preset method template to obtain multiple method items.
[0099] Each of the means items includes a preset means template, and each means item corresponds to a means subtype.
[0100] This allows preset method templates to be saved in a hierarchical manner, with method items under method groups. This makes it easier for users to find each preset method template when they need to adjust it, and also allows users to understand the relationship between these preset method templates more intuitively.
[0101] 202c. Based on the configuration information corresponding to each method subtype, add the configuration information to the method project of the corresponding method subtype in the method group to obtain the method implementation method.
[0102] Since each preset method template is divided into method items after the method grouping, in order to ensure that the configuration information is not confused between different method items in the method group, it is necessary to determine which method item the configuration information should be added to based on the method type and method subtype according to the method in this step. In this way, each method item contains the method instance and the corresponding configuration information, which can realize the generation and copying of the method. Therefore, the method item as a whole can be determined as the method implementation method.
[0103] 203. The means to achieve the method to achieve the set of means.
[0104] Once the means of implementation are determined, since each means of implementation can generate or copy a means, these means of implementation can be generated into a set to facilitate subsequent operations. In this way, the means can be selected according to the set during the subsequent copying process.
[0105] 204. Determine the means type in response to the means copy instruction.
[0106] Each of the aforementioned plans includes multiple of the aforementioned measures.
[0107] As described in step 201 above, the means are the steps that constitute the plan, and the means type is the basis for determining what kind of means it is. Therefore, to achieve the replication of the means, it is necessary to first determine the means type based on the replication instruction given by the user. The description of the means, the replication instruction of the means, and the means type in this embodiment is consistent with the description in the previous embodiment, and will not be repeated here.
[0108] 205. Based on the means type, determine the means implementation method corresponding to the means type in the means implementation set.
[0109] The means implementation set includes at least one means implementation method, and each means implementation method corresponds to a means type.
[0110] In some application scenarios, as can be seen from the description of the foregoing steps, the means implementation method may include multiple means instances, and the means instances may include preset means templates and configuration information corresponding to the preset means templates. That is to say, in this embodiment, the means implementation method may save the means instances composed of preset means templates and configuration information, or may directly implement the means implementation method with each means template and configuration information. The specific form can be selected based on the user's needs and is not limited here.
[0111] Based on this, this step can be performed as follows: determine the preset means template and configuration information corresponding to the means type according to the means type.
[0112] Since the means instance and configuration information are determined during the implementation of the means implementation set and according to the means type, the corresponding preset means template and configuration information can be directly determined according to the means type in this step. This ensures the accuracy of the determined preset means template and configuration information. Of course, in practical applications, the method for determining the means type in this step needs to be consistent with the means type selected when implementing the means implementation set in the previous steps. For example, if the means type is confirmed by the function of each means when implementing the means implementation set, then when determining the means implementation method based on the means type according to the method in this step, the means type also needs to be determined according to the function. Similarly, if the means type is confirmed by the execution time of each means when implementing the means implementation set, then when determining the means implementation method based on the means type according to the method in this step, the means type also needs to be determined according to the execution time.
[0113] 206. Obtain the implementation method through the preset general interface, and perform the copy operation based on the implementation method.
[0114] Based on the foregoing steps, in some embodiments, the method of implementation is directly composed of a preset method template and configuration information. Therefore, in the execution of this step, it can be specifically as follows:
[0115] The preset method template and configuration information are obtained through the preset general interface;
[0116] The configuration information is added to the preset means template to obtain the target means, and the means copying operation is performed based on the target means.
[0117] Since the configuration information has different data forms and categories based on the functions of different methods, the conventional copy interface obtains the specific steps, i.e., methods, after combining configuration information and preset method templates. Therefore, in order to be compatible with methods that contain configuration information of different types of data, the copy interface needs to have a certain degree of compatibility. At the same time, the database that stores these multiple methods, i.e. the method library, also needs to have a certain degree of compatibility.
[0118] However, in this embodiment, since the means implementation method is only data composed of a preset means template and configuration information, that is, the means implementation method is not a means instance formed by combination, but data before the means are formed, these two types of data can be encapsulated and saved. In this way, there is no need to deal with different compatibility issues when using the preset general interface to obtain it, and at the same time, the means implementation set of the saved means implementation method does not need to have great compatibility.
[0119] Furthermore, in this embodiment, after determining the means implementation method, since the means implementation scheme is composed of information such as the configuration information of the means, it means that the means can be copied based on the means implementation method. Specifically, the execution process can be understood as copying the target means formed by combining the configuration information in the means implementation method with the preset means template. That is, copying one existing means into another, with the same target, function, and method of execution. Alternatively, during the means copying process, the target means can be considered as a means instance. Based on this, some content in the configuration information can be adjusted as needed, and then combined with the adjusted configuration information and the preset means template. The resulting means, compared to the target means, is a means with the same function and behavior, but with differences in specific execution details. For example, the executed target may be different, or the magnitude or duration of a certain behavior may differ. In other words, the copied means can be completely identical to the previous target means, or it can be a means with similar functions but with some differences in details. Here, the specific execution method of the means copying operation is not specifically limited; it can be executed based on any of the above methods.
[0120] In some application scenarios, after copying the means, it may be necessary to adjust the parameters of the means, that is, change the configuration information. Therefore, after adding the configuration information to the preset means template in the aforementioned steps to obtain the target means, the method may further include:
[0121] When a means modification instruction is detected, the target means is modified according to the means modification instruction. Specifically, the modification method can be as follows:
[0122] First, the configuration information to be modified is determined by modifying the instructions according to the aforementioned methods;
[0123] Then, a modified target means is generated based on the preset means template corresponding to the target means and the modified configuration information.
[0124] Since the modification process is actually a regeneration based on the modified configuration information and the preset method template of the target method, it is equivalent to directly obtaining the preset method template corresponding to the target method after determining the target method, and then using the modified configuration information contained in the modification instruction to replace the configuration information corresponding to the original method instance. This avoids the problem of the contingency plan failing that may be caused by directly modifying the method. Furthermore, since the preset method template is determined based on the target method, the preset method template must be a "template" that conforms to the target method. Adding the modified configuration information on this basis can avoid the error caused by selecting the wrong preset method template, thus ensuring the accuracy of the method modification.
[0125] Furthermore, during the execution of the scheme described in the foregoing embodiments, since different means of implementation methods correspond to different means types, the configuration information corresponding to different means of implementation methods in actual applications is also different, and the types of data contained therein may differ. In order to reduce the compatibility requirements of the preset general interface when obtaining the means of implementation methods, the means of implementation methods can also be encapsulated in a certain way. Since the encapsulated data has a unified encapsulation format, the preset general interface does not need to consider the compatibility issues of different configuration information data types during compilation.
[0126] In view of this, before step 206 of the above embodiment obtains the means implementation method through a preset general interface and performs the means copying operation based on the means implementation method, the method may further include:
[0127] First, determine the encapsulation method for each of the aforementioned means, and determine the interface type that conforms to the corresponding encapsulation method;
[0128] Then, according to the interface type, the preset general interface is set, wherein the preset general interface supports the interface type;
[0129] Therefore, step 206 above obtains the means implementation method through a preset general interface and performs a means copying operation based on the means implementation method. During execution, this can be:
[0130] The aforementioned means implementation method is encapsulated according to the aforementioned encapsulation method to obtain a means implementation method data package;
[0131] The means implementation method data package is obtained based on the preset general interface, and the means copying operation is performed based on the means implementation method data package.
[0132] Since the preset general interface in this embodiment is implemented according to the interface type, and the interface type is the encapsulation method when the corresponding means implementation method is encapsulated, the preset general interface can be compiled without considering the data type when facing different data types of different configuration information. It only needs to ensure that the preset general interface conforms to the interface type corresponding to the encapsulation method. Unlike the conventional method, it does not require the integration of different types of interfaces during the copying process, and it can also achieve the function of data format compatibility.
[0133] Furthermore, as a response to the above Figure 1 and Figure 2 In addition to the implementation of the method shown, another embodiment of this application also provides a means copying device for the proposed solution. This means copying device embodiment corresponds to the foregoing method embodiment. For ease of reading, this means copying device embodiment will not repeat the details of the foregoing method embodiment, but it should be understood that the device in this embodiment can correspondingly implement all the contents of the foregoing method embodiment. Specifically, as follows... Figure 3 As shown, the means of replicating this contingency plan includes:
[0134] The first determining unit 31 can be used to determine the type of means in response to a copying instruction of the means, wherein each of the plans includes a plurality of the means;
[0135] The second determining unit 32 can be used to determine, according to the means type, a means implementation method corresponding to the means type in the means implementation set, wherein the means implementation set contains at least one means implementation method and each means implementation method corresponds to one means type;
[0136] The execution unit 33 can be used to obtain the means implementation method through a preset general interface, and perform means copying operation based on the means implementation method.
[0137] Furthermore, such as Figure 4 As shown, the method for implementing the means includes configuration information for implementing a means instance, and the means instance is implemented based on a preset means template and the corresponding configuration information;
[0138] The second determining unit 32 can be specifically used to determine the preset means template and the configuration information corresponding to the means type, respectively, according to the means type.
[0139] The execution unit 33 includes:
[0140] The acquisition module 331 can be used to acquire the preset method template and the configuration information through the preset general interface;
[0141] The addition module 332 can be used to add the configuration information to the preset means template to obtain the target means, and perform the means copying operation based on the target means.
[0142] Furthermore, such as Figure 4 As shown, the execution unit 33 includes:
[0143] The modification module 333 can be used to modify the target means according to the means modification instruction when a means modification instruction is detected.
[0144] Furthermore, such as Figure 4 As shown, the modification module 333 includes:
[0145] The determination submodule 3331 can be used to determine the configuration information to be modified according to the modification instruction of the means described;
[0146] The generation submodule 3332 can be used to generate a modified target means based on the preset means template corresponding to the target means and the modified configuration information.
[0147] Furthermore, such as Figure 4 As shown, the device further includes:
[0148] Grouping unit 34 can be used to group multiple preset means templates according to the means type to obtain multiple means groups, wherein each means group corresponds to a means type, and each means group contains at least one preset means template;
[0149] The adding unit 35 can be used to add the configuration information to the corresponding means group of the means type according to the configuration information corresponding to each means type, so as to obtain the means implementation method;
[0150] The implementation unit 36 can be used to implement the means implementation set according to multiple means implementation methods.
[0151] Furthermore, such as Figure 4 As shown, the means type includes at least one means subtype; the apparatus further includes:
[0152] The partitioning unit 37 can be used to partition the multiple preset means templates according to the means subtype of each means instance when each means group contains multiple preset means templates, to obtain multiple means items, wherein each means item contains one preset means template and each means item corresponds to one means subtype;
[0153] The adding unit 35 can also be specifically used to add the configuration information to the means project of the corresponding means subtype in the means group according to the configuration information corresponding to each means subtype, so as to obtain the means implementation method.
[0154] Furthermore, such as Figure 4 As shown, the device further includes:
[0155] The third determining unit 38 can be used to determine the encapsulation method of each of the means implementation methods and to determine the interface type that conforms to the corresponding encapsulation method;
[0156] Setting unit 39 can be used to set the preset general interface according to the interface type, wherein the preset general interface supports the interface type;
[0157] The execution unit 33 can be specifically used to encapsulate the means implementation method according to the encapsulation method to obtain the means implementation method data packet, obtain the means implementation method data packet based on the preset general interface, and perform the means copying operation based on the means implementation method data packet.
[0158] This application provides a method, apparatus, and system for copying a proposed means. This application first determines the means type in response to a means copying instruction; then, based on the means type, it determines a means implementation method corresponding to that means type from a means implementation set; finally, it obtains the means implementation method through a preset general interface and performs a means copying operation based on the means implementation method, thereby realizing the means copying function. Compared with the prior art, in this application, each proposed means includes multiple means; the means implementation set contains at least one means implementation method, and each means implementation method corresponds to a means type. Thus, by directly determining the means implementation method from the means implementation set through the interface type, instead of using an integrated interface to determine which means implementation method corresponds to the means to be copied, it is no longer necessary to set up a dedicated copying interface for each means during the means copying process. This eliminates the need for software engineers to compile the code of the copying interface, avoiding the adjustment process of the integrated interface code during compatibility and integration, thereby reducing the workload of compiling code during means copying. Meanwhile, in this application, since the acquisition method is implemented using a pre-defined general interface, the process of copying the method avoids the need to recompile the corresponding copy interface in the conventional way when copying the same method, thus reducing the occurrence of redundant code.
[0159] This application provides a storage medium that includes a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the aforementioned pre-planned copying method.
[0160] Storage media may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0161] This application embodiment also provides a scheme for means copying apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the scheme for means copying method described above.
[0162] This application provides an apparatus including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining a means type in response to a means copy instruction, wherein each of the proposed solutions includes multiple means; determining a means implementation method corresponding to the means type in a means implementation set according to the means type, wherein the means implementation set includes at least one means implementation method, and each means implementation method corresponds to one means type; obtaining the means implementation method through a preset general interface, and performing a means copy operation based on the means implementation method.
[0163] Furthermore, the method for implementing the means includes configuration information for implementing a means instance, wherein the means instance is implemented based on a preset means template and the corresponding configuration information;
[0164] The method for determining the means implementation corresponding to the means type in the means implementation set based on the means type includes:
[0165] Based on the method type, determine the preset method template and configuration information corresponding to the method type;
[0166] The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes:
[0167] The preset method template and configuration information are obtained through the preset general interface;
[0168] The configuration information is added to the preset means template to obtain the target means, and the means copying operation is performed based on the target means.
[0169] Furthermore, after adding the configuration information to the preset means template to obtain the target means, the method further includes:
[0170] When a means modification instruction is detected, the target means is modified according to the means modification instruction.
[0171] Furthermore, the modification of the target means according to the means modification instruction includes:
[0172] The modified configuration information is determined by modifying the instructions according to the aforementioned methods;
[0173] The modified target means is generated based on the preset means template corresponding to the target means and the modified configuration information.
[0174] Furthermore, before determining the means type in response to the means copying instruction, the method further includes:
[0175] The multiple preset means templates are grouped according to the means type to obtain multiple means groups, wherein each means group corresponds to a means type, and each means group contains at least one preset means template;
[0176] Based on the configuration information corresponding to each of the means types, the configuration information is added to the means group of the corresponding means type to obtain the means implementation method;
[0177] The means implementation set is implemented according to multiple means.
[0178] Furthermore, the means type includes at least one means subtype;
[0179] After grouping the multiple preset means templates according to the means type to obtain multiple means groups, the method further includes:
[0180] When each of the means groups contains multiple preset means templates, the multiple preset means templates are divided according to the means subtype of each means instance to obtain multiple means items, wherein each means item contains one preset means template and each means item corresponds to one means subtype;
[0181] The method of adding the configuration information to the corresponding means group of each means type to obtain the means implementation method includes:
[0182] Based on the configuration information corresponding to each of the means subtypes, the configuration information is added to the means item of the corresponding means subtype in the means group to obtain the means implementation method.
[0183] Furthermore, before obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method, the method further includes:
[0184] Determine the encapsulation method for each of the aforementioned means, and determine the interface type that conforms to the corresponding encapsulation method;
[0185] According to the interface type, a preset general interface is set, wherein the preset general interface supports the interface type;
[0186] The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes:
[0187] The aforementioned means implementation method is encapsulated according to the aforementioned encapsulation method to obtain a means implementation method data package;
[0188] The means implementation method data package is obtained based on the preset general interface, and the means copying operation is performed based on the means implementation method data package.
[0189] This application also provides a computer program product, which, when executed on a data processing device, is adapted to execute program code with the following initialization method steps: determining a means type in response to a means copy instruction, wherein each of the proposed schemes includes multiple means; determining a means implementation method corresponding to the means type in a means implementation set according to the means type, wherein the means implementation set contains at least one means implementation method, and each means implementation method corresponds to one means type; obtaining the means implementation method through a preset general interface, and performing a means copy operation based on the means implementation method.
[0190] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0192] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0193] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0194] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0195] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0196] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0197] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0198] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0199] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for replicating a pre-planned strategy, characterized in that, include: The means type is determined in response to the means replication instruction, wherein each of the plans includes multiple means; the plan is a complete process scheme formed by arranging and linking multiple independent steps together, and each independent step is a means; Based on the means type, a means implementation method corresponding to the means type is determined in the means implementation set. The means implementation set contains at least one means implementation method, and each means implementation method corresponds to one means type. The means implementation method is the configuration information required to implement the means. The method of implementing the means is obtained through a preset general interface, and a means copying operation is performed based on the method of implementing the means; the preset general interface is an interface that adapts to the method of implementing the means for different means types.
2. The method according to claim 1, characterized in that, The method for implementing the means includes configuration information for implementing a means instance, wherein the means instance is implemented based on a preset means template and the corresponding configuration information; The method for determining the means implementation corresponding to the means type in the means implementation set based on the means type includes: Based on the method type, determine the preset method template and configuration information corresponding to the method type; The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes: The preset method template and configuration information are obtained through the preset general interface; The configuration information is added to the preset means template to obtain the target means, and the means copying operation is performed based on the target means.
3. The method according to claim 2, characterized in that, After adding the configuration information to the preset means template to obtain the target means, the method further includes: When a means modification instruction is detected, the target means is modified according to the means modification instruction.
4. The method according to claim 3, characterized in that, The modification of the target means according to the means modification instruction includes: The modified configuration information is determined by modifying the instructions according to the aforementioned methods; The modified target means is generated based on the preset means template corresponding to the target means and the modified configuration information.
5. The method according to claim 4, characterized in that, Before determining the means type in response to the means's copying instruction, the method further includes: The multiple preset means templates are grouped according to the means type to obtain multiple means groups, wherein each means group corresponds to a means type, and each means group contains at least one preset means template; Based on the configuration information corresponding to each means type, the configuration information is added to the means group of the corresponding means type to obtain the means implementation method; The means implementation set is implemented according to multiple means.
6. The method according to claim 5, characterized in that, The means type includes at least one means subtype; After grouping the multiple preset means templates according to the means type to obtain multiple means groups, the method further includes: When each of the means groups contains multiple preset means templates, the multiple preset means templates are divided according to the means subtype of each means instance to obtain multiple means items, wherein each means item contains one preset means template and each means item corresponds to one means subtype; The method of adding the configuration information to the corresponding means group of each means type to obtain the means implementation method includes: Based on the configuration information corresponding to each of the means subtypes, the configuration information is added to the means item of the corresponding means subtype in the means group to obtain the means implementation method.
7. The method according to any one of claims 1-5, characterized in that, Before obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method, the method further includes: Determine the encapsulation method for each of the aforementioned means, and determine the interface type that conforms to the corresponding encapsulation method; According to the interface type, a preset general interface is set, wherein the preset general interface supports the interface type; The step of obtaining the means implementation method through a preset general interface and performing a means copying operation based on the means implementation method includes: The aforementioned means implementation method is encapsulated according to the aforementioned encapsulation method to obtain a means implementation method data package; The means implementation method data package is obtained based on the preset general interface, and the means copying operation is performed based on the means implementation method data package.
8. A device for replicating a pre-planned method, characterized in that, include: The first determining unit is used to determine the type of means in response to the means copying instruction, wherein each of the plans includes multiple means; the plan is a complete process scheme formed by arranging multiple independent steps together, and each independent step is a means; The second determining unit is configured to determine, based on the means type, a means implementation method corresponding to the means type in a means implementation set, wherein the means implementation set contains at least one means implementation method, and each means implementation method corresponds to one means type; the means implementation method is configuration information required to implement the means. An execution unit is configured to obtain the means implementation method through a preset general interface and perform a means copying operation based on the means implementation method; the preset general interface is an interface adapted to the means implementation methods corresponding to different means types.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the device containing the storage medium is controlled to perform the means of copying the scheme according to any one of claims 1 to 7.
10. A device for replicating a pre-planned method, characterized in that, The apparatus includes a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the means copying method of any one of claims 1 to 7.