Method and device for configuring local data script, and storage medium
By automatically selecting historical local data scripts similar to the target index information and combining them with the information to be maintained to generate a script to be maintained, the problem of low efficiency in manually editing local data scripts is solved, and the efficiency and accuracy of network equipment maintenance are improved.
Patent Information
- Application Number
- CN202211686398.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In existing technologies, manually editing network data scripts is inefficient and affects the efficiency of network equipment maintenance.
By receiving input operations, a set of historical bureau data scripts is obtained, and scripts similar to the target index information are selected from them. These scripts are then combined with the information to be maintained to generate scripts to be maintained, reducing the number of manual writing steps.
It improves the configuration efficiency of local data scripts, reduces omissions, over-configurations, or input errors, and ensures the normal operation of network devices.
Smart Images

Figure CN116248496B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a method, apparatus, and storage medium for configuring local data scripts. Background Technology
[0002] With the continuous development of communication technology, operators are also upgrading their network infrastructure. Furthermore, during this upgrading process, both older and upgraded network infrastructure equipment can still provide services to users. Therefore, operators need to maintain multiple network infrastructure systems simultaneously.
[0003] Currently, when maintaining network infrastructure, local data scripts can be configured for network devices to ensure their normal operation. Specifically, maintenance personnel can manually edit and input the local data scripts into the network devices. However, manually editing local data scripts is inefficient, impacting the overall efficiency of network equipment maintenance. Therefore, how to configure local data scripts for network devices has become a pressing technical problem to be solved. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for configuring local data scripts, which solves the problem of low efficiency in configuring local data scripts.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] Firstly, this application provides a method for configuring local data scripts. In this method, a first input operation is received, whereby the first input operation is used to input target index information, which is the index information of the script to be maintained. In response to the first input operation, a first script set is obtained, and a second script set is determined from the first script set. The first script set includes historical local data scripts corresponding to the network device, and the second script set includes local data scripts corresponding to the target index information. A second input operation is received, whereby the second input operation is used to determine a first local data script. In response to the second input operation, the first local data script is determined from the second script set. A third input operation is received, whereby the third input operation is used to input information to be maintained. Based on the information to be maintained and the first local data script, a script to be maintained is generated.
[0007] Based on the above technical solution, after the electronic device receives the first input operation, it can obtain the local data script corresponding to the target index (i.e., the second script set) from the historical local data scripts corresponding to the network device. That is, the index information of the local data scripts in the second script set is the same as the index information of the script to be maintained, and the local data scripts in the second script set are similar to the script to be maintained. Then, the electronic device can receive a second input operation to determine the first local data script from the second script set. In other words, the user can select the local data script most similar to the script to be maintained from the second script set. Next, the electronic device can receive a third input operation to obtain the information to be maintained, and generate the script to be maintained based on the information to be maintained and the first local data script. In other words, the electronic device can combine the script most similar to the script to be maintained with the information to be maintained to obtain the script to be maintained. Thus, there is no need for maintenance personnel to write scripts; they only need to select a script similar to the script to be maintained from the historical scripts and input the information to be maintained to obtain the script to be maintained, improving the efficiency of configuring the script to be maintained.
[0008] In one possible design, the method may further include: determining a third script set from a first script set based on target index information; the third script set including multiple fourth script sets, each fourth script set including multiple local data scripts corresponding to the target index information, with each fourth script set corresponding to a specific operation instruction; for each fourth script set, deduplicating the fourth script set to obtain a second local data script, which is one of the local data scripts in the fourth script set; and determining a second script set, which includes the second local data script from each of the fourth script sets.
[0009] In one possible design, the local data scripts in the fourth script set are arranged in chronological order of their generation time. The method may further include: for each fourth script set, obtaining a first sequence identifier, where the first sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set, to obtain multiple first sequence identifiers. Based on the first local data script, determining a second sequence identifier from the multiple first sequence identifiers, where the second sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set corresponding to the first local data script. Generating a script to be maintained based on the information to be maintained, the first local data script, and the second sequence identifier, where the sequence identifier of the script to be maintained is the sum of the second sequence identifier and a preset value.
[0010] In one possible design, the method is applied to an electronic device that stores a preset local data script. The impact of the preset local data script exceeds a preset threshold, where the impact level is the degree to which running the local data script affects the normal operation of the network device. The method may further include: if no script to be maintained exists in the preset local data script, then storing the script to be maintained; if a script to be maintained exists in the preset local data script, then generating a prompt message indicating whether to store the script to be maintained; and upon receiving a fourth input operation, storing the script to be maintained, whereby the fourth input operation triggers the storage of the script to be maintained.
[0011] In one possible design, the method may also include: obtaining a first set of scripts from the northbound interface.
[0012] Secondly, this application provides a configuration device for local data scripts, the device including a receiving unit and a processing unit.
[0013] The receiving unit is configured to receive a first input operation, which is used to input target index information, specifically the index information of the script to be maintained. The processing unit is configured to, in response to the first input operation, acquire a first script set and determine a second script set from the first script set. The first script set includes historical local data scripts corresponding to the network device, and the second script set includes local data scripts corresponding to the target index information. The receiving unit is further configured to receive a second input operation, which is used to determine the first local data script. The processing unit is further configured to, in response to the second input operation, determine the first local data script from the second script set. The receiving unit is further configured to receive a third input operation, which is used to input information to be maintained. The processing unit is further configured to generate the script to be maintained based on the information to be maintained and the first local data script.
[0014] In one possible design, the processing unit is further configured to determine a third script set from the first script set based on the target index information. The third script set includes multiple fourth script sets, each containing multiple local data scripts corresponding to the target index information. Each fourth script set corresponds to one type of operation instruction. The processing unit is also configured to deduplicate each fourth script set to obtain a second local data script, which is one of the local data scripts in the fourth script set. The processing unit is further configured to determine a second script set, which includes the second local data script from each of the fourth script sets.
[0015] In one possible design, the local data scripts in the fourth script set are arranged in chronological order of their generation time. The processing unit is further configured to, for each fourth script set, obtain a first sequence identifier, which is the sequence identifier of the latest-generated local data script in the fourth script set, thereby obtaining multiple first sequence identifiers. The processing unit is further configured to, based on the first local data script, determine a second sequence identifier from the multiple first sequence identifiers, where the second sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set corresponding to the first local data script. The processing unit is further configured to, based on the information to be maintained, the first local data script, and the second sequence identifier, generate a script to be maintained, where the sequence identifier of the script to be maintained is the sum of the second sequence identifier and a preset value.
[0016] In one possible design, the configuration device for the local data script is applied to an electronic device. The electronic device stores a preset local data script, and the influence level of the preset local data script is greater than a preset threshold. The influence level is the degree to which running the local data script affects the normal operation of the network equipment. The processing unit is further configured to store the script to be maintained if no script to be maintained exists in the preset local data script. The processing unit is also configured to generate a prompt message if a script to be maintained exists in the preset local data script, indicating whether to store the script to be maintained. The processing unit is further configured to store the script to be maintained upon receiving a fourth input operation, which triggers the storage of the script to be maintained.
[0017] In one possible design, the processing unit is also used to obtain the first set of scripts from the northbound interface.
[0018] Thirdly, this application provides a configuration apparatus for a local data script, the apparatus comprising: a processor and a memory; the processor and the memory being coupled; the memory being used to store one or more programs, the one or more programs including computer-executable instructions, wherein when the configuration apparatus for the local data script is running, the processor executes the computer-executable instructions stored in the memory to implement the configuration method for the local data script as described in the first aspect and any possible implementation thereof.
[0019] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the local data script configuration method described in the first aspect and any possible implementation thereof.
[0020] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run computer programs or instructions to implement the local data script configuration method as described in the first aspect and any possible implementation of the first aspect.
[0021] The technical problems that can be solved and the technical effects that can be achieved by the configuration device, computer equipment, computer storage medium or chip of the local data script in the above solution can be referred to the technical problems and technical effects solved in the first aspect above, and will not be repeated here. Attached Figure Description
[0022] Figure 1A This application provides a schematic diagram of the system structure of an electronic device.
[0023] Figure 1B A flowchart illustrating a method for configuring a local data script, as provided in an embodiment of this application;
[0024] Figure 2 A flowchart illustrating another method for configuring local data scripts provided in an embodiment of this application;
[0025] Figure 3 A flowchart illustrating another method for configuring local data scripts provided in an embodiment of this application;
[0026] Figure 4 A schematic diagram of a configuration device for local data scripts provided in an embodiment of this application;
[0027] Figure 5 A schematic diagram of the structure of another configuration device for local data scripts provided in an embodiment of this application;
[0028] Figure 6 A conceptual partial view of a computer program product provided for an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] In this article, the character " / " generally indicates that the objects before and after it are in an "or" relationship. For example, A / B can be understood as A or B.
[0031] The terms “first” and “second” in the specification and claims of this application are used to distinguish different objects, rather than to describe a specific order of objects.
[0032] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the steps or modules listed, but may optionally include other steps or modules not listed, or may optionally include other steps or modules inherent to such process, method, product, or device.
[0033] Furthermore, in the embodiments of this application, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present concepts in a concrete manner.
[0034] Before providing a detailed description of the configuration method for the local data script in this application embodiment, the implementation environment and application scenarios of this application embodiment will be introduced first.
[0035] First, the application scenarios of the embodiments of this application will be introduced. The configuration method of the local data script in the embodiments of this application is applied to the scenario of configuring local data scripts. Currently, we have entered the era of 5G network technology. However, operators not only need to maintain 5G networks, but also need to operate other networks (such as 3G and 4G networks). Therefore, maintenance personnel need to maintain network equipment corresponding to 3G, 4G, and 5G networks.
[0036] Currently, maintenance personnel can maintain network devices by configuring local data scripts. Local data scripts are a type of data configuration for network devices, including relevant data processed by the network device, such as signaling data, billing management data, and content billing data. The configuration of local data scripts directly affects communication smoothness.
[0037] However, with the increasing number of network devices, the workload for maintenance personnel in configuring local data scripts is growing, severely impacting network device maintenance efficiency. Furthermore, errors in configuring data scripts can lead to omissions, over-configurations, or input errors, causing script execution errors and affecting network device operation. Therefore, improving the efficiency and accuracy of configuring local data scripts for network devices has become a pressing technical problem.
[0038] To address the aforementioned problems, this application provides a method for configuring local data scripts. In this method, an electronic device can receive a first input operation, which is used to input target index information, specifically the index information of the script to be maintained. In response to the first input operation, the electronic device acquires a first script set and determines a second script set from the first script set. The first script set includes historical local data scripts corresponding to the network device, and the second script set includes local data scripts corresponding to the target index information. The electronic device receives a second input operation, which is used to determine a first local data script. In response to the second input operation, the electronic device determines the first local data script from the second script set. The electronic device receives a third input operation, which is used to input information to be maintained. The electronic device generates the script to be maintained based on the information to be maintained and the first local data script.
[0039] In this way, after receiving the first input operation, the electronic device can retrieve the local data script corresponding to the target index (i.e., the second script set) from the historical local data scripts of the network device. That is, the index information of the local data scripts in the second script set is the same as the index information of the script to be maintained, and the local data scripts in the second script set are similar to the script to be maintained. Next, the electronic device can receive a second input operation to determine the first local data script from the second script set. In other words, the user can select the local data script most similar to the script to be maintained from the second script set. Then, the electronic device can receive a third input operation to obtain the maintenance information and generate the script to be maintained based on the maintenance information and the first local data script. That is, the electronic device can combine the script most similar to the script to be maintained with the maintenance information to obtain the script to be maintained. Thus, there is no need for maintenance personnel to write scripts; they only need to select a script similar to the script to be maintained from the historical scripts and input the maintenance information to obtain the script to be maintained, improving the efficiency of configuring the script to be maintained.
[0040] It should be noted that the network equipment in this application is not limited. For example, the network equipment can be a base station. The base station can include various forms of base stations, such as: macro base stations, micro base stations (also known as small stations), relay stations, access points, etc. Specifically, it can be: an access point (AP) in a Wireless Local Area Network (WLAN), a base station (Base Transceiver Station, BTS) in a Global System for Mobile Communications (GSM) or Code Division Multiple Access (CDMA), a base station (NodeB, NB) in a Wideband Code Division Multiple Access (WCDMA), an evolved Node B (eNB or eNodeB) in LTE, or a relay station or access point, or a vehicle-mounted device, wearable device, or a next-generation Node B (gNB) in a future 5G network, or a base station in a future evolved Public Land Mobile Network (PLMN) network, etc. For example, network devices can be Authentication Management Function (AMF) network elements, User Plane Function (UPF) network elements, Service Management Function (SMF) network elements, etc.
[0041] It should be noted that the embodiments of this application do not limit the electronic devices. For example, the electronic device can be a terminal. A terminal can be a device with transceiver capabilities. Terminals include handheld devices, in-vehicle devices, wearable devices, or computing devices with wireless communication capabilities. Exemplarily, a terminal can be a mobile phone, a tablet computer, or a computer with wireless transceiver capabilities. Terminal devices can also be virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in autonomous driving, wireless terminals in telemedicine, wireless terminals in smart grids, wireless terminals in smart cities, wireless terminals in smart homes, etc. As another example, the electronic device can be a network device.
[0042] Optionally, electronic devices and network devices can be connected via wired connections.
[0043] like Figure 1A The diagram shows a schematic of the system architecture of an electronic device. The system of the electronic device may include: an operation unit, a preprocessing unit, a northbound interface, a historical database, a configuration unit, a checking unit, a high-risk instruction library, and a script execution unit.
[0044] The operation unit is used to receive user operations. For example, the operation unit may include an input unit and a selection unit. The input unit is used to input data (such as index information), and the selection unit is used to select options, such as selecting one local data script from multiple local data scripts.
[0045] The preset processing unit is used to process local data scripts, such as deduplication.
[0046] The northbound interface is used to obtain local data scripts from network devices.
[0047] The historical database includes local data scripts that have been run by network devices and / or local data scripts that have been generated by electronic devices in the past.
[0048] The configuration unit is used to generate local data scripts.
[0049] The checking unit is used to determine whether the generated data script is a high-level instruction. The high-risk instruction library stores multiple high-risk instructions.
[0050] It should be noted that running high-risk commands on network devices may affect the normal operation of the network devices.
[0051] The script execution unit is used to run local data scripts.
[0052] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0053] like Figure 1B As shown, this application provides a method for configuring a local data script, the method comprising:
[0054] S101, The electronic device receives the first input operation.
[0055] The first input operation is used to input the target index information, which is the index information of the script to be maintained.
[0056] In one possible design, the index information includes: field names in the local data script.
[0057] For example, target index information may include: IP address, routing address, service name, etc.
[0058] Optionally, the index information may also include the identifier of the target network device, which is the network device corresponding to the script to be maintained.
[0059] Understandably, different network devices may have different local data scripts. By identifying the target network device, the script corresponding to the script to be maintained can be located.
[0060] For example, if it is necessary to maintain the SMF network element, the identifier of the SMF network element can be entered.
[0061] It should be noted that maintenance personnel can obtain demand information through electronic devices, and this demand information includes target index information. This application embodiment does not limit the demand information. For example, the demand information can be work order information, scheduling information, or relevant data about network devices. Alternatively, the demand information can be information to be maintained.
[0062] For example, this requirement information can be used to instruct the addition or deletion of IP addresses.
[0063] S102, In response to the first input operation, the electronic device acquires the first script set.
[0064] The first set of scripts includes: historical local data scripts corresponding to network devices.
[0065] It should be noted that the historical local data script corresponding to a network device refers to the local data script that the network device has already run. Alternatively, the historical local data script corresponding to a network device refers to the local data script stored in the network device.
[0066] In one possible design, the electronic device can obtain the first set of scripts from the northbound interface.
[0067] Understandably, the real-time local data scripts of network devices can be obtained from the northbound interface. This allows for the acquisition of the latest local data scripts, improving the accuracy of configuring scripts awaiting maintenance.
[0068] S103, The electronic device determines the second script set from the first script set.
[0069] The second set of scripts includes local data scripts corresponding to the target index information.
[0070] In one possible implementation, in response to a first input operation, the electronic device can acquire a first set of scripts. Then, the electronic device determines a second set of scripts from the first set of scripts based on target index information.
[0071] For example, if the target index information includes: IP address and SMF network element identifier, then all local data scripts in the second script set include IP address, and all local data scripts in the second script set are local data scripts of SMF network elements.
[0072] In some embodiments, the target index information includes multi-level index information. The electronic device determines the second script set based on the multi-level index information.
[0073] For example, the target index information includes: first-level index information and second-level index information. The electronic device determines set A from the first script set based on the first-level index information. Then, the electronic device determines set B (i.e., the second script set) from set A based on the second-level index information.
[0074] S104, The electronic device receives a second input operation.
[0075] The second input operation is used to determine the data script for the first game.
[0076] S105. In response to the second input operation, the electronic device determines the first game data script from the second script set.
[0077] For example, the second input operation can be a selection operation entered by the user.
[0078] S106, The electronic device receives a third input operation.
[0079] The third input operation is used to input the information to be maintained.
[0080] In one possible design, the information to be maintained is the value corresponding to the target index information.
[0081] For example, if the target index information is an IP address, the information to be maintained can be "11.111.01.1".
[0082] S107. The electronic equipment generates a maintenance script based on the maintenance information and the first-round data script.
[0083] In one possible implementation, the electronic device can add the maintenance information to the target data script to generate the maintenance script.
[0084] Optionally, the electronic device can modify the value corresponding to the target index information in the target data script to the information to be maintained, and generate a script to be maintained.
[0085] Based on the above technical solution, after the electronic device receives the first input operation, it can obtain the local data script corresponding to the target index (i.e., the second script set) from the historical local data scripts corresponding to the network device. That is, the index information of the local data scripts in the second script set is the same as the index information of the script to be maintained, and the local data scripts in the second script set are similar to the script to be maintained. Then, the electronic device can receive a second input operation to determine the first local data script from the second script set. In other words, the user can select the local data script most similar to the script to be maintained from the second script set. Next, the electronic device can receive a third input operation to obtain the information to be maintained, and generate the script to be maintained based on the information to be maintained and the first local data script. In other words, the electronic device can combine the script most similar to the script to be maintained with the information to be maintained to obtain the script to be maintained. Thus, there is no need for maintenance personnel to write scripts; they only need to select a script similar to the script to be maintained from the historical scripts and input the information to be maintained to obtain the script to be maintained, improving the efficiency of configuring the script to be maintained.
[0086] like Figure 2 As shown, another method for configuring local data scripts provided in this application embodiment is described. In this method, S103 may include:
[0087] S201. The electronic device determines the third script set from the first script set based on the target index information.
[0088] The third script set includes multiple fourth script sets, which in turn include multiple local data scripts corresponding to the target index information.
[0089] It should be noted that the configuration format of local data scripts in a script set is the same, but the values corresponding to the index information are different.
[0090] For example, script set A may include: local data script A and local data script B, where local data script A is "ADD PCSCFGROUP: GROUPNAME="Group1_PSBC07", ALLOCTYPE=LOCAL, IPVERSION=IPV6" and local data script B is "ADD PCSCFGROUP:GROUPNAME="Group1_PSBC08", ALLOCTYPE=LOCAL,IPVERSION=IPV6".
[0091] In the embodiments of this application, a fourth script set corresponds to an operation instruction.
[0092] It should be noted that operation commands are used to instruct network devices to perform service functions, and different operation commands correspond to different service functions.
[0093] For example, the third script set includes script set A and script set B, both of which include IP addresses. The local data scripts in script set A correspond to operation instruction A, and the local data scripts in script set B correspond to operation instruction B.
[0094] S202. For each fourth script set, the electronic device deduplicates the fourth script set to obtain the second game data script.
[0095] The second game data script is a game data script in the fourth script set.
[0096] In one possible design, the local data scripts in the fourth script set are arranged in chronological order of their generation time. The second local data script is the most recently generated local data script in the fourth script set.
[0097] S203, The electronic device determines the second script set.
[0098] The second script set includes the second data script in each of the fourth script sets.
[0099] Understandably, after the electronic device determines multiple fourth script sets from the first script set based on the target index information, since multiple local data scripts with the same target index information and corresponding identical operation instructions exist in the fourth script set, the electronic device can deduplicate each fourth script set to obtain a second local data script, which is one of the local data scripts in the fourth script set. Then, the electronic device determines the second script set, which includes the second local data script from each of the fourth script sets. This reduces the number of scripts in the second script set within the electronic device, making it easier for the user to select the first local data script from the second script set.
[0100] It should be noted that in some embodiments, the local data scripts corresponding to an operation instruction are ordered according to a preset sequence. Each local data script has a unique sequence identifier. If the sequence identifier of the maintenance script generated by the electronic device is incorrect, it may cause the network device to encounter an error when executing the maintenance script.
[0101] In some embodiments, the local data scripts in the fourth script set are arranged in chronological order of their generation time. Before the electronic device receives the third input operation, the method further includes: for each fourth script set, the electronic device can obtain a first sequence identifier, which is the sequence identifier of the latest-generated local data script in the fourth script set, to obtain multiple first sequence identifiers. Then, the electronic device can determine a second sequence identifier from the multiple first sequence identifiers based on the first local data script, where the second sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set corresponding to the first local data script.
[0102] For example, if the fourth script set includes script A, script B and script C, and the generation time of script A is 09:01, the generation time of script B is 09:03 and the generation time of script C is 09:03, then the second sequence identifier is the sequence identifier of script C.
[0103] It should be noted that the embodiments of this application do not limit the sequence identifier. For example, the sequence identifier can be a number (such as 1, 2, 3, etc.). Or, for example, the sequence identifier can be a letter (such as a, b, c, etc.). The following describes the embodiments of this application using a number as the sequence identifier.
[0104] In one possible design, the local data script includes a sequence identifier.
[0105] In this embodiment of the application, the electronic device generates a maintenance script based on the maintenance information and the first game data script. This may include: the electronic device generates a maintenance script based on the maintenance information, the first game data script, and the second sequence identifier, wherein the sequence identifier of the maintenance script is the sum of the second sequence identifier and a preset value.
[0106] It should be noted that the preset value is not limited in the embodiments of this application. For example, the preset value can be 1. Or, for example, the preset value can be 2. Normally, the preset value is 1.
[0107] For example, if the second sequence identifier is 3 and the default value is 1, then the sequence identifier of the script to be maintained is 4.
[0108] Understandably, for each fourth script set, the electronic device acquires a first sequence identifier, which is the sequence identifier of the latest-generated local data script in the fourth script set, and obtains multiple first sequence identifiers. Then, the electronic device can determine a second sequence identifier from these multiple first sequence identifiers based on the first local data script. This second sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set corresponding to the first local data script. Next, the electronic device generates a script to be maintained based on the information to be maintained, the first local data script, and the second sequence identifier. The sequence identifier of the script to be maintained is the sum of the second sequence identifier and a preset value. This ensures that the sequence identifier of the script to be maintained is associated with the sequence identifiers of the local data scripts in the script set, guaranteeing the orderliness of the local data scripts and preventing errors in the sequence identifiers of the scripts to be maintained. Furthermore, it ensures the uniqueness of the local data scripts.
[0109] In some embodiments, the target index information of the electronic device may further include: maintenance information. After receiving the second input operation, the electronic device can generate a maintenance script based on the maintenance information and the first data script.
[0110] In some embodiments, if the target index information does not include information to be maintained, the electronic device may generate a first-round data script.
[0111] In other words, the electronic device can input the first set of data scripts. This makes it easier for maintenance personnel to query the set of data scripts.
[0112] like Figure 3 As shown, another method for configuring a local data script provided in this application embodiment may further include:
[0113] S301. The electronic device determines whether there is a script to be maintained in the preset local data script.
[0114] In this embodiment of the application, the electronic device stores a preset local data script. The influence degree of the preset local data script is greater than a preset degree threshold. The influence degree is the degree to which running the local data script affects the normal operation of the network device.
[0115] It should be noted that the operation of local data scripts affecting the normal operation of network equipment refers to the network equipment malfunctioning due to the operation of local data scripts, such as errors or inability to perform business functions.
[0116] For example, suppose the preset threshold is 60%, and suppose the preset local data scripts include: local data script A, local data script B, and local data script C. The influence of local data script A is 62%, the influence of local data script B is 85%, and the influence of local data script C is 90%.
[0117] It should be noted that the embodiments of this application do not limit the method of obtaining the preset local data script. For example, maintenance personnel can input local data scripts that affect the operation of network equipment into electronic devices based on experience. Alternatively, electronic devices can determine the preset local data script based on historical operating data (such as error messages appearing in the logs of running local data scripts).
[0118] In some embodiments, if there is no script to be maintained in the preset local data script, then S302 is executed.
[0119] In some embodiments, if there is a script to be maintained in the preset local data script, then S303 is executed.
[0120] S302, Electronic equipment stores maintenance scripts.
[0121] S303, The electronic device generates a prompt message.
[0122] The prompt message indicates whether to store the script to be maintained.
[0123] In some embodiments, upon receiving a fourth input operation, the electronic device may store a maintenance script, the fourth input operation being used to trigger the storage of the maintenance script.
[0124] In other embodiments, upon receiving a rejection to store the script to be maintained, the electronic device deletes the script to be maintained.
[0125] Based on the above technical solution, the electronic device stores a preset local data script. The impact level of the preset local data script is greater than a preset threshold, which is the degree to which the running local data script affects the normal operation of the network device. If there is no script to be maintained in the preset local data script, then the script to be maintained is stored. In this way, network device maintenance can be performed, and the probability of affecting the normal operation of the network device can be reduced. If there is a script to be maintained in the preset local data script, a prompt message is generated to indicate whether to store the script to be maintained. Upon receiving a fourth input operation, the script to be maintained is stored. The fourth input operation is used to trigger the storage of the script to be maintained. In this way, the maintenance personnel can confirm the storage of the script to be maintained after a second confirmation, further reducing the probability of affecting the normal operation of the network device.
[0126] The foregoing primarily describes the solutions provided in the embodiments of this application from the perspective of computer devices. It is understood that, in order to achieve the aforementioned functions, the computer device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the configuration method steps of the local data scripts described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0127] This application also provides a configuration device for a local data script. This configuration device can be a computer device, the CPU of the aforementioned computer device, a processing module for configuring local data scripts within the aforementioned computer device, or a client for configuring local data scripts within the aforementioned computer device.
[0128] This application embodiment can divide the configuration of the local data script into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0129] like Figure 4 The diagram shown is a structural schematic of a local data script configuration device provided in an embodiment of this application. The local data script configuration device is used to execute... Figures 1B-3 The method for configuring local data scripts is shown. The configuration device for local data scripts may include a receiving unit 401 and a processing unit 402.
[0130] The receiving unit 401 is configured to receive a first input operation, which is used to input target index information, specifically the index information of the script to be maintained. The processing unit 402 is configured to, in response to the first input operation, acquire a first script set and determine a second script set from the first script set. The first script set includes historical local data scripts corresponding to the network device, and the second script set includes local data scripts corresponding to the target index information. The receiving unit 401 is further configured to receive a second input operation, which is used to determine the first local data script. The processing unit 402 is further configured to, in response to the second input operation, determine the first local data script from the second script set. The receiving unit 401 is further configured to receive a third input operation, which is used to input information to be maintained. The processing unit 402 is further configured to generate the script to be maintained based on the information to be maintained and the first local data script.
[0131] In one possible design, processing unit 402 is further configured to determine a third script set from the first script set based on the target index information. The third script set includes multiple fourth script sets, each containing multiple local data scripts corresponding to the target index information. Each fourth script set corresponds to one type of operation instruction. Processing unit 402 is also configured to deduplicate each fourth script set to obtain a second local data script, which is one of the local data scripts in the fourth script set. Processing unit 402 is further configured to determine a second script set, which includes the second local data script from each of the fourth script sets.
[0132] In one possible design, the local data scripts in the fourth script set are arranged in chronological order of their generation time. Processing unit 402 is further configured to, for each fourth script set, obtain a first sequence identifier, which is the sequence identifier of the latest-generated local data script in the fourth script set, thereby obtaining multiple first sequence identifiers. Processing unit 402 is further configured to, based on the first local data script, determine a second sequence identifier from the multiple first sequence identifiers, where the second sequence identifier is the sequence identifier of the latest-generated local data script in the fourth script set corresponding to the first local data script. Processing unit 402 is further configured to, based on the information to be maintained, the first local data script, and the second sequence identifier, generate a script to be maintained, where the sequence identifier of the script to be maintained is the sum of the second sequence identifier and a preset value.
[0133] In one possible design, the configuration device for the local data script is applied to an electronic device. The electronic device stores a preset local data script, and the influence level of the preset local data script is greater than a preset threshold. The influence level is the degree to which running the local data script affects the normal operation of the network equipment. The processing unit 402 is further configured to store the script to be maintained if no script to be maintained exists in the preset local data script. The processing unit 402 is also configured to generate a prompt message if a script to be maintained exists in the preset local data script, indicating whether to store the script to be maintained. The processing unit 402 is further configured to store the script to be maintained upon receiving a fourth input operation, the fourth input operation being used to trigger the storage of the script to be maintained.
[0134] In one possible design, processing unit 402 is also used to obtain a first set of scripts from the northbound interface.
[0135] Figure 5 This is a schematic diagram of the hardware structure of a local data script configuration device according to an exemplary embodiment. The local data script configuration device may include a processor 502, which executes application code to implement the local data script configuration method of this application.
[0136] Processor 502 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to the present application.
[0137] like Figure 5 As shown, the configuration device for the local data script may further include a memory 503. The memory 503 stores the application code that executes the scheme of this application, and its execution is controlled by the processor 502.
[0138] Memory 503 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 503 may exist independently and be connected to processor 502 via bus 504. Memory 503 may also be integrated with processor 502.
[0139] like Figure 5 As shown, the configuration device for the local data script may further include a communication interface 501, wherein the communication interface 501, processor 502, and memory 503 may be coupled to each other, for example, through a bus 504. The communication interface 501 is used for information exchange with other devices, for example, supporting information exchange between the configuration device for the local data script and other devices.
[0140] It should be pointed out that, Figure 5 The device structure shown does not constitute a limitation on the configuration devices for the local data script, except... Figure 5 In addition to the components shown, the configuration device for the bureau's data script may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0141] In actual implementation, the functions implemented by processing unit 402 can be derived by... Figure 5 The processor 502 shown calls the program code in memory 503 to implement this.
[0142] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor of a computer device, enable the computer to perform the configuration method of the local data script provided in the embodiments described above. For example, the computer-readable storage medium may be a memory 503 including instructions, which may be executed by a processor 502 of a computer device to complete the above method. Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0143] Figure 6 A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. The computer program product includes a computer program for executing computer processes on a computing device.
[0144] In one embodiment, the computer program product is provided using a signal carrying medium 600. The signal carrying medium 600 may include one or more program instructions that, when executed by one or more processors, can provide the functions or part of the functions described in the embodiments above. Furthermore, Figure 6 The program instructions in the document also describe example instructions.
[0145] In some examples, the signal carrying medium 600 may include a computer-readable medium 601, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), a digital magnetic tape, a memory, a read-only memory (ROM), or a random access memory (RAM), etc.
[0146] In some implementations, the signal carrying medium 600 may include a computer recordable medium 602, such as, but not limited to, a memory, a read / write (R / W) CD, an R / W DVD, and so on.
[0147] In some implementations, the signal carrying medium 600 may include a communication medium 603, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0148] The signal-bearing medium 600 can be transmitted by a wireless communication medium 603. One or more program instructions may be, for example, computer-executable instructions or logical implementation instructions.
[0149] In some examples, such as targeting Figure 4The configuration device for the described local data script can be configured to provide various operations, functions, or actions in response to one or more program instructions in a computer-readable medium 601, a computer-recordable medium 602, and / or a communication medium 603.
[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0152] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the constituent units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0153] Furthermore, the functional units in the various embodiments of this application 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.
[0154] 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 readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0155] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of configuring a local data script, the method comprising: The method comprises: receiving a first input operation, the first input operation being used for inputting target index information, the target index information being index information of a to-be-maintained script, the index information comprising an identifier of a target network device, the target network device being a network device corresponding to the to-be-maintained script; in response to the first input operation, acquiring a first script set, the first script set comprising: historical local data scripts corresponding to network devices; determining, according to the target index information, a third script set from the first script set, the third script set comprising: a plurality of fourth script sets, each of the fourth script sets comprising: a plurality of local data scripts corresponding to the target index information, and one of the fourth script sets corresponding to one operation instruction; the local data scripts in the fourth script sets are arranged in an order of generation time of the local data scripts; the local data scripts in one script set have the same configuration format and different values of index information corresponding thereto; for each of the fourth script sets, performing deduplication on the fourth script set to obtain a second local data script, and determining a second script set, the second local data script being one of the local data scripts in the fourth script set; the second script set comprising: the second local data script in each of the fourth script sets; receiving a second input operation, the second input operation being used for determining a first local data script; in response to the second input operation, determining the first local data script from the second script set; for each of the fourth script sets, acquiring a first sequence identifier, the first sequence identifier being a sequence identifier of a local data script with the latest generation time in the fourth script set, to obtain a plurality of first sequence identifiers; determining, according to the first local data script, a second sequence identifier from the plurality of first sequence identifiers, the second sequence identifier being a sequence identifier of a local data script with the latest generation time in the fourth script set corresponding to the first local data script; receiving a third input operation, the third input operation being used for inputting to-be-maintained information; generating the to-be-maintained script according to the to-be-maintained information, the first local data script, and the second sequence identifier, the sequence identifier of the to-be-maintained script being a sum of the second sequence identifier and a preset value.
2. The method of claim 1, wherein, The application is applied to an electronic device, and a preset local data script is stored in the electronic device, an influence degree of the preset local data script being greater than a preset degree threshold, the influence degree being a degree of influence of a running local data script on normal operation of the network device; The method further comprises: if the to-be-maintained script does not exist in the preset local data script, storing the to-be-maintained script; if the to-be-maintained script exists in the preset local data script, generating a prompt message, the prompt message being used for indicating whether to store the to-be-maintained script; in a case where a fourth input operation is received, storing the to-be-maintained script, the fourth input operation being used for triggering storage of the to-be-maintained script.
3. The method according to claim 1 or 2, characterized in that, The method comprises: acquiring the first script set from a northbound interface.
4. An apparatus for configuring a local data script, the apparatus comprising: The device comprises: The receiving unit is configured to receive a first input operation, the first input operation being used to input target index information, the target index information being index information of a to-be-maintained script, the index information comprising an identifier of a target network device, the target network device being a network device corresponding to the to-be-maintained script; The processing unit is configured to, in response to the first input operation, acquire a first script set, the first script set comprising historical local data scripts corresponding to network devices; The processing unit is further configured to determine, according to the target index information, a third script set from the first script set, the third script set comprising a plurality of fourth script sets, each fourth script set comprising a plurality of local data scripts corresponding to the target index information, and one fourth script set corresponding to one operation instruction; the local data scripts in each fourth script set are arranged in an order of generation time of the local data scripts; the local data scripts in each script set have the same configuration format and different values of index information; The processing unit is further configured to, for each fourth script set, perform deduplication on the fourth script set to obtain a second local data script, and determine a second script set, the second local data script being one local data script in the fourth script set; the second script set comprising the second local data script in each fourth script set; The receiving unit is further configured to receive a second input operation, the second input operation being used to determine a first local data script; The processing unit is further configured to, in response to the second input operation, determine the first local data script from the second script set; The processing unit is further configured to, for each fourth script set, acquire a first sequence identifier, the first sequence identifier being a sequence identifier of a local data script with the latest generation time in the fourth script set, to acquire a plurality of first sequence identifiers; The processing unit is further configured to determine, according to the first local data script, a second sequence identifier from the plurality of first sequence identifiers, the second sequence identifier being a sequence identifier of a local data script with the latest generation time in a fourth script set corresponding to the first local data script; The receiving unit is further configured to receive a third input operation, the third input operation being used to input to-be-maintained information; The processing unit is further configured to generate the to-be-maintained script according to the to-be-maintained information, the first local data script, and the second sequence identifier, the sequence identifier of the to-be-maintained script being a sum of the second sequence identifier and a preset value.
5. The apparatus of claim 4, wherein, The application is applied to an electronic device, and a preset local data script is stored in the electronic device, an influence degree of the preset local data script being greater than a preset degree threshold, the influence degree being a degree of influence of a running local data script on normal operation of the network device; The processing unit is further configured to, if the to-be-maintained script does not exist in the preset local data script, store the to-be-maintained script. The processing unit is further configured to generate a prompt message if the to-be-maintained script exists in the preset local data script, and the prompt message is used to indicate whether to store the to-be-maintained script. The processing unit is further configured to store the to-be-maintained script if a fourth input operation is received, and the fourth input operation is used to trigger storage of the to-be-maintained script.
6. The apparatus of claim 4 or 5, wherein, The processing unit is further configured to acquire the first script set from a northbound interface.
7. An apparatus for configuring a local data script, the apparatus comprising: a script generator configured to generate a script based on a user input; and a script interpreter configured to interpret the script and to configure a local data script based on the script. Comprising: a processor and a memory; The processor and the memory are coupled; The memory is configured to store one or more programs, the one or more programs comprising computer execution instructions, and when the local data script configuration apparatus runs, the processor executes the computer execution instructions stored in the memory, so that the local data script configuration apparatus executes the method in any one of claims 1-3.
8. A computer-readable storage medium having stored therein instructions, the computer-readable storage medium comprising: When the computer executes the instructions, the computer executes the method in any one of claims 1-3.
Citation Information
Patent Citations
Operation and maintenance script execution method and device, electronic equipment and storage medium
CN109871671A