Iot platform application traffic coordination control method and device and electronic equipment

By using traffic monitoring and dynamic message segmentation at the IoT platform layer, the problem of traffic control under sudden device disruptions is solved, achieving stability and efficiency at both the platform and application layers.

CN121691380BActive Publication Date: 2026-07-21E SURFING IOT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
E SURFING IOT CO LTD
Filing Date
2025-11-28
Publication Date
2026-07-21

Smart Images

  • Figure CN121691380B_ABST
    Figure CN121691380B_ABST
Patent Text Reader

Abstract

The application discloses an Internet of Things platform application flow coordination control method and device and electronic equipment, and comprises the following steps: acquiring an application entrance flow value of an application layer through a flow monitoring management and control system, and calculating a first ratio of a preset application layer flow threshold value and the application entrance flow value; when the first ratio is less than 1, the first ratio is sent to a southward access processing module through the flow monitoring management and control system; the device identifier of the input message is acquired through the southward access processing module, the corresponding identifier hash value is calculated according to the device identifier, and the input message is divided into a reserved message and a discarded message according to the identifier hash value and the first ratio; the discarded message is discarded through the southward access processing module, and the reserved message is sent to a northward message pushing module, so that the northward message pushing module pushes the reserved message to the application layer. The application improves the stability of the Internet of Things service and can be widely applied to the technical field of the Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a method, apparatus, and electronic device for collaborative traffic control of IoT platform applications. Background Technology

[0002] The IoT platform ensures reliable access, efficient processing, and real-time transmission of massive amounts of device data, providing real-time data for upper-layer applications. These applications then leverage this real-time data to drive business decisions, automate processes, improve efficiency and user experience, ultimately transforming data value into tangible business results. The close collaboration between the IoT platform and applications constitutes a responsive and intelligently interconnected IoT solution, widely used in IoT project scenarios.

[0003] In IoT projects, the IoT platform is responsible for collecting and pushing data from devices in real time, while downstream application services receive messages and implement business logic. In the event of a sudden device failure, the data reporting rate surges dramatically. At this time, both the IoT platform and applications face significant pressure. How to effectively control traffic and prevent the IoT platform and applications from crashing becomes a pressing issue that needs to be addressed. Summary of the Invention

[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0005] Therefore, one objective of this invention is to provide a method for collaborative control of application traffic on an IoT platform. This method dynamically divides and controls the traffic of input messages in real time based on the ratio of the application layer traffic threshold to the application ingress traffic value and the device identifier hash value of the input messages at the IoT platform layer. This enables traffic limiting at the southbound ingress of the IoT platform layer, preventing the IoT platform layer and application layer from becoming paralyzed and improving the stability of IoT services.

[0006] Another objective of this invention is to provide an IoT platform application traffic collaborative control device.

[0007] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of the present invention include:

[0008] On one hand, embodiments of the present invention provide a method for coordinated traffic control of IoT platform applications, applied to the IoT platform layer, the IoT platform layer including a southbound access processing module, a northbound message push module, and a traffic monitoring and control system, the method for coordinated traffic control of IoT platform applications includes the following steps:

[0009] The system obtains the application ingress traffic value at the application layer through the traffic monitoring and control system, and calculates a first ratio between a preset application layer traffic threshold and the application ingress traffic value.

[0010] When the first ratio is less than 1, the first ratio is sent to the southbound access processing module through the traffic monitoring and control system;

[0011] The southbound access processing module obtains the device identifier of the input message, calculates the corresponding identifier hash value based on the device identifier, and divides the input message into retained messages and discarded messages based on the identifier hash value and the first ratio.

[0012] The southbound access processing module discards the discarded message and sends the retained message to the northbound message push module, which then pushes the retained message to the application layer.

[0013] Furthermore, in one embodiment of the present invention, the step of dividing the input message into retained messages and discarded messages based on the identifier hash value and the first ratio specifically includes:

[0014] Calculate the remainder after dividing the identifier hash value by 100, and calculate the product of the first ratio and 100;

[0015] Determine the closed interval from 1 to the product as the target interval;

