A method and system for processing multi-device access platform
Through the authentication and encrypted transmission mechanism, combined with load balancing technology, the data transmission security and resource utilization problems of the Internet of Things platform when multiple devices are connected are solved, and the security and efficiency of the system are improved.
Patent Information
- Application Number
- CN202410367860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-03-28
AI Technical Summary
IoT platforms face data transmission congestion, lack of security and resource competition when multiple devices are connected, leading to risks of data leaks, privacy leaks and system crashes.
Through identity authentication, encrypted transmission and load balancing mechanisms, it is ensured that encrypted access parameters are processed after identity authentication of the terminal device, and message queue load is monitored in real time, and resources are dynamically allocated to optimize resource utilization and improve processing efficiency.
It improves the security and reliability of data transmission, prevents unauthorized access and data leakage, enhances user trust, and optimizes resource utilization and system performance.
Smart Images

Figure CN118300832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network optimization and network security, and in particular to a method and system for processing a multi-device access platform. Background Art
[0002] An IoT platform is a software system used to connect, manage, and monitor IoT devices. These platforms allow devices to communicate with each other, collect and process sensor data, perform remote control, and provide data analysis and visualization. The core goal of an IoT platform is to achieve interoperability between devices and provide users with smarter and more efficient services and applications. When multiple devices are connected to an IoT platform at the same time, there may be a problem of information queue concurrency, that is, multiple devices send data to the platform at the same time, and the platform needs to process the data and respond accordingly.
[0003] In order to deal with the data transmission congestion and data transmission failure caused by multiple terminal devices sending data to the platform at the same time, the existing technology usually adopts the technical means of message queue and concurrent processing, that is, the IoT platform stores the messages sent by the device in the queue, and the platform processes them one by one in the order of the queue to smoothly process the information sent by the device and ensure that there will be no confusion due to concurrent access. The use of concurrent processing technology can process the information sent by multiple devices at the same time, improve the processing efficiency of the platform, and alleviate the concurrent pressure. However, the data transmitted in the message queue is not encrypted, and it is easy for attackers to intercept and steal sensitive information, thereby threatening the security of transmission. The lack of data encryption mechanism may lead to security issues such as data leakage and privacy leakage, and affect the success rate of message transmission. There are also resource competition and performance bottlenecks in the concurrent processing of message queues. For example, too many processing threads lead to excessive system load, which will increase the message processing delay and even system crash, thereby affecting the success rate of message transmission. In addition, due to the introduction of mechanisms such as message queues, a certain processing delay will also occur in the case of a large amount of messages. Summary of the invention
[0004] The present invention aims to provide a method and system for processing multiple devices accessing a platform, so as to solve the above-mentioned technical problems and improve the security and reliability of data transmission when multiple devices access the same platform.
[0005] In order to solve the above technical problems, the present invention provides a method for processing a multi-device access platform, comprising:
[0006] Receiving access request information sent by a terminal device to a target platform, and sending response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information;
[0007] Acquire first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information, and when the terminal device passes the authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter;
[0008] Decrypting the encrypted access parameters to obtain initial access parameters of the terminal device; allocating the initial access parameters to a corresponding message queue according to a preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters;
[0009] Obtaining the business logic processing result of each message queue on the initial access parameter and feeding back the business logic processing result to the corresponding terminal device;
[0010] Monitor the load speed of each message queue in real time, and load balance the message queues based on the load speed of each message queue.
[0011] In the above scheme, when the terminal device sends access request information to the target platform, the terminal device is authenticated based on the authentication information fed back by the terminal device, which can prevent unauthorized devices from accessing the platform, thereby protecting the security of the system, preventing intrusion and attack by hackers or malicious users, improving the user's trust in the platform, and enhancing the user experience. After the terminal device passes the identity authentication, the access parameters sent by the terminal device are encrypted to prevent the sensitive information of the terminal device from being tampered with or stolen during the transmission process, ensuring the confidentiality of the data. Then, the access parameters are allocated according to the preset allocation standard, and the corresponding resources can be configured according to the characteristics and requirements of different request types, thereby optimizing the utilization of resources and improving the processing performance and efficiency when multiple devices access the platform. Furthermore, the load speed of each message queue is monitored in real time, and resources are dynamically allocated according to the actual load situation, which can avoid the waste of resources caused by overloading of some queues or servers, so that the target platform can better cope with high load conditions and improve overall performance and resource utilization.
[0012] In one implementation, the response information instructs the terminal device to send authentication information, specifically including:
[0013] Control the terminal device to send a registration request to the target platform, and obtain a unique digital certificate allocated by the Internet of Things platform based on the registration request;
[0014] The unique digital certificate is sent to the target platform based on a transport layer encryption protocol; wherein the authentication information is the unique digital certificate of the terminal device.
[0015] In one implementation, the acquiring the first authentication information fed back by the terminal device and performing identity authentication on the terminal device based on the first authentication information specifically includes:
[0016] Acquire the unique digital certificate in the first authentication information and extract the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, reject the identity authentication of the terminal device;
[0017] The certificate chain of the unique digital certificate is iteratively verified based on the issuer information until the root certificate of the unique digital certificate is reached. When the root certificate is issued by a trusted root certificate authority, it is determined that the terminal device has passed the identity authentication.
[0018] In one implementation, the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; and decrypting the encrypted access parameter to obtain the initial access parameter of the terminal device specifically includes:
[0019] Generate a first public key and a first private key based on the preset encryption algorithm;
[0020] Encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identification information, connection parameters, protocol version information, and device status;
[0021] Sending the encrypted access parameters to the target platform via a preset encrypted transmission protocol;
[0022] The target platform is controlled to decrypt the received encrypted access parameter based on the first private key to obtain the initial access parameter.
[0023] In one implementation, allocating the initial access parameters to the corresponding message queue according to a preset allocation standard so that the message queue performs service logic processing on the received initial access parameters specifically includes:
[0024] Obtain access request information corresponding to the initial access parameters;
[0025] Allocating the initial access parameters to message queues of the same type according to the request type of the access request information; wherein the request type includes a data acquisition request, an instruction delivery request, and a service call request;
[0026] Business logic processing is performed based on consumers in the message queue corresponding to each initial access parameter; wherein the business logic processing includes data analysis, device control and service call.
[0027] In one implementation, the real-time monitoring of the load speed of each message queue and load balancing of the message queues based on the load speed of each message queue specifically include:
[0028] Dividing each of the message queues into a plurality of partitions and allocating a preset number of consumers in each of the partitions;
[0029] When the number of pending messages in the first partition exceeds a preset threshold, the pending messages in the first partition are allocated to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than the preset benchmark processing speed;
[0030] When the number of messages received in the message queue exceeds the maximum receiving threshold, the consumer is added to a preset number of partitions in the message queue.
[0031] In one implementation, the multi-device access platform processing method further includes:
[0032] Collecting historical access request information of the target platform within a preset time period, and training an ARIMA model based on the historical request information, so that the ARIMA model outputs a prediction result of future access request information of the target platform;
[0033] The message queue is load balanced based on the future access request information prediction result.
[0034] In a second aspect, the present application also provides a multi-device access platform processing system, including: an information processing module, an identity authentication module, a parameter allocation module, a result feedback module and a load balancing module;
[0035] The information processing module is used to receive access request information sent by the terminal device to the target platform, and send response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information;
[0036] The identity authentication module is used to obtain the first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information, and when the terminal device passes the identity authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter;
[0037] The parameter allocation module is used to decrypt the encrypted access parameters to obtain the initial access parameters of the terminal device; allocate the initial access parameters to the corresponding message queue according to the preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters;
[0038] The result feedback module is used to obtain the business logic processing result of each message queue on the initial access parameter and feed back the business logic processing result to the corresponding terminal device;
[0039] The load balancing module is used to monitor the load speed of each message queue in real time, and perform load balancing on the message queues based on the load speed of each message queue.
[0040] In the above scheme, when the terminal device sends access request information to the target platform, the terminal device is authenticated based on the authentication information fed back by the terminal device, which can prevent unauthorized devices from accessing the platform, thereby protecting the security of the system, preventing intrusion and attack by hackers or malicious users, improving the user's trust in the platform, and enhancing the user experience. After the terminal device passes the identity authentication, the access parameters sent by the terminal device are encrypted to prevent the sensitive information of the terminal device from being tampered with or stolen during the transmission process, ensuring the confidentiality of the data. Then, the access parameters are allocated according to the preset allocation standard, and the corresponding resources can be configured according to the characteristics and requirements of different request types, thereby optimizing the utilization of resources and improving the processing performance and efficiency when multiple devices access the platform. Furthermore, the load speed of each message queue is monitored in real time, and resources are dynamically allocated according to the actual load situation, which can avoid the waste of resources caused by overloading of some queues or servers, so that the target platform can better cope with high load conditions and improve overall performance and resource utilization.
[0041] In one implementation, in one implementation, the response information instructs the terminal device to send authentication information, specifically including:
[0042] Control the terminal device to send a registration request to the target platform, and obtain a unique digital certificate allocated by the Internet of Things platform based on the registration request;
[0043] The unique digital certificate is sent to the target platform based on a transport layer encryption protocol; wherein the authentication information is the unique digital certificate of the terminal device.
[0044] In one implementation, the acquiring the first authentication information fed back by the terminal device and performing identity authentication on the terminal device based on the first authentication information specifically includes:
[0045] Acquire the unique digital certificate in the first authentication information and extract the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, reject the identity authentication of the terminal device;
[0046] The certificate chain of the unique digital certificate is iteratively verified based on the issuer information until the root certificate of the unique digital certificate is reached. When the root certificate is issued by a trusted root certificate authority, it is determined that the terminal device has passed the identity authentication.
[0047] In one implementation, the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; and decrypting the encrypted access parameter to obtain the initial access parameter of the terminal device specifically includes:
[0048] Generate a first public key and a first private key based on the preset encryption algorithm;
[0049] Encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identification information, connection parameters, protocol version information, and device status;
[0050] Sending the encrypted access parameters to the target platform via a preset encrypted transmission protocol;
[0051] The target platform is controlled to decrypt the received encrypted access parameter based on the first private key to obtain the initial access parameter.
[0052] In one implementation, allocating the initial access parameters to the corresponding message queue according to a preset allocation standard so that the message queue performs service logic processing on the received initial access parameters specifically includes:
[0053] Obtain access request information corresponding to the initial access parameters;
[0054] Allocating the initial access parameters to message queues of the same type according to the request type of the access request information; wherein the request type includes a data acquisition request, an instruction delivery request, and a service call request;
[0055] Business logic processing is performed based on consumers in the message queue corresponding to each initial access parameter; wherein the business logic processing includes data analysis, device control and service call.
[0056] In one implementation, the real-time monitoring of the load speed of each message queue and load balancing of the message queues based on the load speed of each message queue specifically include:
[0057] Dividing each of the message queues into a plurality of partitions and allocating a preset number of consumers in each of the partitions;
[0058] When the number of pending messages in the first partition exceeds a preset threshold, the pending messages in the first partition are allocated to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than the preset benchmark processing speed;
[0059] When the number of messages received in the message queue exceeds the maximum receiving threshold, the consumer is added to a preset number of partitions in the message queue.
[0060] In one implementation, the multi-device access platform processing system further includes:
[0061] Collecting historical access request information of the target platform within a preset time period, and training an ARIMA model based on the historical request information, so that the ARIMA model outputs a prediction result of future access request information of the target platform;
[0062] The message queue is load balanced based on the future access request information prediction result.
[0063] In a third aspect, the present application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the multi-device access platform processing method as described above.
[0064] In a fourth aspect, the present application also provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the multi-device access platform processing method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of a process flow of a method for processing a multi-device access platform provided in one embodiment of the present invention;
[0066] Figure 2 A module diagram of a multi-device access platform processing system provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0067] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0068] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0069] 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.
[0070] First, some terms in this application are explained to facilitate understanding by those skilled in the art.
[0071] (1) Terminal devices: Terminal devices are various physical devices connected to the network in the IoT system, such as sensors, actuators, smart devices, etc. These devices can be various forms of objects, connected to the network through embedded sensors and communication modules to achieve information collection, transmission and exchange.
[0072] (2) IoT platform: The IoT platform is a middleware system that connects, manages and controls IoT devices, and provides functions such as data storage, analysis, control and application development. The IoT platform usually provides data access interfaces, supports the connection of various types of terminal devices, and provides functions such as device management, security authentication, data processing, and rule engines to achieve monitoring, management and application development of terminal devices.
[0073] (3) Consumer: A consumer in a message queue is a component or program that obtains messages from a message queue and processes them. Consumers are usually applications or services designed to process specific types of messages. They are responsible for pulling messages from a message queue, processing them, and then performing corresponding operations based on the content of the messages.
[0074] Example 1
[0075] See also Figure 1 , Figure 1 The flowchart of a method for processing a multi-device access platform provided in an embodiment of the present invention is as follows. The embodiment of the present invention provides a method for processing a multi-device access platform, including steps 101 to 105, each of which is as follows:
[0076] Step 101: receiving access request information sent by a terminal device to a target platform, and sending response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information.
[0077] When accessing the target platform, the terminal device needs to send access request information to the target platform to inform the platform of the identity of the device and the operation to be performed, so that the platform can authenticate and authorize the device according to the device identity and access request. With the correct access request information, the platform can ensure that the device can safely access the platform and provide corresponding services and resources for the device. The target platform will feedback corresponding response information based on the access request information sent by the terminal device, and standardize the format of access parameters sent by different terminal devices based on the response information, so that the platform can quickly understand the current status and requirements of the device, so as to better allocate and schedule resources. In the embodiment of the present invention, the target platform is a type of Internet of Things platform, which is not limited here.
[0078] In one embodiment, the response information instructs the terminal device to send authentication information, specifically including: controlling the terminal device to send a registration request to the target platform, and obtaining a unique digital certificate assigned by the Internet of Things platform based on the registration request; sending the unique digital certificate to the Internet of Things platform based on a transport layer encryption protocol; wherein the authentication information is the unique digital certificate of the terminal device.
[0079] In an embodiment of the present invention, the response information is used to instruct the terminal device on how to feed back authentication information to the target platform. The terminal device sends a registration request to the target platform based on the received response information. After receiving the registration request sent by the terminal device, the target platform generates a unique digital certificate as the identity credential of the terminal device. Preferably, after receiving the unique digital certificate, the terminal device will also store it in the local hardware to prevent unauthorized access and tampering. Then, based on the secure transport layer encryption protocol, the terminal device sends the generated unique digital certificate to the target platform in real time using the TLS protocol to verify its identity and conduct secure communication.
[0080] Step 102: Obtain first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information. When the terminal device passes the identity authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameters based on a preset encryption algorithm to generate encrypted access parameters.
[0081] In one embodiment, the obtaining of the first authentication information fed back by the terminal device and authenticating the terminal device based on the first authentication information specifically includes: obtaining the unique digital certificate in the first authentication information and extracting the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, refusing the identity authentication of the terminal device; iteratively verifying the certificate chain of the unique digital certificate based on the issuer information until the root certificate of the unique digital certificate, and when the root certificate is issued by a trusted root certificate authority, determining that the terminal device has passed the identity authentication.
[0082] In an embodiment of the present invention, after the target platform receives the first authentication information fed back by the terminal device, that is, the unique digital certificate, it will extract the certificate revocation list and certificate validity period in the unique digital certificate, and perform certificate validity period verification and certificate revocation list check on it. When the unique digital certificate of the terminal device is included in the certificate revocation list or the number is not within the validity period, the target platform will reject the identity authentication request of the terminal device. When the unique digital certificate is not included in the certificate revocation list and the validity period of the unique digital certificate is valid within the current time range, the certificate chain of the unique digital certificate is iteratively verified based on the issuer information. That is, check the issuer in the unique digital certificate, and then iteratively verify the entire certificate chain until it is confirmed that the root certificate in the unique digital integer is issued by a trusted root certificate authority (CA). At this time, it is determined that the terminal device has passed the identity authentication, and the target platform is controlled to send access indication information to the terminal device.
[0083] In one embodiment, the access indication information instructs the terminal device to encrypt the initial access parameters based on a preset encryption algorithm to generate encrypted access parameters; decrypting the encrypted access parameters to obtain the initial access parameters of the terminal device specifically includes: generating a first public key and a first private key based on the preset encryption algorithm; encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identity information, connection parameters, protocol version information and device status; sending the encrypted access parameters to the target platform via a preset encryption transmission protocol; controlling the target platform to decrypt the received encrypted access parameters based on the first private key to obtain the initial access parameters.
[0084] In an embodiment of the present invention, an asymmetric encryption algorithm is used to generate a pair of random key pairs, including a first public key and a first private key. The initial access parameters are encrypted based on the first public key in the terminal device to ensure the security of information transmission during the communication process. Then, the encrypted access parameters are sent to the target platform through the preset encrypted transmission protocol HTTPS protocol to prevent middleman attacks or eavesdropping during the transmission process. In an embodiment of the present invention, the initial access parameters include device identification information, connection parameters, protocol version information, and device status. The terminal device provides its own identification information to facilitate the target platform to manage it, and the identification information includes device ID, device model, and firmware version information. The connection parameters include information such as network connection mode, network address, and connection port so that the target platform can quickly connect to the terminal device according to the connection parameters. The terminal device provides protocol version information, which can be appropriately managed and optimized by the target platform. In addition, the initial access parameters include device status, such as "online", "offline", "fault", etc., which can facilitate the platform to understand the current status of the terminal device.
[0085] Step 103: decrypt the encrypted access parameters to obtain the initial access parameters of the terminal device; allocate the initial access parameters to the corresponding message queue according to a preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters.
[0086] After receiving the encrypted access parameters sent by the terminal device, the target platform decrypts the received encrypted access parameters using the first private key to obtain the initial access parameters of the terminal device.
[0087] In one embodiment, the initial access parameters are allocated to the corresponding message queue according to a preset allocation standard so that the message queue performs business logic processing on the received initial access parameters, specifically including: obtaining access request information corresponding to the initial access parameters; allocating the initial access parameters to message queues of the same type according to the request type of the access request information; wherein the request types include data acquisition requests, instruction issuance requests, and service call requests; performing business logic processing based on consumers in the message queues corresponding to each initial access parameter; wherein the business logic processing includes data analysis, device control, and service call.
[0088] In the embodiment of the present invention, the access request information corresponding to the initial access parameter is obtained, and the initial access parameter is allocated to different consumer queues according to the type of the access request information, so as to classify and identify different types of access request information, determine the processing method of each device access request information, and realize unified management and control of the access request information. The processing type of each message queue in the target platform is predefined. Whenever the message queue receives a new initial access parameter, the type of access request information corresponding to the initial access parameter is classified, and the distribution of the initial access parameter is realized based on the rule engine technology, so as to realize the allocation of the initial access parameter to the corresponding message queue. Then, there will be responsive consumers in different message queues to process the access request information in the queue, and appropriate processing procedures or services are allocated to each queue according to the type and characteristics of the message queue. Preferably, the message queue can also be classified according to the type of access request information and the type of initial access parameter at the same time. For example, a message queue is created for processing the access request type of data acquisition request and the device type of sensor. However, the above scheme may cause the created message queue to be too large due to the difference in request type and initial access parameter type, thereby occupying too many platform resources, and can be adjusted according to specific application requirements. When executing the business logic processing operations of data analysis, consumers may obtain sensor data from the message queue and process and analyze the data, such as calculating statistical information, executing prediction models, detecting anomalies, etc.; when executing the business logic processing operations of device control, for the device control instructions contained in the message queue, consumers can be responsible for sending these instructions to the corresponding devices and monitoring the execution results; when executing the business logic processing operations of service calls, consumers may call other services or functional modules according to the request information in the message, such as storing data and sending notifications.
[0089] Step 104: Obtain the business logic processing result of each message queue for the initial access parameter and distribute the business logic processing result to the corresponding terminal device.
[0090] Obtain the business logic processing results of each initial access parameter in the message queue, such as device access success and failure information, and feed back the corresponding business logic processing results to the corresponding terminal device. At this point, the terminal device completes the information access processing process based on this access request information and the target platform.
[0091] Step 105: monitor the load speed of each message queue in real time, and perform load balancing on the message queues based on the load speed of each message queue.
[0092] In one embodiment, the load speed of each message queue is monitored in real time, and the message queues are load balanced based on the load speed of each message queue, specifically including: dividing each message queue into a number of partitions and allocating a preset number of consumers in each partition; when the number of pending messages in a first partition exceeds a preset threshold, allocating the pending messages in the first partition to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than a preset reference value; when the number of messages received in the message queue exceeds the maximum receiving threshold, adding consumers within a preset number of partitions in the message queue.
[0093] The message queue is divided into several partitions, each of which is processed by one or more consumers. In this way, the partition load balancing of the message can be achieved, ensuring that the load processed by each consumer is relatively balanced. When the number of pending messages in a partition exceeds the processing capacity of the partition, that is, exceeds the preset threshold, the pending messages in the first partition are allocated to other partitions in the message queue where the first partition is located. Preferably, a second partition whose processing speed is higher than the benchmark processing speed is selected. The preset benchmark processing speed is the average time it takes for each partition in the message queue to process a message request. Preferably, further, when the number of messages received by the message queue as a whole exceeds the maximum receiving threshold that the message queue can bear, additional consumers can be added to the message queue according to the number of messages received to increase the message processing speed. Furthermore, when the number of pending messages in the message queue is small, the number of consumers set in the message queue can be reduced, and the number of consumers can be dynamically adjusted according to the load of the message queue.
[0094] In one embodiment, the multi-device access platform processing method further includes: collecting historical access request information of the target platform within a preset time period, training an ARIMA model based on the historical request information so that the ARIMA model outputs a prediction result of future access request information of the target platform; and load balancing the message queue based on the prediction result of future access request information.
[0095] The ARIMA model can capture trend information in time series data, thereby helping to understand the data trends when different devices access the platform. Through trend analysis, the periodicity, seasonality and other characteristics of the data can be discovered, providing the platform with more comprehensive data insights. In an embodiment of the present invention, the ARIMA model is trained based on the historical access request information received by the target platform in the past period of time. Preferably, data analysis and preprocessing are required before training, including data cleaning, outlier processing, missing value filling, etc., to ensure the quality and integrity of the data. Use appropriate algorithms and techniques to tune the parameters of the ARIMA model to improve the adaptability and prediction accuracy of the model. Methods such as grid search and AIC / BIC criteria can be used to determine the optimal model parameters. The trained ARIMA model can output the access request information prediction results of the target platform in the future period of time. Based on the prediction results, the message queue can be load balanced in advance to improve the message processing capability when multiple devices are accessed.
[0096] In an embodiment of the present invention, a multi-device access platform processing device is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned multi-device access platform processing method is implemented.
[0097] In an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned multi-device access platform processing method.
[0098] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the multi-device access platform processing device.
[0099] The multi-device access platform processing device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The multi-device access platform processing device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of the multi-device access platform processing device and do not constitute a limitation on the multi-device access platform processing device. It may include more or fewer components than the components, or a combination of certain components, or different components. For example, the multi-device access platform processing device may also include input and output devices, network access devices, buses, and the like.
[0100] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the multi-device access platform processing device, and uses various interfaces and lines to connect various parts of the entire multi-device access platform processing device.
[0101] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the multi-device access platform processing device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0102] Among them, if the module based on the processing of the multi-device access platform is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0103] The embodiment of the present invention provides a method for processing a multi-device access platform. When a terminal device sends access request information to a target platform, the terminal device is authenticated based on the authentication information fed back by the terminal device, which can prevent unauthorized devices from accessing the platform, thereby protecting the security of the system, preventing intrusion and attack by hackers or malicious users, improving the user's trust in the platform, and enhancing the user experience. After the terminal device passes the identity authentication, the access parameters sent by the terminal device are encrypted to prevent the sensitive information of the terminal device from being tampered with or stolen during the transmission process, thereby ensuring the confidentiality of the data. Then, the access parameters are allocated according to the preset allocation standard, and the corresponding resources can be configured according to the characteristics and requirements of different request types, thereby optimizing the utilization of resources and improving the processing performance and efficiency when multiple devices access the platform. Furthermore, the load speed of each message queue is monitored in real time, and resources are dynamically allocated according to the actual load situation, which can avoid the waste of resources caused by overloading of certain queues or servers, so that the target platform can better cope with high load conditions and improve overall performance and resource utilization.
[0104] Example 2
[0105] See also Figure 2 , Figure 2 The module diagram of a device for encrypting and decrypting keyboard input provided in an embodiment of the present invention. The embodiment of the present invention provides a multi-device access platform processing system, including: an information processing module 201, an identity authentication module 202, a parameter allocation module 203, a result feedback module 204 and a load balancing module 205;
[0106] The information processing module 201 is used to receive access request information sent by the terminal device to the target platform, and send response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information;
[0107] The identity authentication module 202 is used to obtain the first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information, and when the terminal device passes the identity authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter;
[0108] The parameter allocation module 203 is used to decrypt the encrypted access parameters to obtain the initial access parameters of the terminal device; allocate the initial access parameters to the corresponding message queue according to the preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters;
[0109] The result feedback module 204 is used to obtain the business logic processing result of each message queue on the initial access parameter and feed back the business logic processing result to the corresponding terminal device;
[0110] The load balancing module 205 is used to monitor the load speed of each message queue in real time, and perform load balancing on the message queues based on the load speed of each message queue.
[0111] In one embodiment, the response information instructs the terminal device to send authentication information, specifically including: controlling the terminal device to send a registration request to the target platform, and obtaining a unique digital certificate assigned by the Internet of Things platform based on the registration request; sending the unique digital certificate to the target platform based on a transport layer encryption protocol; wherein the authentication information is the unique digital certificate of the terminal device.
[0112] In one embodiment, the obtaining of the first authentication information fed back by the terminal device and authenticating the terminal device based on the first authentication information specifically includes: obtaining the unique digital certificate in the first authentication information and extracting the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, refusing the identity authentication of the terminal device; iteratively verifying the certificate chain of the unique digital certificate based on the issuer information until the root certificate of the unique digital certificate, and when the root certificate is issued by a trusted root certificate authority, determining that the terminal device has passed the identity authentication.
[0113] In one embodiment, the access indication information instructs the terminal device to encrypt the initial access parameters based on a preset encryption algorithm to generate encrypted access parameters; decrypt the encrypted access parameters to obtain the initial access parameters of the terminal device, specifically including: generating a first public key and a first private key based on the preset encryption algorithm; encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identity information, connection parameters, protocol version information and device status; sending the encrypted access parameters to the target platform via a preset encryption transmission protocol; controlling the target platform to decrypt the received encrypted access parameters based on the first private key to obtain the initial access parameters.
[0114] In one embodiment, the initial access parameters are allocated to the corresponding message queue according to a preset allocation standard so that the message queue performs business logic processing on the received initial access parameters, specifically including: obtaining access request information corresponding to the initial access parameters; allocating the initial access parameters to message queues of the same type according to the request type of the access request information; wherein the request types include data acquisition requests, instruction issuance requests, and service call requests; performing business logic processing based on consumers in the message queues corresponding to each initial access parameter; wherein the business logic processing includes data analysis, device control, and service call.
[0115] In one embodiment, the load speed of each message queue is monitored in real time, and the message queues are load balanced based on the load speed of each message queue, specifically including: dividing each message queue into a number of partitions and allocating a preset number of consumers in each partition; when the number of pending messages in a first partition exceeds a preset threshold, allocating the pending messages in the first partition to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than a preset benchmark processing speed; when the number of messages received in the message queue exceeds the maximum receiving threshold, adding consumers within a preset number of partitions in the message queue.
[0116] In one embodiment, the multi-device access platform processing system also includes: collecting historical access request information of the target platform within a preset time period, training an ARIMA model based on the historical request information so that the ARIMA model outputs a prediction result of future access request information of the target platform; and load balancing the message queue based on the prediction result of future access request information.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0118] The embodiment of the present invention provides a multi-device access platform processing system. When a terminal device sends access request information to a target platform, the terminal device is authenticated based on the authentication information fed back by the terminal device, which can prevent unauthorized devices from accessing the platform, thereby protecting the security of the system, preventing intrusion and attack by hackers or malicious users, improving the user's trust in the platform, and enhancing the user experience. After the terminal device passes the identity authentication, the access parameters sent by the terminal device are encrypted to prevent the sensitive information of the terminal device from being tampered with or stolen during the transmission process, thereby ensuring the confidentiality of the data. Then, the access parameters are allocated according to the preset allocation standard, and the corresponding resources can be configured according to the characteristics and requirements of different request types, thereby optimizing the utilization of resources and improving the processing performance and efficiency when multiple devices access the platform. Furthermore, the load speed of each message queue is monitored in real time, and resources are dynamically allocated according to the actual load situation, which can avoid the waste of resources caused by overloading of some queues or servers, so that the target platform can better cope with high load conditions and improve overall performance and resource utilization.
[0119] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing a multi-device access platform, characterized in that: include: Receiving access request information sent by a terminal device to a target platform, and sending response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information; Acquire first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information, and when the terminal device passes the authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; Decrypting the encrypted access parameters to obtain initial access parameters of the terminal device; allocating the initial access parameters to a corresponding message queue according to a preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters; Obtaining the business logic processing result of each message queue on the initial access parameter and feeding back the business logic processing result to the corresponding terminal device; Monitor the load speed of each message queue in real time, and load balance the message queues based on the load speed of each message queue; The obtaining the first authentication information fed back by the terminal device and performing identity authentication on the terminal device based on the first authentication information specifically includes: Acquire the unique digital certificate in the first authentication information and extract the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, reject the identity authentication of the terminal device; Iteratively verify the certificate chain of the unique digital certificate based on the issuer information until the root certificate of the unique digital certificate, and when the root certificate is issued by a trusted root certificate authority, determine that the terminal device passes the identity authentication; The access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; and decrypting the encrypted access parameter to obtain the initial access parameter of the terminal device specifically includes: Generate a first public key and a first private key based on the preset encryption algorithm; Encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identification information, connection parameters, protocol version information, and device status; Sending the encrypted access parameters to the target platform via a preset encrypted transmission protocol; Controlling the target platform to decrypt the received encrypted access parameter based on the first private key to obtain the initial access parameter; The real-time monitoring of the load speed of each message queue and load balancing of the message queues based on the load speed of each message queue specifically include: Dividing each of the message queues into a plurality of partitions and allocating a preset number of consumers in each of the partitions; When the number of pending messages in the first partition exceeds a preset threshold, the pending messages in the first partition are allocated to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than the preset benchmark processing speed; When the number of messages received in the message queue exceeds the maximum receiving threshold, adding the consumer in a preset number of partitions in the message queue; The multi-device access platform processing method further includes: Collecting historical access request information of the target platform within a preset time period, and training an ARIMA model based on the historical access request information, so that the ARIMA model outputs a prediction result of future access request information of the target platform; The message queue is load balanced based on the future access request information prediction result.
2. A method for processing a multi-device access platform as claimed in claim 1, characterized in that: The response information instructs the terminal device to send authentication information, specifically including: Controlling the terminal device to send a registration request to the target platform, and obtaining a unique digital certificate allocated by the target platform based on the registration request; The unique digital certificate is sent to the target platform based on a transport layer encryption protocol; wherein the authentication information is the unique digital certificate of the terminal device.
3. A method for processing a multi-device access platform as claimed in claim 1, characterized in that: The allocating the initial access parameters to the corresponding message queue according to the preset allocation standard so that the message queue performs service logic processing on the received initial access parameters specifically includes: Obtain access request information corresponding to the initial access parameters; Allocating the initial access parameters to message queues of the same type according to the request type of the access request information; wherein the request type includes a data acquisition request, an instruction delivery request, and a service call request; Business logic processing is performed based on consumers in the message queue corresponding to each initial access parameter; wherein the business logic processing includes data analysis, device control and service call.
4. A multi-device access platform processing system, characterized in that: include: Information processing module, identity authentication module, parameter allocation module, result feedback module and load balancing module; The information processing module is used to receive access request information sent by the terminal device to the target platform, and send response information to the terminal device based on the access request information; wherein the response information instructs the terminal device to send authentication information; The identity authentication module is used to obtain the first authentication information fed back by the terminal device and authenticate the terminal device based on the first authentication information, and when the terminal device passes the identity authentication, send access indication information to the terminal device; wherein the access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; The parameter allocation module is used to decrypt the encrypted access parameters to obtain the initial access parameters of the terminal device; allocate the initial access parameters to the corresponding message queue according to the preset allocation standard, so that the message queue performs business logic processing on the received initial access parameters; The result feedback module is used to obtain the business logic processing result of each message queue on the initial access parameter and feed back the business logic processing result to the corresponding terminal device; The load balancing module is used to monitor the load speed of each message queue in real time, and load balance the message queues based on the load speed of each message queue; The obtaining the first authentication information fed back by the terminal device and performing identity authentication on the terminal device based on the first authentication information specifically includes: Acquire the unique digital certificate in the first authentication information and extract the certificate revocation list and validity period, and when the unique digital certificate is included in the certificate revocation list or the unique digital certificate exceeds the validity period, reject the identity authentication of the terminal device; Iteratively verify the certificate chain of the unique digital certificate based on the issuer information until the root certificate of the unique digital certificate, and when the root certificate is issued by a trusted root certificate authority, determine that the terminal device passes the identity authentication; The access indication information instructs the terminal device to encrypt the initial access parameter based on a preset encryption algorithm to generate an encrypted access parameter; and decrypting the encrypted access parameter to obtain the initial access parameter of the terminal device specifically includes: Generate a first public key and a first private key based on the preset encryption algorithm; Encrypting the initial access parameters using the first public key to obtain encrypted access parameters; wherein the initial access parameters include any one or more of device identification information, connection parameters, protocol version information, and device status; Sending the encrypted access parameters to the target platform via a preset encrypted transmission protocol; Controlling the target platform to decrypt the received encrypted access parameter based on the first private key to obtain the initial access parameter; The real-time monitoring of the load speed of each message queue and load balancing of the message queues based on the load speed of each message queue specifically include: Dividing each of the message queues into a plurality of partitions and allocating a preset number of consumers in each of the partitions; When the number of pending messages in the first partition exceeds a preset threshold, the pending messages in the first partition are allocated to a second partition in the message queue corresponding to the first partition; wherein the message processing speed in the second partition is higher than the preset benchmark processing speed; When the number of messages received in the message queue exceeds the maximum receiving threshold, adding the consumer in a preset number of partitions in the message queue; The multi-device access platform processing method further includes: Collecting historical access request information of the target platform within a preset time period, and training an ARIMA model based on the historical access request information, so that the ARIMA model outputs a prediction result of future access request information of the target platform; The message queue is load balanced based on the future access request information prediction result.
5. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for processing a multi-device access platform as described in any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the multi-device access platform processing method as described in any one of claims 1 to 3.
