A method, device, equipment and medium for processing flow data of downstream equipment

By obtaining the protocol address, physical address and LAN interface of the downhook device, and using bandwidth statistics tools to perform traffic statistics, the problem of low accuracy of traffic statistics of the downhook device is solved, and more accurate traffic monitoring and statistics are achieved.

CN115955421BActive Publication Date: 2025-04-15GUANGZHOU TOZED KANGWEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211545213.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2025-04-15
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

When the prior art statistics on the traffic of the hanging equipment, the accuracy rate is low, and the traffic of the hanging equipment cannot be effectively monitored. The traffic statistics of the same type of equipment are inaccurate, resulting in large errors.

Method used

By obtaining the protocol address, physical address and LAN interface of the hanging device, the preset bandwidth statistics tool is used to count traffic data, supports the statistics of account traffic, device traffic and interface traffic, and perform traffic monitoring and exception handling operations.

Benefits of technology

It improves the accuracy of traffic statistics of downhook equipment, supports traffic statistics for different application scenarios, reduces the number of reconfigurations, and reduces the error of traffic statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115955421B_ABST
    Figure CN115955421B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for processing flow data of a hanging device, obtains the protocol address, physical address and local area network interface of the hanging device, and performs flow data statistics through a preset bandwidth statistics tool; when the flow statistics strategy selected by the user is the account flow statistics strategy, the account flow data is obtained according to the protocol address of the hanging device; when the flow statistics strategy selected by the user is the device flow statistics strategy, the device flow data is obtained according to the physical address of the hanging device; when the flow statistics strategy selected by the user is the interface flow statistics strategy, the interface flow data is obtained according to the local area network interface of the hanging device; and after each flow statistics strategy completes flow data statistics, flow monitoring operations and exception handling operations are performed on the flow data obtained by statistics. The present invention supports different application scenarios to perform flow statistics, and improves the accuracy of flow statistics of hanging devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of broadband communications, and in particular to a method, device, equipment and medium for processing flow data of downstream equipment. Background Art

[0002] The gateway can be used to count the traffic of the forwarded data, and the traffic counted passes through the PREROUTING chain (pre-routing chain), FORWARD chain (forwarding chain) and POSTROUTING chain (post-routing chain). Therefore, the iptables rules are added to the FORWARD chain, and the downstream or upstream traffic of the downstream devices is counted according to different iptables rules.

[0003] Traffic statistics are performed based on the IP address of the downstream device: the user configures the fixed IP of the embedded device or the IP address assigned by the router, and then the user sends the configuration parameters. Based on the configuration parameters, the iptables tool is used to establish a rule chain to filter and count network packets, thereby counting traffic data and calculating traffic rate. The gateway generally uses DHCP to randomly assign IPs. When the downstream device is replaced, the IP address of the downstream device may change, and the IP to be counted needs to be reconfigured; and the gateway cannot count traffic based on the same type of downstream devices, thereby reducing the number of reconfigurations, and the traffic used by different devices of the same type is counted together. At this time, the traffic statistics of the downstream devices will have large errors, and users cannot be provided with traffic monitoring of the downstream devices.

[0004] Therefore, there is an urgent need for a processing strategy for the flow data of downstream devices to solve the problem of low accuracy of flow statistics of downstream devices. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, equipment and medium for processing flow data of a downstream device, so as to improve the accuracy of flow statistics of the downstream device.

[0006] In order to solve the above problem, an embodiment of the present invention provides a method for processing flow data of a downstream device, including:

[0007] Obtain the protocol addresses, physical addresses and LAN interfaces of several downstream devices;

[0008] Determine the traffic statistics strategy selected by the user;

[0009] When the traffic statistics strategy is an account traffic statistics strategy, according to the protocol addresses of the plurality of downstream devices, the account traffic data corresponding to the protocol address of each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the plurality of account traffic data;

[0010] When the traffic statistics strategy is a device traffic statistics strategy, according to the physical addresses of the plurality of downstream devices, the device traffic data corresponding to the physical address of each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the plurality of device traffic data;

[0011] When the traffic statistics strategy is an interface traffic statistics strategy, according to the LAN interfaces of the several downstream devices, the interface traffic data corresponding to the LAN interface connected to each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the several interface traffic data.

[0012] As an improvement of the above solution, the data acquisition method of the preset bandwidth statistics tool includes:

[0013] The preset broadband statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

[0014] As an improvement of the above solution, the flow monitoring operation is specifically as follows:

[0015] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value;

[0016] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated;

[0017] When the account traffic usage rate or device traffic usage rate of any of the offline devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated;

[0018] When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

[0019] As an improvement of the above solution, the exception handling operation is specifically as follows:

[0020] identifying a prompt generated by the flow monitoring operation;

[0021] When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained;

[0022] When generating a device fault prompt, if the account traffic usage rate is equal to the first speed threshold, then the physical parameters of the first faulty downstream device are confirmed according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; if the device traffic usage rate is equal to the first speed threshold, then the physical parameters of the second faulty downstream device are confirmed according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the downstream device according to the physical parameters of the second faulty downstream device;

[0023] When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

[0024] Accordingly, an embodiment of the present invention further provides a device for processing flow data of a downstream device, comprising: a data acquisition module, a strategy selection module, a first strategy module, a second strategy module and a third strategy module;

[0025] The data acquisition module is used to obtain the protocol addresses, physical addresses and local area network interfaces of several downstream devices;

[0026] The strategy selection module is used to determine the traffic statistics strategy selected by the user;

[0027] The first strategy module is used to obtain account traffic data corresponding to the protocol address of each of the downstream devices through a preset bandwidth statistics tool according to the protocol addresses of the downstream devices when the traffic statistics strategy is an account traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the account traffic data;

[0028] The second strategy module is used to obtain device traffic data corresponding to the physical address of each of the downstream devices through a preset bandwidth statistics tool according to the physical addresses of the downstream devices when the traffic statistics strategy is the device traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the traffic data of the devices;

[0029] The third strategy module is used to obtain the interface traffic data corresponding to the LAN interface connected to each of the downstream devices through a preset bandwidth statistics tool according to the LAN interfaces of the downstream devices when the traffic statistics strategy is the interface traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the interface traffic data.

[0030] As an improvement of the above solution, the data acquisition method of the preset bandwidth statistics tool includes:

[0031] The preset broadband statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

[0032] As an improvement of the above solution, the flow monitoring operation is specifically as follows:

[0033] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value;

[0034] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated;

[0035] When the account traffic usage rate or device traffic usage rate of any of the offline devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated;

[0036] When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

[0037] As an improvement of the above solution, the exception handling operation is specifically as follows:

[0038] identifying a prompt generated by the flow monitoring operation;

[0039] When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained;

[0040] When generating a device fault prompt, if the account traffic usage rate is equal to the first speed threshold, then the physical parameters of the first faulty downstream device are confirmed according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; if the device traffic usage rate is equal to the first speed threshold, then the physical parameters of the second faulty downstream device are confirmed according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the downstream device according to the physical parameters of the second faulty downstream device;

[0041] When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

[0042] Correspondingly, an embodiment of the present invention further provides a computer terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a method for processing traffic data of a downstream device as described in the present invention.

[0043] Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for processing traffic data of a downstream device as described in the present invention.

[0044] As can be seen from the above, the present invention has the following beneficial effects:

[0045] The present invention provides a method for processing flow data of a hanging device, obtains the protocol address, physical address and local area network interface of the hanging device, and performs flow data statistics through a preset bandwidth statistics tool; when the flow statistics strategy selected by the user is the account flow statistics strategy, the account flow data is obtained according to the protocol address of the hanging device; when the flow statistics strategy selected by the user is the device flow statistics strategy, the device flow data is obtained according to the physical address of the hanging device; when the flow statistics strategy selected by the user is the interface flow statistics strategy, the interface flow data is obtained according to the local area network interface of the hanging device; and after each flow statistics strategy completes flow data statistics, the flow data obtained by statistics is subjected to flow monitoring operations and exception handling operations. Compared with the prior art that can only perform statistics on device flow through protocol addresses, the present invention performs flow data statistics from three dimensions of protocol address, physical address and local area network interface, thereby being able to support different application scenarios to perform flow statistics, and improving the accuracy of flow statistics of hanging devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flowchart of a method for processing flow data of a downstream device provided by an embodiment of the present invention;

[0047] Figure 2 It is a structural schematic diagram of a device for processing flow data of a downstream device provided by an embodiment of the present invention;