[0016] When the remainder is within the target interval, the corresponding input message is determined to be a reserved message;

[0017] When the remainder is outside the target interval, the corresponding input message is determined to be a discard message.

[0018] Furthermore, in one embodiment of the present invention, the discarding process for the discarded message specifically includes:

[0019] The protocol gateway layer of the southbound access processing module discards the discarded messages and records the number of messages discarded.

[0020] The number of messages dropped is fed back to the traffic monitoring and control system.

[0021] Furthermore, in one embodiment of the present invention, the IoT platform application traffic collaborative control method further includes the following steps:

[0022] Obtain the southbound inbound traffic value and message drop count of the southbound access processing module, and calculate the message drop ratio based on the number of dropped messages and the southbound inbound traffic value;

[0023] When the sum of the message discard ratio and the first ratio is greater than 1, the value of the right endpoint of the target interval is increased to make the target interval larger;

[0024] When the sum of the message discard ratio and the first ratio is less than 1, the value of the right endpoint of the target interval is reduced to make the target interval smaller.

[0025] Furthermore, in one embodiment of the present invention, sending the reserved message to the northbound message push module, so that the northbound message push module pushes the reserved message to the application layer, specifically includes:

[0026] The reserved message is decoded by the southbound access processing module, and the decoded reserved message is sent to the northbound message push module.

[0027] The decoded retained message is pushed to the application layer through the northbound message push module, and the northbound outbound traffic value is recorded.

[0028] The northbound exit flow rate value is fed back to the flow monitoring and control system.

[0029] On the other hand, embodiments of the present invention provide an IoT platform application traffic coordination control device, applied at the IoT platform layer, including a southbound access processing module, a northbound message push module, and a traffic monitoring and control system, wherein:

[0030] The traffic monitoring and control system is used to obtain the application ingress traffic value of the application layer, calculate the first ratio of the preset application layer traffic threshold to the application ingress traffic value, and when the first ratio is less than 1, send the first ratio to the southbound access processing module.

[0031] The southbound access processing module is used to obtain the device identifier of the input message, calculate the corresponding identifier hash value based on the device identifier, divide the input message into a retained message and a discarded message based on the identifier hash value and the first ratio, discard the discarded message, and send the retained message to the northbound message push module.

[0032] The northbound message push module is used to push the reserved message to the application layer.

[0033] Furthermore, in one embodiment of the present invention, the southbound access processing module includes:

[0034] The first calculation unit is used to calculate the remainder after dividing the identifier hash value by 100, and to calculate the product of the first ratio and 100;

[0035] An interval determination unit is used to determine the closed interval from 1 to the product as the target interval;

[0036] The message segmentation module is used to determine that the corresponding input message is a retained message when the remainder is within the target interval, and to determine that the corresponding input message is a discarded message when the remainder is outside the target interval.

[0037] Furthermore, in one embodiment of the present invention, the southbound access processing module further includes:

[0038] The second calculation unit is used to obtain the southbound inbound traffic value and the number of messages dropped, and to calculate the message drop ratio based on the number of dropped messages and the southbound inbound traffic value.

[0039] An interval adjustment unit is used to increase the value of the right endpoint of the target interval to make the target interval larger when the sum of the message discard ratio and the first ratio is greater than 1, and to decrease the value of the right endpoint of the target interval to make the target interval smaller when the sum of the message discard ratio and the first ratio is less than 1.

[0040] On the other hand, embodiments of the present invention provide an electronic device, which includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for implementing communication between the processor and the memory. When the computer program is executed by the processor, it implements the IoT platform application traffic collaborative control method as described above.

[0041] On the other hand, embodiments of the present invention also provide a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more computer programs, which can be executed by one or more processors to implement the IoT platform application traffic collaborative control method as described above.

[0042] On the other hand, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the IoT platform application traffic collaborative control method as described above.

[0043] The advantages and beneficial effects of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention:

