Supervision method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202510640708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-15
AI Technical Summary
[0003]若有非法有线接入设备通过物理网线接入到了银行交换机的端口上,则会导致该非法有线接入设备也能够访问银行的内容网络,这对银行的内部网络的安全造成了很大的威胁
[0035] The present invention provides a monitoring method, device, electronic device, and computer-readable storage medium, wherein a bank's monitoring front-end obtains an ARP table of a switch to be monitored in a switch; for each line of text in the ARP table, based on a first standard format of the wired access device's IP address, a second standard format of the wired access device's MAC address, and a third standard format of the port number, extracts the wired access device's IP address information, wired access device's MAC address information, and port number recorded in the line of text; transmits the extracted wired access device's IP address information, wired access device's MAC address information, and port number recorded in the line of text to a back-end server; and the back-end server monitors the wired access devices connected to each port of the switch to be monitored based on the wired access device's IP address information, wired access device's MAC address information, and port number corresponding to each received line of text. This method enables monitoring of wired access devices connected to the switch's ports to determine whether any illegal devices are connected to the switch ports, thereby improving the security of the bank's internal network.
Smart Images

Figure CN120498772A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a supervision method, device, electronic device, and computer-readable storage medium. Background Art
[0002] A bank's wired access devices need to be connected to a switch port via a physical network cable to access the bank's internal network. Normally, there is a one-to-one correspondence between wired access devices and switch ports.
[0003] If an illegal wired access device is connected to a bank switch port via a physical network cable, it can access the bank's content network, posing a significant threat to the security of the bank's internal network. Therefore, there is an urgent need for a method to monitor wired access devices connected to switch ports and determine whether any illegal devices are connected to the switch ports. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a supervision method, device, electronic device and computer-readable storage medium to improve the security of the bank's internal network by supervising the wired access devices connected to the bank's switch port.
[0005] In a first aspect, an embodiment of the present application provides a supervision method, which is applied to a bank's supervision front end; the bank further includes at least one switch, multiple wired access devices, and a backend server; the switch includes multiple ports; the wired access device is used to access the port corresponding to the wired access device via a physical network cable, so as to access the bank's internal network based on the switch to which the port belongs; the method includes:
[0006] Obtaining the ARP table of the switch to be supervised among the switches;
[0007] For each line of text in the ARP table, based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, extract the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the line of text;
[0008] The wired access device IP address information, the wired access device MAC address information and the port number recorded in the extracted line of text are transmitted to the background server, so that the background server can supervise the wired access devices connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information and the port number corresponding to each line of text received.
[0009] In combination with the first aspect, an embodiment of the present application provides a first possible implementation of the first aspect, wherein, for each line of text in the ARP table, based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, extracting the wired access device IP address information, wired access device MAC address information, and port number recorded in the line of text, including:
[0010] For each line of text in the ARP table, read the line of text, and based on a first standard format of the wired access device IP address, a second standard format of the wired access device MAC address, and a third standard format of the port number, identify whether the line of text contains wired access device IP address information that matches the first standard format, wired access device MAC address information that matches the second standard format, and a port number that matches the third standard format;
[0011] If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then the wired access device IP address information, the wired access device MAC address information, and the port number are extracted from the line of text.
[0012] In combination with the first aspect, an embodiment of the present application provides a second possible implementation of the first aspect, wherein the transmitting the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the extracted line of text to the background server includes:
[0013] Extracting the wired access device IP address information, the wired access device MAC address information, and the port number from the line of text as target data corresponding to the line of text, and placing the target data into a valid data queue;
[0014] Determining a first quantity of the target data currently being transmitted by the supervision front end to the backend server, and determining whether the first quantity is less than a preset data transmission quantity;
[0015] If the first number is less than the preset data transmission number, calculating the difference between the first number and the preset data transmission number, and determining the difference as the second number of target data currently allowed to be transmitted;
[0016] The second number of target data is selected from the valid data queue, and the second number of target data selected is transmitted to the background server.
[0017] In combination with the second possible implementation of the first aspect, an embodiment of the present application provides a third possible implementation of the first aspect, wherein determining the first amount of target data currently being transmitted by the supervision front end to the backend server includes:
[0018] Counting a first total amount of the target data currently transmitted to the backend server and a second total amount of feedback data received from the backend server; wherein the feedback data is data returned by the backend server after storing the received target data, indicating that the target data has been successfully stored;
[0019] The difference between the first total quantity and the second total quantity is calculated, and the difference is determined as the first quantity of the target data being transmitted by the supervision front end to the backend server.
[0020] In combination with the second possible implementation of the first aspect, an embodiment of the present application provides a fourth possible implementation of the first aspect, wherein the monitoring of the wired access device connected to each port of the switch to be monitored by the backend server based on the wired access device IP address information, the wired access device MAC address information, and the port number corresponding to each line of text received includes:
[0021] After receiving the target data, the backend server stores the target data in a data table corresponding to the switch to be supervised;
[0022] Identifying whether the target data stored in the data table contains abnormal data; wherein the abnormal data is at least two target data having the same port number but different IP address information and / or MAC address information of the wired access device; the abnormal data is used to indicate that at least two different wired access devices are connected to the port corresponding to the port number;
[0023] If the data table contains the abnormal data, the abnormal data is sent to the supervision front end.
[0024] In combination with the fourth possible implementation of the first aspect, the embodiment of the present application provides a fifth possible implementation of the first aspect, wherein the method further includes:
[0025] If the abnormal data sent by the backend server is received, the abnormal data will be displayed to the bank's supervisor, so that the supervisor can verify whether the port corresponding to the port number contained in the abnormal data has been connected to an illegal wired access device.
[0026] In a second aspect, an embodiment of the present application further provides a supervisory device, which is applied to a supervisory front end of a bank; the bank further includes at least one switch, multiple wired access devices, and a backend server; the switch includes multiple ports; the wired access device is used to access the port corresponding to the wired access device via a physical network cable, so as to access the bank's internal network based on the switch to which the port belongs; the device includes:
[0027] An acquisition module, configured to acquire an ARP table of a switch to be supervised among the switches;
[0028] an extraction module configured to extract, for each line of text in the ARP table, the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the line of text based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number;
[0029] A transmission module is used to transmit the wired access device IP address information, the wired access device MAC address information and the port number recorded in the extracted line of text to the background server, so that the background server can supervise the wired access devices connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information and the port number corresponding to each line of text received.
[0030] In combination with the second aspect, an embodiment of the present application provides a first possible implementation of the second aspect, wherein the extraction module is used to extract the wired access device IP address information, wired access device MAC address information, and port number recorded in each line of text in the ARP table based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, specifically for:
[0031] For each line of text in the ARP table, read the line of text, and based on a first standard format of the wired access device IP address, a second standard format of the wired access device MAC address, and a third standard format of the port number, identify whether the line of text contains wired access device IP address information that matches the first standard format, wired access device MAC address information that matches the second standard format, and a port number that matches the third standard format;
[0032] If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then the wired access device IP address information, the wired access device MAC address information, and the port number are extracted from the line of text.
[0033] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of any possible implementation method of the first aspect above are performed.
[0034] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any possible implementation method of the first aspect are executed.
[0035] The present invention provides a monitoring method, device, electronic device, and computer-readable storage medium, wherein a bank's monitoring front-end obtains an ARP table of a switch to be monitored in a switch; for each line of text in the ARP table, based on a first standard format of the wired access device's IP address, a second standard format of the wired access device's MAC address, and a third standard format of the port number, extracts the wired access device's IP address information, wired access device's MAC address information, and port number recorded in the line of text; transmits the extracted wired access device's IP address information, wired access device's MAC address information, and port number recorded in the line of text to a back-end server; and the back-end server monitors the wired access devices connected to each port of the switch to be monitored based on the wired access device's IP address information, wired access device's MAC address information, and port number corresponding to each received line of text. This method enables monitoring of wired access devices connected to the switch's ports to determine whether any illegal devices are connected to the switch ports, thereby improving the security of the bank's internal network.
[0036] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flowchart of a supervision method provided in an embodiment of the present application is shown;
[0039] Figure 2 A schematic diagram showing a connection relationship between a switch port and a wired access device provided in an embodiment of the present application is shown;
[0040] Figure 3 A schematic diagram showing a communication connection relationship between a backend server and a supervision front end provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of an ARP table provided in an embodiment of the present application is shown;
[0042] Figure 5 A schematic diagram of a data table provided in an embodiment of the present application is shown;
[0043] Figure 6 A schematic diagram of the structure of a monitoring device provided in an embodiment of the present application is shown;
[0044] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0046] In the prior art, a backend server is typically used to monitor the wired access devices connected to each port on each switch. This means that the backend server must process data in each switch's ARP table. Given the large number of wired access devices in banks, the ARP table contains a large amount of data, which can consume excessive server resources. Typically, a backend server not only needs to monitor the wired access devices connected to each port on each switch but also needs to perform other tasks. If this monitoring task consumes too much server resources, the backend server may experience slow responses or even timeouts while processing other tasks.
[0047] In light of the above issues, embodiments of the present application provide a monitoring method, apparatus, electronic device, and computer-readable storage medium. These methods shift the processing of switch ARP tables to multiple monitoring front-ends, thereby reducing the computational workload of backend servers and conserving server resources. These methods are described below using an embodiment.
[0048] To facilitate understanding of this embodiment, a detailed description of a supervisory method disclosed in this embodiment is first provided. This supervisory method is applied to a bank's supervisory front-end; the bank further comprises at least one switch, multiple wired access devices, and a back-end server; the switch comprises multiple ports; the wired access device is used to access the corresponding port of the wired access device via a physical network cable, thereby accessing the bank's internal network based on the switch to which the port belongs.
[0049] like Figure 1 As shown, the supervision method includes the following steps S101-S103:
[0050] S101: Obtain the ARP table of the switch to be supervised among the switches.
[0051] In this embodiment, a wired access device refers to a terminal device used by bank staff that requires a physical network cable connection, such as a computer. The requirement for a physical network cable connection means that the wired access device must be connected to a port on a bank switch via a physical network cable so that the wired access device can access the bank's internal network through the switch.
[0052] like Figure 2 As shown, a switch contains multiple ports, each used to connect to different wired access devices via physical network cables. Normally, there's a one-to-one correspondence between ports and wired access devices. Because switches have a limited number of ports and banks often have a large number of wired access devices, banks typically require multiple switches.
[0053] In this embodiment, the supervision front end can be one or more, such as Figure 3 As shown, the supervision front end is communicatively connected to the back-end server, and the communication connection mode can be a wired communication connection or a wireless communication connection, which is not limited in this application.
[0054] The supervision method in this embodiment is applied separately to each supervision front-end. Different supervision front-ends process the ARP tables (Address Resolution Protocol Tables) of different supervised switches. Furthermore, the number of ARP tables processed by different supervision front-ends for supervised switches can be the same or different. For example, supervision front-end A1 processes the ARP tables of supervised switches B1 and B21; supervision front-end A2 processes the ARP table of supervised switch B3.
[0055] In this embodiment, the switches to be supervised can be one or more, and the switches to be supervised can be all switches in the bank or some switches designated by supervisors. When processing the ARP tables of multiple switches to be supervised, the supervisory front end processes them one by one.
[0056] Each switch (including the switch to be supervised) corresponds to an ARP table, which contains the wired access device IP address information of each wired access device connected to the port of the switch to be supervised, the wired access device MAC address (Media Access Control Address, Media Access Control Address) information, the port number of the port to which the wired access device is connected, and other information.
[0057] For example, Figure 4 As shown, a schematic diagram of an ARP table of a switch to be supervised is shown, and the ARP table contains the ip address information of the wired access device corresponding to the 8 wired access devices connected to the port of the switch to be supervised (such as Figure 4 ip address in), MAC address information of wired access device (MAC address), port number of the port to which the wired access device is connected (INTERFACE), and other information (such as Figure 4 Expect, Type, VLAN / CEVLAN in the configuration file).
[0058] It is worth noting that in actual applications, the number of text lines in the ARP table is much smaller than Figure 4 There are many more embodiments shown in Figure 4 This is merely an illustrative example for easier understanding.
[0059] S102: For each line of text in the ARP table, based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, extract the wired access device IP address information, wired access device MAC address information and port number recorded in the line of text.
[0060] In this embodiment, Figure 4 As shown, the first standard format of the IP address of a wired access device is generally XXX.XX.XX.X, the second standard format of the MAC address of a wired access device is generally XXXX-XXXX-XXXX, and the third standard format of the port number of the port to which the wired access device is connected is generally XXX / X / XX. Clearly, the first, second, and third standard formats are different from each other.
[0061] by Figure 4 Take one of the wired access devices in the example, the IP address of the wired access device is 192.168.100.253, the MAC address of the wired access device is 7425-8a4b-ee40, and the port number of the port to which the wired access device is connected is GE0 / 0 / 25.
[0062] In a possible implementation, when executing step S102, the following steps S1021-S1022 may be specifically performed:
[0063] S1021: For each line of text in the ARP table, read the line of text, and based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, identify whether the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format.
[0064] S1022: If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then extract the wired access device IP address information, the wired access device MAC address information, and the port number from the line of text.
[0065] If the line of text does not contain the line access device IP address information matching the first standard format, the line access device MAC address information matching the second standard format, and the port number matching the third standard format, the line of text is regarded as invalid text.
[0066] For example, Figure 4 As shown, the first line of text is "ip address MAC address Expire (M) Type OMTERFACE VLAN / CEVLAN." This line of text does not contain the wired access device IP address information that matches the first standard format, nor does it contain the wired access device MAC address information that matches the second standard format, nor does it contain the port number that matches the third standard format. Therefore, the first line of text is considered invalid and the information is not extracted.
[0067] Next, the second line of text is a dotted line and similarly does not contain the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, or the port number that matches the third standard format. Therefore, the second line of text is also considered invalid and no information is extracted.
[0068] The third line of text contains the wired access device IP address "192.168.100.1" matching the first standard format and the wired access device MAC address "24a5-2c80-e038" matching the second standard format, but does not contain a port number matching the third standard format. Therefore, the third line of text is also considered invalid and the information is not extracted.
[0069] The fourth line of text contains the wired access device IP address "192.168.100.253" matching the first standard format, the wired access device MAC address "7425-8a4b-ee40" matching the second standard format, and the port number "GE0 / 0 / 25" matching the third standard format. Therefore, the fourth line of text is considered valid text, and the wired access device IP address "192.168.100.253", wired access device MAC address "7425-8a4b-ee40", and port number "GE0 / 0 / 25" can be extracted from it.
[0070] S103: The wired access device IP address information, wired access device MAC address information and port number recorded in the extracted line of text are transmitted to the background server, so that the background server can supervise the wired access devices connected to each port of the supervised switch based on the wired access device IP address information, wired access device MAC address information and port number corresponding to each line of text received.
[0071] In this embodiment, the wired access device IP address information, wired access device MAC address information and port number corresponding to each extracted line of text may be sent to the background server in a data-controllable AJAX asynchronous and concurrent manner.
[0072] In a possible implementation, when executing step S103 to transmit the extracted wired access device IP address information, wired access device MAC address information, and port number recorded in the line of text to the background server, the following steps S1031-S1034 may be specifically performed:
[0073] S1031: extracting the wired access device IP address information, wired access device MAC address information, and port number from the line of text as target data corresponding to the line of text, and placing the target data into a valid data queue.
[0074] S1032: Determine a first quantity of target data currently being transmitted by the supervision front end to the back end server, and determine whether the first quantity is less than a preset data transmission quantity.
[0075] S1033: If the first number is smaller than the preset data transmission number, a difference between the first number and the preset data transmission number is calculated, and the difference is determined as a second number of target data currently allowed to be transmitted.
[0076] S1034: Select a second number of target data from the valid data queue, and transmit the selected second number of target data to the background server.
[0077] In this embodiment, the target data extracted each time can be placed at the end of the valid data queue in the order of extraction. In the process of extracting the target data from each line of text in the ARP table, the supervisory front end sends the extracted target data to the backend server through a data-controllable AJAX asynchronous concurrent method.
[0078] For example, suppose the ARP table contains 100 lines of text. At the first historical moment, the target data corresponding to 10 lines of text has been extracted and placed in the valid data queue. If the preset data transmission quantity is 10, then the supervision front-end will transmit the first 10 target data in the valid data queue as a batch of data to the back-end server at the first historical moment. During this process, the supervision front-end continues to extract the target data from the text after line 11. In other words, the extraction and transmission of target data are asynchronous and concurrent processes.
[0079] Assume that the current moment is after the first historical moment, and the supervision front end determines at the current moment that among the 10 target data transmitted at the first moment, there are 4 target data that the current supervision front end is transmitting to the background server, and the other 6 target data have been successfully transmitted to the background server, then the first number determined at the current moment is 4.
[0080] Because the current first quantity of 4 is less than the preset number of data transfers, 10, the difference between the first quantity and the preset number of data transfers (10-4=6) is calculated and this difference, 6, is determined as the second number of target data currently allowed to be transmitted. The supervisory frontend then selects four more target data from the valid data queue and transmits them to the backend server. This ensures that the number of target data being transmitted does not exceed the preset number of data transfers, allowing for asynchronous and concurrent transmissions, conserving server network resources and improving server response speed.
[0081] In a possible implementation, when executing step S1032 to determine the first amount of target data currently being transmitted by the supervision front end to the backend server, the following steps may be specifically performed:
[0082] S10321: Counting a first total amount of target data currently transmitted to the backend server and a second total amount of feedback data received from the backend server; wherein the feedback data is data returned by the backend server after storing the received target data, indicating that the target data has been successfully stored;
[0083] S10322: Calculate the difference between the first total quantity and the second total quantity, and determine the difference as the first quantity of target data being transmitted by the supervision front end to the back end server.
[0084] In this embodiment, when the supervisory front-end transmits target data to the back-end server, the back-end server stores the received target data after receiving the target data. After successful storage, the back-end server sends feedback data indicating successful storage of the target data to the supervisory front-end. In this way, the supervisory front-end can calculate a second total amount of feedback data received from the back-end server, which also represents the total amount of target data successfully stored by the back-end server. The first total amount represents the total amount of target data transmitted by the supervisory front-end to the back-end server, and the difference between the first total amount and the second total amount represents the amount of target data that the supervisory front-end has currently sent to the back-end server but has not yet successfully stored by the back-end server.
[0085] In a possible implementation, when executing step S103, the backend server supervises the wired access device connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information, and the port number corresponding to each line of text received. Specifically, the following steps S1035-S1037 may be performed:
[0086] S1035: After receiving the target data, the backend server stores the target data in a data table corresponding to the switch to be supervised.
[0087] In this embodiment, each switch to be supervised corresponds to a data table, and the data table corresponding to each switch to be supervised is stored in the background server.
[0088] S1036: Identify whether the target data stored in the data table contains abnormal data; wherein the abnormal data is at least two target data with the same port number but different wired access device IP address information and / or wired access device MAC address information; the abnormal data is used to indicate that at least two different wired access devices are connected to the port corresponding to the port number.
[0089] S1037: If the data table contains abnormal data, the abnormal data is sent to the supervision front end.
[0090] For example, Figure 5 As shown in the figure, port number GE0 / 0 / 25 corresponds to two wired access devices, and port number GE0 / 0 / 26 corresponds to three wired access devices. In this case, the two target data items of port number GE0 / 0 / 25 are treated as abnormal data, and the three target data items of port number GE0 / 0 / 26 are treated as abnormal data.
[0091] In a possible implementation, the supervision front end may further perform the following steps:
[0092] If abnormal data is received from the backend server, the abnormal data will be displayed to the bank's supervisor, so that the supervisor can verify whether an illegal wired access device has been connected to the port corresponding to the port number contained in the abnormal data.
[0093] In this embodiment, if the same port number corresponds to at least two wired access devices, it means that at least two different wired access devices have been connected to the port corresponding to the port number. Under normal circumstances, only one wired access device is connected to a port. Therefore, if at least two different wired access devices have been connected to a port, it means that there may be an illegal wired access device, where an illegal wired access device refers to a device that the bank does not allow to access the bank's internal network.
[0094] After the supervisory front-end displays the abnormal data to the supervisor through the display screen, the supervisor can promptly verify the wired access device connected to the port corresponding to the port number contained in the abnormal data to determine whether any illegal wired access device has been connected, thereby playing a supervisory role in wired access devices connected to the bank's internal network.
[0095] Based on the same technical concept, an embodiment of the present application also provides a supervision device, which is applied to the supervision front end of a bank; the bank further includes at least one switch, multiple wired access devices and a backend server; the switch includes multiple ports; the wired access device is used to access the port corresponding to the wired access device through a physical network cable, so as to access the internal network of the bank based on the switch to which the port belongs; Figure 6 As shown, the device includes:
[0096] An acquisition module 601 is configured to acquire an ARP table of a switch to be supervised among the switches;
[0097] An extraction module 602 is configured to extract, for each line of text in the ARP table, the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the line of text based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number;
[0098] The transmission module 603 is used to transmit the wired access device IP address information, the wired access device MAC address information and the port number recorded in the extracted line of text to the background server, so that the background server can supervise the wired access devices connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information and the port number corresponding to each line of text received.
[0099] Optionally, when the extraction module 602 is used to extract the wired access device IP address information, wired access device MAC address information, and port number recorded in each line of text in the ARP table based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, the extraction module 602 is specifically used to:
[0100] For each line of text in the ARP table, read the line of text, and based on a first standard format of the wired access device IP address, a second standard format of the wired access device MAC address, and a third standard format of the port number, identify whether the line of text contains wired access device IP address information that matches the first standard format, wired access device MAC address information that matches the second standard format, and a port number that matches the third standard format;
[0101] If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then the wired access device IP address information, the wired access device MAC address information, and the port number are extracted from the line of text.
[0102] Optionally, when the transmission module 603 is used to transmit the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the extracted line of text to the background server, it is specifically used to:
[0103] Extracting the wired access device IP address information, the wired access device MAC address information, and the port number from the line of text as target data corresponding to the line of text, and placing the target data into a valid data queue;
[0104] Determining a first quantity of the target data currently being transmitted by the supervision front end to the backend server, and determining whether the first quantity is less than a preset data transmission quantity;
[0105] If the first number is less than the preset data transmission number, calculating the difference between the first number and the preset data transmission number, and determining the difference as the second number of target data currently allowed to be transmitted;
[0106] The second number of target data is selected from the valid data queue, and the second number of target data selected is transmitted to the background server.
[0107] Optionally, when used to determine the first amount of the target data currently being transmitted by the supervision front end to the backend server, the transmission module 603 is specifically configured to:
[0108] Counting a first total amount of the target data currently transmitted to the backend server and a second total amount of feedback data received from the backend server; wherein the feedback data is data returned by the backend server after storing the received target data, indicating that the target data has been successfully stored;
[0109] The difference between the first total quantity and the second total quantity is calculated, and the difference is determined as the first quantity of the target data being transmitted by the supervision front end to the backend server.
[0110] Optionally, when the transmission module 603 is used to supervise the wired access device connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information, and the port number corresponding to each line of text received by the background server, the transmission module 603 is specifically used to:
[0111] After receiving the target data, the backend server stores the target data in a data table corresponding to the switch to be supervised;
[0112] Identifying whether the target data stored in the data table contains abnormal data; wherein the abnormal data is at least two target data having the same port number but different IP address information and / or MAC address information of the wired access device; the abnormal data is used to indicate that at least two different wired access devices are connected to the port corresponding to the port number;
[0113] If the data table contains the abnormal data, the abnormal data is sent to the supervision front end.
[0114] Optionally, the device further comprises:
[0115] The display module is configured to display the abnormal data to the bank's supervisor if the abnormal data sent by the backend server is received, so that the supervisor can verify whether an illegal wired access device has been connected to the port corresponding to the port number contained in the abnormal data.
[0116] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present application includes: a processor 701, a memory 702 and a bus 703, wherein the memory 702 stores machine-readable instructions executable by the processor 701. When the electronic device runs the above-mentioned information processing method, the processor 701 communicates with the memory 702 through the bus 703, and the processor 701 executes the machine-readable instructions to perform the method steps described in Example 1.
[0117] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps described in the first embodiment are executed.
[0118] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, electronic devices, and computer-readable storage media can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] In the several embodiments provided in this application, it should be understood that the disclosed methods, devices, electronic devices and computer-readable storage media can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0122] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0123] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.
Claims
1. A supervision method, characterized in that: The method is applied to a bank's regulatory front-end; the bank further comprises at least one switch, multiple wired access devices, and a back-end server; the switch comprises multiple ports; the wired access device is used to access the port corresponding to the wired access device via a physical network cable, so as to access the bank's internal network based on the switch to which the port belongs; the method comprises: Obtaining the ARP table of the switch to be supervised among the switches; For each line of text in the ARP table, based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, extract the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the line of text; The wired access device IP address information, the wired access device MAC address information and the port number recorded in the extracted line of text are transmitted to the background server, so that the background server can supervise the wired access devices connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information and the port number corresponding to each line of text received.
2. The method according to claim 1, characterized in that For each line of text in the ARP table, extracting the wired access device IP address information, wired access device MAC address information, and port number recorded in the line of text based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, including: For each line of text in the ARP table, read the line of text, and based on a first standard format of the wired access device IP address, a second standard format of the wired access device MAC address, and a third standard format of the port number, identify whether the line of text contains wired access device IP address information that matches the first standard format, wired access device MAC address information that matches the second standard format, and a port number that matches the third standard format; If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then the wired access device IP address information, the wired access device MAC address information, and the port number are extracted from the line of text.
3. The method according to claim 1, characterized in that The step of transmitting the IP address information of the wired access device, the MAC address information of the wired access device, and the port number recorded in the extracted line of text to the background server includes: Extracting the wired access device IP address information, the wired access device MAC address information, and the port number from the line of text as target data corresponding to the line of text, and placing the target data into a valid data queue; Determining a first quantity of the target data currently being transmitted by the supervision front end to the backend server, and determining whether the first quantity is less than a preset data transmission quantity; If the first number is less than the preset data transmission number, calculating the difference between the first number and the preset data transmission number, and determining the difference as the second number of target data currently allowed to be transmitted; The second number of target data is selected from the valid data queue, and the second number of target data selected is transmitted to the background server.
4. The method according to claim 3, characterized in that The determining the first amount of the target data currently being transmitted by the supervision front end to the backend server includes: Counting a first total amount of the target data currently transmitted to the backend server and a second total amount of feedback data received from the backend server; wherein the feedback data is data returned by the backend server after storing the received target data, indicating that the target data has been successfully stored; The difference between the first total quantity and the second total quantity is calculated, and the difference is determined as the first quantity of the target data being transmitted by the supervision front end to the backend server.
5. The method according to claim 3, characterized in that: The monitoring of the wired access device connected to each port of the switch to be monitored by the background server based on the wired access device IP address information, the wired access device MAC address information, and the port number corresponding to each line of text received includes: After receiving the target data, the backend server stores the target data in a data table corresponding to the switch to be supervised; Identifying whether the target data stored in the data table contains abnormal data; wherein the abnormal data is at least two target data having the same port number but different IP address information and / or MAC address information of the wired access device; the abnormal data is used to indicate that at least two different wired access devices are connected to the port corresponding to the port number; If the data table contains the abnormal data, the abnormal data is sent to the supervision front end.
6. The method according to claim 5, characterized in that The method further comprises: If the abnormal data sent by the backend server is received, the abnormal data will be displayed to the bank's supervisor, so that the supervisor can verify whether the port corresponding to the port number contained in the abnormal data has been connected to an illegal wired access device.
7. A monitoring device, characterized in that: The device is applied to the bank's regulatory front end; the bank further includes at least one switch, multiple wired access devices, and a backend server; the switch includes multiple ports; the wired access device is used to access the port corresponding to the wired access device via a physical network cable, so as to access the bank's internal network based on the switch to which the port belongs; the device includes: An acquisition module, configured to acquire an ARP table of a switch to be supervised among the switches; an extraction module configured to extract, for each line of text in the ARP table, the wired access device IP address information, the wired access device MAC address information, and the port number recorded in the line of text based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number; A transmission module is used to transmit the wired access device IP address information, the wired access device MAC address information and the port number recorded in the extracted line of text to the background server, so that the background server can supervise the wired access devices connected to each port of the switch to be supervised based on the wired access device IP address information, the wired access device MAC address information and the port number corresponding to each line of text received.
8. The device according to claim 7, characterized in that When the extraction module is used to extract the wired access device IP address information, the wired access device MAC address information, and the port number recorded in each line of text in the ARP table based on the first standard format of the wired access device IP address, the second standard format of the wired access device MAC address, and the third standard format of the port number, the extraction module is specifically used to: For each line of text in the ARP table, read the line of text, and based on a first standard format of the wired access device IP address, a second standard format of the wired access device MAC address, and a third standard format of the port number, identify whether the line of text contains wired access device IP address information that matches the first standard format, wired access device MAC address information that matches the second standard format, and a port number that matches the third standard format; If the line of text contains the wired access device IP address information that matches the first standard format, the wired access device MAC address information that matches the second standard format, and the port number that matches the third standard format, then the wired access device IP address information, the wired access device MAC address information, and the port number are extracted from the line of text.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 6 are performed.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 6.