Script checking method and device, storage medium and electronic equipment
Through the automated script verification method, the existing technology problems of low manual verification efficiency, high cost, and non-conformity of post-facto verification are solved. Fast and low-cost script verification is realized, data script verification is automatically completed, and efficiency and production are improved. System optimization.
Patent Information
- Application Number
- CN202311156891.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, manual verification of scripts is inefficient, time-consuming, and labor-intensive. Post-verification verification does not comply with the communications bureau's data management specifications, which may lead to business interruption and network failure, and requires the development of new automation methods and script comparison analysis tools. The development cycle is long, the cost is high, and the price/performance ratio is low.
Provide a script verification method that determines the business type by obtaining work order attachments and scripts, counts the number of device instructions, compares it with the number of work order script instructions, outputs the verification results, and conducts consistency checks based on the pre-established business classification instruction parameter library , use the device command log to verify the business, automatically complete the data script verification, and reduce manual participation.
It can quickly locate script instruction block anomalies, optimize the production system, reduce verification costs, automatically complete data script verification, save time, improve efficiency, and liberate labor.
Smart Images

Figure CN118796652A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data configuration management technology, and in particular to a script checking method, a script checking device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of communication and network technology, users' business needs are becoming more and more diversified, and the requirements for business activation time limits are becoming higher and higher. Existing technology can automatically generate scripts based on user needs, so the verification of scripts must also be implemented in place.
[0003] In the related technology, the automatically generated scripts can be checked by manual verification, post-verification, and verification through script comparison and analysis tools. However, manual verification is inefficient, time-consuming, and labor-intensive. Post-verification does not comply with the data management specifications of the Communications Bureau, which may lead to service interruption and network failure, and cannot find problems with the automatic production tool itself. Using script comparison and analysis tools requires the development of a new set of automated means and script comparison and analysis tools, which has a long development cycle, high costs, and low cost-performance. Summary of the invention
[0004] The purpose of the present disclosure is to provide a script verification method, a script verification device, an electronic device, and a computer-readable storage medium, thereby solving the problems of low efficiency, long time consumption, and high labor costs of manual verification in related technologies to a certain extent. Post-verification that does not comply with the data management specifications of the communications bureau may lead to service blocking and network failures, and cannot discover problems with the automatic production tool itself. Using a script comparison and analysis tool requires the development of a new set of automated means and script comparison and analysis tools, which has problems such as long development cycle, high cost, and low cost-performance.
[0005] According to the first aspect of the present disclosure, there is provided a script verification method, including: obtaining a work order attachment and a work order script of a business; determining a business type of the business based on the work order attachment; counting the number of instructions configured for each business on each device based on the business type, obtaining the number of device instructions for the business, and comparing the number of instructions in the work order script with the number of device instructions; and outputting a verification result.
[0006] In an exemplary embodiment of the present disclosure, after comparing the number of instructions in the work order script with the number of device instructions, the method further includes: if the comparison result is consistent, obtaining the target parameters in the work order script, and performing a consistency check on the target parameters based on a pre-established business classification instruction parameter library.
[0007] In an exemplary embodiment of the present disclosure, after the target parameters are checked for consistency based on a pre-established business classification instruction parameter library, the method further includes: if the consistency check passes, checking each of the businesses in the work order script based on the device instruction log of the device.
[0008] In an exemplary embodiment of the present disclosure, before determining the business type of the business based on the work order attachment, the method also includes: judging whether there is a conflict in the requirement parameters of each column in the work order attachment; if there is a conflict, listing the conflicting items and prompting that the corresponding business is an invalid business.
[0009] In an exemplary embodiment of the present disclosure, counting the number of instructions for configuring the business on each device based on the business type includes: establishing a business classification instruction structure library, wherein the business classification instruction structure library is a data script structure model for multiple businesses; traversing each of the businesses in the work order attachment, and for each of the businesses, querying the number of instructions that need to be configured for the business on each of the devices in the business classification instruction structure library according to the business type.
[0010] In an exemplary embodiment of the present disclosure, the method further includes: for a hierarchical instruction, establishing an instruction encapsulation element table based on the head and tail elements of the hierarchical instruction, and calibrating the number of device instructions based on the instruction encapsulation element table, wherein the hierarchical instruction is an instruction containing a path instruction, and the head and tail elements of the hierarchical instruction are additional content of the instruction head and tail.
[0011] In an exemplary embodiment of the present disclosure, the target parameters in the work order script are obtained, and the target parameters are checked for consistency based on a pre-established business classification instruction parameter library, including: for each of the businesses, reading the parameter value of the target parameter of the business in the business classification instruction parameter library; calculating the specific field parameters of the target parameter in the work order script, and checking the consistency of the specific field parameters with the corresponding parameters in the work order script.
[0012] In an exemplary embodiment of the present disclosure, the verification of each of the services in the work order script based on the device instruction log of the device includes: determining the device corresponding to each of the services in the work order script; obtaining the device instruction log of the device, and for the newly added service, confirming whether the service identifier of the service in the device instruction log has been used; for the deleted or modified service, reading the name of the existing network service in the device instruction log, and comparing and confirming it with the service name in the work order script.
[0013] According to a second aspect of the present disclosure, there is provided a script verification device, comprising: a data acquisition module, used to obtain a work order attachment and a work order script of a business; a business type determination module, used to determine the business type of the business based on the work order attachment; a script verification module, used to count the number of instructions configured for each business on each device based on the business type, obtain the number of device instructions for the business, and compare the number of instructions in the work order script with the number of device instructions; and an output module, used to output the verification result.
[0014] In an exemplary embodiment of the present disclosure, the script verification module is also used to: if the comparison results are consistent, obtain the target parameters in the work order script, and perform consistency check on the target parameters based on a pre-established business classification instruction parameter library.
[0015] In an exemplary embodiment of the present disclosure, the script verification module is further used to: if the consistency check passes, verify each of the services in the work order script based on the device instruction log of the device.
[0016] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned methods by executing the executable instructions.
[0017] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the methods described above is implemented.
[0018] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0019] In the script verification method provided in the example implementation mode of the present disclosure, the work order attachment and work order script of the business are obtained; the business type of the business is determined based on the work order attachment; the number of instructions configured on each device for each business is counted based on the business type to obtain the number of device instructions for the business, and the number of instructions in the work order script is compared with the number of device instructions; and the verification result is output. By verifying the number of instructions in the work order script, the present disclosure can quickly locate the abnormality of the instruction block in the work order script, and reversely promote the optimization of the production system, and the verification is low in cost and easy to implement. In addition, the implementation of data script verification in the present disclosure is automatically completed by the system without human participation, which greatly liberates labor, saves time, and improves efficiency.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0022] Figure 1 A schematic diagram of a script checking method according to an embodiment of the present disclosure is shown schematically;
[0023] Figure 2 A schematic diagram schematically shows a work order attachment example of a script checking method according to an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram schematically shows a business classification instruction structure library of a script verification method according to an embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram schematically shows a specific example of a work order script of a script checking method according to an embodiment of the present disclosure;
[0026] Figure 5 A block diagram of a script checking device according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0029] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0030] With the continuous development of communication and network technology, users' business needs are becoming more and more diversified, and the requirements for business activation time limits are becoming higher and higher. Existing technology can automatically generate scripts based on user needs, so the verification of scripts must also be implemented in place.
[0031] For example, in the field of Internet of Things, with the rapid development of Internet of Things services, the configuration tasks of Internet of Things DPI (Deep Packet Inspection) bureau data have exploded. Customer needs vary and require tight opening deadlines. Relevant technologies can realize the automatic generation of business scenario data scripts through automation. Since business bureau data directly affects network operation and customer perception, a one-person-production-one-verification mechanism is strictly adopted in the scope of bureau data management; there are many new types of Internet of Things services, and automation tools are frequently updated and adjusted. Script verification must be implemented in place to reversely detect hidden dangers of automation production tools. The Internet of Things business scripts involve many complex command parameters, and the accuracy verification of scripts with thousands of lines is a difficult point in bureau data work.
[0032] Related technologies can often use the following methods to verify scripts:
[0033] Method 1 is a manual verification method. This method searches for each key field of each business in the command script according to the business activation list and the data production specification guidelines, and checks each item to ensure the completeness and accuracy of the business script. The entire process is completed manually. However, a work order usually involves dozens of businesses, with thousands of script instructions, and each instruction has multiple parameters. The work efficiency is very low when searching one business at a time by the naked eye. Within the time limit of the work order, only the general situation can be checked, and accurate verification cannot be achieved.
[0034] Method 2 is the post-verification method. This method does not verify the script, but directly activates the automatically generated script on the network device, and then collects the latest log of the device. Based on the existing automated production logic, combined with the service activation attachment standard, the latest log is automatically verified to ensure that the service is normally activated in the existing network. However, this method does not meet the data management specifications of the Communications Bureau, and post-verification has little effect on new services and command errors, but for service modification and adjustment requirements, command errors will have a huge adverse impact, which may cause service blocking and network failures; in addition, the verification logic of this solution is still the original automatic production logic, and problems with the automatic production tool itself cannot be discovered.
[0035] Method 3: Develop another set of supporting means, automatically create a set of scripts, and then develop a set of script comparison and analysis tools to compare and check the two sets of scripts. This method requires the development of a new set of automation means and script comparison and analysis tools, which has a long development cycle, high cost, and low cost performance.
[0036] In order to solve the problems existing in the above methods, the embodiments of the present disclosure provide a script checking method, a script checking device, an electronic device and a computer-readable storage medium.
[0037] The following is a detailed description of the embodiments of the present disclosure:
[0038] This example implementation first provides a script verification method. Figure 1 As shown, the script verification method specifically includes the following steps:
[0039] Step S110: Obtain the work order attachments and work order scripts of the business;
[0040] Step S120: Determine the business type of the business according to the work order attachment;
[0041] Step S130: Count the number of instructions configured for each service on each device based on the service type, obtain the number of device instructions for the service, and compare the number of instructions in the work order script with the number of device instructions;
[0042] Step S140: Output the verification result.
[0043] The script verification method provided by the embodiment of the present disclosure can quickly locate the abnormal instruction block in the work order script by verifying the number of instructions in the work order script, and reversely promote the optimization of the production system, and the verification is low in cost and easy to implement. In addition, the implementation of data script verification in the present disclosure is automatically completed by the system without manual participation, which greatly liberates labor, saves time, and improves efficiency.
[0044] Next, in another embodiment, the above steps are described in more detail.
[0045] In step S110, the work order attachments and work order script of the business are obtained.
[0046] In the embodiment of the present disclosure, the work order attachment is an attachment consisting of the business required by the business demander and its related parameters. The work order attachment may include multiple different business requirements of different business demanders. For example, an example of the work order attachment may be as follows: Figure 2 As shown, the work order attachment instance includes parameter columns such as business code, bureau data document number, operation type, etc. of each business. The above work order script is a script automatically generated according to the business requirements in the above work order attachment, and the method provided in the embodiment of the present disclosure is used to verify the work order script.
[0047] In the disclosed embodiment, after obtaining the work order attachments and work order scripts of each business, a conflict check can also be performed on the parameter columns of each business in the work order attachments. Exemplarily, the process can be implemented as follows: determine whether there is a conflict in the required parameters of each column in the work order attachment; if there is a conflict, list the conflicting items and prompt that the corresponding business is an invalid business.
[0048] Taking the IoT DPI work order as an example, the above process can be specifically implemented as follows: calculate, analyze and verify the demand parameters of each business in the work order attachment, check whether there is a conflict in the demand parameters of each column, and if there is a conflict, prompt that the business demand is invalid, list the conflicting items, and trace the business demand department to confirm the correct demand. It should be noted that the above scenario is only an exemplary description, and the protection scope of the embodiments of the present disclosure is not limited to this.
[0049] In step S120, the business type of the business is determined according to the work order attachment.
[0050] In the disclosed embodiment, after obtaining the work order attachment and the work order script, the types of each business are determined according to the work order attachment. Exemplarily, the business is automatically identified according to the existence of each line of business parameters in the work order attachment to determine the type of each line of business.
[0051] Taking the above-mentioned IoT DPI work order as an example, a specific implementation method for judging whether there is a conflict and determining the service type can be as follows: for example, if both parameter 1 and parameter 2 of a certain service are available, and the other parameters are empty, it is determined to be service type 1; if both parameter 1 and parameter 3 are available, it is service type 2; if parameter 1 and parameter 2 are available, but parameter 3 is also available, it is determined to be a service conflict. For limited service parameters, each line of service can be adapted to a certain service type x. In specific use, for example, if the "layer 3 destination IP address" is empty, the "layer 4 destination port number" is empty, the "layer 7 URL" is not empty, the "whether to enable DNS SNIFFER" is no, and the "protocol number" is HTTP, then the line of service is determined to be a "pure layer 7 service of http protocol". It should be noted that the above scenario is only an exemplary description, and the protection scope of the embodiments of the present disclosure is not limited to this.
[0052] In step S130, the number of instructions configured for each service on each device is counted based on the service type to obtain the number of device instructions for the service, and the number of instructions in the work order script is compared with the number of device instructions.
[0053] In the embodiment of the present disclosure, the above-mentioned device is a device used to execute the various instructions in the above-mentioned work order script. After determining the service type, the embodiment of the present disclosure can quickly calculate and output the work order script instruction statistics through the service-device instruction table relationship, and verify the total amount and the number of instructions of each type to achieve the structural verification and the first-level verification of the service activation script, and locate the abnormal instruction block. Among them, the above-mentioned number of device instructions is the sum of the number of instructions of the script of a certain service on each device.
[0054] Exemplarily, the above-mentioned implementation of counting the number of instructions configured for each device based on business type can be as follows: establish a business classification instruction structure library, which is a data script structure model for multiple businesses; traverse the various businesses in the work order attachment, and for each business, query the business classification instruction structure library for the number of instructions that need to be configured on each device for the business based on the business type.
[0055] Preferably, for some instructions of some devices that have a hierarchical concept, they must enter a certain path to be configured. Such instructions themselves cannot be executed directly, and corresponding path instructions are required. For such hierarchical instructions, the embodiment of the present disclosure can also establish an instruction encapsulation element table based on the head and tail elements of the above-mentioned hierarchical instructions, and calibrate the number of the above-mentioned device instructions based on the instruction encapsulation element table, wherein the head and tail elements of the hierarchical instructions are additional content of the instruction head and tail.
[0056] Taking the above IoT DPI work order as an example, the process of counting the number of instructions can be implemented as follows: construct a business classification instruction structure library, which pre-sets a data script structure model for multiple businesses, and its internal hierarchical structure can be as follows: Figure 3 Through progressive query, the specific number of each service and each instruction on each device can be obtained.
[0057] like Figure 3 As shown, the tree diagram exemplarily marks the instruction situation of business type x under device type k. f(x,k,i) represents the number of related instruction entries that need to be configured for business type x in instruction table i of device type k. This value is a constant solidified according to the empirical specifications of bureau data configuration. For a business type x, the number of instructions that need to be configured is the sum of all the instruction numbers f(x,k,i). For a business work order, the business type that is adapted to each business can be traversed to calculate the instruction quantity of the business. At the same time, the instruction quantity at the device type level or the device instruction level can also be summarized according to the granularity of statistical verification. The device instruction level instruction statistics are ∑ x f(x,k,i), get the number of device instructions.
[0058] Preferably, some instructions of some devices have a hierarchical concept, that is, the above-mentioned hierarchical instructions. Such instructions cannot be executed directly, and must be configured by entering a certain path through the corresponding path instructions. In this specific embodiment, the additional content at the head and tail of the instruction is named as the instruction head and tail elements. The default instruction has no head and tail elements. For instructions with head and tail, a special instruction encapsulation element table is established to calibrate the total instruction amount. Among them, the above-mentioned instruction encapsulation element table can be shown in the following Table 1:
[0059]
[0060]
[0061] In this specific embodiment, when multiple services are activated at the same time, a combined summary script will be generated, and the instructions will be summarized at the device type level. For example, for the device type 1 instruction 1 in Table 1 above, as long as it appears more than once, the instruction packaging calibration will be performed once. Through this process, the number of the above device instructions can be calibrated.
[0062] After obtaining the above-mentioned number of device instructions, the number of instructions in the work order script can be compared with the above-mentioned number of device instructions to output the verification result. That is, after receiving the business work order attachment, the embodiment of the present disclosure can quickly calculate the number of lines of each type of instruction through the above process, and check and count the work order script accordingly, that is, to achieve the accuracy check of the script instruction structure.
[0063] In step S140, the verification result is output.
[0064] In this step, the embodiment of the present disclosure outputs the verification result obtained through the above process. If the comparison results are consistent, it proves that the above automatically generated work order script is correct.
[0065] In a specific embodiment of the present disclosure, Figure 4 Taking the specific example of the work order script shown in Figure 4 as an example, a work order contains 30 business requirements, and the requirement types are divided into 8 categories. The f(x, k, i) output confirmation script should have the number of instructions. Combined with the head and tail element characteristics in the instruction structure library, the statistical summary value is calibrated. The calibration result is used to check the existing script to ensure the overall accuracy of the script structure.
[0066] In another embodiment of the present disclosure, when the number of instructions in the work order script is consistent with the number of device instructions, preferably, in addition to the structure-level verification, the present disclosure can further provide business parameter-level and device parameter-level verification for user demanders to choose based on quality requirements and investment conditions.
[0067] Exemplarily, the above-mentioned business parameter-level verification process can be implemented as follows: when the number of instructions in the work order script is consistent with the number of device instructions, the target parameters in the work order script are obtained, and the target parameters are checked for consistency based on a pre-established business classification instruction parameter library.
[0068] Among them, the above-mentioned consistency check process for the target parameters can be implemented as follows: for each business, read the parameter value of the target parameter of the business in the business classification instruction parameter library; calculate the specific field parameters of the target parameter in the work order script, and check the consistency of the specific field parameters with the corresponding parameters in the work order script.
[0069] Specifically, taking the above-mentioned IoT DPI work order as an example, the above process can be implemented as follows: construct a business classification instruction parameter library, the content of which includes the calculation and inspection method of the key business parameters of the instruction, and the key business parameters are derived from the work order script. The key parameter calculation result is a specific parameter string. This specific embodiment is driven by each business in the IoT DPI work order library, reads the parameter value of the business, and transforms and calculates it into a specific field parameter in the instruction, so as to perform a consistency check with the parameter in the instruction script to realize parameter accuracy verification.
[0070] Furthermore, after the target parameters are consistency checked based on a pre-established business classification instruction parameter library, exemplarily, the embodiment of the present disclosure can also implement the above-mentioned device parameter level verification through the following process: if the consistency check passes, each of the above-mentioned businesses in the work order script is checked based on the device instruction log of the device.
[0071] Among them, the above-mentioned verification process can be specifically implemented as follows: determine the equipment corresponding to each service in the work order script; obtain the device command log of the equipment, and for newly added services, confirm whether the service identifier of the service has been used in the device command log; for deleted or modified services, read the name of the existing network service in the device command log, and compare and confirm it with the service name in the work order script.
[0072] Taking the IoT DPI work order as an example, the process of checking the services in the work order script based on the device instruction log of the device can be implemented as follows: For all script instructions, if the index ID of the device instruction table itself is involved, the addition, deletion and modification attributes of the instruction need to be analyzed. After that, read the instruction log library table of the device, and for the newly added type, check to confirm that there is no such ID in the log. For the deletion and modification types, read the key name of the existing network service in the log and compare it with the service name in the script for confirmation.
[0073] The disclosed embodiment logically divides the data script into three levels. The first level is the script instruction structure. The number of configuration instructions required for a business is the f(x, k, i) value in the above table. The second level is the key parameters of the instruction. These parameters are related to the business characteristics and are derived from the work order attachment standard. They are unrelated to the existing network logs. After being calculated according to the algorithm, they are compared and checked with the specific parameters in the instruction. The third level is the internal index ID of the device instruction table. This item needs to be verified in combination with the instruction characteristics and the existing network logs.
[0074] The disclosed embodiment realizes verification by logically dividing the data script into three levels, which has the following advantages: (1) Improved work efficiency: Data script verification is completed automatically without human intervention, which greatly liberates labor; (2) Rapidly locates and discovers system risks: The first-level structural level verification is low-cost and easy to implement, and can quickly locate abnormalities in instruction blocks in automatic script production, which in turn promotes the optimization of the production system; (3) The deployment of hierarchical verification modules is highly flexible: Levels one, two, and three are relatively independent and can be deployed differently according to investment conditions and quality requirements; (4) Improved accuracy: Level one structural verification can verify and discover most abnormalities, and level three verification is a high-precision complete level verification, which realizes the verification of local data scripts in all directions and accurately guarantees the accuracy of scripts.
[0075] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0076] Correspondingly, in this example implementation, a script checking device is also provided, referring to Figure 5 As shown, the script checking device 500 may include a data acquisition module 510, a business type determination module 520, a script checking module 530 and an output module 540, wherein:
[0077] The data acquisition module 510 can be used to obtain the work order attachments and work order scripts of the business;
[0078] A business type determination module 520 may be used to determine the business type of a business based on the work order attachment;
[0079] The script checking module 530 may be used to count the number of instructions configured for each service on each device based on the service type, obtain the number of device instructions for the service, and compare the number of instructions in the work order script with the number of device instructions;
[0080] The output module 540 may be used to output the verification result.
[0081] In an exemplary embodiment of the present disclosure, the script verification module is also used to: if the comparison results are consistent, obtain the target parameters in the work order script, and perform consistency check on the target parameters based on the pre-established business classification instruction parameter library. Specifically, the above process of consistency check on the target parameters can be implemented by the following method: for each business, read the parameter value of the target parameter of the business in the business classification instruction parameter library; calculate the specific field parameters of the target parameter in the work order script, and perform consistency check on the specific field parameters and the corresponding parameters in the work order script.
[0082] In an exemplary embodiment of the present disclosure, the script verification module is also used to: if the consistency check passes, verify each service in the work order script based on the device instruction log of the device. Specifically, the process of verifying each service in the work order script based on the device instruction log can be implemented by the following method: determine the device corresponding to each service in the work order script; obtain the device instruction log of the device, and for newly added services, confirm whether the service identifier of the service has been used in the device instruction log; for deleted or modified services, read the name of the existing network service in the device instruction log, and compare and confirm it with the service name in the work order script.
[0083] In an exemplary embodiment of the present disclosure, the above-mentioned script verification module specifically implements the above-mentioned statistics on the number of instructions configured for each business on each device based on the business type through the following method: establishing a business classification instruction structure library, the above-mentioned business classification instruction structure library is a data script structure model for multiple businesses; traversing each business in the work order attachment, and for each business, querying the number of instructions that need to be configured for the business on each device in the business classification instruction structure library according to the business type.
[0084] Among them, for hierarchical instructions, the embodiment of the present disclosure establishes an instruction encapsulation element table based on the head and tail elements of the hierarchical instructions, and calibrates the number of device instructions based on the instruction encapsulation element table, wherein the above-mentioned hierarchical instructions are instructions containing path instructions, and the head and tail elements of the hierarchical instructions are additional content of the instruction head and tail.
[0085] In addition, the specific implementation details of the above-mentioned script verification device have been described in detail in the corresponding position of the script verification method, so they will not be repeated here.
[0086] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0087] Figure 6 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 6 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the script verification method of the embodiment described in the present disclosure. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0089] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the script verification method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0091] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0095] Get the work order attachments and work order scripts of the business;
[0096] Determine the business type of the business based on the work order attachments;
[0097] Count the number of instructions configured on each device for each service based on the service type, obtain the number of device instructions for the service, and compare the number of instructions in the work order script with the number of device instructions;
[0098] Output the verification results.
[0099] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0100] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0103] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0104] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0105] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0106] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0107] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A script verification method, characterized in that: include: Get the work order attachments and work order scripts of the business; Determine the business type of the business according to the work order attachment; Counting the number of instructions configured on each device for each service based on the service type to obtain the number of device instructions for the service, and comparing the number of instructions in the work order script with the number of device instructions; Output the verification results.
2. The script verification method according to claim 1, characterized in that: After comparing the number of instructions in the work order script with the number of device instructions, the method further includes: If the comparison result is consistent, the target parameters in the work order script are obtained, and the consistency of the target parameters is checked based on a pre-established business classification instruction parameter library.
3. The script verification method according to claim 2, characterized in that: After the consistency check of the target parameter is performed based on the pre-established service classification instruction parameter library, the method further includes: If the consistency check passes, each of the services in the work order script is checked based on the device instruction log of the device.
4. The script verification method according to any one of claims 1 to 3, characterized in that: Before determining the business type of the business according to the work order attachment, the method further includes: Determine whether there is a conflict between the requirement parameters in each column of the work order attachment; If there is a conflict, the conflicting items are listed and a prompt is given that the corresponding business is an invalid business.
5. The script verification method according to claim 2, characterized in that: The counting of the number of instructions configured for the service on each device based on the service type includes: Establishing a service classification instruction structure library, wherein the service classification instruction structure library is a data script structure model of multiple services; The various services in the work order attachment are traversed, and for each of the services, the number of instructions required to be configured for the service on each of the devices is queried in the service classification instruction structure library according to the service type.
6. The script verification method according to claim 5, characterized in that: The method further comprises: For hierarchical instructions, an instruction encapsulation element table is established based on the head and tail elements of the hierarchical instructions, and the number of device instructions is calibrated based on the instruction encapsulation element table, wherein the hierarchical instructions are instructions containing path instructions, and the head and tail elements of the hierarchical instructions are additional content of the instruction head and tail.
7. The script verification method according to claim 2, characterized in that: The obtaining of the target parameters in the work order script and performing consistency check on the target parameters based on a pre-established business classification instruction parameter library includes: For each of the services, reading the parameter value of the target parameter of the service from the service classification instruction parameter library; Specific field parameters of the target parameter in the work order script are obtained by calculation, and the specific field parameters are checked for consistency with corresponding parameters in the work order script.
8. The script verification method according to claim 3, characterized in that: The checking each of the services in the work order script based on the device instruction log of the device includes: Determine the device corresponding to each of the services in the work order script; Obtain a device command log of the device, and for the newly added service, confirm whether the service identifier of the service has been used in the device command log; For the deleted or modified service, the name of the existing network service in the device instruction log is read and compared with the service name in the work order script for confirmation.
9. A script checking device, characterized in that: include: Data acquisition module, used to obtain business work order attachments and work order scripts; A business type determination module, used to determine the business type of the business according to the work order attachment; A script checking module, used to count the number of instructions configured for each service on each device based on the service type, obtain the number of device instructions for the service, and compare the number of instructions in the work order script with the number of device instructions; Output module, used to output verification results.
10. The script checking method according to claim 9, characterized in that: The script verification module is also used to: If the comparison result is consistent, the target parameters in the work order script are obtained, and the consistency of the target parameters is checked based on a pre-established business classification instruction parameter library.
11. The script checking device according to claim 10, characterized in that: The script verification module is also used to: If the consistency check passes, each of the services in the work order script is checked based on the device instruction log of the device.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
13. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.
Citation Information
Cited By
Industrial internet abnormal permission behavior detection method and system
CN121356838A