[0044] This invention employs a traffic monitoring and control system to obtain application ingress traffic values ​​at the application layer and calculates a first ratio between a preset application layer traffic threshold and the application ingress traffic value. When the first ratio is less than 1, the traffic monitoring and control system sends this ratio to the southbound access processing module. The southbound access processing module obtains the device identifier of the input message, calculates the corresponding identifier hash value based on the device identifier, and divides the input message into retained messages and discarded messages based on the identifier hash value and the first ratio. The southbound access processing module discards the discarded messages and sends the retained messages to the northbound message push module, enabling the northbound message push module to push the retained messages to the application layer. This invention dynamically divides and controls the traffic of input messages in real time based on the ratio of the application layer traffic threshold to the application ingress traffic value and the device identifier hash value of the input message at the IoT platform layer. This enables rate limiting at the southbound ingress of the IoT platform layer, preventing the IoT platform layer and application layer from becoming paralyzed and improving the stability of IoT services. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A flowchart illustrating the steps of an IoT platform application traffic collaborative control method provided in this embodiment of the invention;

[0047] Figure 2 A flowchart of step S103 provided in an embodiment of the present invention;

[0048] Figure 3 A flowchart of step S104 provided in an embodiment of the present invention;

[0049] Figure 4 Another flowchart of the IoT platform application traffic collaborative control method provided in the embodiments of the present invention;

[0050] Figure 5 Another flowchart of step S104 provided in an embodiment of the present invention;

[0051] Figure 6 This is a schematic diagram of the structure of the IoT platform application traffic collaborative control device provided in an embodiment of the present invention;

[0052] Figure 7 This is a schematic diagram of a southbound access processing module provided in an embodiment of the present invention;

[0053] Figure 8 This is a schematic diagram of another structure of the southbound access processing module provided in an embodiment of the present invention;

[0054] Figure 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention;

[0055] Figure 10 This is a schematic diagram of the structure of the storage medium provided in an embodiment of the present invention. Detailed Implementation

[0056] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. It should be noted that although functional modules are divided in the system schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system schematic diagram or the order in the flowchart. The step numbers in the following embodiments are only set for ease of explanation and do not limit the order between steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0058] The IoT platform application traffic collaborative control method provided in this application embodiment can be applied to terminals, servers, or software running on terminals or servers. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application implementing a driver status monitoring method based on machine vision, but is not limited to the above forms.

[0059] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0060] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0061] like Figure 1 The diagram shown is a flowchart of a traffic collaborative control method for an IoT platform application provided by an embodiment of the present invention. (Refer to...) Figure 1 This invention provides a method for coordinated traffic control of IoT platform applications, applied to the IoT platform layer. The IoT platform layer includes a southbound access processing module, a northbound message push module, and a traffic monitoring and control system. The method for coordinated traffic control of IoT platform applications includes the following steps:

[0062] S101. Obtain the application ingress traffic value of the application layer through the traffic monitoring and control system, and calculate the first ratio between the preset application layer traffic threshold and the application ingress traffic value.

[0063] S102. When the first ratio is less than 1, the first ratio is sent to the southbound access processing module through the traffic monitoring and control system.

[0064] S103. Obtain the device identifier of the input message through the southbound access processing module, calculate the corresponding identifier hash value based on the device identifier, and divide the input message into retained messages and discarded messages based on the identifier hash value and the first ratio.

[0065] S104. The southbound access processing module discards the messages and sends the retained messages to the northbound message push module, so that the northbound message push module pushes the retained messages to the application layer.

[0066] Specifically, the embodiments of the present invention adopt a three-layer architecture of "terminal-IoT platform-application" and deploy a traffic monitoring and control system (FMCS) at the IoT platform layer to form a "business + control" dual plane.

[0067] The terminal layer consists of several IoT terminal devices with network communication capabilities, supporting southbound protocols such as MQTT, CoAP, and HTTP, and periodically / event-based reporting of business data.

[0068] The IoT platform layer includes:

[0069] 1) Southbound Access Processing Module

[0070] Protocol gateway: performs protocol parsing and data decoding;

[0071] Device authentication: Based on device certificate / key authentication;

[0072] Flow control unit: Receives the first proportion issued by FMCS and executes a hash-based packet loss strategy.

[0073] 2) Northbound message push module: Pushes processed messages to business applications in real time through channels such as Kafka / MQ.

