CN115529228B - Fault positioning method, device and medium based on browser end - Google Patents

Fault positioning method, device and medium based on browser end Download PDF

Info

Publication number
CN115529228B
CN115529228B CN202211148182.8A CN202211148182A CN115529228B CN 115529228 B CN115529228 B CN 115529228B CN 202211148182 A CN202211148182 A CN 202211148182A CN 115529228 B CN115529228 B CN 115529228B
Authority
CN
China
Prior art keywords
configuration file
designated
preset
value
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211148182.8A
Other languages
Chinese (zh)
Other versions
CN115529228A (en
Inventor
朱敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking Technology Co Ltd
Filing date
Publication date
Application filed by Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202211148182.8A priority Critical patent/CN115529228B/en
Publication of CN115529228A publication Critical patent/CN115529228A/en
Application granted granted Critical
Publication of CN115529228B publication Critical patent/CN115529228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the specification discloses a fault positioning method, equipment and medium based on a browser end, and relates to the technical field of communication, wherein the method comprises the following steps: a network request is sent, a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, and the network request is used for requesting switch configuration file data; when a network fault occurs, determining a faulty switch device, and determining historical configuration files of a plurality of moments corresponding to the faulty switch device in the configuration files by using the faulty switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at a plurality of times, wherein the designated time is positioned after the preset time; and a preset file comparison mode is used at the browser end, and the designated configuration files and the preset configuration files are subjected to file comparison to generate comparison results, so that the fault position is determined according to the comparison results, all the configuration files are not required to be downloaded, and the problems of file comparison results and positioning can be directly checked by the browser.

Description

Fault positioning method, device and medium based on browser end
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a fault locating method, device, and medium based on a browser.
Background
In the process of setting up intelligent network equipment management, a plurality of switches are configured, and various configurations are issued to the switches. When a configuration is issued to a switch, the incorrect configuration may cause the switch network to be unavailable.
When network faults such as network failure occur in the switch network, configuration files in different time periods need to be checked and compared, the reasons of the problems are checked, the faults are positioned and then repaired until the network is restored. In the prior art, when fault location is performed through configuration files, the configuration files are downloaded to the local one by one, and an external file comparison tool is used for comparing the configuration files. In the process, the number of configuration files is large, so that the downloading time and downloading speed cannot be ensured, and the fault position cannot be found in time depending on an external file comparison tool, thereby reducing the operation and maintenance efficiency.
Disclosure of Invention
One or more embodiments of the present disclosure provide a fault locating method, device and medium based on a browser, which are used for solving the following technical problems: because the number of configuration files is large, the downloading time and the downloading speed cannot be guaranteed, and the fault position cannot be found in time depending on an external file comparison tool, so that the operation and maintenance efficiency is reduced.
One or more embodiments of the present disclosure adopt the following technical solutions:
One or more embodiments of the present disclosure provide a fault locating method based on a browser, where the method includes: a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data; when a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time; and carrying out file comparison on the designated configuration file and the preset configuration file by using a preset file comparison mode at the browser end to generate a comparison result so as to determine a fault position according to the comparison result.
Further, before sending the network request, the method further comprises: according to actual service requirements, configuration information is issued to a plurality of exchanger devices in advance; generating a configuration file of each switch device based on the configuration information; and carrying out backup operation on the configuration file according to a preset backup time period.
Further, in the plurality of configuration files, determining a history configuration file of a plurality of moments corresponding to the faulty switch device specifically includes: determining a device identifier of the failed switch device; and screening the configuration files based on the equipment identification to determine historical configuration files of the fault switch equipment at a plurality of moments.
Further, selecting a specified configuration file at a specified time and a preset configuration file at a preset time from the historical configuration files at the multiple times, wherein the specific configuration file comprises: sorting the plurality of history configuration files according to the configuration time to obtain a sorting result of the plurality of history configuration files, wherein in the sorting result, a history configuration file with earlier configuration time is positioned behind a history configuration file with later configuration time; taking the configuration file positioned at the first position of the sequencing result as a designated configuration file; acquiring a plurality of other configuration files except the designated configuration file from the plurality of history configuration files; and taking any one configuration file in the plurality of other configuration files as a preset configuration file.
Further, a preset file comparison mode is used at the browser end to compare the designated configuration file with the preset configuration file, and a comparison result is generated, which specifically includes: acquiring a designated numerical value at a designated position of the designated configuration file, and taking the designated numerical value as a new value; acquiring a preset numerical value at the specified position in the preset configuration file as an old value according to the position information of the specified position in the specified configuration file; judging whether the new value is consistent with the old value; and if the new value is different from the old value, respectively displaying the new value and the old value in the designated configuration file and the preset configuration file to generate a comparison result.
Further, the new value and the old value are respectively displayed in the designated configuration file and the preset configuration file, which specifically includes: when the new value is a non-zero value and the old value is empty, judging that the new value in the appointed configuration file is a new added value; when the old value is a non-zero value and the new value is null, judging that the old value in the preset configuration file is a deleted value; setting a new adding mark for the new adding value and setting a deleting mark for the deleting value; and displaying the new value and the old value in the designated configuration file and the preset configuration file respectively according to the new mark and the deletion mark.
Further, determining the fault location according to the comparison result specifically includes: when a specified new value is inconsistent with a specified old value, acquiring specified position information of a specified position corresponding to the specified new value and the specified old value; and taking the designated position information as a fault position.
Further, the marking parameters of the new mark and the deleting mark are different, wherein the marking parameters comprise any one of marking color, marking shape and marking transparency.
One or more embodiments of the present specification provide a fault locating device based on a browser side, including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to:
A network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data; when a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time; and carrying out file comparison on the designated configuration file and the preset configuration file by using a preset file comparison mode at the browser end to generate a comparison result so as to determine a fault position according to the comparison result.
One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer-executable instructions configured to: a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data; when a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time; and carrying out file comparison on the designated configuration file and the preset configuration file by using a preset file comparison mode at the browser end to generate a comparison result so as to determine a fault position according to the comparison result.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect: by the technical scheme, the latest configuration files are compared with other historical configuration files by displaying the configuration files in different time periods, all the configuration files are not required to be downloaded, and a browser can directly check file comparison results; the content of increase and decrease can be clearly checked, and the problem can be conveniently positioned; in addition, the browser end can directly conduct file comparison, dependency on external file comparison tools is avoided, and operation and maintenance efficiency of operation and maintenance personnel is improved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
Fig. 1 is a schematic flow chart of a fault locating method based on a browser end according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a configuration file according to an embodiment of the present disclosure;
Fig. 3 is a schematic view of a display effect provided in the embodiment of the present disclosure;
FIG. 4 is a diagram illustrating parameters provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a fault locating device based on a browser side according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present disclosure.
In the process of setting up intelligent network equipment management, a plurality of switches are configured, and various configurations are issued to the switches. When a configuration is issued to a switch, the incorrect configuration may cause the switch network to be unavailable.
When network faults such as network failure occur in the switch network, configuration files in different time periods need to be checked and compared, the reasons of the problems are checked, the faults are positioned and then repaired until the network is restored. In the prior art, when fault location is performed through configuration files, the configuration files are downloaded to the local one by one, and an external file comparison tool is used for comparing the configuration files. In the process, the number of configuration files is large, so that the downloading time and downloading speed cannot be ensured, and the fault position cannot be found in time depending on an external file comparison tool, thereby reducing the operation and maintenance efficiency.
The embodiment of the present disclosure provides a fault locating method based on a browser, and it should be noted that an execution body in the embodiment of the present disclosure may be a server, or any device having a data processing capability. Fig. 1 is a schematic flow chart of a fault locating method based on a browser end according to an embodiment of the present disclosure, as shown in fig. 1, mainly including the following steps:
step S101, a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are acquired based on the network request.
Wherein the network request is for requesting switch profile data;
Before sending the network request, the method further comprises: according to actual service requirements, configuration information is issued to a plurality of exchanger devices in advance; generating a configuration file of each switch device based on the configuration information; and carrying out backup operation on the configuration file according to a preset backup time period.
In one embodiment of the present disclosure, when a network environment is set up, various configurations, such as VLAN configuration, ACL configuration, BPDU configuration, etc., are issued to the switch, and during the configuration, log storage is performed on an operation command to generate a configuration file. And backing up the configuration file once every backup time period according to the preset backup time period. The backup time period may be a unit of day, backup once a day, fig. 2 is a schematic diagram of a configuration file provided in the embodiment of the present disclosure, and the generated configuration file is shown in fig. 2.
In one embodiment of the present disclosure, a network request is sent to a switch device, where the network request is used to request to display configuration file data of a switch, and in a case where the switch request passes, a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, and the plurality of configuration files are displayed at a browser end.
Step S102, when a network fault occurs, determining a faulty switch device, so as to determine a historical configuration file corresponding to the faulty switch device at a plurality of moments in a plurality of historical configuration files according to the faulty switch device.
In one embodiment of the present disclosure, after an operation command is performed on the switch, new configuration information is generated, and a network failure or the like may occur due to the incorrect configuration information. When a network failure occurs in a switch device, a failed switch that has failed needs to be determined among a plurality of switch devices. According to the fault switch, a historical configuration file corresponding to the fault switch equipment at a plurality of moments is determined in a plurality of configuration files corresponding to the switches, and the historical moment comprises a year date and a time point.
Among the plurality of history configuration files, determining a history configuration file of a plurality of moments corresponding to the faulty switch equipment specifically includes: determining a device identification of the failed switch device; and screening the configuration files based on the equipment identification to determine historical configuration files of a plurality of moments corresponding to the faulty switch equipment.
In one embodiment of the present disclosure, an equipment identifier may be preset for each switch device, and according to the equipment identifier of the failed switch, a plurality of configuration files may be screened to obtain a history configuration file corresponding to the failed switch device at a plurality of moments.
Step S103, selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the history configuration files at a plurality of times.
Wherein the specified time is located after the preset time.
Selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at a plurality of times, wherein the method specifically comprises the following steps of: sorting the plurality of history configuration files according to the configuration time to obtain a sorting result of the plurality of history configuration files, wherein in the sorting result, a history configuration file with earlier configuration time is positioned behind a history configuration file with later configuration time; taking the configuration file positioned at the first position of the sequencing result as a designated configuration file; acquiring a plurality of other configuration files except the designated configuration file from the plurality of history configuration files; and taking any one configuration file of the plurality of other configuration files as a preset configuration file.
In one embodiment of the present disclosure, the plurality of history profiles are ranked according to the configuration time, and a ranking result of the plurality of history profiles is obtained. That is, it is assumed that there are a history profile a, a history profile B, and a history profile C, wherein the configuration time of the history profile a is 5 months 1 day, the configuration time of the history profile B is 5 months 2 days, and the configuration time of the history profile C is 5 months 3 days, and the history profile a, the history profile B, and the history profile C are ordered according to the configuration time, resulting in an order of the history profile C, the history profile B, and the history profile a, in which the configuration time of the history profile C is later, that is, the history profile C is the most recently configured profile. The configuration file positioned at the first position of the sorting result, namely the configuration file of the latest configuration, is used as the designated configuration file. Any one of a plurality of other configuration files is taken as a preset configuration file in the other configuration files except the designated configuration file. That is, the most current configuration file is selected, compared to the previous configuration file, the changed configuration is compared to locate the problem, and the network is restored.
Step S104, a preset file comparison mode is used at the browser end, file comparison is conducted on the designated configuration file and the preset configuration file, a comparison result is generated, and the fault position is determined according to the comparison result.
Using a preset file comparison mode at the browser end to compare the designated configuration file with the preset configuration file, and generating a comparison result, wherein the method specifically comprises the following steps: acquiring a designated numerical value at a designated position of the designated configuration file, and taking the designated numerical value as a new value; acquiring a preset numerical value at the designated position in the preset configuration file as an old value according to the position information of the designated position in the designated configuration file; judging whether the new value is consistent with the old value; if the new value is different from the old value, the new value and the old value are respectively displayed in the designated configuration file and the preset configuration file so as to generate a comparison result.
In one embodiment of the present description, a specified value at a specified location of a specified profile is obtained, and the specified value is taken as a new value. The specified location here may be a rank of the configuration file. And acquiring a preset numerical value at the designated position of the same position information in the preset configuration file as an old value according to the position information of the designated position in the designated configuration file. That is, the new value refers to the latest changed numerical value in the latest configuration file, the old value refers to the historical configuration data in the historical configuration file, and whether the new value is consistent with the old value is judged; if the new value is different from the old value, the description is modified, and the new value and the old value are respectively displayed in the designated configuration file and the preset configuration file to generate a comparison result.
The new value and the old value are respectively displayed in the appointed configuration file and the preset configuration file, and the method specifically comprises the following steps: when the new value is a non-zero value and the old value is empty, determining that the new value in the designated configuration file is a new added value; when the old value is a non-zero value and the new value is null, determining that the old value in the preset configuration file is a deleted value; setting a new adding mark for the new adding value, and setting a deleting mark for the deleting value; and displaying the new value and the old value in the designated configuration file and the preset configuration file respectively according to the new mark and the deletion mark.
In one embodiment of the present description, when the new value is a non-zero value and the old value is null, it is indicated that the new value is a newly added value, and when the old value is a non-zero value and the new value is null, it is indicated that the old value is deleted in the newly configured configuration file, and the old value is a deleted value. The new increment flag is set for the new increment value, and the deletion flag is set for the deletion value. According to the new mark and the delete mark, the new value and the old value are displayed in the designated configuration file and the preset configuration file respectively, and fig. 3 is a schematic diagram of a display effect provided in the embodiment of the present specification. In order to distinguish the new mark from the deletion mark, the mark parameters of the new mark and the deletion mark are different, wherein the mark parameters include any one of a mark color, a mark shape and a mark transparency.
In one embodiment of the present description, a Vue. Js plug-in may be used for processing contrast logic, using CSS setup style. The alignment file is generated using vue-code-diff, vue-code-diff is a vue.js-based plug-in, and the alignment result is generated by passing in the following 4 parameters, oldFileStr, newFileStr, context, outputFormat. Fig. 4 is a diagram illustrating parameters provided in the embodiment of the present disclosure, and a parameter description of 4 parameters is shown in fig. 4.
In one embodiment of the present description, the new mark may be a green background mark and the delete mark may be a red background mark.
According to the comparison result, determining the fault position specifically comprises the following steps: when the specified new value is inconsistent with the specified old value, acquiring the specified position information of the specified position corresponding to the specified new value and the specified old value; the specified position information is used as a fault position.
In one embodiment of the present specification, when there is a mismatch between a specified new value and a specified old value, specified position information of a specified position corresponding to the specified new value and the specified old value is acquired; and positioning the problem by taking the appointed position information as a fault position so as to realize the normal operation of the network through follow-up measures.
By the technical scheme, the latest configuration files are compared with other historical configuration files by displaying the configuration files in different time periods, all the configuration files are not required to be downloaded, and a browser can directly check file comparison results; the content of increase and decrease can be clearly checked, and the problem can be conveniently positioned; in addition, the browser end can directly conduct file comparison, dependency on external file comparison tools is avoided, and operation and maintenance efficiency of operation and maintenance personnel is improved.
The embodiment of the present disclosure further provides a fault locating device based on a browser, as shown in fig. 5, where the device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to:
A network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data; when a network fault occurs, determining a faulty switch device, so as to determine historical configuration files of a plurality of moments corresponding to the faulty switch device in the plurality of configuration files according to the faulty switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at a plurality of times, wherein the designated time is positioned after the preset time; and carrying out file comparison on the designated configuration file and the preset configuration file by using a preset file comparison mode at the browser end to generate a comparison result so as to determine the fault position according to the comparison result.
The present specification embodiments also provide a non-volatile computer storage medium storing computer-executable instructions configured to:
A network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data; when a network fault occurs, determining a faulty switch device, so as to determine historical configuration files of a plurality of moments corresponding to the faulty switch device in the plurality of configuration files according to the faulty switch device; selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at a plurality of times, wherein the designated time is positioned after the preset time; and carrying out file comparison on the designated configuration file and the preset configuration file by using a preset file comparison mode at the browser end to generate a comparison result so as to determine the fault position according to the comparison result.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The devices and media provided in the embodiments of the present disclosure are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not repeated here.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (8)

1. The fault positioning method based on the browser end is characterized by comprising the following steps:
a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data;
When a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device;
Selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time;
a preset file comparison mode is used at a browser end, the designated configuration file and the preset configuration file are subjected to file comparison, a comparison result is generated, and the fault position is determined according to the comparison result;
Using a preset file comparison mode at a browser end to compare the specified configuration file with the preset configuration file to generate a comparison result, wherein the method specifically comprises the following steps:
acquiring a designated numerical value at a designated position of the designated configuration file, and taking the designated numerical value as a new value;
acquiring a preset numerical value at the specified position in the preset configuration file as an old value according to the position information of the specified position in the specified configuration file;
Judging whether the new value is consistent with the old value;
If the new value is different from the old value, displaying the new value and the old value in the designated configuration file and the preset configuration file respectively to generate a comparison result;
according to the comparison result, determining the fault position specifically comprises:
When a specified new value is inconsistent with a specified old value, acquiring specified position information of a specified position corresponding to the specified new value and the specified old value;
and taking the designated position information as a fault position.
2. The browser-side fault location method of claim 1, wherein prior to sending the network request, the method further comprises:
According to actual service requirements, configuration information is issued to a plurality of exchanger devices in advance;
Generating a configuration file of each switch device based on the configuration information;
and carrying out backup operation on the configuration file according to a preset backup time period.
3. The method for locating a fault based on a browser side according to claim 1, wherein determining, from among the plurality of configuration files, a history configuration file of a plurality of moments corresponding to the faulty switch device specifically includes:
Determining a device identifier of the failed switch device;
And screening the configuration files based on the equipment identification to determine historical configuration files of the fault switch equipment at a plurality of moments.
4. The fault locating method based on the browser side according to claim 1, wherein, in the history configuration files of the plurality of moments, a designated configuration file of a designated moment and a preset configuration file of a preset moment are selected, and specifically comprising:
sorting the plurality of history configuration files according to the configuration time to obtain a sorting result of the plurality of history configuration files, wherein in the sorting result, a history configuration file with earlier configuration time is positioned behind a history configuration file with later configuration time;
taking the configuration file positioned at the first position of the sequencing result as a designated configuration file;
Acquiring a plurality of other configuration files except the designated configuration file from the plurality of history configuration files;
and taking any one configuration file in the plurality of other configuration files as a preset configuration file.
5. The fault locating method based on the browser side according to claim 1, wherein the new value and the old value are respectively displayed in the designated configuration file and the preset configuration file, specifically comprising:
when the new value is a non-zero value and the old value is empty, judging that the new value in the appointed configuration file is a new added value;
when the old value is a non-zero value and the new value is null, judging that the old value in the preset configuration file is a deleted value;
Setting a new adding mark for the new adding value and setting a deleting mark for the deleting value;
And displaying the new value and the old value in the designated configuration file and the preset configuration file respectively according to the new mark and the deletion mark.
6. The fault locating method based on the browser side according to claim 5, wherein the marking parameters of the new mark and the deleting mark are different, wherein the marking parameters include any one of marking color, marking shape and marking transparency.
7. A browser-side based fault locating device, the device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to:
a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data;
When a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device;
Selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time;
a preset file comparison mode is used at a browser end, the designated configuration file and the preset configuration file are subjected to file comparison, a comparison result is generated, and the fault position is determined according to the comparison result;
Using a preset file comparison mode at a browser end to compare the specified configuration file with the preset configuration file to generate a comparison result, wherein the method specifically comprises the following steps:
acquiring a designated numerical value at a designated position of the designated configuration file, and taking the designated numerical value as a new value;
acquiring a preset numerical value at the specified position in the preset configuration file as an old value according to the position information of the specified position in the specified configuration file;
Judging whether the new value is consistent with the old value;
If the new value is different from the old value, displaying the new value and the old value in the designated configuration file and the preset configuration file respectively to generate a comparison result;
according to the comparison result, determining the fault position specifically comprises:
When a specified new value is inconsistent with a specified old value, acquiring specified position information of a specified position corresponding to the specified new value and the specified old value;
and taking the designated position information as a fault position.
8. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
a network request is sent, and a plurality of configuration files corresponding to a plurality of switches are obtained based on the network request, wherein the network request is used for requesting switch configuration file data;
When a network fault occurs, determining a fault switch device, so as to determine historical configuration files of a plurality of moments corresponding to the fault switch device in the plurality of configuration files according to the fault switch device;
Selecting a designated configuration file at a designated time and a preset configuration file at a preset time from the historical configuration files at the plurality of times, wherein the designated time is positioned after the preset time;
a preset file comparison mode is used at a browser end, the designated configuration file and the preset configuration file are subjected to file comparison, a comparison result is generated, and the fault position is determined according to the comparison result;
Using a preset file comparison mode at a browser end to compare the specified configuration file with the preset configuration file to generate a comparison result, wherein the method specifically comprises the following steps:
acquiring a designated numerical value at a designated position of the designated configuration file, and taking the designated numerical value as a new value;
acquiring a preset numerical value at the specified position in the preset configuration file as an old value according to the position information of the specified position in the specified configuration file;
Judging whether the new value is consistent with the old value;
If the new value is different from the old value, displaying the new value and the old value in the designated configuration file and the preset configuration file respectively to generate a comparison result;
according to the comparison result, determining the fault position specifically comprises:
When a specified new value is inconsistent with a specified old value, acquiring specified position information of a specified position corresponding to the specified new value and the specified old value;
and taking the designated position information as a fault position.
CN202211148182.8A 2022-09-20 Fault positioning method, device and medium based on browser end Active CN115529228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211148182.8A CN115529228B (en) 2022-09-20 Fault positioning method, device and medium based on browser end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211148182.8A CN115529228B (en) 2022-09-20 Fault positioning method, device and medium based on browser end

Publications (2)

Publication Number Publication Date
CN115529228A CN115529228A (en) 2022-12-27
CN115529228B true CN115529228B (en) 2024-06-25

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104547A (en) * 2014-07-24 2014-10-15 华为技术有限公司 Management method for network equipment configuration files, and network controller
CN107707375A (en) * 2017-05-26 2018-02-16 贵州白山云科技有限公司 A kind of method and apparatus for positioning parsing failure

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104547A (en) * 2014-07-24 2014-10-15 华为技术有限公司 Management method for network equipment configuration files, and network controller
CN107707375A (en) * 2017-05-26 2018-02-16 贵州白山云科技有限公司 A kind of method and apparatus for positioning parsing failure

Similar Documents

Publication Publication Date Title
CN110389998A (en) Build the quick composing exes of project, system and computer readable storage medium in pricing
CN106325826A (en) Configuration file detection method and apparatus
CN113807821A (en) Discrete scene based work order synchronization method, system, equipment and storage medium
CN115529228B (en) Fault positioning method, device and medium based on browser end
US10162827B2 (en) Method and system for distributed control system (DCS) process data cloning and migration through secured file system
CN110275931B (en) Automatic publishing method and system for management information service of management network
CN115981261A (en) Production line control method and device, computer equipment and computer readable storage medium
CN115529228A (en) Fault positioning method, equipment and medium based on browser end
CN116303348A (en) Method and system for online migration of DRDS (data distribution system) database and table division based on cap
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN111813588B (en) Computer hard disk fault positioning method, device, equipment and storage medium
CN113242147A (en) Automatic operation and maintenance deployment method, device, equipment and storage medium in multi-cloud environment
CN111813589A (en) Distributed cluster fault positioning method, device, equipment and storage medium
CN114691395A (en) Fault processing method and device, electronic equipment and storage medium
CN112580827A (en) Work order generation method and device
CN111652377A (en) Robot learning method, device and medium based on block chain
CN110969461A (en) Method and device for processing public number information, storage medium and processor
CN116894574A (en) Method for data processing, processor and storage medium
CN115567396A (en) Switch configuration method, device and medium based on SDN network
CN117111968A (en) Method, device and medium for generating software installation package of ERP product
CN116643980A (en) Automatic testing method, system and storage medium based on priority execution
CN116150173A (en) Enterprise information updating method, system and medium based on industrial and commercial data platform
CN117033476A (en) Data aggregation method, device and medium for region
CN116107996A (en) Data version management method, device and medium based on data warehouse
CN115576595A (en) Method, device and medium for realizing application final assembly

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant