Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of embodiments of the present disclosure refers to the accompanying drawings. As shown in fig. 1, the system architecture includes a gateway device 101, a relay device 102, and a terminal device 103; the gateway device 101 is a device corresponding to a gateway node in the multi-hop network, the relay device 102 is a device corresponding to a relay node in the multi-hop network, and the terminal device 103 is a device corresponding to a far-end node in the multi-hop network; the gateway device 101, the relay device 102, and the terminal device 103 may be connected via a wireless network; the terminal device 103 forwards the data to the gateway device 101 through the relay device 102, and the gateway device 101 forwards the data to a network platform to which the multihop network belongs.
Alternatively, the gateway device 101 and the relay device 102 are devices capable of data forwarding; in some embodiments, data exchanged over a network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible MarkupLanguage, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), network platform security protocol (Internet Protocol Security, IPSec), and the like. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
Optionally, the terminal Device 103 in the embodiment of the present disclosure may also be referred to as a UE (User Equipment), and in a specific implementation, the terminal Device 103 may be a mobile phone, a tablet (Tablet Personal Computer), a Laptop (Laptop Computer), a personal digital assistant (Personal Digital Assistant, PDA), a mobile internet Device (Mobile Internet Device, MID), a Wearable Device (webable Device), a vehicle-mounted Device, or the like, which is to be noted that the specific type of the terminal Device is not limited in the embodiment of the present invention.
Those skilled in the art will appreciate that the number of gateway devices, relay devices, and terminal devices in fig. 1 is merely illustrative, and that any number of gateway devices, relay devices, and terminal devices may be provided as desired. The embodiments of the present disclosure are not limited in this regard.
Under the system architecture, the embodiment of the disclosure provides a flow statistics method based on ticket data, which can be executed by any electronic device with computing processing capability.
In some embodiments, the traffic statistics method based on ticket data provided in the embodiments of the present disclosure may be executed by a terminal device of the above system architecture; in other embodiments, the traffic statistics method based on ticket data provided in the embodiments of the present disclosure may be executed by the network side device in the system architecture described above; in other embodiments, the traffic statistics method based on ticket data provided in the embodiments of the present disclosure may be implemented by the terminal device and the network device in the system architecture through an interaction manner.
Fig. 2 shows a flow chart of a flow statistics method based on ticket data in an embodiment of the disclosure, and as shown in fig. 2, the flow statistics method based on ticket data provided in the embodiment of the disclosure includes the following steps:
S202, obtaining the ticket data reported by each node in the multi-hop network step by step.
The multi-hop network is a routing network comprising a far-end node positioned at the lowest layer, a gateway node positioned at the highest layer and a multi-stage relay node positioned between the far-end node and the gateway node. The ticket data is the network traffic service condition counted by each node respectively, and can contain traffic information of each node and traffic information of sub-nodes of each node, the traffic information can be network traffic and related information consumed when the nodes in the multi-hop network forward the data, and can contain the number of consumed network traffic.
In some embodiments, while a far-end node in the multi-hop network forwards data to a gateway node through a multi-stage relay node, the far-end node generates own ticket data according to own traffic information and reports the ticket data to the relay node serving as an own upper-stage node; after receiving the ticket data reported by the remote node, the relay node generates self ticket data according to the received ticket data and the self flow information, reports the self ticket data to an upper node in the multi-stage relay node, and each stage of relay node in the multi-stage relay node operates according to the step until the uppermost stage of relay node in the multi-stage relay node reports the ticket data to the gateway node; and the gateway node generates ticket data to be reported to a network platform to which the multi-hop network belongs according to the received ticket data, and reports the ticket data to the network platform, wherein the ticket data reported by the gateway node comprises the flow information of each node and the flow information of the child node of each node in the multi-hop network.
S204, according to the ticket data, generating flow statistics results of all nodes in the multi-hop network.
The traffic statistics result is a network traffic consumption condition of each node in the multi-hop network, and may include network traffic consumed by each node in the multi-hop network when forwarding data and network traffic shared by each node to its own child node.
In some embodiments, the flow information of each node in the multi-hop network is obtained according to the call ticket data reported by the gateway node, and is used as the flow statistics result of each node in the multi-hop network, and the network topology relationship between the nodes in the multi-hop network can be further obtained according to the connection relationship between each node in the multi-hop network and the sub-node of each node.
Fig. 3 shows a flowchart for acquiring ticket data that are reported by each node in a multi-hop network step by step in the embodiment of the present disclosure, as shown in fig. 3, in the embodiment of the present disclosure, the method for acquiring ticket data that are reported by each node in a multi-hop network step by step includes the following steps:
s302, obtaining ticket data reported by a first node.
The first node is any node in the multi-hop network, and when the first node is a far-end node, the ticket data reported by the first node is flow information of the far-end node; when the first node is a relay node, the ticket data reported by the first node can contain the flow information of the relay node and the sub-nodes of the relay node; when the first node is a gateway node, the ticket data reported by the first node may include traffic information of each node in the multi-hop network.
S304, obtaining the ticket data reported by the second node.
The second node is a relay node or a gateway node, and the ticket data reported by the second node is the network traffic service conditions of the second node and the child nodes of the second node; when the second node is a relay node, the second node reports the ticket data to an upper node or a gateway node of the relay node in the multi-stage relay node; and when the second node is a gateway node, the second node reports the ticket data to the network platform.
Fig. 4 shows a flowchart of obtaining ticket data reported by a remote node when a first node is the remote node in the embodiment of the present disclosure, as shown in fig. 4, in the embodiment of the present disclosure, the method includes the following steps:
s402, obtaining flow information of data forwarded by a remote node.
The traffic information of the data forwarded by the remote node may include a source IP address, a destination IP address, a source port number, a destination port number, a transport layer protocol, and a size of the data forwarded by the remote node in a ticket duration.
S404, filling the flow information of the data forwarded by the remote node into a preset ticket data structure, and obtaining the ticket data reported by the remote node.
The preset ticket data structure is a preset table for recording network traffic use conditions of each node in the multi-hop network, and the remote node fills own traffic information into the preset ticket data structure to obtain ticket data reported by the remote node.
In some embodiments, a preset ticket data structure is further provided, where the preset ticket data structure includes a connector ticket and a sharer ticket, the connector ticket is used for recording traffic information of each node in the multi-hop network, the sharer ticket is used for recording traffic information of each node in the multi-hop network, and the preset ticket data structure is shown in table 1:
table 1, call ticket data structure
| Attributes of
|
Meaning of field
|
| ShareBill
|
Sharer ticket
|
| ConnectBill
|
Connector bill |
The data structure of the sharer ticket is shown in table 2, where the sharer ticket reports the flow information recorded in the ticket data of the child nodes of each node:
table 2, sharer bill data structure
The next level sub-list in the sharer list is used for filling the content recorded by the connector list in the sub-list data reported by the sub-nodes of each node into the next level sub-list, so that the sharer list of the current node can record the network traffic service condition of the sub-node of the current node, and the data structure of the next level sub-list is shown in table 3:
Table 3, next level child node call ticket data structure
| Attributes of
|
Data type
|
| Connector user ID
|
Character string
|
| Uplink connector traffic for the connector itself
|
Character string
|
| Downstream connector traffic for the connector itself
|
Character string
|
| Total flow of connector used by the connector
|
Character string
|
| The connector current ticket start time
|
Character string
|
| The time of the current session of the connector
|
Character string
|
| Next level child node list
|
Linked list |
The next level sub-node call ticket data structure further includes a next level sub-node call ticket list of the sub-node, which is used for recording the network traffic service condition of the sub-node, and the position of the next level sub-node call ticket data structure shown in table 3 in the call ticket data structure shown in table 1 is shown in fig. 5.
The data structure of the connector ticket in table 1 is shown in table 4:
table 4, connector bill data structure
Wherein, the positions of the connector bill data structure shown in table 4 in the bill data structure shown in table 1 are shown in fig. 6; when acquiring call ticket data reported by a gateway node, a gateway node in the multi-hop network sets a connector call ticket in a preset call ticket data structure as an empty set; and when the far-end node in the multi-hop network acquires the call ticket data reported by the far-end node, setting a sharer call ticket in a preset call ticket data structure as an empty set.
In some embodiments, when any node in the multi-hop network obtains the ticket data reported by the node, the node respectively accumulates the uplink flow of the connector per se, the downlink flow of the connector per se and the total flow of the connector per se according to the ticket data of the connector per se recorded in the ticket data of each sub node of the node to obtain the sum of the uplink flows of the sub node shared by the sharer recorded in the ticket data of the node, the sum of the downlink flows of the sub node shared by the sharer and the flow of the sub node shared by the sharer, and fills the ticket data reported by each sub node into the ticket list of the next sub node in the ticket of the sharer, so that the ticket data reported by any node in the multi-hop network all contains the ticket data of each sub node of the node.
Fig. 7 shows a flowchart of obtaining ticket data reported by a relay node when the second node is the relay node in the embodiment of the present disclosure, as shown in fig. 7, in the embodiment of the present disclosure, the method includes the following steps:
s702, obtaining the ticket data reported by the child node of the relay node.
The sub-nodes of the relay node may include a remote node and a relay node in the multi-hop network.
S704, acquiring flow information of data forwarded by the relay node.
The traffic information of the data forwarded by the relay node is the network traffic consumed when the relay node forwards the data.
S706, filling the ticket data reported by the sub-node of the relay node and the flow information of the data forwarded by the relay node into a preset ticket data structure, and obtaining the ticket data reported by the relay node.
And calculating the sharer flow according to the record of the connector ticket in the ticket data reported by the child node, filling the ticket data reported by the child node into the sharer ticket, and filling the flow information into the connector ticket.
In some embodiments, the relay node respectively accumulates the uplink flow of the connector, the downlink flow of the connector and the total flow of the connector in the ticket data reported by the child node, so as to obtain the sum of the uplink flows shared by the corresponding sharers to the child node, the sum of the downlink flows shared by the sharers to the child node and the flow shared by the sharers to the child node.
Fig. 8 shows a flowchart of obtaining ticket data reported by a gateway node when a second node is the gateway node in the embodiment of the present disclosure, as shown in fig. 8, in the embodiment of the present disclosure, the method includes the following steps:
S802, obtaining ticket data reported by a child node of a gateway node.
The sub-nodes of the gateway node are relay nodes connected with the gateway node in the multi-stage relay nodes, and the relay node connected with the gateway node is also the uppermost relay node in the multi-stage relay nodes.
S804, the ticket data uploaded by the sub-node of the gateway node is filled into a preset ticket data structure, and ticket data reported by the gateway node is obtained.
And the gateway node calculates the sharer ticket of the gateway node filled with the preset ticket structure according to the received connector ticket in the ticket data of the child node to obtain ticket data reported by the gateway node, wherein the ticket data reported by the gateway node comprises ticket data of all levels of child nodes of the gateway node, namely the ticket data reported by the gateway node comprises ticket data of all nodes in the multi-hop network.
Fig. 9 shows a flowchart for obtaining a flow statistics result of each node according to a call ticket data reported by a gateway node in the embodiment of the present disclosure, as shown in fig. 7, where the flow statistics result of each node is obtained according to a call ticket data reported by a gateway node in the embodiment of the present disclosure, and includes the following steps:
S902, acquiring flow information of each node in the multi-hop network according to the call ticket data reported by the gateway node.
The ticket data reported by the gateway node comprises flow information of each relay node and each far-end node in the multi-hop network reported layer by layer, and when the gateway node reports the ticket data to a network platform to which the multi-hop network belongs, the network platform can acquire the flow information of each node in the multi-hop network according to the data in the ticket list of the next level of child node in the ticket data.
And step S904, taking the acquired flow information of each node in the multi-hop network as a flow statistical result of each node in the multi-hop network.
The traffic statistics result is the network traffic service condition of each node in the multi-hop network recorded in the ticket data reported by the gateway node, and may include traffic information of each node. The network platform can further acquire the connection relation between the gateway node and each level of sub-node according to the next level of sub-node ticket list of the ticket data reported by the gateway node, and acquire the network topology of the multi-hop network according to the connection relation, so that the network platform displays the flow information of each node in the multi-hop network and the network topology in the multi-hop network to a user as flow statistics results.
As an alternative embodiment, fig. 10 shows a flowchart for reporting ticket data while forwarding data in a multi-hop network, and as shown in fig. 10, the method for reporting ticket data while forwarding data in a multi-hop network includes the following steps:
s1002, initializing each node in the multi-hop network.
In this step, before the multi-hop network starts forwarding data, configuration information of each node in the multi-hop network is initialized to avoid influencing the forwarding of data.
S1004, configuring virtual special network service for each node in the multi-hop network.
In this step, in order to forward data by using a virtual private network service between nodes of the multihop network, a corresponding virtual private network service needs to be configured for each node, and the configured content may include a virtual private network proxy address, a domain name system, and a route.
S1006, starting virtual special network service of each node in the multi-hop network.
In this step, a virtual private network service is started to prepare for forwarding data.
S1008, initializing a tun2socket service of each node in the multi-hop network.
In this step, the tun2sockets service of each node is a proxy forwarding service used when forwarding data by using a virtual private network service, and is configured to forward data sent by each node through the virtual private network service to statistical traffic information on the virtual network device, and forward the data from the virtual network device to a node at a previous stage of each node.
S1010, a tun2socket service of each node in the multi-hop network is started.
In this step, when the multi-hop network starts to forward data, the tun2sockets service of each node is started to forward data.
Steps S1002-S1010 described above provide for the preparation of the multi-hop network before forwarding data using the virtual private network service.
S1012, counting flow information of self forwarding data and filling the connector ticket.
In this step, after the remote node forwards the data to the virtual network device through the virtual private network service, the virtual network device counts the length, source IP address, source port, destination IP address, destination port and transport layer protocol of the data forwarded by the remote node through the virtual private network service within the ticket duration, and fills the counted information as traffic information into the connector ticket in the preset ticket data structure.
S1014, generating ticket data according to the connector ticket, and reporting the ticket data to the upper node of the remote node.
In this step, after setting the field of the sharer ticket in the preset ticket data structure to be empty, generating the ticket data to be reported by the remote node, and reporting the ticket data to the relay node connected with the remote node, where the relay node connected with the remote node is the last level node of the remote node, and the relay node is also the lowest level relay node in the multi-level relay nodes.
S1016, uploading the data to the node of the upper level of the far-end node.
In this step, the virtual network device forwards the data to the relay node that is the upper node of the remote node.
S1018, counting the flow information of the self-forwarded data and filling the connector ticket.
In the step, the relay node forwards the data to the virtual network equipment corresponding to the relay node through the virtual special network service corresponding to the relay node, the virtual network equipment counts the received data to obtain the flow information, and the flow information is filled into the connector bill in the preset bill data structure of the relay node.
S1020, the relay node receives the ticket reported by the child node and fills the shared ticket.
In the step, when the relay node is the lowest relay node in the multi-stage relay node, receiving the call ticket data reported by the remote node, and filling the received call ticket data into a sharer call ticket in a preset call ticket structure; when the relay node is a relay node except the lowest relay node in the multi-stage relay nodes, receiving the call ticket data reported by the relay node serving as a child node of the relay node, and filling the received call ticket data into a sharer call ticket in a preset call ticket structure.
And S1022, generating ticket data according to the connector ticket and the sharer ticket, and reporting the ticket data to a node at the upper level of the relay node.
In the step, ticket data reported to a previous-stage node of a relay node is generated according to a connector ticket and a sharer ticket and is sent to the previous-stage node of the relay node, wherein the previous-stage node of the relay node can be a relay node or a gateway node, and when the previous-stage node is the relay node, the steps S1018-S1022 are repeated to report ticket data step by step in the multi-stage relay node; when the relay node is a gateway node, the step S1026 is continuously executed, and the gateway node generates the call ticket data to be reported by itself according to the received call ticket data.
S1024, uploading the data to the node of the upper level of the relay node.
In the step, the virtual network device corresponding to the relay node forwards the data to the upper node of the relay node, wherein the upper node of the relay node can be the upper node or the gateway node of the relay node in the multi-stage relay node; when the upper node of the relay node is the upper node of the relay node in the multi-stage relay nodes, the relay node serving as the upper node continuously forwards data to the upper node through the virtual private network service.
S1026, receiving the ticket data uploaded by the relay node, and filling the shared ticket.
In this step, the gateway node fills the received ticket data into the sharer ticket of the preset data structure.
And S1028, generating ticket data according to the sharer ticket, and reporting the ticket data to the network platform.
Setting the field of the connector ticket in the preset data structure of the gateway node to be empty, thereby obtaining ticket data of the gateway node; the gateway node reports the ticket data to the network platform to which the multi-hop network belongs, so that a user of the network platform can know the network flow use condition of each node and the network topology among each node in the multi-hop network to which the gateway node belongs according to the ticket data uploaded by the gateway node, and can perform operations such as current limiting or rejecting on each node in the multi-hop network according to the combination actual condition.
And S1030, the gateway node downloads data from the network platform and forwards the data to the remote node.
In the step, the gateway node downloads the processing result of the data uploaded by the gateway node from the network platform to which the multi-hop network belongs, and forwards the processing result to the remote node through the multi-stage relay node.
As an alternative embodiment, fig. 11 shows a flow chart of generating ticket data by a relay node, and as shown in fig. 11, the step of generating ticket data by the relay node includes:
s1102, is a relay node a direct child node?
In this step, the direct child node refers to a subordinate relay node directly connected to the relay node. If there is a direct child node of the relay node, executing step S1104; if there is no direct child node of the relay node, step S1112 is performed.
S1104, is all direct child nodes reported in the call ticket data?
In the step, whether the relay node receives the call ticket data reported by each direct child node is judged, if the relay node receives the call ticket data reported by each direct child node, step S910 is executed; if the relay node does not receive the call ticket data reported by each direct child node, step S1106 is executed.
And S1106, waiting for the direct child node to report the ticket data.
In this step, before the relay node finishes forwarding the data to its upper node, the relay node will wait for the direct child node that does not report the ticket data to the relay node.
S1109, is the direct child node reporting the ticket data overtime?
In this step, it is determined whether the time consumed by the direct child node of the relay node from establishing connection with the relay node to reporting ticket data to the relay node exceeds a preset time interval. If the preset time interval is exceeded, stopping reporting the ticket to the relay node and continuing to execute the step S1110; if the preset time interval is not exceeded, step S1106 is executed to continue reporting the call ticket data.
S1110, generating a sharer bill according to the bill data reported by the direct child node.
In this step, the relay node fills the ticket data reported by the direct child node into the sharer ticket in the preset ticket data structure.
S1112, obtaining the connector ticket of the relay node.
In this step, the relay node populates the element and connector ticket in the flower denier data structure with traffic information of the data forwarded by itself.
And S1114, generating ticket data according to the sharer traffic and the connector traffic.
In this step, the filled connector ticket and the sharer ticket are used as ticket data to be reported by the relay node.
As an alternative embodiment, fig. 12 shows a flowchart of a far-end node or a relay node generating a connector ticket in a multi-hop network, and as shown in fig. 12, the steps of the far-end node or the relay node generating the connector ticket include:
S1202, data forwarded through the virtual private network service is acquired.
In this step, the remote node or the relay node forwards data through the virtual private network service in the form of data packets, and the data forwarded by the remote node or the relay node through the virtual private network service is obtained, that is, each data packet forwarded by the remote node or the relay node through the virtual private network service in the duration of the ticket is obtained.
S1204, obtaining traffic information of the data forwarded through the virtual private network service.
In this step, the obtained traffic information may include a source IP address, a destination IP address, a source port, a destination port, a transport layer protocol, and a length of data in each forwarded packet.
S1206, calculates the network traffic consumed by the data forwarded by the virtual private network service.
In this step, the remote node or the relay node obtains the size of the data forwarded by the remote node or the relay node through accumulating the lengths of the data in each data packet forwarded, and uses the calculated size of the data as the network traffic consumed in the data forwarding.
S1208, the traffic information and the calculated network traffic are filled into the connector ticket.
In the step, the flow information and the calculated network flow are filled into the connector bill in the preset bill data structure corresponding to the remote node or the relay node, so as to obtain the connector bill of the remote node or the relay node.
In summary, according to the flow statistics method based on ticket data provided by the present disclosure, each node in the multi-hop network forwards data while obtaining flow information of the forwarded data, and fills the obtained flow information into a preset ticket data structure, so as to obtain ticket data in which network flow service conditions of each node are recorded; each node in the multi-hop network reports call ticket data step by step while forwarding the data, so that the gateway node generates and records the call ticket data of the network traffic service condition of each node in the multi-hop network according to the received call ticket data, and reports the call ticket data to a network platform to which the multi-hop network belongs, so that a user of the network platform can clearly know the network traffic service condition of each node in the multi-hop network according to the call ticket data reported by the gateway node, and the user can conveniently adjust the multi-hop network according to the actual condition and the network traffic service condition.
Furthermore, the ticket data reported to the network platform by the gateway node can assist the user to decide whether to continue to share the traffic according to the actual network traffic usage conditions of each node while enabling the user of the network platform to check the network traffic usage conditions of the gateway node and each level of sub-nodes thereof in the multi-hop network in real time, and whether to execute operations such as current limiting, node eliminating and the like on each level of sub-nodes of the gateway node. The counted network traffic service condition of each node in the multi-hop network can also provide help for operators to develop follow-up traffic related to the traffic.
It should be noted that, in the technical solution of the present disclosure, the acquiring, storing, using, processing, etc. of data all conform to relevant regulations of national laws and regulations, and various types of data such as personal identity data, operation data, behavior data, etc. relevant to individuals, clients, crowds, etc. acquired in the embodiments of the present disclosure have been authorized.
Based on the same inventive concept, the embodiments of the present disclosure also provide a flow statistics device based on ticket data, as described in the following embodiments. Since the principle of solving the problem of the embodiment of the device is similar to that of the embodiment of the method, the implementation of the embodiment of the device can be referred to the implementation of the embodiment of the method, and the repetition is omitted.
Fig. 13 is a schematic diagram of a flow statistics device based on ticket data according to an embodiment of the disclosure, as shown in fig. 13, including:
the ticket data reporting module 1302 is configured to obtain ticket data reported by each node in the multi-hop network step by step, where the multi-hop network includes: the system comprises a far-end node positioned at the bottom layer, a gateway node positioned at the highest layer and a multi-stage relay node positioned between the far-end node and the gateway node, wherein the flow information of the node and a child node connected with the node is contained in ticket data reported by each node.
The traffic statistics module 1304 is configured to generate traffic statistics of each node in the multi-hop network according to the call ticket data.
It should be noted that, the ticket data reporting module 1302 and the flow statistics module 1304 correspond to S202 to S204 in the method embodiment, and the modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the method embodiment. It should be noted that the modules described above may be implemented as part of an apparatus in a computer system, such as a set of computer-executable instructions.
As an optional embodiment, the ticket data reporting module 1302 is further configured to obtain ticket data reported by a first node, where the first node is any node in the multi-hop network, and the ticket data reported by the first node includes: traffic information of the first node; obtaining ticket data reported by a second node, wherein the second node is a father node of the first node, and the ticket data reported by the second node comprises: traffic information for the first node and the second node.
As an optional embodiment, the ticket data reporting module 1302 is further configured to, when the first node is a remote node, obtain ticket data reported by the first node, where the ticket data reporting module includes: acquiring flow information of data forwarded by a remote node; and filling the flow information of the data forwarded by the remote node into a preset ticket data structure to acquire ticket data reported by the remote node.
As an optional embodiment, the ticket data reporting module 1302 is further configured to, when the second node is a relay node or a gateway node, obtain ticket data reported by the second node, including: acquiring call ticket data reported by a child node of a relay node; acquiring flow information of data forwarded by a relay node; and filling the ticket data reported by the sub-node of the relay node and the flow information of the data forwarded by the relay node into a preset ticket data structure to acquire the ticket data reported by the relay node.
As an optional embodiment, the ticket data reporting module 1302 is further configured, before acquiring the ticket data reported by the child node of the relay node, to further include: judging whether the child node of the relay node exists or not; if the sub-node of the relay node exists, acquiring call ticket data reported by the sub-node of the relay node; if the sub-node of the relay node does not exist, the call ticket data reported by the sub-node of the relay node is set to be null.
As an optional embodiment, the ticket data reporting module 1302 is further configured to, when the second node is a gateway node, obtain ticket data reported by the second node, including: acquiring call ticket data uploaded by a child node of a gateway node; and filling the ticket data uploaded by the child nodes of the gateway node into a preset ticket data structure to acquire ticket data reported by the gateway node.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1400 according to such an embodiment of the present disclosure is described below with reference to fig. 14. The electronic device 1400 shown in fig. 14 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 14, the electronic device 1400 is embodied in the form of a general purpose computing device. Components of electronic device 1400 may include, but are not limited to: the at least one processing unit 1410, the at least one memory unit 1420, and a bus 1430 connecting the different system components (including the memory unit 1420 and the processing unit 1410).
Wherein the storage unit stores program code that is executable by the processing unit 1410 such that the processing unit 1410 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the present description of exemplary methods. For example, the processing unit 1410 may perform the following steps of the method embodiment described above:
acquiring call ticket data reported by each node in a multi-hop network step by step, wherein the multi-hop network comprises: the system comprises a far-end node positioned at the bottom layer, a gateway node positioned at the highest layer and a multi-stage relay node positioned between the far-end node and the gateway node, wherein the flow information of the node and a child node connected with the node is contained in ticket data reported by each node.
And generating flow statistics results of all nodes in the multi-hop network according to the call ticket data.
The memory unit 1420 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 14201 and/or cache memory 14202, and may further include Read Only Memory (ROM) 14203.
The memory unit 1420 may also include a program/utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1430 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 1400 may also communicate with one or more external devices 1440 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1400, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1400 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1450. Also, electronic device 1400 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via the bus 1430. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1400, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In particular, according to embodiments of the present disclosure, the process described above with reference to the flowcharts may be implemented as a computer program product comprising: and the computer program realizes the flow statistics method based on the call ticket data when being executed by the processor.
In an exemplary embodiment of the present disclosure, there is also provided a computer readable storage medium, which may be a readable signal medium or a readable storage medium, having stored thereon a program product capable of implementing the above method of the present disclosure. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
More specific examples of the computer readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In this disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Alternatively, the program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In particular implementations, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the description of the above embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.