[0074] 3) Traffic monitoring interface

[0075] South entrance monitoring point: Counts the number of messages received per second (S) in ;

[0076] Northbound exit monitoring point: Counts the number of messages pushed per second (S) out .

[0077] 4) Traffic Flow Monitoring and Control System (FMCS)

[0078] Acquisition end: Based on Prometheus Exporter, Fluent Bit, or eBPF probes, for S in S out A in Implement data embedding;

[0079] Calculation end: Based on the user-preset application layer traffic threshold Y, the first proportion r = (Y / y) * 100% is calculated in real time, where y = A in ;

[0080] Alarm terminal: When r < 100%, a flow control command is triggered, and r is sent to the "Southbound Access Processing Module" via the REST / gRPC interface.

[0081] The application layer receives structured messages by subscribing to topics, and simultaneously deploys application-side monitoring and data collection points to count the number of messages (A) entering the application layer per second. in .

[0082] It can be recognized that, according to the embodiment of the present invention, the input message is dynamically divided and the traffic is controlled in real time based on the ratio of the application layer traffic threshold to the application ingress traffic value and the device identifier hash value of the input message of the IoT platform layer. This enables the flow restriction at the southbound ingress of the IoT platform layer, avoids the paralysis of the IoT platform layer and the application layer, and improves the stability of IoT services.

[0083] like Figure 2 The diagram shown is a flowchart of step S103 provided in an embodiment of the present invention. (Refer to...) Figure 2 As an optional implementation, the input message is further divided into retained messages and discarded messages based on the identifier hash value and a first ratio, specifically including:

[0084] S1031. Calculate the remainder after dividing the identifier hash value by 100, and calculate the product of the first ratio and 100;

[0085] S1032. Determine the closed interval from 1 to the product as the target interval;

[0086] S1033. When the remainder is within the target interval, determine the corresponding input message as a reserved message;

[0087] S1034. When the remainder is outside the target interval, determine that the corresponding input message is a discard message.

[0088] Specifically, the user enters the application-side entry alarm threshold Y (unit: alarms / second) in the FMCS configuration interface. FMCS then starts a background data collection thread, which retrieves metrics from each monitoring point at intervals of ΔT (default 1 second). The collected real-time application-side traffic is recorded as y=A. inThe first ratio is calculated as r = (Y / y) × 100%, rounded down to two decimal places. If r ≥ 100%, it indicates that the application side is not overloaded, and FMCS only logs and does not issue flow control commands. If r < 100%, FMCS pushes r to the southbound access processing module in real time through gRPC Stream. The southbound access processing module executes a hash-based packet loss strategy based on the first ratio issued by FMCS. After flow control, the message is sent to the business application through the northbound push module, thereby ensuring that the application-side ingress traffic is less than the application layer traffic threshold and achieving controllable system load.

[0089] Specifically, for each southbound message, its device identifier device_id is taken, and a 32-bit FNV-1ahash is calculated to obtain the identifier hash value h; the remainder after dividing the identifier hash value by 100 is calculated, i.e., m=h mod100, to obtain an integer from 0 to 99; if m falls within the interval [1, 100r], the message will normally enter the subsequent decoding, storage, and push process; otherwise, it will be directly discarded at the protocol gateway layer and the discard count will be recorded.

[0090] It can be recognized that traditional practices only implement rate limiting or circuit breaking on the application side. This embodiment of the invention drops packets "in advance" at the southbound entry point of the IoT platform, greatly reducing invalid network and internal platform processing overhead. Traditional practices discard data randomly or at the topic level. This embodiment of the invention divides messages based on device identifier hash values, ensuring consistency of multiple samples from the same device, avoiding "false positives" on critical devices, and improving fairness. Traditional practices manually configure alarm thresholds statically, which cannot be adjusted according to business peaks and valleys. This embodiment of the invention calculates the first ratio in real time and dynamically distributes it, achieving automatic rate limiting during business peaks and automatic recovery during valleys through closed-loop adjustment. Traditional practices only issue alarms through the monitoring platform, requiring manual intervention. This embodiment of the invention's FMCS and the platform's southbound access module work together in real time to automatically execute rate limiting, shortening the response time from "minutes" to "seconds".