[0048] Figure 3 It is a structural diagram of an account traffic statistics strategy design provided by an embodiment of the present invention;

[0049] Figure 4 It is a structural diagram of a device traffic statistics strategy design provided by an embodiment of the present invention;

[0050] Figure 5 It is a structural diagram of an interface traffic statistics strategy design provided by an embodiment of the present invention;

[0051] Figure 6 It is a flowchart of a method for processing flow data of a downstream device provided by another embodiment of the present invention;

[0052] Figure 7 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Embodiment 1

[0055] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for processing flow data of a downstream device provided by an embodiment of the present invention. Figure 1 As shown, this embodiment includes steps 101 to 105, and each step is specifically as follows:

[0056] In this embodiment, the gateway device is an execution subject of a method for processing traffic data of a downstream device.

[0057] Step 101: Obtain the protocol addresses, physical addresses and LAN interfaces of several downstream devices.

[0058] In a specific embodiment, the IP address or MAC address or LAN interface of the downstream device is obtained, and the nlbwmon network bandwidth statistics tool is used to collect data; wherein, the command for reading the statistical data of a specific IP address and a specific MAC address is:

[0059] nlbw-c csv-q|grep 192.168.0.100;

[0060] nlbw-c csv-q|grep 11:22:33:44:55:66;

[0061] Among them, 192.168.0.100 is the IP address of the downstream device to be counted, and 11:22:33:44:55:66 is the MAC address of the downstream device to be counted.

[0062] Step 102: Determine the traffic statistics strategy selected by the user.

[0063] In this embodiment, a strategy for traffic statistics of downstream devices can be selected on the gateway device according to the actual scenario used by the user; when the gateway leaves the factory, a default traffic statistics strategy can be set according to different customer needs and usage scenarios, and users can also select the statistics strategy they want to use through a local web page or a remote platform.

[0064] Step 103: When the traffic statistics strategy is an account traffic statistics strategy, according to the protocol addresses of the plurality of downstream devices, the account traffic data corresponding to the protocol address of each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the plurality of account traffic data.

[0065] In a specific embodiment, Figure 3 As shown, traffic statistics are performed based on the IP address of the downstream device (i.e., the protocol address described in the present application). Using the IP address to identify a unique downstream device is suitable for scenarios where the downstream device is fixed to a specific LAN port or the IP does not change. The account traffic data is obtained through the nlbwmon network bandwidth statistics tool, and the account traffic data is organized and counted as the traffic used for the day, this week, this month, and the current traffic usage rate.

[0066] Step 104: When the traffic statistics strategy is a device traffic statistics strategy, according to the physical addresses of the plurality of downstream devices, a preset bandwidth statistics tool is used to obtain device traffic data corresponding to the physical address of each of the downstream devices, and traffic monitoring operations and exception handling operations are performed on the plurality of device traffic data.

[0067] In a specific embodiment, Figure 4As shown in the figure, traffic statistics are performed based on the physical address (MAC address) of the downstream device. Using the MAC address to identify a unique downstream device is suitable for counting the traffic data and traffic rate used by a certain downstream device, and the downstream device is not fixed to a specific LAN port or the IP address changes. Use the nlbwmon bandwidth statistics tool to obtain device traffic data, and organize the device traffic data into the traffic used for the day, this week, this month, and the current traffic usage rate.

[0068] The device traffic statistics strategy strengthens the role of MAC addresses. The advantage of using MAC addresses as unique identifiers for industrial control terminal products is that they can be used as the only access right, which can prevent industrial monitoring digital broadband gateway devices from being connected to illegal products. It can also prevent terminal or sub-terminal failures from causing data peaks to impact the resource configuration of gateway devices, thereby improving the security of gateway devices.

[0069] Step 105: When the traffic statistics strategy is an interface traffic statistics strategy, according to the LAN interfaces of the plurality of downstream devices, through a preset bandwidth statistics tool, the interface traffic data corresponding to the LAN interface connected to each of the downstream devices is obtained, and traffic monitoring operations and exception handling operations are performed on the plurality of interface traffic data.

[0070] In a specific embodiment, traffic statistics are performed based on a physical LAN port (i.e., the local area network interface described in the present application). Using a physical LAN port to identify the device type is suitable for scenarios where the types of devices under the device are fixed but different, reduces configuration operations, and can count traffic data of the same type of devices under the device. When the device under a certain LAN port is replaced with a device of the same type but different, no configuration operation is required.

