CN114826976B - Statistical method and device for uplink flow data based on edge computing service - Google Patents

Statistical method and device for uplink flow data based on edge computing service Download PDF

Info

Publication number
CN114826976B
CN114826976B CN202210385315.7A CN202210385315A CN114826976B CN 114826976 B CN114826976 B CN 114826976B CN 202210385315 A CN202210385315 A CN 202210385315A CN 114826976 B CN114826976 B CN 114826976B
Authority
CN
China
Prior art keywords
port
edge computing
service program
computing service
current period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210385315.7A
Other languages
Chinese (zh)
Other versions
CN114826976A (en
Inventor
刘海潮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210385315.7A priority Critical patent/CN114826976B/en
Publication of CN114826976A publication Critical patent/CN114826976A/en
Application granted granted Critical
Publication of CN114826976B publication Critical patent/CN114826976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1432Metric aspects
    • H04L12/1435Metric aspects volume-based

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a statistical method and device of uplink flow data based on edge computing service, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring one or more edge calculation service programs of uplink flow data to be counted; determining a port rule corresponding to the edge computing service program in the current period; and acquiring uplink flow data of the edge computing service program in the current period according to the port rule. According to the embodiment, the port rule of each edge calculation service program is determined, so that the uplink flow data of each edge calculation service program can be counted independently, and the statistics of the uplink flow data is more accurate; the statistical method has smaller occupancy rate of CPU and memory resources, small performance consumption and smaller influence on the operation of the edge calculation service program.

Description

Statistical method and device for uplink flow data based on edge computing service
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for counting uplink traffic data based on edge computing service.
Background
The edge computing business program provides services to users by being integrated on the edge computing device. When the edge computing service program provides service, the uplink flow data used by the edge computing service program needs to be monitored and counted, and a basis is provided for the edge computing service charging.
At present, the monitoring method of the uplink flow data of the edge computing service program is difficult to realize accurate statistics of the uplink flow data, occupies larger CPU and memory resources, reduces the equipment performance, cannot accurately identify the uplink flow data of each edge computing service program, and has low efficiency and large performance consumption.
Disclosure of Invention
In view of this, the embodiment of the invention provides a statistical method and device for uplink traffic data based on edge computing service, which can independently count uplink traffic data of each edge computing service program, and count uplink traffic data more accurately; the statistical method has small occupancy rate of CPU and memory resources, small performance consumption and small influence on the operation of the edge calculation service program.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for counting uplink traffic data of an edge-based computing service, including:
acquiring one or more edge calculation service programs of uplink flow data to be counted;
determining a port rule corresponding to the edge computing service program in the current period;
and acquiring uplink flow data of the edge computing service program in the current period according to the port rule.
Optionally, determining a port rule corresponding to the edge computing service program in the current period includes:
identifying a service identifier, a communication protocol and a port identifier of the edge computing service program in the current period;
judging whether a port rule corresponding to the service identifier is inquired;
if yes, the queried port rule is used as the port rule corresponding to the edge computing service program in the current period;
if not, creating a port rule corresponding to the edge computing service program in the current period according to the service identifier, the communication protocol and the port identifier.
Optionally, the method further comprises:
and when the port rule corresponding to the service identifier is not queried, setting an initial value as the uplink flow data of the edge calculation service program.
Optionally, the method further comprises:
after the queried port rule is used as the port rule corresponding to the edge computing service program in the current period, judging whether the port identifier of the edge computing service program in the current period is the same as the port identifier of the edge computing service program in the previous period;
if not, creating a new port rule corresponding to the service identifier according to the service identifier, the communication protocol and the port identifier of the edge computing service program in the current period, taking the new port rule as the port rule corresponding to the edge computing service program in the next period, and deleting the port rule corresponding to the edge computing service program in the current period.
Optionally, the duration of the current period, the previous period, and the next period are the same.
Optionally, the method further comprises: after the uplink flow data of the edge computing service program in the current period is obtained according to the port rule, the uplink flow data in the current period is assembled according to a private protocol, and the assembled data packet is sent to a server.
Optionally, the port rule is a custom iptables rule of the OUTPUT chain.
According to still another aspect of the embodiment of the present invention, there is provided a statistics device for calculating uplink traffic data of a service based on an edge, including:
the first acquisition module acquires one or more edge calculation service programs of uplink flow data to be counted;
the determining module is used for determining a port rule corresponding to the edge computing service program in the current period;
and the second acquisition module acquires uplink flow data of the edge computing service program in the current period according to the port rule.
According to another aspect of an embodiment of the present invention, there is provided an electronic apparatus including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the statistical method for uplink traffic data based on edge computing services provided by the invention.
According to still another aspect of the embodiment of the present invention, there is provided a computer readable medium having stored thereon a computer program, which when executed by a processor, implements the statistical method for uplink traffic data based on an edge computing service program provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: and acquiring one or more edge computing service programs of the uplink flow data to be counted, determining a port rule of each edge computing service program in the current time period, and further acquiring the uplink flow data of each edge computing service program in the current time period. The method of the embodiment of the invention realizes the monitoring of the uplink flow data of different edge calculation service programs through the port rule, effectively ensures the accuracy of the uplink flow data, and has less CPU and memory resources occupation, less performance consumption and less influence on the operation efficiency of the edge calculation service programs when the statistical method of the uplink flow data is used for statistics.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a statistical method of uplink traffic data based on an edge computing service according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the main flow of a method for determining port rules corresponding to an edge computation service program in a current period of time according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a main flow of a method for determining port rules corresponding to an edge computation service program in a next period according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a main flow of a statistical method of uplink traffic data based on edge computing service according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of main modules of a statistics device for calculating uplink traffic data of a service based on an edge according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main flow of a statistical method of uplink traffic data based on edge computing service according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101: acquiring one or more edge calculation service programs of uplink flow data to be counted;
step S102: determining a port rule corresponding to an edge computing service program in a current period;
step S103: and acquiring uplink flow data of the edge computing service program in the current period according to the port rule.
In the embodiment of the invention, the edge computing service program refers to an open platform integrating network resources, computing, storage and application core capabilities provided by edge computing equipment (such as a wireless router) on one side close to an object or data source, and provides services for users in a nearby distributed manner. Aiming at edge computing equipment deployed with one or more edge computing service programs, uplink flow data generated by each edge computing service program needs to be counted respectively, and basis is provided for flow charging of the edge computing service programs.
When counting the uplink data traffic of the edge calculation service program, firstly acquiring one or more edge calculation service programs of the uplink traffic data to be counted, wherein the one or more edge calculation service programs of the uplink traffic data to be counted can be all or pre-designated; the acquisition mode may be a timed or non-timed scanning mode, and the edge computing service program to be counted up traffic data obtained by scanning in different time periods may be different because a newly started or closed edge computing service program may occur.
After one or more edge computing service programs of the uplink flow data to be counted are obtained, the one or more edge computing service programs are identified to determine a port rule corresponding to each edge computing service program in the current period, and then the corresponding uplink flow data is obtained according to the port rule.
In an embodiment of the present invention, as shown in fig. 2, determining a port rule corresponding to an edge computing service program in a current period includes:
step S201: identifying a service identifier, a communication protocol and a port identifier of the edge computing service program in the current period;
step S202: judging whether a port rule corresponding to the service identifier is inquired; if yes, go to step S203, if no, go to step S204;
step S203: taking the inquired port rule as a port rule corresponding to the edge computing service program in the current period;
step S204: and creating a port rule corresponding to the edge computing service program in the current period according to the service identifier, the communication protocol and the port identifier.
In the embodiment of the invention, the service identifier can be the service program name of the edge computing service program, the communication protocol comprises two types of UCP protocol and TCP protocol, and the port identifier is a port number. And after the service identification, the communication protocol and the port identification of the edge computing service program are identified, registering basic data of the edge computing service program, and correspondingly storing the service identification, the communication protocol and the port identification with the edge computing service program.
Then judging whether a port rule corresponding to the service identification of the edge computing service program can be queried; if the data can be inquired, reading the uplink flow data of the edge computing service program according to the inquired port rule; if no query is found, it is indicated that the edge computing service program may be newly added, and no corresponding port rule exists, and a port rule corresponding to the newly added edge computing service program needs to be created.
And creating a port rule corresponding to the newly added edge computing service program according to the service identifier, the communication protocol and the port identifier of the edge computing service program, and correspondingly storing the port rule and the service identifier, so that the port rule corresponding to the service identifier can be queried in the next period, and uplink flow data can be read according to the port rule.
In the embodiment of the invention, the port rule is a custom iptables rule of the OUTPUT chain. The port rule service may also be custom iptables rules of a custom rule chain. The iptables rule can track the process of transmitting the data packet by the linux operating system, and the transmitting process of the data packet in the linux system is changed to pass through the iptables rule, so that the passing data and statistical information can be read on the iptables rule, namely, the uplink flow data can be read.
When the port rule corresponding to the service identifier is not queried, setting an initial value as uplink flow data of the edge calculation service program. The initial value is set by user definition, for example, may be 0, that is, statistics of uplink traffic data is performed after creating a port rule corresponding to the newly added edge calculation service program.
In the embodiment of the invention, the data identifier corresponding to each edge computing service program can be set for the data sent by the edge computing service program, the port rule is created according to the data identifier, and then the uplink flow data of the edge computing program can be obtained by collecting the data identifier.
In an embodiment of the present invention, as shown in fig. 3, after taking the queried port rule as the port rule corresponding to the edge computing service program in the current period, the method further includes:
step S301: judging whether the port identification of the edge computing service program in the current period is the same as the port identification of the edge computing service program in the previous period; if yes, go to step S302, if no, go to step S303;
step S302: taking the port rule corresponding to the service identifier in the current period as the port rule corresponding to the edge calculation service program in the next period;
step S303: creating a new port rule corresponding to the service identifier according to the service identifier, the communication protocol and the port identifier of the edge computing service program in the current period, taking the new port rule as the port rule corresponding to the edge computing service program in the next period, and deleting the port rule corresponding to the edge computing service program in the current period.
Optionally, the duration of the current period, the previous period, and the next period are the same. The time length range can be set according to actual conditions, the time length is too long, so that inaccurate data statistics is easily caused, the time length is too short, reporting is frequent, network resources are occupied, and the operation efficiency of the edge computing service program is affected; it may be set to 3 to 8 minutes, for example, 5 minutes.
When the time length of the current time period, the previous time period and the next time period are the same, namely when the uplink flow data of the edge calculation service program are acquired at regular time, the port identifications in the previous time period and the current time period are scanned at the same time, whether the port identifications are changed or not is judged, and the port rule of the edge calculation service program in the next time period is determined. In practical situations, the port identification of the data sent by the edge computing service program is dynamically changed, and the port rule corresponding to the service identification can be updated in time after the port identification is changed by scanning the port identification at regular time, so that the problem that the statistics of the uplink flow data is inaccurate after the port identification of the data sent by the edge computing service program is changed is prevented, the error of the statistics of the uplink flow data is reduced, and the statistics result is more accurate.
Optionally, the duration of the current period, the previous period and the next period may also be different, and the duration of each period may be set in a customized manner.
In an embodiment of the present invention, the statistical method further includes: after the uplink flow data of the edge computing service program in the current period is obtained according to the port rule, the uplink flow data in the current period is assembled according to the private protocol, and the assembled data packet is sent to the server. So that the server can record and display the collected uplink flow data.
The private protocol is a private protocol of the traffic statistics platform on the server side. And assembling the data packet into a message according to a private protocol, and sending the message to a server through a network, and optionally, after assembling uplink flow data in the current period of the edge calculation program, sending the assembled data packet to a cloud platform server.
The method comprises the steps of calculating uplink flow data of a service program through periodical statistics edges, reporting the collected uplink flow data to a flow management platform of a server, wherein the uplink flow data is used as an important basis for settlement of flow expense of the edge calculation service program, and the flow management platform can draw a flow data graph according to the collected uplink flow data and then calculate flow expense in a preset time period (such as every day) according to a flow calculation scheme.
The uplink flow data of the edge calculation service program counted by the method of the embodiment of the invention is compared with the flow data of the professional flow counting tool, if the data error is within the preset error range (such as 3%), the accuracy requirement is met, and the service cost calculation and the data flow image display can be met.
During testing, the uplink flow data of the edge calculation service program acquired by the method of the embodiment of the invention can be compared with the real flow data, if the data error is within 3%, factors such as a packet header and data retransmission are considered, the data error is determined to be within an allowable range, and the uplink flow data counted by the statistical method of the embodiment of the invention is illustrated to meet the precision requirement. The uplink flow data counted by the method of the embodiment of the invention can also be formed into a flow data waveform diagram, the flow data diagram counted by the same time period and the user side is compared, if the data error between the data diagram and the user side is within 3%, the accuracy requirement is met, and the accuracy of the counting method of the embodiment of the invention is higher.
Fig. 4 is a flow chart of a statistical method of uplink traffic data based on edge computing service according to an embodiment of the present invention. Starting an uplink flow reporting task, scanning each edge computing service program every 5 minutes by a timer, and identifying a service identifier, a communication protocol and a port identifier of each edge computing service program; judging whether an iptables rule corresponding to a service identifier is inquired, if so, reading uplink flow data of the edge computing service program within 5 minutes according to the corresponding iptables rule, meanwhile judging whether the port identifier of the edge computing service program is changed, if so, creating a new iptables rule according to the service identifier, the communication protocol and the updated port identifier, and taking the new iptables rule as the iptables rule corresponding to the edge computing service program in the next 5 minutes, and deleting the old iptables rule, namely the iptables rule corresponding to the edge computing service program in the 5 minutes; if not, marking the uplink flow data of the corresponding edge computing service program within 5 minutes as 0, and creating an iptables rule according to the service identification, the communication protocol and the port identification of the edge computing service program as the iptables rule of the edge computing service program within the next 5 minutes; and assembling the uplink flow of each edge calculation service program within 5 minutes, and sending the assembled data packet to the server according to a private protocol so that the server calculates the flow cost according to the uplink flow data.
According to the statistical method for the uplink flow data based on the edge computing service program, provided by the embodiment of the invention, under the condition that the operation of the edge computing service program is not affected, the uplink flow data of each edge computing service program can be respectively and independently counted through the port rule, two protocol types of UDP and TCP are supported, the uplink flow data of multiple ports are supported to be dynamically monitored, the port rule can be dynamically adjusted according to the port identification, and the accuracy of data statistics is improved; when the statistical method is used for counting the uplink flow data, the occupied CPU and memory resources are small, the original operation efficiency of the edge computing equipment is not reduced, the performance consumption of the edge computing equipment is small, and the monitoring and checking of the operation condition of the uplink flow of the edge computing equipment are facilitated.
As shown in fig. 5, an embodiment of the present invention further provides a statistics device 500 for calculating uplink traffic data of a service based on an edge, including:
a first obtaining module 501, configured to obtain one or more edge computing service programs of uplink traffic data to be counted;
a determining module 502, configured to determine a port rule corresponding to the edge computing service program in the current period;
the second obtaining module 503 obtains uplink traffic data of the edge computing service program in the current period according to the port rule.
In an embodiment of the present invention, the determining module 502 is further configured to: identifying a service identifier, a communication protocol and a port identifier of the edge computing service program in the current period; judging whether a port rule corresponding to the service identifier is inquired; if yes, the queried port rule is used as the port rule corresponding to the edge computing service program in the current period; if not, creating a port rule corresponding to the edge computing service program in the current period according to the service identifier, the communication protocol and the port identifier.
In the embodiment of the present invention, the determining module 502 is further configured to: when the port rule corresponding to the service identifier is not queried, setting an initial value as uplink flow data of the edge calculation service program.
In the embodiment of the invention, the device further comprises a judging module and an updating module, wherein the judging module is used for: after the queried port rule is used as the port rule corresponding to the edge computing service program in the current period, judging whether the port identification of the edge computing service program in the current period is the same as the port identification of the edge computing service program in the previous period.
In an embodiment of the present invention, an update module is configured to: when the port identification of the edge computing service program in the current period is different from the port identification of the edge computing service program in the previous period, creating a new port rule corresponding to the service identification according to the service identification, the communication protocol and the port identification of the edge computing service program in the current period, taking the new port rule as the port rule corresponding to the edge computing service program in the next period, and deleting the port rule corresponding to the edge computing service program in the current period.
Optionally, the duration of the current period, the previous period, and the next period are the same.
In the embodiment of the invention, the device further comprises a sending module, which is used for: after the uplink flow data of the edge computing service program in the current period is obtained according to the port rule, the uplink flow data in the current period is assembled according to the private protocol, and the assembled data packet is sent to the server.
Optionally, the port rule is a custom iptables rule of the OUTPUT chain.
The embodiment of the invention also provides electronic equipment, which comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors realize the statistical method of the uplink traffic data based on the edge computing service.
The embodiment of the invention also provides a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the statistical method of the uplink traffic data based on the edge computing service of the embodiment of the invention.
Fig. 6 illustrates an exemplary system architecture 600 to which the statistical method of upstream traffic data based on edge computing traffic or the statistical apparatus of upstream traffic data based on edge computing traffic of the embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, edge computing devices 604, and a server 605. Media providing communication links between terminal devices 601, 602, 603 and edge computing device 604, and between edge computing device 604 and server 605 via a network. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 using the terminal devices 601, 602, 603 through the edge computing device 604 to receive or send messages, etc. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 601, 602, 603. One or more edge computing business programs, i.e., client software programs, such as shopping class client programs, social platform client programs, etc., may be deployed on the edge computing device 604.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
Edge computing device 604 may be a device that provides network resources, computing power, storage space, including wireless routers, and the like.
The server 605 may be a server providing various services, or may be a cloud platform, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using terminal devices 601, 602, 603, or a background management server or cloud platform providing support for edge computing business programs of edge computing devices. The background management server may analyze the received upstream traffic data and the like, and feed back the processing result (e.g., the target push information, the product information—merely an example) to the terminal device.
It should be noted that, the statistical method for the uplink traffic data based on the edge computing service provided in the embodiment of the present invention is generally executed by the edge computing device 604, and accordingly, the statistical apparatus for the uplink traffic data based on the edge computing service is generally disposed in the edge computing device 604.
It should be understood that the number of terminal devices, edge computing devices, and servers in fig. 6 are merely illustrative. There may be any number of terminal devices, edge computing devices, and servers, as desired for implementation.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium 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 the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-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 computer readable signal medium may also be any computer readable medium that is not a computer 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. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a first acquisition module, a determination module, and a second acquisition module. The names of these modules do not in any way limit the module itself, and for example, the first acquisition module may also be described as "a module that acquires one or more edge computation service programs of the upstream traffic data to be counted".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: acquiring one or more edge calculation service programs of uplink flow data to be counted; determining a port rule corresponding to an edge computing service program in a current period; and acquiring uplink flow data of the edge computing service program in the current period according to the port rule.
According to the technical scheme of the embodiment of the invention, the statistical method of the uplink flow data based on the edge computing service program can respectively and independently count the uplink flow data of each edge computing service program through the port rule under the condition that the operation of the edge computing service program is not influenced, supports two protocol types of UDP and TCP, supports the dynamic monitoring of the uplink flow data of multiple ports, can dynamically adjust the port rule according to the port identification, and improves the accuracy of data statistics; when the statistical method is used for counting the uplink flow data, the occupied CPU and memory resources are small, the original operation efficiency of the edge computing equipment is not reduced, the performance consumption of the edge computing equipment is small, and the monitoring and checking of the operation condition of the uplink flow of the edge computing equipment are facilitated.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The statistical method of the uplink flow data based on the edge computing service is characterized by comprising the following steps:
acquiring one or more edge calculation service programs of uplink flow data to be counted;
determining a port rule corresponding to the edge computing service program in the current period;
acquiring uplink flow data of the edge computing service program in a current period according to the port rule;
wherein determining a port rule corresponding to the edge computing service program in the current period of time includes:
identifying a service identifier, a communication protocol and a port identifier of the edge computing service program in the current period;
judging whether a port rule corresponding to the service identifier is inquired;
under the condition that the port rule corresponding to the service identifier is inquired, the inquired port rule is used as the port rule corresponding to the edge calculation service program in the current period; the inquired port rule is created according to the service identification, the communication protocol and the port identification in the last period.
2. The method according to claim 1, wherein the method further comprises:
and under the condition that the port rule corresponding to the service identifier is not queried, creating the port rule corresponding to the edge computing service program in the current period according to the service identifier, the communication protocol and the port identifier.
3. The method according to claim 1, wherein the method further comprises:
and when the port rule corresponding to the service identifier is not queried, setting an initial value as the uplink flow data of the edge calculation service program.
4. The method according to claim 1, wherein the method further comprises:
after the queried port rule is used as the port rule corresponding to the edge computing service program in the current period, judging whether the port identifier of the edge computing service program in the current period is the same as the port identifier of the edge computing service program in the previous period;
if not, creating a new port rule corresponding to the service identifier according to the service identifier, the communication protocol and the port identifier of the edge computing service program in the current period, taking the new port rule as the port rule corresponding to the edge computing service program in the next period, and deleting the port rule corresponding to the edge computing service program in the current period.
5. The method of claim 4, wherein the current period, the previous period, and the next period are the same duration.
6. The method according to claim 1, wherein the method further comprises: after the uplink flow data of the edge computing service program in the current period is obtained according to the port rule, the uplink flow data in the current period is assembled according to a private protocol, and the assembled data packet is sent to a server.
7. The method of claim 1, wherein the port rule is a custom iptables rule for an OUTPUT chain.
8. An apparatus for counting uplink traffic data based on edge calculation service, comprising:
the first acquisition module acquires one or more edge calculation service programs of uplink flow data to be counted;
the determining module is used for determining a port rule corresponding to the edge computing service program in the current period;
the second acquisition module acquires uplink flow data of the edge computing service program in the current period according to the port rule;
the determining module is further configured to:
identifying a service identifier, a communication protocol and a port identifier of the edge computing service program in the current period;
judging whether a port rule corresponding to the service identifier is inquired;
under the condition that the port rule corresponding to the service identifier is inquired, the inquired port rule is used as the port rule corresponding to the edge calculation service program in the current period; the inquired port rule is created according to the service identification, the communication protocol and the port identification in the last period.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202210385315.7A 2022-04-13 2022-04-13 Statistical method and device for uplink flow data based on edge computing service Active CN114826976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210385315.7A CN114826976B (en) 2022-04-13 2022-04-13 Statistical method and device for uplink flow data based on edge computing service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210385315.7A CN114826976B (en) 2022-04-13 2022-04-13 Statistical method and device for uplink flow data based on edge computing service

Publications (2)

Publication Number Publication Date
CN114826976A CN114826976A (en) 2022-07-29
CN114826976B true CN114826976B (en) 2023-12-05

Family

ID=82537421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210385315.7A Active CN114826976B (en) 2022-04-13 2022-04-13 Statistical method and device for uplink flow data based on edge computing service

Country Status (1)

Country Link
CN (1) CN114826976B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355508A (en) * 2008-09-25 2009-01-28 中国电信股份有限公司 Method and apparatus for controlling P2P flow
CN108111320A (en) * 2016-11-24 2018-06-01 大唐移动通信设备有限公司 A kind of local service charging method, server and charging gateway
CN110389976A (en) * 2018-04-13 2019-10-29 北京京东尚科信息技术有限公司 A kind of dispatching method and device of multi-interface data
WO2019218982A1 (en) * 2018-05-16 2019-11-21 华为技术有限公司 Mobile edge computing method and device
CN110769039A (en) * 2019-10-09 2020-02-07 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
WO2020238564A1 (en) * 2019-05-24 2020-12-03 中兴通讯股份有限公司 Traffic processing method and related device, method and apparatus for establishing forwarding table, and storage medium
CN112752306A (en) * 2020-12-31 2021-05-04 西安抱朴通信科技有限公司 Service distribution method, terminal, system and storage medium
CN112769796A (en) * 2020-12-30 2021-05-07 华北电力大学 Cloud network side collaborative defense method and system based on end side edge computing
CN112788644A (en) * 2020-12-31 2021-05-11 西安抱朴通信科技有限公司 Edge distribution system and method for service data in mobile network
CN113381905A (en) * 2021-05-19 2021-09-10 北京安信智通科技有限公司 Data information synchronization method and device and storage medium
CN113849363A (en) * 2020-06-28 2021-12-28 华为技术有限公司 Service monitoring method and related device
CN114095562A (en) * 2020-07-31 2022-02-25 中国电信股份有限公司 Edge application discovery method and system and enhanced firewall

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108574728B (en) * 2017-03-08 2021-05-04 中兴通讯股份有限公司 Method and apparatus for traffic path change detection for moving edge computation
US10567269B2 (en) * 2018-03-14 2020-02-18 International Business Machines Corporation Dynamically redirecting affiliated data to an edge computing device
US11012336B2 (en) * 2019-02-26 2021-05-18 Intel Corporation Techniques to monitor control plane network traffic

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355508A (en) * 2008-09-25 2009-01-28 中国电信股份有限公司 Method and apparatus for controlling P2P flow
CN108111320A (en) * 2016-11-24 2018-06-01 大唐移动通信设备有限公司 A kind of local service charging method, server and charging gateway
CN110389976A (en) * 2018-04-13 2019-10-29 北京京东尚科信息技术有限公司 A kind of dispatching method and device of multi-interface data
WO2019218982A1 (en) * 2018-05-16 2019-11-21 华为技术有限公司 Mobile edge computing method and device
WO2020238564A1 (en) * 2019-05-24 2020-12-03 中兴通讯股份有限公司 Traffic processing method and related device, method and apparatus for establishing forwarding table, and storage medium
CN110769039A (en) * 2019-10-09 2020-02-07 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
CN113849363A (en) * 2020-06-28 2021-12-28 华为技术有限公司 Service monitoring method and related device
CN114095562A (en) * 2020-07-31 2022-02-25 中国电信股份有限公司 Edge application discovery method and system and enhanced firewall
CN112769796A (en) * 2020-12-30 2021-05-07 华北电力大学 Cloud network side collaborative defense method and system based on end side edge computing
CN112752306A (en) * 2020-12-31 2021-05-04 西安抱朴通信科技有限公司 Service distribution method, terminal, system and storage medium
CN112788644A (en) * 2020-12-31 2021-05-11 西安抱朴通信科技有限公司 Edge distribution system and method for service data in mobile network
CN113381905A (en) * 2021-05-19 2021-09-10 北京安信智通科技有限公司 Data information synchronization method and device and storage medium

Also Published As

Publication number Publication date
CN114826976A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN108810047B (en) Method and device for determining information push accuracy rate and server
WO2015024476A1 (en) A method, server, and computer program product for managing ip address attributions
CN113760982B (en) Data processing method and device
CN110727563A (en) Cloud service alarm method and device for preset customer
CN111124858B (en) Buried point-free insertion code data processing method, system, terminal equipment and storage medium
CN114826976B (en) Statistical method and device for uplink flow data based on edge computing service
CN113590017B (en) Method, electronic device and computer program product for processing data
CN108810130B (en) Method and device for planning distribution request
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN113141403B (en) Log transmission method and device
CN110020166B (en) Data analysis method and related equipment
CN113114611B (en) Blacklist management method and device
CN114924937A (en) Batch task processing method and device, electronic equipment and computer readable medium
CN112306791B (en) Performance monitoring method and device
CN111813765B (en) Method, device, electronic equipment and computer readable medium for processing abnormal data
CN113066479B (en) Method and device for evaluating model
CN113079055B (en) AGV operation data dynamic acquisition method and device
CN112884497A (en) Method and device for determining user type, electronic equipment and storage medium
CN110875856B (en) Method and apparatus for activation data anomaly detection and analysis
CN113780703A (en) Index adjusting method and device
CN111161067A (en) Method and device for determining transaction route
CN113448652A (en) Request processing method and device
CN112749204A (en) Method and device for reading data
CN110852537A (en) Service quality detection method and device
CN113157828B (en) Method and device for pushing data

Legal Events

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