[0091] This invention deploys the "monitoring-decision-execution" process as a lightweight, hot-swappable bypass pipeline, which maintains ease of use in scenarios with massive IoT terminal access while significantly reducing operation and maintenance and development costs. It is particularly suitable for IoT platforms and application environments that require 24 / 7 high availability but have limited manpower.

[0092] like Figure 3 The diagram shown is a flowchart of step S104 provided in an embodiment of the present invention. (Refer to...) Figure 3 As an optional implementation, the discarded messages are further processed by discarding them, specifically including:

[0093] S1041. In the protocol gateway layer of the southbound access processing module, discard messages and record the number of messages discarded.

[0094] S1042. Feedback the number of messages dropped to the traffic monitoring and control system.

[0095] like Figure 4 The diagram shown is another step flowchart of the IoT platform application traffic collaborative control method provided in this embodiment of the invention. (Refer to...) Figure 4 As an optional implementation, the IoT platform application traffic collaborative control method further includes the following steps:

[0096] S201. Obtain the southbound inbound traffic value and message drop count of the southbound access processing module, and calculate the message drop ratio based on the message drop count and the southbound inbound traffic value.

[0097] S202. When the sum of the message discard ratio and the first ratio is greater than 1, increase the value of the right endpoint of the target interval to make the target interval larger.

[0098] S203. When the sum of the message discard ratio and the first ratio is less than 1, reduce the value of the right endpoint of the target interval to make the target interval smaller.

[0099] Specifically, the southbound access processing module calculates the message discard ratio based on the number of discarded messages and the southbound inbound traffic value. When the sum of the message discard ratio and the first ratio is greater than 1, it indicates that too many messages have actually been discarded. The value of the right endpoint of the target interval can be appropriately increased based on the preset ratio to make the target interval larger, so that more input messages can be retained and pushed to the application layer. When the sum of the message discard ratio and the first ratio is less than 1, it indicates that too few messages have actually been discarded. The value of the right endpoint of the target interval can be appropriately decreased based on the preset ratio to make the target interval smaller, so that more input messages can be discarded and prevent the application layer traffic from exceeding the threshold.

[0100] like Figure 5 The diagram shown is another flowchart of step S104 provided in an embodiment of the present invention. (Refer to...) Figure 5 As an optional implementation, the retained message is sent to the northbound message push module, which then pushes the retained message to the application layer. This specifically includes:

[0101] S1043. The reserved message is decoded by the southbound access processing module and the decoded reserved message is sent to the northbound message push module.

[0102] S1044. Push the decoded retained message to the application layer through the northbound message push module, and record the northbound outbound traffic value;

[0103] S1045. Feed back the northbound exit flow rate value to the flow monitoring and control system.

[0104] This invention moves the flow control action forward to the southbound entry point of the IoT platform. Based on the ratio of the application layer flow threshold to the application entry flow value, the original input message is directly dropped. This can complete peak shaving before the data enters the internal link of the platform, significantly reducing invalid network transmission and internal computing overhead.

[0105] The traffic monitoring and control system of this invention collects application layer inbound traffic values, calculates the ratio of application layer traffic threshold to application inbound traffic value in real time, and immediately sends the data to the southbound access processing module when the ratio is less than 1. It can achieve second-level automatic adjustment, dynamic degradation during peak business hours and automatic recovery during off-peak hours, without the need for manual intervention.

[0106] This invention calculates a hash value based on the device identifier to distinguish between discarded and retained messages, maintaining consistent packet loss results within the same device's lifecycle. This avoids "false positives" from random or topic-level packet loss strategies that could "kill" critical devices, ensuring sampling continuity and business fairness.

[0107] In this embodiment of the invention, the monitoring probe and protocol gateway are completely decoupled, the terminal does not need to upgrade the firmware, the threshold and policy are hot-updated via REST / gRPC, it can support new protocols and new devices to be accessed with zero development, and the operation and maintenance personnel can "configure and take effect immediately", which significantly reduces deployment and maintenance costs.