[0071] The interface traffic statistics strategy facilitates the industrial monitoring digital broadband gateway device to intuitively monitor the working conditions of the terminal devices and different data services connected to each interface (or node), and can also clearly locate the LAN port (local area network interface) where the terminal or sub-terminal device is located, reducing the manual input of fault location when the terminal or sub-terminal fails, and reducing the operating and maintenance costs of the gateway device. It is convenient for the maintenance and replacement of the terminal equipment, reducing the workload of engineering maintenance personnel. The gateway device maintains consistency in the statistics and control of the data traffic and throughput rate of the terminal or sub-terminal of each LAN port, which is conducive to the integrity and consistency of the monitoring parameters after the gateway device replaces the terminal equipment.

[0072] In an embodiment, the data acquisition method of the preset bandwidth statistics tool includes:

[0073] The preset broadband statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

[0074] In this embodiment, the flow monitoring operation is specifically as follows:

[0075] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value;

[0076] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated;

[0077] When the account traffic usage rate or device traffic usage rate of any of the offline devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated;

[0078] When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

[0079] In a specific embodiment, the traffic used this week, the traffic used this month and the current traffic usage rate can be uploaded to the TR069 platform and the local page of the device through the gateway device for display, so that the user can intuitively see the statistical data. If there is a traffic warning alarm prompt, a traffic limit-exceeding network disconnection processing operation or a possible failure of a hanging device, the information will also be uploaded to the TR069 platform and the local page through the gateway device to prompt the abnormal traffic usage status.

[0080] In a specific embodiment, nlbwmon is used to monitor the bandwidth used by network hosts. Network statistics are collected and stored in a database. The nlbwmon client program (nlbw) is then used to query the daemon process to obtain current statistical traffic information. Since nlbwmon uses netlink sockets to extract usage information from the Linux kernel, nlbwmon collects statistics from Linux conntrack entries. This method is very effective compared to other methods of monitoring bandwidth usage.

[0081] In a specific embodiment, nlbwmon tracks traffic based on IP version (ipv4 / ipv6), IP address, MAC address, and layer 7 protocol (i.e., port number). All tracking information is stored in a database. The default protocol file of nlbwmon contains approximately 45 port definitions. Users can add / remove ports to this file as needed. Any traffic that does not conform to the port definition is classified as "other". Layer 7 protocol information is not required in this proposal, and removing all protocols from the protocol file will classify all traffic as "other", greatly reducing the size of the database.

[0082] In this embodiment, the exception handling operation is specifically as follows:

[0083] identifying a prompt generated by the flow monitoring operation;

[0084] When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained;

[0085] When generating a device fault prompt, if the account traffic usage rate is equal to the first speed threshold, then the physical parameters of the first faulty downstream device are confirmed according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; if the device traffic usage rate is equal to the first speed threshold, then the physical parameters of the second faulty downstream device are confirmed according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the downstream device according to the physical parameters of the second faulty downstream device;

[0086] When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

[0087] In a specific embodiment, the flow limit threshold may be 10% of the total flow set by the user, the first speed threshold may be 0, and the second speed threshold may be 0.

[0088] In a specific embodiment, the monthly available traffic limit, traffic warning, and monthly settlement date can be set according to the MAC address (i.e., the physical address described in the claims of this application) / IP address (i.e., the protocol address described in the claims of this application) / physical LAN port (i.e., the local area network interface described in the claims of this application). When the traffic used in the month reaches the traffic limit, the network disconnection operation is executed; when the traffic used in the month reaches the traffic warning percentage of the traffic limit, an alarm will be issued; when the monthly settlement date is reached, the monthly used traffic will be cleared, and the default monthly settlement date is the 1st of each month; when the clearing operation is executed, the traffic used in the month will be cleared, and the corresponding traffic warning and network disconnection operation will be released;

[0089] If the traffic usage rate of the downstream device is 0 for a long time, an alarm will be issued to remind the user that the device may have a fault, which will help the user to discover and locate the fault.

[0090] In a specific embodiment, if traffic quota and traffic warning occur, when the user is disconnected from the network or receives an alarm prompt, the user can clear the used traffic for the month according to the abnormal status to eliminate the abnormal status alarm.

