Multi-cluster traffic distribution processing method, system, platform and storage medium
The multi-cluster traffic distribution method and system address the limitations of the CoAP protocol by generating encrypted identifiers and routing data requests to appropriate clusters, enhancing the scalability and security of IoT systems to handle large numbers of devices.
Patent Information
- Application Number
- CN202411166768.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing CoAP protocol is limited in access capacity and struggles to meet the access requirements of a large number of devices in the Internet of Things (IoT) environment, particularly in the smart utilities and metering industries.
A multi-cluster traffic distribution processing method and system that generates an encrypted identifier for devices, initiates resource subscription requests, parses target device identifiers, and routes data reporting requests to appropriate clusters based on routing information, using a symmetric encryption algorithm and load balancing mechanisms.
Enables efficient distribution and processing of data across multiple clusters, supporting the access requirements of massive devices and ensuring secure, scalable, and flexible device management in IoT systems.
Smart Images

Figure CN118694705B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a multi-cluster traffic distribution processing method, system, platform and storage medium. Background Art
[0002] The CoAP protocol is a lightweight communication protocol designed for the Internet of Things (IoT). Its request-response working mode is similar to HTTP. Since the underlying UDP transmission efficiency is higher, it is particularly suitable for communication between resource-constrained terminals and platforms in the field of IoT. Based on the above advantages, it has been widely used in remote data collection in the field of IoT, especially in the smart utilities and metering industries.
[0003] In the public utilities sector, with the popularization of intelligence, a large number of devices are connected to the IoT platform. The existing CoAP protocol is used for the access of devices in a single cluster. However, the access capacity of a single cluster is limited and it is difficult to meet the access requirements of a large number of devices. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a multi-cluster traffic distribution processing method, system, platform and storage medium to implement multi-cluster traffic distribution processing and meet the access requirements of massive devices.
[0005] In order to solve the above technical problems, an embodiment of the present application provides a multi-cluster traffic distribution processing method, including:
[0006] When receiving a login request initiated by a device to a service cluster, generating an encrypted identifier according to a device identification of the device;
[0007] Initiating a resource subscription request to the device carrying the encrypted identifier, so that the device saves the encrypted identifier;
[0008] When the data collected by the device changes, receiving a data reporting request from the device, and forwarding the data reporting request to the distribution service;
[0009] Parsing the target device identifier in the data reporting request through the distribution service, and acquiring the routing information of the device based on the target device identifier to obtain the target routing information;
[0010] The data reporting request is sent to a target belonging cluster based on the target routing information, so that the target belonging cluster performs service processing on the data reporting request.
[0011] In order to solve the above technical problems, an embodiment of the present application provides a multi-cluster traffic distribution processing system, including:
[0012] An encrypted identifier generating unit, configured to generate an encrypted identifier according to a device identification of the device when receiving a login request initiated by the device to the service cluster;
[0013] An encrypted identifier storage unit, configured to initiate a resource subscription request carrying the encrypted identifier to the device, so that the device stores the encrypted identifier;
[0014] A request distribution unit, configured to receive a data reporting request from the device when the data collected by the device changes, and forward the data reporting request to a distribution service;
[0015] a routing information acquisition unit, configured to parse the target device identifier in the data reporting request through the distribution service, and acquire the routing information of the device based on the target device identifier to obtain target routing information;
[0016] The service processing unit is configured to send the data reporting request to a target belonging cluster based on the target routing information, so that the target belonging cluster performs service processing on the data reporting request.
[0017] To solve the above technical problems, a technical solution adopted by the present invention is: to provide an Internet of Things platform, including one or more processors; a memory for storing one or more programs, so that the one or more processors can implement any one of the multi-cluster traffic distribution processing methods described above.
[0018] To solve the above technical problems, a technical solution adopted by the present invention is: a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the multi-cluster traffic distribution processing methods described above is implemented.
[0019] The embodiment of the present invention provides a multi-cluster traffic distribution processing method, system, platform and storage medium. The method includes: when receiving a login request from a device to a service cluster, generating an encrypted identifier according to the device identifier of the device; initiating a resource subscription request to the device with the encrypted identifier so that the device saves the encrypted identifier; when the data collected by the device changes, receiving a data reporting request from the device, and forwarding the data reporting request to a distribution service; parsing the target device identifier in the data reporting request through the distribution service, and obtaining the routing information of the device based on the target device identifier to obtain the target routing information; sending the data reporting request to the target belonging cluster based on the target routing information, so that the data reporting request is processed by the target belonging cluster. After receiving the data reporting request from the device, the embodiment of the present invention can parse the device identifier in the data reporting request to obtain the routing information of the device, so that the request can be distributed to different clusters for processing according to the routing information, so as to realize the distribution processing of multi-cluster traffic, which is conducive to meeting the access requirements of massive devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 It is a flow chart of the implementation of the multi-cluster traffic distribution processing method provided in the embodiment of the present application;
[0022] Figure 2 It is a flowchart of a multi-cluster traffic distribution processing method provided by another embodiment of the present application;
[0023] Figure 3 is a specific implementation flow chart of step S1 provided in an embodiment of the present application;
[0024] Figure 4 is a specific implementation flow chart of step S2 provided in an embodiment of the present application;
[0025] Figure 5 is a specific implementation flow chart of step S3 provided in an embodiment of the present application;
[0026] Figure 6 is a specific implementation flow chart of step S4 provided in an embodiment of the present application;
[0027] Figure 7 is a specific implementation flow chart of step S5 provided in an embodiment of the present application;
[0028] Figure 8 It is a schematic diagram of a multi-cluster traffic distribution processing system provided in an embodiment of the present application;
[0029] Fig. 9 It is a schematic diagram of the Internet of Things platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0033] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0034] It should be noted that the multi-cluster traffic distribution processing method provided in the embodiment of the present application is generally executed by an Internet of Things platform, and accordingly, the multi-cluster traffic distribution processing system is generally configured in the Internet of Things platform.
[0035] See also Figure 1 , Figure 1 A specific implementation of a multi-cluster traffic distribution processing method is shown.
[0036] It should be noted that if there are substantially the same results, the method of the present invention is not limited to Figure 1 The process sequence shown is limited to the following steps:
[0037] S1: When receiving a login request initiated by a device to a service cluster, an encrypted identifier is generated according to a device identification of the device.
[0038] The architecture of the embodiment of the present application is an IoT data processing and communication architecture, which uses the CoAP (Constrained Application Protocol) protocol for lightweight device communication, and realizes the decoupling and efficient collaboration of the device layer, unified access layer, and business processing layer through a multi-layer architecture. The device layer contains various IoT sensors and terminals, which are responsible for data collection and reporting. These devices need to support the CoAP protocol or other compatible lightweight protocols to communicate with the upper system. The device layer also needs to be able to process resource subscription requests from the business processing layer and actively report data when the data changes. The unified access layer is a key bridge connecting the device layer and the business processing layer. It is responsible for processing all traffic from the device; this layer can identify the device identity and distribute the traffic to the corresponding business processing cluster according to the pre-configured routing information. The load balancing mechanism is implemented in the unified access layer to ensure the high availability and scalability of the system. The business processing layer contains multiple business processing clusters, each of which is responsible for processing a specific type of business data; these clusters can initiate resource subscription requests to the device and process the data reported by the device. The business processing layer is also responsible for functions such as data storage, analysis and decision support.
[0039] Specifically, when a login request is received from a device to a service cluster, a device identification of the device is obtained, and then an encrypted identifier is generated according to the device identification of the device.
[0040] See also Figure 2 , Figure 2 A specific implementation method before step S1 is shown, which is described in detail as follows:
[0041] S1A: when a new device is received, obtaining basic information of the new device, wherein the basic information includes a new device identifier and a device type;
[0042] S1B: construct routing information of the new device based on the basic information, wherein the routing information includes a cluster number and a forwarding address;
[0043] S1C: Synchronize the routing information to the device routing information maintenance service of the unified access layer.
[0044] Specifically, the routing information in the embodiment of the present application is maintained globally. When each cluster adds new device information, it is synchronized to the device routing information maintenance service of the unified access layer to establish a mapping relationship between the device identifier (IMEI) and the cluster number (regionId) to which it belongs. That is, when a new device is received, the basic information of the new device is obtained and synchronized to the unified access layer. Among them, the basic information includes the new device identifier and device type. Then, a mapping relationship between the device identifier and the cluster number and forwarding address is constructed, that is, the routing information of the new device is constructed. Finally, the routing information is synchronized to the device routing information maintenance service of the unified access layer.
[0045] See also Figure 3 , Figure 3 A specific implementation of step S1 is shown, which is described in detail as follows:
[0046] S11: when receiving a login request initiated by the device to the service cluster based on the CoAP protocol, obtaining a device identifier of the device through the service cluster;
[0047] S12: Using a symmetric encryption algorithm to perform encryption processing according to the device identification and the random number to generate the encrypted identifier.
[0048] Specifically, when a device needs to log in, the device initiates a login request to the service cluster through a CoAP protocol request. When the service cluster receives the login request, it obtains the device ID (imei) of the device through the service cluster, and then uses a symmetric encryption algorithm to encrypt the device ID and random number to generate an encrypted identifier (Token).
[0049] Furthermore, an AES algorithm is used to perform encryption processing based on the device identification and the random number to generate an encrypted identifier.
[0050] S2: Initiate a resource subscription request with the encrypted identifier to the device, so that the device saves the encrypted identifier.
[0051] Specifically, the service cluster sends the generated encrypted identifier to the device and informs the device to use the Token for subsequent data reporting. The device needs to save the encrypted identifier.
[0052] See also Figure 4 , Figure 4 A specific implementation of step S2 is shown, which is described in detail as follows:
[0053] S21: Initiate the resource subscription request to the device by using the service cluster to carry the encrypted identifier;
[0054] S22: When the device receives the resource subscription request, the device parses the resource subscription request so that the device saves the subscription information corresponding to the resource subscription request and the encrypted identifier.
[0055] Specifically, the service cluster initiates a resource subscription request to the device, and the resource subscription request includes information such as the data type, frequency, and encryption identifier that the device needs to report. When the device receives the resource subscription request, the device parses the resource subscription request so that the device saves the subscription information and encryption identifier corresponding to the resource subscription request.
[0056] Furthermore, in an embodiment of the present application, the business interaction between the device and the IoT platform adopts the CoAP protocol, and the business cluster uses the terminal identifier (imei) + random number to encrypt the Token value through the AES algorithm. When the platform sends a get request, it carries the Token to the device to realize the subscription of device resource information (such as temperature).
[0057] S3: When the data collected by the device changes, a data reporting request of the device is received, and the data reporting request is forwarded to the distribution service.
[0058] Specifically, when the data collected by the device changes, a data reporting request is initiated based on the resources subscribed by the platform and carrying an encrypted identifier. After the IoT platform receives the data reporting request, it forwards the data reporting request to the distribution service.
[0059] See also Figure 5 , Figure 5 A specific implementation of step S3 is shown, which is described in detail as follows:
[0060] S31: When the data collected by the device changes, receiving the data reporting request of the device, wherein the data reporting request carries the encryption identifier;
[0061] S32: Forward the data reporting request to the distribution service through a load balancing mechanism.
[0062] Specifically, since the data reporting request carries the encrypted identifier, it can provide a basis for the subsequent identification of the corresponding device. In addition, since there are multiple distribution services, it is necessary to forward the data reporting request to the distribution service through a load balancing mechanism according to the current load of the distribution service to avoid excessive load on the distribution service and improve the efficiency of request processing.
[0063] S4: parsing the target device identifier in the data reporting request through the distribution service, and acquiring the routing information of the device based on the target device identifier to obtain target routing information.
[0064] Specifically, the distribution service parses the encrypted identifier in the data reporting request, and then parses the target device identifier of the device corresponding to the data reporting request based on the encrypted identifier. Finally, the routing information of the device is obtained based on the target device identifier to obtain the target routing information.
[0065] See also Figure 6 , Figure 6 A specific implementation of step S4 is shown, which is described in detail as follows:
[0066] S41: parsing the target device identifier based on the encrypted identifier in the data reporting request through the distribution service;
[0067] S42: Identify the routing information of the device from the device routing information maintenance service through the target device identifier to obtain the target routing information.
[0068] Specifically, the above steps have synchronized the constructed routing information with the device routing information maintenance service, and the device identification and routing information are mapped, so the routing information of the device can be identified from the device routing information maintenance service through the target device identification, thereby obtaining the target routing information. The target routing information includes the target forwarding address and the target belonging cluster.
[0069] S5: Send the data reporting request to the target belonging cluster based on the target routing information, so that the target belonging cluster performs service processing on the data reporting request.
[0070] See also Figure 7 , Figure 7 A specific implementation of step S5 is shown, which is described in detail as follows:
[0071] S51: Sending the data reporting request to the target home cluster through the target forwarding address;
[0072] S52: Parsing and processing the data in the data reporting request through the target home cluster to perform service processing on the data reporting request.
[0073] Specifically, the data reporting request is sent to the target belonging cluster through the target forwarding address. The target belonging cluster parses and processes the data in the data reporting request to perform business processing on the data reporting request. The data processing includes operations such as data storage, data analysis, and triggering business logic.
[0074] Furthermore, after the service cluster processes the data, it can send processing results or feedback to the device or user as needed.
[0075] In the embodiment of the present application, when a login request is received from a device to a service cluster, an encrypted identifier is generated according to the device identifier of the device; a resource subscription request is initiated to the device with the encrypted identifier so that the device saves the encrypted identifier; when the data collected by the device changes, a data reporting request of the device is received, and the data reporting request is forwarded to the distribution service; the target device identifier in the data reporting request is parsed by the distribution service, and the routing information of the device is obtained based on the target device identifier to obtain the target routing information; the data reporting request is sent to the target belonging cluster based on the target routing information, so that the data reporting request is processed by the target belonging cluster. After receiving the data reporting request of the device, the embodiment of the present invention can parse the device identifier in the data reporting request to obtain the routing information of the device, so that the request can be distributed to different clusters for processing according to the routing information, so as to realize the distribution processing of multi-cluster traffic, which is conducive to meeting the access requirements of massive devices. The embodiment of the present application is suitable for the elastic business architecture processing of device data on the cloud in the massive device scenario, and the migration and deployment of devices between clusters become flexible and controllable.
[0076] Furthermore, the embodiments of the present application fully expand the value domain of the CoAP protocol. Based on the core factor Token of end-cloud interaction, the device identity information is embedded in the Token generation process to ensure the unified access layer's recognition of the message identity information. At the same time, the encryption algorithm is introduced in the Token generation process to ensure the security of message transmission.
[0077] Please refer to Figure 8 , as a response to the above Figure 1 The present application provides an embodiment of a multi-cluster traffic distribution processing system, which is similar to Figure 1 Corresponding to the method embodiment shown, the system can be specifically applied to various Internet of Things platforms.
[0078] like Figure 8 As shown, the multi-cluster traffic distribution processing system of this embodiment includes: an encrypted identifier generation unit 61, an encrypted identifier storage unit 62, a request distribution unit 63, a routing information acquisition unit 64 and a service processing unit 65, wherein:
[0079] The encryption identifier generating unit 61 is used to generate an encryption identifier according to the device identification of the device when receiving a login request initiated by the device to the service cluster;
[0080] The encrypted identifier storage unit 62 is used to initiate a resource subscription request carrying the encrypted identifier to the device, so that the device stores the encrypted identifier;
[0081] The request distribution unit 63 is used to receive a data reporting request from the device when the data collected by the device changes, and forward the data reporting request to the distribution service;
[0082] A routing information acquisition unit 64, configured to parse the target device identifier in the data reporting request through the distribution service, and acquire routing information of the device based on the target device identifier to obtain target routing information;
[0083] The service processing unit 65 is configured to send the data reporting request to a target belonging cluster based on the target routing information, so that the target belonging cluster performs service processing on the data reporting request.
[0084] Furthermore, the encryption identifier generating unit 61 further includes:
[0085] When a new device is received, basic information of the new device is obtained, wherein the basic information includes a new device identifier and a device type;
[0086] Constructing routing information of the new device based on the basic information, wherein the routing information includes a cluster number and a forwarding address;
[0087] The routing information is synchronized to a device routing information maintenance service of a unified access layer.
[0088] Further, the encryption identifier generation unit 61 includes:
[0089] When receiving a login request initiated by the device to the service cluster based on the CoAP protocol, obtaining a device identifier of the device through the service cluster;
[0090] A symmetric encryption algorithm is used to perform encryption processing according to the device identification and the random number to generate the encrypted identifier.
[0091] Furthermore, the encryption identifier storage unit 62 includes:
[0092] Initiate the resource subscription request to the device by carrying the encrypted identifier through the service cluster;
[0093] When the device receives the resource subscription request, the device parses the resource subscription request so that the device saves the subscription information corresponding to the resource subscription request and the encrypted identifier.
[0094] Further, the request distribution unit 63 includes:
[0095] When the data collected by the device changes, receiving the data reporting request of the device, wherein the data reporting request carries the encryption identifier;
[0096] The data reporting request is forwarded to the distribution service through a load balancing mechanism.
[0097] Furthermore, the routing information acquisition unit 64 includes:
[0098] Resolving the target device identifier based on the encrypted identifier in the data reporting request through the distribution service;
[0099] The routing information of the device is identified from the device routing information maintenance service through the target device identifier to obtain the target routing information.
[0100] Furthermore, the service processing unit 65 includes:
[0101] Sending the data reporting request to the target home cluster via the target forwarding address;
[0102] The data in the data reporting request is parsed and processed by the target home cluster to perform service processing on the data reporting request.
[0103] In an embodiment of the present application, when a login request is received from a device to a service cluster, an encrypted identifier is generated according to the device identifier of the device; a resource subscription request is initiated to the device carrying the encrypted identifier so that the device saves the encrypted identifier; when the data collected by the device changes, a data reporting request from the device is received, and the data reporting request is forwarded to the distribution service; the target device identifier in the data reporting request is parsed through the distribution service, and the routing information of the device is obtained based on the target device identifier to obtain the target routing information; the data reporting request is sent to the target belonging cluster based on the target routing information, so that the data reporting request is processed by the target belonging cluster. After receiving the data reporting request from the device, the embodiment of the present invention can parse the device identifier in the data reporting request to obtain the routing information of the device, so that the request can be distributed to different clusters for processing according to the routing information, so as to realize the distribution and processing of multi-cluster traffic, which is conducive to meeting the access requirements of massive devices.
[0104] To solve the above technical problems, the present application embodiment also provides an Internet of Things platform. Fig. 9 , Fig. 9 This is a basic structural block diagram of the Internet of Things platform in this embodiment.
[0105] The Internet of Things platform 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected through a system bus. It should be noted that: Fig. 9 Only an IoT platform 7 having three components, memory 71, processor 72, and network interface 73, is shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the IoT platform here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0106] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of the Internet of Things platform 7, such as a hard disk or memory of the Internet of Things platform 7. In other embodiments, the memory 71 can also be an external storage device of the Internet of Things platform 7, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the Internet of Things platform 7. Of course, the memory 71 can also include both the internal storage unit of the Internet of Things platform 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the Internet of Things platform 7, such as the program code of the multi-cluster traffic distribution processing method, etc. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.
[0107] In some embodiments, the processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 72 is generally used to control the overall operation of the Internet of Things platform 7. In this embodiment, the processor 72 is used to run the program code stored in the memory 71 or process data, such as running the program code of the multi-cluster traffic distribution processing method to implement various embodiments of the multi-cluster traffic distribution processing method.
[0108] The network interface 73 may include a wireless network interface or a wired network interface, and the network interface 73 is generally used to establish a communication connection between the Internet of Things platform 7 and other electronic devices.
[0109] The present application also provides another implementation, that is, providing a computer-readable storage medium, which stores a computer program. The computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the multi-cluster traffic distribution processing method as described above.
[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0111] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to replace some of the technical features therein with equivalents. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A multi-cluster traffic distribution processing method, It is characterized in that include: When a new device is received, basic information of the new device is obtained, wherein the basic information includes a new device identifier and a device type; Constructing routing information of the new device based on the basic information, wherein the routing information includes a cluster number and a forwarding address; Synchronizing the routing information to a device routing information maintenance service at a unified access layer; When receiving a login request initiated by the device to the service cluster based on the CoAP protocol, obtaining a device identifier of the device through the service cluster; Using a symmetric encryption algorithm to perform encryption processing based on the device identification and the random number to generate an encrypted identifier; Initiate a resource subscription request to the device by carrying the encrypted identifier through the service cluster; When the device receives the resource subscription request, the device parses the resource subscription request so that the device saves the subscription information corresponding to the resource subscription request and the encrypted identifier; When the data collected by the device changes, receiving the data reporting request of the device, wherein the data reporting request carries the encryption identifier; Forwarding the data reporting request to the distribution service through a load balancing mechanism; Parsing the target device identifier in the data reporting request through the distribution service, and acquiring the routing information of the device based on the target device identifier to obtain the target routing information; Sending the data reporting request to a target belonging cluster based on the target routing information, so that the target belonging cluster performs service processing on the data reporting request; The step of parsing the target device identifier in the data reporting request through the distribution service, and acquiring the routing information of the device based on the target device identifier, to obtain the target routing information includes: The target device identifier is parsed by the distribution service based on the encrypted identifier in the data reporting request; the routing information of the device is identified from the device routing information maintenance service by the target device identifier to obtain the target routing information; The target routing information includes the target belonging cluster and the target forwarding address, and sending the data reporting request to the target belonging cluster based on the target routing information so as to perform service processing on the data reporting request through the target belonging cluster includes: Sending the data reporting request to the target home cluster via the target forwarding address; The data in the data reporting request is parsed and processed by the target home cluster to perform service processing on the data reporting request.
2. A multi-cluster traffic distribution and processing system, It is characterized in that include: When a new device is received, basic information of the new device is obtained, wherein the basic information includes a new device identifier and a device type; routing information of the new device is constructed based on the basic information, wherein the routing information includes a cluster number and a forwarding address; and the routing information is synchronized to a device routing information maintenance service of a unified access layer; An encrypted identifier generating unit is used to obtain a device identifier of the device through the service cluster when receiving a login request initiated by the device to the service cluster based on the CoAP protocol; encrypt the device identifier and a random number using a symmetric encryption algorithm to generate an encrypted identifier; an encrypted identifier storage unit, configured to initiate a resource subscription request to the device by carrying the encrypted identifier through the service cluster; when the device receives the resource subscription request, the resource subscription request is parsed by the device so that the device stores the subscription information corresponding to the resource subscription request and the encrypted identifier; A request distribution unit, configured to receive the data reporting request of the device when the data collected by the device changes, wherein the data reporting request carries the encryption identifier; and forward the data reporting request to the distribution service through a load balancing mechanism; a routing information acquisition unit, configured to parse the target device identifier in the data reporting request through the distribution service, and acquire the routing information of the device based on the target device identifier to obtain target routing information; A service processing unit, configured to send the data reporting request to a target belonging cluster based on the target routing information, so as to perform service processing on the data reporting request through the target belonging cluster; The routing information acquisition unit includes: parsing the target device identifier based on the encrypted identifier in the data reporting request through the distribution service; identifying the routing information of the device from the device routing information maintenance service through the target device identifier to obtain the target routing information; The target routing information includes the target belonging cluster and the target forwarding address, and the service processing unit includes: sending the data reporting request to the target belonging cluster through the target forwarding address; parsing and processing the data in the data reporting request through the target belonging cluster to perform service processing on the data reporting request.
3. An IoT platform, It is characterized in that The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the multi-cluster traffic distribution processing method as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the multi-cluster traffic distribution processing method according to claim 1 is implemented.
Citation Information
Patent Citations
Equipment callback distribution method and system based on multiple clusters, equipment and storage medium
CN113839999A
Session processing method and system based on CoAP protocol, and storage medium
CN116915413A
