Batch address space management method and device, electronic equipment and storage medium
By automating the management of batch address spaces through address space management scripts on the host server, the cumbersome and missed management problems of manual management in existing technologies are solved, and efficient batch address space management is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-03-22
- Publication Date
- 2026-07-14
AI Technical Summary
In the current technology, the management of a single address space is achieved by manually clicking the function buttons on the panel. There is a lack of effective strategies for managing batch address spaces, which makes the management method too repetitive and cumbersome, and easy to miss management.
By calling the address space management script written on the host server, configuring and parsing the script parameter set, and executing address space management operations, including adding, removing, and checking status, automated management of batch address spaces is achieved.
It simplifies the address space management process, improves processing efficiency, solves the cumbersome problems of manual panel management, and achieves efficient management of batch address spaces.
Smart Images

Figure CN116303115B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology or other related technical fields. Specifically, it relates to a method, apparatus, electronic device and storage medium for managing bulk address space. Background Technology
[0002] With the rapid development of information technology and the continuous increase in business data, the demand for data and task processing is growing. The mainframe of the computer system undertakes the processing functions of massive data and critical tasks. When deploying a computer system, business functions are often distributed through the deployment of multiple subsystems. At the system level, the mainframe often deploys multiple subsystems, each with corresponding databases and middleware products. Each product can independently undertake business processing functions. To facilitate the management of subsystems, multiple address spaces are configured for each middleware product when it is deployed. By managing the address spaces, the performance of the computer system can be maintained and the hardware and software resources can be managed in a unified manner.
[0003] In related technologies, the management of a single address space is achieved by manually clicking the function buttons on the panel. When a large number of address spaces need to be managed in batches, the above management method is too repetitive and cumbersome, and it is easy to miss some management, which cannot meet the user's timeliness requirements.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for managing batch address spaces, to at least solve the technical problem in related technologies where managing a single address space is achieved by manually clicking panel function buttons, lacking an effective batch address space management strategy.
[0006] According to one aspect of the present invention, a method for managing batch address spaces is provided, comprising: invoking an address space management script, wherein the address space management script is a script written by a host server based on an address space management strategy, the address space management strategy including: an address space inclusion strategy, an address space delisting strategy, and an address space status check strategy; configuring a script parameter set of the address space management script and parsing the script parameter set to obtain script request information, wherein the script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2; executing the address space management script based on the script request information and outputting the execution result.
[0007] Optionally, the step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information includes: when the address space management policy is the address space management policy, calling the address space management script; configuring the first script parameter set of the address space management script and parsing the first script parameter set to obtain first script request information, wherein the first script parameter set includes at least: management object parameters, management status parameters, and management subsystem parameters.
[0008] Optionally, after parsing the first script parameter set to obtain the first script request information, the method further includes: invoking a management polling mechanism, wherein the management polling mechanism has a pre-set management polling time interval; parsing the first script request information to obtain a management command; sending the management command to the address space based on the management polling time interval, wherein after receiving the management command, the address space executes the management command based on the connection parameters carried in the management command to obtain a management result; receiving the management result returned by the address space, and generating a management execution result based on the management result and a preset message format.
[0009] Optionally, the step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: when the address space management policy is an address space startup policy, calling the address space startup script; configuring a second script parameter set of the address space startup script and parsing the second script parameter set to obtain second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, and startup subsystem parameters, and the optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters.
[0010] Optionally, after parsing the second script parameter set to obtain the second script request information, the method further includes: invoking a startup polling mechanism, wherein the startup polling mechanism has a preset startup polling time interval; parsing the second script request information to obtain a startup command; sending the startup command to the address space based on the startup polling time interval, wherein after receiving the startup command, the address space executes the startup command based on the control parameters carried in the startup command to obtain a startup result; receiving the startup result returned by the address space, and generating the startup execution result based on the startup result and a preset message format.
[0011] Optionally, if the configured second script parameter set includes the startup priority parameter, the method further includes: creating an address space startup process and configuring a process parameter set, wherein the process parameter set includes at least: process name, process priority value, process start time, process blocking start time, process waiting time, process blocking duration, and process CPU usage time; if the startup priority parameter is the first priority, the address space startup process is stored at the end of the process list based on the process parameter set, and the address space startup process is executed in the order of the processes in the process list.
[0012] Optionally, after configuring the process parameter set, the method further includes: when the startup priority parameter is the second priority, storing the address space startup process in the process list based on the process parameter set, and configuring a priority execution flag for the address space startup process; placing the address space startup process with the priority execution flag in the ready queue of the process list, and placing other startup processes in the process list into the blocking queue, wherein the process list includes the ready queue and the blocking queue, the execution priority of the ready queue is higher than the execution priority of the blocking queue, and the address space startup process in the blocking queue is executed after all processes in the ready queue have been executed.
[0013] Optionally, if the second set of configured script parameters includes the startup type parameter, the method further includes: if the startup type parameter indicates that the address space startup type is a hot startup, reading the historical process identifier of the log corresponding to the address space, wherein the hot startup is a startup operation that does not require deleting historical process data in the log; calling the historical process based on the historical process identifier, and performing the address space startup operation through the historical process.
[0014] Optionally, if the second set of configured script parameters includes the startup type parameter, the method further includes: if the startup type parameter indicates that the address space startup type is a cold startup, creating a new process and performing the address space startup operation through the new process, wherein the cold startup is a startup operation that requires deleting historical process data in the log.
[0015] Optionally, if the configured second script parameter set includes the enable / disable response parameter, the method further includes: receiving an automatic response instruction issued by the server when the enable / disable response parameter indicates that the response strategy is automatic response; or receiving a response result transmitted by the user terminal when the enable / disable response parameter indicates that the response strategy is manual response.
[0016] Optionally, the step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: calling the address space status check script; configuring the third script parameter set of the address space status check script and parsing the third script parameter set to obtain third script request information, wherein the third script parameter set includes at least: check object parameters, check status parameters, check subsystem parameters, total check timeout parameters, and single check timeout parameters.
[0017] Optionally, after parsing the third script parameter set to obtain the third script request information, the method further includes: Step 1, calculating the ratio of the total check timeout parameter to the single check timeout parameter to obtain the number of polling checks; Step 2, checking the address space status based on the number of polling checks and calculating the duration of completing a single check; Step 3, if the duration of completing a single check is less than the single check timeout parameter, returning the check result and generating a status check execution result based on the check result and the preset message format; Step 4, if the duration of completing a single check is greater than or equal to the single check timeout parameter, repeating Step 2 and Step 3 until the check result is obtained, and generating a status check execution result based on the check result and the preset message format.
[0018] Optionally, before configuring the script parameter set of the address space management script, the method further includes: obtaining predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; configuring a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; and establishing the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table to obtain the matching symbol mapping table.
[0019] Optionally, after obtaining the matching symbol mapping table, the method further includes: querying the matching symbol mapping table to determine the N address spaces to be managed.
[0020] According to another aspect of the present invention, a batch address space management device is also provided, comprising: a calling unit for calling an address space management script, wherein the address space management script is a script written by a host server based on an address space management strategy, the address space management strategy including: an address space inclusion strategy, an address space delisting strategy, and an address space status check strategy; a configuration unit for configuring a script parameter set of the address space management script and parsing the script parameter set to obtain script request information, wherein the script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2; and an output unit for executing the address space management script based on the script request information and outputting the execution result.
[0021] Optionally, the configuration unit includes: a first invocation module, configured to invoke an address space management script when the address space management policy is the address space management policy; and a first configuration module, configured to configure a first set of script parameters for the address space management script and parse the first set of script parameters to obtain first script request information, wherein the first set of script parameters includes at least: management object parameters, management status parameters, and management subsystem parameters.
[0022] Optionally, the configuration unit further includes: a second invocation module, used to invoke the management polling mechanism, wherein the management polling mechanism has a pre-set management polling time interval; a first parsing module, used to parse the first script request information to obtain the management command; a first sending module, used to send the management command to the address space based on the management polling time interval, wherein after receiving the management command, the address space executes the management command based on the connection parameters carried in the management command to obtain the management result; and a first receiving module, used to receive the management result returned by the address space and generate a management execution result based on the management result and a preset message format.
[0023] Optionally, the configuration unit further includes: a third invocation module, used to invoke the address space startup script when the address space management policy is an address space startup policy; and a second configuration module, used to configure a second script parameter set for the address space startup script and parse the second script parameter set to obtain second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, and startup subsystem parameters, and the optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters.
[0024] Optionally, the configuration unit further includes: a fourth invocation module, used to invoke a startup polling mechanism, wherein the startup polling mechanism has a preset startup polling time interval; a second parsing module, used to parse the second script request information to obtain a startup command; a second sending module, used to send the startup command to the address space based on the startup polling time interval, wherein after receiving the startup command, the address space executes the startup command based on the control parameters carried in the startup command to obtain a startup result; and a second receiving module, used to receive the startup result returned by the address space and generate the startup execution result based on the startup result and the preset message format.
[0025] Optionally, the batch address space management device further includes: a first creation module, used to create address space startup processes and configure a set of process parameters, the set of process parameters including at least: process name, process priority value, process start time, process blocking start time, process waiting time, process blocking duration, and process CPU usage time; and a first storage module, used to, when the startup priority parameter is first priority, store the address space startup processes at the end of the process list based on the set of process parameters, and execute the address space startup processes in the order of their positions in the process list.
[0026] Optionally, the batch address space management device further includes: a second storage module, configured to store the address space startup process in a process list based on the process parameter set when the startup priority parameter is the second priority, and configure a priority execution flag for the address space startup process; and a first placement module, configured to place the address space startup process with the priority execution flag in the ready queue of the process list, and place other startup processes in the process list into a blocking queue, wherein the process list includes the ready queue and the blocking queue, the execution priority of the ready queue is higher than the execution priority of the blocking queue, and the address space startup process in the blocking queue is executed only after all processes in the ready queue have been executed.
[0027] Optionally, the batch address space management device further includes: a first reading module, used to read the historical process identifier of the log corresponding to the address space when the start-up type parameter indicates that the address space start-up type is hot start-up, wherein the hot start-up is a start-up operation that does not require deleting historical process data in the log; and a fifth calling module, used to call the historical process based on the historical process identifier and perform the address space start-up operation through the historical process.
[0028] Optionally, the batch address space management device further includes: a second creation module, configured to create a new process when the start-up type parameter indicates that the address space start-up type is a cold start-up, and to perform the address space start-up operation through the new process, wherein the cold start-up is a start-up operation that requires the deletion of historical process data in the log.
[0029] Optionally, the batch address space management device further includes: a third receiving module, configured to receive an automatic response instruction issued by the server when the response activation parameter indicates that the response strategy is automatic response; or, a fourth receiving module, configured to receive a response result transmitted by the user terminal when the response activation parameter indicates that the response strategy is manual response.
[0030] Optionally, the batch address space management device further includes: a sixth invocation module for invoking the address space status check script; and a third configuration module for configuring the third script parameter set of the address space status check script and parsing the third script parameter set to obtain third script request information, wherein the third script parameter set includes at least: check object parameters, check status parameters, check subsystem parameters, total check timeout parameters, and single check timeout parameters.
[0031] Optionally, the batch address space management device further includes: a first calculation module, used in step one to calculate the ratio of the total check timeout parameter to the single check timeout parameter to obtain the number of polling checks; a first check module, used in step two to check the address space status based on the number of polling checks and calculate the duration of completing a single check; a first return module, used in step three to return the check result if the duration of completing a single check is less than the single check timeout parameter, and generate a status check execution result based on the check result and a preset message format; and a first execution module, used in step four to repeat steps two and three until the check result is obtained if the duration of completing a single check is greater than or equal to the single check timeout parameter, and generate a status check execution result based on the check result and the preset message format.
[0032] Optionally, the batch address space management device further includes: a first acquisition module, used to acquire predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; a fourth configuration module, used to configure a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; and a first establishment module, used to establish the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table, to obtain a matching symbol mapping table.
[0033] Optionally, the batch address space management device further includes: a first query module, used to query the matching symbol mapping table to determine the N address spaces to be managed.
[0034] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform any of the above-described batch address space management methods.
[0035] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described batch address space management methods.
[0036] In this disclosure, when managing the address space, the address space management script is first invoked. The address space management script is a script written by the host server based on the address space management strategy. The address space management strategy includes: address space inclusion strategy, address space deprecation strategy, and address space status check strategy. Then, the script parameter set of the address space management script is configured and parsed to obtain script request information. Finally, the address space management script is executed based on the script request information, and the execution result is output.
[0037] In this disclosure, when managing a batch of address spaces, relevant commands are encapsulated in the script. By configuring relevant script parameters, script request information is obtained, and then the address space management script is triggered according to the script request information. This enables management operations such as adding, removing, and checking the status of address spaces, thereby realizing automatic management of batch address spaces through scripts. This simplifies the management method, improves processing efficiency, and solves the technical problem in related technologies where management of a single address space is achieved by manually clicking panel function buttons, lacking an effective batch address space management strategy.
[0038] This disclosure also defines matching symbols, which can be used to select the subsystems and address spaces to be managed using fuzzy matching.
[0039] In this disclosure, an address space startup priority strategy is proposed to address the resource contention problem that occurs when starting up batch address spaces, which can identify the priority of startup processes.
[0040] In this disclosure, a cold start strategy is configured to force the address space to start when the address space cannot respond to normal start commands in a timely manner.
[0041] In this disclosure, a strategy for polling and checking the address space status is configured to address the problem that the check command returns an error due to the failure to respond to the command in a timely manner after the address space is started. Attached Figure Description
[0042] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0043] Figure 1 This is a flowchart of an optional batch address space management method according to an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of an optional batch address space management system according to an embodiment of the present invention;
[0045] Figure 3 This is a flowchart of an optional batch address space management method according to an embodiment of the present invention;
[0046] Figure 4 This is a flowchart of an optional batch address space startup method according to an embodiment of the present invention;
[0047] Figure 5 This is a flowchart of an optional batch address space status checking method according to an embodiment of the present invention;
[0048] Figure 6 This is a schematic diagram of an optional bulk address space management device according to an embodiment of the present invention;
[0049] Figure 7 This is a hardware structure block diagram of an electronic device (or mobile device) according to an embodiment of the present invention, which describes a method for managing a batch address space. Detailed Implementation
[0050] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0051] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0052] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0053] Address space refers to the virtual memory addresses used in a computer to store programs and data. A computer system deploys multiple subsystems, and each subsystem deploys products that can undertake business. Each product corresponds to one or more address spaces.
[0054] Address space management is achieved by establishing a connection between the operating system and the address space, enabling the management of the address space and allowing the operating system to access data in the address space.
[0055] Address space startup and address space shutdown include address space startup and address space shutdown. Address space startup refers to controlling the address space to store data of business products and execute business product functions. Address space shutdown refers to pausing the address space to store data of business products and execute business product functions during system maintenance or upgrades.
[0056] It should be noted that the batch address space management method and apparatus in this disclosure can be used in the field of financial technology for batch address space management, and can also be used in any field other than financial technology for batch address space management. This disclosure does not limit the application field of the batch address space management method and apparatus.
[0057] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) disclosed herein are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information must be sent to the aforementioned user or organization through the interface, and the relevant information will be obtained only after receiving consent from the aforementioned user or organization.
[0058] The following embodiments of the present invention can be applied to various address space management systems / applications / devices. The present invention encapsulates commands to obtain address space management scripts, obtains script request information by parsing the configured script parameters, and then executes the script to automatically manage the address space, thereby accurately responding to users' functional requirements for batch address space management, activation, and status checks.
[0059] This invention uses wildcards to perform fuzzy matching of subsystems and address spaces, allowing users to achieve the required functions without having to fully input the required names, thus further improving the automation capabilities of operation and maintenance.
[0060] This invention incorporates priority strategies, forced normal startup strategies, and polling check strategies into the automation script, solving the problem that automation functions cannot respond in a timely manner due to environmental factors such as resource shortages in actual operation and maintenance scenarios.
[0061] The present invention will now be described in detail with reference to various embodiments.
[0062] Example 1
[0063] According to an embodiment of the present invention, an embodiment of a method for managing a bulk address space is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0064] Figure 1 This is a flowchart of an optional batch address space management method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0065] Step S101: Invoke the address space management script. The address space management script is a script written by the host server based on the address space management policy. The address space management policy includes: address space management policy, address space activation policy, and address space status check policy.
[0066] Step S102: Configure the script parameter set of the address space management script, and parse the script parameter set to obtain script request information. The script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2.
[0067] Step S103: Execute the address space management script based on the script request information and output the execution result.
[0068] Through the above steps, when managing a batch of address spaces, the address space management script is first invoked, then the script parameter set of the address space management script is configured, and the script parameter set is parsed to obtain script request information. The script parameter set includes at least N address spaces to be managed. Finally, the address space management script is executed based on the script request information, and the execution result is output.
[0069] In this embodiment, when managing a batch of address spaces, relevant commands are encapsulated in the script. By configuring relevant script parameters, script request information is obtained, and then the address space management script is triggered according to the script request information. This enables management operations such as adding, removing, and checking the status of address spaces, thereby realizing automatic management of batch address spaces through scripts. This simplifies the management method, improves processing efficiency, and solves the technical problem in related technologies where managing a single address space is achieved by manually clicking panel function buttons, lacking an effective batch address space management strategy.
[0070] The embodiments of the present invention will now be described in detail with reference to the steps described above.
[0071] Optionally, before configuring the script parameter set of the address space management script, the method further includes: obtaining predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; configuring a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; and establishing the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table to obtain the matching symbol mapping table.
[0072] It should be noted that in this embodiment of the invention, matching symbols are predefined on the host server. By assigning specific meanings to certain symbols, users can match address spaces and subsystems through fuzzy matching when performing searches or queries. For example, "%" is defined to represent a single letter or number that is not empty, and "*" represents a combination of 0 characters, multiple letters, multiple numbers, or multiple letters and numbers.
[0073] After defining the matching symbol, it is also necessary to establish a mapping relationship between the matching symbol and the subsystem and address space, so that fuzzy matching can be performed by the matching symbol when matching the corresponding address space and subsystem.
[0074] It should be noted that, due to the high availability requirements of the mainframe, each subsystem has deployed products capable of handling business. These products correspond to multiple address spaces. In order to ensure the consistency of the environment between the main site and the backup site, the product configuration and naming should be consistent.
[0075] When using scripts, connections are established with matching symbols through subsystem configuration tables, for example:
[0076] QAP* represents all address spaces in the subsystem configuration table that begin with QAP;
[0077] PX%1* represents PX11MSTR deployed on PT11 and PT31 in the subsystem configuration table;
[0078] PT* represents all subsystems in the subsystem configuration table that begin with PT;
[0079] PT%1 represents the two subsystems PT11 and PT31 in the subsystem configuration table;
[0080] Optionally, after obtaining the matching symbol mapping table, the method further includes: querying the matching symbol mapping table to determine the N address spaces to be managed.
[0081] It should be noted that after configuring the matching symbols, when configuring script parameters, users do not need to precisely locate each subsystem and address space. They can insert matching symbols into the names to match a series of address spaces, thereby enabling batch management of address spaces.
[0082] Step S101: Invoke the address space management script.
[0083] It should be noted that, in order to meet the high availability requirements of the host server, each host is deployed with multiple subsystems, and each subsystem is deployed with multiple products that can undertake business. Each product corresponds to multiple address spaces, and the address spaces can store the programs and data of the business products.
[0084] It should be noted that the implementation subject of this embodiment of the invention is a batch address space management system, which is used to perform management operations such as address space management, deregistration, and status checks. Before managing the address space, address space management scripts, address space deregistration scripts, and address space status check scripts have been written on the host server. When performing related operations, it is only necessary to call the relevant script commands to complete the relevant management functions.
[0085] Step S102: Configure the script parameter set of the address space management script, and parse the script parameter set to obtain script request information.
[0086] It should be noted that, in this embodiment of the invention, the address space needs to be managed first before the address space can be enabled or disabled, and the status of the address space can be checked based on the enable or disable operation.
[0087] Optionally, the steps of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information include: when the address space management policy is the address space management policy, calling the address space management script; configuring the first script parameter set of the address space management script and parsing the first script parameter set to obtain the first script request information, wherein the first script parameter set includes at least: management object parameters, management status parameters, and management subsystem parameters.
[0088] It should be noted that when managing an address space, the address space management script needs to be called, and the first set of script parameters needs to be configured for the management script, including management object parameters, management status parameters, and management subsystem parameters. The management object parameters are further divided into fuzzy matching address space parameters and exact matching address space parameters. The management status parameters include request on or off options, and the request subsystem parameters include fuzzy matching or exact matching subsystem names.
[0089] For example, I_RES1 defines the control object parameter variable, I_REQ defines the control status parameter, and I_TGT1 defines the control subsystem parameter. After receiving the script parameter, the script parameter is first parsed. For example, I_RES = %%CI* indicates that the control name contains the address space where the third and fourth characters of the name are CI, and I_RES = CI11BT11 indicates the address space where the control name is CI11BT11 (% represents one non-empty letter or number, and * represents zero or more letters or numbers). When the script parameter is I... When _REQ=ON, it indicates that the address space is managed; when the script parameter I_REQ=OFF, it indicates that the address space is not managed. When the script parameter I_TGT=*ALL, it indicates that all subsystem names are matched; otherwise, it indicates fuzzy matching or exact matching of address space names. For example, I_TGT=PT%% indicates matching subsystems whose names begin with PT (in this embodiment, % represents one non-empty letter or number, and * represents 0 or more letters or numbers). Based on the parsed script parameters, the request commands are integrated to obtain the first script request information.
[0090] Optionally, after parsing the first script parameter set to obtain the first script request information, the method further includes: invoking the management polling mechanism, wherein the management polling mechanism has a pre-set management polling time interval; parsing the first script request information to obtain the management command; sending the management command to the address space based on the management polling time interval, wherein the address space, after receiving the management command, executes the management command based on the connection parameters carried in the management command to obtain the management result; receiving the management result returned by the address space, and generating a management execution result based on the management result and a preset message format.
[0091] After receiving the first set of input script parameters, it checks whether the script parameters I_RES, I_REQ, and I_TGT are empty. If they are empty, the command returns an error message (the script parameters should not be empty); otherwise, it is a normal address space management request. This management request is then integrated into the management command attributes. For example, the management request is as follows:
[0092] CMD="INGAUTO"||I_REQ||','||I_RES||",FLAG=AUTOMATION,"||"TARGET="||I_TG T||",OUTMODE=LINE".
[0093] It should be noted that when the parsed first script parameter indicates that a certain address space should be included in the management, the management command is obtained according to the first script request information. This management command is sent to the address space to request the establishment of a connection with the address space and to perform the management operation. After receiving the management command, the address space will execute the management command and return the management result. The management execution result is obtained from the management result and is output by the script. Based on the content of the script output, it can be determined whether the management function has been completed normally. The output result of each command is read in sequence. When the output result contains AOF343I NOTHINGTO DISPLAY, it means that the management operation has been completed normally; otherwise, the script reports an error, and the management function has not been completed normally.
[0094] It should be noted that if the inclusion of a device is not completed normally, the inclusion command can be repeatedly sent to the address space and the inclusion result can be received based on the polling mechanism until the inclusion operation is completed normally.
[0095] Optionally, the step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: when the address space management policy is an address space startup policy, calling the address space startup script; configuring the second script parameter set of the address space startup script and parsing the second script parameter set to obtain second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, startup subsystem parameters, and optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters.
[0096] It should be noted that when a client needs to perform an address space startup operation, it can call the address space startup script and configure the second script parameters according to the startup requirements. The second script parameters include necessary script parameters and optional script parameters. Optional script parameters are optional. In the absence of special requirements, only necessary script parameters can be configured. Necessary script parameters include startup object parameters, startup status parameters, and startup subsystem parameters. When all parameters are not empty, parsing the necessary script parameters can obtain the specific address space name that needs to be startup, thereby obtaining the second script request information.
[0097] Specifically, I_RES2 is defined as the startup object parameter, I_REQSP as the startup status parameter, and I_TGT2 as the startup subsystem parameter. I_RES2 can precisely match or fuzzily match the address space. When I_REQSP = S, it indicates starting the address space; otherwise, I_REQSP = P, it indicates shutting down the address space. When I_TGT2 = *ALL, it indicates matching all subsystem names; otherwise, it fuzzily matches or precisely matches the address space name (% represents one non-empty letter or number, * represents zero or more letters or numbers). Parsing the second script parameter set can obtain the second script request information.
[0098] Optionally, after parsing the second script parameter set to obtain the second script request information, the method further includes: invoking the start-up polling mechanism, wherein the start-up polling mechanism pre-sets a start-up polling time interval; parsing the second script request information to obtain the start-up command; sending the start-up command to the address space based on the start-up polling time interval, wherein the address space, upon receiving the start-up command, executes the start-up command based on the control parameters carried in the start-up command to obtain the start-up result; receiving the start-up result returned by the address space, and generating a start-up execution result based on the start-up result and a preset message format.
[0099] It should be noted that, upon receiving the second script request information, a startup command is generated based on the second script request information and sent to the address space to perform startup or shutdown operations on the address space. After receiving the startup command, the address space executes the relevant commands and returns the startup result. The script generates a startup execution result in a preset format based on the startup result. The script determines whether the startup function has been completed normally based on the startup execution result. The startup execution result corresponding to each startup command is read in sequence. For example, when the message corresponding to the startup execution result (represented by msg in this embodiment) contains the content AOF099I FUNCTION COMPLETED, it indicates that the startup operation has been completed normally; otherwise, the script reports an error, and the startup function has not been completed normally.
[0100] If the startup execution result indicates that the startup function has not been completed normally, the startup command can be repeatedly sent to the address space and the startup result can be received based on the polling mechanism until the address space startup operation is completed normally.
[0101] It should be noted that when the startup priority is configured in the optional script parameters of the second script parameter set, the startup process needs to be specially handled according to the priority level. The priority parameters include first priority and second priority, where the first priority corresponds to the first-come-first-served process scheduling rule, and the second priority corresponds to the priority process scheduling rule.
[0102] Optionally, if the configured second script parameter set includes a startup priority parameter, the method further includes: creating an address space startup process and configuring a process parameter set, which includes at least: process name, process priority value, process start time, process blocking start time, process waiting duration, process blocking duration, and process CPU usage duration; if the startup priority parameter is the first priority, storing the address space startup process at the end of the process list based on the process parameter set, and executing the address space startup process in the order of the processes in the process list.
[0103] It should be noted that when performing a startup operation, the startup process is stored in the process list according to its creation time. By default, the process execution operation is performed according to the order stored in the process list, which corresponds to the first priority parameter.
[0104] Optionally, after configuring the process parameter set, the method further includes: when the startup priority parameter is the second priority, storing the address space startup process in the process list based on the process parameter set, and configuring a priority execution flag for the address space startup process; placing the address space startup process with the priority execution flag in the ready queue of the process list, and placing other startup processes in the process list into the blocking queue. The process list includes a ready queue and a blocking queue, with the execution priority of the ready queue being higher than that of the blocking queue. After all processes in the ready queue have been executed, the address space startup process in the blocking queue is then executed.
[0105] It should be noted that, based on the system environment and operational requirements, it may be necessary to prioritize the startup operations of certain address spaces. In the case of high-priority startup processes, a ready queue and a blocked queue are established. High-priority startup processes are placed in the ready queue, while other startup processes are placed in the blocked queue. The execution priority of the ready queue is higher than that of the blocked queue. In the ready queue, startup processes with higher priority values are arranged at the front of the queue. When executing in order, these processes with higher priority values will be executed first.
[0106] Optionally, if the configured second script parameter set includes a startup type parameter, it further includes: if the startup type parameter indicates that the address space startup type is hot startup, reading the historical process identifier of the corresponding log in the address space, wherein hot startup is a startup operation that does not require deleting historical process data in the log; calling the historical process based on the historical process identifier, and performing the address space startup operation through the historical process.
[0107] Optionally, if the second set of configured script parameters includes a startup type parameter, the method further includes: if the startup type parameter indicates that the address space startup type is a cold startup, creating a new process and performing the address space startup operation through the new process, wherein a cold startup is a startup operation that requires deleting historical process data in the log.
[0108] It should be noted that when the system is under resource pressure, the address space may be unable to respond to normal startup commands in a timely manner. To address this issue, this embodiment of the invention adds a forced startup (cold startup) strategy. Generally, the startup method for the address space is a hot startup, which calls the historical process in the log to start the system and retains the historical process data in the log. A cold startup, on the other hand, creates a new process based on system resources and the operating environment and deletes the historical process data in the log, so that the address space can respond to startup commands quickly and speed up the startup process.
[0109] Optionally, if the configured second script parameter set includes a response enable / response parameter, the method further includes: receiving an automatic response instruction issued by the server when the response enable / response parameter indicates that the response strategy is automatic response; or receiving a response result transmitted by the user terminal when the response enable / response parameter indicates that the response strategy is manual response.
[0110] It should be noted that the response strategy in the embodiments of the present invention includes two response methods: automatic response and manual response. Automatic response is preferred. Automatic response does not require manual intervention. The host system will automatically trigger the response command to start the startup process. Manual response, on the other hand, requires manual operation of the control panel to respond. Otherwise, the startup process will be interrupted.
[0111] Optionally, the step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: calling the address space status check script; configuring the third script parameter set of the address space status check script and parsing the third script parameter set to obtain third script request information, wherein the third script parameter set includes at least: check object parameters, check status parameters, check subsystem parameters, total check timeout parameters, and single check timeout parameters.
[0112] It should be noted that after the address space is opened, the status of the address space also needs to be checked.
[0113] Optionally, after parsing the third script parameter set to obtain the third script request information, the method further includes: Step 1, calculating the ratio of the total check timeout parameter to the single check timeout parameter to obtain the number of polling checks; Step 2, checking the address space status based on the number of polling checks and calculating the time to complete a single check; Step 3, if the time to complete a single check is less than the single check timeout parameter, returning the check result and generating a status check execution result based on the check result and a preset message format; Step 4, if the time to complete a single check is greater than or equal to the single check timeout parameter, repeating Step 2 and Step 3 until the check result is obtained and generating a status check execution result based on the check result and a preset message format.
[0114] It should be noted that a polling status check strategy is configured when checking the address space. After obtaining the status check command, the check command can be sent to the address space multiple times. If the check result is not obtained in a single check, the check command is repeatedly sent to the address space based on the interval time until the check result is obtained.
[0115] Step S103: Execute the address space management script based on the script request information and output the execution result.
[0116] It should be noted that the script request information triggers the address space management script to execute the corresponding request, including sending management commands, deregistration commands and status check commands to the address space, and receiving the execution results returned by the address space. Then, the script generates the execution result according to the preset message format, and determines whether the management of the address space has been completed normally based on the execution result.
[0117] Optionally, the address space management script can also be configured with help parameters. When the configured script parameter is a help parameter, a script operation guide will be automatically output.
[0118] The following is a detailed description with reference to another embodiment.
[0119] Example 2
[0120] This embodiment provides a batch address space management system, which includes multiple implementation subsystems.
[0121] Figure 2 This is a schematic diagram of an optional batch address space management system according to an embodiment of the present invention, such as... Figure 2 As shown, the batch address space management system includes three subsystems: address space management subsystem, address space initiation subsystem, and address space status management subsystem. Each subsystem is equipped with a script help module, a parameter input module, a parameter parsing module, a command triggering module, and a result output module.
[0122] Before managing the address space, the present invention predefines matching symbols on the host server. By assigning specific meanings to a certain symbol, users can match the address space and subsystems through fuzzy matching when searching or querying. For example, "%" is defined to represent a single letter or number that is not empty, and "*" represents a combination of 0 characters, multiple letters, multiple numbers, or multiple letters and numbers.
[0123] After defining the matching symbols, it is also necessary to establish a mapping relationship between the matching symbols and the subsystems and address spaces. This allows for fuzzy matching of the corresponding address spaces and subsystems using combinations of letters, numbers, and matching symbols when configuring script management parameters.
[0124] The script help module in this embodiment of the invention is used to provide script usage guidelines to users. When the input parameters include help parameters, script help information can be output to the user.
[0125] It should be noted that if the first script parameter set is configured with a script management help parameter, the script management help parameter is parsed to generate a script management help request and obtain script management usage help.
[0126] For example, the overall syntax structure of the management script is SAFLAG.<I_RES><ON|OFF><I_TGT|*ALL> The document provides five examples illustrating the script's usage. For instance, 'PRGNAME'TS*OFF*ALL' indicates that all address spaces starting with TS are not managed on all subsystems; 'PRGNAME'T%S*OFF PP1A' indicates that address spaces starting with a letter separated from T and S are not managed on the PP1A subsystem; 'PRGNAME'APPC OFF' indicates that APPC is not managed on the currently logged-in subsystem; 'PRGNAME'APPC' indicates whether APPC is managed on the currently logged-in subsystem; and 'PRGNAME'APPC P%1*' indicates whether APPC is managed on P%1* (systems starting with P followed by a letter 1).
[0127] It should be noted that if the second script parameter set is configured with a startup script help parameter, the startup script help parameter is parsed to generate a startup help request and obtain startup script usage help.
[0128] For example, the overall syntax structure of the script that displays the bulk address space is SAADSP.<I_RES><S|P><I_TGT|*ALL> <other>'(I_RES can end with *, indicating a wildcard). Four examples are used to illustrate how to use this script: For instance, `SAADSP PB01 S*ALL` means starting the PB01 address space on all subsystems, defaulting to a low-priority, manual response start; `SAADSP ALLDB2 P PT11` means shutting down the address space of all DB2 products on the PT11 subsystem, defaulting to a low-priority, manual response start; `SAADSP PB*SP%1*HIGH FORCEYES` means starting the address space starting with PB on P%1* in a high-priority, automatic response forced start; `SAADSP PB%1*S PT11 HIGH FORCE YES` means starting the address space starting with PB followed by a letter and then 1 on PT11 in a high-priority, automatic response forced start.
[0129] It should be noted that if the third script parameter set is configured with status check script help parameters, the status check script help parameters are parsed to generate a check help request and obtain the status check script usage help.
[0130] For example, the overall syntax structure of the script for displaying address space status checks is SAADCK.<I_RES><UP|DOWN><I_TGT|*ALL><I_TIMEOUT><I_INTERVAL> (I_RES can end with *, indicating a wildcard). Three examples are used to illustrate the usage of this script: `SAADCK QCAEBA1 UP QTA4 60 10` checks if the QCAEBA1 address space is in a running state on the QTA4 subsystem, for a total of 60 seconds, with each check lasting 10 seconds, i.e., polling 6 times; `SAADCK QCAEBA1 UP Q%A*60 10` checks if the QCAEBA1 address space is in a running state on the wildcard Q%A* subsystem, for a total of 60 seconds, with each check lasting 10 seconds, i.e., polling 6 times; `SAADCK CI%%EA1% DOWN*ALL 60 10` checks if the CI%%EA1% (where a % represents a non-empty number or letter) address space is in a downtime state on all subsystems, for a total of 60 seconds, with each check lasting 10 seconds, i.e., polling 6 times; `SAADCK CI*DOWN*ALL 60` checks if the QCAEBA1 address space is in a downtime state on all subsystems, for a total of 60 seconds, with each check lasting 10 seconds, i.e., polling 6 times; `SAADCK CI*DOWN*ALL 60` checks if the QCAEBA1 address space is in a downtime state on all subsystems. 10 indicates that the check is performed on all subsystems to ensure that the address space starting with CI is in an undercurrent state. The check lasts for a total of 60 seconds, with each check lasting 10 seconds, meaning that the check is performed 6 times in a poll.
[0131] Different help syntaxes can be used to learn how to use scripts, enabling users to quickly get started and manage address space.
[0132] The address space management subsystem is used to implement management operations based on address space management scripts. Figure 3 This is a flowchart of an optional batch address space management method according to an embodiment of the present invention, such as... Figure 3 As shown, the method includes:
[0133] Step 301, Configure the set of parameters for the management script;
[0134] Configure the management script parameters I_RES1 (corresponding to the management object parameters above), I_REQ (corresponding to the management status parameters above), and I_TGT1 (corresponding to the management subsystem parameters above).
[0135] Step 302: Parse the parameters in the script parameter set;
[0136] I_RES1 is used for fuzzy or exact matching of the address space name to be managed, such as: I_RES1 = %%CI*, I_RES1 = CI11BT11, (% represents one non-empty letter or number, * represents zero or more letters or numbers); when I_REQ = ON, it means the address space is managed, otherwise I_REQ = OFF, it means the address space is not managed; when I_TGT1 = *ALL, it means matching all subsystem names, otherwise it means fuzzy or exact matching of subsystem names, such as: I_TGT = PT%%, or I_TGT = PT*, or I_TGT = PT11 (% represents one non-empty letter or number, * represents zero or more letters or numbers).
[0137] Step 303: Integrate script request information based on script parameters;
[0138] Based on the parameters of the inclusion script, the inclusion script request information is obtained, and this inclusion script request information is integrated into the inclusion command properties, as follows:
[0139] CMD="INGAUTO"||I_REQ||','||I_RES||",FLAG=AUTOMATION,"||"TARGET="||I_TG T||",OUTMODE=LINE".
[0140] Step 304: Trigger the address space management command and execute the address space management script;
[0141] The trigger command is as follows:
[0142] 'PIPE NETVIEW' CMD",
[0143] '|CORRWAIT 30',
[0144] '|SEPARATE',
[0145] '|STEM msg'.
[0146] The above management command is an automatic polling command statement. When managing multiple address spaces, the interval between sending each command is set to 30 seconds. The script output message (msg) includes a message header and a message body.
[0147] Step 305: Send a command to manage the address space based on the preset management polling time;
[0148] If no execution result is received from the address space after a single send of the management instruction, the management instruction is repeatedly sent to the address space based on the number of management polls and the results of the management polls, until an execution result is received.
[0149] Step 306: Receive the execution result returned by the address space and generate the script execution result;
[0150] Step 307: Based on the script execution results, determine whether the script has successfully completed the management function.
[0151] Based on the script execution results, determine whether the script has successfully completed the inclusion function. Poll the script output messages of each command. If msg contains AOF343I NOTHING TO DISPLAY, it means that the inclusion operation has been successfully completed. Otherwise, the script will report an error, and the inclusion function has not been successfully completed.
[0152] The address space startup subsystem is used to implement startup operations based on address space startup scripts. Figure 4 This is a flowchart of an optional batch address space uploading method according to an embodiment of the present invention, such as... Figure 4 As shown, the method includes:
[0153] Step 401: Configure the set of startup script parameters;
[0154] The required script parameters for configuring the startup script are I_RES2 (corresponding to the startup object parameter above), I_REQSP (corresponding to the startup status parameter above), and I_TGT2 (corresponding to the startup subsystem parameter above). Optional script parameters (can be omitted, defaults to empty) are I_PRI (corresponding to the startup priority parameter above), I_TYPE (corresponding to the startup type parameter above), and I_WTOR (corresponding to the startup response parameter above).
[0155] Step 402: Parse the parameters in the script parameter set;
[0156] The script parameter set includes required and optional script parameters. When parsing required script parameters, `I_RES` is used for fuzzy or exact matching of the address space name to be started, such as: `I_RES2 = %%CI*`, `I_RES2 = CI11BT11` (where `%` represents one non-empty letter or number, and `*` represents zero or more letters or numbers); `I_REQSP = S` indicates starting the address space, and `I_REQSP = P` indicates stopping the address space; when `I_TGT2 = *ALL`, it matches all subsystem names, otherwise it performs fuzzy or exact matching of subsystem names, such as: `I_TGT2 = PT%%,`, `I_TGT2 = PT*`, or `I_TGT2 = PT11` (where `%` represents one non-empty letter or number, and `*` represents zero or more letters or numbers).
[0157] The optional script parameters are parsed. When I_PRI is empty, the default startup priority is low, meaning it is lower than other system operations (it does not compete for system resources; startup will proceed after other system operations are completed). When I_PRI = HIGH, the startup priority is higher than other system operations, pausing other system tasks and resuming execution after the startup operation is complete. When I_TYPE is empty, the default startup method is a hot startup, meaning the address space reads memory parameters for startup. This method preserves previous startup parameters and logs, making it safer. When I_TYPE = FORCE, the startup method is a cold startup, meaning the address space reads the initial system configuration parameters for startup. Since previously saved parameters and logs are discarded, this method may cause startup anomalies. When I_WTOR is empty, the default address space startup does not have an automatic system response step and requires manual response. When an automatic response step is added, I_WTOR = YES, meaning that after automatic system response, the address space startup process begins without any manual intervention.
[0158] Step 403: Integrate script request information based on script parameters;
[0159] The command checks if the script parameters I_RES, I_REQSP, and I_TGT are empty. If they are empty, the command returns an error message (the script parameters should not be empty). When the required parameters I_RES, I_REQSP, and I_TGT are not empty, and the optional parameters are all empty, this is a default startup request. This startup request is integrated into the startup command properties of the SA product, as follows:
[0160] Startup command IF I_REQSP = "S":
[0161] CMD = 'INGSET KILL' I_RES,
[0162] 'REQUEST=MAKEUN*SOURCE=*VERIFY=NO TARGET=”I_TGT” OUTMODE=LINE'
[0163] The fallback command is: IF I_REQSP = "P":
[0164] CMD = 'INGSET KILL' I_RES,
[0165] 'REQUEST=MAKEAV*SOURCE=*VERIFY=NO TARGET="I_TGT" OUTMODE=LINE'.
[0166] Step 404: Trigger the address space startup command and execute the address space startup script;
[0167] The above-mentioned address space activation command is an automatically polling command statement. When activating multiple address spaces, the time interval for sending each command is set, and activation commands are sent to the address spaces based on the time interval until the execution result returned by the address space is received.
[0168] Step 405: Send an address space start command to the address space based on the preset start polling time;
[0169] Step 406: Receive the execution result returned by the address space and generate the script execution result;
[0170] Step 407: Based on the script execution results, determine whether the script has successfully completed the startup function.
[0171] Based on the output command, determine whether the script has successfully completed the startup function. Poll the script execution result of each command. If msg contains AOF099I FUNCTION COMPLETED, it means that the startup operation has been successfully completed. Otherwise, the script will report an error, and the startup function has not been successfully completed.
[0172] If the startup priority parameter is configured in the startup script parameter set, the corresponding scheduling algorithm is configured. The first priority corresponds to the first-come-first-served scheduling algorithm, and the second priority corresponds to the priority identifier priority scheduling algorithm.
[0173] First, configure the address space to start the information parameters of this task process, including but not limited to: process name (process ID), priority number (the higher the priority number, the higher the priority), process start time, process runtime ALLTIME, process start blocking time START_BLOCK, process CPU time used, process blocked time BLOCKTIME, and process state STATE.
[0174] Reinitialize the processes and add them to the process list in the order they arrived.
[0175] Then configure the first-come, first-served scheduling algorithm, which completes tasks according to the index number of the queue elements in ascending order.
[0176] For the second-priority startup process, a priority-based scheduling algorithm is configured. This algorithm includes a ready queue and a blocked queue. Processes in the ready queue are assigned priority by a priority number, and other running processes are placed in the blocked queue. When the ready queue finishes running, the blocked queue becomes the ready queue and execution begins.
[0177] If the startup type parameter is configured in the startup script parameter set, the corresponding startup strategy is configured for the startup process, including two startup methods: hot startup and cold startup.
[0178] The hot restart method first searches the address space log for historical process identifiers (process IDs), starts or terminates processes that have already been created, and does not create new processes. The address space log and parameters of this identifier (ID) will be retained. Because more system resources will be used to read previous data when restarting, this restart method is slower.
[0179] When configuring a cold boot, the system will create a new process identifier to boot into the address space by reading system environment variables. Previously left-over parameters or logs will be discarded. Since only initialization data is read during boot, this method will speed up the boot process.
[0180] When the startup response parameters are configured in the startup script parameter set, the response strategy is divided into two types: automatic response and manual response.
[0181] When configuring automatic response mode, the host will issue the following command for automatic system response: RID (R is the response command on the host console, and ID represents the process identifier); when configuring manual response mode, the host will not issue a response command, and manual operation of the control panel is required to respond.
[0182] The address space status inspection subsystem is used to perform inspection operations based on address space status inspection scripts. Figure 5 This is a flowchart of an optional batch address space status checking method according to an embodiment of the present invention, such as... Figure 5 As shown, the method includes:
[0183] Step 501, Configure the set of status check scripts;
[0184] The configuration status is checked by polling the total timeout duration (TIMEOUT) and interval duration (INTERVAL), and the start time (INTERVALSTART) is checked.
[0185] Step 502: Parse the parameters in the script parameter set;
[0186] Obtain the parameters required for polling and checking the address space, confirm the number of queries (COUNT, e.g., TIMEOUT=60, INTERVAL=10, then the number of queries is TIMEOUT / INTERVAL=6), the time consumed (the time after each query is completed minus the query start time, T=TIME('E')-INTERVALSTART), and the waiting time for one query (i.e., the interval INTERVAL).
[0187] Step 503: Integrate script request information based on script parameters;
[0188] Step 504: Trigger the address space status check command and execute the address space status check script;
[0189] Step 505: Send an address space status check command to the address space based on a preset check polling time interval;
[0190] Step 506: Receive the execution result returned by the address space and generate the script execution result;
[0191] Step 507: Based on the script execution results, determine whether the script has successfully completed the check function.
[0192] For example, a specific polling logic is provided: if the time for a query is less than the interval and a query result is obtained, then the SUCCESS flag is 1, the loop script exits and returns 0, and the query is completed. If the time for a query is greater than the interval and no query result is obtained, then the polling continues to the next query. If the number of polling times exceeds the preset number of polling times and no query result is obtained, then SUCCESS is 0, and the script returns error code 4.
[0193] Through the above embodiments, the command is encapsulated to obtain an address space management script. By parsing the configured script parameters to obtain script request information, the script is executed to automatically manage the address space, thereby accurately responding to the user's functional requirements for batch address space management, activation, and status checks.
[0194] In addition, this embodiment also defines matching symbols, which can be used to select the subsystems and address spaces that need to be managed by using fuzzy matching. In order to address the resource contention problem that occurs when starting up a batch of address spaces, an address space start-up priority policy is formulated, which can identify the priority of the start-up process. At the same time, in order to address the situation that the address space cannot respond to the normal start-up command in time, a cold start policy is configured to force the start-up of the address space.
[0195] The following is a detailed description with reference to another embodiment.
[0196] Example 3
[0197] The batch address space management device provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.
[0198] Figure 6 This is a schematic diagram of an optional bulk address space management device according to an embodiment of the present invention, such as... Figure 6 As shown, the aforementioned batch address space management device includes: a calling unit 61, a configuration unit 62, and an output unit 63, wherein,
[0199] Calling unit 61 is used to call the address space management script, wherein the address space management script is a script written by the host server based on the address space management strategy. The address space management strategy includes: address space management strategy, address space deregulation strategy, and address space status check strategy.
[0200] Configuration unit 62 is used to configure the script parameter set of the address space management script and parse the script parameter set to obtain script request information. The script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2.
[0201] Output unit 63 is used to execute the address space management script based on the script request information and output the execution result.
[0202] The aforementioned batch address space management device invokes the address space management script through the invocation unit 61; configures the script parameter set of the address space management script through the configuration unit 62, parses the script parameter set to obtain script request information; and executes the address space management script based on the script request information through the output unit 63, and outputs the execution result.
[0203] In this embodiment of the invention, when managing a batch of address spaces, relevant commands are encapsulated in the script. By configuring relevant script parameters, script request information is obtained, and then the address space management script is triggered according to the script request information. This enables management operations such as adding, removing, and checking the status of address spaces, thereby realizing automatic management of batch address spaces through scripts. This simplifies the management method, improves processing efficiency, and solves the technical problem in related technologies where management of a single address space is achieved by manually clicking panel function buttons, lacking an effective batch address space management strategy.
[0204] Optionally, the configuration unit includes: a first invocation module, used to invoke the address space management script when the address space management policy is the address space management policy; and a first configuration module, used to configure the first script parameter set of the address space management script and parse the first script parameter set to obtain the first script request information, wherein the first script parameter set includes at least: management object parameters, management status parameters, and management subsystem parameters.
[0205] Optionally, the configuration unit further includes: a second invocation module for invoking the management polling mechanism, wherein the management polling mechanism has a pre-set management polling time interval; a first parsing module for parsing the first script request information to obtain the management command; a first sending module for sending the management command to the address space based on the management polling time interval, wherein the address space, after receiving the management command, executes the management command based on the connection parameters carried in the management command to obtain the management result; and a first receiving module for receiving the management result returned by the address space and generating a management execution result based on the management result and a preset message format.
[0206] Optionally, the configuration unit further includes: a third invocation module, used to invoke the address space startup script when the address space management policy is an address space startup policy; and a second configuration module, used to configure the second script parameter set of the address space startup script and parse the second script parameter set to obtain the second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, and startup subsystem parameters, and the optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters.
[0207] Optionally, the configuration unit further includes: a fourth invocation module for invoking a startup polling mechanism, wherein the startup polling mechanism has a preset startup polling time interval; a second parsing module for parsing the second script request information to obtain a startup command; a second sending module for sending the startup command to the address space based on the startup polling time interval, wherein the address space, upon receiving the startup command, executes the startup command based on the control parameters carried in the startup command to obtain a startup result; and a second receiving module for receiving the startup result returned by the address space and generating a startup execution result based on the startup result and a preset message format.
[0208] Optionally, the batch address space management device further includes: a first creation module, used to create address space startup processes and configure a set of process parameters, the set of process parameters including at least: process name, process priority value, process start time, process blocking start time, process waiting duration, process blocking duration, and process CPU usage duration; and a first storage module, used to store the address space startup processes at the end of the process list based on the set of process parameters when the startup priority parameter is first priority, and to execute the address space startup processes in the order of their positions in the process list.
[0209] Optionally, the batch address space management device further includes: a second storage module, used to store the address space startup process in the process list based on the process parameter set when the startup priority parameter is the second priority, and to configure a priority execution flag for the address space startup process; and a first placement module, used to place the address space startup process with the priority execution flag in the ready queue of the process list, and to place other startup processes in the process list into the blocking queue, wherein the process list includes a ready queue and a blocking queue, the execution priority of the ready queue is higher than the execution priority of the blocking queue, and the address space startup process in the blocking queue is executed after all processes in the ready queue have been executed.
[0210] Optionally, the batch address space management device further includes: a first reading module, used to read the historical process identifier of the log corresponding to the address space when the start-up type parameter indicates that the address space start-up type is hot start-up, wherein hot start-up is a start-up operation that does not require deleting the historical process data in the log; and a fifth calling module, used to call the historical process based on the historical process identifier and perform the address space start-up operation through the historical process.
[0211] Optionally, the batch address space management device further includes: a second creation module, used to create a new process when the start-up type parameter indicates that the address space start-up type is cold start-up, and to perform the address space start-up operation through the new process, wherein a cold start-up is a start-up operation that requires the deletion of historical process data in the log.
[0212] Optionally, the batch address space management device further includes: a third receiving module, used to receive an automatic response instruction issued by the server when the response strategy is indicated by the response parameter to be automatic response; or, a fourth receiving module, used to receive the response result transmitted by the user terminal when the response strategy is indicated by the response parameter to be manual response.
[0213] Optionally, the batch address space management device further includes: a sixth invocation module for invoking the address space status check script; and a third configuration module for configuring the third script parameter set of the address space status check script and parsing the third script parameter set to obtain the third script request information, wherein the third script parameter set includes at least: check object parameters, check status parameters, check subsystem parameters, total check timeout parameters, and single check timeout parameters.
[0214] Optionally, the batch address space management device further includes: a first calculation module, used in step one, to calculate the ratio of the total check timeout parameter to the single check timeout parameter to obtain the number of polling checks; a first check module, used in step two, to check the address space status based on the number of polling checks and calculate the duration of completing a single check; a first return module, used in step three, to return the check result if the duration of completing a single check is less than the single check timeout parameter, and generate a status check execution result based on the check result and a preset message format; and a first execution module, used in step four, to repeat steps two and three until the check result is obtained if the duration of completing a single check is greater than or equal to the single check timeout parameter, and generate a status check execution result based on the check result and a preset message format.
[0215] Optionally, the batch address space management device further includes: a first acquisition module, used to acquire predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; a fourth configuration module, used to configure a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; and a first establishment module, used to establish the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table, to obtain the matching symbol mapping table.
[0216] Optionally, the batch address space management device further includes: a first query module for querying a matching symbol mapping table to determine the N address spaces to be managed.
[0217] The aforementioned batch address space management device may also include a processor and a memory. The aforementioned calling unit 61, configuration unit 62, output unit 63, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0218] The processors described above contain a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and the bulk address space can be managed by adjusting kernel parameters.
[0219] The aforementioned memory may include non-permanent 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, and the memory includes at least one memory chip.
[0220] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any of the above-described batch address space management methods.
[0221] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the batch address space management method of any of the above.
[0222] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: calling an address space management script, wherein the address space management script is a script written by the host server based on an address space management strategy, the address space management strategy including: address space inclusion strategy, address space deprecation strategy, and address space status check strategy; configuring the script parameter set of the address space management script, and parsing the script parameter set to obtain script request information, wherein the script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2; executing the address space management script based on the script request information, and outputting the execution result.
[0223] Figure 7 This is a hardware structure block diagram of an electronic device (or mobile device) according to an embodiment of the present invention, which describes a method for managing bulk address space. Figure 7 As shown, an electronic device may include one or more ( Figure 7 The processor 702 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 704 for storing data may also be included, denoted as 702a, 702b, ..., 702n. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0224] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0225] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0226] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0227] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0228] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0229] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0230] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.< / other>
Claims
1. A method for managing batch address spaces, characterized in that, include: Invoke the address space management script, wherein the address space management script is a script written by the host server based on the address space management strategy, and the address space management strategy includes: address space management strategy, address space deregulation strategy, and address space status check strategy; Configure the script parameter set of the address space management script, and parse the script parameter set to obtain script request information. The script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2. Execute the address space management script based on the script request information and output the execution result; The steps of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information include: when the address space management policy is the address space management policy, calling the address space management script; configuring the first script parameter set of the address space management script and parsing the first script parameter set to obtain first script request information, wherein the first script parameter set includes at least: management object parameters, management status parameters, and management subsystem parameters; The step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: when the address space management policy is an address space startup policy, calling the address space startup script; configuring the second script parameter set of the address space startup script and parsing the second script parameter set to obtain second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, and startup subsystem parameters, and the optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters; The step of configuring the script parameter set of the address space management script and parsing the script parameter set to obtain script request information further includes: when the address space management policy is the address space status inspection policy, calling the address space status inspection script; configuring the third script parameter set of the address space status inspection script and parsing the third script parameter set to obtain third script request information, wherein the third script parameter set includes at least: inspection object parameters, inspection status parameters, inspection subsystem parameters, total inspection timeout parameters, and single inspection timeout parameters; Before configuring the script parameter set of the address space management script, the method further includes: obtaining predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; configuring a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; establishing the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table to obtain the matching symbol mapping table; After obtaining the matching symbol mapping table, the method further includes: querying the matching symbol mapping table to determine the N address spaces to be managed.
2. The method according to claim 1, characterized in that, After parsing the first script parameter set to obtain the first script request information, the process further includes: Invoke the management polling mechanism, wherein the management polling mechanism is preset with a management polling time interval; Parse the first script request information to obtain the management command; The management command is sent to the address space based on the management polling time interval. After receiving the management command, the address space executes the management command based on the connection parameters carried in the management command to obtain the management result. The system receives the management result returned by the address space and generates a management execution result based on the management result and a preset message format.
3. The method according to claim 1, characterized in that, After parsing the second script parameter set to obtain the second script request information, the process also includes: Invoke the next polling mechanism, wherein the next polling mechanism is preset with a next polling time interval; Parse the second script request information to obtain the start command; The start command is sent to the address space based on the start polling time interval. After receiving the start command, the address space executes the start command based on the control parameters carried in the start command to obtain the start result. Receive the startup result returned by the address space, and generate a startup execution result based on the startup result and a preset message format.
4. The method according to claim 1, characterized in that, If the configured second script parameter set includes the aforementioned priority parameter, it also includes: Create an address space to start a process and configure a set of process parameters. The set of process parameters includes at least: process name, process priority value, process start time, process blocking start time, process waiting time, process blocking duration, and process CPU usage time. When the priority parameter is set to first priority, the address space startup process is stored at the end of the process list based on the process parameter set, and the address space startup process is executed in the order of the processes in the process list.
5. The method according to claim 4, characterized in that, After configuring the process parameter set, it also includes: When the priority parameter is the second priority, the address space startup process is stored in the process list based on the process parameter set, and a priority execution flag is configured for the address space startup process. The address space startup process with the priority execution identifier is placed in the ready queue of the process list, and other startup processes in the process list are placed in the blocking queue. The process list includes the ready queue and the blocking queue. The execution priority of the ready queue is higher than that of the blocking queue. After all processes in the ready queue have been executed, the address space startup process in the blocking queue is executed.
6. The method according to claim 1, characterized in that, If the second set of script parameters in the configuration includes the aforementioned start-up type parameter, it also includes: When the startup type parameter indicates that the startup type of the address space is hot startup, the historical process identifier of the corresponding log of the address space is read, wherein the hot startup is a startup operation that does not require deleting the historical process data in the log; The historical process is invoked based on the historical process identifier, and the address space startup operation is performed through the historical process.
7. The method according to claim 1, characterized in that, If the second set of script parameters in the configuration includes the aforementioned start-up type parameter, it also includes: If the startup type parameter indicates that the address space startup type is a cold startup, a new process is created, and the address space startup operation is performed through the new process. The cold startup is a startup operation that requires the deletion of historical process data in the log.
8. The method according to claim 1, characterized in that, If the configured second script parameter set includes the aforementioned startup response parameter, it also includes: If the response parameter indicates that the response strategy is automatic response, then receive the automatic response instruction issued by the server; or, When the response parameter indicates that the response strategy is manual response, the response result transmitted by the user terminal is received.
9. The method according to claim 1, characterized in that, After parsing the third script parameter set to obtain the third script request information, the process further includes: Step 1: Calculate the ratio of the total inspection timeout parameter to the single inspection timeout parameter to obtain the number of polling inspections; Step 2: Check the address space status based on the number of polling checks, and calculate the time to complete a single check; Step 3: If the time taken to complete a single check is less than the single check timeout parameter, return the check result and generate a status check execution result based on the check result and a preset message format. Step four: If the duration of a single check is greater than or equal to the timeout parameter for a single check, repeat steps two and three until the check result is obtained, and generate a status check execution result based on the check result and a preset message format.
10. A batch address space management device, characterized in that, include: The calling unit is used to call the address space management script, wherein the address space management script is a script written by the host server based on the address space management strategy, and the address space management strategy includes: address space management strategy, address space deregulation strategy, and address space status check strategy. A configuration unit is used to configure the script parameter set of the address space management script and parse the script parameter set to obtain script request information, wherein the script parameter set includes at least N address spaces to be managed, where N is a positive integer greater than or equal to 2; The output unit is used to execute the address space management script based on the script request information and output the execution result; The configuration unit includes: a first invocation module, used to invoke an address space management script when the address space management policy is the address space management policy; and a first configuration module, used to configure a first script parameter set of the address space management script and parse the first script parameter set to obtain first script request information, wherein the first script parameter set includes at least: management object parameters, management status parameters, and management subsystem parameters. The configuration unit further includes: a third invocation module, used to invoke the address space startup script when the address space management policy is an address space startup policy; and a second configuration module, used to configure a second script parameter set for the address space startup script and parse the second script parameter set to obtain second script request information, wherein the second script parameter set includes: necessary script parameters and optional script parameters, the necessary script parameters include at least: startup object parameters, startup status parameters, and startup subsystem parameters, and the optional script parameters include at least one of the following: startup priority parameters, startup type parameters, and startup response parameters; The batch address space management device further includes: a sixth invocation module, used to invoke the address space status check script when the address space management strategy is the address space status check strategy; and a third configuration module, used to configure the third script parameter set of the address space status check script and parse the third script parameter set to obtain third script request information, wherein the third script parameter set includes at least: check object parameters, check status parameters, check subsystem parameters, total check timeout parameters, and single check timeout parameters; The batch address space management device further includes: a first acquisition module, used to acquire predefined matching symbols, wherein the matching symbols are used for fuzzy matching of the address space; a fourth configuration module, used to configure a subsystem mapping table based on the mapping relationship between the address space and the subsystem, wherein the subsystem is M systems deployed in the server that carry business functions, and M is an integer greater than or equal to 1; and a first establishment module, used to establish the mapping relationship between the address space and the subsystem contained in the matching symbols and the subsystem mapping table, to obtain a matching symbol mapping table; The batch address space management device further includes: a first query module, used to query the matching symbol mapping table to determine the N address spaces to be managed.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the bulk address space management method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, It includes one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the bulk address space management method according to any one of claims 1 to 9.