[0091] If the traffic usage rate of the downstream device is 0 for a long time, an alarm will be issued to inform the user that the device may be faulty, which is convenient for the user to discover and locate the fault; the user can quickly locate the device that may be faulty based on the MAC address, IP address or LAN interface, so as to determine whether the device is faulty and whether the device needs to be replaced to resolve the alarm.

[0092] In a specific embodiment, traffic statistics based on physical LAN ports are supported to adapt to the scenario of fixed downstream device types. For better explanation, the following example is given: when deploying devices on a bus, the downstream device of LAN1 can be fixed as an IPC type device, and the downstream device of LAN2 can be a card reader. If the IPC device fails, the traffic used by the IPC will not be counted, and the traffic rate will be 0. This can quickly find that there is a problem with the IPC device and locate the faulty device in LAN1, thereby reducing the manual input of fault location. After replacing the new IPC device, there is no need to modify any configuration. The traffic counted by LAN1 is still the business traffic of the IPC device.

[0093] In a specific embodiment, see Figure 6 , Figure 6A flowchart of a method for processing flow data of a hanging device provided in another embodiment is specifically as follows: the program starts by first obtaining the IP and MAC addresses of the hanging device, obtaining the flow used by the hanging device according to the statistical strategy selected by the local webpage or remote platform, organizing and counting the data into daily, weekly, and monthly flows, and then storing the data in the system, and subsequently synchronizing the data to the local webpage for display and reporting to the TR069 platform for display. It is determined whether the flow rate of the hanging device is 0 for more than one hour, and if so, an alarm of "the hanging device may fail" is reported to the local webpage and the TR069 platform. The alarm configuration preset by the local webpage or remote platform is obtained, including flow warning, flow limit, and monthly settlement date configuration, and it is determined whether the monthly used flow reaches the flow warning and whether the monthly used flow exceeds the flow limit. If the flow warning is reached, the local webpage displays an alarm and reports the alarm information to the remote platform. If the monthly used flow exceeds the flow limit, the network disconnection operation will be executed, and the used flow can be manually cleared to restore the network status, or when the monthly settlement date comes, the used flow will also be automatically cleared. If there are no alarms or traffic limit exceeded, traffic statistics will continue to be collected.

[0094] This embodiment obtains the protocol address, physical address and LAN interface of the downstream device, and performs traffic data statistics through a preset bandwidth statistics tool; when the traffic statistics strategy selected by the user is the account traffic statistics strategy, the account traffic data is obtained according to the protocol address of the downstream device; when the traffic statistics strategy selected by the user is the device traffic statistics strategy, the device traffic data is obtained according to the physical address of the downstream device; when the traffic statistics strategy selected by the user is the interface traffic statistics strategy, the interface traffic data is obtained according to the LAN interface of the downstream device; and after each traffic statistics strategy completes the traffic data statistics, the traffic monitoring operation and exception handling operation are performed on the traffic data obtained by statistics. This embodiment controls and counts the data traffic of industrial monitoring terminal products, ensures that the system's data throughput is stable and orderly, and also avoids the terminal or sub-terminal failure from forming a data peak that impacts the system's resource configuration.

[0095] Embodiment 2

[0096] See also Figure 2 , Figure 2 It is a structural diagram of a device for processing flow data of a downstream device provided by an embodiment of the present invention, comprising: a data acquisition module 201, a strategy selection module 202, a first strategy module 203, a second strategy module 204 and a third strategy module 205;

[0097] The data acquisition module 201 is used to acquire the protocol addresses, physical addresses and local area network interfaces of several downstream devices;

[0098] The strategy selection module 202 is used to determine the traffic statistics strategy selected by the user;

[0099] The first strategy module 203 is used to obtain account traffic data corresponding to the protocol address of each of the downstream devices through a preset bandwidth statistics tool according to the protocol addresses of the downstream devices when the traffic statistics strategy is an account traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the account traffic data;

[0100] The second strategy module 204 is used to obtain device traffic data corresponding to the physical address of each of the downstream devices through a preset bandwidth statistics tool according to the physical addresses of the downstream devices when the traffic statistics strategy is the device traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the device traffic data;