[0108] The method flow of the embodiments of the present invention has been described above. It can be understood that the embodiments of the present invention dynamically divide and control the traffic of input messages in real time based on the ratio of the application layer traffic threshold to the application ingress traffic value and the device identifier hash value of the input messages at the IoT platform layer. This enables rate limiting at the southbound ingress of the IoT platform layer, preventing paralysis of the IoT platform layer and the application layer, and improving the stability of IoT services.

[0109] like Figure 6 The diagram shown is a structural schematic of the IoT platform application traffic collaborative control device provided in an embodiment of the present invention. (Refer to...) Figure 6 This invention provides an IoT platform application traffic coordination control device, applied at the IoT platform layer, including a southbound access processing module, a northbound message push module, and a traffic monitoring and control system, wherein:

[0110] The traffic monitoring and control system is used to obtain the application ingress traffic value of the application layer, calculate the first ratio of the preset application layer traffic threshold to the application ingress traffic value, and when the first ratio is less than 1, send the first ratio to the southbound access processing module.

[0111] The southbound access processing module is used to obtain the device identifier of the input message, calculate the corresponding identifier hash value based on the device identifier, divide the input message into retained messages and discarded messages based on the identifier hash value and a first ratio, discard the discarded messages, and send the retained messages to the northbound message push module.

[0112] The northbound message push module is used to push retained messages to the application layer.

[0113] like Figure 7 The diagram shown is a structural schematic of a southbound access processing module provided in an embodiment of the present invention. (Refer to...) Figure 7 As an optional implementation, the southbound access processing module includes:

[0114] The first calculation unit is used to calculate the remainder after dividing the identifier hash value by 100, and to calculate the product of the first ratio and 100;

[0115] Interval determination unit, used to determine the closed interval from 1 to the product as the target interval;

[0116] The message segmentation module is used to determine that when the remainder is within the target interval, the corresponding input message is a retained message, and when the remainder is outside the target interval, the corresponding input message is a discarded message.

[0117] like Figure 8 The diagram shown is another structural schematic of the southbound access processing module provided in an embodiment of the present invention. (Refer to...) Figure 8 As an optional implementation, the southbound access processing module further includes:

[0118] The second calculation unit is used to obtain the southbound inbound traffic value and the number of messages dropped, and to calculate the message drop ratio based on the number of dropped messages and the southbound inbound traffic value.

[0119] The interval adjustment unit is used to increase the value of the right endpoint of the target interval when the sum of the message discard ratio and the first ratio is greater than 1, so that the target interval becomes larger; and to decrease the value of the right endpoint of the target interval when the sum of the message discard ratio and the first ratio is less than 1, so that the target interval becomes smaller.

[0120] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0121] This invention also provides an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned IoT platform application traffic collaborative control method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0122] like Figure 9 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of the present invention. (Refer to...) Figure 9 This invention provides an electronic device, comprising:

[0123] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0124] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to execute the IoT platform application traffic collaborative control method of the embodiments of this invention.

[0125] The input / output interface 903 is used to implement information input and output;

[0126] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0127] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);

[0128] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0129] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0130] like Figure 10 The diagram shown is a structural schematic of the storage medium provided in an embodiment of the present invention. (Refer to...) Figure 10 The present invention also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs 1001, which can be executed by one or more processors to implement the above-mentioned IoT platform application traffic collaborative control method.

[0131] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0132] This invention also discloses a computer program product, including a computer program that, when executed by a processor, implements the above-described IoT platform application traffic collaborative control method.

