Script processing method and device, equipment, storage medium and program product
By analyzing the disaster recovery processing text and using semantic processing models to generate disaster recovery processing scripts, the problem of time-consuming and labor-consuming manual writing of scripts in the existing technology is solved, and efficient and standardized disaster recovery processing is achieved, ensuring business continuity.
Patent Information
- Application Number
- CN202411324566.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-13
AI Technical Summary
The existing technology disaster recovery switching method requires manual writing of disaster recovery processing scripts, resulting in high technical requirements, high human resources consumption, and difficulty in achieving standardization.
By obtaining the disaster recovery processing text, analyzing the task description statement, and using the semantic processing model to output the disaster recovery processing script code, stitching and generating the disaster recovery processing script for execution.
It improves the efficiency and standardization of disaster recovery and processing scripts, reduces the consumption of development human resources, and ensures business continuity.
Smart Images

Figure CN119127147A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of artificial intelligence technology and financial technology, and specifically to a script processing method, device, equipment, medium and program product. Background Art
[0002] In the event of an abnormality in the production data center, the disaster recovery data center can take over the business handled by the production data center to reduce the losses caused by the abnormality. For example, the abnormality may refer to a system failure in the production data center, or a disaster in the production data center.
[0003] In this regard, disaster recovery automation can ensure the safe and orderly switching process between the production data center and the disaster recovery data center, effectively improve the efficiency of disaster recovery switching, reduce business RTO (Recovery Time Object), and reduce human error during the disaster recovery switching process. For the realization of disaster recovery automation, disaster recovery processing scripts are an important cornerstone.
[0004] In the process of realizing the concept of the disclosed invention, the inventors found that the disaster recovery switching method in the related technology is to manually write disaster recovery processing scripts, which has high technical requirements for personnel, consumes a lot of human resources, has a long script program development cycle, and is difficult to achieve standardization of disaster recovery processing technology. Summary of the invention
[0005] In view of the above problems, the present disclosure provides a script processing method, apparatus, device, medium and program product.
[0006] According to a first aspect of the present disclosure, a script processing method is provided, comprising: obtaining a disaster recovery processing text corresponding to a disaster recovery processing task, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks; parsing the disaster recovery processing text to generate multiple task description statements corresponding to the multiple subtasks, wherein the task description statements are statements that describe the disaster recovery processing operations and script attributes based on semantics; inputting the multiple task description statements into a semantic processing model, and outputting multiple disaster recovery processing script codes corresponding to the multiple task description statements; and splicing the multiple disaster recovery processing script codes to generate a disaster recovery processing script for executing the disaster recovery processing task.
[0007] According to an embodiment of the present disclosure, a disaster recovery processing text is parsed to generate multiple task description statements corresponding to multiple subtasks, including: for each subtask, a disaster recovery processing operation field and a detection operation field are identified from the disaster recovery processing operation information corresponding to the identifier of the subtask, wherein the disaster recovery processing operation field is a field that describes the disaster recovery processing operation corresponding to the subtask, and the detection operation field is a field that describes the detection operation corresponding to the subtask, and the detection operation is used to detect the execution status of the disaster recovery processing operation corresponding to the subtask; based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask and the script attribute information corresponding to the subtask, a task description statement corresponding to the subtask is generated.
[0008] According to an embodiment of the present disclosure, the disaster recovery processing operation field includes different types of service process control fields; the detection operation field includes status detection operation fields corresponding to different types of service process control fields, and each status detection operation field is used to determine the field value generated when a service process in a different status is detected.
[0009] According to an embodiment of the present disclosure, the script attribute information includes code type information, and the code type information is used to characterize the language type of the disaster recovery processing script code corresponding to the subtask; based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask and the script attribute information corresponding to the subtask, a task description statement corresponding to the subtask is generated, including: based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask and the code type information corresponding to the subtask, a task description statement corresponding to the code type information is generated; multiple task description statements are input into a semantic processing model, and multiple disaster recovery processing script codes corresponding to the multiple task description statements are output, including: a task description statement corresponding to the code type information is input into the semantic processing model, and a disaster recovery processing script code corresponding to the code type information is output.
[0010] According to an embodiment of the present disclosure, the above-mentioned script processing method also includes: determining a target system corresponding to the code type information from multiple types of operating systems; deploying the disaster recovery processing script to the target system so that the target system runs the disaster recovery processing script when receiving the disaster recovery processing instruction.
[0011] According to an embodiment of the present disclosure, a task description statement corresponding to the code type information is input into a semantic processing model, and a disaster recovery processing script code corresponding to the code type information is output, including: generating a task description statement message by adding the task description statement to the message body; sending the task description statement message to the semantic processing model by calling a data transmission interface; and receiving the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model.
[0012] According to an embodiment of the present disclosure, the disaster recovery processing text also includes an operation phase identifier corresponding to the subtask, and the disaster recovery processing code corresponding to the subtask is marked with an operation phase identifier; multiple disaster recovery processing script codes are spliced to generate a disaster recovery processing script for executing the disaster recovery processing task, including: sorting the multiple disaster recovery processing script codes according to the operation phase identifiers marked by the multiple disaster recovery processing script codes to obtain sorted disaster recovery processing script codes; generating a disaster recovery processing script based on the sorted disaster recovery processing script code.
[0013] A second aspect of the present disclosure provides a script processing device, including: an acquisition module, used to acquire a disaster recovery processing text corresponding to a disaster recovery processing task, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks; a parsing module, used to parse the disaster recovery processing text, and generate multiple task description statements corresponding to the multiple subtasks, wherein the task description statement is a statement that describes the disaster recovery processing operation and script attributes based on semantics; an input module, used to input the multiple task description statements into a semantic processing model, and output multiple disaster recovery processing script codes corresponding to the multiple task description statements; a splicing module, used to splice the multiple disaster recovery processing script codes, and generate a disaster recovery processing script for executing the disaster recovery processing task.
[0014] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0016] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0017] According to the embodiments of the present disclosure, by parsing the disaster recovery processing text, a task description statement that describes the disaster recovery processing operation and script attributes based on semantics is obtained, and then combined with the semantic processing capability of the semantic processing model, an accurate disaster recovery processing script code can be generated, thereby obtaining an accurate disaster recovery processing script, improving the efficiency of obtaining the disaster recovery processing script, and reducing the human resources consumed in developing the disaster recovery processing script. As a result, the implementation efficiency of the disaster recovery processing process can be effectively improved, the standardization of the disaster recovery processing process can be improved, the knowledge accumulation of the disaster recovery processing script can be facilitated, and business continuity can be ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0019] Figure 1 The application scenario diagram of the script processing method according to an embodiment of the present disclosure is schematically shown.
[0020] Figure 2 The flowchart of the script processing method according to the embodiment of the present disclosure is schematically shown.
[0021] Figure 3 The diagram schematically shows a system deployment according to an embodiment of the present disclosure.
[0022] Figure 4 The flowchart of the system deployment method according to the embodiment of the present disclosure is schematically shown.
[0023] Figure 5 The structural block diagram of the script processing device according to the embodiment of the present disclosure is schematically shown.
[0024] Figure 6 A block diagram of an electronic device suitable for implementing a script processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0026] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0027] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0028] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0029] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0030] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0032] The embodiment of the present disclosure provides a script processing method, including: obtaining a disaster recovery processing text corresponding to a disaster recovery processing task, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks. Parsing the disaster recovery processing text to generate multiple task description statements corresponding to the multiple subtasks, wherein the task description statement is a statement that describes the disaster recovery processing operation and script attributes based on semantics. Inputting the multiple task description statements into a semantic processing model, outputting multiple disaster recovery processing script codes corresponding to the multiple task description statements. Splicing the multiple disaster recovery processing script codes to generate a disaster recovery processing script for executing the disaster recovery processing task.
[0033] Figure 1 The application scenario diagram of the script processing method according to an embodiment of the present disclosure is schematically shown.
[0034] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, and a network 104. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0035] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0036] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0037] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0038] It should be noted that the script processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the script processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The script processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the script processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0040] The following will be based on Figure 1 The scene described by Figure 2~Figure 4 The script processing method of the disclosed embodiment is described in detail.
[0041] Figure 2 The flowchart of the script processing method according to the embodiment of the present disclosure is schematically shown.
[0042] like Figure 2 As shown, the script processing method of this embodiment includes operations S210 to S240.
[0043] In operation S210, a disaster recovery processing text corresponding to the disaster recovery processing task is obtained, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks.
[0044] In operation S220, the disaster recovery processing text is parsed to generate a plurality of task description statements corresponding to the plurality of subtasks, wherein the task description statements are statements that describe the disaster recovery processing operations and script attributes based on semantics.
[0045] In operation S230, a plurality of task description statements are input into a semantic processing model, and a plurality of disaster recovery processing script codes corresponding to the plurality of task description statements are output.
[0046] In operation S240, multiple disaster recovery processing script codes are spliced to generate a disaster recovery processing script for executing the disaster recovery processing task.
[0047] According to an embodiment of the present disclosure, the disaster recovery processing text may be a text including task information of the disaster recovery processing task. Among them, the disaster recovery processing task may be a disaster recovery switching task. The disaster recovery switching task may be a task of switching the system processing business of the disaster recovery data center when an abnormal condition exists in the production data center used to process the business, thereby ensuring business continuity. In the embodiment of the present disclosure, the above-mentioned abnormal condition includes but is not limited to a failure of the production data center or a disaster encountered by the production data center, etc.
[0048] The disaster recovery processing text may be implemented in the form of, but not limited to, electronic spreadsheets or electronic documents, etc. The task information in the disaster recovery processing text may be structured description information. The structured description information may include, but is not limited to, operation phase information of the disaster recovery processing operation, identification of each subtask corresponding to the disaster recovery processing task, type information of the subtask, disaster recovery processing operation information and script attribute information, etc. For example, the operation phase information may include an operation phase identification, etc. The operation phase corresponding to the operation phase information includes, but is not limited to, pre-switching preparation, production switching to disaster recovery, business verification, disaster recovery switching back to production and trial operation, etc. The subtasks corresponding to the disaster recovery processing task include, but are not limited to, stopping application services, stopping middleware, starting application services and starting middleware, etc. The disaster recovery processing operation information may be information used to describe the disaster recovery processing operation corresponding to the subtask. The type information of the subtask includes, but is not limited to, types such as application system, infrastructure and business verification.
[0049] The structured description information corresponding to each subtask can be used to generate the script code corresponding to each subtask, that is, the above-mentioned disaster recovery processing script code. Based on this, the above-mentioned structured description information can also include script attribute information. The script attribute information can be used to determine the attribute information corresponding to the script code. The script attribute information can include the code identifier corresponding to each subtask and the code type information corresponding to each subtask, etc. For example, the code identifier can include but is not limited to app_start.sh, app_stop.sh, crontab_start.sh and crontab_stop.sh, etc. The code type information is used to characterize the language type of the script code corresponding to the subtask. The code type can include but is not limited to the sh type and the bat script type, etc.
[0050] According to an embodiment of the present disclosure, when a disaster recovery processing text input by an object or a disaster recovery processing text from a terminal device is received, the structured description information in the disaster recovery processing text can be parsed. Specifically, the information corresponding to each subtask can be determined from the disaster recovery processing text based on the identifier of each subtask. For example, in the structured description information, the identifier of each subtask can be used as a starting point, and the information corresponding to each subtask can be identified according to the direction and position corresponding to the predetermined identification strategy, wherein there is an association relationship between the position and the information dimension. The information dimension may include, but is not limited to, the subtask type information dimension, the disaster recovery processing operation information dimension, and the script attribute information dimension, etc. Exemplarily, in the case where the structured description information is carried by an electronic spreadsheet and the identifier of the subtask is recorded in the leftmost column of the electronic spreadsheet, the row corresponding to the identifier of the subtask can be identified with the identifier of the subtask as the starting point, and the fields in each grid can be identified in turn to the right, and the information dimension corresponding to each identified field can be determined in turn according to the information dimension corresponding to the above-mentioned position. That is, based on the nth information dimension associated with the position corresponding to the predetermined identification strategy, the information dimension corresponding to the nth group of fields located in the predetermined direction of the identification of the subtask is determined, the predetermined direction is the above-mentioned direction corresponding to the predetermined identification strategy, the nth group of fields is the fields recorded in the nth grid arranged along the predetermined direction, and n is a positive integer.
[0051] However, the present disclosure is not limited to this. In the present disclosure, since the operations corresponding to each task are different from each other, the operation field used to characterize the disaster recovery processing operation can be identified in the structured description information, and the subtask corresponding to the operation field can be queried based on the operation field, and the type information and script attribute information corresponding to the subtask can be determined from the structured description information according to the direction and position corresponding to the predetermined identification strategy associated with the subtask. That is, based on the mth information dimension associated with the position corresponding to the predetermined identification strategy, the information dimension corresponding to the mth group of fields located in the predetermined direction of the operation field is determined, and the predetermined direction is the direction corresponding to the predetermined identification strategy mentioned above, and the mth group of fields is the field recorded in the mth grid arranged along the predetermined direction, and m is a positive integer. Among them, querying the subtask corresponding to the operation field based on the operation field can include: determining multiple disaster recovery processing operations corresponding to multiple operation fields recorded in a single grid, and querying the subtask corresponding to the operation field from the database based on the arrangement order of the multiple disaster recovery processing operations.
[0052] On this basis, the information corresponding to each subtask is parsed to generate a task description statement that describes the information corresponding to the subtask based on semantics. In an embodiment of the present disclosure, the parsing operation may be performed by a semantic processing model. The semantic processing model may be, but is not limited to, constructed based on an AIGC (Artificial Intelligence Generated Content) large language model. However, the embodiment of the present disclosure is not limited thereto. In another embodiment of the present disclosure, when a field corresponding to an information dimension is identified, a predetermined mapping relationship, a predetermined sentence splicing rule, and a template colloquial word corresponding to the information dimension may be queried, wherein the field corresponding to the information dimension may be a code field; based on a predetermined mapping relationship, the colloquial word corresponding to the field corresponding to the information dimension is determined, wherein the predetermined mapping relationship represents the association relationship between the colloquial word and the code field; according to the predetermined sentence splicing rule, the template colloquial word and the above colloquial word are spliced to obtain a task description statement. Among them, the template colloquial word may include, but is not limited to, colloquial words such as modal particles and associative words used to enhance semantic expression. After obtaining the task description statement, the semantics expressed by the task description statement may be manually checked to ensure that the semantic expression of the task description statement is accurate.
[0053] For example, taking disaster recovery processing operation information, code identifier and code type information as an example, when the subtask is to stop the application service, the task description statement can be "the script code generated for stopping the application service needs to stop the application service when it is determined that the subtask of stopping the application service is executed. In addition, the file name of this script code is app_stop.sh, and the code type information of this script code is sh type." Among them, the file name corresponds to the above code identifier.
[0054] Based on this, the task description statement can be input into the semantic processing model, and by fully understanding the semantics of the task description statement through the semantic processing model, the script code corresponding to the subtask can be accurately generated. Among them, the semantic processing model can also be but not limited to being built based on the AIGC (Artificial Intelligence Generated Content) large language model. The semantic processing model used here to generate script code can be a model different from the semantic processing model used to generate the task description statement mentioned above.
[0055] Thus, by performing formatting operations such as splicing on the script code output by the semantic processing model, a complete disaster recovery processing script for executing the disaster recovery processing task can be obtained. In an embodiment of the present disclosure, the splicing order for the script code can be determined based on the predetermined order of each subtask, and then the script code is spliced according to the splicing order to obtain a disaster recovery processing script. By deploying the disaster recovery processing script on the system, the disaster recovery processing script can be run to perform disaster recovery processing when disaster recovery processing is required. Based on this, the present disclosure realizes the automatic generation of disaster recovery processing script code through AIGC based on deep learning and natural language processing, thereby realizing the automatic generation of disaster recovery processing scripts.
[0056] According to the embodiments of the present disclosure, by parsing the disaster recovery processing text, a task description statement that describes the disaster recovery processing operation and script attributes based on semantics is obtained, and then combined with the semantic processing capability of the semantic processing model, an accurate disaster recovery processing script code can be generated, thereby obtaining an accurate disaster recovery processing script, improving the efficiency of obtaining the disaster recovery processing script, and reducing the human resources consumed in developing the disaster recovery processing script. As a result, the implementation efficiency of the disaster recovery processing process can be effectively improved, the standardization of the disaster recovery processing process can be improved, the knowledge accumulation of the disaster recovery processing script can be facilitated, and business continuity can be ensured.
[0057] According to an embodiment of the present disclosure, a disaster recovery processing text is parsed to generate multiple task description statements corresponding to multiple subtasks, including: for each subtask, a disaster recovery processing operation field and a detection operation field are identified from the disaster recovery processing operation information corresponding to the identifier of the subtask, wherein the disaster recovery processing operation field is a field describing the disaster recovery processing operation corresponding to the subtask, and the detection operation field is a field describing the detection operation corresponding to the subtask, and the detection operation is used to detect the execution status of the disaster recovery processing operation corresponding to the subtask. Based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the script attribute information corresponding to the subtask, a task description statement corresponding to the subtask is generated.
[0058] According to an embodiment of the present disclosure, in the structured description information, the identifier of the subtask, the disaster recovery processing operation information corresponding to the subtask, and the script attribute information corresponding to the subtask can be located in the same row of a spreadsheet, and different columns of the spreadsheet are used to record information of different dimensions corresponding to the subtasks. On this basis, the structured description information can be scanned, and based on the fields in the first cell of each column in the spreadsheet, the information dimension corresponding to each column can be determined, and based on the fields in the first cell of each row in the spreadsheet, the subtask corresponding to the fields in each row can be determined, so that the disaster recovery processing operation field and the detection operation field located in the same row as the identifier of the subtask can be identified.
[0059] Specifically, the disaster recovery processing operation field may include fields such as "stop service process". The detection operation field may include fields such as "detect whether the service process is stopped successfully, return a first predetermined value if successful, and return a second predetermined value different from the first predetermined value if failed".
[0060] On this basis, the identified disaster recovery processing operation field, detection operation field and script attribute information can be input into the semantic processing model as prompt fields to guide the semantic processing model to output a task description statement. The task description statement can be a statement describing the disaster recovery processing operation, detection operation and script attribute based on semantics. Exemplarily, a first predetermined mapping relationship corresponding to the disaster recovery processing operation field, a second predetermined mapping relationship corresponding to the detection operation field, a third predetermined mapping relationship corresponding to the script attribute information, and predetermined sentence concatenation rules and template spoken words corresponding to the disaster recovery processing operation field, the detection operation field and the script attribute information can be queried, wherein the first predetermined mapping relationship represents the association relationship between the spoken words and the disaster recovery processing operation field, the second predetermined mapping relationship represents the association relationship between the spoken words and the detection operation field, and the third predetermined mapping relationship represents the association relationship between the spoken words and the script attribute information; based on the first predetermined mapping relationship, the spoken words corresponding to the disaster recovery processing operation field are determined; based on the second predetermined mapping relationship, the spoken words corresponding to the detection operation field are determined; based on the third predetermined mapping relationship, the spoken words corresponding to the script attribute information are determined; according to the above-mentioned predetermined sentence concatenation rules, the template spoken words, the spoken words corresponding to the disaster recovery processing operation field, the spoken words corresponding to the detection operation field and the spoken words corresponding to the script attribute information are concatenated to obtain a task description sentence.
[0061] According to an embodiment of the present disclosure, by extracting disaster recovery processing operation fields and detection operation fields from disaster recovery processing operation information and then combining the disaster recovery processing operation fields, detection operation fields and script attribute information, the accuracy of the semantics described by the task description statement is improved, thereby improving the accuracy of the obtained disaster recovery processing script code.
[0062] According to an embodiment of the present disclosure, the disaster recovery processing operation field includes different types of service process control fields. The detection operation field includes state detection operation fields corresponding to different types of service process control fields, and each state detection operation field is used to determine the field value generated when a service process in a different state is detected.
[0063] It can be understood that in the process of business, it is necessary to call multiple types of services to implement the business. Correspondingly, the disaster recovery processing operation field may include fields corresponding to different types of services, such as the above-mentioned different types of service process control fields, etc. In the embodiment of the present disclosure, different types of service process control fields include but are not limited to fields for stopping application service processes, fields for starting application service processes, fields for stopping Admin Server (management service) and fields for stopping Node Manager (node agent) services, etc. Correspondingly, the detection operation field includes but is not limited to a state detection operation field corresponding to the operation for stopping the application service process, a state detection operation field corresponding to the operation for starting the application service process, a state detection operation field corresponding to the operation for stopping the Admin Server and a state detection operation field corresponding to the operation for stopping the Node Manager service, etc.
[0064] For example, the field for stopping an application service process may be described as "stop application service process". The status detection operation field corresponding to the operation for stopping an application service process may be described as "detect whether the service process is stopped successfully, return status 0 if successful, otherwise return status 1". The field for starting an application service process may be described as "start application service process". The status detection operation field corresponding to the operation for starting an application service process may be described as "detect whether the service process is started successfully, return status 0 if successful, otherwise return status 1". The field for stopping an Admin Server service process may be described as "stop Admin Server service process". The status detection operation field corresponding to the operation for stopping an Admin Server service process may be described as "detect whether the Admin Server service process is stopped successfully, return status 0 if successful, otherwise return status 1". The field for stopping a Node Manager service process may be described as "stop Node Manager service process". The status detection operation field corresponding to the operation for stopping a Node Manager service process may be described as "detect whether the Node Manager service process is stopped successfully, return status 0 if successful, otherwise return status 1".
[0065] It should be noted that the above 0 corresponds to the above first predetermined value, and the above 1 corresponds to the above second predetermined value. It should be understood that the present disclosure does not limit the above first predetermined value and the second predetermined value to 0 and 1. In actual business, the first predetermined value and the second predetermined value can be set according to needs. Moreover, the first predetermined value and the second predetermined value corresponding to different disaster recovery processing operations can be the same or different.
[0066] According to the embodiments of the present disclosure, by using different service process control fields for different types of services, it is possible to efficiently generate disaster recovery processing scripts that can be used to control multiple services. In addition, by using different status detection operation fields for different types of services, it is possible to efficiently generate disaster recovery processing scripts that can be used to detect different service process control conditions. Based on this, even if there are many types of services in the production data center, the present disclosure can efficiently obtain accurate disaster recovery processing scripts, shorten the development cycle of disaster recovery processing scripts, and improve the development efficiency of disaster recovery processing scripts.
[0067] According to an embodiment of the present disclosure, based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the script attribute information corresponding to the subtask, a task description statement corresponding to the subtask is generated, including: based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the code type information corresponding to the subtask, a task description statement corresponding to the code type information is generated. Inputting multiple task description statements into a semantic processing model, and outputting multiple disaster recovery processing script codes corresponding to the multiple task description statements, including: inputting a task description statement corresponding to the code type information into a semantic processing model, and outputting a disaster recovery processing script code corresponding to the code type information.
[0068] According to an embodiment of the present disclosure, the disaster recovery processing operation field, the detection operation field and the code type information can be input into the semantic processing model, and the task description sentence corresponding to the code type information can be output. Exemplarily, the spoken words corresponding to the disaster recovery processing operation field can be determined based on the first predetermined mapping relationship; the spoken words corresponding to the detection operation field can be determined based on the second predetermined mapping relationship; the spoken words corresponding to the code type information can be determined based on the third predetermined mapping relationship; according to the above-mentioned predetermined sentence splicing rules, the template spoken words, the spoken words corresponding to the disaster recovery processing operation field, the spoken words corresponding to the detection operation field and the spoken words corresponding to the code type information are spliced to obtain the task description sentence.
[0069] Based on this, the task description statement corresponding to the code type information can be input into the semantic processing model, and the disaster recovery processing script code corresponding to the code type information can be output.
[0070] According to an embodiment of the present disclosure, a task description statement corresponding to the code type information is generated based on the disaster recovery processing operation field, the detection operation field and the code type information, and then the task description statement is input into the semantic processing model to output the disaster recovery processing script code. Based on this, the present disclosure can generate disaster recovery processing script codes of different language types based on the code type information corresponding to different language types, so that disaster recovery processing scripts suitable for different types of systems can be generated, which has high adaptability, shortens the development cycle of disaster recovery processing scripts of different language types, and improves the development efficiency of disaster recovery processing scripts of different language types.
[0071] According to an embodiment of the present disclosure, multiple task description statements are input into a semantic processing model, and multiple disaster recovery processing script codes corresponding to the multiple task description statements are output, including: generating a task description statement message by adding the task description statement to a message body. Sending the task description statement message to the semantic processing model by calling a data transmission interface. Receiving the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model.
[0072] According to an embodiment of the present disclosure, the data transmission interface may be, but is not limited to, an API (Application Programming Interface) and the like.
[0073] By adding the task description statement to the message body, a task description statement message is generated, and then by calling the API corresponding to the semantic processing model, the task description statement message is sent to the semantic processing model, and the disaster recovery processing script code returned by the semantic processing model is received, thereby realizing the call to the semantic processing model.
[0074] According to an embodiment of the present disclosure, a task description statement corresponding to code type information is input into a semantic processing model, and a disaster recovery processing script code corresponding to the code type information is output, including: generating a task description statement message by adding the task description statement to a message body. Sending the task description statement message to the semantic processing model by calling a data transmission interface. Receiving the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model.
[0075] According to an embodiment of the present disclosure, when a semantic processing model is called to process a task description statement corresponding to a plurality of code type information, a disaster recovery processing script code corresponding to the plurality of code type information can be received. When the language types corresponding to the plurality of code type information are the same, the disaster recovery processing script codes corresponding to the plurality of code type information can be divided into the same disaster recovery processing script code set, so as to facilitate splicing of the disaster recovery processing script codes in the disaster recovery processing script code set and generate a disaster recovery processing script corresponding to the disaster recovery processing script code set.
[0076] In the case where at least two of the multiple code type information correspond to different language types, at least two of the disaster recovery processing script codes corresponding to the multiple code type information also correspond to different language types. Based on this, the disaster recovery processing script codes corresponding to the multiple code type information can be divided according to the language type to obtain multiple disaster recovery processing script code sets. The language type corresponding to the disaster recovery processing script code in each disaster recovery processing script code set is the same, and different disaster recovery processing script code sets each correspond to a different language type. Therefore, the disaster recovery processing script code of each disaster recovery script code set in the multiple disaster recovery processing script code sets can be spliced to generate multiple disaster recovery processing scripts corresponding to the multiple disaster recovery processing script code sets.
[0077] According to the embodiment of the present disclosure, by adding each task description statement to the message body, a task description statement message is generated, and then by calling the data transmission interface, the task description statement message is sent to the semantic processing model, thereby receiving the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model. Based on this, efficient calling of the semantic processing model to generate the disaster recovery processing script code is achieved, the efficiency of obtaining the disaster recovery processing script is improved, the development cycle of the disaster recovery processing script is shortened, and the development efficiency of the disaster recovery processing script is improved.
[0078] According to an embodiment of the present disclosure, the disaster recovery processing text also includes an operation phase identifier corresponding to the subtask, and the disaster recovery processing code corresponding to the subtask is marked with the operation phase identifier. Multiple disaster recovery processing script codes are spliced to generate a disaster recovery processing script for executing the disaster recovery processing task, including: sorting the multiple disaster recovery processing script codes according to the operation phase identifiers marked by the multiple disaster recovery processing script codes to obtain the sorted disaster recovery processing script codes. Based on the sorted disaster recovery processing script codes, a disaster recovery processing script is generated.
[0079] According to the embodiments of the present disclosure, the operation phase identifier, disaster recovery processing operation information and script attribute information can be input into the semantic processing model, and the task description statement corresponding to the subtask can be output. The semantic processing model is then called to process the task description statement, and the disaster recovery processing script code marked with the operation phase identifier can be generated.
[0080] The operation phase identifier may be associated with a predetermined ranking of operations for executing the disaster recovery processing task. Multiple disaster recovery processing script codes may be sorted according to the ranking corresponding to the operation phase identifier to obtain sorted disaster recovery processing script codes. The sorted disaster recovery processing script codes are then sequentially spliced to generate a disaster recovery processing script that can execute operations according to each operation phase of the disaster recovery processing task.
[0081] According to the embodiment of the present disclosure, multiple disaster recovery processing script codes are sorted according to the operation stage identifiers marked by the multiple disaster recovery processing script codes to obtain sorted disaster recovery processing script codes, and then a disaster recovery processing script is generated based on the sorted disaster recovery processing script codes. Based on this, the integration efficiency of the disaster recovery processing script codes is improved, the efficiency of obtaining the disaster recovery processing script is improved, the development cycle of the disaster recovery processing script is shortened, and the development efficiency of the disaster recovery processing script is improved.
[0082] According to an embodiment of the present disclosure, the script processing method further includes: determining a target system corresponding to the code type information from a plurality of types of operating systems, and deploying the disaster recovery processing script to the target system so that the target system runs the disaster recovery processing script when receiving the disaster recovery processing instruction.
[0083] According to an embodiment of the present disclosure, multiple types of operating systems may include but are not limited to Linux systems and Windows systems, etc. Correspondingly, the above-mentioned disaster recovery switching scripts of different language types can be applicable to different types of operating systems. The target system corresponding to the code type information can be determined from multiple types of operating systems, and then the disaster recovery processing script corresponding to the code type information can be deployed to the target system. Based on this, when the target system receives the disaster recovery processing instruction, the disaster recovery processing script can be run to complete the disaster recovery processing task.
[0084] Figure 3 The diagram schematically shows a system deployment according to an embodiment of the present disclosure.
[0085] like Figure 3 As shown, the multiple types of operating systems 310 include an A operating system 301, a B operating system 302, a C operating system 303, and a D operating system 304. The types of the A operating system 301, the B operating system 302, the C operating system 303, and the D operating system 304 are different. On this basis, the A operating system 301 can be determined as the target operating system from the multiple types of operating systems 310 according to the code type information, and the disaster recovery script file 321 is deployed to the A operating system 301, thereby completing the deployment of the A operating system 301.
[0086] According to an embodiment of the present disclosure, a target system corresponding to a disaster recovery processing script is determined from multiple types of operating systems according to code type information, and then the disaster recovery processing script is deployed to the target system, thereby improving the deployment efficiency of the target system.
[0087] Figure 4 The flowchart of the system deployment method according to the embodiment of the present disclosure is schematically shown.
[0088] like Figure 4As shown, the system deployment method of this embodiment includes operations S410 to S480.
[0089] In operation S410, based on the operation phase identifier corresponding to the subtask, the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask and the code type information corresponding to the subtask, a task description statement corresponding to the code type information is generated.
[0090] In operation S420, a task description statement message is generated by adding the task description statement to the message body.
[0091] In operation S430, a task description statement message is sent to the semantic processing model by calling a data transmission interface.
[0092] In operation S440, a disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model is received.
[0093] In operation S450, the plurality of disaster recovery processing script codes are sorted according to the operation stage identifiers marked by the plurality of disaster recovery processing script codes to obtain sorted disaster recovery processing script codes.
[0094] In operation S460, a disaster recovery processing script is generated based on the sorted disaster recovery processing script codes.
[0095] In operation S470, a target system corresponding to the code type information is determined from among a plurality of types of operating systems.
[0096] In operation S480, the disaster recovery processing script is deployed to the target system, so that the target system runs the disaster recovery processing script when receiving the disaster recovery processing instruction.
[0097] Based on the above script processing method, the present disclosure also provides a script processing device. Figure 5 The device is described in detail.
[0098] Figure 5 The structural block diagram of the script processing device according to the embodiment of the present disclosure is schematically shown.
[0099] like Figure 5 As shown, the script processing device 500 of this embodiment includes an acquisition module 510 , a parsing module 520 , an input module 530 and a splicing module 540 .
[0100] The acquisition module 510 is used to acquire the disaster recovery processing text corresponding to the disaster recovery processing task, wherein the disaster recovery processing text includes the identifiers of multiple subtasks, the disaster recovery processing operation information corresponding to the subtasks, and the script attribute information corresponding to the subtasks. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be repeated here.
[0101] The parsing module 520 is used to parse the disaster recovery processing text and generate multiple task description statements corresponding to multiple subtasks, wherein the task description statement is a statement that describes the disaster recovery processing operation and script attributes based on semantics. In one embodiment, the parsing module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0102] The input module 530 is used to input multiple task description statements into the semantic processing model, and output multiple disaster recovery processing script codes corresponding to the multiple task description statements. In one embodiment, the input module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0103] The splicing module 540 is used to splice multiple disaster recovery processing script codes to generate a disaster recovery processing script for executing the disaster recovery processing task. In one embodiment, the splicing module 540 can be used to execute the operation S240 described above, which will not be repeated here.
[0104] According to an embodiment of the present disclosure, the parsing module 520 includes an identification submodule and a first generation submodule. The identification submodule is used to identify the disaster recovery processing operation field and the detection operation field from the disaster recovery processing operation information corresponding to the identifier of the subtask for each subtask, wherein the disaster recovery processing operation field is a field describing the disaster recovery processing operation corresponding to the subtask, and the detection operation field is a field describing the detection operation corresponding to the subtask, and the detection operation is used to detect the execution status of the disaster recovery processing operation corresponding to the subtask; the first generation submodule is used to generate a task description statement corresponding to the subtask based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the script attribute information corresponding to the subtask.
[0105] According to an embodiment of the present disclosure, the first generation submodule includes a generation unit. The input submodule includes an input unit. The generation unit is used to generate a task description statement corresponding to the code type information based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the code type information corresponding to the subtask; the input unit is used to input multiple task description statements into a semantic processing model, and output multiple disaster recovery processing script codes corresponding to the multiple task description statements, including: inputting the task description statement corresponding to the code type information into the semantic processing model, and outputting the disaster recovery processing script code corresponding to the code type information.
[0106] According to an embodiment of the present disclosure, the script processing device 500 further includes a determination submodule and a deployment submodule. The determination submodule is used to determine a target system corresponding to the code type information from multiple types of operating systems; the determination submodule is used to deploy the disaster recovery processing script to the target system, so that the target system runs the disaster recovery processing script when receiving the disaster recovery processing instruction.
[0107] According to an embodiment of the present disclosure, the input module 530 includes a second generation submodule, a sending submodule and a receiving submodule. The second generation submodule is used to generate a task description statement message by adding the task description statement to the message body; the sending submodule is used to send the task description statement message to the semantic processing model by calling the data transmission interface; and the receiving submodule is used to receive the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model.
[0108] According to an embodiment of the present disclosure, the splicing module 540 includes a sorting submodule and a third generating submodule. The sorting submodule is used to sort multiple disaster recovery processing script codes according to the operation stage identifiers marked by the multiple disaster recovery processing script codes to obtain sorted disaster recovery processing script codes; the third generating submodule is used to generate a disaster recovery processing script based on the sorted disaster recovery processing script codes.
[0109] According to an embodiment of the present disclosure, any multiple modules of the acquisition module 510, the parsing module 520, the input module 530 and the splicing module 540 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 510, the parsing module 520, the input module 530 and the splicing module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 510, the parsing module 520, the input module 530 and the splicing module 540 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.
[0110] Figure 6 A block diagram of an electronic device suitable for implementing a script processing method according to an embodiment of the present disclosure is schematically shown.
[0111] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0112] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0113] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0114] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0115] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0116] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the script processing method provided by the embodiment of the present disclosure.
[0117] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0118] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0119] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0120] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0121] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0123] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A script processing method, characterized in that: The method comprises: Acquire a disaster recovery processing text corresponding to the disaster recovery processing task, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks; Parsing the disaster recovery processing text to generate a plurality of task description statements corresponding to the plurality of subtasks, wherein the task description statements are statements describing the disaster recovery processing operations and script attributes based on semantics; Inputting the plurality of task description statements into a semantic processing model, and outputting a plurality of disaster recovery processing script codes corresponding to the plurality of task description statements; A plurality of the disaster recovery processing script codes are spliced to generate a disaster recovery processing script for executing the disaster recovery processing task.
2. The method according to claim 1, characterized in that The step of parsing the disaster recovery processing text to generate a plurality of task description statements corresponding to the plurality of subtasks includes: For each of the subtasks, Identifying a disaster recovery processing operation field and a detection operation field from the disaster recovery processing operation information corresponding to the identifier of the subtask, wherein the disaster recovery processing operation field is a field describing the disaster recovery processing operation corresponding to the subtask, and the detection operation field is a field describing the detection operation corresponding to the subtask, and the detection operation is used to detect the execution status of the disaster recovery processing operation corresponding to the subtask; A task description statement corresponding to the subtask is generated based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the script attribute information corresponding to the subtask.
3. The method according to claim 2, characterized in that The disaster recovery processing operation field includes different types of service process control fields; The detection operation field includes state detection operation fields corresponding to the different types of service process control fields, and each state detection operation field is used to determine a field value generated when a service process in a different state is detected.
4. The method according to claim 2, characterized in that: The script attribute information includes code type information, and the code type information is used to characterize the language type of the disaster recovery processing script code corresponding to the subtask; The generating a task description statement corresponding to the subtask based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the script attribute information corresponding to the subtask includes: generating a task description statement corresponding to the code type information based on the disaster recovery processing operation field corresponding to the subtask, the detection operation field corresponding to the subtask, and the code type information corresponding to the subtask; The step of inputting a plurality of the task description statements into a semantic processing model and outputting a plurality of disaster recovery processing script codes corresponding to the plurality of the task description statements comprises: inputting a task description statement corresponding to the code type information into the semantic processing model and outputting a disaster recovery processing script code corresponding to the code type information.
5. The method according to claim 4, characterized in that The method further comprises: Determine a target system corresponding to the code type information from a plurality of types of operating systems; The disaster recovery processing script is deployed to the target system so that the target system runs the disaster recovery processing script when receiving the disaster recovery processing instruction.
6. The method according to claim 4, characterized in that The step of inputting the task description statement corresponding to the code type information into the semantic processing model and outputting the disaster recovery processing script code corresponding to the code type information comprises: Generate a task description statement message by adding the task description statement to the message body; Sending the task description statement message to the semantic processing model by calling the data transmission interface; Receive the disaster recovery processing script code corresponding to the task description statement message output by the semantic processing model.
7. The method according to claim 1, characterized in that The disaster recovery processing text also includes an operation phase identifier corresponding to the subtask, and the disaster recovery processing code corresponding to the subtask is marked with the operation phase identifier; The step of splicing a plurality of the disaster recovery processing script codes to generate a disaster recovery processing script for executing the disaster recovery processing task includes: Sorting the plurality of disaster recovery processing script codes according to the operation stage identifiers marked by the plurality of disaster recovery processing script codes to obtain sorted disaster recovery processing script codes; Based on the sorted disaster recovery processing script codes, the disaster recovery processing script is generated.
8. A script processing device, characterized in that: The device comprises: An acquisition module, used to acquire a disaster recovery processing text corresponding to the disaster recovery processing task, wherein the disaster recovery processing text includes identifiers of multiple subtasks, disaster recovery processing operation information corresponding to the subtasks, and script attribute information corresponding to the subtasks; A parsing module, used for parsing the disaster recovery processing text to generate a plurality of task description statements corresponding to the plurality of subtasks, wherein the task description statements are statements describing the disaster recovery processing operations and script attributes based on semantics; An input module, used for inputting the plurality of task description statements into a semantic processing model, and outputting a plurality of disaster recovery processing script codes corresponding to the plurality of task description statements; The splicing module is used to splice a plurality of the disaster recovery processing script codes to generate a disaster recovery processing script for executing the disaster recovery processing task.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