[0101] The third strategy module 205 is used to obtain the interface traffic data corresponding to the LAN interface connected to each of the downstream devices through a preset bandwidth statistics tool according to the LAN interfaces of the downstream devices when the traffic statistics strategy is the interface traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the interface traffic data.

[0102] As an improvement of the above solution, the data acquisition method of the preset bandwidth statistics tool includes:

[0103] The preset broadband statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

[0104] As an improvement of the above solution, the flow monitoring operation is specifically as follows:

[0105] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value;

[0106] When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated;

[0107] When the account traffic usage rate or device traffic usage rate of any of the offline devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated;

[0108] When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

[0109] As an improvement of the above solution, the exception handling operation is specifically as follows:

[0110] identifying a prompt generated by the flow monitoring operation;

[0111] When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained;

[0112] When generating a device fault prompt, if the account traffic usage rate is equal to the first speed threshold, then the physical parameters of the first faulty downstream device are confirmed according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; if the device traffic usage rate is equal to the first speed threshold, then the physical parameters of the second faulty downstream device are confirmed according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the downstream device according to the physical parameters of the second faulty downstream device;

[0113] When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

[0114] This embodiment obtains the protocol address, physical address and LAN interface of the hanging device through the data acquisition module, and judges the traffic statistics strategy selected by the user through the strategy selection module. When the user selects the account traffic statistics strategy, the first strategy module obtains the account traffic data of the hanging device through the bandwidth statistics tool according to the protocol address, and performs traffic monitoring operations and exception handling operations; when the user selects the device traffic statistics strategy, the second strategy module obtains the device traffic data of the hanging device through the bandwidth statistics tool according to the physical address, and performs traffic monitoring operations and exception handling operations; when the user selects the interface traffic statistics strategy, the third strategy module obtains the interface traffic data of the hanging device through the bandwidth statistics tool according to the LAN interface, and performs traffic monitoring operations and exception handling operations. Compared with the prior art that can only count the device traffic through the protocol address, this embodiment counts the traffic data from three dimensions of protocol address, physical address and LAN interface, so that it can support different application scenarios to count the traffic and improve the accuracy of the traffic statistics of the hanging device.

[0115] Embodiment 3

[0116] See also Figure 7 , Figure 7 It is a schematic diagram of the structure of a terminal device provided in one embodiment of the present invention.

[0117] A terminal device of this embodiment includes: a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program, the steps of the method for processing the flow data of each downstream device in the embodiment are implemented, for example Figure 1 Alternatively, when the processor executes the computer program, the functions of each module in the above-mentioned device embodiments are realized, for example: Figure 2 All modules of the device for processing traffic data of the downstream equipment shown.

[0118] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method for processing the traffic data of the downstream device as described in any of the above embodiments.

[0119] Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0120] The processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 701 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0121] The memory 702 can be used to store the computer program and / or module, and the processor 701 implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory 702. The memory 702 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0122] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0123] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0124] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for processing flow data of a downstream device, characterized in that: include: Obtain the protocol addresses, physical addresses and LAN interfaces of several downstream devices; Determine the traffic statistics strategy selected by the user; When the traffic statistics strategy is an account traffic statistics strategy, according to the protocol addresses of the plurality of downstream devices, the account traffic data corresponding to the protocol address of each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the plurality of account traffic data; When the traffic statistics strategy is a device traffic statistics strategy, according to the physical addresses of the plurality of downstream devices, the device traffic data corresponding to the physical address of each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the plurality of device traffic data; When the traffic statistics strategy is an interface traffic statistics strategy, according to the LAN interfaces of the several downstream devices, the interface traffic data corresponding to the LAN interface connected to each of the downstream devices is obtained through a preset bandwidth statistics tool, and traffic monitoring operations and exception handling operations are performed on the several interface traffic data.

2. The method for processing flow data of downstream equipment according to claim 1, characterized in that: The data acquisition method of the preset bandwidth statistics tool includes: The preset bandwidth statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

3. The method for processing flow data of downstream equipment according to claim 2, characterized in that: The flow monitoring operation is specifically as follows: When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value; When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated; When the account traffic usage rate or device traffic usage rate of any of the downlinked devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated; When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