[0133] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0134] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0135] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0136] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0137] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0138] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0141] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0142] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0143] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0144] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0145] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A method for traffic collaborative control in an Internet of Things (IoT) platform application, characterized in that, Applied to the IoT platform layer, which includes a southbound access processing module, a northbound message push module, and a traffic monitoring and control system, the IoT platform application traffic collaborative control method includes the following steps: The system obtains the application ingress traffic value at the application layer through the traffic monitoring and control system, and calculates a first ratio between a preset application layer traffic threshold and the application ingress traffic value. When the first ratio is less than 1, the first ratio is sent to the southbound access processing module through the traffic monitoring and control system; The southbound access processing module obtains the device identifier of the input message, calculates the corresponding identifier hash value based on the device identifier, and divides the input message into retained messages and discarded messages based on the identifier hash value and the first ratio. The southbound access processing module discards the discarded message and sends the retained message to the northbound message push module, so that the northbound message push module pushes the retained message to the application layer. The step of dividing the input message into retained messages and discarded messages based on the identifier hash value and the first ratio specifically includes: Calculate the remainder after dividing the identifier hash value by 100, and calculate the product of the first ratio and 100; Determine the closed interval from 1 to the product as the target interval; When the remainder is within the target interval, the corresponding input message is determined to be a reserved message; When the remainder is outside the target interval, the corresponding input message is determined to be a discard message.

2. The IoT platform application traffic collaborative control method according to claim 1, characterized in that, The process of discarding the discarded message specifically includes: The protocol gateway layer of the southbound access processing module discards the discarded messages and records the number of messages discarded. The number of messages dropped is fed back to the traffic monitoring and control system.

3. The method for collaborative traffic control in an IoT platform application according to claim 1, characterized in that, The IoT platform application traffic collaborative control method also includes the following steps: Obtain the southbound inbound traffic value and message drop count of the southbound access processing module, and calculate the message drop ratio based on the number of dropped messages and the southbound inbound traffic value; When the sum of the message discard ratio and the first ratio is greater than 1, the value of the right endpoint of the target interval is increased to make the target interval larger; When the sum of the message discard ratio and the first ratio is less than 1, the value of the right endpoint of the target interval is reduced to make the target interval smaller.

4. The method for collaborative traffic control in an IoT platform application according to claim 1, characterized in that, The step of sending the reserved message to the northbound message push module, so that the northbound message push module pushes the reserved message to the application layer, specifically includes: The reserved message is decoded by the southbound access processing module, and the decoded reserved message is sent to the northbound message push module. The decoded retained message is pushed to the application layer through the northbound message push module, and the northbound outbound traffic value is recorded. The northbound exit flow rate value is fed back to the flow monitoring and control system.

5. A traffic collaborative control device for an Internet of Things (IoT) platform application, characterized in that, It is applied to the IoT platform layer, including a southbound access processing module, a northbound message push module, and a traffic monitoring and control system, among which: The traffic monitoring and control system is used to obtain the application ingress traffic value of the application layer, calculate the first ratio of the preset application layer traffic threshold to the application ingress traffic value, and when the first ratio is less than 1, send the first ratio to the southbound access processing module. The southbound access processing module is used to obtain the device identifier of the input message, calculate the corresponding identifier hash value based on the device identifier, divide the input message into a retained message and a discarded message based on the identifier hash value and the first ratio, discard the discarded message, and send the retained message to the northbound message push module. The northbound message push module is used to push the reserved message to the application layer; The southbound access processing module includes: The first calculation unit is used to calculate the remainder after dividing the identifier hash value by 100, and to calculate the product of the first ratio and 100; An interval determination unit is used to determine the closed interval from 1 to the product as the target interval; The message segmentation module is used to determine that the corresponding input message is a retained message when the remainder is within the target interval, and to determine that the corresponding input message is a discarded message when the remainder is outside the target interval.

6. The IoT platform application traffic collaborative control device according to claim 5, characterized in that, The southbound access processing module also includes: The second calculation unit is used to obtain the southbound inbound traffic value and the number of messages dropped, and to calculate the message drop ratio based on the number of dropped messages and the southbound inbound traffic value. An interval adjustment unit is used to increase the value of the right endpoint of the target interval to make the target interval larger when the sum of the message discard ratio and the first ratio is greater than 1, and to decrease the value of the right endpoint of the target interval to make the target interval smaller when the sum of the message discard ratio and the first ratio is less than 1.

7. An electronic device, characterized in that, The electronic device includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the computer program is executed by the processor, it implements the IoT platform application traffic collaborative control method as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the IoT platform application traffic collaborative control method as described in any one of claims 1 to 4.