Network traffic control method and device, equipment, storage medium and program product
By setting a fixed capacity buffer in network traffic control and processing requests in accordance with request initiation time and first-in-first-out order, the system instability problem caused by the surge in request volume in the prior art is solved, and more effective network traffic control and system stability improvement are achieved.
Patent Information
- Application Number
- CN202411996213.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-04
AI Technical Summary
The existing network traffic control methods can easily lead to a backlog of request processing, avalanche of services, and excessive load on the network management side, affecting system stability and business security.
By setting a buffer with a fixed capacity, the procurement and control requests issued by the comprehensive network management equipment are placed into the buffer in sequence in the order of the request initiation time, and the target request is extracted from the buffer in the first-in-first-out order for processing to control the request traffic and avoid direct impact on the network management side.
Effectively buffer the request traffic from conflicting to prevent untimely request processing, reduce system instability, improve network traffic control effect, and improve system stability and business security.
Smart Images

Figure CN119766728A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of network operation and maintenance management, and in particular to a network traffic control method, device, equipment, storage medium and program product. Background Art
[0002] Figure 1 This is a flowchart of the integrated network management and control process of the existing technology. Figure 1 As shown in the figure, in the field of operation and maintenance management of mobile communication power environment, the remote "remote adjustment, remote control, and remote measurement" management of the integrated network management system and the power system equipment, air conditioning equipment, environmental monitoring equipment, etc. in the computer room is interacted through the proposed unified "protocol proxy device" (command channel). The command channel provides a unified HTTP interface for the integrated network management, receives the "remote control, remote control, and remote measurement" requests from the upper integrated network management, and realizes the intercommunication with CSC (Local Supervision Center) and LSC (Central Supervision Center) through the D and C interfaces, and forwards the received requests to the corresponding equipment, playing the role of a "connecting the upper and lower" gateway bridge.
[0003] The existing technical solutions can meet business needs when the number of acquisition and control requests is not large. However, with the increase in the number of controlled devices and the improvement of monitoring timeliness requirements, the existing technical solutions are prone to a backlog of requests when the number of requests increases sharply, and untimely request processing will lead to service avalanche; on the other hand, the command channel will forward a large number of processing requests to the network management side, which will also cause the CSC and LSC to be overloaded, affecting their own business functions and threatening the business security of the network management side and the power environment terminal equipment.
[0004] At present, the network flow control method easily causes a heavy load on the network management side, poor network flow control effect, and poor system stability. Summary of the invention
[0005] The present disclosure provides a network traffic control method, device, equipment, storage medium and program product to at least solve the problems of poor existing network traffic control effect and poor system stability.
[0006] The technical solution of the present disclosure is as follows:
[0007] The present disclosure provides a network traffic control method, including:
[0008] Receive the first acquisition and control request issued by the integrated network management equipment;
[0009] Put the first acquisition and control requests into a buffer with a fixed capacity in sequence according to the order of request initiation time;
[0010] Extract the target request from the first acquisition and control request in the buffer in a first-in-first-out order;
[0011] Sending the target request to the network management side corresponding to the target request for processing;
[0012] The request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device.
[0013] Optionally, the method further comprises:
[0014] When the fixed capacity of the buffer zone has been used up, placing the second acquisition and control request sent by the integrated network management device subsequently received into a queue waiting area;
[0015] Monitoring the waiting time of the second acquisition and control request;
[0016] In the case that the waiting time is greater than the time threshold, the second acquisition and control request is rejected, and request exception information is returned to the integrated network management device so that the integrated network management device can re-issue the second acquisition and control request.
[0017] Optionally, monitoring the waiting time of the second acquisition and control request includes:
[0018] After each of the second acquisition and control requests enters the queue waiting area, the waiting time of each of the second acquisition and control requests is determined according to the number of buffer messages, the number of queued messages and the message processing rate.
[0019] Optionally, the buffer includes: a chain queue; placing the first acquisition and control requests into a buffer with a fixed capacity in sequence according to the order of request initiation time includes:
[0020] When the number of request nodes managed by the buffer is less than the fixed capacity, a new request node is allocated from the linked queue and added to the tail of the queue; and
[0021] The new request node is used to maintain the new first acquisition and control request that enters.
[0022] Optionally, the buffer includes: a chain queue and a sliding time window; extracting the target request from the first acquisition and control request in the buffer in a first-in-first-out order includes:
[0023] According to the first-in-first-out order of the chain queue, the target request that first flows into the buffer is dequeued from the head of the queue and flows into the sliding time window;
[0024] The sliding time window generates an array of fixed size according to the set window interval;
[0025] Put the target request into the array, and start a new thread to execute the logical operation corresponding to the target request;
[0026] The target request is extracted according to the set time interval.
[0027] Optionally, the method further comprises:
[0028] When the data in the array of the sliding time window is full, destroying the sliding time window;
[0029] After the window interval is extended, a new sliding time window is generated.
[0030] Optionally, before sending the target request to the network management side corresponding to the target request for processing, the method further includes:
[0031] Perform authentication according to the token information carried in the request header of the target request to obtain an authentication result;
[0032] When the authentication result is verified to be passed, the target request is used to generate a collection and control instruction in a set data format.
[0033] The present disclosure also provides a network traffic control device, including:
[0034] A request receiving module, used for receiving a first acquisition and control request issued by the integrated network management device;
[0035] A request storage module, used to sequentially place the first acquisition and control requests into a buffer of fixed capacity in the order of request initiation time;
[0036] A request extraction module, used to extract a target request from the first acquisition and control requests in the buffer in a first-in-first-out order, wherein the target request is an acquisition and control request selected from the first acquisition and control requests in the buffer;
[0037] A request sending module, used for sending the target request to the network management side corresponding to the target request for processing;
[0038] The information uploading module is used to upload the request processing result corresponding to the target request returned by the network management side to the integrated network management device.
[0039] The present disclosure also provides an electronic device, including:
[0040] processor;
[0041] a memory for storing processor-executable instructions;
[0042] The processor is configured to execute instructions to implement each step in the above method.
[0043] The embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step in the above method is implemented.
[0044] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0045] In some embodiments of the present disclosure, the present disclosure sets a buffer of fixed capacity to buffer the first acquisition and control requests issued by the integrated network management device in the order of the request initiation time. The fixed-capacity acquisition and control requests are stored in the buffer, and there will be no excessive acquisition and control requests entering the buffer, so that burst request traffic can be buffered; in a first-in-first-out order, the target request is extracted from the first acquisition and control request in the buffer in turn, and the target request is sent to the network management side corresponding to the target request for processing, so as to control the outflow speed of the buffer acquisition and control requests, prevent excessive request traffic from flowing into the network management side, avoid direct impact on the network management side, improve the control effect of network traffic, and further reduce the probability of system instability caused by the impact of sudden large traffic on the network side, thereby improving system stability.
[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0048] Figure 1 It is a flow chart of the integrated network management and control processing of the existing technology;
[0049] Figure 2 A flowchart of a network traffic control method provided for an exemplary embodiment of the present disclosure;
[0050] Figure 3 A schematic diagram of buffer flow management provided for an exemplary embodiment of the present disclosure;
[0051] Figure 4 A schematic diagram of a process flow of a queuing waiting area provided for an exemplary embodiment of the present disclosure;
[0052] Figure 5 A flow chart of another flow control method provided for an exemplary embodiment of the present disclosure;
[0053] Figure 6A processing flow chart of an upper layer network management request provided for an exemplary embodiment of the present disclosure;
[0054] Figure 7 A schematic diagram of the structure of a network traffic control device provided by an exemplary embodiment of the present disclosure;
[0055] Figure 8 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0056] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0058] It should be noted that the user information involved in this disclosure includes but is not limited to: user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure comply with the relevant laws and regulations and do not violate public order and good morals.
[0059] In response to the above technical problems, in some embodiments of the present disclosure, a first acquisition and control request issued by an integrated network management device is received; the first acquisition and control requests are placed in a buffer of fixed capacity in order of the time when the requests are initiated; the target request is extracted from the first acquisition and control request in the buffer in a first-in-first-out order; the target request is sent to the network management side corresponding to the target request for processing; the request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device; the present disclosure buffers sudden request traffic by setting a buffer of fixed capacity to avoid direct impact on the network management side, thereby improving the control effect of network traffic and enhancing system stability.
[0060] The technical solutions provided by various embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0061] Figure 2 The flowchart of a network traffic control method provided by the exemplary embodiment of the present disclosure is as follows. Figure 2 As shown, the method includes:
[0062] S201: receiving a first acquisition and control request issued by an integrated network management device;
[0063] S202: placing the first acquisition and control requests into a buffer with a fixed capacity in sequence according to the order of the request initiation time;
[0064] S203: extracting a target request from the first acquisition and control request in the buffer in a first-in-first-out order;
[0065] S204: Send the target request to the network management side corresponding to the target request for processing;
[0066] S205: Upload the request processing result corresponding to the target request returned by the network management side to the integrated network management device.
[0067] In this embodiment, the execution subject of the above method is a server.
[0068] In this embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, or other server devices. The server mainly includes a processor, a hard disk, a memory, a system bus, etc., and a general computer architecture type.
[0069] In this embodiment, a first acquisition and control request issued by an integrated network management device is received; the first acquisition and control requests are placed in a buffer of a fixed capacity in order of the time when the requests are initiated; a target request is extracted from the first acquisition and control request in the buffer in a first-in-first-out order; the target request is sent to the network management side corresponding to the target request for processing; the request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device; the present disclosure buffers sudden request traffic by setting a buffer of a fixed capacity to avoid direct impact on the network management side, thereby improving the control effect of network traffic and enhancing system stability.
[0070] It should be noted that the buffer is a fixed-capacity bucket that stores upper-layer integrated network management requests, and takes requests from the bottom of the bucket at a fixed rate and passes them to the request processing service for processing. Once the number of requests in the bucket reaches a fixed container, new requests will be rejected from entering the bucket, thus protecting the CSC / LSC on the network management side and avoiding the impact caused by excessive requests.
[0071] In this embodiment, the rate limiting mechanism based on the leaky bucket algorithm realizes the control of the downlink flow of the transmission dynamic ring remote control scenario by establishing a secondary linkage fuse. By establishing a buffer and a queue waiting area, the sudden remote control request flow is buffered to avoid direct impact on the network management side to increase the load of the service network element and affect the system stability. By limiting the capacity of the buffer and the waiting time of the queue waiting area, the waiting time of the remote control request is reduced, and the upper-level network management application is notified in time to process it, thereby optimizing the business logic and improving user-friendly perception.
[0072] In some embodiments of the present disclosure, the buffer includes: a linked queue and a sliding time window. The first acquisition and control requests are placed into a fixed-capacity buffer in order of the time when the requests are initiated. One achievable method is that when the number of request nodes managed by the buffer is less than the fixed capacity, a new request node is allocated from the linked queue to the tail of the queue; and a new request node is used to maintain the incoming new first acquisition and control request. Among them, the linked queue is mainly used to store incoming requests. It is a queue data structure implemented using a linked list. Each element is stored in a node. The node contains the stored incoming request and a reference to the next node.
[0073] In some embodiments of the present disclosure, the target request is extracted from the first acquisition control request in the buffer in a first-in-first-out order. One achievable method is to dequeue the target request that first flows into the buffer from the head of the queue and flows into the sliding time window in a first-in-first-out order of the linked queue; the sliding time window generates an array of a fixed size according to a set window interval; the target request is placed in the array, and a new thread is started to execute the logical operation corresponding to the target request; and the target request is extracted according to a set time interval. Wherein, when the data in the array of the sliding time window is full, the sliding time window is destroyed; and a new sliding time window is generated after the window interval.
[0074] Figure 3 A schematic diagram of buffer flow management is provided for an exemplary embodiment of the present disclosure. Figure 3 As shown, when an incoming request arrives, the number of nodes storing the request in the linked queue in the buffer is first calculated. If the number of request nodes managed by the buffer is less than the total request threshold set for the buffer (i.e., fixed capacity), a new node is allocated from the linked queue of the buffer and added to the tail of the queue, and the new node maintains the new incoming request. If the number of request nodes managed by the buffer exceeds the total request threshold set for the buffer, the buffer refuses to receive the incoming request and moves the incoming request into the queue waiting area. Excessive requests are refused to flow into the buffer further by means of a class fuse, thereby alleviating the impact on the buffer.
[0075] When outgoing requests are made, the first-in-first-out principle of the linked queue is followed, and the request that first flows into the buffer is dequeued from the head of the queue and flows into the sliding time window. The sliding time window is used to obtain the pending requests in the queue and control the flow of the requests taken out. The sliding time window generates an array of fixed size (which can be regarded as the size of the hole at the bottom of the leaky bucket) at a specified time interval, takes out the requests waiting to be executed from the head of the queue and stores them in the array, and starts a new thread to execute the requested business operation. At the same time, the sliding time window continuously slides to obtain new requests for execution. When the data in the sliding time window is full, no more requests are taken out, and the old window is destroyed after waiting for a specified window interval, and a new sliding time window is generated to continue to obtain requests. Finally, the queued requests are taken out at a constant time interval to achieve the effect of controlling the outflow rate of the leaky bucket.
[0076] In some embodiments of the present disclosure, when the fixed capacity of the buffer has been used up, the second acquisition and control request sent by the integrated network management device that is subsequently received is placed in a queue waiting area; the waiting time of the second acquisition and control request is monitored; when the waiting time is greater than the time threshold, the second acquisition and control request is rejected, and the request exception information is returned to the integrated network management device so that the integrated network management device can re-issue the second acquisition and control request. The present disclosure limits the waiting time of the acquisition and control request in the queue waiting area, notifies the upper-layer network management application in time to process it, and improves the user experience. It should be noted that the queue waiting area is a waiting area established outside the buffer. First, it plays a role in protecting the buffer and realizing the first-level fuse for too many requests; second, it processes as many requests from the upper-layer application as possible. For the request in the queue waiting area, the waiting time of the request is calculated in real time. When the waiting time exceeds the threshold tolerated by the client or the preset waiting time, it still fails to enter the buffer, then the request is removed from the waiting area, and the exception information is returned to notify the upper-layer application to perform the next step of processing. The queue waiting area monitors the capacity changes of the buffer in real time, and adds the request in the waiting area to the buffer in time.
[0077] Figure 4 A schematic diagram of a queue waiting area provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, after each second acquisition and control request enters the queue waiting area, the waiting time of each second acquisition and control request is determined according to the number of buffer messages, the number of queued messages and the message processing rate. Among them, the queue waiting area will only be started when the buffer capacity is full; each request entering the queue waiting area needs to calculate the expected waiting time before entering, and the expected waiting time T = (number of buffer messages C1 + number of queued messages C2) / message processing rate V. If the expected waiting time exceeds the time threshold or the tolerance of the client, it will not enter the queue waiting area, and the exception will be directly returned to the upper-level integrated network management. It should be noted that the present disclosure does not limit the time threshold, and it can be adjusted according to actual conditions.
[0078] It should be noted that each request entering the queue waiting area will start a countdown after entering. This countdown is to prevent the situation where the message in the buffer is not processed in time or other situations lead to failure to enter the buffer in time, but the upper-level integrated network management is not notified in time. The total countdown time = total tolerance time - expected waiting time. Once the countdown reaches 0, the queue waiting area is removed and discarded, and an exception is returned to the upper-level integrated network management.
[0079] In some embodiments of the present disclosure, the request processing service implements the actual business logic processing of the request, completes the business function of responding to and processing the acquisition and control request, and returns the request result. Based on the rate limiting principle of the leaky bucket algorithm, the problem of instantaneous requests rushing to the network management side is solved by controlling the rate at which the request service in the buffer flows to the request processing service.
[0080] Figure 5 FIG. 1 is a flow chart of another flow control method provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, a buffer with a fixed capacity is established in the current command channel service to store all requests sent by the integrated network management, and the requests are placed in the buffer in sequence according to the time when the requests are initiated; the request processing service extracts requests from the buffer at a certain rate, and sends the requests to the corresponding network management side for processing according to the network management to which the controlled object belongs; when the buffer capacity is used up, subsequent requests are queued to wait for entry into the buffer, and the expected waiting time is calculated, T waiting time = (C number of buffer messages + C number of queued messages) / V message processing rate. When T waiting time is greater than the tolerance time set by the requester or the preset tolerance time, the request is rejected, and an exception message is returned to inform the upper layer that a retry is required; the request processing service sets the message processing rate according to the concurrent processing capabilities of the CSC and LSC on the network management side, controls the number of requests flowing to the network management side, and ensures the security and stability of the network management side.
[0081] Figure 6 A processing flow chart of an upper layer network management request provided by an exemplary embodiment of the present disclosure. Figure 6As shown, authentication is performed according to the token information carried in the request header of the target request to obtain the authentication result; among them, it is mainly designed to ensure the security of the request processing service being called. Based on the security specification, the requester needs to carry token (i.e. token information) information in the request header for authentication. The service verifies the token. If the verification passes, the request is released and the token expiration time is set. If the token exceeds a certain time limit, the security of the call is further guaranteed; if the verification fails, the request is directly rejected. When the authentication result is that the verification passes, the target request is generated into a collection and control instruction with a set data format; it mainly realizes the analysis and processing of the requester's request message into a collection and control instruction. Generally, the requester's request message is relatively simple and easy to read, but the instructions issued by the collection and control follow the relevant LSC / CSC specifications, and need to follow the collection and control instruction format and data structure required by the LSC / CSC. The query dynamic ring resource data is combined with the request message, converted into the data format required by the collection and control instruction, and the final issued instruction is generated in binary form. It mainly implements the interaction with LSC / CSC to complete the issuance of acquisition and control instructions, including establishing a connection with LSC / CSC and issuing acquisition and control instructions; it mainly implements the parsing and processing of acquisition and control return messages and returns the final agreed message format and content of the requesting party. At present, the dynamic ring LSC / CSC acquisition and control instructions return messages in binary format. It is necessary to deconstruct and convert the binary messages based on the specifications, and further improve the returned content in combination with the dynamic ring resource data, and convert the final results into JSON format for external output. After the above steps are processed, the request of the upper-level integrated network management is finally converted into instructions that can be executed on the network management device side for issuance. The platform also parses the instruction results and returns the results to the upper-level integrated network management according to the agreed format and content, and the upper layer performs the next step of business logic processing.
[0082] In the above-mentioned method embodiment of the present disclosure, a first acquisition and control request issued by an integrated network management device is received; the first acquisition and control requests are placed in a fixed-capacity buffer in sequence according to the chronological order of the request initiation time; a target request is extracted from the first acquisition and control request in the buffer in a first-in-first-out order; the target request is sent to the network management side corresponding to the target request for processing; the request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device; the present disclosure buffers sudden request traffic by setting a fixed-capacity buffer to avoid direct impact on the network management side, thereby improving the control effect of network traffic and enhancing system stability.
[0083] This disclosure, with the support of the network management side, tries to meet the real-time coverage of all professional remote acquisition and control needs. Control the interaction rate with the network management side to protect the security and stability of CSC and LSC. Add a fuse mechanism to enhance the stability and reliability of the remote control command channel.
[0084] Figure 7 FIG. 7 is a schematic diagram of a network traffic control device 70 provided by an exemplary embodiment of the present disclosure. Figure 7 As shown, the network traffic control device 70 includes: a request receiving module 71, a request storing module 72, a request extracting module 73, a request sending module 74 and an information uploading module 75.
[0085] The request receiving module 71 is used to receive the first acquisition and control request sent by the integrated network management device;
[0086] The request storage module 72 is used to sequentially place the first acquisition and control requests into a buffer of fixed capacity in the order of the time when the requests were initiated;
[0087] The request extraction module 73 is used to extract the target request from the first acquisition and control request in the buffer in a first-in-first-out order;
[0088] A request sending module 74, used to send the target request to the network management side corresponding to the target request for processing;
[0089] The information uploading module 75 is used to upload the request processing result corresponding to the target request returned by the network management side to the integrated network management device.
[0090] Optionally, the request receiving module 71 may also be used to:
[0091] When the fixed capacity of the buffer is exhausted, the second acquisition and control request sent by the integrated network management device subsequently received is placed in a queue waiting area;
[0092] Monitor the waiting time of the second acquisition and control request;
[0093] When the waiting time is longer than the time threshold, the second acquisition and control request is rejected, and request exception information is returned to the integrated network management device so that the integrated network management device can re-issue the second acquisition and control request.
[0094] Optionally, when monitoring the waiting time of the second acquisition and control request, the request receiving module 71 is used to:
[0095] After each second acquisition and control request enters the queue waiting area, the waiting time of each second acquisition and control request is determined according to the number of buffer messages, the number of queued messages and the message processing rate.
[0096] Optionally, the buffer includes: a chain queue; when the request storage module 72 sequentially places the first acquisition and control request into the buffer of fixed capacity in the order of the request initiation time, it is used to:
[0097] When the number of request nodes managed by the buffer is less than the fixed capacity, new request nodes are allocated from the linked queue and added to the tail of the queue; and
[0098] A new request node is used to maintain the new first acquisition and control request that enters.
[0099] Optionally, the buffer includes: a chain queue and a sliding time window; when the request extraction module 73 extracts the target request from the first acquisition and control request in the buffer in a first-in-first-out order, it is used to:
[0100] According to the first-in-first-out order of the chain queue, the target request that first flows into the buffer is dequeued from the head of the queue and flows into the sliding time window;
[0101] The sliding time window generates an array of fixed size according to the set window interval;
[0102] Put the target request into an array and start a new thread to perform the logical operation corresponding to the target request;
[0103] Extract target requests at set time intervals.
[0104] Optionally, the request extraction module 73 may also be used to:
[0105] When the data in the sliding time window array is full, the sliding time window is destroyed;
[0106] After the window interval has elapsed, a new sliding time window is generated.
[0107] Optionally, before sending the target request to the network management side corresponding to the target request for processing, the request sending module 74 may also be used to:
[0108] Perform authentication based on the token information carried in the request header of the target request to obtain the authentication result;
[0109] When the authentication result is verified to be passed, the target request is used to generate a collection and control instruction in a set data format.
[0110] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0111] Figure 8 FIG. 1 is a schematic diagram of a structure of an electronic device provided by an exemplary embodiment of the present disclosure. Figure 8 As shown, the electronic device includes: a memory 81 and a processor 82. In addition, the electronic device also includes a power supply component 83 and a communication component 84.
[0112] The memory 81 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.
[0113] The memory 81 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0114] The communication component 84 is used for data transmission with other devices.
[0115] The processor 82 can execute the computer instructions stored in the memory 81 to: receive a first acquisition and control request sent by the integrated network management device;
[0116] The first acquisition and control requests are placed into a buffer of fixed capacity in the order of the time when the requests are initiated;
[0117] Extract the target request from the first acquisition and control request in the buffer in a first-in-first-out order;
[0118] Send the target request to the network management side corresponding to the target request for processing;
[0119] The request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device.
[0120] Optionally, the processor 82 may also be configured to:
[0121] When the fixed capacity of the buffer is exhausted, the second acquisition and control request sent by the integrated network management device subsequently received is placed in a queue waiting area;
[0122] Monitor the waiting time of the second acquisition and control request;
[0123] When the waiting time is longer than the time threshold, the second acquisition and control request is rejected, and request exception information is returned to the integrated network management device so that the integrated network management device can re-issue the second acquisition and control request.
[0124] Optionally, when monitoring the waiting time of the second acquisition and control request, the processor 82 is configured to:
[0125] After each second acquisition and control request enters the queue waiting area, the waiting time of each second acquisition and control request is determined according to the number of buffer messages, the number of queued messages and the message processing rate.
[0126] Optionally, the buffer includes: a chain queue; when the processor 82 sequentially places the first acquisition and control request into the buffer of fixed capacity in the order of the request initiation time, it is used to:
[0127] When the number of request nodes managed by the buffer is less than the fixed capacity, new request nodes are allocated from the linked queue and added to the tail of the queue; and
[0128] A new request node is used to maintain the new first acquisition and control request that enters.
[0129] Optionally, the buffer includes: a chain queue and a sliding time window; when the processor 82 extracts the target request from the first acquisition and control request in the buffer in a first-in-first-out order, it is used to:
[0130] According to the first-in-first-out order of the chain queue, the target request that first flows into the buffer is dequeued from the head of the queue and flows into the sliding time window;
[0131] The sliding time window generates an array of fixed size according to the set window interval;
[0132] Put the target request into an array and start a new thread to perform the logical operation corresponding to the target request;
[0133] Extract target requests at set time intervals.
[0134] Optionally, the processor 82 may also be configured to:
[0135] When the data in the sliding time window array is full, the sliding time window is destroyed;
[0136] After the window interval has elapsed, a new sliding time window is generated.
[0137] Optionally, before sending the target request to the network management side corresponding to the target request for processing, the processor 82 may also be used to:
[0138] Perform authentication based on the token information carried in the request header of the target request to obtain the authentication result;
[0139] When the authentication result is verified to be passed, the target request is used to generate a collection and control instruction in a set data format.
[0140] Accordingly, the present disclosure also provides a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores the computer program and the computer program is executed by one or more processors, the one or more processors execute Figure 2 Each step in the method embodiment.
[0141] Accordingly, the present disclosure also provides a computer program product, the computer program product includes a computer program / instruction, the computer program / instruction is executed by a processor Figure 2 Each step in the method embodiment.
[0142] Above Figure 8 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0143] Above Figure 8 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0144] The electronic device also includes a display screen and an audio component.
[0145] The display screen includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0146] The audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0147] In the embodiments of the apparatus, device, storage medium and computer program product disclosed in the present invention, a first acquisition and control request issued by an integrated network management device is received; the first acquisition and control requests are placed in a buffer of fixed capacity in order of the time when the requests are initiated; a target request is extracted from the first acquisition and control request in the buffer in a first-in-first-out order; the target request is sent to the network management side corresponding to the target request for processing; a request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device; the present invention buffers sudden request traffic by setting a buffer of fixed capacity to avoid direct impact on the network management side, thereby improving the control effect of network traffic and enhancing system stability.
[0148] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0149] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0156] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A network traffic control method, characterized in that: include: Receive the first acquisition and control request issued by the integrated network management equipment; Put the first acquisition and control requests into a buffer with a fixed capacity in sequence according to the order of request initiation time; Extracting a target request from the first acquisition and control requests in the buffer in a first-in-first-out order; Sending the target request to the network management side corresponding to the target request for processing; The request processing result corresponding to the target request returned by the network management side is uploaded to the integrated network management device.
2. The method according to claim 1, characterized in that The method further comprises: When the fixed capacity of the buffer zone has been used up, placing the second acquisition and control request sent by the integrated network management device subsequently received into a queue waiting area; Monitoring the waiting time of the second acquisition and control request; In the case that the waiting time is greater than the time threshold, the second acquisition and control request is rejected, and request exception information is returned to the integrated network management device so that the integrated network management device can re-issue the second acquisition and control request.
3. The method according to claim 2, characterized in that The monitoring of the waiting time of the second acquisition and control request includes: After each of the second acquisition and control requests enters the queue waiting area, the waiting time of each of the second acquisition and control requests is determined according to the number of buffer messages, the number of queued messages and the message processing rate.
4. The method according to claim 1, characterized in that: The buffer includes: a chain queue; the first acquisition and control request is placed in a fixed-capacity buffer in the order of the request initiation time, including: When the number of request nodes managed by the buffer is less than the fixed capacity, a new request node is allocated from the linked queue and added to the tail of the queue; and The new request node is used to maintain the new first acquisition and control request that enters.
5. The method according to claim 1, characterized in that The buffer includes: a chain queue and a sliding time window; extracting the target request from the first acquisition and control request in the buffer in a first-in-first-out order includes: According to the first-in-first-out order of the chain queue, the target request that first flows into the buffer is dequeued from the head of the queue and flows into the sliding time window; The sliding time window generates an array of fixed size according to the set window interval; Put the target request into the array, and start a new thread to execute the logical operation corresponding to the target request; The target request is extracted according to the set time interval.
6. The method according to claim 5, characterized in that The method further comprises: When the data in the array of the sliding time window is full, destroying the sliding time window; After the window interval is extended, a new sliding time window is generated.
7. A network traffic control device, characterized in that: include: A request receiving module, used for receiving a first acquisition and control request issued by the integrated network management device; A request storage module, used to sequentially place the first acquisition and control requests into a buffer of fixed capacity in the order of request initiation time; A request extraction module, used for extracting a target request from the first acquisition and control request in the buffer in a first-in-first-out order; A request sending module, used for sending the target request to the network management side corresponding to the target request for processing; The information uploading module is used to upload the request processing result corresponding to the target request returned by the network management side to the integrated network management device.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute instructions to implement each step in the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.