4. The method for processing flow data of downstream equipment according to claim 3 is characterized in that: The exception handling operation is specifically as follows: identifying a prompt generated by the flow monitoring operation; When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained; When generating a device failure prompt, if the account traffic usage rate is equal to the first speed threshold, then according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, the physical parameters of the first faulty downstream device are confirmed, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; If the device traffic usage rate is equal to the first speed threshold, then confirm the physical parameters of the second faulty hanging device according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the hanging device according to the physical parameters of the second faulty hanging device; When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

5. A device for processing flow data of a downstream device, characterized in that: include: A data acquisition module, a strategy selection module, a first strategy module, a second strategy module and a third strategy module; The data acquisition module is used to obtain the protocol addresses, physical addresses and local area network interfaces of several downstream devices; The strategy selection module is used to determine the traffic statistics strategy selected by the user; The first strategy module is used to obtain account traffic data corresponding to the protocol address of each of the downstream devices through a preset bandwidth statistics tool according to the protocol addresses of the downstream devices when the traffic statistics strategy is an account traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the account traffic data; The second strategy module is used to obtain device traffic data corresponding to the physical address of each of the downstream devices through a preset bandwidth statistics tool according to the physical addresses of the downstream devices when the traffic statistics strategy is the device traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the traffic data of the devices; The third strategy module is used to obtain the interface traffic data corresponding to the LAN interface connected to each of the downstream devices through a preset bandwidth statistics tool according to the LAN interfaces of the downstream devices when the traffic statistics strategy is the interface traffic statistics strategy, and perform traffic monitoring operations and exception handling operations on the interface traffic data.

6. The device for processing flow data of downstream equipment according to claim 5, characterized in that: The data acquisition method of the preset bandwidth statistics tool includes: The preset bandwidth statistics tool performs traffic statistics on each of the downstream devices according to the preset time period through the protocol address, physical address and local area network interface, and obtains the traffic data of each of the downstream devices; wherein the traffic data of the downstream devices includes: one or more of account traffic data, device traffic data and interface traffic data; the account traffic data includes: account traffic usage value and account traffic usage rate; the device traffic data includes: device traffic usage value and device traffic usage rate; the interface traffic data includes: interface traffic usage value and interface traffic usage rate.

7. The device for processing flow data of downstream equipment according to claim 6, characterized in that: The flow monitoring operation is specifically as follows: When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the preset traffic alarm threshold, it is determined that the traffic is insufficient and an alarm is generated; wherein the traffic usage value of the downstream device includes: one of the account traffic usage value, the device traffic usage value and the interface traffic usage value; When the aggregated traffic usage values ​​of the plurality of downstream devices are equal to the traffic limit threshold, it is determined that there is no traffic, and a restriction prompt is generated; When the account traffic usage rate or device traffic usage rate of any of the downlinked devices is equal to the first rate threshold, it is determined to be a device failure, and a device failure prompt is generated; When the interface traffic usage rate of any of the downlink devices is equal to the second rate threshold, it is determined to be an interface failure, and an interface failure prompt is generated.

8. The device for processing flow data of downstream equipment according to claim 7, characterized in that: The exception handling operation is specifically as follows: identifying a prompt generated by the flow monitoring operation; When a restriction prompt is generated, a network disconnection operation is performed. If it is recognized that the user is performing a reset operation, the restriction prompt is eliminated and the network disconnection operation is stopped; otherwise, the network disconnection operation is maintained; When generating a device failure prompt, if the account traffic usage rate is equal to the first speed threshold, then according to the protocol address corresponding to the account traffic usage rate being equal to the first speed threshold, the physical parameters of the first faulty downstream device are confirmed, so that the user can locate the first faulty downstream device according to the physical parameters of the first faulty downstream device; If the device traffic usage rate is equal to the first speed threshold, then confirm the physical parameters of the second faulty hanging device according to the physical address corresponding to the device traffic usage rate being equal to the first speed threshold, so that the user can locate the hanging device according to the physical parameters of the second faulty hanging device; When an interface fault prompt is generated, the physical parameters of the faulty LAN interface are confirmed according to the LAN interface corresponding to the interface traffic usage rate being equal to the second speed threshold, so that the user can locate the faulty LAN interface according to the physical parameters of the faulty LAN interface.

9. A computer terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements a method for processing traffic data of a downstream device as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for processing traffic data of a downstream device as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for charging net flow

    CN104022889A

  • Home gateway security monitoring method, device and system and medium

    CN109962903A