Flow statistical method, system and device, storage medium, terminal and vehicle
By implementing traffic statistics methods in the terminal, using the traffic collector to collect and parse the message data of the domain controller, the problem of inability to effectively monitor and count the domain controller port and VLAN traffic in the prior art is solved, and efficient traffic statistical analysis is achieved.
Patent Information
- Application Number
- CN202311773664.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, chips installed on domain controllers do not support traffic data statistics with relatively complex functions, resulting in the inability to effectively monitor and count the traffic of the ports and VLANs of the domain controller.
By implementing the traffic statistics method in the terminal, the traffic collector collects the message data and message transmission information of the domain controller, parses these data to obtain the domain controller port information and target traffic data information, and record it in the preset traffic statistics record.
The traffic statistics of the message transmission port and VLAN of the domain controller are realized, avoiding the need to set up a chip inside the domain controller for traffic statistics, reducing costs and improving the efficiency of traffic statistics analysis.
Smart Images

Figure CN120200942A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of the Internet, and particularly relates to a traffic statistics method, system, device, storage medium, terminal, and vehicle. Background Art
[0002] With the development of vehicle intelligence and networking, more and more electronic systems have entered the vehicle, and the amount of in-vehicle data interaction has been increasing. Therefore, by integrating an Ethernet switch on the domain controller, each domain controller is connected through the ports of the Ethernet switch, thereby realizing the data interaction of each electronic system of the vehicle.
[0003] Since the number of ports of the Ethernet switch is small, logical ports are generally divided through VLAN (Virtual Local Area Network), and the traffic of different types of services is divided into different VLANs. For the Ethernet traffic between domain controllers, there is usually a requirement for traffic monitoring of ports and VLANs, so as to reasonably plan and adjust the network topology and ensure the reasonable use of network resources.
[0004] However, the chips installed on the domain controller do not support the traffic data statistics with relatively complex functions, so it is impossible to effectively monitor and count the traffic of the ports and VLANs of the domain controller. Summary of the Invention
[0005] The embodiments of this application provide a traffic statistics method, system, device, storage medium, terminal, and vehicle, which realize the traffic statistics of the ports and VLANs of different domain controllers.
[0006] According to the first aspect of this application, a traffic statistics method is provided. This method is applied to a terminal and includes:
[0007] Receiving the packet data of at least one domain controller collected by a traffic collector and the packet transmission information for transmitting the packet data, where the packet transmission information includes at least domain controller port information; the traffic collector is connected to at least one domain controller through a network;
[0008] Parsing the packet data to obtain the target traffic data information of the target object of the target domain controller corresponding to the domain controller port information, where the target object is at least one of the packet transmission port of the domain controller or the VLAN to which the domain controller belongs;
[0009] When it is determined that the traffic statistics function is enabled, searching for the target traffic statistics record corresponding to the domain controller port information and the target object from the preset traffic statistics record;
[0010] Recording the target traffic data information in the target traffic statistics record.
[0011] Optionally, the message transmission information at least includes: a message timestamp; the target traffic statistics record further includes an average traffic rate of the target object.
[0012] After recording the target traffic data information into the target traffic statistics record, the method further includes:
[0013] Traverse the target traffic statistics record to obtain the target traffic data of the target object corresponding to the domain controller port information. The target traffic data at least includes the first traffic data information of the target object within a first period, and the first period is determined according to the message timestamp.
[0014] Calculate the average traffic rate of the target object within the first period according to the first traffic data information and the duration of the first period.
[0015] Optionally, the target traffic data further includes the peak traffic rate of the target object; the target traffic statistics record further includes the historical peak traffic rate of the target object.
[0016] After recording the target traffic data information into the target traffic statistics record, the method further includes:
[0017] In the case where the peak traffic rate is greater than the historical peak traffic rate, update the historical peak traffic rate in the target traffic statistics record to the peak traffic rate.
[0018] Optionally, the method further includes:
[0019] Record the target traffic data information in the target traffic statistics record into a preset statistical report template to generate a traffic statistics report of the target domain controller.
[0020] Optionally, after recording the target traffic data information in the target traffic statistics record into a preset statistical report template to generate a traffic statistics report of the target domain controller, the method further includes:
[0021] Clear the target memory information, where the target memory information is the memory used when generating the target traffic statistics record.
[0022] According to the second aspect of the present application, there is provided a traffic statistics system, which includes:
[0023] At least one domain controller;
[0024] A traffic collector, which is connected to at least one domain controller through a network, is used to collect the message data of at least one domain controller, and transmit the message data and the message transmission information of the message data to the terminal.
[0025] A terminal, which is communicatively connected to a traffic collector, is configured to execute any of the methods in the first aspect described above.
[0026] According to a third aspect of the present application, a terminal is provided, which includes:
[0027] A receiving module, configured to receive the message data of at least one domain controller collected by a traffic collector and the message transmission information for transmitting the message data, where the message transmission information includes at least domain controller port information; the traffic collector is connected to at least one domain controller through a network;
[0028] An analysis module, configured to analyze the message data to obtain the message element information and traffic data information of the target domain controller on the target object corresponding to the domain controller port information, where the target object is at least one of the message transmission port of the domain controller or the VLAN to which the domain controller belongs;
[0029] A searching module, configured to search for a target traffic statistics record corresponding to the domain controller port information and the target object;
[0030] A recording module, configured to record the message element information and traffic data information into the target traffic statistics record.
[0031] According to a fourth aspect of the present application, an embodiment of the present application provides a traffic statistics device, which includes: a processor and a memory storing computer program instructions;
[0032] When the processor executes the computer program instructions, it implements the traffic statistics method according to any one of the first aspect.
[0033] According to a fifth aspect of the present application, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the traffic statistics method according to any one of the first aspect is implemented.
[0034] According to a sixth aspect of the present application, an embodiment of the present application provides a computer program product, and when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the traffic statistics method according to any one of the first aspect.
[0035] According to a seventh aspect of the present application, an embodiment of the present application provides a vehicle, which includes at least one of the traffic statistics systems according to any one of the second aspect, the terminals according to any one of the third aspect, and the traffic statistics devices according to any one of the fourth aspect.
[0036] The technical solutions provided by the embodiments of the present application at least bring the following beneficial effects:
[0037] The embodiments of the present application provide a traffic statistics method, system, device, storage medium, terminal and vehicle. Among them, the traffic collector can be connected to at least one domain controller through a network, and data can be transmitted between the traffic collector and the terminal. Therefore, the terminal can obtain the packet data of the domain controller collected by the traffic collector and the packet transmission information for transmitting the packet data, and then search for the target traffic statistics record corresponding to the domain controller port information and the target object from the preset traffic statistics records. In this way, the target traffic data information to be parsed is recorded in the target traffic statistics record corresponding to the target domain controller to generate the target traffic statistics record. Among them, the target object is at least one of the packet transmission ports of the domain controller or the VLAN to which the domain controller belongs. Therefore, the embodiments of the present application can realize traffic statistics for the packet transmission ports or VLANs of the domain controller, and this statistical process is executed by a terminal outside the domain controller. Therefore, the present application can realize traffic statistics without setting a chip inside the domain controller for the above traffic statistics operation. Therefore, the present application realizes traffic statistics for the packet transmission ports and VLANs of the domain controller.
[0038] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application, and do not constitute an improper limitation to the present application.
[0040] Figure 1 is a flowchart of a traffic statistics method shown according to an exemplary embodiment;
[0041] Figure 2 is another flowchart of a traffic statistics method shown according to an exemplary embodiment;
[0042] Figure 3 is another flowchart of a traffic statistics method shown according to an exemplary embodiment;
[0043] Figure 4 is another flowchart of a traffic statistics method shown according to an exemplary embodiment;
[0044] Figure 5 is another flowchart of a traffic statistics method shown according to an exemplary embodiment;
[0045] Figure 6 is a structural block diagram of a traffic statistics system shown according to an exemplary embodiment;
[0046] Figure 7is a structural block diagram of a terminal shown according to an exemplary embodiment;
[0047] Figure 8 is a structural block diagram of a traffic statistics device shown according to an exemplary embodiment. Detailed implementation manners
[0048] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0049] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0050] As described in the background art, for the Ethernet traffic between domain controllers, there is usually a requirement for traffic monitoring of ports and VLANs in order to reasonably plan and adjust the network topology and ensure the reasonable use of network resources. However, the chips installed on the domain controllers do not support the traffic data statistics with relatively complex functions, resulting in the inability to effectively monitor and statistically analyze the traffic of the ports and VLANs of the domain controllers.
[0051] To solve the problems of the prior art, the embodiments of the present application can implement the traffic statistics of the message transmission ports or VLANs of the domain controllers, and this statistical process is executed by a terminal external to the domain controller. Therefore, the present application can implement traffic statistics without setting a chip inside the domain controller for the above traffic statistics operation. Therefore, the present application realizes the traffic statistics of the message transmission ports and VLANs of the domain controllers.
[0052] Based on this, the present application provides a traffic statistics method, system, device, storage medium, terminal, and vehicle. First, the traffic statistics method provided by the embodiments of the present application will be introduced below. The traffic statistics method may include:
[0053] Figure 1 shows a structural block diagram of the traffic statistics method provided by an embodiment of the present application. As Figure 1 shown, in one embodiment, the method is applied to a terminal, and the method may include:
[0054] S101, receiving the message data of at least one domain controller collected by a traffic collector and the message transmission information for transmitting the message data, where the message transmission information includes at least domain controller port information; the traffic collector is connected to at least one domain controller through a network;
[0055] S102. Analyze the message data to obtain the target traffic data information of the target object of the target domain controller corresponding to the domain controller port information, where the target object is at least one of the message transmission port of the domain controller or the VLAN to which the domain controller belongs;
[0056] S103. Search for the target traffic statistics record corresponding to the domain controller port information and the target object from the preset traffic statistics records;
[0057] S104. Record the target traffic data information in the target traffic statistics record.
[0058] Based on the above embodiments, the traffic collector can be connected to at least one domain controller through a network, and data can be transmitted between the traffic collector and the terminal. Therefore, the terminal can obtain the message data of the domain controller collected by the traffic collector and the message transmission information for transmitting the message data, and then search for the target traffic statistics record corresponding to the domain controller port information and the target object from the preset traffic statistics records. In this way, the target traffic data information to be analyzed is recorded in the target traffic statistics record corresponding to the target domain controller, generating the target traffic statistics record. The target object is at least one of the message transmission port of the domain controller or the VLAN to which the domain controller belongs. Therefore, the embodiments of the present application can implement traffic statistics for the message transmission port or VLAN of the domain controller, and this statistical process is executed by a terminal outside the domain controller. Therefore, the present application can implement traffic statistics without setting a chip inside the domain controller for the above traffic statistics operation. Therefore, the present application realizes traffic statistics for the message transmission port and VLAN of the domain controller.
[0059] In the above S101, "on the vehicle" means in the centralized control system, where multiple traditional ECUs (Engine control Units) with similar functions are centralized in a controller with powerful computing power and resources. This controller is called a domain controller, and "domain" here refers to a functional domain.
[0060] The domain controller on the vehicle needs to include the functions of multiple traditional ECUs. Each traditional ECU corresponds to one or more application programs in the domain controller, and the underlying drivers for controlling the actuators are uniformly managed by the domain controller. Common domain controllers include: powertrain domain controller, body domain controller, chassis domain controller, assisted driving domain controller, cockpit domain controller (or infotainment domain controller).
[0061] The traffic collector is network - connected to the domain controller via the Internet to collect the data of the interaction between the domain controller and other controllers. Specifically, the collected data includes message data and message transmission information generated during the transmission of message data. Thus, when the terminal is connected to the traffic collector, it can receive the above - mentioned data collected by the traffic collector.
[0062] As an example, message data refers to the information data transmitted through a communication protocol. In a computer network, message data is usually used to represent various control information and data in network transmission.
[0063] As an example, the message transmission information can at least include domain controller port information; the domain controller port information refers to the information of the port from which the domain controller sends message data and can be used as an identifier of the domain controller.
[0064] As an example, there may be a connection relationship between each domain controller, and the traffic collector is network - connected to at least one of multiple domain controllers.
[0065] As an example, the terminal can include a computer, a car computer, and a mobile device, etc.
[0066] In the above S102, the message data is parsed to obtain the target traffic data information generated at the target object when the domain controller port conducts data interaction.
[0067] As an example, the target traffic data information can include: traffic transmission rate, average traffic transmission rate, peak traffic rate, etc.
[0068] Each domain controller has a corresponding preset traffic statistics record. Since the domain controller port information corresponds to the domain controller, when the traffic statistics function is determined to be enabled, the target traffic statistics record corresponding to the domain controller can be queried from multiple preset traffic statistics records according to the domain controller port information.
[0069] As an example, the target traffic statistics record is a table.
[0070] As an example, the target object can include: the message transmission port of the domain controller, the VLAN to which the domain controller belongs, where the VLAN belongs to the message transmission port.
[0071] As an example, the target object is the port level of the domain controller, and each port level also has different traffic statistics records. Therefore, the target traffic statistics record corresponding to the target object of the domain controller can also be queried from multiple preset traffic statistics records according to the domain controller port information.
[0072] In the above S103, the user selects whether to enable the traffic statistics function according to their own needs, so as to determine whether it is necessary to monitor the traffic generated when the domain controller transmits message data.
[0073] As an example, the traffic statistics function corresponds to the target object. For example, if the traffic statistics function of the message transmission port is to be enabled, the traffic of the message transmission port is counted; if the traffic statistics function of the VLAN is enabled, the traffic of the VLAN is counted.
[0074] In the above S104, the parsed target traffic data information is recorded in the target traffic statistics record. Thus, when the user needs to obtain the traffic situation of the target object of the target domain controller, they can obtain it from the target traffic statistics record of the terminal.
[0075] In addition, during the process of generating the target traffic statistics record, since all the work of collection, parsing, and forming the statistics record is not carried out in the domain controller, there is no need to set a chip inside the domain controller to perform the above work, and the traffic statistics at the target object of the target domain controller is realized without modifying the software and hardware systems of the domain controller, saving costs for the traffic analysis work of the domain controller and improving the efficiency of traffic statistics analysis.
[0076] In order to increase the statistical items of traffic statistics, the present application also provides another implementation manner of the traffic statistics method.
[0077] The message transmission information may at least include: the message timestamp; the target traffic statistics record may also include the average traffic rate of the target object.
[0078] Figure 2 Shows another flowchart of the traffic statistics method provided by an embodiment of the present application, as Figure 2 shown, after the above S104, the method may further include:
[0079] S201, traverse the target traffic statistics record to obtain the target traffic data of the target object of the target domain controller corresponding to the domain controller port information, where the target traffic data at least includes the first traffic data information of the target object in the first period, and the first period is determined according to the message timestamp;
[0080] S202, calculate the average traffic rate of the target object in the first period according to the first traffic data information and the duration of the first period.
[0081] Based on the above embodiments, by determining the first period according to the message timestamp, and then traversing the target traffic statistics record to obtain the first traffic data information recorded in the first period from the target traffic statistics record, the average traffic rate within the first period can be calculated based on the first traffic data information, thereby increasing the statistical items in the target traffic statistics record and improving the statistical effect.
[0082] In the above S201, the message transmission information may further include a message timestamp. Both the message transmission information and the message data are collected from the domain controller by the traffic collector. The message timestamp can indicate the time when the domain controller generates the message data by the user. Accordingly, the message timestamp corresponds to the message data, and correspondingly, the message timestamp also corresponds to the target traffic data information, and both will be recorded in the target traffic statistics record accordingly.
[0083] According to each message timestamp, the time period between two message timestamps is determined as the first period. Traversing the target traffic statistics record can respectively find the target traffic data information corresponding to the two message timestamps, so as to determine the traffic data difference between the two target traffic data information as the target traffic data, that is, the traffic data generated by the target object of the target domain controller corresponding to the domain controller port information within the first period.
[0084] In the above S202, after determining the duration of the first period and the generated traffic data as the target traffic data, by calculating the quotient of the target traffic data and the first period, the average traffic rate of the target object within the first period can be obtained.
[0085] To ensure the accuracy of the traffic rate peak, the present application also provides another implementation manner of the traffic statistics method.
[0086] The target traffic data may further include the traffic rate peak of the target object; the target traffic statistics record may further include the historical traffic rate peak of the target object.
[0087] Figure 3 shows another flow diagram of the traffic statistics method provided by an embodiment of the present application. As Figure 3 shown, after the above S104, the method may further include:
[0088] S301, when the traffic rate peak is greater than the historical traffic rate peak, update the historical traffic rate peak in the target traffic statistics record to the traffic rate peak.
[0089] Based on the above embodiments, after obtaining the target traffic data each time, the historical traffic rate peak in the target traffic statistics record is compared with the traffic rate peak in the target traffic data, and the maximum value of the two is determined as the actual traffic rate peak, thereby ensuring that the traffic rate peak recorded in the target traffic statistics record is always the maximum value, and thus ensuring the accuracy of the traffic rate peak in the target traffic statistics record.
[0090] In the above S301, the rate peak recorded in the target traffic statistics record is the historical traffic rate peak, while the target traffic data newly parsed includes the rate peak of the target object as the traffic rate peak. In order to ensure that the rate peak recorded in the target traffic statistics record is always the maximum value, it is also necessary to compare the newly obtained traffic rate peak with the historical traffic rate peak, and determine whether to update and replace in the target traffic statistics record according to the comparison result.
[0091] In the case where the traffic rate peak is greater than the historical traffic rate peak, it means that the historical traffic rate peak is not the real maximum value now. Therefore, it is necessary to update the historical traffic rate peak to the maximum value between the two, that is, the traffic rate peak.
[0092] On the contrary, there is no need to update, and the rate peak recorded in the target traffic statistics record remains the historical traffic rate peak.
[0093] To more clearly reflect the traffic statistics results, the present application also provides another implementation manner of the traffic statistics method.
[0094] Figure 4 Another process schematic diagram of the traffic statistics method provided by an embodiment of the present application is shown. As Figure 4 shown, after the above S104, the method may further include:
[0095] S401, record the target traffic data information in the target traffic statistics record into a preset statistical report template to generate a traffic statistics report of the target domain controller.
[0096] Based on the above embodiments, by generating a traffic statistics report according to the traffic statistics record, the user can directly understand the traffic statistics of the target domain controller at any time according to the traffic statistics report, so that the user can obtain the traffic statistics of the target domain controller more directly and accurately.
[0097] In the above S401, each traffic statistics record has a corresponding preset statistics report template. When the user needs to generate a traffic statistics report for the target traffic statistics record, the user only needs to fill in the target traffic data information in the target traffic statistics record into the preset report template corresponding to the target traffic statistics record, and then the traffic statistics report can be obtained. Further, the traffic statistics report can also be printed out through the terminal to obtain a portable traffic statistics report.
[0098] As an example, the user can select the traffic statistics template they need from the traffic statistics report template library according to their own needs.
[0099] To ensure the stability of the execution of this method, the present application also provides another implementation manner of the traffic statistics method.
[0100] Figure 5 Another process schematic diagram of the traffic statistics method provided by an embodiment of the present application is shown. As Figure 5 shown, after the above S401, the method may further include:
[0101] S501, clear the target memory information, where the target memory information is the memory used when generating the target traffic statistics record.
[0102] Based on the above embodiment, after the traffic statistics report is generated, the target memory information related to the traffic statistics report is no longer useful. Therefore, by clearing the target memory information related to the traffic statistics report in the terminal, the memory during the operation of the terminal is reduced, ensuring the stability of the terminal operation.
[0103] In the above S501, during the process of generating the traffic statistics report by the terminal, the terminal will generate memory information related to the target traffic statistics record. However, since the traffic statistics report has been generated, the target traffic statistics record used when generating the traffic statistics report will no longer be needed, so it can be directly cleared to reduce the memory occupied by the target memory information in the terminal, improve the operation speed of the terminal, and the stability when executing the method of the present application.
[0104] It should be noted that the application scenarios described in the above embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems; and, the new embodiments of the present application can be combined with each other, and the new solutions formed by combining each embodiment are within the protection scope of the present application.
[0105] Based on the same inventive concept, the present application also provides a traffic statistics system 600. Specifically, in combination withFigure 6 A detailed description will be given.
[0106] Figure 6 FIG. shows a schematic hardware structure diagram of a traffic statistics system 600 provided by an embodiment of the present invention.
[0107] As Figure 6 shown, the traffic statistics system 600 may include:
[0108] At least one domain controller 610;
[0109] A traffic collector 620, which is connected to at least one domain controller 610 through a network, is used to collect packet data of at least one domain controller 610, and transmit the packet data and the packet transmission information of the packet data to the terminal.
[0110] A terminal 630, which is communicatively connected to the traffic collector 620, and the terminal 630 is used to execute any one of the above methods.
[0111] Based on the same inventive concept, the present application also provides a terminal. Specifically, a detailed description will be given in combination with Figure 7 A detailed description will be given.
[0112] Figure 7 FIG. shows a schematic hardware structure diagram of the terminal 630 provided by an embodiment of the present invention.
[0113] As Figure 7 shown, the terminal 630 may include:
[0114] A receiving module 631, which is used to receive the packet data of at least one domain controller collected by the traffic collector and the packet transmission information for transmitting the packet data, and the packet transmission information at least includes domain controller port information; the traffic collector is connected to the at least one domain controller through a network connection;
[0115] An analysis module 632, which is used to analyze the packet data to obtain the packet element information and traffic data information of the target domain controller on the target object corresponding to the domain controller port information, and the target object is at least one of the packet transmission port of the domain controller or the VLAN to which the domain controller belongs;
[0116] A search module 633, which is used to search for the target traffic statistics record corresponding to the domain controller port information and the target object;
[0117] A recording module 634, which is used to record the packet element information and the traffic data information into the traffic statistics record.
[0118] Based on the above embodiments, the traffic collector can be connected to at least one domain controller through a network, and data transmission can be performed between the traffic collector and the terminal. Therefore, the terminal receiving module 631 can obtain the packet data of the domain controller collected by the traffic collector and the packet transmission information for transmitting the packet data. In this way, the target traffic data information parsed by the module to be parsed 632, and then the searching module 633 searches for the target traffic statistics record corresponding to the domain controller port information and the target object from the preset traffic statistics records. The recording module 634 records it in the target traffic statistics record corresponding to the target domain controller to generate the target traffic statistics record. Wherein, the target object is at least one of the packet transmission port of the domain controller or the VLAN to which the domain controller belongs. Therefore, the embodiment of the present application can implement traffic statistics on the packet transmission port or VLAN of the domain controller, and this statistical process is executed by a terminal outside the domain controller. Therefore, the present application can implement traffic statistics without setting a chip inside the domain controller to perform the above traffic statistics operation. Therefore, the present application realizes traffic statistics on the packet transmission port and VLAN of the domain controller.
[0119] Optionally, the terminal 630 may include:
[0120] A traversing module, configured to traverse the target traffic statistics record to obtain the target traffic data of the target object of the target domain controller corresponding to the domain controller port information. The target traffic data includes at least the first traffic data information of the target object in the first period, and the first period is determined according to the packet timestamp;
[0121] A calculating module, configured to calculate the average traffic rate of the target object in the first period according to the first traffic data information and the duration of the first period.
[0122] Optionally, the terminal 630 may further include:
[0123] An updating module, configured to update the historical traffic rate peak in the target traffic statistics record to the traffic rate peak when the traffic rate peak is greater than the historical traffic rate peak.
[0124] Optionally, the terminal 630 may further include:
[0125] A generating module, configured to generate a traffic statistics report of the target domain controller according to the traffic statistics record.
[0126] Optionally, the terminal 630 may further include:
[0127] A cleaning module, configured to clean the target memory information, where the target memory information is related to the traffic statistics report.
[0128] The traffic statistics method provided by the embodiment of the present application can achieveFigures 1 - 5 Each process implemented by any embodiment of the traffic statistics method can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0129] Figure 8 FIG. shows a schematic hardware structure diagram of a traffic statistics device provided by an embodiment of the present invention.
[0130] The traffic statistics device may include a processor 701 and a memory 702 storing computer program instructions.
[0131] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0132] The memory 702 may include a mass storage for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In a suitable case, the memory 702 may include a removable or non-removable (or fixed) medium. In a suitable case, the memory 702 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 702 is a non-volatile solid state memory.
[0133] In a particular embodiment, the memory 702 may include a read only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory 702 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors 701), it is operable to perform the operations described with reference to the method according to one aspect of the present application.
[0134] The processor 701 reads and executes the computer program instructions stored in the memory 702 to implement any one of the traffic statistics methods in the above embodiments.
[0135] In one example, the traffic statistics device may further include a communication interface 703 and a bus 704. Among them, as shown in the figure, the processor 701, the memory 702, and the communication interface 703 are connected through the bus 704 and complete communication with each other.
[0136] The communication interface 703 is mainly used to implement the communication between each module, device, unit, and / or equipment in the embodiments of the present invention.
[0137] The bus 704 includes hardware, software, or both. By way of example and not limitation, the bus 704 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, a Wireless Bandwidth interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 704 may include one or more buses 704. Although the embodiments of the present application describe and illustrate a specific bus 704, the present application contemplates any suitable bus 704 or interconnect.
[0138] The traffic statistics device can be based on the current traffic statistics method, so as to implement the combination Figures 1 - 7 of the described traffic statistics method, traffic statistics system 600, and terminal 630.
[0139] In addition, an embodiment of the present application also provides a computer program product, including computer program instructions. When the computer program product is executed by the processor 701, the steps and corresponding contents of the foregoing method embodiments can be implemented.
[0140] Finally, an embodiment of the present application also provides a vehicle, which includes any one of the above-mentioned traffic statistics system 600, terminal 630, and traffic statistics device.
[0141] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, the detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0142] The functional blocks shown in the above-described structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0143] It should also be noted that in the exemplary embodiments mentioned in the present application, some methods or systems are described based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0144] As described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowchart and / or block diagram, and the combination of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable terminals to produce a machine, such that the instructions executed by the processor of the computer or other programmable terminals enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0145] As described above, the above is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.
Claims
1. A traffic statistics method, characterized in that, The method is applied to a terminal, and the method includes: Receiving packet data of at least one domain controller collected by a traffic collector and packet transmission information for transmitting the packet data, where the packet transmission information at least includes domain controller port information; the traffic collector is connected to the at least one domain controller through a network; Parsing the packet data to obtain target traffic data information of a target object of the target domain controller corresponding to the domain controller port information, where the target object is at least one of a packet transmission port of the domain controller or a VLAN to which the domain controller belongs; Searching in a preset traffic statistics record for a target traffic statistics record corresponding to the domain controller port information and the target object; Recording the target traffic data information in the target traffic statistics record.
2. The method according to claim 1, characterized in that The packet transmission information at least includes: a packet timestamp; the target traffic statistics record further includes an average traffic rate of the target object; After the step of recording the target traffic data information in the target traffic statistics record, the method further includes: Traversing the target traffic statistics record to obtain target traffic data of the target object of the target domain controller corresponding to the domain controller port information, where the target traffic data at least includes first traffic data information of the target object within a first period, and the first period is determined according to the packet timestamp; Calculating an average traffic rate of the target object within the first period according to the first traffic data information and the duration of the first period.
3. The method according to claim 1, wherein The target traffic data further includes a peak traffic rate of the target object; the target traffic statistics record further includes a historical peak traffic rate of the target object; After the step of recording the target traffic data information in the target traffic statistics record, the method further includes: When the peak traffic rate is greater than the historical peak traffic rate, updating the historical peak traffic rate in the target traffic statistics record to the peak traffic rate.
4. The method according to claim 1, wherein The method further includes: Recording the target traffic data information in the target traffic statistics record into a preset statistics report template to generate a traffic statistics report of the target domain controller.
5. The method according to claim 4, wherein After the step of recording the target traffic data information in the traffic statistics record into a preset statistics report template to generate a traffic statistics report of the target domain controller, the method further includes: Clearing target memory information, where the target memory information is the memory used for generating the target traffic statistics record.
6. A traffic statistics system, characterized in that the system includes: At least one domain controller; A traffic collector, the traffic collector is connected to the at least one domain controller through a network, and is configured to collect packet data of the at least one domain controller and transmit the packet data and the packet transmission information of the packet data to a terminal; A terminal, the terminal is communicatively connected to the traffic collector, and the terminal is configured to execute the method according to any one of claims 1-5.
7. A terminal, characterized in that, The terminal includes: A receiving module, configured to receive packet data of at least one domain controller collected by a traffic collector and packet transmission information for transmitting the packet data, where the packet transmission information at least includes domain controller port information; the traffic collector is connected to the at least one domain controller through a network; A parsing module, configured to parse the packet data to obtain packet element information and traffic data information of a target domain controller on a target object corresponding to the domain controller port information, where the target object is at least one of a packet transmission port of the domain controller or a VLAN to which the domain controller belongs; A searching module, configured to search for a target traffic statistics record corresponding to the domain controller port information and the target object from preset traffic statistics records; A recording module, configured to record the packet element information and the traffic data information into the target traffic statistics record.
8. A traffic statistics device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1-5 is implemented.
9. A computer-readable storage medium, characterized in that, Computer program instructions are stored on a computer-readable storage medium, and when the computer program instructions are executed by a processor, the method according to any one of claims 1-5 is implemented.
10. A computer program product, characterized in that, When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the method according to any one of claims 1-5.
11. A vehicle, characterized in that, The vehicle includes at least one of the traffic statistics system according to claim 6, the traffic statistics device according to claim 7, and the traffic statistics equipment according to claim 8.